/* ============================================
   ClickPass - Campaign Tracker Stylesheet
   Dark header, data-dense dashboard style
   ============================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #eef1f5;
    color: #333;
    line-height: 1.4;
    min-height: 100vh;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Layout ---- */
#app { display: flex; flex-direction: column; min-height: 100vh; }

/* Header */
#header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 48px;
}
.logo {
    font-size: 20px;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none !important;
    letter-spacing: 1px;
}
.header-right { display: flex; gap: 15px; align-items: center; font-size: 13px; }
.header-right a { color: #a0aec0; }
.header-right a:hover { color: #fff; text-decoration: none; }
.user-info { color: #63b3ed; font-weight: 500; }

/* Navigation Tabs */
#nav {
    background: linear-gradient(to bottom, #2d3748, #1a202c);
    display: flex;
    padding: 0 10px;
    border-bottom: 2px solid #4a5568;
    overflow-x: auto;
}
#nav a {
    color: #cbd5e0;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    text-decoration: none;
}
#nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
#nav a.active {
    color: #fff;
    border-bottom-color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    font-weight: 600;
}

/* Main Content - full width */
#content { flex: 1; padding: 16px 20px; width: 100%; }

/* Footer */
#footer {
    background: #1a202c;
    color: #718096;
    padding: 10px 20px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
}

/* ---- Content Boxes ---- */
.content-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    padding: 20px;
    margin-bottom: 20px;
}
.content-box h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #0f172a;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}
.content-box h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 15px 0 8px;
    color: #2d3748;
}

/* ---- Filter Bar ---- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 15px;
    padding: 14px 16px;
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}
.filter-bar-multi .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    width: 100%;
    margin-bottom: 8px;
}
.filter-bar-multi .filter-row:last-child { margin-bottom: 0; }
.filter-group { display: flex; flex-direction: column; gap: 3px; }
.filter-group label { font-size: 11px; color: #718096; font-weight: 600; text-transform: uppercase; }
.filter-group select, .filter-group input { font-size: 13px; padding: 5px 8px; border: 1px solid #cbd5e0; border-radius: 3px; background: #fff; }
.filter-group select { min-width: 140px; }
.filter-checks label { font-size: 12px; display: flex; align-items: center; gap: 4px; color: #4a5568; cursor: pointer; }
.input-sm { width: 120px; }
.input-date { width: 140px; }
.custom-dates { display: none; align-items: flex-end; gap: 8px; }
.custom-dates.visible { display: flex; }
.filter-group textarea {
    font-size: 13px;
    padding: 5px 8px;
    border: 1px solid #cbd5e0;
    border-radius: 3px;
    background: #fff;
    font-family: 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
    resize: vertical;
    min-height: 60px;
}

/* ---- Bulk Actions Bar ---- */
.bulk-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}
.bulk-actions { display: flex; gap: 8px; align-items: center; }
.bulk-actions select { font-size: 13px; padding: 5px 10px; border: 1px solid #cbd5e0; border-radius: 4px; background: #fff; }
.bulk-right { display: flex; gap: 12px; align-items: center; }
.camp-count {
    font-size: 12px;
    color: #475569;
    background: #e2e8f0;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 600;
}

/* ---- Data Tables ---- */
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th {
    background: linear-gradient(to bottom, #2d3748, #1a202c);
    border: 1px solid #2d3748;
    padding: 9px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    color: #e2e8f0;
    white-space: nowrap;
    position: sticky;
    top: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.data-table td {
    border: 1px solid #e2e8f0;
    padding: 7px 10px;
    vertical-align: middle;
}
/* Zebra striping */
.data-table tbody tr:nth-child(odd) { background: #fff; }
.data-table tbody tr:nth-child(even) { background: #f7fafc; }
.data-table tbody tr:hover { background: #ebf4ff; }
.data-table tbody tr.row-inactive { opacity: 0.5; background: repeating-linear-gradient(135deg, transparent, transparent 10px, rgba(0,0,0,0.02) 10px, rgba(0,0,0,0.02) 20px); }
.data-table tbody tr.row-inactive:nth-child(even) { background: repeating-linear-gradient(135deg, #f7fafc, #f7fafc 10px, rgba(0,0,0,0.03) 10px, rgba(0,0,0,0.03) 20px); }
.data-table tbody tr.row-converted { background: #f0fff4 !important; }
.data-table-sm td { padding: 4px 8px; font-size: 12px; }
.data-table-sm th { padding: 6px 8px; font-size: 11px; }

.col-check { width: 30px; text-align: center; }
.col-id { width: 50px; }
.col-name { min-width: 200px; max-width: 350px; }
.col-name-text { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-type { width: 50px; }
.col-group { width: 60px; }
.col-source { width: 100px; }
.col-num { width: 75px; text-align: right; white-space: nowrap; }
.col-actions { width: 200px; }
.col-actions-cell { white-space: nowrap; }

.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; white-space: nowrap; }

.empty-row { text-align: center; color: #a0aec0; padding: 30px !important; font-style: italic; }
.totals-row { background: #edf2f7 !important; }
.totals-row td { border-top: 2px solid #2d3748; font-weight: 600; }

/* Sortable headers */
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { background: rgba(255,255,255,0.1); }

/* ---- Badges ---- */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #edf2f7;
    color: #4a5568;
}
.badge-group { background: #dbeafe; color: #1e40af; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-grey { background: #e2e8f0; color: #64748b; }
.badge-active { background: #dcfce7; color: #166534; }
.badge-inactive { background: #fef3c7; color: #92400e; }
.badge-redirect { background: #e0e7ff; color: #3730a3; font-size: 9px; }

/* ---- Action Buttons ---- */
.action-btns { display: flex; gap: 4px; flex-wrap: nowrap; }
.act-btn {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    display: inline-block;
    font-family: inherit;
    transition: all 0.15s;
}
.act-btn:hover { background: #e2e8f0; text-decoration: none; color: #1e293b; }
.act-btn-link { color: #2563eb; }
.act-btn-link:hover { background: #dbeafe; color: #1d4ed8; }
.act-btn-edit { color: #d97706; }
.act-btn-edit:hover { background: #fef3c7; color: #b45309; }
.act-btn-stats { color: #0891b2; }
.act-btn-stats:hover { background: #cffafe; color: #0e7490; }
.act-del { color: #dc2626; }
.act-del:hover { background: #fee2e2; color: #b91c1c; }

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    font-family: inherit;
    line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn-primary:hover { background: #1d4ed8; }
.btn-outline { background: #fff; color: #4a5568; border-color: #cbd5e0; }
.btn-outline:hover { background: #f7fafc; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-xs { padding: 2px 8px; font-size: 11px; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---- Forms ---- */
.form-section { margin-bottom: 20px; border-bottom: 1px solid #e2e8f0; padding-bottom: 15px; }
.form-group { margin-bottom: 12px; display: flex; flex-direction: column; gap: 3px; }
.form-group label { font-size: 12px; font-weight: 600; color: #4a5568; }
.form-group input, .form-group select, .form-group textarea {
    padding: 8px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
    background: #fff;
    transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #63b3ed;
    outline: none;
    box-shadow: 0 0 0 3px rgba(66,153,225,0.15);
}
.form-group small { font-size: 11px; color: #a0aec0; }
.form-row { display: flex; gap: 15px; }
.form-row .half { flex: 1; }
.form-row .third { flex: 1; }
.form-row .quarter { flex: 1; }
.form-actions { display: flex; gap: 10px; margin-top: 15px; }
.input-wide { max-width: 600px; }
.inline-form { margin-bottom: 20px; padding: 12px; background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 4px; }
.inline-form .form-row { align-items: flex-end; }
.checkbox-label { display: flex !important; align-items: center; gap: 6px; cursor: pointer; font-weight: 400 !important; }
.checkbox-label input { width: auto; }

/* ---- Campaign URLs display ---- */
.campaign-urls {
    background: linear-gradient(to right, #0f172a, #1e293b);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}
.url-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.url-row:last-child { margin-bottom: 0; }
.url-row label { font-size: 11px; font-weight: 700; color: #94a3b8; min-width: 100px; text-transform: uppercase; letter-spacing: 0.3px; }
.url-row code {
    background: rgba(255,255,255,0.06);
    color: #34d399;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.08);
}
.campaign-urls .btn { background: #475569; color: #e2e8f0; border-color: #64748b; }
.campaign-urls .btn:hover { background: #64748b; }

/* ---- Report Tabs ---- */
.report-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}
.tab-btn {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #718096;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    text-decoration: none;
}
.tab-btn:hover { color: #2563eb; text-decoration: none; }
.tab-btn.tab-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* ---- Info Box ---- */
.info-box {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #2a4365;
}
.info-box code {
    background: #1a202c;
    color: #68d391;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

/* ---- Info Table (settings) ---- */
.info-table { width: 100%; border-collapse: collapse; }
.info-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
}
.info-table td:first-child { font-weight: 600; color: #4a5568; width: 200px; }
.info-table code {
    background: #f7fafc;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 12px;
    word-break: break-all;
}

/* ---- Settings Grid ---- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.settings-section {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 16px;
}
.settings-section h3 { margin-top: 0; }

/* ---- Money Colors ---- */
.money.pos { color: #15803d; font-weight: 600; }
.money.neg { color: #dc2626; font-weight: 600; }
.pct.pos { color: #15803d; font-weight: 600; }
.pct.neg { color: #dc2626; font-weight: 600; }

/* ---- Flash Messages ---- */
.flash {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 13px;
    font-weight: 500;
    border-left: 4px solid transparent;
}
.flash-success { background: #f0fdf4; color: #166534; border-color: #22c55e; border-right: 1px solid #bbf7d0; border-top: 1px solid #bbf7d0; border-bottom: 1px solid #bbf7d0; }
.flash-error { background: #fef2f2; color: #991b1b; border-color: #ef4444; border-right: 1px solid #fecaca; border-top: 1px solid #fecaca; border-bottom: 1px solid #fecaca; }
.flash-info { background: #eff6ff; color: #1e40af; border-color: #3b82f6; border-right: 1px solid #bfdbfe; border-top: 1px solid #bfdbfe; border-bottom: 1px solid #bfdbfe; }

/* ---- Pagination ---- */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 15px;
}
.pagination a {
    padding: 5px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 3px;
    font-size: 13px;
    color: #4a5568;
    text-decoration: none;
}
.pagination a:hover { background: #edf2f7; }
.pagination a.active { background: #2563eb; color: #fff; border-color: #2563eb; }

/* ---- Login Page ---- */
.login-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
.login-box, .install-box {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    width: 420px;
    max-width: 95%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.install-box { width: 550px; }
.login-logo {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
}
.login-subtitle {
    text-align: center;
    color: #a0aec0;
    font-size: 14px;
    margin-bottom: 25px;
}
.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin: 20px 0 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

/* System check (install) */
.sys-check { margin-bottom: 15px; }
.check-item { font-size: 13px; padding: 4px 0; }
.check-item.ok { color: #22543d; }
.check-item.fail { color: #c53030; font-weight: 600; }
.install-done { text-align: center; padding: 20px 0; }
.install-done h3 { margin-bottom: 10px; }
.install-done p { color: #718096; margin-bottom: 20px; }

/* ---- Modal / Overlay ---- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}
.modal-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    width: 600px;
    max-width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.25s ease;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(to bottom, #f8fafc, #fff);
    border-radius: 10px 10px 0 0;
}
.modal-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}
.modal-close:hover { color: #334155; }
.modal-body { padding: 20px; }
.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 10px 10px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Test Redirect Results */
.test-redirect-result {
    margin-top: 12px;
}
.test-result-item {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
    background: #f8fafc;
}
.test-result-item:last-child { margin-bottom: 0; }
.test-result-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 100px;
    padding-top: 2px;
}
.test-result-value {
    font-size: 13px;
    color: #1e293b;
    word-break: break-all;
    flex: 1;
}
.test-result-value code {
    background: #1e293b;
    color: #34d399;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
    max-width: 100%;
    overflow-wrap: break-word;
}
.test-status-ok {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.test-status-warn {
    background: #fffbeb;
    border-color: #fde68a;
}
.test-status-error {
    background: #fef2f2;
    border-color: #fecaca;
}
.test-redirect-info {
    font-size: 12px;
    color: #64748b;
    padding: 10px 0 0;
    line-height: 1.5;
}
.test-redirect-loading {
    text-align: center;
    padding: 30px;
    color: #64748b;
    font-size: 13px;
}
.test-redirect-loading .spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-bottom: 8px;
}

/* ---- iMobiTrax-style Form Sections ---- */
.form-panel {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}
.form-panel-header {
    background: linear-gradient(to bottom, #2d3748, #1a202c);
    color: #e2e8f0;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.form-panel-header:hover { background: linear-gradient(to bottom, #374151, #1f2937); }
.form-panel-toggle { font-size: 11px; color: #94a3b8; transition: transform 0.2s; }
.form-panel.collapsed .form-panel-toggle { transform: rotate(-90deg); }
.form-panel.collapsed .form-panel-body { display: none; }
.form-panel-body { padding: 16px; background: #fff; }

/* Radio groups (iMobiTrax style) */
.radio-group { display: flex; gap: 0; }
.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.15s;
    margin-right: -1px;
}
.radio-group label:first-child { border-radius: 4px 0 0 4px; }
.radio-group label:last-child { border-radius: 0 4px 4px 0; }
.radio-group input[type="radio"] { width: auto; margin: 0; accent-color: #2563eb; }
.radio-group label:has(input:checked) {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
    font-weight: 600;
    z-index: 1;
}

/* ---- Multi-Offer Section ---- */
.offers-container { }
.offer-row {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #fff;
    position: relative;
    transition: box-shadow 0.15s;
}
.offer-row:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.offer-row.offer-inactive { opacity: 0.5; background: #f8fafc; }
.offer-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.offer-row-num {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #2563eb;
    padding: 2px 8px;
    border-radius: 3px;
    min-width: 60px;
    text-align: center;
}
.offer-row-num.offer-num-inactive {
    background: #94a3b8;
}
.offer-row-actions { display: flex; gap: 6px; align-items: center; }
.offer-row .form-row { gap: 10px; }
.offer-row .form-group { margin-bottom: 8px; }
.offer-row .form-group label { font-size: 11px; }
.offer-row .form-group input,
.offer-row .form-group select {
    padding: 6px 8px;
    font-size: 13px;
}

/* Split weight visual bar */
.split-bar-wrap { margin-top: 12px; }
.split-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}
.split-bar-segment {
    height: 100%;
    transition: width 0.3s ease;
}
.split-bar-legend {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.split-bar-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #64748b;
}
.split-bar-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.split-total {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}
.split-total.split-ok { color: #059669; }
.split-total.split-warn { color: #d97706; }
.split-total.split-error { color: #dc2626; }

.btn-add-offer {
    background: #059669;
    color: #fff;
    border-color: #059669;
    margin-top: 4px;
}
.btn-add-offer:hover { background: #047857; }
.btn-remove-offer {
    background: none;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-remove-offer:hover { background: #fee2e2; }

/* Button for test redirect */
.btn-test {
    background: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
}
.btn-test:hover { background: #6d28d9; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Campaign Form Boxed Layout ---- */
.campaign-form-box {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #d1d5db;
    box-shadow: 0 4px 12px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.04);
}
.campaign-form-box h2 {
    text-align: center;
    font-size: 20px;
    margin-bottom: 20px;
}
.campaign-form-box .form-panel {
    border: 1px solid #cbd5e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.campaign-form-box .form-panel-body {
    padding: 20px 24px;
}
.campaign-form-box .form-actions {
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    margin-top: 20px;
}
.campaign-form-box .campaign-urls {
    border-radius: 10px;
    padding: 18px 20px;
}
.campaign-form-box .offer-row {
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: #fafbfc;
}
.campaign-form-box .offer-row:hover {
    background: #fff;
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(37,99,235,0.08);
}
.campaign-form-box .info-box {
    border-radius: 8px;
}
.campaign-form-box .split-bar-wrap {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
    .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    #nav { flex-wrap: wrap; }
    .filter-bar { flex-direction: column; }
    .form-row { flex-direction: column; gap: 0; }
    .table-wrap { font-size: 12px; }
    .col-name { min-width: 150px; }
}