.admin-body {
    background: #f0f2f5;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 220px;
    min-height: 100vh;
    background: linear-gradient(180deg, #1a2f6e 0%, #1a237e 60%, #162060 100%);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: width 0.3s;
    box-shadow: 3px 0 15px rgba(0,0,0,0.25);
}

.admin-sidebar.collapsed { width: 0; overflow: hidden; }

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white;
}

.sidebar-logo i {
    font-size: 1.8rem;
    color: #f5c842;
    flex-shrink: 0;
}

.logo-name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
}

.logo-sub {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.5);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    margin: 2px 0;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
    border-left-color: rgba(255,255,255,0.4);
}

.sidebar-link.active {
    color: white;
    background: rgba(255,255,255,0.15);
    border-left-color: #f5c842;
    border-radius: 0 25px 25px 0;
    margin-right: 12px;
}

.sidebar-logout {
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,100,100,0.8);
}

.sidebar-logout:hover {
    color: #ff6b6b;
    background: rgba(255,100,100,0.1);
}

.admin-main {
    margin-left: 220px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s;
}

.admin-topbar {
    background: white;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #555;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-toggle:hover { background: #f0f2f5; }

.topbar-right { margin-left: auto; }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    position: relative;
    transition: background 0.2s;
}

.topbar-user:hover { background: #f0f2f5; }
.topbar-user > i:first-child { font-size: 1.6rem; color: #1a2f6e; }
.topbar-user .fa-chevron-down { font-size: 0.75rem; color: #888; }

.topbar-user-info { display: flex; flex-direction: column; }
.topbar-name { font-size: 0.88rem; font-weight: 700; color: #333; }
.topbar-role { font-size: 0.75rem; color: #888; }

.topbar-dropdown {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    min-width: 150px;
    overflow: hidden;
    z-index: 200;
}

.topbar-user:hover .topbar-dropdown { display: block; }

.topbar-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: #dc3545;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s;
}

.topbar-dropdown a:hover { background: #fdecea; }

.admin-content {
    padding: 28px 28px;
    flex: 1;
}

.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.admin-page-header h2 {
    font-size: 1.5rem;
    color: #1a2f6e;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.admin-page-header h2 i { color: #c8952a; }

.admin-add-btn {
    background: #1a2f6e;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    text-decoration: none;
}

.admin-add-btn:hover { background: #243d8f; }

.ajax-label {
    background: linear-gradient(135deg, #1a2f6e, #243d8f);
    color: rgba(255,255,255,0.9);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.ajax-label i { color: #f5c842; }

.ajax-hint {
    display: block;
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 16px;
    padding-left: 4px;
}

.ajax-hint i { color: #1a2f6e; }

.admin-filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.admin-search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.admin-search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
}

.admin-search-box input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: white;
}

.admin-search-box input:focus {
    outline: none;
    border-color: #1a2f6e;
    box-shadow: 0 0 0 3px rgba(26,47,110,0.08);
}

.admin-filter-bar select {
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
}

.admin-filter-bar select:focus { outline: none; border-color: #1a2f6e; }

.admin-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 24px;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.admin-card-header h3 {
    font-size: 1rem;
    color: #1a2f6e;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.admin-card-header h3 i { color: #c8952a; }

.btn-link {
    color: #1a2f6e;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.btn-link:hover { text-decoration: underline; }

.admin-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.half { margin-bottom: 0 !important; }

.table-responsive { overflow-x: auto; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-table thead {
    background: #f8f9ff;
    border-bottom: 2px solid #e8eaf0;
}

.admin-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a2f6e;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.admin-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
    vertical-align: middle;
}

.admin-table tbody tr:hover { background: #fafbff; }
.admin-table tbody tr:last-child td { border-bottom: none; }

.table-footer {
    padding: 12px 16px;
    font-size: 0.82rem;
    color: #888;
    border-top: 1px solid #f0f0f0;
}


.admin-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1.5px solid transparent;
    white-space: nowrap;
}

.status-available    { color: #2e7d32; background: #e8f5e9; border-color: #4caf50; }
.status-occupied     { color: #e65100; background: #fff3e0; border-color: #ff9800; }
.status-maintenance  { color: #bf360c; background: #fff8e1; border-color: #ff8f00; }
.status-cancelled    { color: #c62828; background: #fdecea; border-color: #ef5350; }
.status-pending      { color: #e65100; background: #fff3e0; border-color: #ff9800; }
.status-confirmed    { color: #2e7d32; background: #e8f5e9; border-color: #4caf50; }
.status-checked-in   { color: #1565c0; background: #e3f2fd; border-color: #42a5f5; }
.status-checked-out  { color: #6a1b9a; background: #f3e5f5; border-color: #ab47bc; }
.status-completed    { color: #2e7d32; background: #e8f5e9; border-color: #4caf50; }
.status-failed       { color: #c62828; background: #fdecea; border-color: #ef5350; }


.admin-btn-edit {
    background: #1a2f6e;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.admin-btn-edit:hover { background: #243d8f; }

.admin-btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.admin-btn-delete:hover { background: #b02a37; }

.admin-btn-view {
    background: #17a2b8;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.admin-btn-view:hover { background: #138496; }

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-left: 4px solid transparent;
}

.admin-stat-card.blue   { border-left-color: #1a2f6e; }
.admin-stat-card.green  { border-left-color: #28a745; }
.admin-stat-card.gold   { border-left-color: #c8952a; }
.admin-stat-card.purple { border-left-color: #7b1fa2; }

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.admin-stat-card.blue   .stat-icon { background: #e8ecff; color: #1a2f6e; }
.admin-stat-card.green  .stat-icon { background: #e8f5e9; color: #28a745; }
.admin-stat-card.gold   .stat-icon { background: #fff8ee; color: #c8952a; }
.admin-stat-card.purple .stat-icon { background: #f3e5f5; color: #7b1fa2; }

.stat-data h3 { font-size: 1.6rem; font-weight: 800; color: #1a2f6e; line-height: 1; margin-bottom: 4px; }
.stat-data p  { font-size: 0.82rem; color: #888; margin: 0; }

.room-avail-list { padding: 16px 20px; }
.room-avail-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; font-size: 0.88rem; }
.room-avail-item:last-child { border-bottom: none; }
.room-avail-item > span:nth-child(2) { flex: 1; color: #555; }
.room-avail-item strong { color: #1a2f6e; font-weight: 700; }

.avail-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.avail-dot.available   { background: #28a745; }
.avail-dot.occupied    { background: #fd7e14; }
.avail-dot.maintenance { background: #dc3545; }

.quick-actions { padding: 16px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-btn { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 8px; text-decoration: none; font-size: 0.82rem; font-weight: 600; transition: all 0.2s; color: white; }
.quick-btn.blue   { background: #1a2f6e; }
.quick-btn.green  { background: #28a745; }
.quick-btn.gold   { background: #c8952a; }
.quick-btn.purple { background: #7b1fa2; }
.quick-btn:hover  { opacity: 0.88; transform: translateY(-1px); }

/* ===================== MODAL ===================== */

.admin-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-modal-box {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9ff;
}

.admin-modal-header h3 {
    font-size: 1rem;
    color: #1a2f6e;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #888;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover { background: #fdecea; color: #dc3545; }

.admin-modal-body  { padding: 22px; }
.admin-modal-footer {
    padding: 16px 22px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #fafafa;
}

.modal-ajax-note {
    text-align: center;
    font-size: 0.78rem;
    color: #888;
    padding: 0 22px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.modal-ajax-note i { color: #1a2f6e; }

.admin-btn-save {
    background: #1a2f6e;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: background 0.2s;
}

.admin-btn-save:hover { background: #243d8f; }

.admin-btn-cancel-modal {
    background: white;
    color: #555;
    border: 1.5px solid #ddd;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s;
}

.admin-btn-cancel-modal:hover { background: #f0f2f5; }

.admin-modal-body .form-group { margin-bottom: 1rem; }
.admin-modal-body .form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: #444; margin-bottom: 5px; }
.admin-modal-body .form-group input,
.admin-modal-body .form-group select,
.admin-modal-body .form-group textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.admin-modal-body .form-group input:focus,
.admin-modal-body .form-group select:focus,
.admin-modal-body .form-group textarea:focus { outline: none; border-color: #1a2f6e; }
.admin-modal-body .form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.req { color: #dc3545; }


.admin-login-body {
    background: linear-gradient(135deg, #1a2f6e 0%, #1a237e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-login-wrapper { width: 100%; max-width: 440px; padding: 20px; }

.admin-login-box {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.admin-login-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.admin-login-logo i { font-size: 2.2rem; color: #c8952a; }
.admin-login-logo h1 { font-size: 1.1rem; color: #1a2f6e; letter-spacing: 1px; margin: 0; }
.admin-login-logo span { font-size: 0.7rem; color: #888; letter-spacing: 3px; display: block; margin-top: 2px; }

.admin-login-box h2 { font-size: 1.4rem; color: #1a2f6e; margin-bottom: 5px; }
.admin-login-box > p { color: #888; font-size: 0.88rem; margin-bottom: 1.5rem; }

@media (max-width: 1024px) {
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .admin-sidebar { width: 0; overflow: hidden; }
    .admin-sidebar.open { width: 220px; }
    .admin-main { margin-left: 0; }
    .admin-stats-grid { grid-template-columns: 1fr 1fr; }
    .admin-content { padding: 16px; }
    .admin-table th:nth-child(4),
    .admin-table td:nth-child(4) { display: none; }
}

@media (max-width: 480px) {
    .admin-stats-grid { grid-template-columns: 1fr; }
    .admin-modal-box { max-width: 100%; }
    .admin-modal-body .form-row-2 { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
    .admin-page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}