﻿/* ========== RESET & VARIABLES ========== */
:root {
    --primary-blue: #002B95;
    --primary-dark: #001f6d;
    --primary-light: #e8edff;
    --secondary-blue: #eef2ff;
    --accent-green: #10b981;
    --accent-orange: #F9A826;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-thin: #e2e8f0;
    --border-radius: 16px;
    --border-radius-xl: 24px;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --text-light: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.08);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.02);
    --sidebar-wide: 280px;
    --sidebar-narrow: 72px;
    
    --theme-sidebar-bg: linear-gradient(180deg, #002B95 0%, #001f6d 100%);
    --theme-sidebar-text: #ffffff;
    --theme-primary: #002B95;
    --theme-accent: #10b981;
    --theme-header-bg: #ffffff;
    --theme-body-bg: #f8fafc;
    --theme-welcome-bg: linear-gradient(135deg, #002B95, #1e40af);
    --theme-stat-bg: #ffffff;
    --theme-reminder-bg: linear-gradient(135deg, #fffbeb, #fef3c7);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Inter', sans-serif; 
    background: var(--theme-body-bg);
    color: var(--text-dark); 
    overflow-x: hidden; 
}

.container { display: flex; min-height: 100vh; }

/* ========== SIDEBAR UTAMA ========== */
.sidebar {
    width: var(--sidebar-narrow);
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: width 0.25s ease;
    overflow-x: hidden;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
    background: var(--theme-sidebar-bg);
}

.sidebar:hover { width: var(--sidebar-wide); }

.sidebar .logo { 
    padding: 24px 20px; 
    border-bottom: 1px solid rgba(255,255,255,0.15); 
    margin-bottom: 20px; 
}

.sidebar .logo h3 { 
    font-size: 1rem; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    color: var(--theme-sidebar-text);
}

.sidebar .logo h3 i { font-size: 1.4rem; min-width: 28px; }
.sidebar .logo h3 span { opacity: 0; transition: opacity 0.2s; font-weight: 700; }
.sidebar:hover .logo h3 span { opacity: 1; }

.sidebar ul { list-style: none; flex: 1; }

.menu-item { margin: 4px 12px; }

.menu-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--theme-sidebar-text);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s;
    font-weight: 500;
    opacity: 0.85;
}

.menu-item a i { min-width: 24px; font-size: 1.2rem; }
.menu-item a span { opacity: 0; transition: opacity 0.2s; font-size: 0.9rem; }
.sidebar:hover .menu-item a span { opacity: 1; }
.menu-item a:hover, .menu-item.active a { 
    background: rgba(255,255,255,0.15); 
    color: #fff; 
    opacity: 1;
    transform: translateX(4px); 
}

.sidebar-bottom-icons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 0 30px;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: auto;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    margin: 0 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--theme-sidebar-text);
    gap: 14px;
    opacity: 0.85;
}

.sidebar:hover .icon-btn { justify-content: flex-start; }
.icon-btn i { min-width: 24px; font-size: 1.2rem; }
.icon-btn span { opacity: 0; transition: opacity 0.2s; font-size: 0.9rem; }
.sidebar:hover .icon-btn span { opacity: 1; }
.icon-btn:hover { background: rgba(255,255,255,0.15); color: white; opacity: 1; transform: translateX(4px); }

/* ========== SUBMENU STYLES ========== */
.menu-parent {
    position: relative;
}

.submenu-icon {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.submenu {
    list-style: none;
    padding-left: 0;
    margin-left: 28px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;
    opacity: 0;
    display: block !important;
}

.submenu[style*="display: block"] {
    max-height: 500px;
    opacity: 1;
    margin-top: 8px;
    margin-bottom: 8px;
}

.submenu .menu-item {
    margin: 0;
    transform: translateX(-10px);
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0;
}

.submenu[style*="display: block"] .menu-item {
    transform: translateX(0);
    opacity: 1;
}

.submenu .menu-item:nth-child(1) { transition-delay: 0.02s; }
.submenu .menu-item:nth-child(2) { transition-delay: 0.04s; }
.submenu .menu-item:nth-child(3) { transition-delay: 0.06s; }
.submenu .menu-item:nth-child(4) { transition-delay: 0.08s; }
.submenu .menu-item:nth-child(5) { transition-delay: 0.10s; }
.submenu .menu-item:nth-child(6) { transition-delay: 0.12s; }
.submenu .menu-item:nth-child(7) { transition-delay: 0.14s; }
.submenu .menu-item:nth-child(8) { transition-delay: 0.16s; }
.submenu .menu-item:nth-child(9) { transition-delay: 0.18s; }
.submenu .menu-item:nth-child(10) { transition-delay: 0.20s; }

.submenu .menu-item a {
    padding: 10px 16px 10px 40px;
    font-size: 0.85rem;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.submenu .menu-item a:hover {
    opacity: 1;
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.1);
}

.submenu-item a i {
    font-size: 0.8rem;
}

.menu-count {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 20px;
    margin-left: 6px;
}

/* ========== TOP BAR ========== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 32px;
    background: var(--theme-header-bg);
    border-bottom: 1px solid var(--border-thin);
    position: sticky;
    top: 0;
    z-index: 99;
}

.bell-icon {
    position: relative;
    cursor: pointer;
    background: var(--primary-light);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.bell-icon i { color: var(--theme-primary); font-size: 1.2rem; }
.bell-icon:hover { transform: scale(1.05); background: var(--secondary-blue); }

.bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-red);
    color: white;
    border-radius: 20px;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.main-logo { height: 32px; object-fit: contain; }

.hamburger-btn {
    display: none;
    cursor: pointer;
    background: var(--primary-light);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    color: var(--theme-primary);
    font-size: 1.1rem;
}
.hamburger-btn:hover { background: var(--secondary-blue); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.sidebar-overlay.show { display: block; opacity: 1; }
body.mobile-sidebar-open { overflow: hidden; }

/* ========== CONTENT ========== */
.content {
    margin-left: var(--sidebar-narrow);
    width: calc(100% - var(--sidebar-narrow));
}

.title-section { 
    padding: 24px 32px 16px 32px; 
    background: var(--theme-body-bg); 
}

.title-section h2 { 
    font-size: 1.5rem; 
    font-weight: 800; 
    border-left: 5px solid var(--theme-primary); 
    padding-left: 16px;
    background: linear-gradient(135deg, var(--primary-dark), var(--theme-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.content-main-padding { padding: 0 32px 32px 32px; }

/* ========== STATS CARDS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--theme-stat-bg);
    border-radius: 24px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border-thin);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-primary), var(--theme-accent));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.stat-card:hover::before { transform: scaleX(1); }
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -12px rgba(0,0,0,0.15); border-color: var(--theme-primary); }

.stat-card i { 
    font-size: 2rem; 
    color: var(--theme-primary); 
    background: linear-gradient(135deg, var(--primary-light), #e0e7ff);
    padding: 12px; 
    border-radius: 20px; 
    transition: all 0.3s;
}

.stat-card:hover i { transform: scale(1.05); background: var(--theme-primary); color: white; }

.stat-info h3 { 
    font-size: 1.75rem; 
    font-weight: 800; 
    color: var(--primary-dark);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-info p { 
    font-size: 0.75rem; 
    color: var(--text-gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== WELCOME CARD ========== */
.welcome-card {
    background: var(--theme-welcome-bg);
    border-radius: 24px;
    padding: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0,43,149,0.2);
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.welcome-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.welcome-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.welcome-card h3 i { font-size: 1.5rem; background: rgba(255,255,255,0.2); padding: 8px; border-radius: 16px; }
.welcome-card p { font-size: 0.85rem; opacity: 0.9; line-height: 1.5; position: relative; z-index: 1; }

/* ========== REMINDER CARD ========== */
.reminder-card {
    background: var(--theme-reminder-bg);
    border-radius: 24px;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--accent-orange);
    position: relative;
    overflow: hidden;
}

.reminder-card::after { content: '📢'; position: absolute; bottom: -15px; right: -15px; font-size: 80px; opacity: 0.1; pointer-events: none; }

.reminder-title { 
    font-size: 0.85rem; 
    font-weight: 700; 
    color: #92400e; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    margin-bottom: 12px; 
}

.reminder-title i { font-size: 1rem; background: #f59e0b; color: white; padding: 6px; border-radius: 12px; }

.reminder-badge { 
    background: linear-gradient(135deg, var(--accent-orange), #ea580c);
    color: white; 
    padding: 4px 12px; 
    border-radius: 30px; 
    font-size: 0.65rem; 
    font-weight: 600;
    letter-spacing: 0.5px;
}

.reminder-content { color: #78350f; font-size: 0.8rem; line-height: 1.6; }
.reminder-content p { margin: 8px 0; display: flex; align-items: center; gap: 8px; }
.reminder-content p i { font-size: 6px; color: #f59e0b; }

/* ========== MODULE GUIDE WRAPPER ========== */
#moduleGuideWrapper { width: 100%; }

.module-guide-wrapper {
    display: flex;
    gap: 0;
    min-height: 500px;
    background: white;
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--border-thin);
    overflow: hidden;
    position: relative;
}

.module-left-panel {
    width: 280px;
    background: white;
    border-right: 1px solid var(--border-thin);
    overflow-y: auto;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
}

.module-right-panel {
    flex: 1;
    background: white;
    overflow-y: auto;
    min-width: 0;
    height: auto;
    max-height: calc(100vh - 120px);
}

/* ========== RESIZER ========== */
.module-resizer {
    width: 8px;
    background: transparent;
    cursor: ew-resize;
    transition: background 0.2s;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.module-resizer:hover { background: rgba(0, 43, 149, 0.1); }

.module-resizer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 3px;
    width: 2px;
    height: 100%;
    background: var(--border-thin);
    transition: all 0.2s ease;
}

.module-resizer:hover::before {
    background: var(--theme-primary);
    width: 3px;
    left: 2.5px;
    box-shadow: 0 0 4px var(--theme-primary);
}

.module-resizer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 40px;
    background: var(--text-light);
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.module-resizer:hover::after {
    opacity: 0.5;
}

body.resizing { cursor: ew-resize; user-select: none; }

/* ========== ADMIN TABLE ========== */
.admin-table-modern {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.admin-table-modern th {
    background: var(--primary-light);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--theme-primary);
    border-bottom: 2px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
}

.admin-table-modern th:last-child {
    border-right: none;
}

.admin-table-modern td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    font-size: 0.8rem;
    vertical-align: middle;
    background-color: white;
}

.admin-table-modern td:last-child {
    border-right: none;
}

.admin-table-modern tr:hover td {
    background: #f8fafc;
}

/* Table Responsive */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    border-radius: 16px;
    margin-bottom: 16px;
}

.table-responsive table {
    min-width: 600px;
    width: 100%;
}

/* ========== ADMIN CARD HEADER ========== */
.admin-card {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-thin);
    overflow: hidden;
    margin-bottom: 20px;
}

.admin-card-header {
    padding: 16px 20px;
    background: var(--primary-light);
    border-bottom: 1px solid var(--border-thin);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-card-body { 
    padding: 20px; 
}

.admin-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
}

.admin-empty i { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }

/* ========== MODERN TOGGLE SWITCH ========== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 28px;
}
.toggle-switch-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.toggle-switch input:checked + .toggle-switch-slider {
    background: linear-gradient(135deg, #10b981, #059669);
}
.toggle-switch input:checked + .toggle-switch-slider:before {
    transform: translateX(22px);
}
.toggle-switch input:focus-visible + .toggle-switch-slider {
    box-shadow: 0 0 0 3px rgba(16,185,129,0.3);
}

/* ========== ADMIN BADGE ========== */
.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.admin-badge-active { background: #dcfce7; color: #166534; }
.admin-badge-inactive { background: #fee2e2; color: #991b1b; }

/* ========== PRODUCT MODULE STYLES ========== */
.product-modern-container, .troubleshoot-modern-container {
    display: flex;
    gap: 0;
    min-height: 600px;
    background: white;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    position: relative;
}

.product-sidebar-modern, .troubleshoot-sidebar-modern {
    width: 320px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
}

.product-search-modern, .troubleshoot-search-modern {
    padding: 16px;
    position: relative;
    border-bottom: 1px solid #e2e8f0;
    background: white;
}

.product-search-modern i, .troubleshoot-search-modern i {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
}

.product-search-input, .troubleshoot-search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    font-size: 13px;
    transition: all 0.2s;
}

.product-search-input:focus, .troubleshoot-search-input:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(0,43,149,0.1);
}

.product-category-list, .troubleshoot-category-list {
    padding: 8px;
}

.product-category-group, .troubleshoot-category-group {
    margin-bottom: 8px;
}

.product-category-header, .troubleshoot-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.product-category-header:hover, .troubleshoot-category-header:hover {
    transform: translateX(4px);
    border-color: var(--theme-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.product-category-header.active, .troubleshoot-category-header.active {
    background: var(--primary-light);
    border-color: var(--theme-primary);
}

.product-category-icon, .troubleshoot-category-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-light), #e0e7ff);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-primary);
    font-size: 20px;
}

.product-category-info, .troubleshoot-category-info {
    flex: 1;
}

.product-category-name, .troubleshoot-category-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
}

.product-category-count, .troubleshoot-category-count {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 2px;
}

.product-category-arrow, .troubleshoot-category-arrow {
    color: #94a3b8;
    transition: transform 0.2s;
}

.product-category-header.expanded .product-category-arrow,
.troubleshoot-category-header.expanded .troubleshoot-category-arrow {
    transform: rotate(90deg);
}

.product-subcategory-list, .troubleshoot-subcategory-list {
    margin-left: 20px;
    margin-top: 8px;
    padding-left: 16px;
    border-left: 2px solid #e2e8f0;
}

.product-subcategory-item, .troubleshoot-subcategory-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin: 4px 0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    color: #475569;
    position: relative;
}

.product-subcategory-item:hover, .troubleshoot-subcategory-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.product-subcategory-item.active, .troubleshoot-subcategory-item.active {
    background: var(--primary-light);
    color: var(--theme-primary);
    font-weight: 500;
}

.sub-active-icon {
    margin-left: auto;
    color: var(--theme-accent);
    font-size: 14px;
}

.product-content-modern, .troubleshoot-content-modern {
    flex: 1;
    background: white;
    overflow-y: auto;
    padding: 24px;
    max-height: calc(100vh - 120px);
}

.product-welcome-modern, .troubleshoot-welcome-modern {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 20px;
}

.welcome-icon {
    font-size: 64px;
    color: var(--theme-primary);
    margin-bottom: 20px;
}

.category-cover-modern {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 24px;
}

.category-cover-modern img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
}

.category-cover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 20px;
    color: white;
}

.category-header-modern {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.category-icon-large {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--theme-primary), var(--primary-dark));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
}

.subcategory-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.subcategory-card-modern {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.subcategory-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-primary), var(--theme-accent));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.subcategory-card-modern:hover::before {
    transform: scaleX(1);
}

.subcategory-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -12px rgba(0,0,0,0.15);
    border-color: var(--theme-primary);
}

.subcategory-card-modern .card-icon {
    font-size: 40px;
    color: var(--theme-primary);
    margin-bottom: 16px;
}

.subcategory-card-modern .card-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
}

.subcategory-card-modern .card-meta {
    font-size: 0.7rem;
    color: #64748b;
}

.subcategory-card-modern .card-arrow {
    position: absolute;
    bottom: 20px;
    right: 20px;
    opacity: 0;
    transition: all 0.2s;
}

.subcategory-card-modern:hover .card-arrow {
    opacity: 1;
    transform: translateX(4px);
}

.breadcrumb-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: #64748b;
}

.breadcrumb-modern span {
    cursor: pointer;
}

.breadcrumb-modern span:hover {
    color: var(--theme-primary);
}

.breadcrumb-modern .active {
    color: var(--theme-primary);
    font-weight: 600;
}

.subcategory-header-modern {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.subcategory-icon-large {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-light), #e0e7ff);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-primary);
    font-size: 28px;
}

.tabs-modern {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 4px;
}

.tab-modern {
    padding: 10px 24px;
    background: transparent;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    color: #64748b;
}

.tab-modern:hover {
    background: #f1f5f9;
    color: var(--theme-primary);
}

.tab-modern.active {
    background: var(--theme-primary);
    color: white;
}

.blocks-modern {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.empty-state-modern {
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border-radius: 20px;
}

.empty-state-modern i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.troubleshoot-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dcfce7;
    color: #166534;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.7rem;
    margin-top: 8px;
}

/* ========== TICKET MODULE STYLES ========== */
.ticket-content-area { padding: 16px; }
.ticket-list-container {
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    scroll-behavior: smooth;
}

.ticket-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    position: sticky;
    top: 0;
    background: white;
    z-index: 5;
}

.ticket-category-badge { display: flex; align-items: center; gap: 8px; background: var(--primary-light); padding: 6px 14px; border-radius: 40px; font-size: 0.75rem; font-weight: 600; color: var(--theme-primary); }
.ticket-count-badge { background: var(--bg-light); padding: 4px 12px; border-radius: 40px; font-size: 0.65rem; color: var(--text-gray); }

.ticket-card {
    background: white;
    border: 1px solid var(--border-thin);
    border-radius: 14px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.ticket-card:hover { box-shadow: var(--shadow-md); border-color: var(--theme-primary); }

.ticket-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid transparent;
}

.ticket-card.expanded .ticket-card-header { border-bottom-color: var(--border-thin); background: var(--primary-light); }

.ticket-number { background: var(--theme-primary); color: white; padding: 2px 8px; border-radius: 20px; font-size: 0.65rem; font-weight: 600; }
.ticket-title { flex: 1; font-weight: 600; font-size: 0.85rem; }
.ticket-expand-icon { transition: transform 0.3s; }
.ticket-card.expanded .ticket-expand-icon { transform: rotate(180deg); }

.ticket-card-body { padding: 14px 16px; background: #fafbfc; border-top: 1px solid var(--border-thin); display: none; }
.ticket-card.expanded .ticket-card-body { display: block; }
.ticket-section { margin-bottom: 12px; }

.ticket-section-title { font-size: 0.65rem; font-weight: 600; color: var(--text-gray); text-transform: uppercase; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.ticket-section-content { font-size: 0.8rem; line-height: 1.5; background: white; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border-thin); }

.empty-ticket-state { text-align: center; padding: 40px 20px; color: var(--text-gray); }
.empty-ticket-state i { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }

/* ========== TICKET CARD FIX - PERBAIKAN TICKET TIDAK MUNCUL ========== */
/* Memastikan body ticket tampil di dalam .ticket-card-modern */
.ticket-card-modern .ticket-card-body { display: block; }

/* ========== TROUBLESHOOT MODULE ========== */
.category-list-container, .subcategory-list-container { overflow-y: auto; padding: 8px; }

.category-item, .subcategory-item {
    padding: 10px 14px;
    margin: 4px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.category-item:hover, .subcategory-item:hover { background: var(--primary-light); transform: translateX(3px); }
.category-item.active, .subcategory-item.active { background: var(--primary-light); border-left: 3px solid var(--theme-primary); }
.category-item i, .subcategory-item i { width: 20px; color: var(--theme-primary); }
.category-name, .subcategory-name { font-weight: 500; flex: 1; }
.category-count { background: var(--primary-light); padding: 2px 8px; border-radius: 20px; font-size: 0.65rem; font-weight: 600; color: var(--theme-primary); }

/* ========== BLOCK STYLES ========== */
.block-container { padding: 0; width: 100%; }

.block-wrapper {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-thin);
    overflow: hidden;
    margin-bottom: 16px;
    transition: all 0.2s;
    width: 100%;
}

.block-wrapper:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.block-heading { padding: 12px 20px; background: var(--primary-light); border-bottom: 1px solid var(--border-thin); }
.block-heading h1 { font-size: 1.5rem; margin: 0; color: var(--primary-dark); font-weight: 700; }
.block-heading h2 { font-size: 1.25rem; margin: 0; color: var(--primary-dark); font-weight: 700; }
.block-heading h3 { font-size: 1.1rem; margin: 0; color: var(--primary-dark); font-weight: 600; }
.block-heading h4 { font-size: 1rem; margin: 0; color: var(--primary-dark); font-weight: 600; }
.block-heading h5 { font-size: 0.9rem; margin: 0; color: var(--primary-dark); font-weight: 600; }
.block-heading h6 { font-size: 0.8rem; margin: 0; color: var(--primary-dark); font-weight: 600; }

.block-paragraph { padding: 14px 20px; line-height: 1.5; font-size: 0.85rem; }

.block-stepbystep { padding: 14px 20px; }

.step-item { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; }
.step-number { background: var(--theme-primary); color: white; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: bold; flex-shrink: 0; }
.step-title { font-weight: 600; font-size: 0.85rem; margin-bottom: 2px; color: var(--primary-dark); }
.step-desc { font-size: 0.8rem; color: var(--text-gray); line-height: 1.4; }

.block-featurelist { padding: 14px 20px; }
.feature-list { list-style: none; padding: 0; }
.feature-list li { padding: 6px 0; display: flex; align-items: center; gap: 8px; font-size: 0.8rem; border-bottom: 1px solid var(--border-thin); }
.feature-list li i { color: var(--theme-accent); width: 18px; font-size: 12px; }

/* ========== FAQ STYLES ========== */
.block-faq { padding: 14px 20px; }

.faq-item { margin-bottom: 12px; border: 1px solid var(--border-thin); border-radius: 12px; overflow: hidden; background: white; }

.faq-question { 
    font-weight: 600; 
    font-size: 0.85rem; 
    color: var(--primary-dark); 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 12px 16px;
    background: var(--bg-light);
    transition: background 0.2s;
    margin: 0;
}

.faq-question i { transition: transform 0.3s; color: var(--theme-primary); font-size: 11px; }
.faq-question:hover { background: var(--primary-light); }

.faq-answer { 
    display: none;
    font-size: 0.8rem; 
    color: var(--text-gray); 
    line-height: 1.5; 
    padding: 12px 16px;
    border-top: 1px solid var(--border-thin);
    background: white;
}

.faq-answer.show,
.faq-answer[style*="display: block"] { display: block !important; }

/* ========== TIP/WARNING/INFO BOX ========== */
.block-tipbox, .block-warningbox, .block-infobox { padding: 12px 16px; margin: 10px; border-radius: 14px; font-size: 0.8rem; }
.block-tipbox { background: #ecfdf5; border-left: 4px solid var(--theme-accent); }
.block-warningbox { background: #fef3c7; border-left: 4px solid #f59e0b; }
.block-infobox { background: #eef2ff; border-left: 4px solid var(--theme-primary); }

/* ========== TABLE STYLES ========== */
.block-table-responsive {
    width: 100%;
    margin: 20px 0;
    border-radius: 16px;
    background: white;
    overflow-x: auto;
    overflow-y: visible;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    table-layout: auto;
}

.modern-table th,
.modern-table td {
    border: 1px solid #cbd5e1;
    padding: 10px 14px;
    vertical-align: top;
    text-align: left;
}

.modern-table th {
    font-weight: 600;
    font-size: 0.8rem;
    color: #1e293b;
    background: #f8fafc;
    white-space: nowrap;
}

.modern-table td {
    font-size: 0.8rem;
    color: #334155;
    word-break: break-word;
    white-space: normal;
}

.modern-table tbody tr:hover td {
    background: #f1f5f9 !important;
}

.table-title {
    font-size: 0.95rem;
    font-weight: 700;
    padding: 12px 16px 10px 16px;
    color: var(--theme-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #eef2ff;
    background: white;
    border-radius: 16px 16px 0 0;
}

/* ========== PDF VIEWER ========== */
.pdf-viewer-block { margin: 16px 0; border-radius: 14px; overflow: hidden; background: #f1f5f9; border: 1px solid #e2e8f0; }
.pdf-embed { width: 100%; background: white; min-height: 600px; }
.pdf-embed iframe { width: 100%; min-height: 600px; border: none; display: block; }

/* ========== PRICE TABLE ========== */
.block-pricetable { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; justify-content: center; }
.price-card { flex: 1; min-width: 200px; background: white; border: 1px solid var(--border-thin); border-radius: 14px; padding: 14px; text-align: center; }
.price-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.price-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; color: var(--theme-primary); }
.price-card .price { font-size: 20px; font-weight: 700; color: var(--theme-primary); margin: 8px 0; }
.price-card .features { list-style: none; padding: 0; margin: 0; text-align: left; }
.price-card .features li { padding: 4px 0; border-bottom: 1px solid #f1f5f9; font-size: 10px; display: flex; align-items: center; gap: 6px; }
.price-card .features li i { color: #10b981; font-size: 9px; width: 14px; }

/* ========== IMAGE GALLERY ========== */
.block-imagegallery { padding: 14px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.img-banner { width: 100%; height: auto; border-radius: 14px; max-height: 350px; object-fit: cover; }
.img-slider { width: 100%; height: auto; border-radius: 14px; max-height: 300px; object-fit: cover; }
.img-thumbnail { width: 100px; height: 100px; object-fit: cover; border-radius: 10px; }
.img-poster { max-width: 160px; height: auto; border-radius: 10px; }
.img-square { width: 160px; height: 160px; object-fit: cover; border-radius: 10px; }
.img-story { max-width: 140px; height: auto; border-radius: 10px; }
.img-logo { width: 60px; height: 60px; object-fit: contain; border-radius: 8px; }
.img-standard { max-width: 100%; height: auto; border-radius: 10px; }

/* ========== VIDEO ========== */
.block-video { padding: 14px; }
.block-video iframe, .block-video video { width: 100%; height: 350px; border-radius: 14px; }

/* ========== PDF DOWNLOAD ========== */
.pdf-download-block { text-align: center; padding: 16px; background: linear-gradient(135deg, #f8fafc, #f1f5f9); border-radius: 16px; margin: 16px; }
.download-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--theme-accent); color: white; padding: 10px 24px; border-radius: 40px; text-decoration: none; font-weight: 500; transition: all 0.2s; font-size: 0.8rem; }
.download-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(16,185,129,0.3); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--theme-primary); color: white; padding: 10px 24px; border-radius: 40px; text-decoration: none; font-weight: 500; transition: all 0.2s; font-size: 0.8rem; }
.link-btn:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ========== CHANNELS & GENRES ========== */
.channel-grid, .genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; padding: 12px; }
.channel-item, .genre-item { background: #f8fafc; border-radius: 12px; padding: 10px; display: flex; align-items: center; gap: 10px; transition: all 0.2s; }
.channel-item:hover, .genre-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.channel-number { background: var(--theme-primary); color: white; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 12px; }
.channel-name, .genre-name { font-weight: 600; font-size: 0.85rem; }
.channel-desc, .genre-desc { font-size: 10px; color: #64748b; }

/* ========== BROADCAST CHAT STYLE ========== */
.broadcast-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 440px;
    min-width: 320px;
    min-height: 260px;
    max-width: calc(100vw - 40px);
    max-height: 72vh;
    background: white;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.18), 0 4px 12px rgba(0,0,0,0.08);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(226,232,240,0.6);
}

.broadcast-popup.is-dragging,
.broadcast-popup.is-resizing {
    animation: none;
    user-select: none;
    box-shadow: 0 20px 50px rgba(0,0,0,0.28), 0 6px 16px rgba(0,0,0,0.12);
}

@keyframes slideUp {
    from { transform: translateY(24px) scale(0.97); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.broadcast-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    position: sticky;
    top: 0;
    z-index: 10;
    cursor: grab;
    flex-shrink: 0;
}
.broadcast-header:active { cursor: grabbing; }

.broadcast-header-actions { display: flex; align-items: center; gap: 4px; }
.broadcast-header-icon-btn { cursor: pointer; font-size: 14px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background 0.2s; }
.broadcast-header-icon-btn:hover { background: rgba(255,255,255,0.12); }
.broadcast-header-icon-btn:last-child { font-size: 18px; }

.broadcast-list { flex: 1 1 auto; overflow-y: auto; padding: 8px; background: #f1f4f8; min-height: 0; }

.broadcast-resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 22px;
    height: 22px;
    cursor: nwse-resize;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 3px;
    color: #94a3b8;
    font-size: 10px;
    z-index: 11;
    transform: rotate(45deg);
    transform-origin: center;
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
}
.broadcast-resize-handle:hover { opacity: 1; color: var(--theme-primary, #3b82f6); }

/* ===== BROADCAST CARD - MODERN REDESIGN ===== */
/* ========== BROADCAST CENTER - MODERN DESIGN ========== */
.broadcast-chat-card {
    background: white;
    margin-bottom: 6px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(226,232,240,0.7);
}
.broadcast-chat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border-color: var(--theme-primary, #002B95);
}

.broadcast-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px 7px 10px;
    background: white;
    border-bottom: 1px solid #f1f5f9;
}
.broadcast-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 9px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(59,130,246,0.2);
}
.broadcast-info { flex: 1; margin-left: 7px; }
.broadcast-sender-name { font-weight: 700; font-size: 9.5px; color: #1e293b; letter-spacing: 0; }
.broadcast-date { font-size: 7.5px; color: #94a3b8; margin-top: 1px; display: flex; align-items: center; gap: 3px; }
.broadcast-menu-icon { cursor: pointer; padding: 3px; border-radius: 50%; color: #94a3b8; font-size: 9px; transition: all 0.15s; }
.broadcast-menu-icon:hover { background: #f1f5f9; color: #64748b; }

.broadcast-message-body {
    padding: 8px 10px 9px 10px;
    font-size: 10.5px;
    line-height: 1.58;
    color: #334155;
    word-wrap: break-word;
    letter-spacing: 0;
}
.broadcast-message-body img { max-width: 100%; border-radius: 8px; margin-top: 6px; cursor: pointer; }
.broadcast-message-body a { color: var(--theme-primary, #3b82f6); text-decoration: none; font-size: 10px; }
.broadcast-message-body a:hover { text-decoration: underline; }

.broadcast-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    padding: 4px 7px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}
.broadcast-action-btn {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 9px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 8.5px;
    color: #64748b;
    transition: all 0.15s ease;
    font-weight: 500;
}
.broadcast-action-btn:hover { background: #e2e8f0; color: #334155; }
.broadcast-action-btn i { font-size: 9px; }
.broadcast-action-btn.oke-btn:hover { background: #dbeafe; color: #2563eb; }

/* Broadcast popup header */
.broadcast-popup .broadcast-header span:first-child {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.comments-section { padding: 8px 12px 10px 12px; background: white; border-top: 1px solid #f0f2f5; }
.oke-count-bar { background: #f0f2f5; border-radius: 20px; padding: 4px 10px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.oke-count-bar i { color: #3b82f6; font-size: 10px; }
.oke-count-bar span { font-size: 10px; font-weight: 500; color: #050505; }

.comment-list { margin-bottom: 8px; }
.comment-item { display: flex; gap: 8px; margin-bottom: 8px; }
.comment-avatar { width: 24px; height: 24px; border-radius: 50%; background: #8b5cf6; display: flex; align-items: center; justify-content: center; color: white; font-size: 10px; flex-shrink: 0; }
.comment-bubble { flex: 1; background: #f0f2f5; padding: 6px 10px; border-radius: 16px; }
.comment-author { font-weight: 600; font-size: 10px; color: #050505; margin-bottom: 2px; }
.comment-text { font-size: 10px; color: #1e293b; line-height: 1.4; }
.comment-time { font-size: 8px; color: #65676b; margin-top: 2px; }

.comment-input-wrapper { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.comment-input-avatar { width: 24px; height: 24px; border-radius: 50%; background: #e4e6eb; display: flex; align-items: center; justify-content: center; color: #65676b; font-size: 10px; flex-shrink: 0; }
.comment-input-field { flex: 1; background: #f0f2f5; border-radius: 20px; padding: 6px 12px; border: none; font-size: 10px; outline: none; }
.comment-input-field:focus { background: #e4e6eb; }
.comment-send-btn { background: none; border: none; color: #3b82f6; cursor: pointer; font-size: 14px; padding: 4px; }

/* Comment Login Prompt */
.comment-login-prompt {
    margin-top: 10px;
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}
.comment-login-prompt .form-group {
    margin-bottom: 12px;
}
.comment-login-prompt .form-control {
    border-radius: 12px;
}

/* ========== INCIDENT BANNER ========== */
.incident-banner-active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}
.incident-banner-active:hover { transform: translateX(4px); }

.incident-banner-resolved {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}
.incident-banner-resolved:hover { transform: translateX(4px); }

/* ========== SUPERVISOR HUB ========== */
.broadcast-sender-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 560px;
    max-width: calc(100vw - 40px);
    max-height: 85vh;
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.broadcast-sender-header { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: white; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; letter-spacing: 0.3px; }
.broadcast-sender-header span:last-child { cursor: pointer; opacity: 0.8; transition: opacity 0.2s; font-size: 18px; line-height: 1; }
.broadcast-sender-header span:last-child:hover { opacity: 1; }
.broadcast-sender-body { padding: 16px; max-height: 70vh; overflow-y: auto; }
.broadcast-sender-body textarea, .broadcast-sender-body input, .broadcast-sender-body select { width: 100%; padding: 10px 12px; border: 1px solid var(--border-thin); border-radius: 12px; margin-bottom: 10px; font-size: 12px; transition: border-color 0.2s, box-shadow 0.2s; box-sizing: border-box; }
.broadcast-sender-body textarea:focus, .broadcast-sender-body input:focus, .broadcast-sender-body select:focus { outline: none; border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,0.12); }

.supervisor-tab { padding: 7px 16px; background: transparent; border: none; border-radius: 30px; cursor: pointer; transition: all 0.25s ease; font-size: 11px; font-weight: 500; color: #64748b; }
.supervisor-tab:hover { background: #f1f5f9; }
.supervisor-tab.active { background: #8b5cf6; color: white; box-shadow: 0 2px 8px rgba(139,92,246,0.35); }

@media (max-width: 768px) {
    .broadcast-sender-modal {
        width: calc(100vw - 24px);
        right: 12px;
        left: 12px;
        bottom: 12px;
        max-height: 90vh;
        border-radius: 20px;
    }
    .broadcast-sender-header { padding: 12px 14px; font-size: 12px; }
    .broadcast-sender-body { padding: 12px; max-height: 75vh; }
    .broadcast-sender-body textarea, .broadcast-sender-body input, .broadcast-sender-body select { font-size: 13px; padding: 11px 12px; }
    .supervisor-tab { font-size: 11px; padding: 8px 12px; flex: 1; text-align: center; }
}

.broadcast-actions { display: flex; gap: 10px; margin-top: 12px; }
.broadcast-actions button { flex: 1; padding: 10px; border: none; border-radius: 30px; cursor: pointer; font-size: 12px; font-weight: 500; }

/* ========== ADMIN PANEL ========== */
.admin-container {
    background: white;
    border-radius: 28px;
    border: 1px solid var(--border-thin);
    overflow: hidden;
    margin-top: 20px;
    min-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--primary-light);
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    background: white;
    border-bottom: 1px solid var(--border-thin);
    flex-wrap: wrap;
    flex-shrink: 0;
}

.admin-tab-btn {
    padding: 8px 20px;
    background: var(--primary-light);
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.admin-tab-btn:hover, .admin-tab-btn.active { background: var(--theme-primary); color: white; }

.admin-split-layout {
    display: flex;
    gap: 0;
    padding: 20px;
    flex: 1;
    min-height: 700px;
}

.admin-sidebar-tree {
    width: 320px;
    background: var(--bg-light);
    border-radius: 20px;
    padding: 16px;
    border: 1px solid var(--border-thin);
    overflow-y: auto;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 80px);
    min-height: 650px;
}

.admin-canvas-editor {
    flex: 1;
    background: white;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border-thin);
    overflow-y: auto;
    margin-left: 20px;
    max-height: calc(100vh - 80px);
    min-height: 650px;
}

/* ========== ADMIN WORKSPACE (legacy split layout, no longer used for live preview) ========== */
.admin-workspace {
    position: relative;
    height: 100%;
    min-height: 600px;
}

/* ========== SMOOTH MODERN VISUAL EDITOR ========== */
.editable-block {
    position: relative;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 16px;
    padding: 16px;
    transition: box-shadow 0.2s cubic-bezier(0.4,0,0.2,1), border-color 0.2s cubic-bezier(0.4,0,0.2,1), transform 0.18s cubic-bezier(0.4,0,0.2,1);
    will-change: transform;
}
.block-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}
.block-content { display: flex; flex-direction: column; gap: 4px; }
.editable-block:hover {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.editable-block.block-focused {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px var(--primary-light), 0 4px 16px rgba(0,0,0,0.06);
}
.editable-block.sortable-ghost {
    opacity: 0.4;
    background: var(--primary-light) !important;
}
.editable-block.sortable-chosen {
    box-shadow: 0 12px 30px -8px rgba(0,0,0,0.18) !important;
    cursor: grabbing;
}
.editable-block.sortable-drag {
    opacity: 0.9;
    box-shadow: 0 16px 40px -10px rgba(0,0,0,0.25) !important;
}
.editable-block.block-new {
    animation: blockSlideIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.editable-block.block-removing {
    animation: blockSlideOut 0.22s cubic-bezier(0.4,0,0.6,1) forwards;
}
@keyframes blockSlideIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes blockSlideOut {
    from { opacity: 1; transform: scale(1); max-height: 600px; margin-bottom: 16px; }
    to { opacity: 0; transform: scale(0.97); max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
}

.drag-handle {
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: grab;
    transition: background 0.15s, color 0.15s, transform 0.1s;
}
.drag-handle:hover { background: var(--theme-primary) !important; color: white; }
.drag-handle:active { cursor: grabbing; transform: scale(0.95); }

.block-action-btn {
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.1s;
}
.block-action-btn:hover { transform: translateY(-1px); background: #e2e8f0; }
.block-action-btn:active { transform: scale(0.94); }
.block-action-btn.delete:hover { background: #fee2e2; color: #ef4444; }

.block-menu-dropdown {
    transform-origin: top right;
    transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.4,0,0.2,1);
}
.block-menu-dropdown[style*="display: none"] { opacity: 0; transform: scale(0.95) translateY(-4px); }
.block-menu-item { transition: background 0.12s; }
.block-menu-item:hover { background: #f1f5f9 !important; }

.preview-box {
    transition: background 0.25s ease;
}
.preview-box.preview-flash {
    background: var(--primary-light) !important;
    animation: previewFlash 0.6s ease;
}
@keyframes previewFlash {
    0% { background: var(--primary-light); }
    100% { background: #f8fafc; }
}

.form-control, .rich-text-editor {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus, .rich-text-editor:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Quick add block bar */
.quick-add-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(6px);
}

/* Empty state */
.blocks-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    border: 2px dashed #e2e8f0;
    border-radius: 20px;
    color: #94a3b8;
    transition: border-color 0.2s, background 0.2s;
}
.blocks-empty-state:hover {
    border-color: var(--theme-primary);
    background: var(--primary-light);
}
.blocks-empty-state i { font-size: 36px; margin-bottom: 12px; opacity: 0.6; }

/* ========== LIVE PREVIEW TAB (dedicated, device-mockup style) ========== */
/* ========== LIVE PREVIEW STATUS DOT ========== */
.preview-panel-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.preview-panel-status .dot {
    width: 7px; height: 7px; border-radius: 50%; background: #10b981;
    box-shadow: 0 0 0 0 rgba(16,185,129,0.5);
    animation: pulse-green 2s infinite;
}

/* ========== FLOATING TOGGLE BUTTON ========== */
.lp-float-toggle-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--theme-primary, #002B95), #1e40af);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(0,43,149,0.35);
    transition: all 0.2s ease;
    font-family: inherit;
}
.lp-float-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,43,149,0.4);
}
.lp-float-toggle-btn.active {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 6px 24px rgba(16,185,129,0.4);
}
.lp-float-toggle-btn i { font-size: 14px; }

/* ========== LIVE PREVIEW FLOATING POPUP ========== */
.lp-popup {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 64px -12px rgba(0,0,0,0.28), 0 0 0 1px rgba(0,0,0,0.06);
    min-width: 400px;
    min-height: 260px;
    overflow: hidden;
    resize: none; /* handled manually */
}

.lp-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border-bottom: 1px solid #e2e8f0;
    cursor: grab;
    user-select: none;
    border-radius: 18px 18px 0 0;
    flex-shrink: 0;
}
.lp-popup-header:active { cursor: grabbing; }

.lp-popup-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lp-popup-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lp-popup-action-btn {
    border: none;
    background: transparent;
    color: #64748b;
    width: 30px; height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.lp-popup-action-btn:hover { background: #f1f5f9; color: #1e293b; }
.lp-popup-action-btn.lp-close-btn:hover { background: #fee2e2; color: #dc2626; }

.lp-popup-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Stage inside popup: scrollable, centers device frame */
.lp-popup .lp-stage {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
    background: linear-gradient(135deg, #f1f5f9, #e8edff);
    overflow: auto;
    transition: opacity 0.2s ease;
}
.lp-popup .lp-stage.preview-refreshing { opacity: 0.55; }

/* Device switcher */
.lp-device-switcher { display: inline-flex; }
.lp-device-btn {
    border: none;
    background: transparent;
    color: #64748b;
    padding: 6px 12px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}
.lp-device-btn:hover { color: var(--theme-primary); }
.lp-device-btn.active {
    background: white;
    color: var(--theme-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* Device frames */
.lp-device-frame {
    background: #1e293b;
    border-radius: 18px;
    box-shadow: 0 12px 32px -8px rgba(0,0,0,0.3);
    padding: 10px;
    transition: width 0.3s cubic-bezier(0.4,0,0.2,1), height 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-shrink: 0;
    box-sizing: border-box;
}
.lp-device-frame iframe {
    width: 100%; height: 100%;
    border: none; border-radius: 10px;
    background: white;
}

.lp-device-frame.lp-device-desktop {
    width: 100%; height: 100%;
    min-width: 300px; min-height: 200px;
    border-radius: 12px;
}
.lp-popup .lp-stage .lp-device-frame.lp-device-desktop {
    width: 100%; max-width: 100%;
    height: calc(100% - 0px);
    min-height: 200px;
}
.lp-device-frame.lp-device-tablet {
    width: 480px; max-width: 95%;
    height: 640px; max-height: calc(100vh - 200px);
    border-radius: 22px; padding: 12px;
}
.lp-device-frame.lp-device-mobile {
    width: 320px; max-width: 95%;
    height: 600px; max-height: calc(100vh - 200px);
    border-radius: 32px; padding: 12px 7px;
}

/* Resize handle — bottom-right corner grip */
.lp-popup-resize-handle {
    position: absolute;
    bottom: 0; right: 0;
    width: 18px; height: 18px;
    cursor: se-resize;
    background: linear-gradient(135deg, transparent 40%, #cbd5e1 40%);
    border-radius: 0 0 18px 0;
}


/* Sidebar tree polish */
.admin-category-tree-item, .admin-subcategory-tree-item {
    transition: background 0.15s ease, transform 0.1s ease, padding-left 0.15s ease;
    border-radius: 12px;
}
.admin-category-tree-item:hover, .admin-subcategory-tree-item:hover {
    background: var(--primary-light);
    padding-left: 18px;
}
.admin-category-tree-item.active, .admin-subcategory-tree-item.active {
    background: var(--theme-primary) !important;
    color: white;
}
.admin-category-tree-item.active i, .admin-subcategory-tree-item.active i { color: white; }

/* Buttons */
.btn-add-modern, .btn-save-modern, .btn-edit-modern {
    transition: transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn-add-modern:hover, .btn-save-modern:hover, .btn-edit-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.btn-add-modern:active, .btn-save-modern:active, .btn-edit-modern:active {
    transform: translateY(0) scale(0.98);
}
.btn-add-modern:disabled, .btn-save-modern:disabled, .btn-edit-modern:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Block type badge subtle pop */
.block-type-badge { transition: background 0.2s, color 0.2s; }

/* Smooth scrolling everywhere in admin */
.admin-canvas-editor, .editor-panel, .admin-sidebar-tree, .blocks-container {
    scroll-behavior: smooth;
}

/* ========== VISUAL EDITOR ========== */
.visual-editor { 
    background: white; 
    padding: 0; 
    height: 100%; 
    display: flex; 
    flex-direction: column;
    min-height: 600px;
}

.blocks-container { 
    display: flex; 
    flex-direction: column; 
    gap: 16px; 
    flex: 1; 
    overflow-y: auto; 
    padding-bottom: 150px;
    min-height: 500px;
    max-height: none;
}

.floating-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-bottom: 20px;
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    border: 1px solid #e2e8f0;
}

.block-type-btn-quick { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 40px; padding: 6px 14px; font-size: 11px; cursor: pointer; transition: all 0.2s; }
.block-type-btn-quick:hover { background: var(--theme-primary); color: white; }

/* ========== TABLE EDITOR ========== */
.table-editor-container { width: 100%; overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 12px; background: white; margin-top: 12px; }
.table-editor-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.table-editor-container table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table-editor-container th, .table-editor-container td { padding: 8px; border: 1px solid #e2e8f0; vertical-align: top; }
.table-editor-container th input, .table-editor-container td textarea { width: 100%; border: none; padding: 6px; background: transparent; font-size: 12px; }

/* ========== RICH TEXT EDITOR ========== */
.rich-text-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: #f8fafc; border-radius: 12px; margin-bottom: 8px; border: 1px solid #e2e8f0; }
.rich-text-btn { background: white; border: 1px solid #e2e8f0; border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.2s; }
.rich-text-btn:hover { background: #e2e8f0; }
.rich-text-select { background: white; border: 1px solid #e2e8f0; border-radius: 6px; padding: 4px 8px; cursor: pointer; font-size: 11px; }
.rich-text-editor { border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; min-height: 150px; max-height: 300px; overflow-y: auto; background: white; font-family: inherit; line-height: 1.5; }
.rich-text-editor:focus { outline: none; border-color: var(--theme-primary); }

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}
.modal.show { display: flex; }
.modal-content { background: white; border-radius: 24px; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-large { width: 90%; max-width: 900px; }
.modal-small { width: 90%; max-width: 480px; }
.modal-header { padding: 16px 24px; background: #e8edff; border-bottom: 1px solid var(--border-thin); border-radius: 24px 24px 0 0; display: flex; justify-content: space-between; align-items: center; }

.form-group { margin-bottom: 16px; padding: 0 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.8rem; }
.form-control { width: 100%; padding: 10px 14px; border: 1px solid var(--border-thin); border-radius: 12px; font-size: 0.85rem; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-thin);
    background: #f8fafc;
    border-radius: 0 0 24px 24px;
}

/* ========== BUTTONS ========== */
.btn-edit, .btn-delete, .btn-add, .btn-save, .btn-cancel {
    padding: 6px 14px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-edit { background: var(--theme-primary); color: white; }
.btn-delete { background: #ef4444; color: white; }
.btn-add { background: var(--theme-accent); color: white; }
.btn-save { background: var(--theme-accent); color: white; }
.btn-cancel { background: #64748b; color: white; }
.btn-edit:hover, .btn-delete:hover, .btn-add:hover, .btn-save:hover { transform: translateY(-2px); }

/* ========== LIGHTBOX ========== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 90%; max-height: 90%; border-radius: 16px; cursor: zoom-in; }
.lightbox img.zoomed { transform: scale(1.8); cursor: zoom-out; }
.lightbox-close { position: absolute; top: 20px; right: 35px; color: white; font-size: 40px; cursor: pointer; }

/* ========== TOAST ========== */
#toastNotification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--theme-primary);
    color: white;
    padding: 10px 18px;
    border-radius: 40px;
    z-index: 10000;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideInRight 0.3s ease;
    display: none;
}
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ========== ADMIN CARD ========== */
.admin-card {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-thin);
    overflow: hidden;
    margin-bottom: 20px;
}

.admin-card-header {
    padding: 16px 20px;
    background: var(--primary-light);
    border-bottom: 1px solid var(--border-thin);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.admin-card-body { padding: 20px; }

.admin-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
}

.admin-empty i { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }

/* ========== ADMIN BULK ACTIONS ========== */
.bulk-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-comment-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.admin-category-tree-item {
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid transparent;
}

.admin-category-tree-item:hover, .admin-category-tree-item.active { background: var(--primary-light); }
.admin-category-tree-item.active { border-left-color: var(--theme-primary); }

.admin-subcategory-tree-item {
    padding: 10px 16px 10px 36px;
    margin: 2px 0;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.admin-subcategory-tree-item:hover { background: var(--border-thin); }

/* ========== SCRIPT CS MANAGER - SMOOTH LAYOUT ========== */
.scs-layout {
    display: flex;
    gap: 16px;
    flex: 1;
    min-height: 600px;
    align-items: stretch;
}
.scs-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.scs-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.scs-guide-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}
.scs-guide-toggle:hover { background: #eef2ff; }
.scs-guide-toggle.active { background: var(--theme-primary); color: white; border-color: var(--theme-primary); }

.scs-guide-panel {
    width: 0;
    flex-shrink: 0;
    overflow: hidden;
    transition: width 0.32s cubic-bezier(0.4,0,0.2,1), opacity 0.25s ease;
    opacity: 0;
    border-radius: 18px;
}
.scs-guide-panel.open {
    width: 360px;
    opacity: 1;
}
.scs-guide-panel-inner {
    width: 360px;
    height: 100%;
    overflow-y: auto;
    max-height: calc(100vh - 160px);
}

@media (max-width: 1024px) {
    .scs-layout { flex-direction: column; }
    .scs-guide-panel.open { width: 100%; }
    .scs-guide-panel-inner { width: 100%; max-height: 480px; }
}

/* Script cards - smooth accordion */
.script-card-admin {
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.script-card-admin .script-detail-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.25s ease;
    opacity: 0;
}
.script-card-admin.open .script-detail-body {
    max-height: 2000px;
    opacity: 1;
}
.script-card-admin .chevron-icon {
    transition: transform 0.25s ease;
}
.script-card-admin.open .chevron-icon {
    transform: rotate(180deg);
}

/* Inline add/edit form for scripts */
.scs-inline-form {
    background: #f8fafc;
    border: 1px dashed var(--theme-primary);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 14px;
    animation: scsFadeIn 0.25s ease;
}
@keyframes scsFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Inline editable name field */
.scs-editable-name {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 2px 6px;
    outline: none;
    transition: all 0.15s ease;
}
.scs-editable-name:hover {
    border-color: #e2e8f0;
    background: #f8fafc;
}
.scs-editable-name:focus {
    border-color: var(--theme-primary);
    background: white;
}

.scs-autosave-badge {
    font-size: 10px;
    color: #16a34a;
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-left: 8px;
}
.scs-autosave-badge.show { opacity: 1; }

.preview-box {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    font-size: 13px;
}

.highlight-blue { background: #dbeafe; color: #1e40af; padding: 2px 8px; border-radius: 6px; }
.highlight-green { background: #dcfce7; color: #166534; padding: 2px 8px; border-radius: 6px; }
.highlight-orange { background: #fef3c7; color: #92400e; padding: 2px 8px; border-radius: 6px; }
.highlight-purple { background: #f3e8ff; color: #6b21a5; padding: 2px 8px; border-radius: 6px; }
.highlight-red { background: #fee2e2; color: #991b1b; padding: 2px 8px; border-radius: 6px; }

.category-cover { width: 100%; max-height: 180px; object-fit: cover; border-radius: 14px; margin-bottom: 16px; cursor: pointer; }

.block-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; color: #64748b; margin-bottom: 6px; letter-spacing: 0.5px; }
.block-editor-field { margin-bottom: 16px; }

/* ========== RESIZE HANDLE ========== */
.admin-resizer {
    width: 8px;
    background: transparent;
    cursor: ew-resize;
    transition: background 0.2s;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.admin-resizer:hover { background: rgba(0, 43, 149, 0.1); }

.admin-resizer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 3px;
    width: 2px;
    height: 100%;
    background: var(--border-thin);
    transition: all 0.2s ease;
}

.admin-resizer:hover::before {
    background: var(--theme-primary);
    width: 3px;
    left: 2.5px;
    box-shadow: 0 0 4px var(--theme-primary);
}

/* ========== MENU SORTABLE STYLES ========== */
.menu-sortable-container {
    min-height: 200px;
}

.menu-sortable-item {
    cursor: default;
    transition: all 0.2s ease;
}

.menu-sortable-item:hover {
    background: #f1f5f9 !important;
    transform: translateX(4px);
}

.drag-handle {
    cursor: grab;
    color: #94a3b8;
    transition: color 0.2s;
}

.drag-handle:active {
    cursor: grabbing;
}

.menu-sortable-item:hover .drag-handle {
    color: var(--theme-primary);
}

.sortable-drag {
    opacity: 0.5;
    background: var(--theme-primary) !important;
    color: white !important;
}

.menu-sortable-item-modern { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 14px 16px; 
    background: white; 
    border: 1px solid #e2e8f0; 
    border-radius: 16px; 
    margin-bottom: 10px; 
    transition: all 0.2s; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); 
}
.menu-sortable-item-modern:hover { 
    transform: translateX(4px); 
    border-color: var(--theme-primary); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}
.menu-item-drag { 
    cursor: grab; 
    color: #94a3b8; 
    font-size: 16px; 
}
.menu-item-drag:active { 
    cursor: grabbing; 
}
.menu-item-icon { 
    width: 40px; 
    height: 40px; 
    background: linear-gradient(135deg, var(--primary-light), #e0e7ff); 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--theme-primary); 
    font-size: 18px; 
}
.menu-item-info { 
    flex: 1; 
}
.menu-item-name { 
    font-size: 0.85rem; 
    margin-bottom: 4px; 
}
.menu-item-meta { 
    font-size: 0.7rem; 
    color: #64748b; 
}
.menu-item-actions { 
    display: flex; 
    gap: 8px; 
}

/* ========== THEME PREVIEW ========== */
.theme-preview {
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 24px;
}

.alert-info {
    background: #eef2ff;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 12px;
    border-left: 3px solid var(--theme-primary);
}

/* ========== STICKY CLASSES ========== */
.product-sidebar-sticky,
.module-left-sticky {
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.product-content-scroll,
.module-right-scroll {
    overflow-y: auto;
    max-height: calc(100vh - 120px);
    scroll-behavior: smooth;
}

/* ========== SCRIPT CS CHANNEL GUIDE ========== */
.scriptcs-channel-guide-modern {
    background: #f8fafc;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.guide-bubble-demo {
    background: white;
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.guide-bubble-demo:hover {
    border-color: var(--theme-primary);
    transform: translateY(-2px);
}

/* ========== SCRIPT CS STYLES ========== */
.script-card-admin {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.script-card-admin:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--theme-primary);
}

/* ========== FLOATING COMMAND PALETTE ========== */
.command-palette {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 480px;
    max-width: 90vw;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    z-index: 10001;
    overflow: hidden;
    backdrop-filter: blur(0px);
    animation: paletteFadeIn 0.2s cubic-bezier(0.4,0,0.2,1);
}

@keyframes paletteFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%) scale(0.95);
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        backdrop-filter: blur(8px);
    }
}

/* ========== FLOATING TOOLBAR ========== */
.floating-toolbar-modern {
    position: fixed;
    background: #1e293b;
    border-radius: 48px;
    padding: 6px;
    display: flex;
    gap: 4px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.2);
    z-index: 10002;
    animation: toolbarFadeIn 0.15s ease;
}

@keyframes toolbarFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.floating-toolbar-modern .float-btn {
    background: none;
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.15s;
}

.floating-toolbar-modern .float-select {
    background: #334155;
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 40px;
    font-size: 12px;
    cursor: pointer;
}

/* ========== SCROLLBAR STYLES ========== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-light); border-radius: 10px; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--theme-primary); }

/* ========== ANIMATIONS ========== */
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
    70% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
    70% { box-shadow: 0 0 0 6px rgba(59,130,246,0); }
    100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

.bell-bounce {
    animation: bellRing 0.5s ease;
}

/* ========== STICKY TABS ========== */
.sticky-tabs {
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
    padding: 8px 0 4px 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* ========== SMOOTH SCROLL ========== */
.product-content-modern,
.troubleshoot-content-modern,
.ticket-content-modern,
.scriptcs-content-modern,
.admin-canvas-editor,
.blocks-container,
.ticket-list-admin,
.scripts-list-container,
.admin-sidebar-tree,
.product-sidebar-modern,
.troubleshoot-sidebar-modern,
.ticket-sidebar-modern,
.scriptcs-sidebar-modern,
.broadcast-list {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* ========== MODULE RESIZER IMPROVED ========== */
.module-resizer {
    width: 6px;
    cursor: col-resize;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 10;
    transition: background 0.2s;
}

.module-resizer:hover {
    background: rgba(139, 92, 246, 0.1);
}

.module-resizer-line {
    width: 2px;
    height: 40px;
    background: #cbd5e1;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.module-resizer:hover .module-resizer-line {
    background: var(--theme-primary, #8b5cf6);
    height: 60px;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.2);
}

/* ========== TICKET DETAIL PANE ========== */
.ticket-detail-pane {
    padding: 8px 0;
    line-height: 1.7;
}

.ticket-detail-pane p {
    margin-bottom: 12px;
}

.ticket-detail-pane ul,
.ticket-detail-pane ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.ticket-detail-pane h1,
.ticket-detail-pane h2,
.ticket-detail-pane h3 {
    margin-top: 16px;
    margin-bottom: 8px;
}

.ticket-detail-pane img {
    max-width: 100%;
    border-radius: 12px;
    margin: 12px 0;
}

.ticket-detail-pane table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.ticket-detail-pane th,
.ticket-detail-pane td {
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    text-align: left;
}

/* ========== COMMENT LOGIN PROMPT ========== */
.comment-login-prompt .form-control {
    border-radius: 12px !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
}

.comment-login-prompt .btn-save-modern {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    color: white !important;
    border: none !important;
    border-radius: 40px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.comment-login-prompt .btn-save-modern:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4) !important;
}

.comment-input-field {
    border-radius: 20px !important;
    padding: 8px 16px !important;
    font-size: 12px !important;
    border: 1px solid #e2e8f0 !important;
    background: white !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.comment-input-field:focus {
    border-color: var(--theme-primary, #8b5cf6) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15) !important;
    outline: none !important;
}

.comment-send-btn {
    color: var(--theme-primary, #8b5cf6) !important;
    transition: all 0.2s ease !important;
}

.comment-send-btn:hover {
    transform: scale(1.1) !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hamburger-btn { display: flex; }
    .sidebar:hover { width: 0; }
    .sidebar.mobile-open:hover { width: var(--sidebar-wide, 240px); }
    .sidebar {
        width: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 200;
    }
    .sidebar.mobile-open {
        width: var(--sidebar-wide, 240px);
        transform: translateX(0);
        box-shadow: 8px 0 30px rgba(0,0,0,0.25);
    }
    .sidebar.mobile-open .logo h3 span,
    .sidebar.mobile-open .icon-btn span,
    .sidebar.mobile-open .menu-item a span { opacity: 1; }
    .content { margin-left: 0; width: 100%; }

    .top-bar { padding: 10px 16px; }
    .title-section { padding: 16px 16px 12px 16px; }
    .title-section h2 { font-size: 1.15rem; padding-left: 12px; border-left-width: 4px; }
    .content-main-padding { padding: 0 16px 24px 16px; }
    .global-search-container { padding: 0 16px 12px 16px !important; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .stat-card { padding: 0.9rem; border-radius: 18px; gap: 0.6rem; }
    .stat-card i { font-size: 1.4rem; padding: 8px; border-radius: 14px; }
    .stat-info h3 { font-size: 1.25rem; }
    .stat-info p { font-size: 0.65rem; }

    .module-guide-wrapper, .product-split-layout { flex-direction: column; min-height: auto; }
    .module-left-panel, .product-sidebar-tabs { width: 100%; max-height: 240px; border-right: none; border-bottom: 1px solid var(--border-thin); position: relative; top: 0; max-height: 240px; }
    .module-right-panel { max-height: none; }
    .module-resizer { display: none; }
    .product-content-canvas { padding: 16px; }

    .admin-split-layout { flex-direction: column; }
    .admin-sidebar-tree { width: 100%; max-height: 260px; position: relative; top: 0; margin-bottom: 16px; min-height: auto; }
    .admin-canvas-editor { margin-left: 0; max-height: none; min-height: 400px; }
    .admin-resizer { display: none; }
    .admin-header { padding: 12px 16px; }
    .admin-tabs { padding: 10px 12px; gap: 6px; }
    .admin-tab-btn { padding: 7px 14px; font-size: 11px; }

    .broadcast-popup, .broadcast-sender-modal { width: calc(100vw - 24px); right: 12px; left: 12px; bottom: 12px; }
    .block-actions { opacity: 1; position: relative; top: auto; right: auto; justify-content: flex-end; margin-bottom: 12px; }
    .faq-question { padding: 12px 16px; font-size: 0.85rem; }
    .floating-toolbar { flex-wrap: wrap; padding: 8px 12px; }
    .block-type-btn-quick { padding: 4px 10px; font-size: 10px; }
    .product-sidebar-sticky,
    .module-left-sticky { position: relative; max-height: 240px; }
    .subcategory-cards { grid-template-columns: 1fr; }
    .tabs-bar { flex-direction: column; align-items: stretch; }
    .tab-wrapper { width: 100%; }
    .tab-btn { width: 100%; text-align: center; }
    .table-responsive {
        overflow-x: auto;
    }
    .admin-table-modern th,
    .admin-table-modern td {
        white-space: nowrap;
    }

    /* Modals full-width on mobile */
    .modal-content { width: 92%; max-width: 92%; max-height: 88vh; overflow-y: auto; }
    .modal-small { width: 92%; max-width: 420px; }
    .form-group { padding: 0 12px; }
    .form-actions { flex-direction: column-reverse; gap: 8px; padding: 0 12px 12px; }
    .form-actions button { width: 100%; }
    
    /* Command palette mobile */
    .command-palette { width: 95vw !important; }
    .command-palette-results { grid-template-columns: 1fr !important; }
    
    /* Floating toolbar mobile */
    .floating-toolbar-modern { transform: scale(0.9); transform-origin: center; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .title-section h2 { font-size: 1rem; }
    .top-bar { padding: 8px 12px; }
    .content-main-padding { padding: 0 12px 20px 12px; }
    .sidebar.mobile-open { width: 78vw; max-width: 260px; }
    .stat-card { flex-direction: row; }
    .module-left-panel, .product-sidebar-tabs, .admin-sidebar-tree, .module-left-sticky, .product-sidebar-sticky { max-height: 200px; }
}

/* ========== ADMIN TICKET EDITOR ========== */
.admin-canvas-editor .ticket-editor-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.admin-canvas-editor .ticket-editor-table-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: white;
    min-height: 300px;
    max-height: calc(100vh - 280px);
}

.admin-canvas-editor .ticket-editor-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 650px;
}

.admin-canvas-editor .ticket-editor-table th {
    background: var(--primary-light);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--theme-primary);
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.admin-canvas-editor .ticket-editor-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.admin-canvas-editor .ticket-editor-table tr:hover td {
    background: #f8fafc;
}

.admin-canvas-editor .ticket-action-buttons {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .admin-canvas-editor .ticket-action-buttons {
        flex-direction: column;
        gap: 4px;
    }
    .admin-canvas-editor .ticket-editor-table th,
    .admin-canvas-editor .ticket-editor-table td {
        padding: 8px 12px;
    }
}

/* ========== MODERN ICON STYLES ========== */
i[class^="fa-"], i[class*=" fa-"],
.fas, .far, .fab {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.fa-rocket {
    background: linear-gradient(135deg, #002B95, #4f46e5, #8b5cf6, #6d28d9);
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rocketGradient 3s ease infinite;
    filter: drop-shadow(0 2px 4px rgba(0,43,149,0.3));
}

.fa-rocket:hover {
    transform: translateY(-4px) scale(1.1);
    filter: drop-shadow(0 8px 15px rgba(0,43,149,0.4));
    animation: rocketHover 0.4s ease;
}

@keyframes rocketGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes rocketHover {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-4px) scale(1.1); }
}

.fa-home {
    background: linear-gradient(135deg, #3b82f6, #06b6d4, #3b82f6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.fa-home:hover { transform: scale(1.15); }

.fa-ticket-alt, .fa-ticket {
    background: linear-gradient(135deg, #8b5cf6, #ec4899, #8b5cf6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.fa-ticket-alt:hover, .fa-ticket:hover { transform: rotate(5deg) scale(1.1); }

.fa-box, .fa-box-open {
    background: linear-gradient(135deg, #10b981, #14b8a6, #10b981);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.fa-box:hover, .fa-box-open:hover { transform: scale(1.1) rotate(3deg); }

.fa-wrench, .fa-tools {
    background: linear-gradient(135deg, #f59e0b, #fbbf24, #f59e0b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.fa-wrench:hover, .fa-tools:hover { transform: rotate(15deg) scale(1.1); }

.fa-comment-dots, .fa-comment, .fa-comments {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #3b82f6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.fa-comment-dots:hover, .fa-comment:hover { transform: translateX(3px) scale(1.1); }

.fa-bell, .fa-bullhorn {
    background: linear-gradient(135deg, #ef4444, #f97316, #ef4444);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.fa-bell:hover, .fa-bullhorn:hover { transform: scale(1.15); }

.fa-exclamation-triangle, .fa-exclamation-circle {
    background: linear-gradient(135deg, #dc2626, #ef4444, #dc2626);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-copy {
    background: linear-gradient(135deg, #06b6d4, #3b82f6, #06b6d4);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.fa-copy:hover { transform: scale(1.15); }

.fa-search {
    background: linear-gradient(135deg, #8b5cf6, #6366f1, #8b5cf6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-eye, .fa-eye-slash {
    background: linear-gradient(135deg, #10b981, #34d399, #10b981);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-trash-alt, .fa-trash {
    background: linear-gradient(135deg, #ef4444, #f87171, #ef4444);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.fa-trash-alt:hover { transform: scale(1.1); }

.fa-pen, .fa-edit, .fa-pencil-alt {
    background: linear-gradient(135deg, #f59e0b, #fbbf24, #f59e0b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.fa-pen:hover { transform: rotate(10deg) scale(1.1); }

.fa-save {
    background: linear-gradient(135deg, #10b981, #34d399, #10b981);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-folder, .fa-folder-open {
    background: linear-gradient(135deg, #f59e0b, #fcd34d, #f59e0b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-tv {
    background: linear-gradient(135deg, #8b5cf6, #a855f7, #8b5cf6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-mobile-alt, .fa-mobile {
    background: linear-gradient(135deg, #3b82f6, #06b6d4, #3b82f6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-envelope {
    background: linear-gradient(135deg, #ec4899, #f43f5e, #ec4899);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-hashtag, .fa-instagram, .fa-facebook, .fa-twitter, .fa-whatsapp {
    background: linear-gradient(135deg, #8b5cf6, #ec4899, #8b5cf6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-globe {
    background: linear-gradient(135deg, #10b981, #3b82f6, #10b981);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-chart-line, .fa-chart-bar {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6, #8b5cf6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-user, .fa-user-shield, .fa-user-circle {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #3b82f6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-lock {
    background: linear-gradient(135deg, #f59e0b, #ef4444, #f59e0b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-sync-alt {
    background: linear-gradient(135deg, #06b6d4, #3b82f6, #06b6d4);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.fa-sync-alt:hover { animation: spin 0.6s ease-in-out; }

.fa-plus-circle, .fa-plus {
    background: linear-gradient(135deg, #10b981, #34d399, #10b981);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-minus, .fa-minus-circle {
    background: linear-gradient(135deg, #ef4444, #f87171, #ef4444);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-check, .fa-check-circle {
    background: linear-gradient(135deg, #10b981, #34d399, #10b981);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-times, .fa-times-circle {
    background: linear-gradient(135deg, #ef4444, #f87171, #ef4444);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-arrow-right, .fa-chevron-right, .fa-chevron-down, .fa-chevron-up, .fa-chevron-left {
    background: linear-gradient(135deg, #8b5cf6, #6366f1, #8b5cf6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-history {
    background: linear-gradient(135deg, #f59e0b, #fbbf24, #f59e0b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-lightbulb {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #fbbf24);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.fa-lightbulb:hover { transform: scale(1.15); }

.fa-calendar-alt, .fa-calendar {
    background: linear-gradient(135deg, #ec4899, #f43f5e, #ec4899);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-image, .fa-images {
    background: linear-gradient(135deg, #8b5cf6, #ec4899, #8b5cf6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-video {
    background: linear-gradient(135deg, #3b82f6, #06b6d4, #3b82f6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-table {
    background: linear-gradient(135deg, #10b981, #14b8a6, #10b981);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-list, .fa-list-ul, .fa-list-ol {
    background: linear-gradient(135deg, #8b5cf6, #6366f1, #8b5cf6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-filter {
    background: linear-gradient(135deg, #06b6d4, #3b82f6, #06b6d4);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-credit-card {
    background: linear-gradient(135deg, #f59e0b, #fbbf24, #f59e0b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-file, .fa-file-alt, .fa-file-pdf {
    background: linear-gradient(135deg, #ef4444, #f87171, #ef4444);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-tachometer-alt, .fa-chart-simple {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #3b82f6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-cog, .fa-gear {
    background: linear-gradient(135deg, #64748b, #94a3b8, #64748b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.fa-cog:hover { animation: spin 0.6s ease-in-out; }

.fa-question-circle, .fa-question {
    background: linear-gradient(135deg, #8b5cf6, #a855f7, #8b5cf6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-info-circle {
    background: linear-gradient(135deg, #3b82f6, #06b6d4, #3b82f6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-smile, .fa-frown {
    background: linear-gradient(135deg, #f59e0b, #fbbf24, #f59e0b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-hand-peace, .fa-thumbs-up, .fa-thumbs-down {
    background: linear-gradient(135deg, #f59e0b, #f97316, #f59e0b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-link {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #3b82f6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-external-link-alt {
    background: linear-gradient(135deg, #8b5cf6, #6366f1, #8b5cf6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-upload, .fa-download {
    background: linear-gradient(135deg, #10b981, #34d399, #10b981);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fa-terminal, .fa-code {
    background: linear-gradient(135deg, #1e293b, #334155, #1e293b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========== ANIMATIONS ========== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* ========== CHANNEL GUIDE BUBBLE (Web View) ========== */
.channel-guide-bubble {
    transition: all 0.3s ease;
}
.channel-guide-bubble:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* ========== TICKET INLINE DESCRIPTION ========== */
.ticket-inline-description {
    animation: fadeInDown 0.25s ease;
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== PRINT BUTTON ========== */
@media print {
    .sidebar, .top-bar, .admin-container, .broadcast-popup, 
    .broadcast-sender-modal, #loginModal, .btn-add, .btn-save,
    .btn-cancel, .btn-view-modern, .btn-edit-modern, .btn-delete-modern {
        display: none !important;
    }
    .content { margin: 0; padding: 0; }
    .content-main-padding { padding: 16px; }
}

/* ========== SCRIPT CS GUIDE (admin <details>) ========== */
details > summary::-webkit-details-marker { display: none; }
details[open] summary span:last-child { transform: rotate(180deg); }

/* ========== BROADCAST SCROLLBAR ========== */
.broadcast-list::-webkit-scrollbar { width: 4px; }
.broadcast-list::-webkit-scrollbar-track { background: transparent; }
.broadcast-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.broadcast-list::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ========== MODERN SEARCH IN SCRIPTCS ========== */
.scriptcs-search-bar input:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

/* ========== TICKET INLINE DESCRIPTION RESPONSIVE ========== */
@media (max-width: 768px) {
    .ticket-inline-description { font-size: 0.82rem; }
    .broadcast-popup { width: calc(100vw - 32px); right: 16px; left: 16px; }
}

/* ========== LINK BUTTON PICKER MODAL ========== */
#linkButtonPickerModal .modal-content {
    max-width: 500px;
}

.link-button-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eef2ff;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 12px;
    color: var(--theme-primary);
}