/* ===== RESET & BASE ===== */
* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    background: #f4f6f9;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}
a { text-decoration: none; }

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== HEADER & NAVBAR ===== */
header {
    background: #2c3e50;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 15px;
}
header h1 {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tombol hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
nav a {
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    transition: background .2s;
    white-space: nowrap;
}
nav a:hover,
nav a.active {
    background: #3498db;
}

/* User info di kanan */
.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,.2);
    font-size: 13px;
}
.nav-user .nama {
    color: #fff;
    font-weight: 600;
}
.nav-user .logout {
    color: #ff6b6b;
    font-size: 13px;
}
.nav-user .logout:hover { color: #ff4444; }

/* ===== RESPONSIVE NAVBAR ===== */
@media (max-width: 768px) {
    .nav-toggle { display: block; }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2c3e50;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
        box-shadow: 0 4px 10px rgba(0,0,0,.2);
    }
    nav.open { max-height: 500px; }
    nav a {
        padding: 14px 20px;
        border-radius: 0;
        border-top: 1px solid rgba(255,255,255,.05);
    }
    .nav-user {
        margin: 0;
        padding: 14px 20px;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,.2);
        flex-direction: row;
        justify-content: space-between;
    }
    header h1 { font-size: 15px; }
}

/* ===== CARD ===== */
.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    margin-bottom: 20px;
    overflow-x: auto;
}
h2 {
    color: #2c3e50;
    font-size: 18px;
    margin-bottom: 15px;
}

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}
th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}
th {
    background: #34495e;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}
tr:hover { background: #f9f9f9; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* ===== BUTTON ===== */
.btn {
    display: inline-block;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    transition: opacity .2s;
    font-family: inherit;
}
.btn:hover { opacity: .85; }
.btn-primary { background: #3498db; }
.btn-success { background: #27ae60; }
.btn-warning { background: #f39c12; }
.btn-danger  { background: #e74c3c; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { cursor: not-allowed; opacity: .5; }

/* ===== BADGE ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}
.badge-pemesanan { background: #f39c12; }
.badge-hold      { background: #95a5a6; }
.badge-selesai   { background: #27ae60; }
.badge-terpasang { background: #16a085; }

/* ===== FORM ===== */
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 13px;
    color: #333;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,.1);
}

/* ===== ALERT ===== */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}
.alert-success { background: #d4edda; color: #155724; }
.alert-danger  { background: #f8d7da; color: #721c24; }
.alert-warning { background: #fff3cd; color: #856404; }
.alert-info    { background: #d1ecf1; color: #0c5460; }

/* ===== STATS DASHBOARD ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    border-left: 4px solid #3498db;
    transition: transform .2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card h3 {
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.stat-card .value {
    font-size: 26px;
    font-weight: bold;
    color: #2c3e50;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container { padding: 0 12px; }
    .card { padding: 15px; }
    h2 { font-size: 16px; }
    .stat-card .value { font-size: 22px; }
    th, td { padding: 8px; font-size: 12px; }
    .btn { font-size: 12px; padding: 7px 12px; }
}

@media (max-width: 480px) {
    .stats { grid-template-columns: 1fr 1fr; }
    .stat-card { padding: 15px; }
    .stat-card .value { font-size: 20px; }
}