/* ============ VibeMinutes — modern, clean light/dark UI ============ */

:root {
    --bg:          #f7f7fb;
    --surface:     #ffffff;
    --surface-2:   #f1f1f6;
    --border:      #e5e7eb;
    --text:        #111827;
    --muted:       #6b7280;
    --primary:     #6366f1;
    --primary-2:   #8b5cf6;
    --primary-fg:  #ffffff;
    --danger:      #dc2626;
    --success:     #16a34a;
    --warning:     #d97706;
    --info:        #0ea5e9;
    --shadow:      0 1px 3px rgba(17, 24, 39, 0.06), 0 1px 2px rgba(17,24,39,0.04);
    --radius:      12px;
    --radius-sm:   8px;
    --font:        'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
    --bg:          #0b0d12;
    --surface:     #14171f;
    --surface-2:   #1c2029;
    --border:      #2a2f3a;
    --text:        #e5e7eb;
    --muted:       #9ca3af;
    --primary:     #818cf8;
    --primary-2:   #a78bfa;
    --shadow:      0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.25);
}

@media (prefers-color-scheme: dark) {
    :root[data-theme="auto"] {
        --bg:          #0b0d12;
        --surface:     #14171f;
        --surface-2:   #1c2029;
        --border:      #2a2f3a;
        --text:        #e5e7eb;
        --muted:       #9ca3af;
        --primary:     #818cf8;
        --primary-2:   #a78bfa;
        --shadow:      0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.25);
    }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
/* overflow-x: clip is stronger than hidden — prevents iOS Safari horizontal scroll
   that causes the "click targets shifted" bug on small screens */
html {
    overflow-x: clip;
    max-width: 100%;
}
body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
    max-width: 100vw;
}

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

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: var(--radius-sm);
    border: 1px solid transparent; cursor: pointer;
    font: inherit; font-weight: 600; font-size: 14px;
    transition: transform .05s ease, background .15s ease, border-color .15s;
    background: var(--surface-2); color: var(--text);
}
.btn:hover { background: var(--border); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: var(--primary-fg);
    border-color: transparent;
}
.btn-primary:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 22px; font-size: 16px; }
.btn .rec-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,0.6);
}
.btn.recording .rec-dot { animation: pulse 1.4s infinite; }
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
    70%  { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.link {
    background: none; border: none; padding: 0;
    color: var(--primary); font: inherit; cursor: pointer; text-decoration: underline;
}

/* ===== Alerts ===== */
.alert {
    padding: 12px 14px; border-radius: var(--radius-sm);
    margin: 14px 0; font-size: 14px;
    border: 1px solid var(--border);
}
.alert ul { margin: 0; padding-left: 18px; }
.alert-error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.alert-info    { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
[data-theme="dark"] .alert-error   { background: #2a1414; color: #fecaca; border-color: #5b1d1d; }
[data-theme="dark"] .alert-success { background: #0f2a1a; color: #bbf7d0; border-color: #1f5132; }
[data-theme="dark"] .alert-info    { background: #122036; color: #bfdbfe; border-color: #1d3a66; }
@media (prefers-color-scheme: dark) {
    :root[data-theme="auto"] .alert-error   { background: #2a1414; color: #fecaca; border-color: #5b1d1d; }
    :root[data-theme="auto"] .alert-success { background: #0f2a1a; color: #bbf7d0; border-color: #1f5132; }
    :root[data-theme="auto"] .alert-info    { background: #122036; color: #bfdbfe; border-color: #1d3a66; }
}

/* ===== Brand / topbars ===== */
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 16px; color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: white; font-weight: 800; font-size: 13px;
}
.theme-toggle {
    background: var(--surface-2); border: 1px solid var(--border); cursor: pointer;
    width: 36px; height: 36px; border-radius: 50%; font-size: 16px;
    color: var(--text);
}

/* ===== Auth layout ===== */
.auth-body {
    min-height: 100%;
    display: flex; flex-direction: column;
    background:
        radial-gradient(ellipse at top left, rgba(99,102,241,0.10), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139,92,246,0.10), transparent 50%),
        var(--bg);
}
.auth-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px;
}
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card {
    width: 100%; max-width: 420px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 32px;
}
.auth-card h1 { margin: 0 0 4px; font-size: 24px; }
.auth-card form { display: grid; gap: 14px; margin-top: 18px; }
.auth-card label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.auth-card input {
    padding: 10px 12px; font: inherit; font-size: 14px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface-2); color: var(--text);
}
.auth-card input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.auth-card .btn { justify-content: center; }
/* Google SSO button */
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 10px 16px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: background .15s ease, box-shadow .15s ease;
    margin-top: 18px;
}
.btn-google:hover { background: var(--surface-2); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 16px 0 0; color: var(--muted); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-foot { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* ===== App layout ===== */
.app-body { min-height: 100%; display: flex; flex-direction: column; }
.app-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 24px; border-bottom: 1px solid var(--border);
    background: var(--surface); position: sticky; top: 0; z-index: 100;
}
.app-nav { display: flex; align-items: center; gap: 12px; }

.app-main {
    flex: 1;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    padding: 24px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}
@media (max-width: 900px) {
    .app-main { grid-template-columns: 1fr; }
}

.sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    height: fit-content;
    position: sticky; top: 24px;
}
.sidebar-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px; gap: 8px;
}
.sidebar-title { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sidebar-header-actions { display: flex; gap: 4px; flex-shrink: 0; }
.meeting-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 60vh; overflow: auto; }
.sidebar-search-wrap { padding: 0 0 8px; }
.sidebar-search {
    width: 100%; box-sizing: border-box;
    padding: 6px 10px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--surface-2);
    font-size: 13px; color: var(--text); outline: none;
}
.sidebar-search:focus { border-color: var(--primary); }

.meeting-list li.meeting-item {
    padding: 8px 10px; border-radius: 8px; cursor: default;
    display: flex; align-items: center; gap: 8px;
    border: 1px solid transparent; position: relative;
}
.meeting-list li.meeting-item:hover { background: var(--surface-2); }
.meeting-list li.meeting-item.active { background: var(--surface-2); border-color: var(--primary); }

/* Left indicator dot — shows AI status */
.meeting-list .mi-indicator {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    background: var(--border); transition: background .2s;
}
.meeting-list .mi-indicator.has-tools {
    background: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}

.meeting-list .mi-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.meeting-list .mi-title { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meeting-list .mi-meta { font-size: 11px; color: var(--muted); }
.meeting-list .mi-snippet { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

/* Three-dot menu */
.meeting-list .mi-actions { position: relative; flex-shrink: 0; }
.meeting-list .mi-menu-btn {
    width: 28px; height: 28px; border: none; background: none; cursor: pointer;
    border-radius: 6px; color: var(--muted); font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .15s;
}
.meeting-list li.meeting-item:hover .mi-menu-btn,
.meeting-list li.meeting-item.active .mi-menu-btn { opacity: 1; }
.meeting-list .mi-menu-btn:hover { background: var(--border); color: var(--text); }

.meeting-list .mi-dropdown {
    display: none; position: fixed;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
    padding: 6px; min-width: 164px; z-index: 500;
}
.meeting-list .mi-dropdown.open { display: block; }
.meeting-list .mi-dropdown button {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 8px 10px; border: none; background: none;
    cursor: pointer; border-radius: 6px; font: inherit; font-size: 13px;
    font-weight: 500; color: var(--text); text-align: left;
}
.meeting-list .mi-dropdown button i { width: 14px; text-align: center; }
.meeting-list .mi-dropdown button:hover { background: var(--surface-2); }
.meeting-list .mi-dropdown button.danger { color: var(--danger); }
.meeting-list .mi-dropdown button.danger:hover { background: #fef2f2; }
[data-theme="dark"] .meeting-list .mi-dropdown button.danger:hover { background: #2a1414; }
@media (prefers-color-scheme: dark) {
    :root[data-theme="auto"] .meeting-list .mi-dropdown button.danger:hover { background: #2a1414; }
}
.meeting-list .mi-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

.workspace { display: grid; gap: 24px; min-width: 0; container-type: inline-size; }

.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 24px;
}
.card h2 { margin: 0 0 4px; font-size: 18px; }
.card-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-bottom: 12px; flex-wrap: wrap;
}
.card-actions { display: flex; gap: 8px; }

/* ===== Recorder =====  */
.recorder { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
#langSelect {
    padding: 8px 10px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--surface-2);
    font: inherit; font-size: 13px; color: var(--text); outline: none;
    max-width: 170px; min-width: 0;
}
.timer { font-variant-numeric: tabular-nums; font-size: 18px; color: var(--muted); }
.dropzone {
    margin-top: 4px;
    border: 2px dashed var(--border); border-radius: var(--radius);
    padding: 24px; text-align: center; color: var(--muted);
    transition: border-color .15s, background .15s;
}
.dropzone.drag { border-color: var(--primary); background: var(--surface-2); color: var(--text); }
.dropzone p { margin: 4px 0; }
.dropzone-icon { margin-bottom: 8px; color: var(--muted); opacity: .6; }

/* ===== Section divider ===== */
.section-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0 8px; color: var(--muted);
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.section-divider::before, .section-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ===== Live caption (shown while recording) ===== */
.live-caption {
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    animation: lc-fadein .25s ease both;
}
@keyframes lc-fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Recording indicator header */
.lc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px 8px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface-2);
}
.lc-rec-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #ef4444;
    flex-shrink: 0;
    animation: lc-rec-pulse 1.4s ease-in-out infinite;
}
@keyframes lc-rec-pulse {
    0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239,68,68,.4); }
    60%      { opacity: .7; box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}
.lc-word-count { margin-left: auto; font-variant-numeric: tabular-nums; }

/* Scrollable text body — grows with content */
.lc-body {
    padding: 14px 16px 16px;
    min-height: 64px;
    max-height: min(52vh, 480px);
    overflow-y: auto;
    scroll-behavior: smooth;
    font-size: 15px;
    line-height: 1.85;
    word-break: break-word;
    background: var(--surface-2);
    -webkit-overflow-scrolling: touch;
}

/* Each speaker turn */
.lc-block {
    display: block;
    position: relative;
    padding-left: 52px;
    margin-bottom: 12px;
}
.lc-block:last-child { margin-bottom: 0; }

.lc-speaker-label {
    position: absolute;
    left: 0; top: 3px;
    display: inline-block;
    font-size: 10px; font-weight: 700; letter-spacing: .05em;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--sp-color, var(--primary));
    color: #fff;
    opacity: .88;
    white-space: nowrap;
}

.lc-word {
    display: inline;
    color: var(--text);
    animation: lc-wordin .12s ease both;
}
@keyframes lc-wordin {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Blinking cursor — always sits after the last finalized word */
.lc-cursor {
    display: inline-block;
    width: 2px;
    height: .85em;
    background: var(--primary);
    vertical-align: text-bottom;
    margin-left: 1px;
    border-radius: 1px;
    animation: lc-blink .8s step-start infinite;
}
@keyframes lc-blink {
    0%,100% { opacity: 1; }
    50%      { opacity: 0; }
}

.lc-interim { color: var(--muted); font-style: italic; }

/* Placeholder shown when SpeechRecognition is unavailable */
.lc-placeholder {
    color: var(--muted); font-style: italic; font-size: 14px; padding: 4px 0;
}

/* Mobile */
@media (max-width: 768px) {
    .lc-body {
        font-size: 14px;
        max-height: min(42vh, 360px);
    }
    .lc-block { padding-left: 46px; }
}

/* Touch devices: disable word animation to prevent opacity:0 stuck frames */
@media (hover: none) and (pointer: coarse) {
    .lc-word { animation: none !important; opacity: 1 !important; }
}

.status {
    margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm);
    background: var(--surface-2); color: var(--text); font-size: 14px;
    display: flex; align-items: center; gap: 10px;
}
.spinner {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid var(--border); border-top-color: var(--primary);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Transcript ===== */
.transcript-area {
    width: 100%; resize: vertical; min-height: 200px;
    padding: 14px; font: inherit; font-size: 14px; line-height: 1.55;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface-2); color: var(--text);
}
.transcript-area:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

/* ===== Tools grid (single-window) ===== */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 900px) { .tools-grid { grid-template-columns: 1fr; } }

.tool-section {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.tool-section.span-full { grid-column: 1 / -1; }

.tool-section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px; padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.tool-section-header h3 {
    margin: 0; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
    display: flex; align-items: center; gap: 6px;
}

.prose {
    line-height: 1.65; font-size: 14.5px;
}
.prose h1, .prose h2, .prose h3 { margin-top: 1.2em; margin-bottom: .4em; }
.prose h2 { font-size: 16px; }
.prose h3 { font-size: 14.5px; color: var(--muted); }
.prose p { margin: .5em 0; }
.prose ul, .prose ol { padding-left: 22px; margin: .4em 0; }
.prose code {
    background: var(--surface-2); padding: 1px 6px; border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
}

.action-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.action-list li {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface-2);
}
.action-list input[type=checkbox] { margin-top: 4px; transform: scale(1.15); accent-color: var(--primary); }
.action-list .ai-owner { font-weight: 700; }
.action-list .ai-due { color: var(--muted); font-size: 12px; margin-left: 8px; }
.action-list li.done .ai-task { text-decoration: line-through; color: var(--muted); }

.email-draft {
    background: var(--surface-2); padding: 16px; border-radius: var(--radius-sm);
    word-wrap: break-word;
    font: inherit; font-size: 14px; line-height: 1.6;
    border: 1px solid var(--border);
    max-height: 60vh; overflow: auto;
}

/* ===== Toast ===== */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: var(--text); color: var(--bg);
    padding: 10px 16px; border-radius: 999px;
    font-size: 13px; font-weight: 600;
    box-shadow: var(--shadow);
    opacity: 0; pointer-events: none; transition: opacity .2s;
    z-index: 50;
}
.toast.show { opacity: .95; }

/* ===== Admin layout ===== */
.admin-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0;
    min-height: calc(100vh - 57px);
}
@media (max-width: 700px) {
    .admin-layout { grid-template-columns: 1fr; }
}

.admin-sidebar {
    border-right: 1px solid var(--border);
    background: var(--surface);
    padding: 24px 12px;
}
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600; color: var(--text);
    text-decoration: none;
    transition: background .12s;
}
.admin-nav-item:hover { background: var(--surface-2); text-decoration: none; }
.admin-nav-item.active { background: var(--surface-2); color: var(--primary); }

.admin-content { padding: 32px; min-width: 0; }
@media (max-width: 700px) { .admin-content { padding: 16px; } }

.admin-page-header { margin-bottom: 24px; }
.admin-page-header h1 { margin: 0 0 4px; font-size: 22px; }

/* ===== Settings page ===== */
.settings-fields { display: grid; gap: 16px; }
.setting-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    align-items: start;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; padding-bottom: 0; }
@media (max-width: 800px) { .setting-row { grid-template-columns: 1fr; } }

.setting-meta { display: flex; flex-direction: column; gap: 3px; }
.setting-meta label { font-weight: 600; font-size: 14px; cursor: default; }
.setting-desc { line-height: 1.4; }
.setting-updated { opacity: .7; }

.setting-input {
    width: 100%; padding: 9px 12px;
    font: inherit; font-size: 14px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface-2); color: var(--text);
}
.setting-input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.secret-field-wrap { display: flex; gap: 6px; }
.secret-field-wrap .setting-input { flex: 1; }

.settings-actions {
    display: flex; align-items: center; gap: 12px;
    margin-top: 20px; padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ===== Users table ===== */
.users-table-wrap { overflow-x: auto; }
.users-table {
    width: 100%; border-collapse: collapse;
    font-size: 14px;
}
.users-table th, .users-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}
.users-table th {
    background: var(--surface-2);
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    color: var(--muted);
}
.users-table tbody tr:hover { background: var(--surface-2); }
.users-table tr.row-admin td:first-child { border-left: 3px solid var(--primary); }

/* ===== Sidebar — stats, chart, sort, filter, collapse ===== */
.sidebar-body { display: flex; flex-direction: column; gap: 10px; }

/* Stats row */
.sidebar-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stat-mini {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 8px 6px;
    text-align: center; display: flex; flex-direction: column; gap: 2px;
}
.stat-val { font-size: 18px; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-label { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* Activity chart */
.chart-wrap { position: relative; }
.chart-label {
    font-size: 10px; font-weight: 600; color: var(--muted);
    text-transform: uppercase; letter-spacing: .04em;
    margin: 0 0 4px;
}

/* Sort + filter row */
.sidebar-controls { display: flex; align-items: center; gap: 6px; }
.sidebar-select {
    flex: 1; min-width: 0;
    padding: 5px 8px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--surface-2);
    font: inherit; font-size: 12px; color: var(--text); outline: none;
}
.sidebar-select:focus { border-color: var(--primary); }
.filter-tabs { display: flex; gap: 2px; flex-shrink: 0; }
.filter-tab {
    padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px;
    background: var(--surface-2); color: var(--muted);
    font: inherit; font-size: 11px; font-weight: 600; cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.filter-tab:hover { background: var(--border); color: var(--text); }
.filter-tab.active { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }

/* Meeting count footer */
.sidebar-footer { padding: 4px 0 0; text-align: center; }

/* Action count badge on meeting items */
.mi-row2 { display: flex; align-items: center; gap: 6px; margin-top: 1px; }
.mi-action-count {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 10px; font-weight: 700; color: var(--muted);
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 999px; padding: 1px 6px; line-height: 1.4;
    white-space: nowrap;
}
.mi-action-count.has-actions { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }

/* Star icon on meeting items */
.mi-star-icon {
    font-size: 10px; color: var(--border); transition: color .15s;
    display: inline-flex; align-items: center;
}
.mi-star-icon.starred { color: #f59e0b; }

/* Transcript word-count meta bar */
.transcript-meta {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 6px 0 8px;
    font-size: 12px; color: var(--muted);
    border-bottom: 1px solid var(--border); margin-bottom: 8px;
}
.transcript-meta span { display: inline-flex; align-items: center; gap: 5px; }

/* Sidebar collapsed state */
.sidebar.collapsed { padding: 8px 4px; overflow: hidden; }
.app-main.sidebar-hidden { grid-template-columns: 44px 1fr; }
.sidebar.collapsed .sidebar-body { display: none; }
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed #newMeetingBtn { display: none; }
.sidebar.collapsed .sidebar-header { justify-content: center; margin-bottom: 0; padding: 0; }
.sidebar.collapsed .sidebar-header-actions { justify-content: center; width: 100%; }

/* Empty state in meeting list */
.meeting-list .empty-state {
    padding: 24px 12px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.meeting-list .empty-state .empty-icon { font-size: 32px; opacity: .3; }
.meeting-list .empty-state .empty-msg { font-size: 13px; font-weight: 600; color: var(--text); }
.meeting-list .empty-state .empty-sub { font-size: 12px; color: var(--muted); }

/* ===== Print styles ===== */
@media print {
    .app-header, .sidebar, .recorder, .dropzone, .live-caption,
    .section-divider, .card-actions, #generateStatus,
    .sidebar-controls, .filter-tabs, .toast { display: none !important; }
    .app-main { display: block; padding: 0; }
    .workspace { gap: 16px; }
    .card {
        box-shadow: none; border: 1px solid #ddd;
        break-inside: avoid; page-break-inside: avoid;
        margin-bottom: 16px;
    }
    body { background: #fff; color: #000; }
}

/* ===== Home dashboard ===== */
.home-view { display: grid; gap: 20px; }

.home-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    border-radius: var(--radius);
    padding: 28px 32px;
    color: #fff;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    flex-wrap: wrap;
}
.home-hero h1 { margin: 0; font-size: 22px; font-weight: 800; }
.home-hero p  { margin: 4px 0 0; opacity: .8; font-size: 14px; }
.home-hero-text { min-width: 0; flex: 1 1 200px; }
.home-quick-btns { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 1; min-width: 0; }
.home-quick-btns .btn {
    background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35);
    color: #fff; white-space: nowrap;
}
.home-quick-btns .btn:hover { background: rgba(255,255,255,.3); }

/* 4-col stats row — uses container query so breakpoints are based on
   the actual workspace width, not viewport (sidebar eats ~392px). */
.home-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
/* Container-query breakpoints (workspace width, not viewport) */
@container (max-width: 700px) { .home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 360px) { .home-stats { grid-template-columns: 1fr; } }
/* Hero: wrap buttons below text when workspace is tight */
@container (max-width: 680px) {
    .home-hero { padding: 20px 22px; gap: 12px; }
    .home-quick-btns { flex-basis: 100%; width: 100%; }
    .home-quick-btns .btn { flex: 1; min-width: calc(50% - 5px); justify-content: center; font-size: 13px; }
}
@container (max-width: 400px) {
    .home-quick-btns .btn { min-width: 100%; }
}
/* Fallback for older browsers that don't support container queries */
@media (max-width: 1100px) { .home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.home-stat-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 18px 20px;
    display: flex; align-items: center; gap: 14px;
    min-width: 0; overflow: hidden;
}
.home-stat-icon { font-size: 22px; flex-shrink: 0; color: var(--muted); }
.home-stat-card .stat-val   { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 2px; }
.home-stat-card .stat-label { font-size: 12px; color: var(--muted); font-weight: 500; }

/* Chart inside home view */
.home-chart-wrap { height: 130px; position: relative; padding-bottom: 4px; }

/* Recent meetings grid */
.recent-meetings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
@container (max-width: 400px) { .recent-meetings-grid { grid-template-columns: 1fr; } }
.recent-card {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 16px;
    cursor: pointer; transition: background .12s, border-color .12s;
    display: flex; flex-direction: column; gap: 6px;
}
.recent-card:hover { background: var(--border); border-color: var(--primary); }
.recent-card-header {
    display: flex; align-items: flex-start;
    justify-content: space-between; gap: 8px;
}
.recent-card-title { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.rc-star { color: #f59e0b; font-size: 12px; flex-shrink: 0; }
.recent-card-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: 11.5px; color: var(--muted); flex-wrap: wrap;
}
.rc-ai-badge { color: var(--primary); font-weight: 600; }
.recent-card-snippet {
    font-size: 11.5px; color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ===== Responsive ===== */

/* --- Mobile hamburger button (hidden on desktop) --- */
.mobile-menu-btn {
    display: none;
    align-items: center; justify-content: center;
    background: var(--surface-2); border: 1px solid var(--border);
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    cursor: pointer; color: var(--text); font-size: 15px;
    flex-shrink: 0; order: -1; /* leftmost in nav */
}

/* --- Sidebar backdrop overlay --- */
.sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 299;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}
.sidebar-backdrop.show { display: block; }

/* --- 1100px: large tablet — hero & stats already handled via container queries;
       also tighten the main padding slightly. --- */
@media (max-width: 1100px) {
    .app-main { gap: 16px; padding: 20px; }
}

/* --- 900px: tablet — single column, sidebar in flow --- */
@media (max-width: 900px) {
    .app-main {
        padding: 16px;
        gap: 16px;
    }
    .sidebar { position: static; height: auto; }
    .meeting-list { max-height: 45vh; }
    /* Workspace is now full width on tablet — expand stats back to 4 cols if space allows */
    .home-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* --- 768px: mobile — sidebar becomes fixed overlay drawer --- */
@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }

    .app-main {
        grid-template-columns: 1fr !important; /* always full-width on mobile */
        padding: 12px;
        gap: 12px;
    }

    .home-hero {
        padding: 20px;
        align-items: stretch;
    }
    .home-hero-text { flex-basis: 100%; }
    .home-quick-btns {
        width: 100%;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .home-quick-btns .btn {
        width: 100%;
        min-width: 0;
        justify-content: center;
        white-space: normal;
    }
    .home-stats { grid-template-columns: 1fr !important; }

    /* Sidebar → fixed drawer, pushed off-screen by default */
    .sidebar {
        position: fixed;
        top: 57px; left: 0; bottom: 0;
        width: 300px; max-width: 85vw;
        height: calc(100dvh - 57px);
        border-radius: 0 var(--radius) var(--radius) 0;
        border-left: none; border-top: none;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.24s ease, box-shadow 0.24s ease;
        z-index: 300;
    }
    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.2);
    }

    /* Override collapsed-sidebar overrides so the drawer works correctly */
    .sidebar.collapsed,
    .sidebar.collapsed.mobile-open { padding: 16px; }
    .sidebar.collapsed .sidebar-body { display: flex; }
    .sidebar.collapsed .sidebar-title,
    .sidebar.collapsed #newMeetingBtn { display: inline-flex; }
    .sidebar.collapsed .sidebar-header {
        justify-content: space-between; margin-bottom: 10px;
    }
    .sidebar.collapsed .sidebar-header-actions { justify-content: flex-start; width: auto; }

    /* Meeting list scrolls freely inside the drawer */
    .meeting-list { max-height: none; }

    /* Collapse button redundant on mobile — hide it */
    #sidebarCollapseBtn { display: none; }
}

/* --- 600px: small phones --- */
@media (max-width: 600px) {
    .app-topbar { padding: 10px 14px; }
    .app-nav { gap: 6px; }
    /* Hide "Hi, Name" greeting to save space */
    #topbarGreeting { display: none; }
    /* Hide "Admin" label text, keep icon */
    .topbar-label { display: none; }
    /* Keep the dashboard in a single safe column on phones */
    .brand > span:last-child { display: none; }

    .home-stats { grid-template-columns: 1fr !important; }

    .app-main { padding: 10px; gap: 10px; }

    /* Cards */
    .card { padding: 14px; }
    .card h2 { font-size: 15px; }
    .card-header { flex-wrap: wrap; gap: 8px; }
    .card-actions { flex-wrap: wrap; gap: 6px; }

    /* Home hero: stack vertically */
    .home-hero {
        padding: 18px 20px; gap: 14px;
    }
    .home-hero h1 { font-size: 18px; }
    .home-hero p  { font-size: 13px; }
    .home-quick-btns { width: 100%; flex-basis: 100%; gap: 8px; }
    .home-quick-btns .btn {
        flex: none; width: 100%; min-width: 0; justify-content: center;
        font-size: 13px; padding: 9px 10px; white-space: normal;
    }

    /* Recorder row */
    .recorder .btn-lg { flex: 1; min-width: 160px; justify-content: center; }

    /* Transcript meta bar */
    .transcript-meta { gap: 8px; font-size: 11px; }

    /* Recent meetings: single column on small phones */
    .recent-meetings-grid { grid-template-columns: 1fr; }

    /* Dropzone padding */
    .dropzone { padding: 18px 16px; }

    /* Auth cards */
    .auth-card { padding: 24px 18px; }
    .auth-topbar { padding: 14px 16px; }
}

/* --- 480px: Force stats grid to 1 column --- */
@media (max-width: 480px) {
    .home-stats { grid-template-columns: 1fr !important; }
}

/* --- 400px: very small phones --- */
@media (max-width: 400px) {
    .app-topbar { padding: 8px 10px; }
    .app-nav { gap: 6px; }
    .home-quick-btns .btn { min-width: 100%; flex: unset; width: 100%; }
    .home-hero { padding: 14px 16px; }
    .home-hero h1 { font-size: 16px; }
    .card { padding: 12px; }
    /* Recorder: stack button full-width, then timer+select below */
    .recorder { gap: 8px; }
    .recorder #recordBtn { width: 100%; min-width: 0; }
    .recorder #recordTimer { order: 2; }
    #langSelect { order: 3; width: 100%; }
}

/* --- Admin nav: horizontal on mobile (supplements existing 700px rule) --- */
@media (max-width: 700px) {
    .admin-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 10px 12px;
    }
    .admin-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .admin-nav-item { padding: 8px 12px; font-size: 13px; }
    .settings-actions { flex-wrap: wrap; }
}

/* --- Print: keep responsive — no sidebar clutter --- */
@media print {
    .mobile-menu-btn, .sidebar-backdrop { display: none !important; }
}

/* ===== Model preload overlay ===== */
.model-load-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(11, 13, 18, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 1;
    transition: opacity 0.38s ease;
}
.model-load-overlay.model-load-fadeout { opacity: 0; pointer-events: none; }
.model-load-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    padding: 36px 32px;
    max-width: 460px; width: 100%;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.model-load-icon {
    font-size: 44px; color: var(--primary);
    animation: ml-float 1.8s ease-in-out infinite;
}
@keyframes ml-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}
.model-load-card h2 { margin: 0; font-size: 22px; }
.model-load-card p  { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }
.model-load-progress-wrap { width: 100%; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.model-load-bar {
    width: 100%; height: 7px;
    background: var(--surface-2); border-radius: 99px; overflow: hidden;
}
.model-load-bar-fill {
    height: 100%; width: 0%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    transition: width 0.5s ease;
}
.model-load-status-text { font-size: 13px; color: var(--muted); }
.status .model-load-progress-wrap { flex: 1; width: 100%; }
.status .model-load-status-text strong { color: var(--text); font-weight: 700; }
@media (max-width: 480px) {
    .model-load-card { padding: 28px 20px; gap: 14px; }
    .model-load-card h2 { font-size: 18px; }
}

/* ===== Touch & accessibility improvements ===== */
/* Eliminate 300ms tap delay on all interactive elements */
.btn, select, input, textarea, label[for],
.link, .mi-menu-btn, .filter-tab, .sidebar-select,
.recent-card, .meeting-item, [role="button"] {
    touch-action: manipulation;
}

/* Minimum tap target size on touch-only devices */
@media (hover: none) and (pointer: coarse) {
    .btn           { min-height: 44px; }
    .btn-sm        { min-height: 38px; padding: 8px 14px; }
    .btn-lg        { min-height: 52px; }
    .mi-menu-btn   { min-width: 44px; min-height: 44px; }
    .filter-tab    { min-height: 38px; padding: 7px 12px; }
    #langSelect    { min-height: 44px; }
    .sidebar-search { min-height: 44px; }
    .sidebar-select { min-height: 38px; }
    .theme-toggle,
    .tour-help-btn,
    .mobile-menu-btn { min-width: 44px; min-height: 44px; }
}

/* ===== Safe-area insets (iPhone notch / home bar) ===== */
@supports (padding: env(safe-area-inset-top)) {
    .app-topbar {
        padding-left:  max(24px, env(safe-area-inset-left));
        padding-right: max(24px, env(safe-area-inset-right));
        padding-top:   max(12px, env(safe-area-inset-top));
    }
    .app-main {
        padding-left:  max(24px, env(safe-area-inset-left));
        padding-right: max(24px, env(safe-area-inset-right));
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }

    @media (max-width: 768px) {
        .app-topbar {
            padding-left:  max(14px, env(safe-area-inset-left));
            padding-right: max(14px, env(safe-area-inset-right));
        }
        .app-main {
            padding-left:  max(12px, env(safe-area-inset-left));
            padding-right: max(12px, env(safe-area-inset-right));
            padding-bottom: max(12px, env(safe-area-inset-bottom));
        }
        .sidebar {
            padding-bottom: max(16px, env(safe-area-inset-bottom));
        }
    }
}

/* Ensure card-actions never overflow on narrow screens */
@media (max-width: 480px) {
    .card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .card-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
    .recorder { gap: 10px; }
    .recorder #recordBtn { width: 100%; }
    .recorder #recordTimer { order: 2; }
    #langSelect { order: 3; width: 100%; max-width: 100%; }
}

/* Force strict horizontal containment on mobile to fix layout shifting */
@media (max-width: 768px) {
    body, html {
        width: 100%;
        overflow-x: hidden !important;
        position: relative;
    }
    .app-main {
        max-width: 100vw;
        overflow-x: hidden;
    }
    .card, .home-hero, .auth-card, .dropzone {
        max-width: 100%;
        box-sizing: border-box;
    }
    .app-topbar { max-width: 100%; overflow-x: hidden; }
}

/* ============================================================
   v1.5 — extra responsive hardening + email/tour modal styles
   ============================================================ */

/* Belt-and-suspenders: nothing should ever exceed the viewport width */
img, video, canvas, pre, code, table { max-width: 100%; }
.transcript-area, textarea, input, select { max-width: 100%; }
.workspace, main, .app-main, .card { min-width: 0; }

/* Email modal */
.vm-modal {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity .15s ease;
}
.vm-modal.open { opacity: 1; }
.vm-modal[hidden] { display: none !important; }
.vm-modal-card {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    width: min(440px, 100%);
    padding: 22px;
    position: relative;
}
.vm-modal-card h3 { margin: 0 0 6px; font-size: 18px; }
.vm-modal-close {
    position: absolute; top: 10px; right: 10px;
    background: transparent; border: none;
    font-size: 24px; line-height: 1; color: var(--muted);
    cursor: pointer; padding: 4px 10px; border-radius: 8px;
}
.vm-modal-close:hover { background: var(--bg); color: var(--text); }
.vm-input {
    display: block; width: 100%;
    padding: 10px 12px; margin: 6px 0 12px;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--bg); color: var(--text); font: inherit;
}
.vm-check {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--muted);
    margin: 8px 0 12px; cursor: pointer;
}
.vm-modal-actions {
    display: flex; gap: 8px; justify-content: flex-end;
    margin-top: 14px;
}
@media (max-width: 480px) {
    .vm-modal-card { padding: 18px; border-radius: 12px; }
    .vm-modal-actions { flex-direction: column-reverse; }
    .vm-modal-actions .btn { width: 100%; }
}

/* Tour welcome modal close X (added so users can always dismiss it) */
.tour-modal-close {
    position: absolute; top: 8px; right: 10px;
    background: transparent; border: none;
    font-size: 26px; line-height: 1; color: #888;
    cursor: pointer; padding: 4px 12px; border-radius: 8px;
    z-index: 2;
}
.tour-modal-close:hover { background: rgba(0,0,0,.06); color: #000; }
.tour-modal-card { position: relative; }

/* ===== v1.6: tags, shortcuts, share ===== */
.tags-row {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
    margin: 8px 0 4px; padding: 6px 10px;
    background: var(--surface-2, rgba(127,127,127,.05));
    border: 1px dashed var(--border, rgba(127,127,127,.25));
    border-radius: 10px;
}
.tags-list { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
    background: rgba(99,102,241,.12); color: #6366f1;
    border: 1px solid rgba(99,102,241,.25);
    cursor: pointer; user-select: none; transition: background .15s;
}
.tag-chip:hover { background: rgba(99,102,241,.22); }
.tag-chip .tag-x {
    display: inline-block; width: 14px; height: 14px; line-height: 14px;
    text-align: center; border-radius: 50%;
    background: rgba(0,0,0,.08); font-size: 10px; font-weight: 700; color: inherit;
}
.tag-chip .tag-x:hover { background: rgba(220,38,38,.18); color: #dc2626; }
.tag-chip.tag-mini {
    padding: 1px 7px; font-size: 11px; line-height: 1.4;
    background: rgba(99,102,241,.08); border-color: rgba(99,102,241,.18);
}
.tag-input {
    flex: 1; min-width: 80px; padding: 4px 8px;
    background: transparent; border: none; outline: none;
    color: inherit; font-size: 13px;
}
.meeting-tags { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }

.shortcuts-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.shortcuts-table td {
    padding: 6px 10px; border-bottom: 1px solid var(--border, rgba(127,127,127,.15));
    font-size: 13px;
}
.shortcuts-table td:first-child { width: 1%; white-space: nowrap; text-align: right; }
.shortcuts-table kbd {
    display: inline-block; padding: 2px 7px; margin: 0 1px;
    background: var(--surface, #f4f4f5); border: 1px solid var(--border, rgba(0,0,0,.15));
    border-bottom-width: 2px; border-radius: 5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;
}
.vm-modal-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:14px; }
.vm-input { width: 100%; padding: 8px 10px; margin-top: 8px;
    background: var(--surface, transparent);
    border: 1px solid var(--border, rgba(127,127,127,.25));
    border-radius: 8px; color: inherit; font-size: 13px;
}


/* ============================================================
   v1.6 — pause/resume button + paused recording state
   ============================================================ */
.recorder #pauseBtn { flex: 0 0 auto; gap: 8px; }
.recorder #pauseBtn i { font-size: 13px; }
/* Subtle dimmed pulse while paused so users see recording is held */
.btn.recording.paused { opacity: .85; }
.btn.recording.paused .rec-dot { animation: none; opacity: .5; }
@media (max-width: 480px) {
    .recorder #pauseBtn { width: 100%; order: 1; }
}
@media (max-width: 400px) {
    .recorder #pauseBtn { width: 100%; order: 1; }
}
