/* ============================================
   TS LAW  Design System
   Navy (#0F172A) + Gold (#C4943D) Theme
   ============================================ */

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

:root {
    /* Colors */
    --navy-primary: #0F172A;
    --navy-dark: #020617;
    --navy-light: #1E293B;
    --navy-lighter: #334155;
    --gold-primary: #C4943D;
    --gold-light: #D4A853;
    --gold-soft: #F5E6C8;
    --gold-dark: #A67C2E;
    --white: #FFFFFF;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    --success: #22C55E;
    --success-light: #DCFCE7;
    --warning: #F97316;
    --warning-light: #FFF7ED;
    --danger: #EF4444;
    --danger-light: #FEF2F2;
    --info: #3B82F6;
    --info-light: #EFF6FF;

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;

    /* Spacing */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
    --topbar-height: 64px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--gray-900);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--gold-dark);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy-dark);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(196, 148, 61, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 50%, rgba(196, 148, 61, 0.05) 0%, transparent 60%);
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(1deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-1deg);
    }
}

.login-page::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C4943D' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.login-card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(196, 148, 61, 0.2);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.login-logo {
    text-align: center;
    margin-bottom: 8px;
}

.login-logo img {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(196, 148, 61, 0.3));
}

.login-title {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.login-subtitle {
    text-align: center;
    font-size: 12px;
    color: var(--gray-400);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-300);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 14px;
    font-family: var(--font-primary);
    transition: all var(--transition-fast);
    outline: none;
}

.login-form input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(196, 148, 61, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.login-form input::placeholder {
    color: var(--gray-500);
}

.login-remember {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.login-remember label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-400);
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
    cursor: pointer;
}

.login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--gold-primary);
}

.login-remember a {
    font-size: 13px;
    color: var(--gold-primary);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
    box-shadow: 0 8px 25px rgba(196, 148, 61, 0.35);
    transform: translateY(-1px);
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 20px;
    color: #FCA5A5;
    font-size: 13px;
    animation: popShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes popShake {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
    40% {
        opacity: 1;
        transform: scale(1.03) translateY(0);
    }
    55% {
        transform: scale(1) translateX(-6px);
    }
    70% {
        transform: translateX(5px);
    }
    82% {
        transform: translateX(-3px);
    }
    92% {
        transform: translateX(2px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Toast Pop-up Notification */
.toast-popup {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #1E293B, #0F172A);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-left: 4px solid #EF4444;
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 320px;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 20px rgba(239, 68, 68, 0.15);
    z-index: 9999;
    animation: toastSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
    overflow: hidden;
}

.toast-popup.toast-hide {
    animation: toastSlideOut 0.4s cubic-bezier(0.5, 0, 0.75, 0) forwards;
}

.toast-icon {
    font-size: 20px;
    color: #EF4444;
    flex-shrink: 0;
    margin-top: 1px;
    animation: toastIconPulse 0.6s ease 0.3s both;
}

.toast-content {
    flex: 1;
    color: #FCA5A5;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s;
    border-radius: 6px;
}

.toast-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #EF4444, #F97316);
    border-radius: 0 0 12px 12px;
    animation: toastProgress 5s linear forwards;
}

@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
}

@keyframes toastIconPulse {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes toastProgress {
    0% { width: 100%; }
    100% { width: 0%; }
}

@media (max-width: 480px) {
    .toast-popup {
        top: 12px;
        right: 12px;
        left: 12px;
        min-width: auto;
        max-width: none;
    }
}

/* SweetAlert-style Modal Popup */
.swal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: swalOverlayIn 0.25s ease both;
    backdrop-filter: blur(4px);
}

.swal-overlay.swal-closing {
    animation: swalOverlayOut 0.3s ease forwards;
}

.swal-overlay.swal-closing .swal-modal {
    animation: swalModalOut 0.3s ease forwards;
}

.swal-modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px 24px;
    width: 360px;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: swalModalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.swal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swal-icon-error {
    border: 3px solid #EF4444;
    animation: swalIconPop 0.5s ease 0.2s both;
}

.swal-x-mark {
    position: relative;
    display: block;
    width: 30px;
    height: 30px;
}

.swal-x-mark-line-left,
.swal-x-mark-line-right {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 3px;
    border-radius: 2px;
    background: #EF4444;
}

.swal-x-mark-line-left {
    transform: translate(-50%, -50%) rotate(45deg);
    animation: swalXLeft 0.4s ease 0.4s both;
}

.swal-x-mark-line-right {
    transform: translate(-50%, -50%) rotate(-45deg);
    animation: swalXRight 0.4s ease 0.5s both;
}

.swal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 8px;
}

.swal-text {
    font-size: 14px;
    color: #64748B;
    margin: 0 0 24px;
    line-height: 1.6;
}

.swal-btn {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.swal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.4);
}

.swal-btn:active {
    transform: translateY(0);
}

@keyframes swalOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes swalOverlayOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes swalModalIn {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes swalModalOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.6);
    }
}

@keyframes swalIconPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes swalXLeft {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(45deg) scaleX(0);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(45deg) scaleX(1);
    }
}

@keyframes swalXRight {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(-45deg) scaleX(0);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(-45deg) scaleX(1);
    }
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--navy-primary);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal), transform var(--transition-normal);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Collapsed Sidebar (Desktop) */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-header {
    padding: 16px 12px;
}

.sidebar.collapsed .sidebar-header img {
    width: 36px;
    margin-bottom: 0;
}

.sidebar.collapsed .sidebar-brand {
    display: none;
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
    position: relative;
}

.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-item-label {
    display: none;
}

.sidebar.collapsed .nav-item i {
    width: auto;
    font-size: 18px;
}

.sidebar.collapsed .nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--navy-dark);
    color: var(--white);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 200;
    box-shadow: var(--shadow-lg);
}

.sidebar.collapsed .nav-item:hover::after {
    opacity: 1;
}

.sidebar.collapsed .sidebar-footer {
    padding: 12px 8px;
}

.sidebar.collapsed .sidebar-user {
    justify-content: center;
    padding: 8px;
}

.sidebar.collapsed .sidebar-user-info {
    display: none;
}

.sidebar.collapsed .sidebar-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.sidebar.collapsed .btn-logout {
    padding: 10px;
    justify-content: center;
}

.sidebar.collapsed .btn-logout .logout-label {
    display: none;
}

.sidebar-header {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-header img {
    width: 50px;
    height: auto;
    margin-bottom: 8px;
}

.sidebar-brand {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-primary);
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.sidebar-brand small {
    display: block;
    font-family: var(--font-primary);
    font-size: 10px;
    font-weight: 400;
    color: var(--gray-500);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--gray-400);
    font-size: 14px;
    font-weight: 400;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(196, 148, 61, 0.15), rgba(196, 148, 61, 0.08));
    color: var(--gold-primary);
    font-weight: 500;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--gold-primary);
    border-radius: 0 4px 4px 0;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* Submenu Styles */
.nav-item-group {
    display: flex;
    flex-direction: column;
}

.submenu-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-left: 24px;
}

.nav-item-group.open .submenu-list {
    max-height: 400px;
    transition: max-height 0.35s ease-in;
    margin-bottom: 8px;
    margin-top: 2px;
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    color: var(--gray-400);
    font-size: 13px;
    font-weight: 400;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
    text-decoration: none;
}

.submenu-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--white);
}

.submenu-item.active {
    color: var(--gold-primary);
    font-weight: 500;
    background: rgba(196, 148, 61, 0.06);
}

.submenu-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.submenu-arrow {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.nav-item-group.open .submenu-arrow {
    transform: rotate(180deg);
}

/* When sidebar is collapsed */
.sidebar.collapsed .submenu-list {
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0;
    pointer-events: none;
}

.sidebar.collapsed .submenu-arrow {
    display: none !important;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    transition: padding var(--transition-normal);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sidebar-user:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
    transition: opacity var(--transition-normal);
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--gray-500);
}

/* Logout Button */
.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    margin-top: 12px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    letter-spacing: 0.3px;
}

.btn-logout:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
    box-shadow: 0 4px 15px rgba(196, 148, 61, 0.4);
    transform: translateY(-1px);
}

.btn-logout:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(196, 148, 61, 0.3);
}

.btn-logout i {
    font-size: 15px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}

.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed-width);
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Sidebar Toggle (always visible) */
.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-600);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.sidebar-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-600);
    cursor: pointer;
    padding: 8px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-500);
}

.breadcrumb a {
    color: var(--gray-500);
}

.breadcrumb a:hover {
    color: var(--gold-primary);
}

.breadcrumb .separator {
    color: var(--gray-300);
}

.breadcrumb .current {
    color: var(--gray-900);
    font-weight: 500;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-search {
    position: relative;
}

.topbar-search input {
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 13px;
    width: 240px;
    background: var(--gray-50);
    outline: none;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
}

.topbar-search input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(196, 148, 61, 0.1);
    background: var(--white);
}

.topbar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 14px;
}

.topbar-notification {
    position: relative;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--gray-500);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.topbar-notification:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: var(--radius-full);
    border: 2px solid var(--white);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 12px;
}

/* Page Content */
.page-content {
    padding: 28px 32px;
}

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

.page-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
}

.page-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ============================================
   STAT CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

a.stat-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card-icon.blue {
    background: var(--info-light);
    color: var(--info);
}

.stat-card-icon.gold {
    background: var(--gold-soft);
    color: var(--gold-primary);
}

.stat-card-icon.green {
    background: var(--success-light);
    color: var(--success);
}

.stat-card-icon.red {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-card-label {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

/* ============================================
   CARDS & PANELS
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

/* ============================================
   DATA TABLE
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
}

.data-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
    color: var(--gray-700);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-gold {
    background: var(--gold-soft);
    color: var(--gold-dark);
}

.badge-gray {
    background: var(--gray-100);
    color: var(--gray-600);
}

.badge-purple {
    background: #F3E8FF;
    color: #7C3AED;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
    box-shadow: 0 4px 15px rgba(196, 148, 61, 0.3);
    transform: translateY(-1px);
    color: var(--white);
}

.btn-secondary {
    background: var(--white);
    color: var(--gold-primary);
    border: 1px solid var(--gold-primary);
}

.btn-secondary:hover {
    background: var(--gold-soft);
    color: var(--gold-dark);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #DC2626;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    padding: 8px 12px;
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: transparent;
    color: var(--gray-500);
    font-size: 14px;
}

.btn-icon:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-icon.danger:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.btn-icon.info:hover {
    background: var(--info-light);
    color: var(--info);
}

.btn-icon.gold:hover {
    background: var(--gold-soft);
    color: var(--gold-primary);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font-primary);
    color: var(--gray-900);
    background: var(--white);
    outline: none;
    transition: all var(--transition-fast);
}

.form-control:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(196, 148, 61, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2364748B'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ============================================
   ACTION BAR
   ============================================ */
.action-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.action-bar .search-input {
    flex: 1;
    min-width: 200px;
    max-width: 320px;
    position: relative;
}

.action-bar .search-input input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font-primary);
    outline: none;
    transition: all var(--transition-fast);
}

.action-bar .search-input input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(196, 148, 61, 0.1);
}

.action-bar .search-input i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.action-bar .filter-group {
    display: flex;
    gap: 8px;
}

.action-bar .action-right {
    margin-left: auto;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.pagination-info {
    font-size: 13px;
    color: var(--gray-500);
}

.pagination {
    display: flex;
    gap: 4px;
    list-style: none;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--gray-600);
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid var(--gray-200);
}

.pagination li a:hover {
    background: var(--gold-soft);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.pagination li.active span {
    background: var(--gold-primary);
    border-color: var(--gold-primary);
    color: var(--white);
}

.pagination li.disabled span {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold-primary), var(--gold-soft));
}

.timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: var(--radius-full);
    background: var(--gold-primary);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--gold-primary);
}

.timeline-date {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.timeline-desc {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
}

.timeline-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--gray-500);
}

.timeline-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
}

/* ============================================
   CALENDAR
   ============================================ */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.calendar-header-cell {
    padding: 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.calendar-cell {
    min-height: 100px;
    padding: 8px;
    border-right: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    position: relative;
    background: var(--white);
    transition: background var(--transition-fast);
}

.calendar-cell:nth-child(7n) {
    border-right: none;
}

.calendar-cell:hover {
    background: var(--gray-50);
}

.calendar-cell.other-month {
    background: var(--gray-50);
    opacity: 0.5;
}

.calendar-cell.today {
    background: rgba(196, 148, 61, 0.05);
}

.calendar-day {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.calendar-cell.today .calendar-day {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-primary);
    color: var(--white);
    border-radius: var(--radius-full);
}

.calendar-event {
    display: block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.calendar-event:hover {
    opacity: 0.8;
}

.calendar-event.sidang {
    background: var(--info-light);
    color: var(--info);
}

.calendar-event.meeting {
    background: var(--gold-soft);
    color: var(--gold-dark);
}

.calendar-event.deadline {
    background: var(--danger-light);
    color: var(--danger);
}

.calendar-event.lainnya {
    background: var(--gray-100);
    color: var(--gray-600);
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.calendar-nav-btn {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    cursor: pointer;
    color: var(--gray-600);
    transition: all var(--transition-fast);
}

.calendar-nav-btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.calendar-month-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    min-width: 180px;
    text-align: center;
}

/* ============================================
   REMINDER PANEL
   ============================================ */
.reminder-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-100);
    margin-bottom: 8px;
    transition: all var(--transition-fast);
}

.reminder-item:hover {
    border-color: var(--gold-soft);
    background: var(--gray-50);
}

.reminder-badge {
    padding: 4px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
}

.reminder-info {
    flex: 1;
    min-width: 0;
}

.reminder-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.reminder-meta {
    font-size: 11px;
    color: var(--gray-500);
}

/* ============================================
   DOCUMENT GRID
   ============================================ */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.doc-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-normal);
}

.doc-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gold-soft);
    transform: translateY(-2px);
}

.doc-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.doc-icon.pdf {
    background: #FEF2F2;
    color: #DC2626;
}

.doc-icon.docx {
    background: #EFF6FF;
    color: #2563EB;
}

.doc-icon.image {
    background: #F0FDF4;
    color: #16A34A;
}

.doc-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 8px;
    word-break: break-all;
}

.doc-meta {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.doc-actions {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

/* ============================================
   CHARTS
   ============================================ */
.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-container {
    position: relative;
    height: 280px;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ============================================
   ALERTS & TOASTS
   ============================================ */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: alertIn 0.3s ease;
}

@keyframes alertIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: var(--success-light);
    color: #166534;
    border: 1px solid #BBF7D0;
}

.alert-error {
    background: var(--danger-light);
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-warning {
    background: var(--warning-light);
    color: #9A3412;
    border: 1px solid #FED7AA;
}

/* ============================================
   TABS
   ============================================ */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 24px;
}

.tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab:hover {
    color: var(--gray-700);
}

.tab.active {
    color: var(--gold-primary);
    border-bottom-color: var(--gold-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================
   AGENDA LIST
   ============================================ */
.agenda-item {
    display: flex;
    gap: 12px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
}

a.agenda-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    cursor: pointer;
}

a.reminder-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    cursor: pointer;
}

.agenda-item:hover,
.reminder-item:hover {
    background: var(--gray-50);
}

.agenda-item:last-child {
    border-bottom: none;
}

.agenda-time {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-900);
    min-width: 50px;
}

.agenda-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    margin-top: 5px;
    flex-shrink: 0;
}

.agenda-info {
    flex: 1;
}

.agenda-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-900);
}

.agenda-case {
    font-size: 12px;
    color: var(--gray-500);
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
}

/* ============================================
   DETAIL HEADER
   ============================================ */
.detail-header {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    padding: 24px;
    margin-bottom: 24px;
}

.detail-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.detail-case-number {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

.detail-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 8px 0 12px;
}

.detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.detail-info-item label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-info-item span {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* ============================================
   SIDEBAR OVERLAY (MOBILE)
   ============================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Cards Container Default */
.mobile-cards-container {
    display: none;
}

/* Mobile Bottom Nav Hidden by default */
.mobile-bottom-nav {
    display: none;
}

/* Document Wrapper Default (display contents to preserve desktop flex/grid) */
.doc-details-wrapper {
    display: contents;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content,
    .main-content.sidebar-collapsed {
        margin-left: 0 !important;
    }

    .sidebar-toggle {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    /* Undo collapsed styles on mobile */
    .sidebar.collapsed .sidebar-brand {
        display: block;
    }

    .sidebar.collapsed .nav-section-title {
        opacity: 1;
        height: auto;
        margin-bottom: 8px;
        padding: 0 12px;
    }

    .sidebar.collapsed .nav-item {
        justify-content: flex-start;
        padding: 10px 12px;
    }

    .sidebar.collapsed .nav-item span,
    .sidebar.collapsed .nav-item-label {
        display: inline;
    }

    .sidebar.collapsed .sidebar-user-info {
        display: block;
    }

    .sidebar.collapsed .btn-logout .logout-label {
        display: inline;
    }

    .topbar {
        padding: 0 16px;
    }

    .topbar-search {
        display: none;
    }

    .page-content {
        padding: 20px 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .page-title {
        font-size: 22px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card-value {
        font-size: 24px;
    }

    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .action-bar .search-input {
        max-width: 100%;
    }

    .action-bar .action-right {
        margin-left: 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }

    /* Responsive Card Table for Mobile */

    /* Remove outer .card wrapper styling when it contains responsive-card-table */
    .card:has(.responsive-card-table) {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        overflow: visible;
    }

    .card:has(.responsive-card-table) > .card-body {
        padding: 0 !important;
    }

    .card:has(.responsive-card-table) > .card-header {
        background: transparent;
        border-bottom: none;
        padding: 0 0 12px 0;
    }

    .card:has(.responsive-card-table) > .card-header .card-title {
        font-size: 18px;
        font-weight: 700;
        color: var(--gray-900);
    }

    .responsive-card-table {
        display: block;
        width: 100%;
        border: none !important;
        background: transparent !important;
    }

    .responsive-card-table thead {
        display: none !important;
    }

    .responsive-card-table tbody,
    .responsive-card-table tr,
    .responsive-card-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .responsive-card-table tbody {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .responsive-card-table tr {
        border: 1px solid var(--gray-200);
        padding: 18px 16px;
        position: relative;
        background: var(--white);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .responsive-card-table tr:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        background: var(--white);
    }

    .responsive-card-table td {
        text-align: right;
        padding: 10px 0;
        border: none !important;
        font-size: 14px;
        color: var(--gray-700);
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px dashed var(--gray-100) !important;
        line-height: 1.5;
    }

    .responsive-card-table td:last-child {
        border-bottom: none !important;
        padding-top: 14px;
        margin-top: 4px;
        justify-content: flex-end;
    }

    .responsive-card-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray-500);
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-right: 20px;
        flex-shrink: 0;
        text-align: left;
        min-width: 110px;
    }

    /* Pagination inside transparent card wrapper */
    .card:has(.responsive-card-table) .pagination-wrapper {
        border-top: none !important;
        padding: 16px 0 !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    .detail-header-top {
        flex-direction: column;
        gap: 12px;
    }

    .detail-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .doc-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .calendar-cell {
        min-height: 60px;
        padding: 4px;
    }

    .calendar-event {
        font-size: 8px;
        padding: 1px 3px;
    }

    .modal {
        max-width: 100%;
        margin: 10px;
    }

    /* Mobile Bottom Navigation Styles */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background-color: var(--navy-primary);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.25);
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        padding: 6px 12px;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--gray-400);
        font-size: 10px;
        font-weight: 500;
        text-decoration: none;
        flex: 1;
        transition: all var(--transition-fast);
        padding: 4px 0;
    }

    .mobile-nav-item i {
        font-size: 18px;
    }

    .mobile-nav-item:hover {
        color: var(--white);
    }

    .mobile-nav-item.active {
        color: var(--gold-primary);
    }

    .page-content {
        padding-bottom: 80px !important; /* Extra padding so content isn't blocked by fixed bottom nav */
    }

    /* Hide standard desktop table card and show mobile cards */
    .data-table {
        display: none !important;
    }
    .pagination-wrapper {
        justify-content: center !important;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .mobile-cards-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 12px;
    }

    .mobile-card {
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-lg);
        padding: 14px 16px;
        box-shadow: var(--shadow-sm);
        display: flex;
        flex-direction: column;
        gap: 10px;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        position: relative;
    }

    .mobile-card:active {
        transform: scale(0.98);
        background: var(--gray-50);
    }

    /* Dark mode overrides for mobile-card */
    body.dark-mode .mobile-card {
        background: var(--navy-light);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px dashed var(--gray-200);
        padding-bottom: 8px;
    }

    body.dark-mode .mobile-card-header {
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .mobile-card-id {
        font-weight: 700;
        font-size: 13px;
        color: var(--gold-primary);
    }

    .mobile-card-badges {
        display: flex;
        gap: 4px;
        align-items: center;
    }

    .mobile-card-title {
        font-size: 15px;
        font-weight: 600;
        color: var(--gray-900);
        line-height: 1.4;
    }

    body.dark-mode .mobile-card-title {
        color: var(--white);
    }

    .mobile-card-body {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .mobile-card-info-item {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        color: var(--gray-500);
    }

    body.dark-mode .mobile-card-info-item {
        color: var(--gray-400);
    }

    .mobile-card-info-item i {
        width: 14px;
        text-align: center;
        color: var(--gold-primary);
    }

    .mobile-card-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 4px;
        padding-top: 8px;
        border-top: 1px solid var(--gray-100);
    }

    body.dark-mode .mobile-card-footer {
        border-top-color: rgba(255, 255, 255, 0.08);
    }

    .mobile-card-actions {
        display: flex;
        gap: 6px;
        margin-left: auto;
    }

    .mobile-card-actions .btn-icon {
        width: 32px;
        height: 32px;
        font-size: 12px;
        border-radius: var(--radius-md);
    }

    /* Document List Mobile Style */
    .doc-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .doc-card {
        padding: 12px 14px;
        display: flex;
        align-items: center;
        gap: 14px;
        position: relative;
    }

    .doc-card .doc-icon {
        margin-bottom: 0 !important;
        flex-shrink: 0;
    }

    .doc-details-wrapper {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-width: 0;
    }

    .doc-card .doc-name {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .doc-card .doc-meta {
        font-size: 11px;
        margin-bottom: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .doc-card .doc-actions {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-top: 0 !important;
        border-top: none !important;
        padding-top: 0 !important;
        align-items: flex-end;
    }

    .doc-card .doc-actions form {
        margin-left: 0 !important;
    }

    /* Schedules Mobile Style */
    .calendar-grid {
        display: none !important;
    }
    .calendar-header-cell {
        display: none !important;
    }
    
    .agenda-item {
        flex-direction: column;
        gap: 8px;
        padding: 14px 16px !important;
        background: var(--white);
        border: 1px solid var(--gray-200) !important;
        border-bottom: 1px solid var(--gray-200) !important;
        border-radius: var(--radius-md);
        margin-bottom: 12px;
        box-shadow: var(--shadow-sm);
        align-items: stretch !important;
    }

    a.agenda-item,
    a.reminder-item {
        display: flex !important;
        text-decoration: none;
        color: inherit;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
    }

    a.agenda-item:active,
    a.reminder-item:active {
        background: var(--gray-100);
        transform: scale(0.99);
    }
    
    body.dark-mode .agenda-item {
        background: var(--navy-light);
        border-color: rgba(255, 255, 255, 0.08) !important;
        border-bottom-color: rgba(255, 255, 255, 0.08) !important;
    }

    .agenda-time {
        font-size: 14px !important;
        color: var(--navy-primary) !important;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 6px;
        width: auto !important;
    }
    
    body.dark-mode .agenda-time {
        color: var(--gold-primary) !important;
    }
    
    .agenda-time::before {
        content: '\f017'; /* clock icon */
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 12px;
    }

    .agenda-dot {
        display: none !important;
    }

    .agenda-info {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .agenda-title {
        font-size: 14px;
        font-weight: 600;
    }

    .agenda-case {
        font-size: 12px;
        color: var(--gray-500);
    }

    .agenda-item > div:last-child {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        margin-top: 6px;
        padding-top: 8px;
        border-top: 1px solid var(--gray-100);
        align-self: stretch !important;
        width: auto !important;
        align-items: center;
    }

    body.dark-mode .agenda-item > div:last-child {
        border-top-color: rgba(255, 255, 255, 0.08);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .login-card {
        padding: 32px 24px;
        margin: 16px;
    }
}

/* ============================================
   NOTIFICATION DROPDOWN
   ============================================ */
.topbar-notification-container {
    position: relative;
    display: inline-block;
}

.notification-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    width: 320px;
    background-color: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown.active {
    display: block;
}

.notification-dropdown .dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-dropdown .dropdown-body {
    padding: 8px 0;
}

.notification-dropdown .dropdown-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-50);
    color: var(--gray-900);
    text-decoration: none;
    transition: background-color 0.2s;
}

.notification-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.notification-dropdown .dropdown-item:hover {
    background-color: var(--gray-50);
}

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.profile-card {
    background: var(--white);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--gray-100);
    transition: box-shadow 0.3s ease;
}

.profile-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Hero Card */
.profile-card-hero {
    position: relative;
    overflow: hidden;
    padding: 0;
    text-align: center;
}

.profile-hero-bg {
    height: 120px;
    background: linear-gradient(135deg, var(--navy-primary), var(--navy-dark));
    position: relative;
}

.profile-hero-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, var(--white), transparent);
}

.profile-hero-content {
    padding: 0 28px 28px;
    margin-top: -48px;
    position: relative;
    z-index: 1;
}

.profile-avatar-lg {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
    border: 4px solid var(--white);
    box-shadow: 0 4px 16px rgba(196, 148, 61, 0.35);
    margin-bottom: 16px;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.profile-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: var(--gold-soft);
    color: var(--gold-primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.profile-email {
    font-size: 14px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.profile-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-500);
}

/* Card Header */
.profile-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-100);
}

.profile-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gold-soft);
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.profile-card-icon-blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.profile-card-icon-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.profile-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.profile-card-desc {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.4;
}

/* Password Toggle */
.input-password-wrapper {
    position: relative;
}

.input-password-wrapper .form-control {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--gray-600);
}

/* Form Actions */
.form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-100);
}

.form-success-msg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--success);
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Danger Zone */
.profile-card-danger {
    border-color: rgba(239, 68, 68, 0.2);
}

.danger-zone-content {
    padding-top: 4px;
}

.danger-zone-text {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.04);
    border-radius: 8px;
    border-left: 3px solid var(--danger);
}

.danger-zone-text i {
    color: var(--danger);
    margin-right: 4px;
}

/* Form Error */
.form-error {
    border-color: var(--danger) !important;
}

.form-error-text {
    display: block;
    color: var(--danger);
    font-size: 12px;
    margin-top: 6px;
}

@media (max-width: 767px) {
    .profile-grid {
        gap: 16px;
    }

    .profile-card {
        padding: 20px;
        border-radius: 12px;
    }

    .profile-hero-bg {
        height: 90px;
    }

    .profile-avatar-lg {
        width: 72px;
        height: 72px;
        font-size: 24px;
    }

    .profile-hero-content {
        margin-top: -36px;
        padding: 0 20px 20px;
    }

    .profile-name {
        font-size: 18px;
    }

    .profile-card-header {
        gap: 12px;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-success-msg {
        justify-content: center;
    }
}

/* ============================================
   BROADCAST PAGE
   ============================================ */
.broadcast-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: stretch;
}

.broadcast-form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    padding: 28px;
}

.broadcast-form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.broadcast-form-header i {
    width: 40px;
    height: 40px;
    background: var(--gold-soft);
    color: var(--gold-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.broadcast-form-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-900);
}

.broadcast-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Template Quick Buttons */
.template-section {
    margin-bottom: 20px;
}

.template-section label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 10px;
}

.template-section label i {
    color: var(--gold-primary);
    font-size: 14px;
}

.template-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.template-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    background: var(--white);
    color: var(--gray-700);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.template-btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    background: var(--gold-soft);
}

.template-btn.active {
    border-color: var(--gold-primary);
    background: var(--gold-soft);
    color: var(--gold-dark);
}

.char-counter {
    text-align: right;
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 6px;
}

.btn-broadcast {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: 8px;
}

.btn-broadcast:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
    box-shadow: 0 8px 25px rgba(196, 148, 61, 0.35);
    transform: translateY(-1px);
}

/* Preview Card */
.broadcast-preview-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
}

.preview-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-header h4 i {
    color: var(--gold-primary);
}

.preview-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--gold-soft);
    color: var(--gold-dark);
}

.preview-badge.wa-badge {
    background: #25D366;
    color: var(--white);
}

.preview-body {
    padding: 0;
    background: #ECE5DD;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* WhatsApp Chat Container */
.wa-chat-container {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    background: #ECE5DD;
    overflow: hidden;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    flex: 1;
}

/* WhatsApp Header */
.wa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #075E54;
    min-height: 52px;
}

.wa-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wa-header-left>i {
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
}

.wa-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--navy-dark, #0B1120);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-avatar img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.wa-contact-info {
    display: flex;
    flex-direction: column;
}

.wa-contact-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    line-height: 1.2;
}

.wa-contact-status {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

.wa-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wa-header-right i {
    color: var(--white);
    font-size: 16px;
    cursor: pointer;
}

/* WhatsApp Chat Body */
.wa-chat-body {
    flex: 1;
    padding: 16px 14px;
    background-color: #ECE5DD;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9c1b6' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* WhatsApp Bubble */
.wa-bubble {
    max-width: 85%;
    background: #FFFFFF;
    border-radius: 0 8px 8px 8px;
    padding: 8px 12px 6px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
    position: relative;
    margin-left: 8px;
}

.wa-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-top: 0px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 8px solid #FFFFFF;
}

.wa-bubble-title {
    font-size: 13px;
    font-weight: 700;
    color: #303030;
    margin-bottom: 4px;
}

.wa-bubble-text {
    font-size: 13px;
    color: #303030;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.wa-bubble-time {
    text-align: right;
    font-size: 11px;
    color: #8696A0;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.wa-bubble-time .wa-check {
    color: #53BDEB;
    font-size: 14px;
}

/* WhatsApp Input Bar */
.wa-input-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #F0F2F5;
}

.wa-input-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border-radius: 24px;
    padding: 8px 12px;
}

.wa-input-left>i {
    color: #8696A0;
    font-size: 20px;
    cursor: pointer;
}

.wa-input-placeholder {
    flex: 1;
    font-size: 14px;
    color: #8696A0;
    font-family: var(--font-primary);
}

.wa-input-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-input-icons i {
    color: #8696A0;
    font-size: 18px;
    cursor: pointer;
}

.wa-mic-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #00A884;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.wa-mic-btn i {
    color: var(--white);
    font-size: 18px;
}

/* Keep old preview styles for backward compat */
.preview-chat-header {
    display: none;
}

.preview-chat-avatar {
    display: none;
}

.preview-chat-name {
    display: none;
}

.preview-chat-status {
    display: none;
}

.preview-bubble {
    max-width: 85%;
    background: var(--white);
    border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.preview-bubble-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.preview-bubble-text {
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.preview-bubble-time {
    text-align: right;
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 8px;
}

.preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--gray-400);
    text-align: center;
    flex: 1;
}

.preview-empty i {
    font-size: 32px;
    margin-bottom: 12px;
    color: var(--gray-300);
}

.preview-empty p {
    font-size: 13px;
}

/* Broadcast History */
.broadcast-history {
    margin-top: 32px;
}

.broadcast-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.broadcast-history-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.broadcast-history-header h3 i {
    color: var(--gray-400);
}

.broadcast-history-header small {
    font-size: 12px;
    color: var(--gray-500);
}

@media (max-width: 1024px) {
    .broadcast-layout {
        grid-template-columns: 1fr;
    }

    .broadcast-preview-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .broadcast-form-row {
        grid-template-columns: 1fr;
    }

    .broadcast-form-card {
        padding: 20px;
    }
}

/* ============================================
   MOBILE & THEME HEADER STYLING
   ============================================ */
.mobile-logo-link {
    display: none;
}

/* Disable Safari tap highlight globally on interactive elements */
button, a {
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--gray-600);
    font-size: 18px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
    margin-right: 12px;
}

.theme-toggle:hover {
    color: var(--gold-primary);
    transform: rotate(15deg);
}

.theme-toggle:focus,
.mobile-toggle:focus {
    outline: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    /* Hide desktop breadcrumbs and adjust bottom padding */
    .breadcrumb {
        display: none !important;
    }

    .main-content {
        padding-bottom: 24px;
    }

    /* Make topbar slightly taller with more breathing room on mobile */
    .topbar {
        height: 72px;
        padding: 0 20px;
    }

    /* Mobile Logo Link */
    .mobile-logo-link {
        display: flex;
        align-items: center;
        margin-right: 12px;
        text-decoration: none;
    }

    .mobile-logo {
        height: 30px;
        width: auto;
    }

    .mobile-logo-text {
        font-family: var(--font-heading);
        font-weight: 700;
        font-size: 16px;
        color: var(--navy-primary);
        letter-spacing: 0.5px;
        margin-left: 10px;
        white-space: nowrap;
        transform: translateY(-2px); /* Align text visually with the column icon center */
    }
}

/* ============================================
   DARK MODE COLORS & COMPONENT OVERRIDES
   ============================================ */
body.dark-mode {
    --white: #1E293B; /* Cards & headers background */
    --gray-50: #0F172A; /* Page layout body background */
    --gray-100: #334155; /* Divider borders */
    --gray-200: #475569; /* Inner borders */
    --gray-300: #64748B;
    --gray-400: #94A3B8;
    --gray-500: #CBD5E1;
    --gray-600: #E2E8F0; /* Primary body text */
    --gray-700: #F1F5F9;
    --gray-800: #F8FAFC;
    --gray-900: #FFFFFF; /* Main headings */

    background-color: var(--gray-50);
    color: var(--gray-600);
}

/* Dark mode specific component adjustments */
body.dark-mode .mobile-logo-text {
    color: var(--gray-900);
}

body.dark-mode .theme-toggle {
    color: var(--gray-500);
}

body.dark-mode .form-control {
    background-color: #0F172A;
    border-color: var(--gray-100);
    color: var(--gray-900);
}

body.dark-mode .form-control:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(196, 148, 61, 0.15);
}

body.dark-mode .data-table {
    background-color: var(--white);
}

body.dark-mode .data-table th {
    background-color: #0F172A;
    color: var(--gray-500);
    border-bottom-color: var(--gray-100);
}

body.dark-mode .data-table tr:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

body.dark-mode .responsive-card-table tr {
    background-color: var(--white);
    border-color: var(--gray-100);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .responsive-card-table td {
    border-bottom-color: var(--gray-100) !important;
    color: var(--gray-600);
    font-size: 14px;
}

body.dark-mode .responsive-card-table td::before {
    color: var(--gray-400);
}

body.dark-mode .responsive-card-table td strong {
    color: var(--gray-900);
}

body.dark-mode .agenda-item {
    border-bottom-color: var(--gray-100) !important;
}

body.dark-mode .agenda-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .reminder-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--gold-soft);
}

body.dark-mode .agenda-notes {
    background-color: #0F172A !important;
    color: var(--gray-500) !important;
}

body.dark-mode .sidebar {
    border-right: 1px solid var(--gray-100);
}

body.dark-mode .sidebar-header {
    border-bottom-color: var(--gray-100);
}

body.dark-mode .nav-item:hover,
body.dark-mode .nav-item.active {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .sidebar-footer {
    border-top-color: var(--gray-100);
}

body.dark-mode .topbar {
    background-color: var(--white);
    border-bottom-color: var(--gray-100);
}

body.dark-mode .breadcrumb a,
body.dark-mode .breadcrumb .separator {
    color: var(--gray-400);
}

body.dark-mode .breadcrumb .current {
    color: var(--gray-900);
}

body.dark-mode .btn-secondary {
    background-color: #334155;
    border-color: #475569;
    color: var(--gray-900);
}

body.dark-mode .btn-secondary:hover {
    background-color: #475569;
    border-color: #64748B;
}

body.dark-mode .detail-info-item label {
    color: var(--gray-400);
}

body.dark-mode .detail-info-item span {
    color: var(--gray-900);
}

body.dark-mode .custom-popup-card {
    background-color: var(--white);
    color: var(--gray-600);
}

body.dark-mode .custom-popup-title {
    color: var(--gray-900);
}

/* ============================================
   SEARCHABLE CLIENT SELECT DROPDOWN
   ============================================ */
.searchable-select {
    position: relative;
    width: 100%;
}

.searchable-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.dropdown-item-client {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s, color 0.2s;
    border-bottom: 1px solid var(--gray-100);
    text-align: left;
    color: var(--gray-900);
}

.dropdown-item-client:last-child {
    border-bottom: none;
}

.dropdown-item-client:hover {
    background: var(--gray-50);
    color: var(--gold-primary);
}

/* ============================================
   CUSTOM POPUP / ANIMATED CENTER MODAL NOTIFICATIONS
   ============================================ */
.custom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.custom-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-popup-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 400px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(196, 148, 61, 0.15);
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-normal) cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-popup-overlay.active .custom-popup-card {
    transform: scale(1) translateY(0);
}

.custom-popup-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    position: relative;
}

/* Success Styles */
.custom-popup-icon.success {
    background: var(--success-light);
    color: var(--success);
    border: 3px solid rgba(34, 197, 94, 0.2);
}

/* Error Styles */
.custom-popup-icon.error {
    background: var(--danger-light);
    color: var(--danger);
    border: 3px solid rgba(239, 68, 68, 0.2);
}

/* Warning / Confirm Styles */
.custom-popup-icon.warning {
    background: var(--gold-soft);
    color: var(--gold-primary);
    border: 3px solid rgba(196, 148, 61, 0.2);
}

.custom-popup-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--navy-primary);
    margin-bottom: 10px;
}

.custom-popup-text {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 24px;
}

.custom-popup-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.custom-popup-btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    flex: 1;
}

.custom-popup-btn-confirm {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--white);
}

.custom-popup-btn-confirm:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(196, 148, 61, 0.3);
}

.custom-popup-btn-cancel {
    background: var(--gray-100);
    color: var(--gray-700);
}

.custom-popup-btn-cancel:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

/* ============================================
   TOPBAR BACK BUTTON STYLE
   ============================================ */
.topbar-back-btn {
    display: none; /* Hide on desktop */
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    margin-right: 12px;
}

body.dark-mode .topbar-back-btn {
    color: var(--gray-400);
}

.topbar-back-btn:hover {
    background: var(--gray-100);
    color: var(--gold-primary);
}

body.dark-mode .topbar-back-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--gold-primary);
}

@media (max-width: 768px) {
    .topbar-back-btn {
        display: flex; /* Show only on mobile */
        padding: 8px;
        margin-right: 4px;
        font-size: 18px;
    }
    
    .topbar-back-btn span {
        display: none; /* Hide text on mobile */
    }
}