/* ============================================================
   SIPRAKERIN - Custom Stylesheet
   SMK Negeri 1 Bawolato
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
    --primary:        #1a56db;
    --primary-dark:   #1340a8;
    --primary-light:  #e8effd;
    --secondary:      #6c757d;
    --success:        #0e9f6e;
    --warning:        #f59e0b;
    --danger:         #e02424;
    --info:           #0891b2;

    --sidebar-width:  260px;
    --sidebar-bg:     #0f172a;
    --sidebar-hover:  rgba(255,255,255,0.08);
    --sidebar-active: rgba(26,86,219,0.15);
    --navbar-height:  64px;

    --bg:             #f1f5f9;
    --card-bg:        #ffffff;
    --text:           #1e293b;
    --text-muted:     #64748b;
    --border:         #e2e8f0;

    --shadow-sm:      0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow:         0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg:      0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius:         12px;
    --radius-sm:      8px;
    --transition:     all 0.2s ease;
}

/* ── Reset & Base ─────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════════════ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0f172a 100%);
    padding: 20px;
    overflow: hidden;
    position: relative;
}

.login-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: float 8s ease-in-out infinite;
}
.shape-1 { width: 400px; height: 400px; background: #1a56db; top: -100px; right: -100px; animation-delay: 0s; }
.shape-2 { width: 300px; height: 300px; background: #7c3aed; bottom: -80px; left: -80px; animation-delay: 3s; }
.shape-3 { width: 200px; height: 200px; background: #0891b2; top: 50%; left: 40%; animation-delay: 6s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

.particles { position: absolute; inset: 0; }
.particle {
    position: absolute;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    bottom: -10px;
    animation: rise linear infinite;
}
@keyframes rise {
    0% { bottom: -10px; opacity: 1; }
    100% { bottom: 110%; opacity: 0; }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-header { text-align: center; margin-bottom: 28px; }
.login-logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(26,86,219,0.4);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(26,86,219,0.4); }
    50% { box-shadow: 0 8px 32px rgba(26,86,219,0.7); }
}

.login-title { font-size: 26px; font-weight: 800; color: var(--text); margin: 0; letter-spacing: -0.5px; }
.login-subtitle { color: var(--text-muted); font-size: 13px; margin: 4px 0 0; }
.login-divider { width: 40px; height: 3px; background: linear-gradient(90deg,var(--primary),#7c3aed); border-radius: 2px; margin: 12px auto 0; }

.form-floating label { font-size: 14px; color: var(--text-muted); }
.form-floating .form-control {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 14px;
    padding-right: 40px;
}
.form-floating .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26,86,219,0.1);
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
    padding: 4px;
    transition: var(--transition);
}
.password-toggle:hover { color: var(--primary); }

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(26,86,219,0.4);
}
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26,86,219,0.5);
}
.btn-login:active { transform: translateY(0); }

.login-guide {
    margin-top: 24px;
    padding: 16px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(26,86,219,0.15);
}
.guide-title { font-size: 12px; font-weight: 600; color: var(--primary); margin-bottom: 10px; }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.guide-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }

.login-footer { text-align: center; margin-top: 24px; font-size: 12px; color: var(--text-muted); }

.demo-card {
    margin-top: 16px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    padding: 16px;
    animation: slideUp 0.5s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.demo-title { font-size: 12px; color: rgba(255,255,255,0.8); margin-bottom: 10px; }
.demo-title code { background: rgba(255,255,255,0.2); padding: 2px 6px; border-radius: 4px; }
.demo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.demo-item {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}
.demo-item:hover { background: rgba(255,255,255,0.25); transform: scale(1.02); }


/* ═══════════════════════════════════════════════════════════
   MAIN APP LAYOUT
═══════════════════════════════════════════════════════════ */
.app-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    height: 100dvh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}
.logo-title { display: block; font-size: 14px; font-weight: 700; color: white; line-height: 1; }
.logo-sub   { display: block; font-size: 10px; color: rgba(255,255,255,0.5); margin-top: 2px; }

.sidebar-user {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    font-size: 18px;
}
.user-name { font-size: 13px; font-weight: 600; color: white; line-height: 1.3; }
.user-role { font-size: 11px; color: rgba(255,255,255,0.5); }

.sidebar-nav {
    list-style: none;
    padding: 8px 8px;
    margin: 0;
    flex: 1;
}
.sidebar-nav .nav-item { margin-bottom: 2px; }
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 13.5px;
    font-weight: 500;
}
.sidebar-nav .nav-link:hover {
    background: var(--sidebar-hover);
    color: white;
}
.sidebar-nav .nav-link i { font-size: 16px; flex-shrink: 0; }
.sidebar-nav .nav-item.active .nav-link {
    background: linear-gradient(135deg, rgba(26,86,219,0.2), rgba(124,58,237,0.1));
    color: #93c5fd;
    border-left: 2px solid var(--primary);
}

.sidebar-footer {
    padding: 12px 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 13px;
}
.logout-btn:hover { background: rgba(224,36,36,0.15); color: #fca5a5; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-navbar {
    height: var(--navbar-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar-left { display: flex; align-items: center; gap: 16px; }
.sidebar-toggle {
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-muted);
    transition: var(--transition);
    display: none; /* shown on mobile */
}
.sidebar-toggle:hover { background: var(--bg); color: var(--primary); }

.page-title { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; }

.navbar-right { display: flex; align-items: center; gap: 8px; }

.nav-icon-btn {
    width: 38px;
    height: 38px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
}
.nav-icon-btn:hover { background: var(--primary-light); color: var(--primary); }

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.user-nav-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 10px;
    transition: var(--transition);
}
.user-nav-btn:hover { background: var(--bg); }
.user-nav-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.user-nav-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}
.user-nav-name { font-size: 13px; font-weight: 600; color: var(--text); }

/* Notification Dropdown */
.notif-dropdown {
    width: 360px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
}
.btn-mark-all { background: none; border: none; color: var(--primary); font-size: 12px; cursor: pointer; }
.notif-footer { padding: 12px; text-align: center; border-top: 1px solid var(--border); }
.notif-footer a { font-size: 13px; color: var(--primary); text-decoration: none; font-weight: 500; }

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}
.notif-item:hover { background: var(--primary-light); }
.notif-item.unread { background: rgba(26,86,219,0.04); }
.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.notif-msg { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* Content Wrapper */
.content-wrapper { padding: 24px; flex: 1; }

.alert-floating {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 450px;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}


/* ═══════════════════════════════════════════════════════════
   STAT CARDS
═══════════════════════════════════════════════════════════ */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--card-accent, var(--primary)), transparent);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 10px;
}
.stat-value { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-change { font-size: 12px; margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* Color variants */
.stat-card.blue   { --card-accent: var(--primary); }
.stat-card.green  { --card-accent: var(--success); }
.stat-card.yellow { --card-accent: var(--warning); }
.stat-card.red    { --card-accent: var(--danger); }
.stat-card.cyan   { --card-accent: var(--info); }
.stat-card.purple { --card-accent: #7c3aed; }

.stat-icon.blue   { background: rgba(26,86,219,0.1);  color: var(--primary); }
.stat-icon.green  { background: rgba(14,159,110,0.1); color: var(--success); }
.stat-icon.yellow { background: rgba(245,158,11,0.1); color: var(--warning); }
.stat-icon.red    { background: rgba(224,36,36,0.1);  color: var(--danger); }
.stat-icon.cyan   { background: rgba(8,145,178,0.1);  color: var(--info); }
.stat-icon.purple { background: rgba(124,58,237,0.1); color: #7c3aed; }


/* ═══════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════ */
.app-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}
.app-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
}
.app-card-title { font-size: 15px; font-weight: 700; color: var(--text); margin: 0; }
.app-card-body  { padding: 20px; }


/* ═══════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════ */
.table-app thead th {
    background: var(--bg);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 16px;
    border-bottom: 2px solid var(--border);
}
.table-app tbody td { padding: 12px 16px; vertical-align: middle; font-size: 13.5px; border-color: var(--border); }
.table-app tbody tr { transition: var(--transition); }
.table-app tbody tr:hover { background: rgba(26,86,219,0.03); }


/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn { border-radius: 8px; font-weight: 500; font-size: 13px; transition: var(--transition); }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-sm { padding: 4px 10px; font-size: 12px; }


/* ═══════════════════════════════════════════════════════════
   PRESENSI GPS
═══════════════════════════════════════════════════════════ */
.gps-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: white;
    border-radius: var(--radius);
    padding: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.gps-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.gps-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}
.gps-status.active { background: rgba(14,159,110,0.2); color: #6ee7b7; border: 1px solid rgba(14,159,110,0.3); }
.gps-status.inactive { background: rgba(224,36,36,0.2); color: #fca5a5; border: 1px solid rgba(224,36,36,0.3); }
.gps-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    animation: gps-blink 1s ease-in-out infinite;
}
@keyframes gps-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.gps-time { font-size: 42px; font-weight: 800; letter-spacing: -2px; }
.gps-date { font-size: 14px; opacity: 0.7; margin-top: 4px; }
.gps-coords { font-size: 12px; opacity: 0.6; margin-top: 12px; font-family: monospace; }

.presensi-btn {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}
.btn-masuk {
    background: linear-gradient(135deg, #0e9f6e, #047857);
    color: white;
    box-shadow: 0 4px 15px rgba(14,159,110,0.4);
}
.btn-masuk:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(14,159,110,0.5); }
.btn-pulang {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 15px rgba(245,158,11,0.4);
}
.btn-pulang:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(245,158,11,0.5); }
.btn-sudah { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); cursor: not-allowed; }

#map { border-radius: var(--radius); overflow: hidden; }


/* ═══════════════════════════════════════════════════════════
   JURNAL KOMENTAR (Chat Thread)
═══════════════════════════════════════════════════════════ */
.comment-thread { display: flex; flex-direction: column; gap: 12px; }
.comment-item {
    display: flex;
    gap: 10px;
}
.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.comment-avatar-ph {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}
.comment-bubble {
    background: var(--bg);
    border-radius: 0 12px 12px 12px;
    padding: 10px 14px;
    max-width: calc(100% - 50px);
    flex: 1;
    border: 1px solid var(--border);
}
.comment-bubble.mine {
    background: var(--primary-light);
    border-color: rgba(26,86,219,0.2);
    border-radius: 12px 0 12px 12px;
}
.comment-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-author { font-size: 13px; font-weight: 600; color: var(--text); }
.comment-role   { font-size: 11px; color: white; background: var(--primary); padding: 1px 6px; border-radius: 10px; }
.comment-time   { font-size: 11px; color: var(--text-muted); }
.comment-text   { font-size: 13.5px; color: var(--text); line-height: 1.5; }
.comment-actions { margin-top: 6px; }
.btn-reply      { background: none; border: none; color: var(--primary); font-size: 12px; cursor: pointer; padding: 0; font-weight: 500; }

.comment-replies {
    margin-left: 46px;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}


/* ═══════════════════════════════════════════════════════════
   BADGE STATUS
═══════════════════════════════════════════════════════════ */
.badge { font-weight: 500; font-size: 11.5px; padding: 4px 10px; border-radius: 20px; }


/* ═══════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════ */
.form-label { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
    color: var(--text);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}


/* ═══════════════════════════════════════════════════════════
   APPROVAL FLOW STEPPER
═══════════════════════════════════════════════════════════ */
.approval-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 16px 0;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    text-align: center;
    position: relative;
}
.step::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}
.step:last-child::after { display: none; }
.step-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 1;
    border: 2px solid var(--border);
    background: var(--card-bg);
    position: relative;
}
.step.done .step-icon { background: var(--success); border-color: var(--success); color: white; }
.step.done::after   { background: var(--success); }
.step.active .step-icon { border-color: var(--primary); color: var(--primary); }
.step.rejected .step-icon { background: var(--danger); border-color: var(--danger); color: white; }
.step-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }


/* ═══════════════════════════════════════════════════════════
   ERROR PAGES
═══════════════════════════════════════════════════════════ */
.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.error-code { font-size: 120px; font-weight: 800; color: var(--border); line-height: 1; }
.error-msg { font-size: 22px; font-weight: 700; color: var(--text); }


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }
    .sidebar-overlay.show { display: block; }
    .sidebar-toggle { display: flex; }
    .main-content { margin-left: 0; }
    .content-wrapper { padding: 16px; }
    .app-navbar { padding: 0 16px; }
    .notif-dropdown { width: 300px; }
    .stat-value { font-size: 22px; }
}

@media (max-width: 575px) {
    .content-wrapper { padding: 12px; }
    .gps-time { font-size: 32px; }
    .login-card { padding: 24px 20px; }
    .demo-grid { grid-template-columns: repeat(2, 1fr); }
    .alert-floating { right: 12px; left: 12px; min-width: auto; }
}

/* ── DataTables overrides ─────────────────────────────────── */
.dataTables_wrapper .dataTables_filter input { border: 1.5px solid var(--border); border-radius: 8px; padding: 6px 12px; font-size: 13px; }
.dataTables_wrapper .dataTables_length select { border: 1.5px solid var(--border); border-radius: 8px; padding: 4px 8px; }
div.dataTables_wrapper div.dataTables_filter { margin-bottom: 8px; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Loading spinner ─────────────────────────────────────── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}
