: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: #ffffff;
    --bg-sidebar: #0f172a;
    
    --text-main: #1e293b;
    --text-muted: #475569;
    --text-white: #ffffff;
    
    --border-color: #e2e8f0;
    --input-focus: rgba(99, 102, 241, 0.15);

    /* Corp Design System Variables */
    --corp-navy: #0f2a4a;
    --corp-blue: #1d4e7a;
    --corp-muted: #475569;
    --corp-line: #d7e2ee;
    
    --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;
    display: flex;
    flex-direction: column;
    z-index: 1030;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255,255,255,0.08);
}
.sidebar-menu-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 1.5rem;
}
.sidebar-menu-scroll::-webkit-scrollbar {
    width: 5px;
}
.sidebar-menu-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-menu-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.sidebar-menu-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.main-panel {
    margin-left: 260px;
    width: calc(100% - 260px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-wrap {
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    height: 70px;
    position: relative;
}
.brand-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
    white-space: nowrap;
    min-width: 0;
    flex-shrink: 1;
    text-decoration: none;
}
.brand-header-left:hover {
    text-decoration: none;
}
.brand-logo-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.brand-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: white;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.brand-meta {
    display: flex;
    flex-direction: column;
    transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
    overflow: hidden;
}
.brand-meta h6 {
    font-size: 0.95rem !important;
    font-weight: 700;
    margin: 0 !important;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand-meta small {
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin: 0 !important;
}
.sidebar-collapse-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d1117 !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: absolute;
    right: -16px;
    top: 20px;
    z-index: 1050;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.sidebar-collapse-btn:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    transform: scale(1.1);
}

.sidebar-search-wrap {
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-search-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
}
.sidebar-search-box:focus-within {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}
.sidebar-search-box .input-group-text {
    padding-left: 0.75rem;
    padding-right: 0.5rem;
}
.sidebar-search-box input {
    color: #ffffff;
    font-size: 0.85rem;
    padding-left: 0;
}
.sidebar-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.sidebar-search-box input:focus {
    box-shadow: none !important;
    background: transparent !important;
}

.sidebar-section-header {
    font-size: 0.7rem !important;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.75) !important;
    transition: opacity 0.2s ease, margin 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    margin: 0.15rem 0.75rem;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.sidebar-nav .nav-link i {
    font-size: 1.15rem;
    margin-right: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: all 0.2s ease;
}
.sidebar-nav .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}
.sidebar-nav .nav-link:hover i {
    transform: scale(1.1);
}
.sidebar-nav .nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    font-weight: 600;
}
.sidebar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: -0.75rem;
    top: 20%;
    height: 60%;
    width: 4px;
    background-color: var(--accent);
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 0 8px var(--accent);
}
.nav-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25em 0.6em;
}

/* --- Sidebar Submenu CSS --- */
.nav-item-with-submenu {
    position: relative;
    width: 100%;
}
.nav-submenu-toggle .submenu-arrow {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    transition: transform 0.3s ease;
}
.nav-item-with-submenu.open .nav-submenu-toggle .submenu-arrow {
    transform: rotate(180deg);
    color: #ffffff;
}
.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 1.5rem;
    padding-left: 0.5rem;
    border-left: 1px dashed rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.sidebar-submenu .submenu-link {
    margin: 0.1rem 0.75rem 0.1rem 0.25rem !important;
    padding: 0.45rem 0.75rem !important;
    font-size: 0.825rem !important;
    font-weight: 400 !important;
    color: rgba(255, 255, 255, 0.78) !important;
    background: transparent !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-submenu .submenu-link::before {
    display: none !important; /* Remove parent active indicator bar */
}
.sidebar-submenu .submenu-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.sidebar-submenu .submenu-link:hover {
    color: #ffffff !important;
    transform: translateX(4px);
}
.sidebar-submenu .submenu-link:hover .submenu-dot {
    background-color: var(--primary-light);
    box-shadow: 0 0 6px var(--primary-light);
    transform: scale(1.3);
}
.sidebar-submenu .submenu-link.active {
    color: #ffffff !important;
    font-weight: 600 !important;
}
.sidebar-submenu .submenu-link.active .submenu-dot {
    background-color: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    transform: scale(1.4);
}

/* Handle Collapsed Sidebar Submenu */
@media (min-width: 992px) {
    html.sidebar-collapsed .sidebar-submenu,
    html.sidebar-collapsed .submenu-arrow {
        display: none !important;
    }
}

.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}
.sidebar-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}
.sidebar-profile-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.2s ease;
}
.sidebar-profile-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    max-width: 110px;
    color: #ffffff;
}
.sidebar-profile-role {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08) !important;
    align-self: flex-start;
}
.sidebar-profile-logout {
    color: rgba(255, 255, 255, 0.5) !important;
    transition: all 0.2s ease;
}
.sidebar-profile-logout:hover {
    color: var(--danger) !important;
    transform: translateX(2px);
}

/* --- Collapsed Sidebar State --- */
@media (min-width: 992px) {
    html.sidebar-collapsed .sidebar {
        width: 70px;
    }
    html.sidebar-collapsed .main-panel {
        margin-left: 70px;
        width: calc(100% - 70px);
    }
    html.sidebar-collapsed .brand-wrap {
        padding: 1.25rem 0.5rem;
        justify-content: center;
    }
    html.sidebar-collapsed .brand-header-left {
        gap: 0;
    }
    html.sidebar-collapsed .brand-meta {
        opacity: 0;
        width: 0;
        height: 0;
        overflow: hidden;
        pointer-events: none;
    }

    html.sidebar-collapsed .sidebar-search-wrap {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    html.sidebar-collapsed .sidebar-search-box {
        border-color: transparent;
        background: transparent;
    }
    html.sidebar-collapsed .sidebar-search-box input {
        width: 0;
        padding: 0;
        opacity: 0;
        pointer-events: none;
    }
    html.sidebar-collapsed .sidebar-search-box .input-group-text {
        padding: 0.5rem;
        cursor: pointer;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    html.sidebar-collapsed .sidebar-section-header {
        opacity: 0;
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
        height: 0;
        overflow: hidden;
    }
    html.sidebar-collapsed .sidebar-nav .nav-link {
        margin: 0.15rem 0.5rem;
        padding: 0.65rem 0;
        justify-content: center;
    }
    html.sidebar-collapsed .sidebar-nav .nav-link i {
        margin-right: 0;
    }
    html.sidebar-collapsed .sidebar-nav .nav-link .nav-label,
    html.sidebar-collapsed .sidebar-nav .nav-link .nav-badge {
        display: none !important;
    }
    html.sidebar-collapsed .sidebar-nav .nav-link.active::before {
        left: -0.5rem;
    }
    html.sidebar-collapsed .sidebar-footer {
        padding: 1rem 0.5rem;
    }
    html.sidebar-collapsed .sidebar-profile {
        justify-content: center;
    }
    html.sidebar-collapsed .sidebar-profile-meta,
    html.sidebar-collapsed .sidebar-profile-logout {
        display: none !important;
    }
}



.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;
    height: 70px;
}

.topbar-left {
    display: flex;
    align-items: center;
}

.topbar-page-title {
    font-size: 1.15rem;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.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);
}

.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: #4338ca;
    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-dark);
    border-color: var(--primary-dark);
}

.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 Language Dropdown Trigger (styled like web portal outline buttons) */
.topbar-user-actions .dropdown .dropdown-toggle {
    color: #1a476f;
    border: 1px solid #a8bfd6;
    background: #f8fbff;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar-user-actions .dropdown .dropdown-toggle:hover,
.topbar-user-actions .dropdown .dropdown-toggle:focus,
.topbar-user-actions .dropdown .dropdown-toggle[aria-expanded="true"] {
    color: #103754;
    border-color: #87a8c9;
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 71, 111, 0.1);
}

.topbar-message-btn {
    color: #1a476f;
    border: 1px solid #a8bfd6;
    background: #f8fbff;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.topbar-message-btn:hover,
.topbar-message-btn:focus,
.topbar-messages.open .topbar-message-btn {
    color: #103754;
    border-color: #87a8c9;
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 71, 111, 0.1);
}

.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;
}

/* Language Dropdown Menu (portal style) */
.topbar-user-actions .dropdown-menu {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(215, 226, 238, 0.95);
    box-shadow: 0 14px 36px rgba(15, 35, 58, 0.16), 0 2px 8px rgba(15, 35, 58, 0.06);
    padding: 0.45rem 0;
    margin-top: 0.55rem;
    min-width: 180px;
    animation: msgDropIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.topbar-user-actions .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 24px;
    transform: rotate(45deg);
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid rgba(215, 226, 238, 0.95);
    border-left: 1px solid rgba(215, 226, 238, 0.95);
    z-index: 1;
}

.topbar-user-actions .dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1rem;
    color: #3a5570;
    font-size: 0.86rem;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease, padding-left 0.2s ease;
}

.topbar-user-actions .dropdown-menu .dropdown-item:hover {
    background: linear-gradient(90deg, #eef5ff, #f6faff);
    color: #1c4f7a;
    padding-left: 1.15rem;
}

.topbar-user-actions .dropdown-menu .dropdown-item.active {
    background: #1c4f7a;
    color: #ffffff;
}

/* Messages Dropdown Menu (portal style) */
.topbar-message-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 380px;
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(15, 35, 58, 0.16), 0 2px 8px rgba(15, 35, 58, 0.06);
    border: 1px solid rgba(215, 226, 238, 0.95);
    z-index: 1050;
    overflow: visible;
    animation: msgDropIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.topbar-message-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 24px;
    transform: rotate(45deg);
    width: 12px;
    height: 12px;
    background: #f0f4ff; /* Match the header gradient start color */
    border-top: 1px solid rgba(215, 226, 238, 0.95);
    border-left: 1px solid rgba(215, 226, 238, 0.95);
    z-index: 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);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}

.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(130deg, #1c4f7a, #173f63);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(28, 79, 122, 0.25);
}

.topbar-message-compose-btn:hover {
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(28, 79, 122, 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, #eef5ff 0%, #f6faff 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;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}

.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: rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.org-structure-header {
    text-align: center;
    margin-bottom: 3rem;
}

.org-structure-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.org-structure-title i {
    font-size: 2.2rem;
    color: #60a5fa;
}

.org-structure-subtitle {
    font-size: 1rem;
    color: #94a3b8;
    margin: 0;
}

.org-structure-container {
    background: rgba(15, 23, 42, 0.25) !important;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.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 1.8rem;
    border-radius: 20px;
    background: #0d1222 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25) !important;
}

.org-member-card-primary {
    border: 1px solid rgba(59, 130, 246, 0.25) !important;
    min-width: 320px;
}

.org-member-card-primary:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.45) !important;
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.15) !important;
}

.org-member-card-secondary {
    border: 1px solid rgba(139, 92, 246, 0.25) !important;
    min-width: 280px;
}

.org-member-card-secondary:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.45) !important;
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.15) !important;
}

.org-member-avatar,
.org-member-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.org-member-card-primary .org-member-avatar {
    background: rgba(59, 130, 246, 0.08) !important;
    border: 1.5px solid rgba(59, 130, 246, 0.3) !important;
    color: #60a5fa !important;
}

.org-member-card-secondary .org-member-icon {
    background: rgba(139, 92, 246, 0.08) !important;
    border: 1.5px solid rgba(139, 92, 246, 0.3) !important;
    color: #a78bfa !important;
}

.org-member-card:hover .org-member-avatar,
.org-member-card:hover .org-member-icon {
    transform: scale(1.05) rotate(4deg);
}

.org-member-content {
    min-width: 0;
}

.org-member-name {
    font-family: 'Sora', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 0.15rem;
    line-height: 1.2;
}

.org-member-position,
.org-member-role {
    font-size: 0.9rem;
    color: #94a3b8 !important;
    margin: 0;
}

.org-connector-vertical {
    width: 2px;
    height: 40px;
    background: linear-gradient(180deg, #3b82f6, rgba(59, 130, 246, 0.05));
    margin: 0.75rem auto;
}

.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(59, 130, 246, 0.05), #3b82f6, rgba(59, 130, 246, 0.05));
    margin-bottom: 1.5rem;
}

.org-team-members {
    width: 100%;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.org-team-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: #94a3b8;
    padding: 0.6rem 0;
    transition: all 0.2s ease;
}

.org-team-item i {
    font-size: 0.5rem;
    color: #60a5fa;
}

.org-team-item:hover {
    color: #60a5fa;
    padding-left: 0.5rem;
}

/* STAFF SECTION */
.org-staff-section {
    background: rgba(15, 23, 42, 0.25) !important;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    margin-top: 2rem;
}

.org-staff-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.org-staff-title i {
    font-size: 1.6rem;
    color: #60a5fa;
}

.org-staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.org-staff-card {
    background: #0d1222 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 20px;
    padding: 1.8rem 1.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25) !important;
}

.org-staff-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.org-staff-card:hover {
    transform: translateY(-6px);
    border-color: rgba(59, 130, 246, 0.4) !important;
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.15) !important;
}

.org-staff-card:hover::before {
    transform: scaleX(1);
}

.org-staff-photo {
    margin-bottom: 1.25rem;
}

.org-staff-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.25rem;
    background: rgba(59, 130, 246, 0.08) !important;
    border: 1.5px solid rgba(59, 130, 246, 0.3) !important;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    color: #60a5fa;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15) !important;
    transition: all 0.3s ease;
}

.org-staff-card:hover .org-staff-avatar {
    transform: scale(1.08) rotate(5deg);
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 12px 25px rgba(59, 130, 246, 0.25) !important;
}

.org-staff-info {
    padding: 0.5rem 0;
}

.org-staff-name {
    font-family: 'Sora', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.org-staff-position {
    font-size: 0.85rem;
    color: #60a5fa !important;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.org-staff-speciality {
    font-size: 0.8rem;
    color: #94a3b8 !important;
    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: rgba(59, 130, 246, 0.1) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa;
    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: rgba(15, 23, 42, 0.25) !important;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.org-image-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.org-image-title i {
    font-size: 1.4rem;
    color: #60a5fa;
}

.org-image-container {
    text-align: center;
    background: rgba(15, 23, 42, 0.15) !important;
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.org-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.org-image:hover {
    box-shadow: 0 12px 32px rgba(59, 130, 246, 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: #090d16;
        background-image: 
            radial-gradient(circle at 12% 12%, rgba(99, 102, 241, 0.08) 0%, transparent 28%),
            radial-gradient(circle at 88% 10%, rgba(139, 92, 246, 0.06) 0%, transparent 26%);
    }

    .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 {
        height: auto;
        min-height: 64px;
        padding: 0.5rem 0.75rem;
        gap: 0.45rem;
        flex-wrap: nowrap;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(9, 13, 22, 0.78);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    #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: auto;
        justify-content: flex-end;
        margin-left: auto !important;
        display: flex;
    }

    .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: auto;
        justify-content: flex-end;
        display: flex;
        align-items: center;
    }

    .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;
    }
}

/* MODERN ORG STRUCTURE GRID */
.org-modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.org-modern-card {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 24px;
    padding: 2.2rem 1.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

.org-modern-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: #60a5fa !important;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.25) !important;
}

.org-modern-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.org-modern-avatar-wrapper {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1.25rem;
    border: 3px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

.org-modern-card:hover .org-modern-avatar-wrapper {
    border-color: #60a5fa;
    transform: scale(1.05);
}

.org-modern-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.org-modern-name {
    font-family: 'Sora', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 0.25rem;
}

.org-modern-role {
    font-size: 0.9rem;
    color: #60a5fa !important;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.org-modern-divider {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 auto 1rem auto;
}

.org-modern-desc {
    font-size: 0.85rem;
    color: #94a3b8 !important;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    height: 4.5em; /* Allow 3 lines of text */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.org-modern-badge-wrap {
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   DASHBOARD DARK GLASSMORPHIC THEME (RIGHT PANEL)
   ========================================================================== */

.main-panel {
    background-color: #090d16 !important;
    background: 
        radial-gradient(circle at 12% 12%, rgba(99, 102, 241, 0.08) 0%, transparent 28%),
        radial-gradient(circle at 88% 10%, rgba(139, 92, 246, 0.06) 0%, transparent 26%),
        #090d16 !important;
    color: #e2e8f0 !important;
}

/* Topbar glassmorphism override */
.main-panel .topbar {
    background-color: rgba(9, 13, 22, 0.78) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.main-panel .topbar-page-title {
    color: #ffffff !important;
}

.main-panel #sidebarToggle {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.main-panel #sidebarToggle:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Trigger Buttons */
.main-panel .topbar-user-actions .dropdown .dropdown-toggle {
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

.main-panel .topbar-user-actions .dropdown .dropdown-toggle:hover,
.main-panel .topbar-user-actions .dropdown .dropdown-toggle:focus,
.main-panel .topbar-user-actions .dropdown .dropdown-toggle[aria-expanded="true"] {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.main-panel .topbar-message-btn {
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

.main-panel .topbar-message-btn:hover,
.main-panel .topbar-message-btn:focus,
.main-panel .topbar-messages.open .topbar-message-btn {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.main-panel .topbar-message-count {
    border-color: #090d16 !important;
}

/* Dropdown Menus */
.main-panel .topbar-user-actions .dropdown-menu {
    background: rgba(13, 17, 32, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5) !important;
}

.main-panel .topbar-user-actions .dropdown-menu::before {
    background: rgba(13, 17, 32, 0.96) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.main-panel .topbar-user-actions .dropdown-menu .dropdown-item {
    color: #cbd5e1 !important;
}

.main-panel .topbar-user-actions .dropdown-menu .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #ffffff !important;
}

.main-panel .topbar-user-actions .dropdown-menu .dropdown-item.active {
    background: var(--primary) !important;
    color: #ffffff !important;
}

.main-panel .topbar-message-menu {
    background-color: rgba(13, 17, 32, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5) !important;
}

.main-panel .topbar-message-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.main-panel .topbar-message-header-title {
    color: #ffffff !important;
}

.main-panel .topbar-message-compose-btn {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    color: #818cf8 !important;
}

.main-panel .topbar-message-compose-btn:hover {
    background: #6366f1 !important;
    color: white !important;
}

.main-panel .topbar-message-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.main-panel .topbar-message-item:hover {
    background: rgba(255, 255, 255, 0.02) !important;
}

.main-panel .topbar-message-item.topbar-message-unread {
    background: rgba(99, 102, 241, 0.04) !important;
}

.main-panel .topbar-message-item-title {
    color: #ffffff !important;
}

.main-panel .topbar-message-item-body {
    color: #94a3b8 !important;
}

.main-panel .topbar-message-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
}

.main-panel .topbar-message-footer:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

/* Cards & Panel Layouts */
.main-panel .card {
    background: radial-gradient(circle at 40px 40px, rgba(99, 102, 241, 0.08) 0%, transparent 60%), rgba(13, 17, 32, 0.72) !important;
    border: 1px solid rgba(99, 102, 241, 0.15) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    color: #cbd5e1 !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.main-panel .card:hover {
    transform: translateY(-5px) !important;
    background: radial-gradient(circle at 40px 40px, rgba(99, 102, 241, 0.16) 0%, transparent 65%), rgba(13, 17, 32, 0.72) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15), 0 0 25px rgba(99, 102, 241, 0.08) !important;
}


.main-panel .card h1, 
.main-panel .card h2, 
.main-panel .card h3, 
.main-panel .card h4, 
.main-panel .card h5, 
.main-panel .card h6,
.main-panel .card-title,
.main-panel .card-header,
.main-panel .card-footer {
    color: #ffffff !important;
}

.main-panel .card-header {
    background-color: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.main-panel .card-footer {
    background-color: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Form Controls */
.main-panel .form-control,
.main-panel .form-select {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

.main-panel .form-control:focus,
.main-panel .form-select:focus {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25) !important;
    color: #ffffff !important;
}

.main-panel .form-control::placeholder {
    color: rgba(255, 255, 255, 0.35) !important;
}

/* Tables */
.main-panel .table {
    color: #cbd5e1 !important;
    --bs-table-bg: transparent !important;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.02) !important;
}

.main-panel .table th {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.12) !important;
    border-top: none !important;
}

.main-panel .table td {
    background-color: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #cbd5e1 !important;
}

.main-panel .table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

/* Typography, Helpers, Alerts */
.main-panel h1, 
.main-panel h2, 
.main-panel h3, 
.main-panel h4, 
.main-panel h5, 
.main-panel h6,
.main-panel .text-dark,
.main-panel .fw-bold {
    color: #ffffff !important;
}

.main-panel .text-muted {
    color: #94a3b8 !important;
}

.main-panel .alert-secondary {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
}

.main-panel .alert-warning {
    background-color: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
    color: #fef08a !important;
}

.main-panel .alert-success {
    background-color: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
    color: #a7f3d0 !important;
}

.main-panel .alert-danger {
    background-color: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
    color: #fecaca !important;
}

/* List Groups & Pagination */
.main-panel .list-group-item {
    background-color: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    color: #cbd5e1 !important;
}

.main-panel .list-group-item.active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
}

.main-panel .pagination .page-link {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
}

.main-panel .pagination .page-item.active .page-link {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
}

.main-panel .pagination .page-link:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

/* Breadcrumbs & Tabs */
.main-panel .breadcrumb-item, 
.main-panel .breadcrumb-item a {
    color: #94a3b8 !important;
}

.main-panel .breadcrumb-item.active {
    color: #ffffff !important;
}

.main-panel .nav-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.main-panel .nav-tabs .nav-link {
    color: #cbd5e1 !important;
    border: none !important;
    background: transparent !important;
}

.main-panel .nav-tabs .nav-link.active {
    color: #ffffff !important;
    border-bottom: 2px solid var(--primary) !important;
    background: transparent !important;
}

.main-panel .nav-tabs .nav-link:hover {
    color: #ffffff !important;
}

.student-jadwal-card {
    background-color: rgba(255, 255, 255, 0.04) !important;
}

/* Gmail/Mail App Dark Mode Overrides */
.main-panel .mail-app {
    background: transparent !important;
    border: none !important;
    color: #cbd5e1 !important;
}

.main-panel .mail-sidebar {
    background: rgba(13, 17, 32, 0.45) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.main-panel .mail-list-pane {
    background: rgba(9, 13, 22, 0.3) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.main-panel .mail-list-head {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.main-panel .mail-search-gbar {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

.main-panel .mail-search-gbar input {
    background: transparent !important;
    color: #ffffff !important;
}

.main-panel .mail-search-gbar input::placeholder {
    color: #94a3b8 !important;
}

.main-panel .mail-compose-btn {
    background: rgba(99, 102, 241, 0.15) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    color: #e2e8f0 !important;
    transition: all 0.3s ease !important;
}

.main-panel .mail-compose-btn:hover {
    background: rgba(99, 102, 241, 0.25) !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2) !important;
}

.main-panel .mail-folder-item {
    color: #94a3b8 !important;
    background: transparent !important;
    transition: all 0.2s ease !important;
}

.main-panel .mail-folder-item.active {
    background: rgba(99, 102, 241, 0.15) !important;
    color: #ffffff !important;
}

.main-panel .mail-folder-item:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #ffffff !important;
}

.main-panel .mail-list-toolbar {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.main-panel .mail-list-toolbar .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
    background: transparent !important;
}

.main-panel .mail-list-toolbar .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

.main-panel .mail-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #cbd5e1 !important;
    transition: background-color 0.2s ease !important;
}

.main-panel .mail-row:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

.main-panel .mail-row-unread {
    background: rgba(99, 102, 241, 0.04) !important;
}

.main-panel .mail-row-unread .mail-row-sender,
.main-panel .mail-row-unread .mail-row-subject {
    color: #ffffff !important;
}

.main-panel .mail-row-sender {
    color: #e2e8f0 !important;
}

.main-panel .mail-row-subject {
    color: #cbd5e1 !important;
}

.main-panel .mail-row-snippet {
    color: #94a3b8 !important;
}

.main-panel .mail-row-time {
    color: #64748b !important;
}

.main-panel .mail-empty-state {
    color: #64748b !important;
}

.main-panel .mail-empty-state i {
    color: rgba(99, 102, 241, 0.3) !important;
}

.main-panel .mail-reader-pane {
    background: rgba(9, 13, 22, 0.3) !important;
}

.main-panel .mail-reader-head {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.main-panel .mail-message-content {
    background: rgba(13, 17, 32, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #e2e8f0 !important;
}

.main-panel .mail-detail-pane {
    background: rgba(9, 13, 22, 0.3) !important;
}

.main-panel .mail-detail-card {
    background: rgba(13, 17, 32, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
}

.main-panel .mail-detail-toolbar .btn-light {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

.main-panel .mail-detail-toolbar .btn-light:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.main-panel .mail-detail-subject {
    color: #ffffff !important;
}

.main-panel .mail-detail-card .text-muted,
.main-panel .mail-detail-card .small,
.main-panel .mail-detail-card .fw-normal {
    color: #94a3b8 !important;
}

.main-panel .mail-detail-card .fw-semibold {
    color: #ffffff !important;
}

.main-panel .mail-detail-avatar {
    background: rgba(99, 102, 241, 0.15) !important;
    color: #ffffff !important;
}

.main-panel .mail-detail-actions-bottom .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
}

.main-panel .mail-detail-actions-bottom .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

.main-panel .mail-reply-wrap {
    border-top: 1px dashed rgba(255, 255, 255, 0.08) !important;
}

.main-panel .mail-reply-wrap textarea,
.main-panel .mail-reply-wrap select {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

.main-panel .mail-reply-wrap textarea:focus,
.main-panel .mail-reply-wrap select:focus {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1) !important;
}

/* Modal Styling for Dark Mode */
.modal-content {
    background: radial-gradient(circle at 40px 40px, rgba(99, 102, 241, 0.08) 0%, transparent 60%), rgba(13, 17, 32, 0.95) !important;
    border: 1px solid rgba(99, 102, 241, 0.25) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    color: #cbd5e1 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.modal-title {
    color: #ffffff !important;
    font-weight: 600 !important;
}

.modal .btn-close {
    filter: invert(1) grayscale(1) brightness(2) !important;
}

/* Background Overrides for Dark/Glassmorphic Consistency */
.main-panel .bg-light,
.main-panel .bg-white {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Light Preview Containers for Transparent Logos, Signatures, and Documents */
.main-panel .bg-preview-light {
    background-color: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.main-panel .bg-preview-light * {
    color: #1e293b !important;
}

/* Select & Dropdown Styling (Glassmorphic dark theme) */
.main-panel select option,
.main-panel .form-select option {
    background-color: #0c1020 !important;
    color: #ffffff !important;
}

.main-panel .dropdown-menu {
    background-color: rgba(13, 17, 32, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
}

.main-panel .dropdown-item {
    color: #cbd5e1 !important;
    transition: all 0.2s ease-in-out !important;
}

.main-panel .dropdown-item:hover,
.main-panel .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

/* Button Modernization for Glassmorphism (Hero Section style) */
.main-panel .btn {
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 0.6rem 1.25rem !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Primary Button: Vibrant glass-glow gradient */
.main-panel .btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25) !important;
    color: #ffffff !important;
}
.main-panel .btn-primary:hover {
    background: linear-gradient(135deg, #818cf8, #6366f1) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}
.main-panel .btn-primary:active {
    transform: translateY(0) !important;
}

/* Secondary & Outline Buttons: Transparent glassmorphic style */
.main-panel .btn-secondary,
.main-panel .btn-outline-secondary {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
}
.main-panel .btn-secondary:hover,
.main-panel .btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

/* Danger Button */
.main-panel .btn-danger,
.main-panel .btn-outline-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2) !important;
    color: #ffffff !important;
}
.main-panel .btn-danger:hover,
.main-panel .btn-outline-danger:hover {
    background: linear-gradient(135deg, #f87171, #ef4444) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

/* Success Button */
.main-panel .btn-success,
.main-panel .btn-outline-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2) !important;
    color: #ffffff !important;
}
.main-panel .btn-success:hover,
.main-panel .btn-outline-success:hover {
    background: linear-gradient(135deg, #34d399, #10b981) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

/* Warning Button */
.main-panel .btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2) !important;
    color: #ffffff !important;
}
.main-panel .btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

/* Light buttons inside dashboard */
.main-panel .btn-light {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}
.main-panel .btn-light:hover {
    background-color: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}






