/* ============================================
   SatFreq Admin Panel Styles
   ============================================ */

/* --- Admin Layout --- */
.admin-body { overflow-x: hidden; }

.admin-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* --- Sidebar --- */
.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s;
    z-index: 50;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
}
.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.nav-section { margin-bottom: 1rem; }
.nav-section-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 0 0.5rem;
    margin-bottom: 0.4rem;
    display: block;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}
.sidebar-link:hover { background: var(--bg-surface); color: var(--text-primary); }
.sidebar-link.active { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(59,130,246,0.2); }
.sidebar-logout { color: var(--danger); }
.sidebar-logout:hover { background: rgba(239,68,68,0.1); color: var(--danger); }
.nav-icon { font-size: 1rem; width: 1.25rem; text-align: center; }

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
}
.theme-toggle-sm {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.theme-toggle-sm:hover { border-color: var(--accent); color: var(--accent); }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: none; }

/* --- Admin Main --- */
.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    height: 60px;
}
.sidebar-toggle-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.1rem;
    display: none;
}
.topbar-breadcrumb { font-weight: 600; color: var(--text-secondary); font-size: 0.9rem; }
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.admin-user {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.3rem 0.75rem;
}

.admin-content { padding: 2rem 1.5rem; flex: 1; }

/* --- Dashboard Stats --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.stat-icon { font-size: 2rem; }
.stat-value { font-size: 2rem; font-weight: 800; font-family: 'JetBrains Mono', monospace; color: var(--accent); line-height: 1; }
.stat-name { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.2rem; }

/* --- Admin Cards --- */
.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}
.card-title { font-size: 1rem; font-weight: 700; margin: 0; }
.badge-count {
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 100px;
    padding: 0.1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

/* --- Admin Grid --- */
.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* --- List Items --- */
.list-items { padding: 0.5rem; }
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}
.list-item:hover { background: var(--bg-surface); }
.list-item-info { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.list-item-name { font-weight: 600; font-size: 0.9rem; }
.list-item-meta { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.list-item-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.list-logo { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; }
.empty-list { padding: 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.875rem; }
.empty-list a { color: var(--text-link); }

/* --- Quick Actions --- */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1.25rem;
}
.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}
.quick-action-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); transform: translateY(-2px); }
.qa-icon { font-size: 1.75rem; }

/* --- Sortable Lists --- */
.sortable-list {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-height: 60px;
}
.sortable-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}
.sortable-item:hover { border-color: var(--border-hover); }
.sortable-item.sortable-chosen { opacity: 0.8; transform: scale(1.02); box-shadow: var(--shadow); }
.sort-handle {
    cursor: grab;
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 0.25rem;
    user-select: none;
}
.sort-handle:active { cursor: grabbing; }
.item-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.item-name { font-weight: 600; font-size: 0.9rem; }
.item-meta { font-size: 0.75rem; color: var(--text-muted); width: 100%; }
.item-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }

/* --- Icon Buttons --- */
.btn-icon {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-family: inherit;
    color: var(--text-secondary);
}
.btn-icon:hover { border-color: var(--accent); background: var(--accent-glow); }
.btn-icon.btn-danger:hover { border-color: var(--danger); background: rgba(239,68,68,0.1); }

/* --- Admin Forms --- */
.admin-form { padding: 1.25rem; }
.form-group { margin-bottom: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.875rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.35rem; display: block; }
.form-hint a { color: var(--text-link); }
.form-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.form-section-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.5rem; }
.form-hint-block {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.875rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.form-hint-block a { color: var(--text-link); }

/* Checkbox */
.checkbox-row { display: flex; align-items: center; }
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    user-select: none;
}
.checkbox-label input[type="checkbox"] { display: none; }
.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--bg-input);
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.checkbox-label input:checked + .checkbox-custom {
    background: var(--accent);
    border-color: var(--accent);
}
.checkbox-label input:checked + .checkbox-custom::after {
    content: '✓';
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

/* --- Page Navigation --- */
.page-back {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.page-section-title { font-size: 1.1rem; font-weight: 700; flex: 1; }

/* --- Login Page --- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}
.login-container { width: 100%; max-width: 420px; }
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}
.login-header { text-align: center; margin-bottom: 2rem; }
.login-logo { display: flex; justify-content: center; margin-bottom: 1rem; }
.logo-icon-large { font-size: 3rem; }
.login-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.25rem; }
.login-subtitle { color: var(--text-muted); font-size: 0.9rem; }
.login-form .form-group { margin-bottom: 1.25rem; }
.input-with-toggle { position: relative; }
.input-with-toggle .form-control { padding-right: 2.5rem; }
.toggle-password {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
    padding: 0.2rem;
}
.recaptcha-container { display: flex; justify-content: center; }
.login-footer { text-align: center; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

/* --- Appearance Settings --- */
.theme-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.theme-option { cursor: pointer; }
.theme-option input { display: none; }
.theme-preview {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 80px;
    margin-bottom: 0.5rem;
    transition: border-color 0.2s;
}
.theme-option.selected .theme-preview, .theme-option:hover .theme-preview { border-color: var(--accent); }
.theme-preview-dark { background: #0a0e1a; }
.theme-preview-light { background: #f0f4ff; }
.tp-header { height: 14px; background: rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.08); }
.theme-preview-light .tp-header { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }
.tp-body { padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.tp-card { height: 12px; background: rgba(255,255,255,0.08); border-radius: 3px; }
.theme-preview-light .tp-card { background: rgba(0,0,0,0.06); }
.theme-label { font-size: 0.85rem; font-weight: 600; text-align: center; display: block; }

.preview-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.appearance-preview { padding: 1.25rem; }
.ap-note {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}
.current-settings { display: flex; flex-direction: column; gap: 0.75rem; }
.cs-item { display: flex; justify-content: space-between; align-items: center; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.cs-item:last-child { border-bottom: none; }
.cs-label { font-size: 0.85rem; color: var(--text-muted); }
.cs-value { font-size: 0.875rem; font-weight: 600; }

/* --- Responsive Admin --- */
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }
    .admin-sidebar.open { transform: translateX(0); }
    .sidebar-close { display: flex; }
    .sidebar-toggle-btn { display: flex; }
    .admin-grid-2 { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .admin-content { padding: 1.25rem 1rem; }
    .page-back { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .login-card { padding: 1.75rem 1.25rem; }
}

/* --- Frequency Encryption Toggle (seg control) --- */
.seg-control {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.seg-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-input);
    transition: all 0.2s;
    user-select: none;
    border: none;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--border); }
.seg-btn input { display: none; }
.seg-btn:hover { background: var(--bg-surface); color: var(--text-primary); }
.seg-btn.active {
    background: var(--accent);
    color: #fff;
}

/* --- Frequency Section Divider --- */
.freq-section-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.freq-section-divider::before,
.freq-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* --- Encryption mini badges (in list items) --- */
.enc-badge-mini {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}
.enc-yes  { background: rgba(245,158,11,0.15); color: var(--warning); border: 1px solid rgba(245,158,11,0.3); }
.enc-no   { background: rgba(34,197,94,0.12); color: var(--success); border: 1px solid rgba(34,197,94,0.25); }
.enc-prov { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(59,130,246,0.3); }

/* --- Form label optional hint --- */
.form-label-optional {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    margin-left: 0.25rem;
}

/* --- Sat link in table --- */
.sat-link { color: var(--text-link); font-weight: 600; font-size: 0.875rem; }
.sat-link:hover { color: var(--accent); }

/* --- Satellite filter chips bar --- */
.freq-sat-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* --- Quick freq add form toggle --- */
#qa-icon-* { transition: transform 0.2s; }

/* ── Ads & Widgets Admin Page ──────────────────────── */
.ads-stats-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.ads-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}
.ads-stat-num  { font-size: 2rem; font-weight: 800; font-family: 'JetBrains Mono', monospace; line-height: 1; }
.ads-stat-label{ font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 0.25rem; }

.ads-hint-box {
    background: rgba(59,130,246,0.07);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Zone list */
.ads-zones-list { padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }

.ads-zone-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.2s;
}
.ads-zone-item.zone-active  { border-color: rgba(34,197,94,0.4); }
.ads-zone-item.zone-open    { border-color: var(--accent); }

.ads-zone-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
    background: var(--bg-surface);
    gap: 1rem;
}
.ads-zone-header:hover { background: var(--bg-card-hover); }

.ads-zone-meta { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; }
.ads-zone-status { flex-shrink: 0; }

.zone-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}
.zone-on  { background: rgba(34,197,94,0.15);  color: var(--success); border: 1px solid rgba(34,197,94,0.3); }
.zone-off { background: var(--bg-input);        color: var(--text-muted); border: 1px solid var(--border); }

.ads-zone-name { font-weight: 700; font-size: 0.9rem; }
.ads-zone-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; }

.ads-zone-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.zone-expand-icon { color: var(--text-muted); font-size: 0.75rem; transition: transform 0.2s; margin-left: 0.25rem; }
.ads-zone-item.zone-open .zone-expand-icon { transform: rotate(180deg); }

.btn-toggle-on  { background: rgba(34,197,94,0.15);  color: var(--success); border: 1px solid rgba(34,197,94,0.3); }
.btn-toggle-off { background: rgba(59,130,246,0.1);  color: var(--accent);  border: 1px solid rgba(59,130,246,0.25); }
.btn-toggle-on:hover, .btn-toggle-off:hover { opacity: 0.85; }

/* Code editor area */
.ads-zone-editor {
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}
.ads-zone-form { padding: 1rem 1.25rem; }

.ads-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.ads-editor-label { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.ads-editor-hints { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.hint-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.hint-btn:hover { border-color: var(--accent); color: var(--accent); }

.ads-code-editor {
    width: 100%;
    min-height: 160px;
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: #e6edf3;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    tab-size: 2;
}
[data-theme="light"] .ads-code-editor { background: #f6f8fa; color: #24292f; }
.ads-code-editor:focus { border-color: var(--accent); }

.ads-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Preview */
.ads-preview-panel {
    border-top: 1px dashed var(--border);
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
}
.ads-preview-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.ads-preview-content {
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    min-height: 60px;
    background: var(--bg-card);
}

@media (max-width: 640px) {
    .ads-editor-footer { flex-direction: column; align-items: stretch; }
    .ads-editor-footer > div { justify-content: flex-end; }
}

/* ── Custom zone embed tag row ── */
.ads-embed-tag-row {
    background: rgba(59,130,246,0.06);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.ads-embed-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ads-embed-tag {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    flex-wrap: wrap;
}
.ads-embed-tag code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--text-primary);
    background: var(--bg-input);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    flex: 1;
    word-break: break-all;
}
.copy-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.copy-btn:hover { opacity: 0.85; }

/* ── Provider groups ── */
.prov-group-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}
.prov-group-icon { font-size: 1rem; }
.prov-group-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}
.prov-group-pos {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
}
.list-logo-placeholder {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border-radius: 6px;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   NOTICES ADMIN PAGE
   ══════════════════════════════════════════════════ */
.notices-preview-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.notices-preview-card {
    flex: 1;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
}
.notices-preview-card.notice-live {
    border-color: rgba(34,197,94,0.4);
    background: rgba(34,197,94,0.05);
}
.notice-status {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}
.notices-preview-card.notice-live .notice-status { color: var(--success); }
.notices-preview-card:not(.notice-live) .notice-status { color: var(--text-muted); }

.notice-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    font-family: 'JetBrains Mono', monospace;
}
.tag-live { background: rgba(34,197,94,0.15); color: var(--success); border:1px solid rgba(34,197,94,0.3); }
.tag-off  { background: var(--bg-input); color: var(--text-muted); border: 1px solid var(--border); }

.notices-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0 1.25rem;
    line-height: 1.6;
}
.form-hint-inline { color: var(--text-muted); font-size: 0.78rem; font-weight: 400; }

.form-row-checks {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

/* Announcement preview in admin */
.ann-preview-wrap {
    margin-bottom: 1.25rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.ann-preview {
    position: static !important;
    animation: none !important;
    transform: none !important;
}

/* Cookie preview in admin */
.cookie-preview-wrap {
    margin-bottom: 1.25rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}
.cookie-preview-static {
    position: static !important;
    animation: none !important;
    box-shadow: none !important;
}

/* ── Coverage map row: locked remove button ── */
.coverage-remove-locked {
    opacity: 0.25 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}
.coverage-remove-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

/* ── Expand/collapse all buttons ── */
.btn-sm { font-size: 0.75rem; padding: 0.2rem 0.45rem; }

/* ══════════════════════════════════════════════════
   PROVIDER ACCORDION (grouped by satellite)
   ══════════════════════════════════════════════════ */
.prov-accordion {
    padding: 0.5rem 0;
}

.prov-acc-group {
    border-bottom: 1px solid var(--border);
}
.prov-acc-group:last-child { border-bottom: none; }

.prov-acc-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    transition: background 0.15s;
    user-select: none;
}
.prov-acc-header:hover {
    background: var(--bg-surface);
}
.prov-acc-header.open {
    background: var(--accent-glow);
    color: var(--accent);
}

.prov-acc-chevron {
    font-size: 0.75rem;
    width: 14px;
    flex-shrink: 0;
    transition: transform 0.2s;
    color: var(--text-muted);
}
.prov-acc-header.open .prov-acc-chevron { color: var(--accent); }

.prov-acc-title { flex: 1; }

.prov-acc-pos {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
}

.prov-acc-count {
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.1rem 0.5rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    min-width: 22px;
    text-align: center;
}
.prov-acc-header.open .prov-acc-count {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.prov-acc-body {
    overflow: hidden;
    transition: max-height 0.25s cubic-bezier(0.4,0,0.2,1),
                opacity 0.2s ease;
    max-height: 2000px;
    opacity: 1;
}
.prov-acc-body.collapsed {
    max-height: 0;
    opacity: 0;
}

.prov-group-list {
    border-top: 1px solid var(--border);
    padding: 0.25rem 0;
}

/* ══════════════════════════════════════════════════
   ADMIN LANGUAGE TOGGLE — polished pill switcher
   ══════════════════════════════════════════════════ */
.admin-lang-toggle {
    display: flex;
    gap: 0.2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.2rem;
    align-items: center;
}
.admin-lang-pill {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    color: var(--text-muted);
    transition: all 0.18s;
    white-space: nowrap;
    text-decoration: none;
    letter-spacing: 0.01em;
}
.admin-lang-pill:hover {
    color: var(--text-secondary);
    background: var(--bg-card);
}
.admin-lang-pill.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}
.admin-lang-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 0.25rem 0.35rem 0.25rem 0.5rem;
    white-space: nowrap;
    border-right: 1px solid var(--border);
    margin-right: 0.1rem;
    letter-spacing: 0.01em;
}

/* ── Provider satellite filter bar ─────────────────────── */
.prov-filter-bar {
    padding: 0.75rem 1rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.prov-filter-select-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 380px;
    padding-bottom: 0.75rem;
}
.prov-filter-icon { font-size: 1rem; flex-shrink: 0; }
.prov-filter-select-wrap .form-control {
    font-size: 0.85rem;
    padding: 0.4rem 0.65rem;
    background: var(--bg-surface);
    font-weight: 500;
}

/* Group separator rows inside flat list */
.prov-group-sep {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem 0.4rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    user-select: none;
}
.prov-group-sep-label { flex: 1; }

/* Empty filtered message */
.prov-empty-filtered {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Coverage map rows — visual improvements */
.coverage-map-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
    transition: border-color 0.15s;
}
.coverage-map-row:focus-within { border-color: var(--accent); }
.coverage-map-num {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 48px;
}
.coverage-map-row .form-control {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.2rem 0.4rem;
    font-size: 0.85rem;
}
.coverage-map-row .form-control:focus { box-shadow: none; outline: none; }

/* ══════════════════════════════════════════════════
   PAGES ADMIN — Editor & List
   ══════════════════════════════════════════════════ */

/* List page — status badges */
.page-status-badge {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    padding: 0.18rem 0.55rem;
    border-radius: 100px;
    white-space: nowrap;
}
.status-pub   { background: rgba(34,197,94,0.12); color: var(--success); border:1px solid rgba(34,197,94,0.25); }
.status-draft { background: var(--bg-surface); color: var(--text-muted); border: 1px solid var(--border); }

.page-row-icon { font-size: 1.25rem; flex-shrink: 0; }

/* Editor layout */
.page-editor-layout { display: flex; flex-direction: column; gap: 1.25rem; }
.page-editor-form   { display: flex; flex-direction: column; gap: 1.25rem; }
.page-meta-card .card-header { border-bottom: 1px solid var(--border); }
.page-meta-body { padding: 1.25rem; }

/* Slug field */
.slug-input-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-input, var(--bg-surface));
}
.slug-prefix {
    padding: 0.6rem 0.75rem;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}
.slug-input {
    border: none !important;
    border-radius: 0 !important;
    flex: 1;
    background: var(--bg-input, var(--bg-surface));
}

/* Sections container */
.sections-container {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.75rem 1.25rem;
    min-height: 3rem;
}

/* Individual section block */
.section-block {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    overflow: hidden;
    transition: box-shadow 0.18s;
}
.section-block:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.12); }

.section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    cursor: grab;
    user-select: none;
}
.section-type-icon  { font-size: 1rem; flex-shrink: 0; }
.section-type-label { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary);
                      text-transform: uppercase; letter-spacing: 0.06em; flex: 1; }

.section-controls { display: flex; gap: 0.2rem; margin-left: auto; }
.section-ctrl-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s;
}
.section-ctrl-btn:hover:not(:disabled) {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--text-muted);
}
.section-ctrl-btn:disabled { opacity: 0.3; cursor: default; }
.section-ctrl-btn.remove-section:hover { background: rgba(239,68,68,0.1); color: var(--danger); border-color: rgba(239,68,68,0.3); }

.section-body { padding: 1rem; }
.section-textarea { font-size: 0.9rem; line-height: 1.7; resize: vertical; }
.section-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.6;
    resize: vertical;
    background: #0f0f14;
    color: #a5f3fc;
    border-color: rgba(165,243,252,0.15);
}

/* Link rows inside link section */
.link-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed var(--border);
}
.link-row:last-child { border-bottom: none; margin-bottom: 0; }
.link-row-fields {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}
.link-icon-input { max-width: 120px; }

/* Section add toolbar */
.section-add-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.25rem 1.25rem;
    border-top: 1px dashed var(--border);
    margin-top: 0.25rem;
}
.section-add-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 0.25rem;
}
.section-type-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
    white-space: nowrap;
}
.section-type-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

/* Save bar */
.page-save-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: sticky;
    bottom: 1rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

@media (max-width: 700px) {
    .link-row-fields { grid-template-columns: 1fr; }
    .page-save-bar   { flex-wrap: wrap; }
    .section-add-toolbar { gap: 0.35rem; }
    .section-type-btn { font-size: 0.78rem; padding: 0.35rem 0.65rem; }
}

/* ══════════════════════════════════════════════════
   PAGES ADMIN — Editor layout
   ══════════════════════════════════════════════════ */

.page-editor-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.page-editor-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.page-meta-body { padding: 0 1.25rem 1.25rem; }

/* Slug input with /page/ prefix */
.slug-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-input);
}
.slug-prefix {
    padding: 0.5rem 0.6rem;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.slug-input {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    flex: 1;
}
.slug-input:focus { box-shadow: none !important; }

/* ── Sections container ── */
.sections-container {
    min-height: 80px;
    padding: 0.5rem 1rem 0;
}
.sections-container:empty::after {
    content: attr(data-empty);
    display: block;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 1.5rem 0;
}

/* Individual section block */
.section-block {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.85rem;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.section-block:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    cursor: default;
    user-select: none;
}
.section-type-icon  { font-size: 1rem; }
.section-type-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex: 1;
}
.section-controls {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}
.section-ctrl-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    width: 28px; height: 28px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex; align-items: center; justify-content: center;
}
.section-ctrl-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}
.section-ctrl-btn:disabled { opacity: 0.3; cursor: default; }
.remove-section:hover:not(:disabled) {
    border-color: var(--danger) !important;
    color: var(--danger) !important;
    background: rgba(239,68,68,0.08) !important;
}
.section-body { padding: 0.9rem 1rem; }
.section-textarea {
    font-family: 'Exo 2', sans-serif;
    line-height: 1.7;
    resize: vertical;
}
.section-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.6;
    resize: vertical;
    background: #0d1117;
    color: #c9d1d9;
    border-color: #30363d;
}
.section-code:focus { border-color: var(--accent) !important; }

/* Link rows */
.link-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.6rem 0.7rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.link-row-fields {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}
.link-icon-input { grid-column: span 1; }

/* Add-section toolbar */
.section-add-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid var(--border);
}
.section-add-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 0.25rem;
}
.section-type-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex; align-items: center; gap: 0.35rem;
}
.section-type-btn:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(99,102,241,0.2);
}

/* Save bar */
.page-save-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: sticky;
    bottom: 1rem;
    z-index: 50;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.25);
}

/* Page list status badges */
.page-status-badge {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    white-space: nowrap;
}
.status-pub   { background: rgba(34,197,94,0.12); color: var(--success); border: 1px solid rgba(34,197,94,0.25); }
.status-draft { background: var(--bg-surface); color: var(--text-muted); border: 1px solid var(--border); }
.page-row-icon { font-size: 1.4rem; flex-shrink: 0; }

/* ══════════════════════════════════════════════════
   FOOTER ADMIN — editor layout & components
   ══════════════════════════════════════════════════ */

/* ── Live preview strip ────────────────────────── */
.footer-admin-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1.1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.fap-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    flex-shrink: 0;
}
.fap-cols {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    flex-wrap: wrap;
}
.fap-col {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
    transition: border-color 0.15s;
}
.fap-col:not(.fap-disabled) { border-color: rgba(99,102,241,0.3); }
.fap-disabled { opacity: 0.45; }
.fap-col-title { font-weight: 700; color: var(--text-primary); }
.fap-col-count { color: var(--text-muted); }
.fap-auto-badge {
    font-size: 0.65rem;
    font-weight: 800;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 3px;
    padding: 0.05rem 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.fap-view-btn { margin-left: auto; flex-shrink: 0; }

/* ── Two-column layout ─────────────────────────── */
.footer-admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.25rem;
    align-items: start;
}
.footer-admin-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.footer-admin-main    { min-width: 0; }

@media (max-width: 900px) {
    .footer-admin-layout { grid-template-columns: 1fr; }
}

/* ── Column accordion ──────────────────────────── */
.footer-col-accordion {
    display: flex;
    flex-direction: column;
}
.fcol-acc-item {
    border-bottom: 1px solid var(--border);
}
.fcol-acc-item:last-child { border-bottom: none; }

.fcol-acc-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}
.fcol-acc-header:hover { background: var(--bg-surface); }
.fcol-acc-header.open  { background: var(--bg-surface); }

.fcol-sort-handle {
    color: var(--text-muted);
    cursor: grab;
    flex-shrink: 0;
    font-size: 1rem;
    padding: 0 0.1rem;
}
.fcol-header-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex-wrap: wrap;
}
.fcol-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.fcol-type-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.fcol-auto   { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(99,102,241,0.25); }
.fcol-custom { background: rgba(34,197,94,0.1); color: var(--success); border: 1px solid rgba(34,197,94,0.25); }
.fcol-tr-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
}
.fcol-header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}
.fcol-link-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    padding-right: 0.25rem;
}
.fcol-acc-chevron {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.22s;
    width: 12px;
    text-align: center;
}

/* Accordion body */
.fcol-acc-body {
    overflow: hidden;
    max-height: 1200px;
    transition: max-height 0.3s ease;
}
.fcol-acc-body.collapsed { max-height: 0; }

/* Edit column title row */
.fcol-edit-row {
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}
.fcol-title-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.fcol-title-form .form-control-sm { flex: 1; min-width: 120px; }

/* Auto notice */
.fcol-auto-notice {
    padding: 0.85rem 1rem;
    font-size: 0.83rem;
    color: var(--text-muted);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    font-style: italic;
}

/* Link rows inside column */
.fcol-link-list { padding: 0.25rem 0; }
.fcol-link-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.12s;
}
.fcol-link-row:hover { background: var(--bg-surface); }
.fcol-link-row:last-child { border-bottom: none; }
.fcol-link-row.link-disabled { opacity: 0.45; }

.fcol-lnk-icon { font-size: 1rem; flex-shrink: 0; width: 22px; text-align: center; }
.fcol-lnk-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}
.fcol-lnk-label { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.fcol-lnk-tr    { font-size: 0.72rem; color: var(--text-muted); font-style: italic; }
.fcol-lnk-url   { font-size: 0.75rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace;
                   white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.fcol-new-tab   { font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; }
.btn-muted      { opacity: 0.4; }

/* Add link form area */
.fcol-add-link-form {
    border-top: 1px dashed var(--border);
    margin-top: 0.25rem;
}
.fcol-add-link-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1rem;
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--accent);
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}
.fcol-add-link-toggle:hover { background: var(--accent-glow); }
.fcol-add-chevron { margin-left: auto; font-size: 0.7rem; }

.fcol-add-link-body { padding: 0.85rem 1rem 1rem; background: var(--bg-surface); }
.fcol-add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0.5rem; }
.fcol-add-checks { margin-bottom: 0.75rem; }

@media (max-width: 600px) {
    .fcol-add-grid { grid-template-columns: 1fr; }
}

/* ── Edit Link Modal ───────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
    animation: modalFade 0.18s ease;
}
@keyframes modalFade { from { opacity:0; } to { opacity:1; } }

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 520px;
    animation: modalSlide 0.22s cubic-bezier(0.16,1,0.3,1);
    overflow: hidden;
}
@keyframes modalSlide { from { transform: translateY(16px); opacity:0; } to { transform: none; opacity:1; } }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
}
.modal-header h3 { font-size: 1rem; font-weight: 700; margin: 0; color: var(--text-primary); }
.modal-close {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: all 0.15s;
}
.modal-close:hover { background: rgba(239,68,68,0.1); color: var(--danger); border-color: rgba(239,68,68,0.3); }
.modal-form { padding: 1.25rem; }

/* ══════════════════════════════════════════════════
   MENU ADMIN — nav menu editor
   ══════════════════════════════════════════════════ */

/* ── Nav preview bar ─────────────────────────────── */
.menu-preview-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1.1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.menu-preview-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    flex-shrink: 0;
}
.menu-preview-items {
    display: flex;
    gap: 0.4rem;
    flex: 1;
    flex-wrap: wrap;
}
.menu-preview-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--bg-surface);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 20px;
    padding: 0.25rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
}
.menu-preview-pill.pill-off {
    opacity: 0.4;
    border-color: var(--border);
}
.pill-type {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 400;
    font-style: italic;
}

/* ── Layout ──────────────────────────────────────── */
.menu-admin-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.25rem;
    align-items: start;
}
.menu-admin-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.menu-admin-main    { min-width: 0; }
@media (max-width: 900px) {
    .menu-admin-layout { grid-template-columns: 1fr; }
}

/* ── Menu item rows ──────────────────────────────── */
.menu-item-list { padding: 0.25rem 0; }
.menu-item-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.12s;
}
.menu-item-row:hover { background: var(--bg-surface); }
.menu-item-row:last-child { border-bottom: none; }
.menu-item-disabled { opacity: 0.45; }

.menu-item-type-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.menu-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.06rem;
}
.menu-item-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}
.menu-item-tr {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
}
.menu-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.menu-item-url {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
}
.menu-newtab-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.menu-hint {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px dashed var(--border);
}

/* ══════════════════════════════════════════════════
   CONTACT ADMIN — contact form editor
   ══════════════════════════════════════════════════ */

.contact-admin-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.25rem;
    align-items: start;
}
.contact-admin-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-admin-main    { min-width: 0; }
@media (max-width: 960px) {
    .contact-admin-layout { grid-template-columns: 1fr; }
}

/* ── Live preview card ───────────────────────────── */
.contact-preview-card .card-header { border-bottom: 1px solid var(--border); }
.contact-preview-body {
    padding: 1.5rem;
    background: var(--bg-surface);
    border-radius: 0 0 var(--radius) var(--radius);
}
/* Override form styles in preview to be more compact */
.contact-preview-body .contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    pointer-events: none;
    user-select: none;
}
.contact-preview-body .contact-header { margin-bottom: 1rem; }
.contact-preview-body .contact-title  { font-size: 1.2rem; }

/* ── Field rows ──────────────────────────────────── */
.contact-field-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.12s;
}
.contact-field-row:hover { background: var(--bg-surface); }
.contact-field-row:last-child { border-bottom: none; }
.field-disabled { opacity: 0.45; }

.contact-field-type-badge {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: var(--accent-glow);
    border: 1px solid rgba(99,102,241,0.25);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
}
.contact-field-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}
.contact-field-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}
.contact-field-tr {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
}
.contact-field-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Tag for active/off status in card header */
.notice-tag {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tag-live { background: rgba(34,197,94,0.12); color: var(--success); border: 1px solid rgba(34,197,94,0.3); }
.tag-off  { background: rgba(239,68,68,0.1);  color: var(--danger);  border: 1px solid rgba(239,68,68,0.2); }

/* ══════════════════════════════════════════════════
   MESSAGES INBOX
   ══════════════════════════════════════════════════ */

/* Sidebar unread badge */
.sidebar-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* Badge variants */
.badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.badge-success { background: rgba(34,197,94,0.12); color: var(--success); border: 1px solid rgba(34,197,94,0.3); }
.badge-muted   { background: var(--bg-surface); color: var(--text-muted); border: 1px solid var(--border); }
.badge-unread  { background: var(--danger); color: #fff; font-size: 0.7rem; padding: 0.1rem 0.5rem; border-radius: 999px; margin-left: 0.4rem; }

/* Two-pane layout */
.msg-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 900px) { .msg-layout { grid-template-columns: 1fr; } }

.msg-list-card { padding: 0; overflow: hidden; }
.msg-list-card .card-header { padding: 1rem 1.25rem; }

/* Bulk actions bar */
.msg-bulk-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
}
.btn-danger-outline {
    background: none;
    border: 1px solid rgba(239,68,68,0.35);
    color: var(--danger);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.75rem;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-danger-outline:hover { background: rgba(239,68,68,0.08); border-color: var(--danger); }

/* Message list */
.msg-list { display: flex; flex-direction: column; }
.msg-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: background 0.14s;
    position: relative;
}
.msg-row:last-child { border-bottom: none; }
.msg-row:hover { background: var(--bg-surface); }
.msg-row.msg-active { background: var(--accent-glow); border-left: 3px solid var(--accent); }

.msg-row-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: transparent;
    flex-shrink: 0;
    margin-top: 5px;
    transition: background 0.15s;
}
.dot-unread { background: var(--accent); box-shadow: 0 0 6px rgba(59,130,246,0.5); }

.msg-row-body { flex: 1; min-width: 0; }
.msg-row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin-bottom: 0.15rem; }
.msg-row-from  { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-read .msg-row-from { font-weight: 500; color: var(--text-secondary); }
.msg-row-time  { font-size: 0.7rem; color: var(--text-muted); flex-shrink: 0; }
.msg-row-email { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.15rem; }
.msg-row-preview { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.msg-unread .msg-row-preview { color: var(--text-secondary); }
.msg-row-star { color: #f59e0b; font-size: 0.9rem; flex-shrink: 0; margin-top: 2px; }

/* Empty state */
.msg-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.msg-empty-icon { font-size: 2.5rem; }

/* Detail panel */
.msg-detail-card { padding: 0; overflow: hidden; }

.msg-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
    flex-wrap: wrap;
}
.msg-detail-meta {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}
.msg-detail-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.msg-detail-from  { font-size: 1rem; font-weight: 800; color: var(--text-primary); }
.msg-detail-email { font-size: 0.82rem; color: var(--accent); margin-bottom: 0.2rem; }
.msg-detail-email a { color: var(--accent); text-decoration: none; }
.msg-detail-email a:hover { text-decoration: underline; }
.msg-detail-time  { font-size: 0.75rem; color: var(--text-muted); }

.msg-detail-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.btn-star-on { color: #f59e0b !important; }

/* Field values */
.msg-detail-fields {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.msg-detail-field {}
.msg-detail-field-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.msg-detail-field-value {
    font-size: 0.92rem;
    color: var(--text-primary);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Tech details */
.msg-tech-details {
    margin: 0 1.5rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.msg-tech-details summary {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-surface);
    user-select: none;
    list-style: none;
}
.msg-tech-details summary::-webkit-details-marker { display: none; }
.msg-tech-body {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: var(--bg-card);
}
.msg-tech-body code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
}

/* Placeholder */
.msg-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 320px;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}
.msg-placeholder-icon { font-size: 3rem; }

/* ══════════════════════════════════════════════════
   SMTP SETTINGS
   ══════════════════════════════════════════════════ */

.smtp-info-banner {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: rgba(59,130,246,0.07);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.smtp-info-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.smtp-info-banner a { color: var(--accent); }

.smtp-presets {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.smtp-presets-label { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.smtp-preset-btn {
    padding: 0.3rem 0.8rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}
.smtp-preset-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
@media (max-width: 700px) { .form-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .form-grid-3 { grid-template-columns: 1fr; } }

.smtp-form-actions { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

.smtp-test-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border);
}
.smtp-test-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}
.smtp-test-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}
.smtp-test-form .form-control { flex: 1; min-width: 220px; }
.smtp-test-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.smtp-test-hint a { color: var(--accent); }
