/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --border: #475569;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 8px;
    --sidebar-w: 240px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== LAYOUT ===== */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
}

.sidebar-header { padding: 20px; border-bottom: 1px solid var(--border); }
.logo { font-size: 20px; font-weight: 700; color: var(--text); }
.logo span { color: var(--primary); }

.nav-menu { list-style: none; padding: 12px 0; flex: 1; }

.nav-link {
    display: block;
    padding: 8px 20px;
    color: var(--text-muted);
    font-size: 13px;
    transition: all 0.15s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); text-decoration: none; }

.nav-group { margin-top: 8px; }
.nav-group-title {
    display: block;
    padding: 8px 20px 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}
.nav-submenu { list-style: none; }
.nav-submenu .nav-link { padding-left: 32px; }

.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }
.nav-logout { color: var(--danger) !important; font-size: 12px; }

.content {
    flex: 1;
    margin-left: var(--sidebar-w);
    padding: 24px 32px;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}
.page-header-right { margin-top: 10px; }
.page-header-left { display: flex; align-items: center; gap: 12px; }
.page-header h2 { font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

.color-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    background: var(--bg-input);
    color: var(--text-muted);
}
.badge-free { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.cell-price { font-weight: 700; color: #f59e0b; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-veteran { background: rgba(251, 191, 36, 0.15); color: #fbbf24; font-size: 14px; padding: 1px 4px; vertical-align: middle; cursor: help; }

/* Status badges (ON / IDX / SC) */
.status-badges {
    display: inline-flex;
    gap: 4px;
    justify-content: center;
}
.status-badge {
    display: inline-block;
    width: 38px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 0;
    border-radius: 4px;
    letter-spacing: 0.02em;
}
.sb-on { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.sb-on-idx { background: rgba(20, 184, 166, 0.15); color: #14b8a6; }
.sb-on-sc { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.sb-off { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); }
.sb-off-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.btn:hover { background: var(--border); text-decoration: none; }

.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.85; }

.btn-outline { background: transparent; }
.btn-outline:hover { background: var(--bg-input); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }
.btn-full { width: 100%; }

/* ===== ALERTS ===== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
}
.alert-success { background: rgba(34, 197, 94, 0.15); color: var(--success); border: 1px solid rgba(34, 197, 94, 0.3); }
.alert-error { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.project-card h3 { font-size: 16px; margin-bottom: 8px; }
.project-money-site { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }

.stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}
.stat { text-align: center; flex: 1; }
.stat-value { display: block; font-size: 22px; font-weight: 700; }
.stat-label { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; }
.stat-warning { color: var(--warning); }
.stat-danger { color: var(--danger); }

.project-actions { display: flex; gap: 8px; }

/* ===== STATS BAR ===== */
.stats-bar {
    display: flex;
    gap: 16px;
    margin: 20px 0 40px;
}
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-height: 110px;
    position: relative;
    overflow: hidden;
    gap: 8px;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 12px 12px 0 0;
}
.stat-card:nth-child(1)::before {
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a78bfa);
}
.stat-card:nth-child(2)::before {
    background: linear-gradient(90deg, #059669, #10b981, #34d399);
}
.stat-card:nth-child(3)::before {
    background: linear-gradient(90deg, #6366f1, #10b981, #f59e0b, #ef4444);
}
.stat-card:nth-child(4)::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.stat-card:nth-child(5)::before {
    background: linear-gradient(90deg, #f97316, #ef4444);
}
.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}
.stat-sub {
    font-size: 12px;
    font-weight: 500;
    margin-top: auto;
}
.stat-sub-info { color: var(--primary); }
.stat-sub-warning { color: var(--warning); }

/* Action stat card (sync button) */
.stat-card-action {
    justify-content: center;
    gap: 6px;
}
.text-xs { font-size: 11px; }
.link-clickable { color: var(--accent); text-decoration: none; cursor: pointer; }
.link-clickable:hover { text-decoration: underline; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--accent); }
th.sortable .sort-arrow { font-size: 10px; margin-left: 2px; }
th.sortable.sort-asc .sort-arrow::after { content: '\25B2'; }
th.sortable.sort-desc .sort-arrow::after { content: '\25BC'; }

/* Stat card with 6 children gradient */
.stat-card:nth-child(6)::before {
    background: linear-gradient(90deg, #3b82f6, #6366f1);
}

/* Gauge card */
.stat-card-gauge {
    align-items: stretch;
    padding: 16px 20px;
}
.stat-card-gauge .stat-label {
    text-align: center;
}
.gauge-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
}
.gauge-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-gauge-refresh {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    margin-right: 4px;
    line-height: 1;
}
.btn-gauge-refresh:hover { color: var(--text-primary); }
.gauge-label {
    font-size: 11px;
    color: var(--text-muted);
    width: 48px;
    flex-shrink: 0;
    text-align: right;
}
.gauge-bar {
    flex: 1;
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}
.gauge-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}
.gauge-fill-online { background: #10b981; }
.gauge-fill-indexed { background: #3b82f6; }
.gauge-fill-sc { background: #f59e0b; }
.gauge-pct {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    width: 36px;
    flex-shrink: 0;
    text-align: right;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
}
.tab:hover {
    color: var(--text);
    background: var(--bg-input);
    text-decoration: none;
}
.tab-active {
    color: var(--text);
    background: var(--bg-input);
    border-color: var(--border);
    font-weight: 500;
}
.tab-count {
    font-size: 11px;
    background: rgba(255,255,255,0.08);
    padding: 1px 6px;
    border-radius: 10px;
    color: var(--text-muted);
}
.tabs-sites {
    margin-bottom: 4px;
    padding-bottom: 6px;
    align-items: center;
    border-bottom: none;
}
.tabs-sites .tab-active {
    border-bottom: 2px solid var(--primary);
}
.tabs-type-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 100px;
    font-weight: 500;
}
.badge-type-money_site { background: #2563eb22; color: #60a5fa; }
.badge-type-juice_booster { background: #f59e0b22; color: #fbbf24; }
.badge-type-tf_booster { background: #10b98122; color: #34d399; }
.color-dot-sm {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.tab-active .tab-count {
    background: var(--primary);
    color: #fff;
}

/* ===== TABLE ===== */
.table-container { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
}

.table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
    font-size: 13px;
}

.table tbody tr:hover { background: rgba(255,255,255,0.03); }

.table-compact th, .table-compact td { padding: 6px 10px; }

.sort-link { color: var(--text-muted); }
.sort-link:hover { color: var(--text); text-decoration: none; }

.text-center, .table th.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: #22c55e; font-size: 11px; }
.text-danger { color: #ef4444; font-size: 11px; }
.kw-pos-trend { font-size: 11px; white-space: nowrap; }

.cell-domain { font-weight: 500; white-space: nowrap; }
.cell-domain a { color: var(--primary); }
.filter-link {
    margin-left: 4px;
    font-size: 9px;
    color: var(--text-muted);
    opacity: 0.5;
    vertical-align: middle;
}
.filter-link:hover { opacity: 1; text-decoration: none; }
.tier-badge {
    font-size: 9px;
    background: var(--primary);
    color: #fff;
    padding: 0 4px;
    border-radius: 6px;
    margin-left: 1px;
    vertical-align: super;
}
.tier-parent {
    margin-bottom: 20px;
}
.tier-parent-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tier-parent-info .label {
    font-size: 12px;
    color: var(--text-muted);
}
.cell-url {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cell-actions { white-space: nowrap; text-align: center; }
.cell-actions > * { display: inline-block; margin: 0 2px; }

.inline-form { display: inline; }

/* ===== STATUS ICONS ===== */
.status-icon { font-size: 16px; display: inline-block; text-align: center; }
.status-ok { color: var(--success); }
.status-ko { color: var(--danger); }

/* ===== FORMS ===== */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 800px;
}

.form-group { margin-bottom: 16px; flex: 1; }
.form-group-sm { flex: 0 0 auto; min-width: 140px; }

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding-top: 20px;
}
.checkbox-label input[type="checkbox"] { width: auto; }

.form-row { display: flex; gap: 16px; }

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.cell-order {
    white-space: nowrap;
    width: 60px;
}
.btn-arrow {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    line-height: 1;
    transition: all 0.15s;
}
.btn-arrow:hover {
    color: var(--text);
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}
.input-readonly {
    background: var(--bg) !important;
    color: var(--text-muted) !important;
    cursor: pointer;
    font-size: 12px;
}

.form-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-top: 24px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sc-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}
.sc-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.sc-status-dot-ok { background: var(--success); }

.form-actions-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.form-actions-right {
    display: flex;
    gap: 12px;
}
.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}
.color-swatch {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    vertical-align: middle;
}

/* ===== BUDGET ===== */
.badge-expense { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-revenue { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.badge-auto { background: rgba(59, 130, 246, 0.15); color: var(--primary); font-size: 10px; padding: 1px 6px; margin-left: 4px; }
.text-expense { color: #f87171; }
.text-revenue { color: #4ade80; }
.stat-expense { color: #f87171; }
.stat-revenue { color: #4ade80; }
.budget-table { table-layout: fixed; width: 100%; }
.budget-table th:nth-child(1),
.budget-table td:nth-child(1) { width: 8%; white-space: nowrap; }
.budget-table th:nth-child(2),
.budget-table td:nth-child(2) { width: 7%; }
.budget-table th:nth-child(3),
.budget-table td:nth-child(3) { width: 10%; }
.budget-table th:nth-child(4),
.budget-table td:nth-child(4) { width: 35%; overflow: hidden; text-overflow: ellipsis; }
.budget-table th:nth-child(5),
.budget-table td:nth-child(5) { width: 17%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.budget-table th:nth-child(6),
.budget-table td:nth-child(6) { width: 10%; white-space: nowrap; text-align: right; }
.budget-table th:nth-child(7),
.budget-table td:nth-child(7) { width: 13%; text-align: center; }

/* Sites table */
.sites-table { width: auto; }
.sites-table th, .sites-table td { padding: 8px 12px; white-space: nowrap; }

/* ===== TWO COLUMNS ===== */
.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.two-columns h3 {
    font-size: 15px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* ===== BAR CHART ===== */
.bar-container {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bar {
    height: 6px;
    border-radius: 3px;
    min-width: 2px;
}
.bar-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ===== LOGIN ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 360px;
}

.login-title {
    font-size: 28px;
    text-align: center;
    margin-bottom: 32px;
}
.login-title span { color: var(--primary); }

/* ===== TABLE TOOLBAR ===== */
.table-toolbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.table-toolbar-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
}
.filter-tabs {
    display: flex;
    gap: 4px;
}
.filter-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    padding: 6px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}
.filter-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}
.filter-tab-active {
    background: var(--primary);
    color: #fff;
}
.filter-tab-active:hover {
    background: var(--primary);
    color: #fff;
}
.filter-right { display: flex; gap: 8px; align-items: center; }
.input-search { background: var(--bg-input); border: 1px solid var(--border); border-radius: 20px; color: var(--text); padding: 6px 16px; font-size: 13px; width: 220px; }
.input-search::placeholder { color: var(--text-muted); }
.input-search:focus { outline: none; border-color: var(--primary); }
.input-filter-select { background: var(--bg-input); border: 1px solid var(--border); border-radius: 20px; color: var(--text); padding: 6px 12px; font-size: 13px; cursor: pointer; }
.input-filter-select:focus { outline: none; border-color: var(--primary); }

/* ===== BACKLINK GROUPS ===== */
.group-header { background: var(--bg-card); }
.group-header td { padding: 8px 12px; font-weight: 600; border-bottom: 1px solid var(--border); }
.group-toggle { display: inline-block; width: 16px; font-size: 10px; transition: transform 0.2s; margin-right: 6px; cursor: pointer; padding: 4px; }
.group-toggle:hover { color: var(--primary); }
.group-header.collapsed .group-toggle { transform: rotate(-90deg); }
.group-target-link { color: var(--text); margin-right: 8px; }
.group-target-link:hover { color: var(--primary); }
.group-row { background: var(--bg); }
.group-row:hover { background: #1a2744; }
.group-row.hidden { display: none; }
.group-actions { margin-left: 12px; display: inline-flex; gap: 6px; }
.group-actions .btn { font-size: 11px; padding: 2px 8px; }
.group-actions-right { float: right; margin-left: 12px; }
.group-actions-right .btn { font-size: 11px; padding: 2px 8px; background: transparent; border: none; }
.btn-check-online, .btn-check-indexed { background: var(--bg-input); border: 1px solid var(--border); color: var(--text); cursor: pointer; border-radius: 4px; }
.btn-check-online:hover, .btn-check-indexed:hover { border-color: var(--primary); color: var(--primary); }
.btn-check-online.loading, .btn-check-indexed.loading { opacity: 0.6; cursor: wait; }
.group-last-check { margin-left: 12px; font-size: 11px; font-weight: 400; }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal { background: var(--bg-card); border-radius: var(--radius); width: 700px; max-width: 90vw; max-height: 80vh; display: flex; flex-direction: column; border: 1px solid var(--border); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 22px; cursor: pointer; padding: 0 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }
.modal-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.modal-table th, .modal-table td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.modal-table th { color: var(--text-muted); font-weight: 600; }
.modal-change-up { color: var(--success); }
.modal-change-down { color: var(--danger); }
.modal-no-change { color: var(--text-muted); }
.modal-summary { margin-bottom: 12px; font-size: 13px; }
.modal-summary strong { color: var(--text); }
.modal-info { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.modal-subhead { font-size: 10px; color: var(--text-muted); font-weight: 400; }
.status-badge.badge-changed { border: 2px solid #f59e0b; }
.modal-cooldown { font-size: 12px; color: #f59e0b; background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3); border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; }
.modal-cooldown-badge { font-size: 11px; color: #f59e0b; opacity: 0.8; }

/* ===== KEYWORDS ===== */
.kw-pos-top3 { background: rgba(34, 197, 94, 0.25); color: #4ade80; font-weight: 700; }
.kw-pos-top10 { background: rgba(59, 130, 246, 0.25); color: #60a5fa; font-weight: 600; }
.kw-pos-top30 { background: rgba(245, 158, 11, 0.25); color: #fbbf24; }
.kw-pos-bad { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.cell-keyword-name { font-weight: 500; }
.kw-reorder-btns { display: inline-flex; flex-direction: column; vertical-align: middle; margin-right: 6px; gap: 0; line-height: 1; }
.btn-kw-move { background: none; border: 1px solid var(--border); color: var(--text-muted); cursor: pointer; padding: 0 3px; font-size: 8px; line-height: 12px; border-radius: 3px; }
.btn-kw-move:hover { color: var(--accent); border-color: var(--accent); }
.kw-actions { margin-left: 8px; opacity: 0; transition: opacity 0.15s; }
tr:hover .kw-actions { opacity: 1; }
.btn-kw-action { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 2px 4px; font-size: 13px; }
.btn-kw-action:hover { color: var(--accent); }
.btn-kw-delete:hover { color: var(--danger, #ef4444); }

/* ===== RESPONSIVE ===== */
/* ===== SETTINGS ===== */
.form-settings { max-width: 600px; }
.settings-section { background: var(--bg-card); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.settings-section-title { margin-bottom: 4px; font-size: 16px; }
.settings-section-desc { margin-bottom: 16px; font-size: 13px; }
.settings-status { margin-top: 12px; padding: 10px 14px; background: var(--bg); border-radius: var(--radius); font-size: 13px; }
.form-control-sm { max-width: 120px; }
.form-actions { margin-top: 16px; }
.nav-settings { opacity: 0.7; font-size: 13px; }
.nav-settings:hover { opacity: 1; }

@media (max-width: 768px) {
    .sidebar { display: none; }
    .content { margin-left: 0; padding: 16px; }
    .form-row { flex-direction: column; }
    .two-columns { grid-template-columns: 1fr; }
    .stats-row { flex-wrap: wrap; }
}
