/* ============================================================
   Hairebel Creative Board — Dark Mode
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg: #0a0a0a;
    --bg-surface: #141414;
    --bg-card: #1a1a1a;
    --bg-hover: #222222;
    --bg-input: #1a1a1a;
    --border: #2a2a2a;
    --border-light: #222222;
    --text: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --white: #ffffff;
    --black: #000000;
    --gold: #c9a962;
    --gold-light: rgba(201, 169, 98, 0.12);
    --gold-border: rgba(201, 169, 98, 0.25);
    --green: #34d399;
    --green-light: rgba(52, 211, 153, 0.1);
    --red: #f87171;
    --red-light: rgba(248, 113, 113, 0.1);
    --blue: #60a5fa;
    --blue-light: rgba(96, 165, 250, 0.1);
    --orange: #fbbf24;
    --orange-light: rgba(251, 191, 36, 0.1);
    --purple: #a78bfa;
    --purple-light: rgba(167, 139, 250, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
    --transition: all 0.2s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--gold-light); color: var(--text); }

/* ============================================================
   HEADER
   ============================================================ */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    height: 56px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 24px; }
.header-right { display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; }
.logo img { height: 28px; width: auto; }
.header-divider { width: 1px; height: 20px; background: var(--border); }

/* Navigation */
.nav { display: flex; gap: 2px; }
.nav a {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: var(--transition);
}
.nav a:hover { color: var(--text); background: var(--bg-hover); text-decoration: none; }
.nav a.active { color: var(--white); background: var(--bg-hover); }

.user-badge {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}
.header-be-roas {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}
.header-be-roas strong {
    color: var(--gold);
    font-weight: 700;
    font-size: 13px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-card);
    color: var(--text);
    text-decoration: none;
}
.btn:hover { background: var(--bg-hover); border-color: #3a3a3a; text-decoration: none; }
.btn-primary {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}
.btn-primary:hover { background: #e0e0e0; border-color: #e0e0e0; }
.btn-gold {
    background: var(--gold);
    color: var(--black);
    border-color: var(--gold);
}
.btn-gold:hover { background: #b8952f; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-light); }
.btn-small { padding: 4px 10px; font-size: 12px; }
.btn-tiny { padding: 2px 8px; font-size: 11px; }
.btn-full { width: 100%; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
input[type="text"], input[type="password"], input[type="email"],
textarea, select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-light);
}
select option { background: var(--bg-card); color: var(--text); }
textarea { resize: vertical; line-height: 1.6; }
.hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
code { background: var(--bg-hover); padding: 2px 6px; border-radius: 4px; font-size: 12px; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 13px;
    border: 1px solid;
}
.alert-error { background: var(--red-light); color: var(--red); border-color: rgba(248,113,113,0.2); }
.alert-success { background: var(--green-light); color: var(--green); border-color: rgba(52,211,153,0.2); }
.alert-info { background: var(--blue-light); color: var(--blue); border-color: rgba(96,165,250,0.15); }
.alert-gold { background: var(--gold-light); color: var(--gold); border-color: var(--gold-border); }

/* ============================================================
   LOGIN & REGISTER
   ============================================================ */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg);
}
.login-box {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.login-box .login-logo { margin-bottom: 8px; }
.login-box .login-logo img { height: 40px; width: auto; }
.login-subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 14px;
}
.login-box .form-group { text-align: left; }
.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}
.login-footer a { color: var(--gold); font-weight: 500; }

/* ============================================================
   BOARD — Kanban
   ============================================================ */
.board {
    display: flex;
    gap: 12px;
    padding: 20px 16px;
    overflow-x: auto;
    min-height: calc(100vh - 56px);
    align-items: flex-start;
    background: var(--bg);
}
.board-column {
    min-width: 230px;
    max-width: 230px;
    flex-shrink: 0;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 14px;
    border-bottom: 1px solid var(--border-light);
    cursor: grab;
}
.column-header:active { cursor: grabbing; }
.column-ghost {
    opacity: 0.3;
    border: 2px dashed var(--gold) !important;
}
.column-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
}
.column-count {
    background: var(--bg-hover);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}
.column-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: none;
    border: none;
    color: #ff453a;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    padding: 0;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
}
.column-header:hover .column-delete-btn { opacity: 0.6; }
.column-delete-btn:hover { opacity: 1 !important; background: rgba(255,69,58,0.15); }
.column-cards {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 80px;
    flex-grow: 1;
}

/* Column top accents */
.board-column[data-status="planning"] { border-top: 2px solid var(--blue); }
.board-column[data-status="voice"] { border-top: 2px solid var(--purple); }
.board-column[data-status="voice review"] { border-top: 2px solid var(--orange); }
.board-column[data-status="editing"] { border-top: 2px solid var(--gold); }
.board-column[data-status="ready"] { border-top: 2px solid var(--green); }
.board-column[data-status="pending"] { border-top: 2px solid var(--text-muted); }
.board-column[data-status="approved"] { border-top: 2px solid var(--white); }
.board-column[data-status="published"] { border-top: 2px solid var(--green); }

/* Task Card */
.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.task-card:hover {
    border-color: #3a3a3a;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}
.task-card.sortable-ghost {
    opacity: 0.15;
    border: 2px dashed var(--gold);
    border-radius: 10px;
}
.task-card.sortable-chosen {
    box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 2px var(--gold);
    transform: scale(1.03);
    z-index: 100;
    cursor: grabbing;
}
.task-card.sortable-drag {
    opacity: 1 !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 0 2px var(--gold);
}
body.is-dragging .column-cards {
    min-height: 60px;
    border: 2px dashed transparent;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}
body.is-dragging .column-cards:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.04);
}
.card-drag-handle {
    position: absolute;
    bottom: 4px;
    left: 4px;
    color: var(--text-muted);
    font-size: 10px;
    cursor: grab;
    letter-spacing: -2px;
    line-height: 1;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition);
    user-select: none;
    opacity: 0.4;
}
.task-card:hover .card-drag-handle { opacity: 1; }
.card-drag-handle:hover {
    color: var(--gold);
    background: var(--bg-hover);
}
.card-drag-handle:active { cursor: grabbing; }
.card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    cursor: text;
}
.card-title:hover { color: var(--gold); }
.card-angle { font-size: 12px; color: var(--gold); font-weight: 500; margin-bottom: 6px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; }
.card-date { font-size: 11px; color: var(--text-muted); }
.card-assignee-tag {
    display: flex;
    align-items: center;
    gap: 6px;
}
.card-assignee {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--black);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.card-assignee-name {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-open {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
    cursor: pointer;
}
.card-open:hover { color: var(--gold); }
.add-column-btn {
    min-width: 120px !important;
    max-width: 120px !important;
    background: transparent !important;
    border: 2px dashed var(--border) !important;
    cursor: pointer;
}
.add-column-btn:hover { border-color: var(--gold) !important; }

/* Inline edit input */
.inline-edit-input {
    background: var(--bg-input);
    border: 1px solid var(--gold);
    border-radius: 4px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
    width: 100%;
    font-family: inherit;
}
.inline-title-input {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: var(--bg-input);
    border: 1px solid var(--gold);
    border-radius: 6px;
    color: var(--text);
    padding: 6px 10px;
    width: 100%;
    font-family: inherit;
}

/* ============================================================
   TASK DETAIL
   ============================================================ */
.task-nav-arrows {
    display: flex;
    gap: 4px;
}
.task-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 16px;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}
.task-nav-btn:hover {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}
.task-nav-btn.disabled {
    opacity: 0.2;
    pointer-events: none;
    cursor: default;
}

.task-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 0;
    min-height: calc(100vh - 56px);
}
.task-main { padding: 32px 40px; overflow-y: auto; }
.task-sidebar {
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

/* Status bar */
.task-status-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 32px; }
.status-pill {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.status-pill:hover { border-color: var(--gold); color: var(--text); }
.status-pill.active { background: var(--white); color: var(--black); border-color: var(--white); }

/* Sections */
.task-section { margin-bottom: 32px; }
.task-section h3 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.section-header h3 { margin-bottom: 0; }
.section-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
}
.section-edit { margin-top: 10px; }
.section-edit .btn { margin-top: 10px; margin-right: 8px; }
.script-text { max-height: 400px; overflow-y: auto; }
.text-muted { color: var(--text-muted); font-style: italic; }

/* Brief */
.brief-rendered { line-height: 1.8; }
.brief-rendered strong, .brief-rendered b {
    color: var(--gold);
    font-weight: 700;
}

/* Video */
.video-container {
    background: var(--black);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}
.inspiration-video { width: 100%; max-height: 400px; display: block; }

/* Files */
.files-list { margin-bottom: 14px; }
.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 6px;
    transition: var(--transition);
}
.file-item:hover { border-color: #3a3a3a; }
.file-icon { font-size: 16px; }
.file-name { font-size: 13px; flex-grow: 1; color: var(--text); font-weight: 500; }
.file-name:hover { color: var(--gold); }
.file-date { font-size: 11px; color: var(--text-muted); }
.upload-form { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.upload-form input[type="file"] { font-size: 12px; color: var(--text-secondary); }

/* Comments */
.comments-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    max-height: 400px;
}
.comment {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
}
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.comment-header strong { font-size: 13px; color: var(--gold); }
.comment-date { font-size: 11px; color: var(--text-muted); }
.comment-body { font-size: 13px; line-height: 1.6; white-space: pre-wrap; color: var(--text-secondary); }
.comment-form textarea { margin-bottom: 8px; }
.comment-form .btn { width: 100%; }

/* Task info */
.task-info { border-top: 1px solid var(--border); padding-top: 20px; }
.task-info h4 { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.task-info p { font-size: 13px; margin-bottom: 6px; color: var(--text-secondary); }
.task-info strong { color: var(--text); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h2 { font-size: 18px; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 24px; cursor: pointer; }
.modal-close:hover { color: var(--text); }

/* ============================================================
   ADMIN / USERS
   ============================================================ */
.admin-container { max-width: 800px; margin: 0 auto; padding: 40px 24px; }
.admin-container h2 { font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.users-list { margin-bottom: 48px; }
.users-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.users-table th, .users-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.users-table th { color: var(--text-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; }
.users-table tr:hover td { background: var(--bg-hover); }
.add-user-form {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

/* ============================================================
   CREATIVE WORKFLOW PAGES
   ============================================================ */
.page-container { max-width: 900px; margin: 0 auto; padding: 40px 24px; }
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 8px; }
.page-subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 32px; }

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card-header h3 { font-size: 16px; font-weight: 600; }
.card h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

/* Tabs */
.tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 3px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}
.tab {
    flex: 1;
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--bg-hover); color: var(--white); }

/* Results */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
}
.result-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.angle-badge {
    display: inline-block;
    background: var(--gold-light);
    color: var(--gold);
    border: 1px solid var(--gold-border);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}
.script-preview {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

/* Progress */
.progress-bar { width: 100%; height: 4px; background: var(--bg-hover); border-radius: 2px; overflow: hidden; margin: 16px 0; }
.progress-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width 0.3s ease; }

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Analysis output */
.analysis-output {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    max-height: 600px;
    overflow-y: auto;
}

/* Recommended angles */
.angles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}
.angle-chip {
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}
.angle-chip:hover, .angle-chip.selected {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--gold-light);
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.stat-card .stat-value { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* History table */
.history-table { width: 100%; border-collapse: collapse; }
.history-table th, .history-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.history-table th { color: var(--text-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.history-table tr:hover td { background: var(--bg-hover); }

/* Floating action button */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 40px;
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    z-index: 50;
}

/* ============================================================
   BREAK EVEN ROAS BANNER
   ============================================================ */
.be-roas-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}
.be-roas-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.be-roas-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.be-roas-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--gold);
}
.be-roas-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}

/* Metrics chips */
.metrics-required {
    margin-bottom: 16px;
}
.metrics-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}
.metrics-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.metric-chip {
    padding: 3px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================================
   EDITABLE FIELDS (click to edit)
   ============================================================ */
.editable-field { cursor: pointer; transition: var(--transition); }
.editable-field:hover {
    border-color: var(--gold-border);
    background: var(--bg-hover);
}
.editable-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    cursor: pointer;
}
.editable-title:hover { color: var(--gold); }

/* Assignee selector */
.assignee-selector select {
    max-width: 250px;
}

/* ============================================================
   DRAG & DROP ZONE
   ============================================================ */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    transition: var(--transition);
    margin-bottom: 16px;
    cursor: pointer;
}
.drop-zone:hover, .drop-zone-active {
    border-color: var(--gold);
    background: var(--gold-light);
}
.drop-zone-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 13px;
}
.drop-icon {
    font-size: 24px;
    font-weight: 300;
    color: var(--text-muted);
}

/* ============================================================
   MEDIA VIEWER
   ============================================================ */
.media-viewer {
    background: var(--black);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-viewer video,
.media-viewer img,
.media-viewer audio {
    max-width: 100%;
}

/* ============================================================
   REVIEW PAGE
   ============================================================ */
.review-card { transition: var(--transition); }
.review-card:hover { border-color: var(--gold-border); }

.review-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    background: var(--bg-surface);
    transition: var(--transition);
}
.review-item:hover { border-color: var(--border-light); }
.review-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.review-checkbox {
    display: flex;
    align-items: center;
}
.review-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--gold);
    cursor: pointer;
}
.review-item-body {}
.script-display {
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-height: 200px;
    overflow-y: auto;
}
.script-edit textarea {
    width: 100%;
    font-size: 13px;
    line-height: 1.5;
}

/* ============================================================
   CHAT
   ============================================================ */
.chat-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    min-height: calc(100vh - 56px);
}
.chat-main {
    display: flex;
    flex-direction: column;
}
.chat-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
}
.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 170px);
}
.chat-msg {
    max-width: 70%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
}
.chat-msg-own {
    align-self: flex-end;
    background: var(--gold-light);
    border-color: var(--gold-border);
}
.chat-msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 12px;
}
.chat-msg-header strong { font-size: 12px; color: var(--gold); }
.chat-msg-time { font-size: 10px; color: var(--text-muted); }
.chat-msg-body { font-size: 13px; line-height: 1.5; color: var(--text); white-space: pre-wrap; }
.chat-input-bar {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    align-items: flex-end;
}
.chat-input-bar { position: relative; }
.chat-input-bar textarea {
    flex-grow: 1;
    resize: none;
    min-height: 38px;
    max-height: 120px;
}
.emoji-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: var(--radius);
    transition: var(--transition);
}
.emoji-btn:hover { background: var(--bg-hover); }
.emoji-picker-container {
    position: absolute;
    bottom: 100%;
    left: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    max-width: 360px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    z-index: 100;
}
.emoji-item {
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    text-align: center;
    line-height: 1.2;
    transition: background 0.1s;
}
.emoji-item:hover { background: var(--bg-hover); }
.chat-sidebar {
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    padding: 20px 16px;
    overflow-y: auto;
}
.chat-member {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius);
    margin-bottom: 4px;
    transition: var(--transition);
}
.chat-member:hover { background: var(--bg-hover); }
.chat-member-active { background: var(--bg-hover); border-left: 2px solid var(--gold); }
.chat-member-self { opacity: 0.6; cursor: default !important; }
.dm-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
#dmConversation { display: flex; flex-direction: column; height: 100%; }
#dmMessages { flex: 1; overflow-y: auto; padding: 16px; }
.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ============================================================
   VOICE GENERATION
   ============================================================ */
.voice-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.voice-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}
.voice-select {
    flex: 1;
    max-width: 300px;
}
.voice-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    color: var(--gold);
    font-size: 13px;
}
.voice-player {
    margin-top: 12px;
}
.voice-player audio {
    border-radius: var(--radius);
}
.voice-error {
    margin-top: 12px;
    color: var(--red);
    font-size: 13px;
}
.voice-tips {
    background: var(--bg-card);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.voice-tips p { margin-bottom: 6px; }
.voice-tips ul { padding-left: 18px; margin: 0; }
.voice-tips li { margin-bottom: 2px; }
.voice-tips strong { color: var(--gold); }
.voice-script-area {
    margin-bottom: 12px;
}
.voice-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.voice-label .hint {
    font-weight: 400;
}

/* ============================================================
   RICH TEXT EDITOR (Brief)
   ============================================================ */
.rich-toolbar {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    align-items: center;
}
.toolbar-btn {
    width: 32px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}
.toolbar-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    color: var(--text);
}
.toolbar-highlight {
    background: #fde68a;
    color: var(--black);
    font-weight: 700;
    border-radius: 4px;
}
.toolbar-highlight:hover {
    background: #fcd34d;
    color: var(--black);
}
.toolbar-size {
    padding: 4px 8px;
    font-size: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    width: auto;
    min-width: 80px;
}
.rich-editor {
    min-height: 120px;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    color: var(--text);
    font-size: 14px;
    line-height: 1.7;
    outline: none;
    white-space: pre-wrap;
}
.rich-editor:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-light);
}

/* ============================================================
   ELEVENLABS STATUS
   ============================================================ */
.elevenlabs-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot-green { background: var(--green); }
.status-dot-red { background: var(--red); }

/* ============================================================
   CREATE PAGE SPACING FIX
   ============================================================ */
.angle-mode-content {
    margin-bottom: 24px;
}

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.lang-switch { display: flex; gap: 2px; background: var(--bg-input); border-radius: 6px; padding: 2px; }
.lang-btn {
    display: inline-block; padding: 4px 10px; border-radius: 4px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
    text-decoration: none; color: var(--text-muted); transition: all 0.15s ease;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.lang-active { background: var(--gold); color: #000; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .board { padding: 12px 8px; }
    .board-column { min-width: 200px; max-width: 200px; }
    .task-layout { grid-template-columns: 1fr; }
    .task-sidebar { border-left: none; border-top: 1px solid var(--border); }
    .chat-layout { grid-template-columns: 1fr; }
    .chat-sidebar { display: none; }
    .header { padding: 0 16px; }
    .nav { display: none; }
    .page-container { padding: 24px 16px; }
}
