/* ===== MyExpense Admin — Premium Dark Theme ===== */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-input: #0f172a;
    --bg-sidebar: #0c1222;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --danger: #ef4444;
    --danger-hover: #f87171;
    --success: #22c55e;
    --warning: #f59e0b;
    --info: #3b82f6;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --sidebar-width: 260px;
    --transition: 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ===== LOGIN ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow), 0 0 60px rgba(99, 102, 241, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== SIDEBAR ===== */
.sidebar-body {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: width var(--transition);
}

.sidebar-header {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-item.active {
    color: white;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.nav-item.active i {
    color: var(--accent);
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.sidebar-user i {
    font-size: 20px;
    color: var(--accent);
}

.sidebar-actions {
    display: flex;
    gap: 8px;
}

.sidebar-actions a,
.sidebar-logout {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-size: 14px;
    text-decoration: none;
}

.sidebar-actions a:hover,
.sidebar-logout:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    padding: 16px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.sidebar-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    display: none;
}

.sidebar-toggle:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    flex: 1;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-badge {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.topbar-badge i {
    margin-right: 4px;
}

.content-body {
    padding: 24px 28px;
}

.content-header-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card-purple::before {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.stat-card-blue::before {
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.stat-card-green::before {
    background: linear-gradient(90deg, #22c55e, #10b981);
}

.stat-card-orange::before {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card-purple .stat-icon {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.stat-card-blue .stat-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.stat-card-green .stat-icon {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.stat-card-orange .stat-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

.stat-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.stat-link:hover {
    color: var(--accent-hover);
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-header h3 i {
    margin-right: 8px;
    color: var(--accent);
}

.card-body {
    padding: 20px;
}

/* ===== TABLE ===== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: rgba(99, 102, 241, 0.03);
}

.table code {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-green {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-yellow {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-gray {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group .hint {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 12px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 60px;
}

.code-textarea {
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 13px;
    line-height: 1.5;
    tab-size: 2;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .col-half {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 24px;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 28px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.section-title i {
    color: var(--accent);
    margin-right: 6px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 12px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* ===== ALERTS ===== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-dismissible {
    position: relative;
}

.alert-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar-body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .topbar {
        padding: 12px 16px;
    }

    .content-body {
        padding: 16px;
    }
}

.sidebar-collapsed .sidebar {
    width: 68px;
}

.sidebar-collapsed .sidebar-title,
.sidebar-collapsed .nav-item span,
.sidebar-collapsed .sidebar-user span {
    display: none;
}

.sidebar-collapsed .sidebar-header {
    justify-content: center;
}

.sidebar-collapsed .main-content {
    margin-left: 68px;
}

/* ==========================================================
   ADS CONFIGURATION EDITOR
   ========================================================== */

/* Tab Bar */
.tab-bar {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-btn {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: white;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.tab-panel {
    display: none;
    animation: fadeIn 0.25s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Panel Grid */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Config Card */
.config-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.config-card .card-header h3 {
    font-size: 15px;
}

.card-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 400;
}

/* Toggle Switch */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}

.toggle-row:last-child {
    border-bottom: none;
}

.toggle-info {
    flex: 1;
    padding-right: 16px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.toggle-label i {
    color: var(--accent);
    width: 18px;
    text-align: center;
}

.toggle-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.4;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border);
    border-radius: 26px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked ~ .toggle-slider {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.toggle-switch input:checked ~ .toggle-slider::before {
    transform: translateX(22px);
}

/* Input with Unit */
.input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-unit .form-control {
    padding-right: 50px;
}

.input-unit {
    position: absolute;
    right: 12px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    pointer-events: none;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Platform Selector */
.platform-selector {
    display: flex;
    gap: 12px;
}

.platform-option {
    cursor: pointer;
    flex: 1;
}

.platform-option input {
    display: none;
}

.platform-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.platform-card i {
    font-size: 24px;
}

.platform-option input:checked+.platform-card {
    border-color: var(--accent);
    color: white;
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.2);
}

.platform-option input:checked+.platform-card i {
    color: var(--accent);
}

.platform-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
}

/* Ad Unit Cards Grid */
.adunits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
}

.adunit-card .card-body {
    padding: 16px;
}

.adunit-field {
    margin-bottom: 12px;
}

.adunit-field:last-child {
    margin-bottom: 0;
}

.adunit-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.adunit-field label i {
    color: var(--accent);
    width: 14px;
    text-align: center;
    font-size: 11px;
}

.mono-input {
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 12px;
    letter-spacing: -0.3px;
}

/* Screen Ads Matrix Table */
.matrix-table {
    min-width: 650px;
    border-collapse: separate;
    border-spacing: 0;
}

.matrix-table th,
.matrix-table td {
    text-align: center;
    padding: 14px 16px;
}

.matrix-table th:first-child,
.matrix-table td:first-child {
    text-align: left;
    padding-left: 20px;
}

.matrix-table thead th {
    background: rgba(99, 102, 241, 0.05);
    border-bottom: 2px solid var(--border);
    vertical-align: middle;
}

.matrix-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 70px;
}

.matrix-header i {
    font-size: 18px;
    color: var(--accent);
}

.matrix-header span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
}

.screen-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    white-space: nowrap;
}

.screen-name i {
    color: var(--accent);
    margin-right: 8px;
}

.matrix-cell {
    position: relative;
}

.matrix-cell.dimmed {
    opacity: 0.35;
}

.matrix-table tbody tr:hover td {
    background: rgba(99, 102, 241, 0.04);
}

.matrix-check {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.matrix-check input {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.matrix-check input:checked+.checkmark {
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}

.matrix-check input:checked+.checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    color: white;
}

.checkmark:hover {
    border-color: var(--accent);
}

/* Rules Grid */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
}

.rule-card .card-body {
    padding: 16px;
}

.rule-field {
    margin-bottom: 14px;
}

.rule-field:last-child {
    margin-bottom: 0;
}

.rule-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}

/* Save Bar */
.save-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    margin-top: 32px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    z-index: 40;
}

.save-bar-right {
    display: flex;
    gap: 10px;
}

.btn-glow {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.btn-glow:hover {
    box-shadow: 0 0 28px rgba(99, 102, 241, 0.5);
}

/* Responsive - Ads Editor */
@media (max-width: 768px) {
    .tab-bar {
        flex-wrap: nowrap;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .tab-btn span {
        display: none;
    }

    .panel-grid {
        grid-template-columns: 1fr;
    }

    .adunits-grid {
        grid-template-columns: 1fr;
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }

    .platform-selector {
        flex-direction: column;
    }

    .save-bar {
        flex-direction: column;
        gap: 10px;
    }

    .matrix-table {
        font-size: 12px;
    }
}

/* Ads Summary Cards */
.ads-summary-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.ads-summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ads-summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.ads-summary-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.ads-summary-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* Slot Pills */
.slot-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.slot-pill {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.slot-on {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.slot-off {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.15);
    text-decoration: line-through;
    opacity: 0.6;
}

/* ==========================================================
   DASHBOARD
   ========================================================== */

/* Welcome Banner */
.welcome-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px 28px;
    margin-bottom: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #8b5cf6, #ec4899);
}

.welcome-text h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.welcome-text p {
    font-size: 14px;
    color: var(--text-secondary);
}

.welcome-actions {
    display: flex;
    gap: 8px;
}

/* Two Column Dashboard */
.dashboard-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Quick Actions */
.quick-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition);
    border: 1px solid transparent;
}

.quick-action-item:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.15);
    transform: translateX(4px);
}

.quick-action-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.quick-action-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.quick-action-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
}

.quick-action-arrow {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 12px;
    transition: all var(--transition);
}

.quick-action-item:hover .quick-action-arrow {
    color: var(--accent);
    transform: translateX(2px);
}

/* Responsive - Dashboard */
@media (max-width: 900px) {
    .dashboard-two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .welcome-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .welcome-text h2 {
        font-size: 18px;
    }
}