/* Cold Calling Dialer — Dark UI */

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

:root {
    --bg: #F8F9FC;
    --surface: #FFFFFF;
    --surface2: #F1F3F9;
    --border: #E4E7EC;
    --border-light: #D0D5DD;
    --text: #1D2939;
    --text2: #667085;
    --text3: #98A2B3;
    --accent: #4A6CF7;
    --accent2: #4A6CF7;
    --accent-glow: rgba(74,108,247,0.08);
    --green: #12B76A;
    --green-glow: rgba(18,183,106,0.08);
    --orange: #F79009;
    --red: #F04438;
    --hot: #EF6820;
    --blue: #2E90FA;
    --blue-glow: rgba(46,144,250,0.08);
    --radius: 8px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(16,24,40,0.05);
    --shadow-lg: 0 4px 8px rgba(16,24,40,0.1);
}

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

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

/* ═══════════════════════════════════════════
   APP LAYOUT (sidebar + main)
   ═══════════════════════════════════════════ */

.app-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    box-shadow: 1px 0 0 var(--border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 36px;
}
.brand-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--text);
    line-height: 1;
}
.brand-sub {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: var(--text2);
    text-transform: uppercase;
    margin-top: 2px;
}
.brand-separator {
    width: 30px;
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}
.brand-powered {
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--text3);
    margin-top: 4px;
}

.sidebar-nav { margin-bottom: 32px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius);
    color: var(--text2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
    transition: all 0.15s;
}
.nav-item:hover { color: var(--text); background: var(--surface2); }
.nav-item.active {
    color: var(--accent2);
    background: var(--accent-glow);
    box-shadow: inset 3px 0 0 var(--accent);
}
.nav-icon { font-size: 14px; width: 18px; text-align: center; opacity: 0.8; }
.nav-item.active .nav-icon { opacity: 1; }

.sidebar-stats {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    font-size: 12px;
    color: var(--text2);
    transition: background 0.1s;
    border-radius: var(--radius-sm);
}
.stat-row:hover { background: var(--surface2); }
a.stat-row { text-decoration: none; cursor: pointer; }
.stat-row.active { background: var(--surface2); font-weight: 600; }
.stat-num {
    margin-left: auto;
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.stat-dot.nouveau { background: var(--text3); }
.stat-dot.tente { background: var(--orange); }
.stat-dot.rappel { background: var(--blue); }
.stat-dot.chaud { background: var(--hot); }
.stat-dot.rdv { background: var(--green); }
.stat-dot.out { background: var(--red); opacity: 0.5; }
.stat-dot.email-intro { background: #8B5CF6; }
.stat-dot.email-relance1 { background: #A78BFA; }
.stat-dot.email-relance2 { background: #C4B5FD; }
.stats-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text3);
    padding: 0 12px;
    margin-bottom: 4px;
}

/* Main */
main {
    padding: 24px 28px;
    overflow-y: auto;
    max-height: 100vh;
}

/* Search */
.search-section { margin-bottom: 24px; position: relative; }
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text3);
    pointer-events: none;
}
.search-input {
    width: 100%;
    padding: 14px 44px 14px 44px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
}
.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow-lg);
    background: var(--surface2);
}
.search-input::placeholder { color: var(--text3); }
.search-shortcut {
    position: absolute;
    right: 14px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text3);
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    pointer-events: none;
}
.search-clear {
    position: absolute;
    right: 14px;
    font-size: 14px;
    color: var(--text3);
    cursor: pointer;
    display: none;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s;
}
.search-clear:hover { color: var(--text); background: var(--surface2); }

/* Search results dropdown */
.search-results {
    display: none;
    flex-direction: column;
    margin-top: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 420px;
    overflow-y: auto;
}
.search-results.visible { display: flex; }

.sr-count {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text3);
}
.sr-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text3);
    font-size: 13px;
}
/* Search results use .prospects-table styles */
.search-results .prospects-table { margin: 0; }
.search-results .prospects-table tbody tr:last-child { border-bottom: none; }

/* Sections */
.urgent-section, .hot-section, .session-builder, .prospects-list {
    margin-bottom: 24px;
}

h2 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text3);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-icon { font-size: 13px; }

/* Contact list rows (rappels/chauds) */
.contact-list { display: flex; flex-direction: column; gap: 3px; }
.contact-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--surface);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.12s;
    border: 1px solid transparent;
    cursor: pointer;
}
.contact-row:hover {
    background: var(--surface2);
    border-color: var(--border-light);
}
.contact-row.rappel { border-left: 3px solid var(--blue); background: rgba(59,130,246,0.03); }
.contact-row.chaud { border-left: 3px solid var(--hot); background: rgba(249,115,22,0.03); }

.contact-main { display: flex; flex-direction: column; gap: 1px; }
.contact-name { font-weight: 600; font-size: 13.5px; }
.contact-company { font-size: 12px; color: var(--text2); }
.contact-note { font-size: 11px; color: var(--text3); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-phone {
    font-size: 12px;
    font-weight: 600;
    color: var(--green);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.3px;
    text-decoration: none;
    white-space: nowrap;
}
.contact-phone:hover { text-decoration: underline; }

.contact-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.contact-badge.nouveau { background: rgba(107,114,128,0.15); color: var(--text3); }
.contact-badge.tente { background: rgba(245,158,11,0.12); color: var(--orange); }
.contact-badge.rappel { background: var(--blue-glow); color: var(--blue); }
.contact-badge.chaud { background: rgba(249,115,22,0.12); color: var(--hot); }
.contact-badge.rdv { background: rgba(16,185,129,0.12); color: var(--green); }
.contact-badge.out { background: rgba(239,68,68,0.08); color: var(--red); opacity: 0.7; }

/* Prospects table (Apollo style) */
.prospects-table-section {
    margin-bottom: 24px;
    margin-left: -28px;
    margin-right: -28px;
    padding: 0;
}
.prospects-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.prospects-table thead th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text3);
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
    background: var(--surface2);
    white-space: nowrap;
    z-index: 1;
}
.prospects-table thead th:first-child { padding-left: 28px; }
.prospects-table thead th:last-child { padding-right: 28px; }
.prospects-table tbody tr {
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.1s;
}
.prospects-table tbody tr:hover {
    background: var(--surface2);
}
.prospects-table td {
    padding: 10px 14px;
    vertical-align: middle;
}
.prospects-table td:first-child { padding-left: 28px; }
.prospects-table td:last-child { padding-right: 28px; }
.td-name {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.td-name a {
    color: #1B2A4A;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}
.td-name a:hover { text-decoration: underline; }
.td-title {
    font-size: 11px;
    color: var(--text3);
    line-height: 1.3;
}
.td-company {
    font-weight: 500;
    color: var(--text);
    font-size: 13px;
}
.td-subtitle {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--text3);
    line-height: 1.3;
}
.td-web-link {
    font-size: 11px;
    color: var(--accent);
    text-decoration: none;
}
.td-web-link:hover { text-decoration: underline; }
.td-contact {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.td-phone-link {
    color: var(--green);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.td-phone-link:hover { text-decoration: underline; }
.td-email-line {
    font-size: 11px;
    color: var(--text3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    display: block;
}
.td-ville-line {
    font-size: 11px;
    color: var(--text3);
}
.td-sector {
    font-size: 11px;
    color: var(--text3);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Session builder */
.session-builder {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
}

.filters-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 120px; }
.filter-group label {
    font-size: 10px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.filter-group select {
    padding: 8px 12px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.filter-group select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }

.btn-session {
    padding: 10px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-session:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,0.3); }

.session-actions {
    margin-top: 10px;
}
.session-count { font-size: 12px; color: var(--text3); }
.bulk-sep { margin: 0 6px; color: var(--border-light); }
.bulk-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.bulk-link:hover { text-decoration: underline; }

.contact-fonction {
    font-size: 11px;
    color: var(--text3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}
.contact-phone.no-phone { color: var(--text3); }

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text3);
    font-size: 13px;
}

/* Email bulk button */
.btn-email-bulk {
    padding: 10px 24px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-email-bulk:hover { background: #5B9BF5; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59,130,246,0.3); }

.email-builder { border-color: rgba(59,130,246,0.15); }

/* Email action on call page */
.email-action { margin-top: 12px; }
.rbtn-email {
    width: 100%;
    border-color: rgba(59,130,246,0.3);
    color: var(--blue);
}
.rbtn-email:hover { border-color: var(--blue); background: rgba(59,130,246,0.05); }

.email-feedback {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
}
.email-feedback.success { color: var(--green); background: rgba(16,185,129,0.08); }
.email-feedback.error { color: var(--red); background: rgba(239,68,68,0.08); }

/* Flash message */
.flash-msg {
    padding: 12px 16px;
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: var(--radius);
    color: var(--green);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
}

/* ═══════════════════════════════════════════
   CALL MODE (full screen dialer)
   ═══════════════════════════════════════════ */

body.call-mode { overflow: hidden; }

.call-header {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.header-back {
    color: var(--text2);
    text-decoration: none;
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.header-back:hover { color: var(--text); border-color: var(--text3); }

.header-queue {
    margin-left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text3);
}
.q-arrow {
    color: var(--text2);
    text-decoration: none;
    font-size: 16px;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.q-arrow:hover { color: var(--text); border-color: var(--text3); }

.header-timer {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    color: var(--green);
    padding: 4px 14px;
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 6px;
}

/* Call layout */
.call-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    height: calc(100vh - 57px);
}

.call-left {
    padding: 28px 36px;
    overflow-y: auto;
}

.call-right {
    background: var(--surface);
    border-left: 1px solid var(--border);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

/* Contact info */
.call-contact {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}
.contact-identity h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}
.identity-role { color: var(--text2); font-size: 14px; }
.identity-company { color: var(--accent2); font-size: 15px; font-weight: 500; }

.contact-phone-big {
    font-size: 20px;
    font-weight: 700;
    color: var(--green);
    font-family: 'JetBrains Mono', monospace;
    padding: 10px 20px;
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.contact-phone-big a:hover { text-decoration: underline; }
.phone-sep { color: var(--text3); font-size: 14px; font-weight: 400; }

/* Intel chips */
.call-intel {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.intel-chip {
    padding: 5px 12px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 99px;
    font-size: 11px;
    color: var(--text2);
    font-weight: 500;
}
.intel-chip.link { color: var(--accent2); text-decoration: none; }
.intel-chip.link:hover { border-color: var(--accent); background: var(--accent-glow); }

/* Status */
.call-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 10px 14px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.status-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
}
.status-badge.nouveau { background: rgba(107,114,128,0.2); color: var(--text3); }
.status-badge.tente { background: rgba(245,158,11,0.15); color: var(--orange); }
.status-badge.rappel { background: rgba(59,130,246,0.15); color: var(--blue); }
.status-badge.chaud { background: rgba(249,115,22,0.15); color: var(--hot); }
.status-badge.rdv { background: rgba(16,185,129,0.15); color: var(--green); }
.status-badge.out { background: rgba(239,68,68,0.1); color: var(--red); }

.status-attempts { font-size: 12px; color: var(--orange); }
.status-last { font-size: 12px; color: var(--text3); }

/* Script */
.call-script, .call-history {
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.call-script summary, .call-history summary {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text2);
    background: var(--surface);
    cursor: pointer;
    list-style: none;
}
.call-script summary::-webkit-details-marker,
.call-history summary::-webkit-details-marker { display: none; }
.call-script summary::before { content: "▸ "; }
.call-script[open] summary::before { content: "▾ "; }
.call-history summary::before { content: "▸ "; }
.call-history[open] summary::before { content: "▾ "; }

.script-text {
    padding: 16px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text);
    max-height: 300px;
    overflow-y: auto;
    background: var(--surface);
}

/* History */
.hist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}
.hist-item:last-child { border: none; }
.hist-result {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
}
.hist-result.pas_decroche { color: var(--text3); }
.hist-result.rappel { color: var(--blue); }
.hist-result.chaud { color: var(--hot); }
.hist-result.rdv { color: var(--green); }
.hist-result.out { color: var(--red); }
.hist-date { color: var(--text3); }
.hist-note { color: var(--text3); font-style: italic; }

/* Right panel — Notes */
.call-notes {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}
.call-notes textarea {
    flex: 1;
    width: 100%;
    min-height: 150px;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    resize: none;
}
.call-notes textarea:focus { outline: none; border-color: var(--accent); }
.call-notes textarea::placeholder { color: var(--text3); }

/* Result buttons */
.result-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.rbtn {
    position: relative;
    padding: 14px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text2);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s;
    text-align: center;
}
.rbtn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.rbtn-key {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 9px;
    color: var(--text3);
    background: var(--surface2);
    padding: 1px 5px;
    border-radius: 3px;
}

.rbtn-miss { border-color: var(--border); }
.rbtn-miss:hover { border-color: var(--text3); color: var(--text); }

.rbtn-callback { border-color: rgba(59,130,246,0.3); color: var(--blue); }
.rbtn-callback:hover { border-color: var(--blue); background: rgba(59,130,246,0.05); }

.rbtn-hot { border-color: rgba(249,115,22,0.3); color: var(--hot); }
.rbtn-hot:hover { border-color: var(--hot); background: rgba(249,115,22,0.05); }

.rbtn-win {
    border-color: rgba(16,185,129,0.3);
    color: var(--green);
    grid-column: span 2;
}
.rbtn-win:hover { border-color: var(--green); background: rgba(16,185,129,0.08); }

.rbtn-out { border-color: rgba(239,68,68,0.2); color: var(--text3); grid-column: span 2; }
.rbtn-out:hover { border-color: var(--red); color: var(--red); }

/* Rappel picker */
.rappel-picker {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(59,130,246,0.05);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: var(--radius);
}
.rappel-picker.visible { display: flex; }
.rappel-picker input {
    padding: 6px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
}
.btn-confirm {
    padding: 6px 16px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* ═══════════════════════════════════════════
   EDITOR PAGES (Script, Emails)
   ═══════════════════════════════════════════ */

body:not(.call-mode) main {
    max-height: 100vh;
}

.editor-page {
    max-width: 750px;
    padding: 32px;
}
.editor-page h1 {
    font-size: 18px;
    margin-bottom: 6px;
}
.editor-hint {
    font-size: 12px;
    color: var(--text3);
    margin-bottom: 20px;
}

.editor-textarea {
    width: 100%;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.7;
    resize: vertical;
    margin-bottom: 12px;
}
.editor-textarea:focus { outline: none; border-color: var(--accent); }

.btn-save {
    padding: 10px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}
.btn-save:hover { background: var(--accent2); }

.email-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}
.email-card h3 {
    font-size: 13px;
    color: var(--accent2);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.email-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
    margin-bottom: 10px;
}
.email-input:focus { outline: none; border-color: var(--accent); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* Responsive */
@media (max-width: 1100px) {
    .app-layout { grid-template-columns: 180px 1fr; }
    main { padding: 20px; }
}
@media (max-width: 800px) {
    .app-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .call-layout { grid-template-columns: 1fr; }
    .call-right { border-left: none; border-top: 1px solid var(--border); }
}
