/* ============================================================
   Sistem Tempahan Bilik Mesyuarat - Stylesheet Utama
   ============================================================ */

:root {
    --primary: #0d6efd;
    --secondary: #20c997;
    --bg: #f8f9fa;
    --card-bg: rgba(255, 255, 255, 0.75);
    --text-main: #212529;
    --text-muted: #6c757d;
    --border-color: rgba(0, 0, 0, 0.08);
    --sidebar-bg: rgba(255, 255, 255, 0.9);
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.06);
    --radius-lg: 18px;
    --radius-md: 12px;
}

[data-bs-theme="dark"] {
    --bg: #12141a;
    --card-bg: rgba(30, 33, 42, 0.75);
    --text-main: #e9ecef;
    --text-muted: #9aa1ac;
    --border-color: rgba(255, 255, 255, 0.08);
    --sidebar-bg: rgba(24, 26, 33, 0.9);
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.35);
}

body {
    background: linear-gradient(135deg, #eef2ff 0%, #f8f9fa 50%, #e8fbf3 100%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

[data-bs-theme="dark"] body {
    background: linear-gradient(135deg, #101218 0%, #14161d 50%, #101a16 100%);
    background-attachment: fixed;
}

/* ---------- Auth pages ---------- */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}
.auth-wrapper { width: 100%; max-width: 440px; }
.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg) !important;
}
.auth-logo {
    width: 64px; height: 64px;
    margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; font-size: 1.8rem;
    box-shadow: var(--shadow-soft);
}

/* ---------- Glass card ---------- */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: transform .15s ease, box-shadow .15s ease;
}
.glass-card:hover { box-shadow: 0 12px 36px rgba(0,0,0,0.10); }

/* ---------- Sidebar ---------- */
.app-sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1030;
    transition: transform .2s ease;
    overflow-y: auto;
}
.app-sidebar .brand {
    display: flex; align-items: center; gap: .6rem;
    padding: 1.25rem 1.25rem;
    font-weight: 700;
}
.app-sidebar .brand-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.app-sidebar .nav-link {
    color: var(--text-muted);
    border-radius: var(--radius-md);
    padding: .6rem .9rem;
    margin: .15rem .75rem;
    font-size: .92rem;
    display: flex; align-items: center; gap: .65rem;
}
.app-sidebar .nav-link i { font-size: 1.05rem; }
.app-sidebar .nav-link.active,
.app-sidebar .nav-link:hover {
    background: linear-gradient(135deg, rgba(13,110,253,.12), rgba(32,201,151,.12));
    color: var(--primary);
}
.app-sidebar .nav-section-title {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    padding: 1rem 1.25rem .3rem;
}

.app-main { margin-left: 260px; min-height: 100vh; }
.app-topbar {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: .8rem 1.5rem;
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; justify-content: space-between;
}
.app-content { padding: 1.5rem; }

@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.show { transform: translateX(0); }
    .app-main { margin-left: 0; }
}

/* ---------- Stat cards ---------- */
.stat-card {
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.4rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}
.stat-card .icon-badge {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: rgba(255,255,255,.22);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}
.stat-card.bg-grad-primary { background: linear-gradient(135deg, #0d6efd, #4a8dff); }
.stat-card.bg-grad-success { background: linear-gradient(135deg, #20c997, #4fe0b5); }
.stat-card.bg-grad-warning { background: linear-gradient(135deg, #ffb020, #ffcf6b); }
.stat-card.bg-grad-danger  { background: linear-gradient(135deg, #ff5c7c, #ff8fa3); }

/* ---------- Status badges ---------- */
.badge-status-pending   { background: #ffc107; color: #533f03; }
.badge-status-approved  { background: #20c997; color: #003b2c; }
.badge-status-rejected  { background: #dc3545; color: #fff; }
.badge-status-cancelled { background: #adb5bd; color: #212529; }

/* ---------- Cards, rounded, soft ---------- */
.card { border-radius: var(--radius-lg); border: 1px solid var(--border-color); }
.rounded-xl { border-radius: var(--radius-lg) !important; }
.shadow-soft { box-shadow: var(--shadow-soft) !important; }

.theme-toggle-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border-color);
}

/* Sidebar toggler for mobile */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 1025;
}
.sidebar-overlay.show { display: block; }
