/* Font dirubah ke Arial sesuai permintaan */
:root {
    /* DARK MODE (Default) */
    --bg-main: #0B0E14; /* Deep dark blue */
    --bg-sidebar: #121826;
    --bg-card: rgba(26, 32, 44, 0.6);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    
    --sidebar-text: #F8FAFC;
    --sidebar-text-secondary: #94A3B8;
    
    --accent-primary: #3B82F6; /* Blue */
    --accent-primary-hover: #60A5FA;
    --accent-secondary: #0EA5E9; /* Sky Blue */
    --accent-teal: #14B8A6;
    
    --gradient-primary: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --primary-color: var(--accent-primary);
    
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
    
    --border-radius: 16px;
    --border-radius-sm: 8px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --chart-grid: rgba(255, 255, 255, 0.05);
    --chart-tooltip-bg: rgba(15, 23, 42, 0.9);
    --chart-tooltip-text: #F8FAFC;
}

[data-theme="light"] {
    /* LIGHT MODE (WP Admin Style but modern) */
    --bg-main: #f0f0f1; 
    --bg-sidebar: #1d2327;
    --bg-card: #ffffff;
    --bg-card-hover: #fafafa;
    --border-color: #c3c4c7;
    
    --text-primary: #3c434a;
    --text-secondary: #646970;
    
    --sidebar-text: #ffffff;
    --sidebar-text-secondary: #c3c4c7;
    
    --accent-primary: #2271b1; /* WP Blue */
    --accent-primary-hover: #135e96;
    --accent-secondary: #3582c4; /* Lighter WP Blue */
    --accent-teal: #00a32a; /* WP Green for Success */
    
    --gradient-primary: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); 
    --primary-color: var(--accent-primary);
    
    --shadow-soft: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-glow: 0 0 10px rgba(34, 113, 177, 0.2);
    
    --chart-grid: rgba(0, 0, 0, 0.05);
    --chart-tooltip-bg: rgba(255, 255, 255, 0.95);
    --chart-tooltip-text: #3c434a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Add subtle background glow in dark mode only */
body:not([data-theme="light"]) {
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ============ LAYOUT ============ */
.wp-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ============ SIDEBAR ============ */
.wp-sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    z-index: 10;
    transition: background-color 0.4s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px 30px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sidebar-text);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.sidebar-brand i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-menu > li > a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--sidebar-text-secondary);
    text-decoration: none;
    gap: 14px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    font-weight: 500;
}

.sidebar-menu > li > a > i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    transition: var(--transition);
}

.sidebar-menu > li > a:hover {
    color: var(--sidebar-text);
    background-color: rgba(255, 255, 255, 0.05);
}
.sidebar-menu > li > a:hover i {
    color: var(--accent-primary);
}

.active-menu {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    box-shadow: var(--shadow-glow);
}
.active-menu i {
    color: #fff !important;
}

.sidebar-profile {
    margin-top: auto;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--border-color);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: #2b6cb0;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--sidebar-text);
}

.profile-role {
    font-size: 12px;
    color: var(--sidebar-text-secondary);
}

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #ef4444;
    color: #ffffff;
}

/* Sidebar Footer Buttons (High Contrast & Clear) */
.sidebar-footer-btn-theme {
    width: 100%;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.sidebar-footer-btn-theme:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    transform: translateY(-1px);
}

.sidebar-footer-btn-logout {
    width: 100%;
    background: rgba(239, 68, 68, 0.2) !important;
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ff5252 !important;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-footer-btn-logout:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ============ MAIN CONTENT ============ */
.wp-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 40px;
    scroll-behavior: smooth;
}

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

.header-title {
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-title i {
    font-size: 28px;
    color: var(--accent-primary);
    background: var(--bg-card);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.header-title h2 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* BUTTONS & CONTROLS */
select, .btn-icon, .btn-outline, .btn-primary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
select {
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* Custom Select Architecture */
.custom-select-wrapper {
    position: relative;
    display: inline-block;
    min-width: 140px;
    font-family: Arial, sans-serif;
    vertical-align: middle;
}
.form-group .custom-select-wrapper,
div[style*="display: flex"] > .custom-select-wrapper {
    flex: 1;
    min-width: 0;
    width: 100%;
    display: block;
}

/* Uniform professional width for all filter dropdown boxes (same width as the longest label: ~190px) */
.header-actions .custom-select-wrapper,
.search-control .custom-select-wrapper,
.custom-select-wrapper:has(#filterAdvertiserAkun) {
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
    flex: none !important;
}

.custom-select-trigger {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 36px 10px 14px;
    border-radius: 8px; 
    font-size: 14px;
    font-weight: 500;
    font-family: Arial, sans-serif !important;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.04);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}

.custom-date-picker {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 8px; 
    font-size: 13px;
    font-weight: 600;
    font-family: Arial, sans-serif !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.04);
    min-width: 130px;
    text-align: center;
}

.custom-date-picker:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.custom-select-trigger::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%233B82F6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    transition: transform 0.3s ease;
}

.custom-select-wrapper:hover .custom-select-trigger {
    border-color: var(--accent-primary);
    background-color: var(--bg-card-hover);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background-color: var(--bg-card-hover);
}

.custom-select-wrapper.open .custom-select-trigger::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background-color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4), 0 5px 15px rgba(0,0,0,0.2);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
}

[data-theme="light"] .custom-select-options {
    background-color: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12), 0 5px 15px rgba(0,0,0,0.08);
}

.custom-select-wrapper.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-option {
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 500;
    font-family: Arial, sans-serif !important;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s ease;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.custom-option:last-child {
    margin-bottom: 0;
}

.custom-option:hover {
    background-color: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    transform: translateX(3px);
}

.custom-option.selected {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Legacy select overrides */
.action-select {
    display: none !important; /* Managed by JS now */
}

.btn-icon { padding: 10px; }
.btn-icon:hover, select:hover, .btn-outline:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
}
.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.text-blue { color: var(--accent-primary); }

/* ============ CARDS (Ringkasan) ============ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.summary-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0.8;
}

.summary-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-soft);
    border-color: var(--accent-primary);
}

.card-title {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -1px;
}
.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
}
.text-green { color: var(--accent-teal); font-weight: 600; }
.text-red { color: #EF4444; font-weight: 600; }

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(59, 130, 246, 0.05); /* slightly tinted bg */
    border: 1px solid var(--border-color);
}
[data-theme="light"] .card-icon {
    background: rgba(0, 0, 0, 0.02);
}

.bg-pink { color: #EC4899; box-shadow: 0 0 20px rgba(236, 72, 153, 0.1); }
.bg-blue { color: var(--accent-primary); box-shadow: 0 0 20px rgba(59, 130, 246, 0.1); }
.bg-teal { color: var(--accent-teal); box-shadow: 0 0 20px rgba(20, 184, 166, 0.1); }

/* ============ CHART SECTION ============ */
.chart-section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    transition: var(--transition);
}
.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}
.chart-container {
    position: relative;
    height: 380px;
    width: 100%;
}

/* ============ DATA SECTION (Tabel) ============ */
.data-section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    transition: var(--transition);
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    padding: 10px 16px;
    font-size: 14px;
    width: 250px;
    outline: none;
    transition: var(--transition);
}
.search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.wp-table, .data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.data-table th i { 
    margin-left: 8px; 
    cursor: pointer; 
    opacity: 0.5; 
    transition: var(--transition);
}
.data-table th i:hover { opacity: 1; }

.data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-primary);
    transition: var(--transition);
    white-space: nowrap;
}

.data-table tbody tr:hover td {
    background: rgba(59, 130, 246, 0.03);
}

.adv-col {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}
.adv-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
}

.table-footer {
    padding-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Sidebar Profile */
.sidebar-profile {
    margin-top: auto;
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}
.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
}
.btn-logout {
    background: #ef4444 !important;
    border: none;
    color: #ffffff !important;
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
}
.btn-logout:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
}
.profile-info {
    display: flex;
    flex-direction: column;
}
.profile-name {
    color: var(--sidebar-text);
    font-weight: 600;
    font-size: 14px;
}
.profile-role {
    color: var(--sidebar-text-secondary);
    font-size: 12px;
}

/* Settings Layout */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
.settings-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
}
.settings-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}
.business-profile {
    display: flex;
    gap: 40px;
}
/* Fix for SweetAlert2 page jump (heightAuto) */
html.swal2-height-auto, body.swal2-height-auto {
    height: 100% !important;
}
@media (max-width: 768px) {
    .business-profile { flex-direction: column; }
}
.business-logo {
    width: 250px;
    height: 250px;
    border-radius: 16px;
    background: rgba(59, 130, 246, 0.05);
    border: 2px dashed var(--accent-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    cursor: pointer;
    transition: var(--transition);
}
[data-theme="light"] .business-logo { background: rgba(0,0,0,0.02); }
.business-logo:hover {
    background: rgba(59, 130, 246, 0.1);
}
.business-logo i { font-size: 36px; margin-bottom: 12px; }
.business-logo span { font-size: 13px; font-weight: 500; }

.business-details {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.business-details .form-group.full { grid-column: span 2; }
.form-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}
[data-theme="light"] .form-input { background: rgba(0,0,0,0.02); }
.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
textarea.form-input { resize: vertical; }

/* Roles Table */
.role-select {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    width: 100%;
    outline: none;
}
[data-theme="light"] .role-select { background: rgba(0,0,0,0.05); }
.text-red { color: #EF4444 !important; }

/* ============ MODAL (FORM EDIT) ============ */
.wp-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}
.wp-modal.show { display: flex; }
.wp-modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 480px;
    max-width: 90%;
    border-radius: var(--border-radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.wp-modal-content.modal-pro {
    width: 780px !important;
    max-width: 95% !important;
    max-height: 90vh;
    overflow-y: auto;
}
.preset-btn {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(59, 130, 246, 0.2);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.preset-btn:hover {
    background: var(--primary-color);
    color: white;
}
.preset-btn-clear {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}
.preset-btn-clear:hover {
    background: #ef4444;
    color: white;
}
.live-kpi-box {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 130px;
}
[data-theme="light"] .live-kpi-box {
    background: rgba(0, 0, 0, 0.03);
}
@keyframes modalPop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.wp-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.wp-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}
.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}
.close-modal:hover { color: #EF4444; }

#editForm, #programForm, #akunForm { padding: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.form-group input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}
.form-group input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
.btn-cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.btn-cancel:hover { background: rgba(0,0,0,0.05); color: var(--text-primary); }

/* =========================================
   USER MANAGEMENT STYLES
   ========================================= */
.settings-card.full-width {
    grid-column: 1 / -1;
}

.user-management-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    align-items: start;
    margin-top: 15px;
}

@media (max-width: 900px) {
    .user-management-grid {
        grid-template-columns: 1fr;
    }
}

.user-form-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.user-table-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.user-form-card h4, .user-table-card h4 {
    margin: 0 0 20px 0;
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 600;
}

.role-pills {
    display: flex;
    gap: 10px;
}

.role-pill {
    cursor: pointer;
    position: relative;
    flex: 1;
}

.role-pill input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.role-pill span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.role-pill input:checked + span {
    background: rgba(43, 108, 176, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.badge-admin {
    background: rgba(43, 108, 176, 0.1);
    color: var(--accent-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-advertiser {
    background: #f1f5f9;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-cs {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.btn-icon-sm {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.btn-icon-sm:hover {
    background: #f1f5f9;
}
.btn-icon-sm.text-red {
    background: #ef4444;
    color: #ffffff !important;
    border-color: #ef4444;
}
.btn-icon-sm.text-red:hover {
    background: #dc2626;
}

/* =========================================
   PROFESSIONAL LOGIN PAGE STYLES (WHITE/LIGHT PREMIUM)
   ========================================= */
.login-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(124, 58, 237, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%);
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
    color: #1e293b;
}

/* Floating ambient glowing spheres */
.login-ambient-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    animation: floatShape 20s infinite alternate ease-in-out;
}
.shape-1 {
    width: 450px;
    height: 450px;
    background: linear-gradient(135deg, #60a5fa, #818cf8);
    top: -10%;
    left: -10%;
    opacity: 0.25;
}
.shape-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #a78bfa, #f472b6);
    bottom: -10%;
    right: -10%;
    opacity: 0.22;
    animation-delay: -5s;
}
.shape-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #38bdf8, #34d399);
    top: 40%;
    right: 20%;
    opacity: 0.18;
    animation-delay: -10s;
}

@keyframes floatShape {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -40px) scale(1.1); }
    100% { transform: translate(-30px, 30px) scale(0.95); }
}

.login-container {
    width: 100%;
    max-width: 460px;
    padding: 24px;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.login-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.5);
    padding: 44px 40px;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo-container {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px -6px rgba(37, 99, 235, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.login-card:hover .login-logo-container {
    transform: scale(1.05) rotate(-3deg);
}

.login-title {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.login-subtitle {
    margin: 8px 0 0;
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.5;
    font-weight: 400;
}

.login-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.4s ease-in-out;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

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

.login-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.3px;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 15px;
    transition: color 0.3s ease;
    pointer-events: none;
}

.input-icon-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    font-size: 14.5px;
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.input-icon-wrapper input::placeholder {
    color: #94a3b8;
}

.input-icon-wrapper input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.input-icon-wrapper input:focus ~ .input-icon,
.input-icon-wrapper input:not(:placeholder-shown) ~ .input-icon {
    color: #3b82f6;
}

.toggle-password {
    position: absolute;
    right: 16px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 15px;
    transition: color 0.3s ease;
}
.toggle-password:hover {
    color: #334155;
}

.login-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    font-size: 13px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}
.custom-checkbox input {
    display: none;
}
.checkmark {
    width: 18px;
    height: 18px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.custom-checkbox input:checked + .checkmark {
    background: #2563eb;
    border-color: #2563eb;
}
.custom-checkbox input:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    color: white;
}

.forgot-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}
.forgot-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
    background-size: 200% 200%;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.55);
}

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

.login-footer {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.login-footer p {
    margin: 0 0 6px;
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.login-footer span {
    font-size: 11px;
    color: #94a3b8;
}
