/* ========== RESET & VARIABLES ========== */
:root {
    --primary: #6C5CE7;
    --primary-dark: #5B4DEE;
    --primary-light: #A29BFE;
    --success: #1DD1A1;
    --warning: #FECA57;
    --danger: #FF6B6B;
    --info: #48DBFB;
    --bg: #F5F6FA;
    --sidebar-bg: #1E1E2D;
    --sidebar-hover: #2A2A3D;
    --card-bg: #FFFFFF;
    --text: #2D3436;
    --text-light: #636E72;
    --border: #E0E0E0;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ========== LOGIN PAGE ========== */
.login-page {
    background: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}
.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    text-align: center;
}
.login-logo {
    width: auto;
    height: auto;
    background: none !important;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}
.login-logo-img {
    max-height: 35px;
    width: auto;
}
.login-logo-area {
    text-align: center;
    margin-bottom: 10px;
}

.logo-vertical {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}
.logo-img-big {
    max-height: 40px;
    width: auto;
}

.login-logo i { font-size: 32px; color: #fff; }
.login-header h1 span { 
color: var(--primary); 
}
.login-header p {
    color: var(--text-light);
    margin-top: 5px;
    font-size: 14px;
}
.login-form { margin-top: 25px; text-align: left; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 14px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: #FAFAFA;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(108,92,231,0.1);
}
.password-wrapper { position: relative; }
.toggle-password {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--text-light);
}
.btn-login {
    width: 100%; padding: 14px;
    background: var(--primary);
    color: #fff; border: none; border-radius: 10px;
    font-size: 16px; font-weight: 600; cursor: pointer;
    transition: var(--transition); margin-top: 10px;
}
.btn-login:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 15px rgba(108,92,231,0.3); }
.login-footer { margin-top: 25px; font-size: 12px; color: var(--text-light); }

/* ========== APP LAYOUT ========== */
.app-container { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: 260px; background: var(--sidebar-bg);
    color: #fff; display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
    transition: var(--transition);
}
.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-header h1 span { 
color: var(--primary); 
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-img {
    max-height: 35px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1); /* Membuat logo putih jika background sidebar gelap */
}

.logo i { font-size: 24px; color: var(--primary-light); }
.logo-highlight { color: var(--primary-light); }
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}
.sidebar-nav { flex: 1; padding: 15px 10px; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 15px; border-radius: 10px;
    color: #B0B0C0; text-decoration: none;
    transition: var(--transition); margin-bottom: 4px;
    font-weight: 500; font-size: 14px;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item i { width: 20px; text-align: center; }
.sidebar-footer {
    padding: 15px; border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; gap: 10px;
}
.user-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--primary); display: flex;
    align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.user-details { flex: 1; min-width: 0; }
.user-details strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: #888; }
.logout-btn { color: #ff6b6b; font-size: 18px; padding: 8px; border-radius: 8px; transition: var(--transition); }
.logout-btn:hover { background: rgba(255,107,107,0.15); }

/* Main Content */
.main-content { flex: 1; margin-left: 260px; transition: var(--transition); }
.topbar {
    background: #fff;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
}
.menu-btn { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); }
.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}
.notification-bell { position: relative; cursor: pointer; font-size: 18px; color: var(--text-light); }
.notification-bell .badge {
    position: absolute; top: -6px; right: -8px;
    background: var(--danger); color: #fff; font-size: 10px;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.current-time { font-size: 13px; color: var(--text-light); }
.content-wrapper { padding: 25px; }

/* Sidebar Overlay */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }

/* ========== COMPONENTS ========== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}
.card-header {
    padding: 18px 20px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h3, .card-header h4 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; }

.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 18px; border-radius: 8px;
    font-weight: 500; font-size: 14px; cursor: pointer;
    transition: var(--transition); text-decoration: none;
    border: none; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-text { background: none; color: var(--primary); padding: 6px 0; }
.btn-link { color: var(--primary); text-decoration: none; font-size: 13px; font-weight: 500; }

/* Alert */
.alert {
    padding: 15px 20px; border-radius: 10px; margin-bottom: 20px;
    font-size: 14px; display: flex; align-items: center; gap: 10px;
}
.alert-success { background: #D4EDDA; color: #155724; border-left: 4px solid #28A745; }
.alert-error { background: #F8D7DA; color: #721C24; border-left: 4px solid #DC3545; }

/* Status & Priority Badges */
.status, .priority {
    display: inline-block; padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
}
.status-open { background: #FFE0E0; color: #D63031; }
.status-in-progress { background: #FFF3CD; color: #856404; }
.status-resolved { background: #D1ECF1; color: #0C5460; }
.status-closed { background: #D4EDDA; color: #155724; }
.priority-low { background: #E8F5E9; color: #2E7D32; }
.priority-medium { background: #FFF3E0; color: #E65100; }
.priority-high { background: #FCE4EC; color: #C62828; }
.priority-critical { background: #FFEBEE; color: #B71C1C; border: 1px solid #C62828; }
.badge-category {
    display: inline-block; padding: 4px 10px; border-radius: 20px;
    font-size: 11px; background: #F0F0F0; color: #555;
}

/* Table */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background: #FAFAFA; font-weight: 600; color: var(--text-light); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.table tbody tr { transition: var(--transition); }
.table tbody tr:hover { background: #F8F9FF; }
.text-center { text-align: center; }

/* ========== DASHBOARD ========== */
.welcome-section {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 25px; flex-wrap: wrap; gap: 15px;
}
.welcome-section h2 { font-size: 22px; }
.welcome-section p { color: var(--text-light); margin-top: 4px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin-bottom: 25px; }
.stat-card {
    background: #fff; border-radius: var(--radius); padding: 20px;
    display: flex; align-items: center; gap: 15px;
    box-shadow: var(--shadow); transition: var(--transition);
    border-left: 4px solid var(--primary);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card.total { border-left-color: var(--primary); }
.stat-card.open { border-left-color: var(--danger); }
.stat-card.progress { border-left-color: var(--warning); }
.stat-card.resolved { border-left-color: var(--info); }
.stat-card.closed { border-left-color: var(--success); }
.stat-icon {
    width: 50px; height: 50px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.stat-card.total .stat-icon { background: #F0ECFF; color: var(--primary); }
.stat-card.open .stat-icon { background: #FFE8E8; color: var(--danger); }
.stat-card.progress .stat-icon { background: #FFF8E1; color: #F59E0B; }
.stat-card.resolved .stat-icon { background: #E0F7FA; color: var(--info); }
.stat-card.closed .stat-icon { background: #E8F5E9; color: var(--success); }
.stat-number { font-size: 28px; font-weight: 700; display: block; }
.stat-label { font-size: 13px; color: var(--text-light); }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.chart-card .card-body { position: relative; }
.chart-card canvas { max-height: 300px; }

/* ========== TICKET FORM ========== */
.ticket-form .form-row { margin-bottom: 15px; }
.ticket-form .form-row.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.required { color: var(--danger); }
.file-upload-area { border: 2px dashed var(--border); border-radius: 10px; padding: 25px; text-align: center; cursor: pointer; transition: var(--transition); }
.file-upload-area:hover, .file-upload-area.dragover { border-color: var(--primary); background: #F8F7FF; }
.file-upload-content i { font-size: 36px; color: var(--primary-light); margin-bottom: 10px; }
.file-upload-content p { font-weight: 500; }
.file-upload-content span { font-size: 12px; color: var(--text-light); }
.file-list { margin-top: 15px; text-align: left; }
.file-item { padding: 8px 12px; background: #F5F5F5; border-radius: 6px; margin-bottom: 5px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.file-item span { color: var(--text-light); font-size: 11px; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ========== VIEW TICKET ========== */
.ticket-info-grid { display: grid; grid-template-columns: 1fr 280px; gap: 20px; }
.ticket-main h3 { font-size: 20px; margin-bottom: 10px; }
.ticket-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.ticket-description { background: #F8F9FA; padding: 15px; border-radius: 8px; margin-top: 15px; }
.ticket-description strong { display: block; margin-bottom: 8px; }
.ticket-sidebar { background: #FAFAFA; padding: 15px; border-radius: 8px; }
.info-item { padding: 8px 0; border-bottom: 1px solid #eee; font-size: 13px; }
.info-item:last-child { border-bottom: none; }
.admin-actions { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }
.form-select-sm { padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border); font-size: 13px; }

.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 15px; background: #F5F5F5; border-radius: 8px;
    text-decoration: none; color: var(--text); font-size: 13px;
    transition: var(--transition);
}
.attachment-item:hover { background: #EBEBFF; color: var(--primary); }
.attachment-item small { color: var(--text-light); }

/* ========== CHAT ========== */
.chat-card { display: flex; flex-direction: column; }
.chat-body { flex: 1; max-height: 450px; overflow-y: auto; padding: 15px 20px; background: #FAFBFC; }
.chat-messages { display: flex; flex-direction: column; gap: 12px; }
.chat-message { display: flex; gap: 10px; max-width: 80%; }
.chat-message.user-msg { align-self: flex-end; flex-direction: row-reverse; }
.chat-message.admin-msg { align-self: flex-start; }
.message-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
}
.user-msg .message-avatar { background: var(--primary); color: #fff; }
.admin-msg .message-avatar { background: #FF6B6B; color: #fff; }
.message-content { max-width: 100%; }
.message-header { margin-bottom: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.message-header strong { font-size: 13px; }
.message-header small { font-size: 11px; color: var(--text-light); }
.admin-badge { font-size: 10px; background: #FF6B6B; color: #fff; padding: 2px 6px; border-radius: 10px; }
.user-msg .message-content { text-align: right; }
.message-text {
    padding: 10px 14px; border-radius: 15px;
    font-size: 14px; line-height: 1.5; word-break: break-word;
}
.user-msg .message-text { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.admin-msg .message-text { background: #fff; border: 1px solid #E0E0E0; border-bottom-left-radius: 4px; }
.chat-empty { text-align: center; color: var(--text-light); padding: 30px; }
.chat-input-area { padding: 15px 20px; border-top: 1px solid var(--border); background: #fff; }
.chat-input-wrapper { display: flex; gap: 10px; align-items: flex-end; }
.chat-input-wrapper textarea {
    flex: 1; padding: 12px 15px; border: 2px solid var(--border);
    border-radius: 25px; font-family: inherit; font-size: 14px;
    resize: none; max-height: 120px; transition: var(--transition);
}
.chat-input-wrapper textarea:focus { outline: none; border-color: var(--primary); }
.btn-send {
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    padding: 0; flex-shrink: 0;
}
.chat-closed-notice { text-align: center; padding: 15px; background: #FFF3CD; color: #856404; font-size: 13px; }

/* ========== FILTER ========== */
.filter-card { margin-bottom: 20px; }
.filter-form .filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-box { position: relative; flex: 1; min-width: 200px; }
.search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-light); }
.search-box input { width: 100%; padding: 10px 15px 10px 35px; border: 2px solid var(--border); border-radius: 8px; font-size: 14px; }
.search-box input:focus { outline: none; border-color: var(--primary); }
.filter-form select { padding: 10px 15px; border: 2px solid var(--border); border-radius: 8px; font-size: 14px; background: #fff; }

/* ========== PAGE HEADER ========== */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.page-header h2 { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.ticket-count { font-size: 14px; color: var(--text-light); background: #F0F0F0; padding: 6px 14px; border-radius: 20px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .ticket-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { left: -280px; }
    .sidebar.open { left: 0; }
    .sidebar-overlay.active { display: block; }
    .main-content { margin-left: 0; }
    .menu-btn { display: block; }
    .sidebar-toggle { display: block; }
    .ticket-form .form-row.two-cols { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
    .content-wrapper { padding: 15px; }
    .chat-message { max-width: 95%; }
}
@media (max-width: 480px) {
    .login-card { padding: 25px; }
    .welcome-section { flex-direction: column; align-items: flex-start; }
    .filter-form .filter-row { flex-direction: column; }
    .search-box { width: 100%; }
}

/* ========== MANAGE USERS ========== */
.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.role-admin {
    background: #FFF3CD;
    color: #856404;
}
.role-user {
    background: #D1ECF1;
    color: #0C5460;
}
.action-buttons {
    display: flex;
    gap: 5px;
}
.btn-danger {
    color: var(--danger) !important;
    border-color: var(--danger) !important;
}
.btn-danger:hover {
    background: #FFF5F5 !important;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal.active {
    display: flex;
}
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
}
.modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.3s ease;
    z-index: 1;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    z-index: 2;
}
.modal-header h3 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.modal-close:hover {
    background: #F5F5F5;
    color: var(--text);
}
.modal-body {
    padding: 25px;
}

/* ========== TOAST ========== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    border-radius: 12px;
    color: #fff;
    font-weight: 500;
    z-index: 9999;
    transform: translateY(120px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    max-width: 400px;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}
.toast-success {
    background: #10B981;
}
.toast-error {
    background: #EF4444;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}
.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}
.empty-state p {
    font-size: 15px;
}

/* ========== SPINNER ========== */
.fa-spin {
    animation: fa-spin 1s infinite linear;
}
@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== NOTIFICATION DROPDOWN ========== */
.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-light);
    padding: 8px;
    border-radius: 10px;
    transition: var(--transition);
    z-index: 1001; /* Tambahkan ini */
}
.notification-bell:hover {
    background: #F5F5F5;
    color: var(--text);
}
.notification-bell .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #EF4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
    line-height: 1;
    z-index: 2;
}
.notification-bell .badge.pulse {
    animation: badgePulse 0.3s ease;
}
@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Dropdown - PERBAIKI BAGIAN INI */
.notification-dropdown {
    display: none;
    position: fixed; /* GANTI DARI absolute KE fixed */
    top: 65px; /* Sesuaikan dengan tinggi topbar */
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    max-height: 500px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
    z-index: 9999; /* NAIKKAN Z-INDEX */
    overflow: hidden;
    animation: dropdownIn 0.25s ease;
}
.notification-dropdown.show {
    display: block;
}
@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header dropdown */
.notif-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 16px 16px 0 0;
}
.notif-header h4 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.notif-count {
    font-size: 12px;
    background: #EF4444;
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* List notifikasi */
.notif-list {
    max-height: 350px;
    overflow-y: auto;
}
.notif-list::-webkit-scrollbar {
    width: 4px;
}
.notif-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    border-bottom: 1px solid #f5f5f5;
    position: relative;
}
.notif-item:hover {
    background: #F8F9FF;
}
.notif-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.notif-content {
    flex: 1;
    min-width: 0;
}
.notif-message {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--text);
}
.notif-detail {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-time {
    font-size: 11px;
    color: #aaa;
}
.notif-dot {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #EF4444;
    flex-shrink: 0;
}

/* Empty state */
.notif-empty {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
}
.notif-empty i {
    font-size: 40px;
    margin-bottom: 10px;
}
.notif-empty p {
    font-size: 14px;
}

/* Footer */
.notif-footer {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    text-align: center;
    background: #fff;
}
.notif-footer a {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.notif-footer a:hover {
    text-decoration: underline;
}

/* ========== RESPONSIVE DROPDOWN ========== */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 340px;
        right: 10px;
        top: 60px;
    }
}
@media (max-width: 480px) {
    .notification-dropdown {
        width: calc(100vw - 20px);
        right: 10px;
        left: 10px;
        top: 60px;
        max-width: none;
    }
	

}

/* ========== KNOWLEDGE BASE ========== */
.kb-search-section { margin-bottom: 25px; }
.kb-search-box {
    display: flex; gap: 10px; max-width: 600px;
    background: #fff; padding: 8px; border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.kb-search-box i { padding: 12px; color: var(--text-light); }
.kb-search-box input {
    flex: 1; border: none; font-size: 15px; outline: none;
}
.kb-search-box .btn { flex-shrink: 0; }

.kb-layout { display: grid; grid-template-columns: 1fr 320px; gap: 25px; }
.kb-categories { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.kb-cat-item {
    padding: 8px 16px; border-radius: 20px; background: #f0f0f0;
    font-size: 13px; font-weight: 500; text-decoration: none; color: var(--text);
    transition: var(--transition);
}
.kb-cat-item:hover, .kb-cat-item.active { background: var(--primary); color: #fff; }

.kb-articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.kb-article-card {
    background: #fff; border-radius: var(--radius); padding: 20px;
    box-shadow: var(--shadow); text-decoration: none; color: var(--text);
    transition: var(--transition); display: block; border: 2px solid transparent;
}
.kb-article-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kb-article-card h3 { font-size: 16px; margin: 8px 0; line-height: 1.4; }
.kb-article-card p { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }
.kb-article-category {
    display: inline-block; padding: 3px 10px; border-radius: 12px;
    font-size: 11px; font-weight: 600; background: #F0ECFF; color: var(--primary);
}
.kb-article-meta { display: flex; gap: 12px; font-size: 11px; color: #aaa; flex-wrap: wrap; }

.kb-sidebar-card {
    background: #fff; border-radius: var(--radius); padding: 20px;
    box-shadow: var(--shadow); margin-bottom: 20px;
}
.kb-sidebar-card h4 { font-size: 15px; margin-bottom: 12px; }
.kb-popular-list { list-style: none; }
.kb-popular-list li { margin-bottom: 10px; }
.kb-popular-list a { text-decoration: none; color: var(--text); font-size: 14px; display: block; }
.kb-popular-list a:hover { color: var(--primary); }
.kb-popular-list small { color: #aaa; font-size: 11px; }

.kb-pagination { display: flex; gap: 6px; margin-top: 25px; justify-content: center; }
.page-link {
    width: 36px; height: 36px; border-radius: 8px; display: flex;
    align-items: center; justify-content: center; text-decoration: none;
    background: #f0f0f0; color: var(--text); font-weight: 500; font-size: 14px;
}
.page-link.active { background: var(--primary); color: #fff; }

.kb-empty { text-align: center; padding: 60px 20px; }
.kb-empty i { font-size: 50px; color: #ccc; margin-bottom: 15px; }

/* View Article */
.article-breadcrumb { margin-bottom: 20px; font-size: 14px; }
.article-breadcrumb a { color: var(--primary); text-decoration: none; }
.article-breadcrumb i { margin: 0 8px; color: #ccc; font-size: 10px; }
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 25px; }
.article-card { background: #fff; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.article-header { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.article-header h1 { font-size: 24px; margin: 10px 0; }
.article-meta { display: flex; gap: 15px; font-size: 13px; color: #888; flex-wrap: wrap; }
.article-content { line-height: 1.8; font-size: 15px; }
.article-content h3 { margin: 20px 0 10px; }
.article-content ol, .article-content ul { margin: 10px 0; padding-left: 25px; }
.article-content li { margin-bottom: 8px; }
.article-content img { max-width: 100%; border-radius: 8px; }

.article-feedback {
    margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee;
    text-align: center;
}
.feedback-buttons { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.btn-feedback {
    padding: 10px 20px; border-radius: 8px; border: 2px solid #e0e0e0;
    background: #fff; cursor: pointer; transition: var(--transition);
}
.btn-feedback:hover { border-color: var(--primary); }
.btn-feedback.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.article-sidebar-card {
    background: #fff; border-radius: var(--radius); padding: 20px;
    box-shadow: var(--shadow); margin-bottom: 20px;
}
.related-list { list-style: none; }
.related-list li { margin-bottom: 8px; }
.related-list a { text-decoration: none; color: var(--primary); font-size: 14px; }
.related-list a:hover { text-decoration: underline; }

.btn-block { display: block; width: 100%; text-align: center; }

@media (max-width: 768px) {
    .kb-layout, .article-layout { grid-template-columns: 1fr; }
    .kb-articles-grid { grid-template-columns: 1fr; }
}

/* Untuk halaman publik, body tanpa background abu */
body.public-page {
    background: #f5f6fa;
}
.public-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}