/* ============================================
   DeskRelief Dashboard Styles
============================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1e1e35;
    --surface: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --accent-1: #667eea;
    --accent-2: #764ba2;
    --accent-3: #f093fb;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-cool: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-success: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --green: #34d399;
    --red: #f87171;
    --yellow: #fbbf24;
    --blue: #60a5fa;
    --purple: #a78bfa;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --sidebar-width: 260px;
    --sidebar-collapsed: 0px;
    --topbar-height: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ============================================
   Sidebar
============================================ */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
}

.logo-icon { font-size: 1.4rem; }

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: none;
}

.sidebar-toggle:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 8px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(102, 126, 234, 0.12);
    color: var(--accent-1);
}

.nav-item svg {
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

/* ============================================
   Main Content
============================================ */
.main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    transition: var(--transition);
}

.topbar {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.topbar-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--mono);
}

.mobile-sidebar-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
}

.page-content {
    padding: 32px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Dashboard Overview Page
============================================ */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.metric-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

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

.metric-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
    font-family: var(--mono);
}

.metric-change {
    font-size: 0.8rem;
    font-weight: 600;
}

.metric-change.positive { color: var(--green); }
.metric-change.negative { color: var(--red); }

/* Two Column Layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.three-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

/* Cards */
.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.dash-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.dash-card-body {
    padding: 24px;
}

/* ============================================
   CRM Pipeline
============================================ */
.pipeline-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.pipeline-controls .btn-add {
    background: var(--gradient-primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.pipeline-controls .btn-add:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.pipeline-search {
    flex: 1;
    max-width: 300px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.pipeline-search:focus {
    border-color: var(--accent-1);
}

.pipeline-search::placeholder {
    color: var(--text-muted);
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
}

.kanban-column {
    min-width: 280px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 250px);
}

.kanban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.kanban-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.kanban-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.kanban-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--surface);
    padding: 2px 8px;
    border-radius: 12px;
}

.kanban-body {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.kanban-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.kanban-card-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.kanban-card-platform {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.kanban-card-pain {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.kanban-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kanban-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--mono);
}

.kanban-card-actions {
    display: flex;
    gap: 4px;
}

.kanban-card-actions button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    font-size: 0.75rem;
    transition: var(--transition);
}

.kanban-card-actions button:hover {
    color: var(--accent-1);
    background: rgba(102, 126, 234, 0.1);
}

/* ============================================
   Scoreboard
============================================ */
.scoreboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.score-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.score-card.achieved {
    border-color: rgba(52, 211, 153, 0.3);
}

.score-card.achieved::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-success);
}

.score-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px 0;
}

.score-input {
    width: 60px;
    padding: 8px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--mono);
    font-size: 1.3rem;
    font-weight: 700;
    outline: none;
    transition: var(--transition);
}

.score-input:focus {
    border-color: var(--accent-1);
}

.score-target {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.score-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 6px;
}

.score-divider {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Score Summary */
.score-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    margin-bottom: 32px;
}

.score-total {
    font-size: 4rem;
    font-weight: 900;
    font-family: var(--mono);
    line-height: 1;
    margin-bottom: 8px;
}

.score-total.perfect { 
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-total.good {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-total.needs-work {
    color: var(--yellow);
}

.score-total.poor {
    color: var(--red);
}

.score-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* History Table */
.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.history-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.history-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ============================================
   Scripts & Playbook Pages
============================================ */
.script-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    overflow: hidden;
}

.script-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.script-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.script-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
}

.script-tag {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.script-tag.hot {
    background: rgba(248, 113, 113, 0.1);
    color: var(--red);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.script-tag.essential {
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent-1);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.script-tag.money {
    background: rgba(52, 211, 153, 0.1);
    color: var(--green);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.script-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.script-section.open .script-toggle {
    transform: rotate(180deg);
}

.script-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.script-section.open .script-body {
    max-height: 2000px;
}

.script-content {
    padding: 24px;
}

.message-block {
    background: rgba(102, 126, 234, 0.06);
    border-left: 3px solid var(--accent-1);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 16px 20px;
    margin: 16px 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    position: relative;
}

.message-block.response {
    background: rgba(52, 211, 153, 0.06);
    border-left-color: var(--green);
}

.message-block.warning {
    background: rgba(248, 113, 113, 0.06);
    border-left-color: var(--red);
}

.message-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-1);
    margin-bottom: 8px;
}

.message-block.response .message-label {
    color: var(--green);
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font);
    transition: var(--transition);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.copy-btn.copied {
    color: var(--green);
    border-color: rgba(52, 211, 153, 0.3);
}

.script-note {
    padding: 12px 16px;
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--yellow);
    margin: 16px 0;
}

.script-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    margin-right: 8px;
    flex-shrink: 0;
}

.step-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
    padding-left: 36px;
}

/* ============================================
   Protocol Timeline
============================================ */
.protocol-timeline {
    position: relative;
    padding-left: 40px;
}

.protocol-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-1), var(--accent-2), var(--green));
    opacity: 0.3;
}

.protocol-step {
    position: relative;
    margin-bottom: 32px;
}

.protocol-step::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: 2px solid var(--bg-primary);
}

.protocol-time {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-1);
    font-family: var(--mono);
    margin-bottom: 6px;
}

.protocol-step h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.protocol-step p,
.protocol-step ul {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.protocol-step ul {
    list-style: none;
    padding: 0;
}

.protocol-step ul li {
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.protocol-step ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-1);
}

/* ============================================
   Client Journey / Lifecycle
============================================ */
.journey-stages {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.journey-stage {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
}

.journey-stage:hover {
    border-color: var(--border-hover);
}

.journey-num {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

.journey-info h4 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.journey-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.journey-action {
    font-size: 0.85rem;
    color: var(--accent-1);
    font-style: italic;
}

/* ============================================
   Weekly Review
============================================ */
.review-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.review-metric {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}

.review-metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.review-metric-value {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--mono);
}

.review-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.review-input {
    width: 50px;
    padding: 6px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--mono);
    font-size: 1.2rem;
    font-weight: 700;
    outline: none;
}

.review-input:focus {
    border-color: var(--accent-1);
}

.review-diagnose {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.review-diagnose h3 {
    margin-bottom: 16px;
}

.diagnose-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.diagnose-item:last-child {
    border-bottom: none;
}

.diagnose-label {
    flex-shrink: 0;
    width: 120px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.diagnose-check {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.weekly-insight {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.weekly-insight h3 {
    margin-bottom: 12px;
}

.insight-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    resize: vertical;
    outline: none;
    transition: var(--transition);
}

.insight-textarea:focus {
    border-color: var(--accent-1);
}

.insight-textarea::placeholder {
    color: var(--text-muted);
}

/* ============================================
   Modal
============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 4px;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: block;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
    border-color: var(--accent-1);
}

.modal-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23999' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.modal-form select option {
    background: var(--bg-card);
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-save {
    background: var(--gradient-primary);
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    transition: var(--transition);
}

.btn-save:hover {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.btn-cancel {
    background: transparent;
    color: var(--text-secondary);
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    cursor: pointer;
    font-family: var(--font);
    transition: var(--transition);
}

.btn-cancel:hover {
    background: var(--surface);
}

/* ============================================
   Responsive
============================================ */
@media (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .two-col,
    .three-col {
        grid-template-columns: 1fr;
    }
    .review-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main {
        margin-left: 0;
    }
    .mobile-sidebar-btn {
        display: block;
    }
    .topbar {
        padding: 0 16px;
    }
    .page-content {
        padding: 16px;
    }
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    .kanban-board {
        flex-direction: column;
    }
    .kanban-column {
        min-width: unset;
        max-height: 400px;
    }
    .scoreboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .review-metrics {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Scrollbar
============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   Buttons in dashboard
============================================ */
.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    transition: var(--transition);
}

.btn-primary-sm {
    background: var(--gradient-primary);
    color: white;
}

.btn-ghost-sm {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost-sm:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto;
}

/* Page intro */
.page-intro {
    margin-bottom: 32px;
}

.page-intro p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
}

/* Save indicator */
.save-indicator {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-size: 0.85rem;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.3s ease;
    z-index: 999;
    box-shadow: var(--shadow-md);
}

/* ============================================
   Outreach Command Center
============================================ */
.outreach-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.dm-progress {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    flex: 1;
    min-width: 280px;
}

.dm-progress-ring {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.dm-progress-ring svg {
    transform: rotate(-90deg);
}

.dm-progress-ring circle {
    fill: none;
    stroke-width: 6;
}

.dm-progress-ring .ring-bg {
    stroke: rgba(255, 255, 255, 0.06);
}

.dm-progress-ring .ring-fill {
    stroke: url(#progressGrad);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.dm-progress-count {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 1.2rem;
    font-weight: 800;
}

.dm-progress-info h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.dm-progress-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dm-progress-info .dm-streak {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--yellow);
    font-weight: 600;
}

.outreach-quick-stats {
    display: flex;
    gap: 12px;
}

.oq-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    text-align: center;
    min-width: 100px;
}

.oq-stat-val {
    font-family: var(--mono);
    font-size: 1.5rem;
    font-weight: 800;
    display: block;
}

.oq-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Main outreach layout */
.outreach-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

/* Search Panel */
.outreach-search-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.search-bar {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.search-bar input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--accent-1);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-bar select {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23999' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

.search-bar select option {
    background: var(--bg-card);
}

.search-bar button {
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.search-bar button:hover {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.search-bar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.subreddit-chips {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.sub-chip {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}

.sub-chip:hover, .sub-chip.active {
    background: rgba(102, 126, 234, 0.12);
    border-color: var(--accent-1);
    color: var(--accent-1);
}

/* Post Results */
.post-results {
    padding: 16px;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.post-results-header span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: var(--transition);
}

.post-card:hover {
    border-color: var(--border-hover);
}

.post-card.contacted {
    opacity: 0.5;
    border-left: 3px solid var(--green);
}

.post-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.post-sub {
    font-size: 0.75rem;
    color: var(--accent-1);
    font-weight: 600;
}

.post-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--mono);
}

.post-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.post-title a {
    color: var(--text-primary);
    transition: var(--transition);
}

.post-title a:hover {
    color: var(--accent-1);
}

.post-preview {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.post-actions button {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    border: none;
    transition: var(--transition);
}

.post-actions .btn-dm {
    background: var(--gradient-primary);
    color: white;
}

.post-actions .btn-dm:hover {
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.4);
}

.post-actions .btn-log {
    background: rgba(52, 211, 153, 0.1);
    color: var(--green);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.post-actions .btn-log:hover {
    background: rgba(52, 211, 153, 0.2);
}

.post-actions .btn-skip {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.post-actions .btn-skip:hover {
    color: var(--text-secondary);
}

.post-actions .btn-done {
    background: rgba(52, 211, 153, 0.1);
    color: var(--green);
    border: 1px solid rgba(52, 211, 153, 0.2);
    cursor: default;
}

/* Script sidebar */
.outreach-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.script-quick-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.script-quick-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.script-quick-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.quick-script-card {
    background: rgba(102, 126, 234, 0.06);
    border: 1px solid rgba(102, 126, 234, 0.12);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.quick-script-card:hover {
    border-color: var(--accent-1);
    background: rgba(102, 126, 234, 0.1);
}

.quick-script-card .qs-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-1);
    margin-bottom: 6px;
    display: block;
}

.quick-script-card .qs-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font);
    transition: var(--transition);
}

.quick-script-card .qs-copy:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.quick-script-card .qs-copy.copied {
    color: var(--green);
    border-color: rgba(52, 211, 153, 0.3);
}

/* Outreach Queue */
.outreach-queue {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.queue-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.queue-header h4 {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.queue-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--surface);
    padding: 2px 8px;
    border-radius: 10px;
}

.queue-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.queue-item-name {
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-item-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 8px;
}

.queue-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 8px;
}

.queue-item-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 4px 6px;
    border-radius: 4px;
    color: var(--text-muted);
    transition: var(--transition);
}

.queue-item-actions button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Loading state */
.search-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.search-loading .spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent-1);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.search-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.search-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Outreach nav highlight */
#nav-outreach {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: var(--radius-sm);
}

#nav-outreach.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.18), rgba(118, 75, 162, 0.18));
    border-color: rgba(102, 126, 234, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .outreach-layout {
        grid-template-columns: 1fr;
    }
    .outreach-header {
        flex-direction: column;
    }
    .outreach-quick-stats {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .outreach-quick-stats {
        flex-direction: column;
    }
    .search-bar {
        flex-direction: column;
    }
}

