:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    --bg-body: #f8fafc;
    --bg-card: #e5e7eb;
    --bg-sidebar: #0f172a;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-white: #ffffff;
    
    --border-color: #e2e8f0;
    --input-focus: rgba(99, 102, 241, 0.15);
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --radius-sm: 0.375rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

* {
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-body);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.03) 0, transparent 50%),
        radial-gradient(at 50% 0%, rgba(139, 92, 246, 0.03) 0, transparent 50%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

html {
    height: 100%;
}

.wrapper {
    min-height: 100vh;
    display: flex;
    width: 100%;
}

.sidebar {
    width: 260px;
    height: 100vh;
    background-color: var(--bg-sidebar);
    background-image: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 1030;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255,255,255,0.05);
}
.main-panel {
    margin-left: 260px;
    width: calc(100% - 260px);
    min-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.page-siswa-data .main-panel,
body.page-pelatih-data .main-panel,
body.page-laporan .main-panel {
    margin-left: 0 !important;
    width: 100% !important;
}

.content-wrap {
    padding: 1.5rem;
    width: 100%;
}

.container-fluid {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    max-width: none !important;
}

.laporan-actions {
    flex-wrap: wrap;
    width: 100%;
    align-items: stretch;
}

.laporan-actions .btn,
.laporan-actions .btn-sm {
    flex: 1 1 160px;
    white-space: normal;
    text-align: center;
}


.brand-wrap {
    padding: 2.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 0.5rem;
}

.brand-logo-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 6px 15px rgba(0,0,0,0.3));
    margin-bottom: 0.5rem;
}

.brand-logo {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-lg);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4);
    margin-bottom: 0.5rem;
}

.brand-meta h6 {
    font-size: 1.25rem !important;
    font-weight: 700;
    margin-bottom: 0.25rem !important;
    color: #ffffff;
}

.brand-meta small {
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
    display: block;
    line-height: 1.2;
}


.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    margin: 0.25rem 1rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.925rem;
    transition: all 0.2s ease;
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.sidebar-nav .nav-link:hover {
    color: white;
    background-color: rgba(255,255,255,0.05);
}

.sidebar-nav .nav-link:hover i {
    transform: translateX(3px);
}

.sidebar-nav .nav-link.active {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}



.topbar {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}



/* Special Full Width Pages */
body.page-siswa-data .sidebar,
body.page-pelatih-data .sidebar,
body.page-laporan .sidebar,
body.page-siswa-data .sidebar-backdrop,
body.page-pelatih-data .sidebar-backdrop,
body.page-laporan .sidebar-backdrop {
    display: none !important;
}


.topbar-user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.topbar-title-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-title-meta .fw-semibold {
    font-size: 0.95rem;
    color: var(--text-main);
}

.content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.student-jadwal-card {
    background-color: #e5e7eb;
}

.jadwal-panel {
    background-color: #e5e7eb;
}

.card-title {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.25rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    color: inherit;
}

.btn:not([class*="btn-outline"]):not(.btn-light):not(.btn-link) {
    color: #ffffff;
}

.btn-light {
    color: #1f2937;
}


.btn i {
    color: currentColor;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.3);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Dashboard KPIs */
.kpi-card {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.kpi-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0.05;
    border-radius: 0 0 0 100%;
}

.kpi-value {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin-top: 0.25rem;
}

.kpi-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    background: #ffffff;
}

.btn-outline-secondary {
    border-color: #cbd5f5;
    color: #1f2937;
    background: #ffffff;
}

.btn-outline-success {
    border-color: #86efac;
    color: #15803d;
    background: #ffffff;
}

.btn-outline-info {
    border-color: #7dd3fc;
    color: #0369a1;
    background: #ffffff;
}

.btn-outline-warning {
    border-color: #fcd34d;
    color: #b45309;
    background: #ffffff;
}

.btn-outline-danger {
    border-color: #fca5a5;
    color: #b91c1c;
    background: #ffffff;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-success:hover,
.btn-outline-info:hover,
.btn-outline-warning:hover,
.btn-outline-danger:hover {
    color: #ffffff;
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-outline-secondary:hover {
    background: #334155;
    border-color: #334155;
}

.btn-outline-success:hover {
    background: #16a34a;
    border-color: #16a34a;
}

.btn-outline-info:hover {
    background: #0284c7;
    border-color: #0284c7;
}

.btn-outline-warning:hover {
    background: #f59e0b;
    border-color: #f59e0b;
}

.btn-outline-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn:active,
.btn:focus,
.btn:focus-visible {
    color: inherit;
}

.btn-outline-primary:active,
.btn-outline-secondary:active,
.btn-outline-success:active,
.btn-outline-info:active,
.btn-outline-warning:active,
.btn-outline-danger:active,
.btn-outline-primary:focus,
.btn-outline-secondary:focus,
.btn-outline-success:focus,
.btn-outline-info:focus,
.btn-outline-warning:focus,
.btn-outline-danger:focus,
.btn-outline-primary:focus-visible,
.btn-outline-secondary:focus-visible,
.btn-outline-success:focus-visible,
.btn-outline-info:focus-visible,
.btn-outline-warning:focus-visible,
.btn-outline-danger:focus-visible {
    color: #ffffff;
}

.btn-light:active,
.btn-light:focus,
.btn-light:focus-visible,
.btn-outline-light:active,
.btn-outline-light:focus,
.btn-outline-light:focus-visible {
    color: #1f2937;
}

.topbar-messages {
    position: relative;
}

.topbar-message-btn {
    background: linear-gradient(135deg, #f0f4ff, #faf5ff);
    border: 1px solid rgba(99, 102, 241, 0.12);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    color: var(--text-muted);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.topbar-message-btn:hover {
    background: linear-gradient(135deg, #e8ecff, #f3eaff);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.topbar-message-count {
    position: absolute;
    top: -6px;
    right: -6px;
    padding: 0.2rem 0.4rem;
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    background: linear-gradient(135deg, #ef4444, #ec4899);
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
    animation: badgeBounce 2s ease-in-out infinite;
}

@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.topbar-logout {
    background: rgba(239, 68, 68, 0.1) !important;
    color: var(--danger) !important;
    border: none !important;
    transition: all 0.2s ease;
}

.topbar-logout:hover {
    background: var(--danger) !important;
    color: white !important;
}

.topbar-message-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 380px;
    background-color: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(226, 232, 240, 0.6);
    z-index: 1050;
    overflow: hidden;
    animation: msgDropIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes msgDropIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.topbar-messages.open .topbar-message-menu {
    display: block;
}

/* --- Message Dropdown Header --- */
.topbar-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.15rem;
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%);
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
}

.topbar-message-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-message-header-icon {
    font-size: 1.15rem;
    color: var(--primary);
}

.topbar-message-header-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.topbar-message-header-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

.topbar-message-compose-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.topbar-message-compose-btn:hover {
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* --- Message List --- */
.topbar-message-list {
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.topbar-message-list::-webkit-scrollbar {
    width: 4px;
}

.topbar-message-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* --- Message Item --- */
.topbar-message-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1.15rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    transition: all 0.2s ease;
}

.topbar-message-item:last-child {
    border-bottom: none;
}

.topbar-message-item:hover {
    background: linear-gradient(90deg, #f8faff 0%, #faf8ff 100%);
    transform: translateX(2px);
}

.topbar-message-item.topbar-message-unread {
    background: linear-gradient(90deg, #eef2ff 0%, #faf5ff 50%, #fff 100%);
}

.topbar-message-item.topbar-message-unread:hover {
    background: linear-gradient(90deg, #e8ecff 0%, #f3eaff 50%, #fefcff 100%);
}

/* Avatar */
.topbar-message-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    margin-top: 2px;
}

/* Content */
.topbar-message-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.topbar-message-item-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.topbar-message-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.topbar-message-unread .topbar-message-item-title {
    font-weight: 700;
    color: #0f172a;
}

.topbar-message-item-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.topbar-message-item-body {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Unread Dot */
.topbar-message-unread-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.45);
    margin-top: 8px;
    animation: msgPulse 2s infinite;
}

@keyframes msgPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.55); }
}

/* --- Empty State --- */
.topbar-message-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.topbar-message-empty-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2ff, #faf5ff);
    color: var(--primary-light);
    font-size: 1.4rem;
}

.topbar-message-empty p {
    font-size: 0.85rem;
    margin: 0;
    font-weight: 500;
}

/* --- Footer --- */
.topbar-message-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.8rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    border-top: 1px solid #f1f5f9;
    background: #fafbff;
    transition: all 0.2s ease;
}

.topbar-message-footer:hover {
    color: var(--primary-dark);
    background: #f0f4ff;
}

.topbar-message-footer i {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.topbar-message-footer:hover i {
    transform: translateX(3px);
}


.table-responsive {
    border-radius: 12px;
}

.table thead th {
    background-color: #f8fafc;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    font-weight: 700;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.02);
}

.form-control,
.form-select {
    padding: 0.625rem 1rem;
    font-size: 0.925rem;
    border-radius: var(--radius);
    border: 1.5px solid var(--border-color);
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--input-focus);
    outline: none;
}

/* Animations */
@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: rise-in 0.5s ease-out forwards;
}

main.content-wrap {
    padding: 1.5rem;
    animation: rise-in 0.4s ease-out;
}

.camera-wrap {
    border: 1px solid #d9e6f3;
    border-radius: 14px;
    padding: 8px;
    background: #f8fbff;
}

.camera-preview {
    width: 100%;
    min-height: 230px;
    object-fit: cover;
    border-radius: 10px;
    background: linear-gradient(135deg, #dceeff, #edf6fb);
}

.badge {
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    border-radius: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.text-bg-primary { background-color: var(--primary) !important; }
.text-bg-secondary { background-color: var(--secondary) !important; }
.text-bg-success { background-color: var(--success) !important; }
.text-bg-danger { background-color: var(--danger) !important; }
.text-bg-warning { background-color: var(--warning) !important; }
.text-bg-info { background-color: var(--info) !important; }

.location-map {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    border: 1px solid #d9e6f3;
    overflow: hidden;
}

.location-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #d9e6f3;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    z-index: 1085;
}

.location-result-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    border-bottom: 1px solid #edf2f7;
}

.location-result-title {
    display: block;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
}

.location-result-subtitle {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.25;
}

.location-result-item:last-child {
    border-bottom: 0;
}

.location-result-item:hover {
    background: #f1f7fd;
}

.location-result-item:focus,
.location-result-item.is-active {
    background: #e7f2ff;
    outline: none;
}

.mail-app {
    background: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    color: #1f2937;
}

.mail-app button,
.mail-app input,
.mail-app select,
.mail-app textarea,
.mail-app .mail-row-sender,
.mail-app .mail-row-subject {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.mail-app-grid {
    min-height: calc(100vh - 210px);
}

.mail-sidebar,
.mail-list-pane,
.mail-reader-pane {
    background: #fff;
}

.mail-sidebar {
    border-right: 1px solid #e8eef5;
    background: #f7fafd;
}

.mail-sidebar-inner {
    height: 100%;
    padding: 1rem;
}

.mail-compose {
    border-radius: 14px;
}

.mail-folder-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 0.55rem;
    font-weight: 700;
}

.mail-folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: #1f2937;
    border-radius: 10px;
    padding: 0.6rem 0.65rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.mail-folder-label,
.mail-folder-count {
    color: inherit;
}

.mail-folder-item.active,
.mail-folder-item:hover {
    background: #eaf3ff;
    color: #0f3f74;
    border-color: #d4e6fc;
}

.mail-list-pane {
    border-right: 1px solid #e8eef5;
}

.mail-list-head {
    padding: 1rem 1rem 0.85rem;
    border-bottom: 1px solid #ecf1f6;
    background: #fff;
}

.mail-list-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f2f6fb;
    border-radius: 10px;
    padding: 0.25rem;
}

.mail-list-toolbar .btn {
    border-radius: 8px;
    border-color: transparent;
    min-width: 88px;
}

.mail-list-toolbar .btn.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.mail-list-body {
    max-height: 72vh;
    overflow-y: auto;
}

.mail-row {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #eef3f8;
    transition: background-color 0.18s ease;
}

.mail-row:hover {
    background: #f8fbff;
}

.mail-row-active {
    background: #edf5ff;
}

.mail-row-unread .mail-row-sender,
.mail-row-unread .mail-row-subject {
    font-weight: 700;
    color: #0f2f56;
}

.mail-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.18rem;
}

.mail-row-sender {
    font-size: 0.92rem;
    color: #1f2937;
}

.mail-row-time {
    font-size: 0.74rem;
    color: #6b7280;
    white-space: nowrap;
}

.mail-row-subject {
    font-size: 0.88rem;
    color: #111827;
}

.mail-row-snippet {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.15rem;
}

.mail-list-meta {
    color: #475569;
}

.mail-search-empty {
    margin: 1rem;
    border: 1px dashed #d6e2ef;
    border-radius: 10px;
    padding: 0.8rem;
    text-align: center;
    font-size: 0.84rem;
    color: #64748b;
    background: #f9fbfe;
}

.mail-reader-pane {
    display: flex;
    flex-direction: column;
    background: #fdfefe;
}

.mail-reader-head {
    padding: 1rem;
    border-bottom: 1px solid #ecf1f6;
}

.mail-reader-body {
    padding: 1rem;
    flex: 1;
}

.mail-meta {
    font-size: 0.88rem;
}

.mail-detail-card .text-muted,
.mail-detail-card .small,
.mail-detail-card .fw-normal {
    color: #475569 !important;
}

.mail-detail-card .fw-semibold {
    color: #111827;
}

.mail-message-content {
    border: 1px solid #dde6f1;
    border-radius: 12px;
    background: #fff;
    padding: 0.9rem;
    min-height: 140px;
    white-space: pre-wrap;
    line-height: 1.55;
    color: #111827;
}

.mail-reply-wrap {
    border-top: 1px dashed #d9e4ef;
    padding-top: 0.9rem;
}

.mail-empty-state {
    min-height: 180px;
    display: grid;
    place-items: center;
    text-align: center;
    color: #6b7280;
    gap: 0.5rem;
    padding: 1rem;
}

.mail-empty-state i {
    font-size: 1.8rem;
    color: #8aa7c7;
}

.gmail-like {
    border-radius: 18px;
    background: #ffffff;
}

.gmail-like .mail-sidebar {
    background: #f8fafd;
}

.gmail-like .mail-sidebar-inner {
    padding: 0.9rem;
}

.gmail-like .mail-compose-btn {
    width: 100%;
    border: none;
    border-radius: 14px;
    background: #cfe7ff;
    color: #123a64;
    font-weight: 700;
    padding: 0.62rem 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.gmail-like .mail-compose-btn:hover {
    background: #bdddfd;
}

.gmail-like .mail-compose-pill {
    width: 100%;
    border: none;
    border-radius: 16px;
    height: 52px;
    background: #c2e7ff;
    color: #0f172a;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.gmail-like .mail-compose-pill:hover {
    background: #b3deff;
}

.gmail-like .mail-folder-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0 16px 16px 0;
    margin-right: 0.35rem;
    border: none;
    background: transparent;
    padding: 0.42rem 0.8rem;
    font-size: 0.93rem;
    color: #31363b;
}

.gmail-like .mail-folder-item.active {
    background: #fde7e9;
    color: #8a1c22;
}

.gmail-like .mail-folder-item:hover {
    background: #eceff3;
}

.gmail-like .mail-folder-item.mail-folder-static.active {
    background: #dfe3e8;
    color: #202124;
}

.gmail-like .mail-folder-label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}

.gmail-like .mail-folder-label i {
    font-size: 0.95rem;
    color: #4c5258;
}

.gmail-like .mail-folder-item.active .mail-folder-label {
    font-weight: 700;
}

.gmail-like .mail-folder-item.active .mail-folder-label i {
    color: #8a1c22;
}

.gmail-like .mail-folder-count {
    font-size: 0.82rem;
    color: #5f6368;
    min-width: 1.8rem;
    text-align: right;
    font-weight: 500;
}

.gmail-like .mail-folder-item.active .mail-folder-count {
    color: #8a1c22;
    font-weight: 700;
}

.gmail-like .mail-list-head {
    padding: 0.8rem;
}

.gmail-like .mail-search-gbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #eaf1fb;
    border-radius: 24px;
    padding: 0.5rem 0.85rem;
}

.gmail-like .mail-search-gbar i {
    color: #5f6368;
}

.gmail-like .mail-search-gbar input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 0.92rem;
}

.gmail-like .mail-list-toolbar {
    width: 100%;
    background: transparent;
    padding: 0;
    margin-top: 0.65rem;
}

.gmail-like .mail-list-toolbar .btn {
    min-width: 94px;
}

.gmail-like .mail-select-all-btn {
    min-width: 118px;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #cbd5f5;
    color: #1f2937;
}

.gmail-like .mail-select-all-btn.active {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.gmail-like .mail-list-meta {
    font-size: 0.78rem;
    color: #6b7280;
    font-weight: 600;
}

.gmail-like .mail-list-body {
    max-height: 70vh;
}

.gmail-like .mail-list-pane.mail-list-pane-wide .mail-list-body {
    max-height: calc(100vh - 260px);
}

.gmail-like .mail-detail-pane {
    padding: 1rem;
    background: #f8fafc;
}

.gmail-like .mail-detail-head {
    margin-bottom: 0.75rem;
}

.gmail-like .mail-detail-card {
    background: #fff;
    border: 1px solid #e5ecf4;
    border-radius: 14px;
    padding: 1rem;
}

.gmail-like .mail-detail-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.7rem;
    gap: 0.6rem;
}

.gmail-like .mail-detail-toolbar-left,
.gmail-like .mail-detail-toolbar-right {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.gmail-like .mail-detail-subject {
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 500;
    margin-bottom: 0.85rem;
    color: #1f2937;
}

.gmail-like .mail-detail-card .text-muted,
.gmail-like .mail-detail-card .small,
.gmail-like .mail-detail-card .fw-normal {
    color: #475569 !important;
}

.gmail-like .mail-detail-card .fw-semibold {
    color: #111827;
}

.gmail-like .mail-detail-meta-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.gmail-like .mail-detail-from {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.topbar-user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.topbar-title-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-title-meta .fw-semibold {
    font-size: 0.95rem;
    color: var(--text-main);
}

.topbar-messages {
    position: relative;
}

.topbar-message-btn {
    background: #f1f5f9;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.topbar-message-btn:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.topbar-message-count {
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 0.25rem 0.4rem;
    font-size: 0.65rem;
}

.topbar-logout {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: none;
    transition: all 0.2s ease;
}

.topbar-logout:hover {
    background: var(--danger);
    color: white;
}
inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.gmail-like .mail-detail-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex: 0 0 auto;
}

.gmail-like .mail-detail-body {
    line-height: 1.55;
    color: #2f3540;
    min-height: 220px;
}

.gmail-like .mail-detail-actions-bottom {
    border-top: 1px solid #e7edf5;
    margin-top: 0.8rem;
    padding-top: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.gmail-like .mail-row {
    display: grid;
    grid-template-columns: 20px 20px 20px minmax(120px, 190px) 1fr auto auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid #e6eaef;
    color: #202124;
    font-size: 0.92rem;
}

.gmail-like .mail-row-check,
.gmail-like .mail-row-star,
.gmail-like .mail-row-flag {
    color: #9aa0a6;
    line-height: 1;
    font-size: 0.92rem;
    cursor: pointer;
}

.gmail-like .mail-row-flag {
    color: #f4b400;
}

.gmail-like .mail-row-sender {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gmail-like .mail-row-subjectline {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gmail-like .mail-row-subject,
.gmail-like .mail-row-snippet {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gmail-like .mail-row-subject {
    font-weight: 500;
}

.gmail-like .mail-row-divider,
.gmail-like .mail-row-snippet {
    color: #5f6368;
}

.gmail-like .mail-row-active {
    background: #f2f6fc;
}

.gmail-like .mail-row-time {
    color: #5f6368;
    font-size: 0.79rem;
    font-weight: 600;
    white-space: nowrap;
}

.gmail-like .mail-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #5f6368;
    font-size: 0.84rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.gmail-like .mail-row:hover .mail-row-actions,
.gmail-like .mail-row.mail-row-active .mail-row-actions {
    opacity: 1;
    pointer-events: auto;
}

.gmail-like .mail-action-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.gmail-like .mail-action-link:hover {
    color: #0d6efd;
}

.gmail-like .mail-row-unread {
    background: #f6faff;
}

.gmail-like .mail-row-unread .mail-row-sender,
.gmail-like .mail-row-unread .mail-row-subject,
.gmail-like .mail-row-unread .mail-row-time {
    font-weight: 700;
    color: #202124;
}

.gmail-like .mail-row-selected {
    background: #eaf3ff;
}

.gmail-like .mail-reader-head {
    padding: 0.9rem 1rem;
}

.gmail-like .mail-reader-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #64748b;
    font-size: 0.95rem;
}

.gmail-like .mail-message-content {
    border: none;
    background: #fff;
    padding: 0.35rem 0;
    min-height: 160px;
}

.gmail-like .mail-reply-wrap {
    border-top: 1px solid #edf1f6;
}

.gmail-like .mail-reader-pane {
    background: #f8fafc;
}

.gmail-like .mail-reader-body {
    padding: 1rem 1.1rem;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.5);
    display: none;
    z-index: 1025;
}

.sidebar-backdrop.show {
    display: block;
}

/* ============================================================
   STRUKTUR ORGANISASI - RESPONSIVE & MODERN DESIGN
   ============================================================ */

.org-structure-wrapper {
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4ff 100%);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.org-structure-header {
    text-align: center;
    margin-bottom: 3rem;
}

.org-structure-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1d476e;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.org-structure-title i {
    font-size: 2.2rem;
    color: #2f8bff;
}

.org-structure-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
}

.org-structure-container {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 15px rgba(47, 139, 255, 0.08);
    border: 2px solid rgba(47, 139, 255, 0.1);
}

.org-level {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.org-level-1 {
    margin-bottom: 3rem;
}

.org-member-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.org-member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
}

.org-member-card-primary {
    background: linear-gradient(135deg, #1d476e 0%, #2f8bff 100%);
    color: white;
    min-width: 320px;
}

.org-member-card-primary:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.org-member-card-secondary {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    color: #1d476e;
    min-width: 280px;
    border: 2px solid rgba(47, 139, 255, 0.2);
}

.org-member-card-secondary:hover {
    border-color: #2f8bff;
    background: linear-gradient(135deg, #f8fafc 0%, #e8ecff 100%);
}

.org-member-avatar,
.org-member-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.org-member-card-primary .org-member-avatar {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.org-member-card-secondary .org-member-icon {
    background: linear-gradient(135deg, #2f8bff, #1d476e);
    color: white;
}

.org-member-content {
    min-width: 0;
}

.org-member-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.org-member-position,
.org-member-role {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.org-connector-vertical {
    width: 3px;
    height: 40px;
    background: linear-gradient(180deg, #2f8bff, rgba(47, 139, 255, 0.3));
    margin: 1rem auto;
    border-radius: 2px;
}

.org-level-2 {
    position: relative;
}

.org-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: start;
}

.org-department {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.org-connector-horizontal {
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, rgba(47, 139, 255, 0.3), #2f8bff, rgba(47, 139, 255, 0.3));
    margin-bottom: 1.5rem;
    border-radius: 2px;
}

.org-team-members {
    width: 100%;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed rgba(47, 139, 255, 0.2);
}

.org-team-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: #475569;
    padding: 0.6rem 0;
    transition: all 0.2s ease;
}

.org-team-item i {
    font-size: 0.5rem;
    color: #2f8bff;
}

.org-team-item:hover {
    color: #2f8bff;
    padding-left: 0.5rem;
}

/* STAFF SECTION */
.org-staff-section {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 15px rgba(47, 139, 255, 0.08);
    border: 2px solid rgba(47, 139, 255, 0.1);
}

.org-staff-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1d476e;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.org-staff-title i {
    font-size: 1.6rem;
    color: #2f8bff;
}

.org-staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.org-staff-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fbfe 100%);
    border: 2px solid rgba(47, 139, 255, 0.15);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.org-staff-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1d476e, #2f8bff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.org-staff-card:hover {
    transform: translateY(-6px);
    border-color: #2f8bff;
    box-shadow: 0 12px 32px rgba(47, 139, 255, 0.15);
}

.org-staff-card:hover::before {
    transform: scaleX(1);
}

.org-staff-photo {
    margin-bottom: 1.25rem;
}

.org-staff-avatar {
    width: 90px;
    height: 90px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #2f8bff, #1d476e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 8px 20px rgba(47, 139, 255, 0.3);
    transition: all 0.3s ease;
}

.org-staff-card:hover .org-staff-avatar {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 32px rgba(47, 139, 255, 0.4);
}

.org-staff-info {
    padding: 0.5rem 0;
}

.org-staff-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1d476e;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.org-staff-position {
    font-size: 0.85rem;
    color: #2f8bff;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.org-staff-speciality {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.org-staff-badge {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge-org {
    display: inline-block;
    background: linear-gradient(135deg, #2f8bff, #1d476e);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    letter-spacing: 0.5px;
}

/* IMAGE SECTION */
.org-image-section {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 15px rgba(47, 139, 255, 0.08);
    border: 2px solid rgba(47, 139, 255, 0.1);
}

.org-image-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1d476e;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.org-image-title i {
    font-size: 1.4rem;
    color: #2f8bff;
}

.org-image-container {
    text-align: center;
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px dashed rgba(47, 139, 255, 0.2);
}

.org-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.org-image:hover {
    box-shadow: 0 12px 32px rgba(47, 139, 255, 0.2);
    transform: scale(1.02);
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .org-structure-wrapper {
        padding: 2rem;
    }

    .org-structure-container {
        padding: 2rem;
    }

    .org-staff-section {
        padding: 2rem;
    }

    .org-staff-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.25rem;
    }

    .org-member-card {
        min-width: 250px;
        flex-direction: column;
        text-align: center;
    }

    .org-member-card-secondary {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .org-structure-wrapper {
        padding: 1.5rem;
    }

    .org-structure-title {
        font-size: 1.5rem;
    }

    .org-structure-title i {
        font-size: 1.6rem;
    }

    .org-structure-container {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .org-level-2 {
        margin-top: 2rem;
    }

    .org-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .org-member-card {
        flex-direction: column;
        text-align: center;
        min-width: 100%;
        padding: 1.25rem;
    }

    .org-member-card-secondary {
        min-width: 100%;
    }

    .org-staff-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .org-staff-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .org-staff-card {
        padding: 1.25rem;
    }

    .org-staff-avatar {
        width: 70px;
        height: 70px;
        margin-bottom: 0.75rem;
        font-size: 1.5rem;
    }

    .org-staff-name {
        font-size: 0.95rem;
    }

    .org-staff-position {
        font-size: 0.8rem;
    }

    .org-staff-speciality {
        font-size: 0.75rem;
    }

    .org-image-section {
        padding: 1.5rem;
    }

    .org-image-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .org-image-container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .org-structure-wrapper {
        padding: 1rem;
        border-radius: 16px;
    }

    .org-structure-header {
        margin-bottom: 2rem;
    }

    .org-structure-title {
        font-size: 1.25rem;
    }

    .org-structure-title i {
        font-size: 1.4rem;
    }

    .org-structure-subtitle {
        font-size: 0.9rem;
    }

    .org-structure-container {
        padding: 1rem;
        border-radius: 14px;
    }

    .org-member-card {
        gap: 0.75rem;
        padding: 1rem;
    }

    .org-member-avatar,
    .org-member-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .org-member-name {
        font-size: 1rem;
    }

    .org-member-position,
    .org-member-role {
        font-size: 0.8rem;
    }

    .org-team-item {
        font-size: 0.8rem;
        padding: 0.5rem 0;
    }

    .org-staff-section {
        padding: 1rem;
    }

    .org-staff-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .org-staff-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .org-staff-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .org-staff-avatar {
        width: 60px;
        height: 60px;
        margin-bottom: 0.5rem;
        font-size: 1.3rem;
    }

    .org-staff-name {
        font-size: 0.9rem;
    }

    .org-staff-position {
        font-size: 0.75rem;
    }

    .org-staff-speciality {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }

    .badge-org {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    .org-image-section {
        padding: 1rem;
    }

    .org-image-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .org-image-container {
        padding: 0.75rem;
    }
}

@media (max-width: 991px) {
    html,
    body {
        height: auto;
        min-height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    body {
        touch-action: pan-y;
    }

        .main-panel {
            margin-left: 0;
            width: 100%;
            min-height: 100vh;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

    body {
        background-color: #eaf2ff;
        background-image: radial-gradient(at 10% 0%, rgba(34, 211, 238, 0.18) 0, transparent 55%),
            radial-gradient(at 80% 10%, rgba(56, 189, 248, 0.16) 0, transparent 50%);
    }

    .card {
        border-radius: 18px;
        padding: 1rem;
        position: relative;
        overflow: hidden;
    }

    .card::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: linear-gradient(90deg, #22d3ee, #38bdf8, #60a5fa);
        opacity: 0.9;
    }

    .btn,
    .form-control,
    .form-select {
        min-height: 42px;
        border-radius: 12px;
    }

    .table thead th {
        font-size: 0.7rem;
        padding: 0.75rem 0.6rem;
    }

    .table tbody td {
        padding: 0.65rem 0.6rem;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    

    .content-wrap {
        padding: 0.85rem;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .app-topbar,
    .topbar {
        min-height: 64px;
        padding: 0.5rem 0.75rem;
        gap: 0.45rem;
        flex-wrap: wrap;
        align-items: center;
        border-bottom: 1px solid #dbe7f4;
        background: linear-gradient(180deg, #ffffff, #f7fbff);
    }

    #sidebarToggle {
        order: 1;
        flex: 0 0 auto;
    }

    .topbar-title {
        order: 2;
        flex: 1 1 auto;
        min-width: 0;
    }

    .topbar-title-meta .fw-semibold {
        font-size: 1rem;
        max-width: 170px;
    }

    .topbar-subtitle {
        display: none;
    }

    .topbar-title-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .topbar-user {
        order: 3;
        gap: 0.45rem;
        align-items: center;
        width: 100%;
        justify-content: flex-end;
        margin-left: 0 !important;
        flex-wrap: wrap;
    }

    .topbar-message-btn {
        padding: 0.35rem 0.5rem;
    }

    .topbar-message-label {
        display: none;
    }

    .topbar-message-menu {
        position: fixed;
        top: 72px;
        left: 0.5rem;
        right: 0.5rem;
        width: auto;
        min-width: 0;
        max-height: calc(100vh - 88px);
        overflow-y: auto;
        border-radius: 10px;
    }

    .avatar {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .topbar-user-actions {
        margin-top: 0;
        gap: 0.35rem;
        width: 100%;
        justify-content: flex-end;
    }

    .topbar-user-actions .dropdown .btn,
    .topbar-user-actions .topbar-message-btn,
    .topbar-user-actions .topbar-logout {
        height: 34px;
        border-radius: 10px;
        padding: 0.3rem 0.55rem;
    }

    .topbar-logout {
        width: auto;
        justify-content: flex-start;
        gap: 6px;
        min-width: 92px;
        padding: 0.22rem 0.5rem;
        font-size: 0.74rem;
    }

    .kpi-value {
        font-size: 1.55rem;
    }

    .table {
        font-size: 0.92rem;
    }

    .table thead th {
        white-space: nowrap;
    }

    .camera-preview {
        min-height: 190px;
    }

    .auth-side {
        display: none;
    }

    .mail-app-grid {
        min-height: auto;
    }

    .gmail-like .mail-compose-pill {
        height: 46px;
    }

    .gmail-like .mail-row {
        grid-template-columns: 20px 20px minmax(100px, 150px) 1fr auto;
        gap: 0.45rem;
    }

    .gmail-like .mail-select-all-btn {
        min-width: 38px;
        padding: 0.25rem 0.45rem;
    }

    .gmail-like .mail-select-all-btn span {
        display: none;
    }

    .gmail-like .mail-detail-subject {
        font-size: 1.45rem;
    }

    .gmail-like .mail-detail-meta-row {
        flex-direction: column;
    }

    .gmail-like .mail-row-flag,
    .gmail-like .mail-row-actions,
    .gmail-like .mail-row-divider,
    .gmail-like .mail-row-snippet {
        display: none;
    }

    .mail-sidebar,
    .mail-list-pane {
        border-right: none;
        border-bottom: 1px solid #e8eef5;
    }

    .mail-list-body,
    .mail-tab-panel {
        max-height: 45vh;
        overflow-y: auto;
    }
}



/* Auth Pages */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 40%);
}

.auth-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 900px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    animation: rise-in 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-side {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    color: white;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-side ul {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.auth-side ul li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.auth-side ul li::before {
    content: "\F272";
    font-family: "bootstrap-icons";
    color: var(--secondary);
}

.auth-form {
    padding: 3rem;
    background: white;
}

@media (max-width: 991px) {
    .auth-side {
        display: none;
    }
    .auth-card {
        max-width: 450px;
    }
    .auth-form {
        padding: 2rem;
    }
}

