/* =====================================================
    TASK BOT DASHBOARD PRO - RAMADHAN EDITION
    Tema Islami dengan nuansa Ramadhan yang hangat
    Fixed Layout - No Scrolling Issues
    ===================================================== */

/* =============== RESET & VARIABLES RAMADHAN =============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Ramadhan Light Theme - Nuansa Timur Tengah */
    --primary: #b58b5b;        /* Emas - warna bulan sabit */
    --primary-dark: #9e7542;    /* Emas tua - warna kuningan */
    --primary-light: #d4b48c;   /* Emas muda - cahaya lilin */
    --secondary: #2d5a4c;       /* Hijau zamrud - warna Islam */
    --secondary-light: #3d7a68;  /* Hijau muda - daun kurma */
    
    --success: #2d7a4b;         /* Hijau - keberkahan */
    --warning: #c99c47;          /* Kuning - bintang */
    --danger: #b34b4b;           /* Merah - matahari terbenam */
    --info: #4a7b9d;             /* Biru - langit malam */
    
    --bg-primary: #fcf5e8;       /* Krem - warna pasir gurun */
    --bg-secondary: #fff9f0;      /* Krem muda - cahaya lentera */
    --bg-card: #ffffff;           /* Putih bersih */
    --bg-hover: #f5ede1;          /* Krem lembut - untuk hover */
    --bg-sidebar: #ffffff;        /* Putih - sidebar */
    --bg-input: #fcf5e8;          /* Krem - input field */
    
    --text-primary: #2c3e2f;      /* Hijau tua - warna Al-Qur'an */
    --text-secondary: #5a6b5e;     /* Hijau keabu-abuan */
    --text-muted: #8b9a8e;        /* Abu kehijauan */
    --text-light: #c5d0c8;        /* Krem muda */
    
    --border: #e2d5c2;            /* Coklat muda - batas elegan */
    --border-light: #f0e8db;      /* Krem - batas tipis */
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(181, 139, 91, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(181, 139, 91, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(181, 139, 91, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(181, 139, 91, 0.1);
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Ramadhan specific patterns */
    --pattern-masjid: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5L5 20v30h50V20L30 5z' fill='%23b58b5b' fill-opacity='0.03'/%3E%3C/svg%3E");
    --pattern-bintang: url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 0l4.5 13.5H30l-11 8 4.5 13.5-8.5-6-8.5 6L9 21.5l-11-8h10.5z' fill='%23b58b5b' fill-opacity='0.02'/%3E%3C/svg%3E");
}

.dark {
    /* Ramadhan Dark Theme - Nuansa Malam */
    --primary: #d4b48c;        /* Emas - cahaya bulan purnama */
    --primary-dark: #b58b5b;    /* Emas tua */
    --primary-light: #e8d2b8;   /* Emas muda */
    --secondary: #2d7a4b;       /* Hijau - keberkahan malam */
    
    --bg-primary: #1a241c;       /* Hitam kehijauan - warna malam */
    --bg-secondary: #243128;      /* Hijau tua - langit malam */
    --bg-card: #2d3a30;          /* Hijau gelap */
    --bg-hover: #3d4d40;          /* Hijau lebih terang */
    --bg-sidebar: #2d3a30;        /* Hijau gelap */
    --bg-input: #1a241c;          /* Hitam kehijauan */
    
    --text-primary: #f5ede1;      /* Krem - cahaya bintang */
    --text-secondary: #d4c8b8;     /* Krem lembut */
    --text-muted: #a89f92;        /* Abu kecoklatan */
    
    --border: #3d4d40;            /* Hijau gelap - border */
    --border-light: #2d3a30;       /* Hijau lebih gelap */
}

/* =============== RAMADHAN DECORATIONS =============== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: var(--pattern-masjid), var(--pattern-bintang);
    background-repeat: repeat, repeat;
    opacity: 0.5;
    z-index: -1;
}

.moon-decoration {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary-light), var(--primary));
    box-shadow: 0 0 30px var(--primary-light);
    z-index: 1;
    opacity: 0.2;
    animation: moonGlow 4s ease-in-out infinite;
}

.moon-decoration::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
}

@keyframes moonGlow {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.1); }
}

.lantern-decoration {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 20px 20px 10px 10px;
    z-index: 1;
    opacity: 0.15;
    animation: lanternSwing 3s ease-in-out infinite;
    transform-origin: top center;
}

.lantern-decoration::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 10px;
    width: 20px;
    height: 15px;
    background: var(--primary-dark);
    border-radius: 5px 5px 0 0;
}

.lantern-decoration::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 15px;
    width: 10px;
    height: 10px;
    background: var(--primary-light);
    border-radius: 50%;
    filter: blur(5px);
    animation: lanternFlicker 1s ease-in-out infinite;
}

@keyframes lanternSwing {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(5deg); }
}

@keyframes lanternFlicker {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* =============== BASE STYLES =============== */
/* =============== BASE STYLES =============== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;   /* biar gak geser horizontal */
    overflow-y: auto;     /* IZINKAN scroll */
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
    min-height: 100vh;    /* jangan height:100vh */
    position: relative;
}


/* =============== SCROLLBAR CUSTOM =============== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-hover);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-hover);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* =============== LOADING SCREEN =============== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-right-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    box-shadow: 0 0 20px var(--primary-light);
}

.loading-screen p {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =============== LAYOUT UTAMA =============== */
#app, .dashboard-wrapper {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
}

.dashboard-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* =============== SIDEBAR - RAMADHAN STYLE =============== */
.sidebar {
    width: 280px;
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 2px solid var(--border);
    background: linear-gradient(135deg, rgba(181, 139, 91, 0.05), transparent);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    position: relative;
}

.logo i {
    font-size: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(181, 139, 91, 0.3));
}

.logo h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px;
    background: var(--bg-hover);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid var(--primary-light);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    display: inline-block;
    border: 1px solid var(--border);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-role.admin {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
}

/* =============== SIDEBAR NAVIGATION =============== */
.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-item:hover::before {
    transform: scaleY(1);
}

.nav-item i {
    width: 22px;
    font-size: 18px;
    text-align: center;
    color: var(--primary);
    transition: all 0.3s ease;
}

.nav-item span {
    flex: 1;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--primary);
    transform: translateX(5px);
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(181, 139, 91, 0.1), rgba(45, 90, 76, 0.1));
    color: var(--primary);
    font-weight: 700;
    border: 1px solid var(--border);
}

.nav-item.active i {
    color: var(--primary);
    transform: scale(1.1);
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-badge {
    background: var(--primary);
    color: white;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(181, 139, 91, 0.3);
}

/* =============== SIDEBAR FOOTER =============== */
.sidebar-footer {
    padding: 20px;
    border-top: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(135deg, rgba(181, 139, 91, 0.02), transparent);
}

.telegram-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-hover);
    border-radius: var(--radius-lg);
    font-size: 13px;
    border: 1px solid var(--border);
}

.telegram-status i {
    font-size: 12px;
    filter: drop-shadow(0 0 5px currentColor);
}

.telegram-status i.online {
    color: var(--success);
    animation: pulse 2s infinite;
}

.telegram-status i.offline {
    color: var(--text-muted);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* =============== MAIN CONTENT =============== */
/* =============== MAIN CONTENT =============== */
.main-content {
    flex: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* KEMBALIKAN ke hidden */
    background: var(--bg-primary);
}

.content-header {
    padding: 20px 28px;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
}

.content-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), transparent);
}

.header-title h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-secondary {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 16px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 45px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(181, 139, 91, 0.15);
    background: var(--bg-card);
}

.btn-refresh {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--bg-input);
    border: 2px solid var(--border);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}

.btn-refresh:hover {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    transform: rotate(180deg) scale(1.05);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(181, 139, 91, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(181, 139, 91, 0.4);
}

.btn-primary i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(5px);
}

.btn-secondary {
    padding: 12px 24px;
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* =============== CONTENT AREA =============== */
/* =============== CONTENT AREA =============== */
.content-area {
    flex: 1;
    padding: 28px;
    overflow-y: auto; /* PASTIKAN ini ada */
    overflow-x: hidden;
    height: calc(100vh - 120px);
}

/* =============== STATS GRID =============== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.stat-card:hover::before {
    transform: translateX(0);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
}

.stat-icon.pending {
    background: rgba(201, 156, 71, 0.15);
    color: var(--warning);
}

.stat-icon.in-progress {
    background: rgba(74, 123, 157, 0.15);
    color: var(--info);
}

.stat-icon.completed {
    background: rgba(45, 122, 75, 0.15);
    color: var(--success);
}

.stat-icon.approved {
    background: rgba(181, 139, 91, 0.15);
    color: var(--primary);
}

.stat-details {
    flex: 1;
    min-width: 0;
}

.stat-details h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =============== SCROLLABLE CONTENT FIX =============== */
.dashboard-content,
.tasks-view,
.users-view,
.profile-view,
.reports-view,
.settings-view,
.chat-view {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 20px;
}

/* Pastikan grid dan konten di dalamnya bisa di-scroll */
.tasks-grid,
.stats-grid,
.charts-grid,
.recent-tasks,
.activity-log,
.profile-grid,
.reports-grid,
.settings-grid {
    overflow: visible;
}

/* Perbaikan untuk modal agar tetap bisa di-scroll */
.modal-body {
    max-height: calc(85vh - 120px);
    overflow-y: auto;
    padding: 20px;
}

/* Perbaikan untuk chat container */
.chat-container {
    height: calc(100vh - 140px);
    overflow: hidden;
}

.chat-messages {
    height: calc(100% - 120px);
    overflow-y: auto;
}

.chat-sidebar {
    height: 100%;
    overflow-y: auto;
}

.chat-rooms-list {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

/* =============== CHARTS GRID =============== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 28px;
}

.chart-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    transition: all 0.3s ease;
}

.chart-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.chart-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.chart-card h3 i {
    color: var(--primary);
    font-size: 20px;
}

.chart-card canvas {
    width: 100% !important;
    height: 250px !important;
}

/* =============== RECENT TASKS & ACTIVITY =============== */
.recent-tasks,
.activity-log {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.recent-tasks:hover,
.activity-log:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.section-header h3 i {
    color: var(--primary);
}

.section-header a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: rgba(181, 139, 91, 0.1);
}

.section-header a:hover {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

.badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* =============== TASKS FILTERS =============== */
.tasks-filters {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label i {
    color: var(--primary);
    font-size: 14px;
}

.filter-group select {
    padding: 10px 14px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(181, 139, 91, 0.15);
}

.filter-actions {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

/* =============== TASKS GRID =============== */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.task-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.task-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.task-card:hover::before {
    opacity: 1;
}

.task-card-header {
    padding: 20px;
    border-bottom: 2px solid var(--border);
    background: linear-gradient(135deg, rgba(181, 139, 91, 0.03), transparent);
}

.task-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.task-title h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
    line-height: 1.4;
}

.status-badge {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.status-badge i {
    font-size: 12px;
}

.status-badge.pending {
    background: rgba(201, 156, 71, 0.15);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.status-badge.in_progress {
    background: rgba(74, 123, 157, 0.15);
    color: var(--info);
    border: 1px solid var(--info);
}

.status-badge.completed {
    background: rgba(45, 122, 75, 0.15);
    color: var(--success);
    border: 1px solid var(--success);
}

.status-badge.approved {
    background: rgba(181, 139, 91, 0.15);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.status-badge.rejected {
    background: rgba(179, 75, 75, 0.15);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.task-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 13px;
}

.assignee, .date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-card-body {
    padding: 20px;
    border-bottom: 2px solid var(--border);
    flex: 1;
}

.task-card-body p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
}

.task-card-footer {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-hover);
}

.task-stats {
    display: flex;
    gap: 16px;
}

.test-badge, .file-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.test-badge i, .file-badge i {
    color: var(--primary);
}

.task-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-icon:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-md);
}

.btn-icon.success:hover {
    background: var(--success);
}

.btn-icon.warning:hover {
    background: var(--warning);
}

.btn-icon.danger:hover {
    background: var(--danger);
}

/* =============== PROFILE PAGE =============== */
.profile-view {
    height: 100%;
    padding: 20px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 28px;
    height: 100%;
}

.profile-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: fit-content;
    position: relative;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.profile-avatar {
    position: relative;
    display: inline-block;
    margin: 0 auto 25px;
    width: 160px;
    height: 160px;
}

.profile-avatar i {
    font-size: 80px;
    color: var(--primary);
    background: var(--bg-hover);
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--border);
}

.profile-image {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.02);
}

.edit-photo {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--bg-card);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    z-index: 10;
}

.edit-photo:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 0 20px var(--primary);
}

.profile-card h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.profile-card .username {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 20px;
    padding: 6px 16px;
    background: var(--bg-hover);
    border-radius: var(--radius-full);
    display: inline-block;
    border: 1px solid var(--border);
}

.role-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 700;
    background: var(--bg-hover);
    color: var(--text-secondary);
    margin-bottom: 28px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--border);
}

.role-badge.admin {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
}

.role-badge.user {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 25px 0 0;
    border-top: 2px solid var(--border);
    width: 100%;
}

.profile-stats .stat {
    text-align: center;
    flex: 1;
}

.profile-stats .label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.profile-stats .value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-form {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.profile-form h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.profile-form h3 i {
    color: var(--primary);
    font-size: 24px;
}

.profile-form .form-group {
    margin-bottom: 24px;
}

.profile-form .form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.profile-form .form-group label i {
    color: var(--primary);
    font-size: 18px;
}

.profile-form .form-group input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
}

.profile-form .form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(181, 139, 91, 0.15);
    background: var(--bg-card);
}

.profile-form .input-group {
    display: flex;
    gap: 12px;
}

.profile-form .input-group input {
    flex: 1;
}

.profile-form .input-group button {
    padding: 14px 24px;
    white-space: nowrap;
}

.profile-form .btn-primary {
    width: 100%;
    padding: 16px;
    margin-top: 16px;
    font-size: 16px;
    font-weight: 700;
}

/* =============== FORM STYLES =============== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group label i {
    color: var(--primary);
    font-size: 14px;
}

.required {
    color: var(--danger);
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(181, 139, 91, 0.15);
}

.form-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group input {
    flex: 1;
}

/* =============== PASSWORD FIELD =============== */
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field input {
    flex: 1;
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary);
}

/* =============== FILE UPLOAD =============== */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-input);
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--primary);
    background: rgba(181, 139, 91, 0.05);
}

.file-upload-area i {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 8px;
}

.file-upload-area p {
    color: var(--text-secondary);
    font-size: 13px;
}

.browse-link {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

.file-preview {
    margin-top: 12px;
    display: none;
}

.file-preview.active {
    display: block;
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.file-preview-item i {
    color: var(--primary);
    font-size: 16px;
}

.file-preview-item .name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-item .size {
    color: var(--text-muted);
    font-size: 11px;
}

.file-preview-item button {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 4px;
}

/* =============== TASK DETAIL MODAL =============== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}

.modal-content.large {
    max-width: 900px;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-hover);
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.modal-header h3 i {
    color: var(--primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-card);
    color: var(--danger);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

/* =============== TEST CASES =============== */
.test-cases-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.test-case-item {
    padding: 16px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--border);
}

.test-case-item.passed {
    border-left-color: var(--success);
}

.test-case-item.failed {
    border-left-color: var(--danger);
}

.test-case-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.test-case-header h6 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.test-case-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0;
    font-size: 12px;
}

.detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* =============== USERS TABLE =============== */
/* =============== USERS TABLE =============== */
.users-table-container {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: auto; /* UBAH dari 'auto' ke 'auto' (sudah benar) */
    max-height: calc(100vh - 250px); /* TAMBAH batasan tinggi */
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 800px; /* TAMBAH lebar minimum untuk tabel */
}

.users-table th {
    text-align: left;
    padding: 14px 16px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

.users-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.users-table tr:hover td {
    background: var(--bg-hover);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-cell i {
    font-size: 20px;
    color: var(--primary);
}

.user-cell small {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
}

.action-buttons {
    display: flex;
    gap: 6px;
}

/* =============== NOTIFICATION =============== */
#notificationContainer {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
}

.notification {
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border-left: 6px solid;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    animation: slideIn 0.3s ease;
    border: 2px solid var(--border);
    font-size: 14px;
    font-weight: 500;
}

.notification.success {
    border-left-color: var(--success);
    background: linear-gradient(135deg, rgba(45, 122, 75, 0.1), var(--bg-card));
}

.notification.error {
    border-left-color: var(--danger);
    background: linear-gradient(135deg, rgba(179, 75, 75, 0.1), var(--bg-card));
}

.notification.warning {
    border-left-color: var(--warning);
    background: linear-gradient(135deg, rgba(201, 156, 71, 0.1), var(--bg-card));
}

.notification.info {
    border-left-color: var(--info);
    background: linear-gradient(135deg, rgba(74, 123, 157, 0.1), var(--bg-card));
}

.notification button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    transition: all 0.2s ease;
    border-radius: var(--radius-full);
}

.notification button:hover {
    background: var(--bg-hover);
    color: var(--danger);
    transform: rotate(90deg);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =============== EMPTY & LOADING STATES =============== */
.loading-state {
    text-align: center;
    padding: 50px 30px;
    color: var(--text-muted);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-right-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

.loading-spinner.small {
    width: 24px;
    height: 24px;
}

.empty-state {
    text-align: center;
    padding: 60px 30px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.4;
    color: var(--primary);
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 15px;
}

.empty-state.small {
    padding: 30px;
}

.empty-state.small i {
    font-size: 40px;
}



/* =============== RESPONSIVE =============== */
@media (max-width: 1200px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 90px;
    }
    
    .sidebar .logo h2,
    .sidebar .user-details,
    .sidebar .nav-item span,
    .sidebar .telegram-status span {
        display: none;
    }
    
    .sidebar .nav-item {
        justify-content: center;
        padding: 15px;
    }
    
    .sidebar .nav-item i {
        margin: 0;
        font-size: 22px;
    }
    
    .user-info {
        justify-content: center;
        padding: 5px;
    }
    
    .user-avatar {
        width: 60px;
        height: 60px;
        margin: 0 auto;
    }
    
    .decoration-content {
        display: none;
    }
}

@media (max-width: 768px) {
    .content-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .search-box {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tasks-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-actions {
        margin-left: 0;
    }
    
    .tasks-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 40px 25px;
    }
    
    .auth-logo i {
        font-size: 55px;
    }
    
    .auth-logo h1 {
        font-size: 28px;
    }
    
    .auth-tab {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .auth-form .form-group input {
        padding: 14px 18px;
    }
    
    .auth-btn {
        padding: 16px 22px;
    }
    
    .auth-footer {
        flex-direction: column;
        gap: 12px;
    }
    
    .chat-container {
        flex-direction: column;
    }
    
    .chat-sidebar {
        width: 100%;
        height: 350px;
    }
    
    .chat-room {
        height: calc(100vh - 450px);
    }
    
    .message {
        max-width: 90%;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-card {
        padding: 30px 20px;
    }
    
    .profile-image {
        width: 120px;
        height: 120px;
    }
    
    .profile-stats {
        gap: 20px;
    }
    
    .profile-stats .value {
        font-size: 24px;
    }
}

/* =============== AUTH PAGES - RAMADHAN EDITION =============== */
.auth-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    background: linear-gradient(135deg, #1a241c 0%, #2d3a30 50%, #1a241c 100%);
    overflow: auto;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--pattern-masjid);
    opacity: 0.1;
    pointer-events: none;
}

.auth-card {
    width: 100%;
    max-width: 500px;
    padding: 50px 40px;
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    z-index: 10;
    animation: slideUpFade 0.6s ease;
    backdrop-filter: blur(10px);
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
}

.auth-card::after {
    content: '✦';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 30px;
    color: var(--primary);
    opacity: 0.1;
    transform: rotate(15deg);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo {
    text-align: center;
    margin-bottom: 35px;
}

.auth-logo i {
    font-size: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    filter: drop-shadow(0 5px 15px rgba(181, 139, 91, 0.4));
    animation: floatMoon 3s ease-in-out infinite;
}

@keyframes floatMoon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
}

.auth-logo h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-logo span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin-top: 8px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 35px;
    padding: 6px;
    background: var(--bg-hover);
    border-radius: var(--radius-full);
    border: 2px solid var(--border);
}

.auth-tab {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 16px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.auth-tab::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-tab:hover::before {
    width: 400px;
    height: 400px;
}

.auth-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: var(--shadow-lg);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-form .form-group {
    margin-bottom: 0;
}

.auth-form .form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.auth-form .form-group label i {
    color: var(--primary);
    font-size: 18px;
}

.auth-form .form-group input {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 5px rgba(181, 139, 91, 0.2);
    transform: translateY(-2px);
    background: var(--bg-card);
}

.auth-form .form-group input::placeholder {
    color: var(--text-muted);
    font-size: 15px;
}

/* =============== AUTH PAGES - PERBAIKAN SCROLL =============== */
/* =============== AUTH PAGES - PERBAIKAN SCROLL =============== */
/* =============== AUTH PAGES - PERBAIKAN SCROLL =============== */

.auth-container{
  min-height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;

  /* penting: biar di layar kecil mulai dari atas */
  align-items: flex-start;
}

.auth-card{
  width: 100%;
  max-width: 500px;

  /* kunci biar card bisa discroll sampai tombol/footer */
  max-height: calc(100vh - 40px);
  overflow-y: auto;

  padding: 50px 40px;
  margin: 20px auto;
}

/* matikan scroll khusus form (ini yang bikin footer ketutup) */
.auth-form{
  max-height: none;
  overflow: visible;
  padding-right: 0;
}


/* Custom scrollbar untuk form */
.auth-form::-webkit-scrollbar {
    width: 6px;
}

.auth-form::-webkit-scrollbar-track {
    background: var(--bg-hover);
    border-radius: var(--radius-full);
}

.auth-form::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

/* Perbaikan untuk tampilan mobile */
@media (max-width: 768px) {
    .auth-container {
        padding: 10px;
        align-items: flex-start; /* Ubah agar konten mulai dari atas */
    }
    
    .auth-card {
        padding: 30px 20px;
        margin: 20px auto;
    }
    
    .auth-form {
        max-height: 60vh;
    }
}

/* Perbaikan untuk height kecil */
@media (max-height: 700px) {
    .auth-card {
        padding: 25px 20px;
    }
    
    .auth-logo {
        margin-bottom: 15px;
    }
    
    .auth-logo i {
        font-size: 50px;
    }
    
    .auth-logo h1 {
        font-size: 28px;
    }
    
    .auth-tabs {
        margin-bottom: 20px;
    }
    
    .auth-form {
        gap: 15px;
        max-height: 50vh;
    }
    
    .auth-form .form-group input {
        padding: 12px 16px;
    }
    
    .auth-btn {
        padding: 14px 20px;
        margin-top: 10px;
    }
}

/* Pastikan semua elemen form bisa di-scroll */
.auth-form .form-group {
    margin-bottom: 0;
    flex-shrink: 0;
}

.auth-tabs {
    flex-shrink: 0;
}

.auth-logo {
    flex-shrink: 0;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 60px !important;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: var(--radius-full);
    font-size: 18px;
}

.password-toggle:hover {
    color: var(--secondary);
    background: var(--bg-hover);
}

.auth-btn {
    width: 100%;
    padding: 18px 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 800;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
    margin-top: 15px;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(181, 139, 91, 0.3);
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.8s, height 0.8s;
}

.auth-btn:hover::before {
    width: 600px;
    height: 600px;
}

.auth-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -5px var(--primary);
}

.auth-btn:active {
    transform: translateY(-2px);
}

.auth-btn i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.auth-btn:hover i {
    transform: translateX(8px);
}

.auth-btn.secondary {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-primary);
    box-shadow: none;
}

.auth-btn.secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.auth-footer {
    margin-top: 35px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: rgba(181, 139, 91, 0.1);
}

.auth-footer a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.separator {
    color: var(--text-muted);
    font-size: 14px;
}



/* Auth Decoration */
.auth-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    animation: float 8s ease-in-out infinite;
}

.decoration-circle:nth-child(1) {
    width: 400px;
    height: 400px;
    top: -200px;
    right: -200px;
    background: linear-gradient(135deg, rgba(181, 139, 91, 0.2), rgba(45, 90, 76, 0.2));
    animation-delay: 0s;
}

.decoration-circle:nth-child(2) {
    width: 300px;
    height: 300px;
    bottom: -150px;
    left: -150px;
    background: linear-gradient(135deg, rgba(181, 139, 91, 0.15), rgba(45, 90, 76, 0.15));
    animation-delay: 2s;
}

.decoration-circle:nth-child(3) {
    width: 200px;
    height: 200px;
    top: 20%;
    left: 20%;
    background: rgba(255, 255, 255, 0.02);
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

.decoration-content {
    position: absolute;
    top: 50%;
    right: 8%;
    transform: translateY(-50%);
    text-align: right;
    color: white;
    opacity: 0.9;
    max-width: 350px;
    z-index: 5;
}

.decoration-content i {
    font-size: 60px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 50%;
    animation: ramadhanPulse 3s ease-in-out infinite;
    color: var(--primary-light);
    box-shadow: 0 0 30px rgba(181, 139, 91, 0.3);
}

@keyframes ramadhanPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(181, 139, 91, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 40px rgba(181, 139, 91, 0.5);
    }
}

.decoration-content h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.decoration-content p {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.8;
    color: white;
}

/* Form Text */
.form-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-text i {
    font-size: 12px;
}

/* Verification Code Input */
.verification-code-input {
    margin: 30px 0;
}

.verification-code-input input {
    width: 100%;
    padding: 20px;
    font-size: 36px !important;
    letter-spacing: 16px;
    text-align: center;
    background: var(--bg-input);
    border: 3px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-weight: 800;
    transition: all 0.3s ease;
}

.verification-code-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 6px rgba(181, 139, 91, 0.2);
    transform: scale(1.03);
}

/* Loading State */
.auth-btn .btn-loader {
    display: inline-flex;
    gap: 4px;
    margin-left: 8px;
}

.loader-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: loaderDot 1.4s infinite ease-in-out;
}

.loader-dot:nth-child(1) { animation-delay: -0.32s; }
.loader-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loaderDot {
    0%, 80%, 100% { 
        transform: scale(0);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Success Animation */
@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.auth-success {
    text-align: center;
    padding: 20px;
}

.auth-success i {
    font-size: 64px;
    color: var(--success);
    animation: checkmark 0.5s ease;
}

/* =============== TASK DETAIL MODAL - ULTIMATE =============== */
.task-detail-modal {
    max-width: 1000px;
    width: 95%;
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-header-left i {
    font-size: 28px;
    color: var(--primary);
}

.modal-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.task-id-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.task-detail-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.task-detail-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--border);
}

.task-detail-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.task-detail-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Info Cards Grid */
.task-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 8px 0 16px;
}

.info-card {
    background: var(--bg-hover);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
    border: 2px solid var(--border);
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.info-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(181, 139, 91, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    flex-shrink: 0;
}

.info-icon.success {
    background: rgba(45, 122, 75, 0.1);
    color: var(--success);
}

.info-icon.primary {
    background: rgba(181, 139, 91, 0.1);
    color: var(--primary);
}

.info-content {
    flex: 1;
    min-width: 0;
}

.info-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-sub {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
}

/* Task Sections */
.task-section {
    background: var(--bg-hover);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 2px solid var(--border);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.section-title i {
    font-size: 18px;
    color: var(--primary);
}

.section-title h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.description-box,
.result-box {
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
    line-height: 1.7;
    font-size: 14px;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

/* File Attachment Card */
.file-attachment-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
}

.file-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(181, 139, 91, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 24px;
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Test Cases Grid */
.test-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.test-case-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 2px solid var(--border);
    border-left-width: 4px;
    transition: all 0.2s ease;
}

.test-case-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.test-case-card.passed {
    border-left-color: var(--success);
}

.test-case-card.failed {
    border-left-color: var(--danger);
}

.test-case-card.pending {
    border-left-color: var(--warning);
}

.test-case-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.test-case-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.test-case-title i {
    color: var(--primary);
    font-size: 14px;
}

.test-case-title h6 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.test-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.test-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.test-detail-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
}

.detail-label {
    font-weight: 600;
    color: var(--text-muted);
    min-width: 70px;
}

.test-detail-item code {
    background: var(--bg-hover);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: monospace;
    font-size: 11px;
    word-break: break-all;
}

.test-screenshot {
    margin: 12px 0;
}

.btn-screenshot {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-screenshot:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.test-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
}

.test-footer span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.test-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.empty-state-test {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    border: 2px dashed var(--border);
}

.empty-state-test i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state-test h5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state-test p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Action Buttons */
.task-actions-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 3px solid var(--border);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn i {
    font-size: 14px;
}

.action-btn.start {
    background: var(--info);
    color: white;
}

.action-btn.start:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.action-btn.complete {
    background: var(--success);
    color: white;
}

.action-btn.complete:hover {
    background: #059669;
    transform: translateY(-2px);
}

.action-btn.upload {
    background: var(--primary);
    color: white;
}

.action-btn.upload:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.action-btn.approve {
    background: var(--success);
    color: white;
}

.action-btn.approve:hover {
    background: #059669;
    transform: translateY(-2px);
}

.action-btn.reject {
    background: var(--danger);
    color: white;
}

.action-btn.reject:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.action-btn.delete {
    background: var(--danger);
    color: white;
}

.action-btn.delete:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.action-btn.close {
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 2px solid var(--border);
}

.action-btn.close:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* File Preview Modal */
.file-preview-modal,
.image-preview-modal {
    max-width: 1000px;
    width: 95%;
}

.file-preview-body,
.image-preview-body {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

.file-preview-container {
    height: 70vh;
    width: 100%;
    background: var(--bg-hover);
}

.file-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.image-preview-body {
    align-items: center;
    padding: 20px !important;
}

.image-preview {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.file-preview-actions,
.image-preview-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 2px solid var(--border);
    justify-content: flex-end;
}

/* =============== REPORTS PAGE - ENHANCED =============== */
/* =============== REPORTS PAGE - ENHANCED =============== */
.reports-view {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto; /* TAMBAH ini */
    padding-bottom: 20px;
}

.report-table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    max-height: 500px;
    overflow-y: auto; /* PASTIKAN ini auto */
}

.reports-header {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.reports-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
}

.reports-header h3 {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.reports-header h3 i {
    color: var(--primary);
    font-size: 24px;
}

.report-actions {
    display: flex;
    gap: 12px;
}

.btn-excel {
    padding: 12px 24px;
    background: linear-gradient(135deg, #1d6f42, #2a9d4e);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(45, 122, 75, 0.3);
}

.btn-excel:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(45, 122, 75, 0.4);
}

.btn-excel i {
    font-size: 16px;
}

.btn-pdf {
    padding: 12px 24px;
    background: linear-gradient(135deg, #b34b4b, #d45d5d);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(179, 75, 75, 0.3);
}

.btn-pdf:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(179, 75, 75, 0.4);
}

.btn-pdf i {
    font-size: 16px;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.report-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    transition: all 0.3s ease;
}

.report-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.report-card h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.report-card h4 i {
    color: var(--primary);
    font-size: 20px;
}

.report-chart-container {
    height: 250px;
    position: relative;
}

.report-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-item {
    background: var(--bg-hover);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-item .label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item .value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =============== DETAILED REPORT TABLE =============== */
.detailed-report {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-top: 24px;
}

.detailed-report h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.detailed-report h4 i {
    color: var(--primary);
}

.report-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.report-filters .filter-group {
    min-width: 200px;
}

.report-table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    max-height: 500px;
    overflow-y: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 1800px;
}

.report-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.report-table th {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 12px;
    text-align: left;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.report-table th:last-child {
    border-right: none;
}

.report-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
    background: var(--bg-card);
}

.report-table tbody tr:hover td {
    background: var(--bg-hover);
}

.report-table .status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.report-table .status-pass {
    background: rgba(45, 122, 75, 0.15);
    color: var(--success);
    border: 1px solid var(--success);
}

.report-table .status-fail {
    background: rgba(179, 75, 75, 0.15);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.report-table .status-pending {
    background: rgba(201, 156, 71, 0.15);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.report-table .evidence-link {
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.report-table .evidence-link:hover {
    text-decoration: underline;
}

.report-table .evidence-link i {
    font-size: 12px;
}

.report-table .note-cell {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-table .action-cell {
    display: flex;
    gap: 6px;
}

.report-table .btn-icon-small {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.report-table .btn-icon-small:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Report Summary Cards */
.report-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.summary-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.summary-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.summary-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(181, 139, 91, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 24px;
}

.summary-details {
    flex: 1;
}

.summary-details .label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-details .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* Responsive */
@media (max-width: 1200px) {
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .report-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .reports-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .report-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-excel, .btn-pdf {
        width: 100%;
        justify-content: center;
    }
    
    .report-summary {
        grid-template-columns: 1fr;
    }
    
    .report-filters {
        flex-direction: column;
    }
    
    .report-filters .filter-group {
        width: 100%;
    }
}

/* =============== CHAT SYSTEM =============== */


/* =============== CHAT SYSTEM - ENHANCED =============== */

/* Reply Preview */
.reply-preview {
    background: var(--bg-hover);
    border-left: 4px solid var(--primary);
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    border: 1px solid var(--border);
}

.reply-preview .reply-info {
    flex: 1;
    overflow: hidden;
}

.reply-preview .reply-sender {
    font-weight: 700;
    color: var(--primary);
    margin-right: 5px;
}

.reply-preview .reply-message {
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reply-preview .cancel-reply {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 5px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.reply-preview .cancel-reply:hover {
    background: rgba(179, 75, 75, 0.1);
    transform: scale(1.1);
}

/* Message Actions */
.message {
    position: relative;
    transition: all 0.2s ease;
}

.message:hover {
    background: rgba(181, 139, 91, 0.03);
}

.message-actions {
    position: absolute;
    top: -15px;
    right: 0;
    display: none;
    gap: 5px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 4px;
    box-shadow: var(--shadow-md);
    z-index: 100;
}

.message:hover .message-actions {
    display: flex;
}

.message-actions .action-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
}

.message-actions .action-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Reply to message styling */
.message .reply-to {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding: 6px 10px;
    background: rgba(0,0,0,0.03);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
    line-height: 1.4;
}

.message .reply-to .reply-sender {
    font-weight: 700;
    color: var(--primary);
    margin-right: 5px;
}

.message.own .reply-to {
    background: rgba(255,255,255,0.1);
}

.message.own .reply-to .reply-sender {
    color: var(--primary-light);
}

/* Message status with proper colors */
.message-status {
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.message-status i {
    font-size: 12px;
}

.message-status.sent i {
    color: var(--text-muted);
}

.message-status.delivered i {
    color: var(--text-muted);
}

.message-status.read i {
    color: var(--primary);
}

.message.own .message-status.read i {
    color: var(--primary-light);
}

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 320px;
    height: 250px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    padding: 12px;
    overflow-y: auto;
    z-index: 1000;
    margin-bottom: 10px;
    animation: slideUp 0.2s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.emoji-item {
    font-size: 22px;
    padding: 6px;
    text-align: center;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-item:hover {
    background: var(--bg-hover);
    transform: scale(1.2);
}

/* File Preview Improvements */
.file-preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.file-preview-item:hover {
    border-color: var(--primary);
    background: var(--bg-card);
}

.file-preview-item i {
    font-size: 24px;
    color: var(--primary);
}

.file-preview-item .name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-item .size {
    color: var(--text-muted);
    font-size: 12px;
    padding: 2px 8px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
}

.file-preview-item button {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.file-preview-item button:hover {
    background: rgba(179, 75, 75, 0.1);
    transform: rotate(90deg);
}

/* Image Preview Modal */
.image-preview-modal {
    max-width: 90vw;
    max-height: 90vh;
}

.image-preview-body {
    align-items: center;
    justify-content: center;
    padding: 20px !important;
    min-height: 400px;
}

.image-preview {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.image-preview-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 2px solid var(--border);
    justify-content: flex-end;
    width: 100%;
}

/* Chat Input Improvements */
.chat-input-wrapper {
    position: relative;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--primary);
    transform: scale(1.05);
}

.btn-send {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.btn-send:hover {
    transform: scale(1.05) rotate(-5deg);
    box-shadow: var(--shadow-md);
}

/* Message Image */
.message-image {
    max-width: 300px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.message-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    transition: all 0.2s ease;
}

.message-image img:hover {
    transform: scale(1.02);
    border-color: var(--primary);
}

.message-image .message-text {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Message File */
.message-file {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    background: var(--bg-hover);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    min-width: 250px;
    transition: all 0.2s ease;
}

.message-file:hover {
    border-color: var(--primary);
    background: var(--bg-card);
}

.message-file i {
    font-size: 32px;
    color: var(--primary);
}

.message.own .message-file {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.message.own .message-file i {
    color: white;
}

.message-file .file-info {
    flex: 1;
    min-width: 0;
}

.message-file .file-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message.own .file-name {
    color: white;
}

.message-file .file-size {
    font-size: 11px;
    color: var(--text-muted);
}

.message.own .file-size {
    color: rgba(255, 255, 255, 0.7);
}

.message-file .btn-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.message-file .btn-icon:hover {
    background: var(--primary);
    color: white;
}

/* Message Footer */
.message-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    min-height: 18px;
}

/* Active chat room highlight */
.chat-room-item.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    position: relative;
}

.chat-room-item.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: white;
    border-radius: var(--radius-full);
}

/* Unread badge animation */
.unread-badge {
    animation: pulse 2s infinite;
}

/* Scrollbar for emoji picker */
.emoji-picker::-webkit-scrollbar {
    width: 4px;
}

.emoji-picker::-webkit-scrollbar-track {
    background: var(--bg-hover);
}

.emoji-picker::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}


/* =============== CHAT SYSTEM - ENHANCED =============== */
.chat-view {
    height: 100%;
    overflow: hidden; /* Chat view sendiri harus hidden karena pakai internal scroll */
    display: flex;
    flex-direction: column;
}

.chat-container {
    display: flex;
    height: 100%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden; /* Container chat harus hidden */
    flex: 1;
}

.chat-sidebar {
    width: 350px;
    border-right: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    background: var(--bg-hover);
    height: 100%;
    overflow: hidden; /* Sidebar pakai internal scroll */
}

.chat-rooms-list {
    flex: 1;
    overflow-y: auto; /* INI PENTING - biar daftar chat bisa di-scroll */
    padding: 0 8px;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    height: 100%;
    overflow: hidden; /* Main chat area pakai internal scroll */
}

.chat-room {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden; /* Room container hidden */
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto; /* INI PENTING - biar pesan bisa di-scroll */
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--border);
}

.chat-sidebar-header h3 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.chat-sidebar-header h3 i {
    color: var(--primary);
}

.chat-search {
    padding: 16px 20px;
    position: relative;
}

.chat-search i {
    position: absolute;
    left: 35px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 16px;
}

.chat-search input {
    width: 100%;
    padding: 12px 16px 12px 45px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.chat-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(181, 139, 91, 0.15);
}

.friend-requests-badge {
    margin: 0 20px 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(181, 139, 91, 0.1), rgba(45, 90, 76, 0.1));
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.friend-requests-badge:hover {
    background: linear-gradient(135deg, rgba(181, 139, 91, 0.2), rgba(45, 90, 76, 0.2));
    border-color: var(--primary);
    transform: translateY(-2px);
}

.friend-requests-badge i {
    color: var(--warning);
    font-size: 18px;
}

.friend-requests-badge span {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.friend-requests-badge .badge {
    background: var(--danger);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
}

.chat-rooms-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px;
}

.chat-room-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin: 4px 0;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-room-item:hover {
    background: var(--bg-hover);
}

.chat-room-item.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.chat-room-item.active .chat-room-name h4,
.chat-room-item.active .chat-time,
.chat-room-item.active .chat-last-message p {
    color: white;
}

.chat-room-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
    overflow: hidden;
}

.chat-room-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Kalau kamu butuh avatar kecil di tempat lain */
.chat-avatar-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

// Tambahkan di bagian style (dalam script.js)
const avatarStyle = document.createElement('style');
avatarStyle.textContent = `
    .chat-room-avatar img, 
    .chat-avatar-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }
    
    .chat-room-avatar {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: white;
        font-size: 24px;
    }
    
    .chat-room-avatar i {
        font-size: 24px;
        color: white;
    }
`;
document.head.appendChild(avatarStyle);



.chat-room-preview {
    flex: 1;
    min-width: 0;
}

.chat-room-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.chat-room-name h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time {
    font-size: 11px;
    color: var(--text-muted);
}

.chat-last-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-last-message p {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.unread-badge {
    background: var(--primary);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
}

.chat-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.chat-placeholder i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.chat-placeholder h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.chat-placeholder p {
    font-size: 14px;
}

.chat-room {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-room-header {
    padding: 16px 20px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-hover);
}

.chat-room-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-room-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
}

.chat-room-details h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.chat-room-status {
    font-size: 12px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-room-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
}

.chat-room-actions {
    display: flex;
    gap: 8px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    display: flex;
    gap: 10px;
    max-width: 70%;
}

.message.own {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.message-sender {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.message-time {
    font-size: 10px;
    color: var(--text-muted);
}

.message-text {
    background: var(--bg-hover);
    padding: 10px 14px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
    word-wrap: break-word;
}

.message.own .message-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.message-image {
    max-width: 300px;
}

.message-image img {
    width: 100%;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 2px solid var(--border);
}

.message-image .message-text {
    margin-top: 8px;
}

.message-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
}

.message.own .message-file {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.message-file i {
    font-size: 24px;
    color: var(--primary);
}

.message.own .message-file i {
    color: white;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message.own .file-name {
    color: white;
}

.file-size {
    font-size: 11px;
    color: var(--text-muted);
}

.message.own .file-size {
    color: rgba(255, 255, 255, 0.8);
}

.message-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    min-height: 18px;
}

.message-status {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.message-status i {
    font-size: 12px;
}

.message-status.sent i {
    color: var(--text-muted);
}

.message-status.delivered {
    color: var(--text-muted);
}

.message-status.delivered i {
    color: var(--text-muted);
}

.message-status.read {
    color: var(--primary);
}

.message-status.read i {
    color: var(--primary);
}

.message.own .message-status.read {
    color: var(--primary-light);
}

.message.own .message-status.read i {
    color: var(--primary-light);
}

.chat-input-area {
    padding: 16px 20px;
    border-top: 2px solid var(--border);
    background: var(--bg-hover);
}

.chat-typing-indicator {
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-dots {
    display: inline-flex;
    gap: 2px;
}

.typing-dots span {
    animation: typingDot 1.4s infinite;
    opacity: 0;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0; }
    30% { opacity: 1; }
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px 12px;
}

.chat-input-wrapper textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    resize: none;
    max-height: 100px;
    padding: 8px 0;
    outline: none;
    font-family: inherit;
}

.btn-send {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-send:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.btn-send i {
    font-size: 16px;
}

.user-search-results {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
}

.search-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.search-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 2px solid var(--border);
}

.search-result-item:last-child {
    border-bottom: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info i {
    font-size: 32px;
    color: var(--primary);
}

.user-info div {
    display: flex;
    flex-direction: column;
}

.user-info strong {
    font-size: 14px;
    color: var(--text-primary);
}

.user-info small {
    font-size: 12px;
    color: var(--text-muted);
}

.friend-requests-list {
    max-height: 400px;
    overflow-y: auto;
}

.friend-request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 2px solid var(--border);
}

.friend-request-item:last-child {
    border-bottom: none;
}

.request-actions {
    display: flex;
    gap: 8px;
}

.room-info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 2px solid var(--border);
}

.room-info-item:last-child {
    border-bottom: none;
}

.room-info-item .label {
    color: var(--text-secondary);
    font-size: 13px;
}

.room-info-item .value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 13px;
}

.room-info-item hr {
    border: none;
    border-top: 2px solid var(--border);
    margin: 12px 0;
}

.context-menu {
    position: absolute;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 4px;
    z-index: 1000;
}

.menu-item {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.menu-item:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.menu-item i {
    font-size: 14px;
    width: 16px;
    color: var(--text-secondary);
}

.menu-item:hover i {
    color: var(--primary);
}

.back-button {
    margin-right: 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-button:hover {
    background: var(--bg-hover);
    color: var(--primary);
    transform: translateX(-2px);
}

.close-button:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.chat-room-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Profile picture preview in modal */
.profile-picture-preview {
    text-align: center;
    margin-bottom: 20px;
}

.profile-picture-preview i {
    font-size: 80px;
    color: var(--text-muted);
}

.profile-picture-preview img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

/* =============== ADDITIONAL CHAT STYLES FOR EDIT/DELETE/REPLY =============== */

/* Edited indicator */
.edited-indicator {
    font-size: 10px;
    opacity: 0.7;
    margin-left: 4px;
    font-style: italic;
    color: var(--text-muted);
}

.message.own .edited-indicator {
    color: rgba(255, 255, 255, 0.7);
}

/* Edit message input */
.edit-message-input {
    width: 100%;
    padding: 8px;
    background: var(--bg-input);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    resize: none;
    outline: none;
}

.edit-message-input:focus {
    box-shadow: 0 0 0 3px rgba(181, 139, 91, 0.3);
}

/* Message highlight animation */
.message.highlight {
    animation: highlightPulse 2s ease;
}

@keyframes highlightPulse {
    0%, 100% { 
        background: transparent; 
        box-shadow: none;
    }
    50% { 
        background: rgba(181, 139, 91, 0.2);
        box-shadow: 0 0 0 2px var(--primary);
        border-radius: var(--radius-lg);
    }
}

/* Reply to message clickable */
.reply-to {
    cursor: pointer;
    transition: all 0.2s ease;
}

.reply-to:hover {
    opacity: 0.8;
    text-decoration: underline;
    background: rgba(181, 139, 91, 0.1);
}

/* Chat room status online/offline with proper colors */
.chat-room-status.online {
    color: var(--success);
}

.chat-room-status.online::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
    box-shadow: 0 0 10px var(--success);
    animation: pulse 2s infinite;
}

.chat-room-status.offline {
    color: var(--text-muted);
}

.chat-room-status.offline::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

/* Message status colors */
.message-status.read i {
    color: var(--primary);
}

.message-status.delivered i {
    color: var(--text-muted);
}

.message-status.sent i {
    color: var(--text-muted);
}

.message.own .message-status.read i {
    color: var(--primary-light);
}

/* Disabled button state */
.btn-icon.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-icon.disabled:hover {
    background: transparent;
    color: var(--text-secondary);
    transform: none;
}

/* Message actions positioning improvement */
.message-actions {
    position: absolute;
    top: -20px;
    right: 0;
    display: none;
    gap: 5px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 4px;
    box-shadow: var(--shadow-md);
    z-index: 100;
}

.message:hover .message-actions {
    display: flex;
}

.message-actions .action-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
}

.message-actions .action-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Delete button specific hover */
.message-actions .action-btn:last-child:hover {
    background: var(--danger);
}

/* Edit button specific hover */
.message-actions .action-btn:nth-child(2):hover {
    background: var(--warning);
}

/* Reply preview enhancement */
.reply-preview {
    background: var(--bg-hover);
    border-left: 4px solid var(--primary);
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    border: 1px solid var(--border);
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reply-preview .reply-info {
    flex: 1;
    overflow: hidden;
}

.reply-preview .reply-sender {
    font-weight: 700;
    color: var(--primary);
    margin-right: 5px;
}

.reply-preview .reply-message {
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reply-preview .cancel-reply {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 5px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.reply-preview .cancel-reply:hover {
    background: rgba(179, 75, 75, 0.1);
    transform: scale(1.1) rotate(90deg);
}

/* =============== UTILITIES =============== */
.text-center {
    text-align: center;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #1e4b2e);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 122, 75, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #b3862d);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 156, 71, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #8f3b3b);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(179, 75, 75, 0.3);
}

.glassmorphism {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border);
}

/* =============== RAMADAN GREETING =============== */
.ramadan-greeting {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 15px 25px;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    animation: slideInGreeting 0.5s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.ramadan-greeting i {
    font-size: 24px;
    animation: starTwinkle 2s infinite;
}

@keyframes slideInGreeting {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes starTwinkle {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* =============== ANIMATIONS =============== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* =============== TOGGLE SWITCH =============== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: .3s;
    border-radius: 34px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.toggle-switch input:checked + label {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.toggle-switch input:checked + label:before {
    transform: translateX(26px);
}

.toggle-switch input:focus + label {
    box-shadow: 0 0 1px var(--primary);
}

/* Settings page styles */
.settings-view {
    height: 100%;
    padding: 20px;
}

.settings-header {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 20px 28px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-header h3 {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.settings-header h3 i {
    color: var(--primary);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.settings-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    transition: all 0.3s ease;
}

.settings-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.settings-card h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.settings-card h4 i {
    color: var(--primary);
}

.system-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.info-row .label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.info-row .value {
    color: var(--text-primary);
    font-weight: 600;
}

.backup-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.backup-actions button {
    flex: 1;
}

.status-badge.waiting_approval {
    background: rgba(201, 156, 71, 0.15);
    color: var(--warning);
    border: 1px solid var(--warning);
}

/* =============== ADDITIONAL RAMADHAN ELEMENTS =============== */
.moon-phase {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    box-shadow: 0 0 30px var(--primary);
    opacity: 0.15;
    z-index: 1;
}

.moon-phase::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 5px;
    width: 35px;
    height: 35px;
    background: var(--bg-primary);
    border-radius: 50%;
    opacity: 0.8;
}

.star {
    position: fixed;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

.star:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.star:nth-child(2) { top: 15%; right: 8%; animation-delay: 0.5s; }
.star:nth-child(3) { bottom: 20%; left: 10%; animation-delay: 1s; }
.star:nth-child(4) { bottom: 25%; right: 15%; animation-delay: 1.5s; }
.star:nth-child(5) { top: 30%; left: 20%; animation-delay: 2s; }
.star:nth-child(6) { top: 40%; right: 25%; animation-delay: 2.5s; }
.star:nth-child(7) { bottom: 40%; left: 30%; animation-delay: 3s; }
.star:nth-child(8) { bottom: 50%; right: 35%; animation-delay: 3.5s; }