/* =====================================================================
   ONTECH Agent Portal — Modern Minimal Stylesheet
   ===================================================================== */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --green: #22c55e;
    --green-light: #f0fdf4;
    --red: #ef4444;
    --red-light: #fef2f2;
    --orange: #f59e0b;
    --orange-light: #fffbeb;
    --blue-light: #eff6ff;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --sidebar-bg: #0f172a;
    --sidebar-text: #e2e8f0;
    --sidebar-muted: #64748b;
    --sidebar-hover: rgba(255,255,255,0.06);
    --sidebar-active: rgba(37,99,235,0.2);
    --sidebar-active-text: #60a5fa;
    --sidebar-w: 240px;
    --topbar-h: 56px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* ========== DARK THEME ========== */
[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: rgba(59,130,246,0.15);
    --green: #22c55e;
    --green-light: rgba(34,197,94,0.15);
    --red: #ef4444;
    --red-light: rgba(239,68,68,0.15);
    --orange: #f59e0b;
    --orange-light: rgba(245,158,11,0.15);
    --blue-light: rgba(59,130,246,0.12);
    --bg: #0f172a;
    --surface: #1e293b;
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --border-light: #1e293b;
    --sidebar-bg: #020617;
    --sidebar-text: #e2e8f0;
    --sidebar-muted: #64748b;
    --sidebar-hover: rgba(255,255,255,0.06);
    --sidebar-active: rgba(59,130,246,0.2);
    --sidebar-active-text: #60a5fa;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
}

[data-theme="dark"] .presence-offline { background: #475569; }
[data-theme="dark"] .presence-dot { border-color: var(--surface); }
[data-theme="dark"] .toggle-slider { background: #475569; }

/* ========== RESET ========== */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { height:100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    height: 100%;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

#app { height:100%; }
.screen { display:none; height:100%; }
.screen.active { display:flex; }
.hidden:not(.dialer-panel) { display:none !important; }

/* ========== LOGIN ========== */
.login-container {
    margin: auto;
    width: 100%;
    max-width: 380px;
    padding: 40px 24px;
}

.login-brand {
    text-align: center;
    margin-bottom: 40px;
}

.brand-icon {
    width: 56px; height: 56px;
    background: var(--primary);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.login-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 16px;
    border-radius: 12px;
}

.login-brand h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.login-brand p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.input-group input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.15s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

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

.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px 0;
}

.remember-row input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--primary);
}

.btn-login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 4px;
}

.btn-login-submit:hover { background: var(--primary-hover); }
.btn-login-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.login-status {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    min-height: 20px;
    margin-top: 8px;
}

.app-download-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.app-download-link a {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.app-download-link a:hover {
    text-decoration: underline;
}

.login-status.error { color: var(--red); }

/* ========== PORTAL LAYOUT ========== */
#login-screen { align-items:center; justify-content:center; background: var(--bg); }
#phone-screen { display:none; }
#phone-screen.active { display:block; }

.portal-layout {
    display: flex;
    height: 100vh;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 24px;
}

.sidebar-logo {
    width: 34px; height: 34px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-logo-img {
    height: 28px;
    width: auto;
    flex-shrink: 0;
}

.sidebar-brand-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: none;
    background: none;
    color: var(--sidebar-muted);
    font-size: 13.5px;
    font-weight: 500;
    font-family: var(--font);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    width: 100%;
}

.sidebar-item:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text);
}

.sidebar-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-active-text);
}

.sidebar-item { position: relative; }
.sidebar-item svg { flex-shrink:0; opacity:0.7; }
.sidebar-item.active svg { opacity:1; }

.sidebar-badge {
    margin-left: auto;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: auto;
}

.sidebar-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-ext {
    display: block;
    font-size: 11px;
    color: var(--sidebar-muted);
}

.status-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}

.status-pill.online { background: rgba(34,197,94,0.15); color: #22c55e; }
.status-pill.offline { background: rgba(100,116,139,0.15); color: #94a3b8; }
.status-pill.connecting { background: rgba(245,158,11,0.15); color: #f59e0b; }

/* ========== MAIN AREA ========== */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.topbar {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.topbar-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
}

.topbar-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-xs);
    transition: all 0.15s;
    display: flex;
    align-items: center;
}

.topbar-btn:hover { background: var(--border-light); color: var(--text); }
.topbar-btn.active { color: var(--red); background: var(--red-light); }

.reconnect-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--orange);
    background: var(--orange-light);
    padding: 4px 10px;
    border-radius: 20px;
}

.spinner-small {
    width: 14px; height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ========== CONTENT ========== */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.view { display:none; }
.view.active { display:block; }

/* ========== DASHBOARD ========== */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.dash-welcome {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
}

.dash-welcome h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.dash-welcome p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.btn-primary-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-primary-pill:hover { background: var(--primary-hover); }

.dash-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.stat-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-blue { background: var(--blue-light); color: var(--primary); }
.stat-red { background: var(--red-light); color: var(--red); }
.stat-green { background: var(--green-light); color: var(--green); }
.stat-orange { background: var(--orange-light); color: var(--orange); }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--text);
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Dashboard sections */
.dash-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

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

.dash-section-header h3 {
    font-size: 14px;
    font-weight: 600;
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
}

.text-btn:hover { text-decoration: underline; }

.dash-table { padding: 4px 0; }

.dash-call-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    font-size: 13px;
    transition: background 0.1s;
}

.dash-call-row:hover { background: var(--border-light); }

.dash-call-icon {
    width: 28px; height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    flex-shrink: 0;
}

.dash-call-icon.incoming { background: var(--green-light); color: var(--green); }
.dash-call-icon.outgoing { background: var(--blue-light); color: var(--primary); }
.dash-call-icon.missed { background: var(--red-light); color: var(--red); }

.dash-call-num { font-weight: 500; flex: 1; }
.dash-call-dir { color: var(--text-muted); font-size: 12px; width: 70px; }
.dash-call-dur { color: var(--text-secondary); font-size: 12px; width: 60px; text-align: right; }
.dash-call-time { color: var(--text-muted); font-size: 12px; width: 50px; text-align: right; }

/* ========== VIEW TOOLBAR ========== */
.view-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.search-bar {
    position: relative;
    flex: 1;
    max-width: 320px;
}

.search-bar svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 9px 12px 9px 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font);
    background: var(--surface);
    color: var(--text);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

.btn-outline-sm {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-outline-sm:hover { border-color: var(--text-muted); color: var(--text); }

/* Filter group */
.filter-group {
    display: flex;
    gap: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.filter-btn {
    padding: 6px 14px;
    border: none;
    border-radius: var(--radius-xs);
    background: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
}

.filter-btn:hover { color: var(--text); background: var(--surface); }
.filter-btn.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); font-weight: 600; }

/* ========== EMPTY STATE ========== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-state.small { padding: 24px; }

.empty-state p { color: var(--text-muted); font-size: 14px; }
.empty-state .empty-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ========== CALLS LIST ========== */
.data-list { }

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: box-shadow 0.15s;
}

.history-item:hover { box-shadow: var(--shadow); }

.history-icon-wrap {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-icon-wrap.incoming { background: var(--green-light); }
.history-icon-wrap.outgoing { background: var(--blue-light); }
.history-icon-wrap.missed { background: var(--red-light); }

.history-info { flex: 1; min-width: 0; }

.history-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-name.missed { color: var(--red); }

.history-detail {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}

.history-detail span + span::before {
    content: "\00b7";
    margin-right: 8px;
}

.history-time {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
    line-height: 1.3;
}

.history-call-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.15s;
    display: flex;
}

.history-call-btn:hover { background: var(--primary-light); }

/* ========== DIRECTORY ========== */
.dir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.dir-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: box-shadow 0.15s;
}

.dir-item:hover { box-shadow: var(--shadow); }
.dir-item.dir-self { border-color: var(--primary); background: var(--primary-light); }

.dir-avatar-wrap { position: relative; flex-shrink: 0; }

.dir-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.presence-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--surface);
}

.presence-online { background: var(--green); }
.presence-offline { background: #cbd5e1; }

.dir-info { flex: 1; min-width: 0; }

.dir-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dir-you { font-size: 11px; color: var(--primary); font-weight: 500; }

.dir-ext {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}

.presence-online-text { color: var(--green); }
.presence-offline-text { color: var(--text-muted); }

.dir-call-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.15s;
    display: flex;
}

.dir-call-btn:hover { background: var(--primary-light); }

/* ========== FAVORITES & QUICK DIAL ========== */
.dir-fav-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.15s, transform 0.1s;
}

.dir-fav-btn:hover { color: var(--orange); transform: scale(1.15); }
.dir-fav-btn.active { color: var(--orange); }

.quick-dial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    padding: 12px 16px;
}

.quick-dial-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font);
    transition: box-shadow 0.15s, transform 0.1s;
}

.quick-dial-item:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.quick-dial-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.quick-dial-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.quick-dial-ext {
    font-size: 11px;
    color: var(--text-muted);
}

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

/* ========== VOICEMAIL ========== */
.vm-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 500px;
}

.vm-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.vm-icon {
    width: 44px; height: 44px;
    background: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vm-title { font-size: 15px; font-weight: 600; }
.vm-sub { font-size: 13px; color: var(--text-secondary); }

.vm-details { padding: 4px 0; }

.vm-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    font-size: 13px;
}

.vm-row span:first-child { color: var(--text-secondary); }
.vm-val { font-weight: 500; }

.vm-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: var(--border-light);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ========== QUEUES ========== */
.queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.queue-name { font-size: 14px; font-weight: 500; }

.queue-detail {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.queue-pause-btn {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    transition: opacity 0.15s, transform 0.1s;
}

.queue-pause-btn:hover { opacity: 0.85; transform: scale(1.04); }
.queue-pause-btn:active { transform: scale(0.97); }

.queue-pause-btn.queue-active { background: var(--green-light); color: var(--green); }
.queue-pause-btn.queue-paused { background: var(--orange-light); color: var(--orange); }

/* ========== MONITOR ========== */
.monitor-stats {
    display: flex;
    gap: 16px;
    align-items: center;
}

.monitor-stat {
    font-size: 13px;
    color: var(--text-muted);
}

.monitor-stat strong {
    font-size: 16px;
    font-weight: 600;
    margin-right: 3px;
    color: var(--text-primary);
}

.monitor-stat.stat-green strong { color: var(--green); }
.monitor-stat.stat-orange strong { color: var(--orange); }

.monitor-auto-label {
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.monitor-call-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    gap: 12px;
}

.monitor-call-info { flex: 1; min-width: 0; }

.monitor-call-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    flex-wrap: wrap;
}

.monitor-arrow {
    color: var(--text-muted);
    font-size: 13px;
}

.monitor-call-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.badge-sm {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-green { background: var(--green-light); color: var(--green); }
.badge-orange { background: var(--orange-light); color: var(--orange); }

.monitor-call-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.spy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-secondary);
}

.spy-btn:hover {
    transform: scale(1.1);
}

.spy-listen:hover {
    background: var(--green-light);
    border-color: var(--green);
    color: var(--green);
}

.spy-whisper:hover {
    background: #fff3cd;
    border-color: var(--orange);
    color: var(--orange);
}

.spy-barge:hover {
    background: #fee2e2;
    border-color: var(--red, #ef4444);
    color: var(--red, #ef4444);
}

.spy-btn:active { transform: scale(0.95); }

/* ========== SETTINGS ========== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.settings-card h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.setting-row + .setting-row { border-top: 1px solid var(--border-light); }

.setting-row label { font-size: 14px; color: var(--text); }
.setting-value { font-size: 14px; color: var(--text-secondary); font-weight: 500; }

.volume-slider {
    width: 140px;
    accent-color: var(--primary);
}

.toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 22px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

.setting-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-family: var(--font);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.setting-select:focus { outline: none; border-color: var(--primary); }

.setting-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-family: var(--font);
    background: var(--surface);
    color: var(--text);
    box-sizing: border-box;
}
.setting-input:focus { outline: none; border-color: var(--primary); }
.setting-status { font-size: 13px; }

.setting-row-col { flex-direction: column; align-items: flex-start; gap: 6px; }

.setting-speaker-row { display: flex; gap: 8px; width: 100%; }
.setting-speaker-row .setting-select { flex: 1; }
.btn-test-speaker { flex-shrink: 0; padding: 8px 12px; }

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: var(--red-light);
    color: var(--red);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    margin-top: 12px;
    transition: background 0.15s;
}

.btn-logout:hover { background: #fecaca; }

/* Mobile App QR */
.setting-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.mobile-qr-container {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.mobile-qr-code {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-qr-code canvas {
    border: 1px solid var(--border);
}

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

.mobile-qr-actions .btn-outline-sm {
    flex: 1;
    text-align: center;
    text-decoration: none;
}

/* ========== FAB DIAL BUTTON ========== */
.fab-dial {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    z-index: 50;
}

.fab-dial:hover { transform: scale(1.06); box-shadow: 0 6px 20px rgba(37,99,235,0.4); }

/* ========== DIALER PANEL ========== */
.dialer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 100;
}

.dialer-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 340px;
    height: 100vh;
    background: var(--surface);
    box-shadow: -4px 0 24px rgba(0,0,0,0.1);
    z-index: 101;
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    transition: transform 0.25s ease;
}

.dialer-panel.hidden { transform: translateX(100%); pointer-events: none; }

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

.dialer-panel-header h3 { font-size: 16px; font-weight: 600; }

.panel-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.panel-close-btn:hover { color: var(--text); }

.dialer-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
}

.dialer-display {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 24px;
}

.dial-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 22px;
    font-weight: 500;
    font-family: var(--font);
    text-align: center;
    letter-spacing: 0.04em;
    background: var(--bg);
    color: var(--text);
}

.dial-input:focus { outline: none; border-color: var(--primary); }

.backspace-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
}

.backspace-btn:hover { color: var(--text); }

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 260px;
    margin-bottom: 24px;
}

.key {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.1s;
    user-select: none;
}

.key:hover { background: var(--border); }
.key:active { background: var(--primary-light); }

.key-num { font-size: 20px; font-weight: 600; line-height: 1; }
.key-sub { font-size: 9px; color: var(--text-muted); letter-spacing: 0.1em; margin-top: 2px; }

.dialer-actions {
    display: flex;
    gap: 16px;
    margin-top: auto;
}

.call-btn {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s;
}

.call-btn:hover { transform: scale(1.06); }

.call-btn-green { background: var(--green); }
.call-btn-blue { background: var(--primary); }

/* ========== CALL OVERLAY ========== */
.call-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-screen {
    width: 100%;
    max-width: 400px;
    position: relative;
}

.call-screen-bg { display: none; }

.call-screen-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 32px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.call-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 20px;
}

.caller-avatar-large {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
}

.caller-avatar-large.ringing-pulse {
    animation: pulse-ring 1.2s infinite;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(37,99,235,0.3); }
    70% { box-shadow: 0 0 0 16px rgba(37,99,235,0); }
    100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}

.caller-name-large {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.caller-number {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.call-timer-large {
    font-size: 16px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    margin-bottom: 24px;
}

.incoming-actions {
    display: flex;
    gap: 32px;
    margin-top: 16px;
}

.call-action-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font);
}

.call-action-circle svg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 12px;
}

.answer-btn svg { background: var(--green); }
.reject-btn svg { background: var(--red); }
.hangup-btn-active svg { background: var(--red); }

.answer-btn:hover svg, .reject-btn:hover svg, .hangup-btn-active:hover svg { opacity: 0.9; }

.hangup-btn-active {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    margin-top: 16px;
}

.active-call-actions {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

.action-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    font-size: 11px;
    color: var(--text-secondary);
    font-family: var(--font);
    transition: all 0.15s;
}

.action-pill:hover { background: var(--border-light); }
.action-pill.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

.video-container {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
    margin: 12px 0;
}

#remote-video { width:100%; height:100%; object-fit:cover; }

#local-video {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 100px;
    height: 75px;
    border-radius: var(--radius-xs);
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
}

.incall-keypad { margin: 8px 0; }

.keypad-small { max-width: 200px; margin: 0 auto; }

.key-sm {
    padding: 10px 0;
    font-size: 16px;
}

.transfer-dialog {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
}

.transfer-content {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius);
    width: 320px;
    box-shadow: var(--shadow-lg);
}

.transfer-content h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

#transfer-target {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
    margin-bottom: 16px;
}

#transfer-target:focus { outline: none; border-color: var(--primary); }

.transfer-buttons { display: flex; gap: 8px; justify-content: flex-end; }

.btn-transfer-go {
    padding: 8px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
}

.btn-transfer-cancel {
    padding: 8px 20px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
    cursor: pointer;
    color: var(--text-secondary);
}

/* ========== CONSULT PANEL (Attended Transfer) ========== */
.consult-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 2px solid var(--primary);
    padding: 16px 24px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 200;
    animation: slideUp 0.2s ease-out;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.consult-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
}
.consult-info { display: flex; align-items: center; gap: 8px; }
.consult-label { font-size: 13px; color: var(--text-secondary); }
.consult-target { font-size: 15px; font-weight: 600; color: var(--text); }
.consult-buttons { display: flex; gap: 8px; }
.btn-attended {
    background: var(--orange);
    border-color: var(--orange);
}
.btn-attended:hover {
    background: #d97706;
    border-color: #d97706;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .dash-grid {
        grid-template-columns: 1fr 1fr;
    }
    .dash-welcome { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 80;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .sidebar.open { transform: translateX(0); }

    .topbar-hamburger { display: flex; }

    .content-area { padding: 16px; }

    .dash-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .dash-welcome { flex-direction: column; align-items: flex-start; }
    .stat-value { font-size: 22px; }

    .dialer-panel { width: 100%; }

    .fab-dial { bottom: 16px; right: 16px; }

    .dir-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .dash-grid { grid-template-columns: 1fr 1fr; }
    .dash-welcome { grid-column: 1 / -1; }
}

/* ========== PRESENCE (BLF) ========== */
.presence-busy { background: var(--red); }
.presence-ringing { background: var(--orange); }
.presence-busy-text { color: var(--red); }
.presence-ringing-text { color: var(--orange); }

/* ========== RECORDING PLAYBACK ========== */
.history-play-btn {
    background: none;
    border: none;
    color: var(--green);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.15s;
    display: flex;
}
.history-play-btn:hover { background: var(--green-light); }
.history-play-btn.playing { color: var(--orange); animation: pulse-play 1s infinite; }
@keyframes pulse-play { 0%,100% { opacity:1; } 50% { opacity:0.5; } }

/* ========== SMS ========== */
.sms-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: box-shadow 0.15s;
}
.sms-item:hover { box-shadow: var(--shadow); }

.sms-icon-wrap {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sms-icon-wrap.incoming { background: var(--green-light); }
.sms-icon-wrap.outgoing { background: var(--blue-light); }

.sms-info { flex: 1; min-width: 0; }
.sms-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.sms-number { font-size: 14px; font-weight: 500; }
.sms-dir-label { font-size: 11px; color: var(--text-muted); }
.sms-body-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; word-break: break-word; }
.sms-meta { margin-top: 4px; font-size: 11px; }
.sms-delivered { color: var(--green); }
.sms-failed { color: var(--red); }
.sms-pending { color: var(--text-muted); }
.sms-time { font-size: 12px; color: var(--text-muted); text-align: right; white-space: nowrap; line-height: 1.3; flex-shrink: 0; }

.sms-compose {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-w);
    right: 0;
    background: var(--surface);
    border-top: 2px solid var(--primary);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 60;
    animation: slideUp 0.2s ease-out;
}
.sms-compose-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}
.sms-compose-header h3 { font-size: 15px; font-weight: 600; }
.sms-compose-body { padding: 16px 20px; }
.sms-compose-body input,
.sms-compose-body textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    margin-bottom: 10px;
    resize: none;
}
.sms-compose-body input:focus,
.sms-compose-body textarea:focus { outline: none; border-color: var(--primary); }
.sms-compose-actions { display: flex; align-items: center; justify-content: space-between; }
.sms-char-count { font-size: 12px; color: var(--text-muted); }

.btn-sm { padding: 8px 16px; font-size: 13px; }

.sms-filter-btn {
    padding: 6px 14px;
    border: none;
    border-radius: var(--radius-xs);
    background: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
}
.sms-filter-btn:hover { color: var(--text); background: var(--surface); }
.sms-filter-btn.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); font-weight: 600; }

@media (max-width: 768px) {
    .sms-compose { left: 0; }
}

/* ========== WRAP-UP MODAL ========== */
.wrapup-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
}
.wrapup-modal {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    width: 90%; max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.wrapup-modal h3 { margin: 0 0 4px; font-size: 18px; }
.wrapup-subtitle { color: var(--text-secondary); font-size: 13px; margin: 0 0 16px; }
.wrapup-codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}
.wrapup-code-btn {
    padding: 10px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.wrapup-code-btn:hover { border-color: var(--primary); color: var(--primary); }
.wrapup-code-btn.selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.wrapup-notes {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    resize: vertical;
    margin-bottom: 16px;
    font-family: inherit;
}
.wrapup-actions { display: flex; gap: 8px; }
.wrapup-actions .btn-primary-sm {
    flex: 1; padding: 10px; border: none; border-radius: 8px;
    background: var(--primary); color: #fff; font-size: 14px;
    font-weight: 600; cursor: pointer;
}
.wrapup-actions .btn-primary-sm:disabled { opacity: 0.5; cursor: not-allowed; }
.wrapup-actions .btn-outline-sm {
    padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px;
    background: transparent; color: var(--text-secondary); font-size: 14px; cursor: pointer;
}

/* ========== TRANSCRIPTION MODAL ========== */
.transcription-modal { max-width: 600px; max-height: 80vh; display: flex; flex-direction: column; }
.transcription-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.transcription-header h3 { margin: 0; }
.btn-icon-sm {
    background: none; border: none; font-size: 24px;
    color: var(--text-secondary); cursor: pointer; padding: 0 4px;
}
.transcription-content { overflow-y: auto; flex: 1; }
.transcription-content .txn-meta {
    display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.txn-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.txn-badge.positive { background: #dcfce7; color: #166534; }
.txn-badge.negative { background: #fee2e2; color: #991b1b; }
.txn-badge.neutral { background: #f1f5f9; color: #475569; }
.txn-score { font-size: 24px; font-weight: 700; }
.txn-section { margin-bottom: 14px; }
.txn-section h4 { font-size: 13px; color: var(--text-secondary); margin: 0 0 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.txn-section p, .txn-section li { font-size: 14px; line-height: 1.6; margin: 0; }
.txn-section ul { margin: 0; padding-left: 18px; }
.txn-transcript { white-space: pre-wrap; font-size: 13px; line-height: 1.7; color: var(--text-secondary); max-height: 200px; overflow-y: auto; padding: 12px; background: var(--bg); border-radius: 8px; }

/* Call history transcribe button */
.btn-transcribe {
    padding: 3px 8px; font-size: 11px; border: 1px solid var(--border);
    border-radius: 6px; background: transparent; color: var(--primary);
    cursor: pointer; white-space: nowrap;
}
.btn-transcribe:hover { background: var(--primary); color: #fff; }
.btn-transcribe.loading { opacity: 0.5; pointer-events: none; }

/* ========== CAMPAIGNS ========== */
.campaign-item {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s;
}
.campaign-item:hover { background: var(--surface-hover, #f0f0f0); }
.campaign-item-info { flex: 1; min-width: 0; }
.campaign-item-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.campaign-item-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; }
.campaign-item-progress { width: 80px; }
.campaign-progress-bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.campaign-progress-fill { height: 100%; border-radius: 3px; background: var(--primary); transition: width 0.3s; }
.campaign-progress-pct { font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 2px; }
.campaign-status-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; text-transform: uppercase; }
.campaign-status-active { background: #dcfce7; color: #16a34a; }
.campaign-status-paused { background: #fef3c7; color: #d97706; }
.campaign-status-draft { background: #e0e7ff; color: #4f46e5; }
.campaign-status-completed { background: #f1f5f9; color: #64748b; }
.campaign-start-btn { padding: 6px 14px; border: none; border-radius: 6px; background: var(--green); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.campaign-start-btn:hover { filter: brightness(0.9); }

.campaign-title { font-size: 15px; font-weight: 600; flex: 1; text-align: center; margin: 0; }
.campaign-progress-mini { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.campaign-contact-card {
    background: var(--surface); border-radius: 12px; padding: 20px;
    margin: 12px 0; border: 1px solid var(--border);
}
.contact-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.contact-card-name { font-size: 18px; font-weight: 700; }
.contact-card-company { font-size: 13px; color: var(--text-muted); }
.contact-card-phone { font-size: 22px; font-weight: 600; color: var(--primary); margin: 8px 0; letter-spacing: 0.5px; }
.contact-card-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.contact-meta-item { font-size: 12px; color: var(--text-muted); }
.contact-meta-item strong { color: var(--text); }

.campaign-dialer-actions { padding: 12px 0; }
.campaign-dial-btn { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }
.campaign-select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; margin-bottom: 8px; background: var(--surface); }
.campaign-notes { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; resize: vertical; font-family: inherit; margin-bottom: 8px; }
.campaign-result-btns { display: flex; gap: 8px; }
.campaign-result-btns .btn-primary-sm { flex: 1; }
.campaign-result-btns .btn-outline-sm { flex: 0 0 auto; }

/* ========== PRINT ========== */
@media print {
    .sidebar, .topbar, .fab-dial, .dialer-panel, .dialer-backdrop, .call-overlay { display: none !important; }
    .main-area { margin: 0; }
}
