/* =====================================================
   ADMIN.CSS - Halaman Admin Catering
   ===================================================== */

* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #ecf0f1;
    color: #2c3e50;
}

a { text-decoration: none; color: inherit; }

/* ============ LOGIN ============ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 20px;
}

.login-box {
    background: #fff;
    padding: 40px 35px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 6px;
}

.login-box .sub {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 14px;
}

/* ============ LAYOUT ============ */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 0;
    flex-shrink: 0;
}

.sidebar .brand {
    padding: 22px 20px;
    background: #1f2d3d;
    text-align: center;
    border-bottom: 1px solid #34495e;
}
.sidebar .brand h2 { color: #f39c12; font-size: 20px; }
.sidebar .brand small { color: #95a5a6; font-size: 12px; }

.sidebar ul { list-style: none; padding: 10px 0; }
.sidebar ul li a {
    display: block;
    padding: 12px 22px;
    color: #ecf0f1;
    border-left: 3px solid transparent;
    transition: all .2s;
    font-size: 14px;
}
.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: #34495e;
    border-left-color: #f39c12;
    color: #f39c12;
}

.main-content {
    flex: 1;
    padding: 25px 30px;
    overflow-x: auto;
}

/* ============ TOPBAR ============ */
.topbar {
    background: #fff;
    padding: 14px 22px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}
.topbar h1 { font-size: 22px; color: #2c3e50; }
.topbar .user { font-size: 14px; color: #7f8c8d; }
.topbar .user strong { color: #2c3e50; }

/* ============ STATISTIK ============ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.stat-card {
    background: #fff;
    padding: 22px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border-left: 5px solid #f39c12;
}
.stat-card.blue   { border-left-color: #3498db; }
.stat-card.green  { border-left-color: #27ae60; }
.stat-card.red    { border-left-color: #e74c3c; }
.stat-card.purple { border-left-color: #9b59b6; }

.stat-card h4 {
    color: #7f8c8d;
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 500;
}
.stat-card .value {
    font-size: 28px;
    color: #2c3e50;
    font-weight: bold;
}

/* ============ CARD ============ */
.card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin-bottom: 22px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header h2 { font-size: 18px; color: #2c3e50; }

/* ============ TABLE ============ */
.table-wrap { overflow-x: auto; }

.tbl {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.tbl thead {
    background: #34495e;
    color: #fff;
}

.tbl th, .tbl td {
    padding: 11px 12px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
    font-size: 14px;
    vertical-align: middle;
}

.tbl tbody tr:hover { background: #fafafa; }

.tbl .actions { white-space: nowrap; }
.tbl .actions a { margin-right: 4px; }

/* ============ BUTTON ============ */
.btn {
    display: inline-block;
    padding: 9px 18px;
    background: #3498db;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all .2s;
    font-family: inherit;
}
.btn:hover { background: #2980b9; }
.btn-warning { background: #f39c12; }
.btn-warning:hover { background: #e67e22; }
.btn-success { background: #27ae60; }
.btn-success:hover { background: #229954; }
.btn-danger  { background: #e74c3c; }
.btn-danger:hover { background: #c0392b; }
.btn-secondary { background: #95a5a6; }
.btn-secondary:hover { background: #7f8c8d; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; }

/* ============ FORM ============ */
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #34495e;
    font-weight: 600;
    font-size: 14px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f39c12;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
@media (max-width:600px){ .form-row { grid-template-columns: 1fr; } }

/* ============ ALERT ============ */
.alert {
    padding: 11px 16px;
    border-radius: 4px;
    margin-bottom: 18px;
    font-size: 14px;
}
.alert-success { background: #d4edda; color: #155724; border-left:4px solid #28a745; }
.alert-danger  { background: #f8d7da; color: #721c24; border-left:4px solid #dc3545; }
.alert-info    { background: #d1ecf1; color: #0c5460; border-left:4px solid #17a2b8; }

/* ============ STATUS BADGE ============ */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.status-Menunggu     { background: #fff3cd; color: #856404; }
.status-Dikonfirmasi { background: #d1ecf1; color: #0c5460; }
.status-Diproses     { background: #cce5ff; color: #004085; }
.status-Selesai      { background: #d4edda; color: #155724; }
.status-Dibatalkan   { background: #f8d7da; color: #721c24; }
.status-Aktif        { background: #d4edda; color: #155724; }
.status-Nonaktif     { background: #f8d7da; color: #721c24; }
.status-Belum        { background: #f8d7da; color: #721c24; }
.status-Lunas        { background: #d4edda; color: #155724; }
.status-Sebagian     { background: #fff3cd; color: #856404; }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .admin-wrapper { flex-direction: column; }
    .sidebar { width: 100%; }
    .sidebar ul { display: flex; flex-wrap: wrap; padding: 0; }
    .sidebar ul li { flex: 1 0 50%; }
    .sidebar ul li a { border-left: none; border-bottom: 3px solid transparent; }
    .sidebar ul li a:hover, .sidebar ul li a.active {
        border-left: none;
        border-bottom-color: #f39c12;
    }
}
