/* ============================================
   TextToSuara - Main Stylesheet
   Version: 1.0.0 | May 2026
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --primary: #6C63FF;
    --primary-dark: #5A52D5;
    --primary-light: rgba(108, 99, 255, 0.12);
    --secondary: #00C896;
    --secondary-dark: #00A87D;
    --danger: #FF4757;
    --warning: #FFA502;
    --info: #3ECFFF;
    --bg: #0A0A14;
    --bg2: #0F0F1A;
    --card: #141428;
    --card2: #1A1A30;
    --card3: #1E1E38;
    --border: rgba(255, 255, 255, 0.07);
    --border2: rgba(255, 255, 255, 0.12);
    --text: #F0F0FA;
    --text-muted: #7070A0;
    --text-dim: #5050808;
    --sidebar-w: 260px;
    --header-h: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
    --gradient: linear-gradient(135deg, #6C63FF, #00C896);
    --gradient2: linear-gradient(135deg, #6C63FF, #FF6B9D);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ======== SCROLLBAR ======== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--card); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ======== LAYOUT ======== */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-header {
    height: var(--header-h);
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 90;
    backdrop-filter: blur(20px);
}

.page-content {
    padding: 28px;
    flex: 1;
}

/* ======== SIDEBAR ======== */
.sidebar-logo {
    padding: 22px 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo .logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-logo .logo-badge {
    font-size: 0.62rem;
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 7px;
    border-radius: 20px;
    font-weight: 600;
    -webkit-text-fill-color: var(--primary);
}

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

.nav-section-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 12px 10px 6px;
    font-weight: 700;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
    position: relative;
}

.nav-item:hover { background: var(--card2); color: var(--text); }
.nav-item.active { background: var(--primary-light); color: var(--primary); }
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.nav-item .nav-icon { font-size: 1.1rem; width: 22px; text-align: center; }
.nav-item .nav-badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 1px 7px;
    border-radius: 20px;
    font-weight: 600;
}

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

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: var(--card2);
}

.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 0.72rem; color: var(--secondary); font-weight: 500; }

/* ======== HEADER ======== */
.page-title h1 { font-size: 1.2rem; font-weight: 700; }
.page-title p { font-size: 0.82rem; color: var(--text-muted); margin-top: 1px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-btn {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    background: var(--card2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
    transition: all 0.2s;
    text-decoration: none;
}
.header-btn:hover { background: var(--card3); color: var(--text); }

/* ======== CARDS ======== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.card-sm { padding: 16px; }
.card-lg { padding: 32px; }

.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ======== STATS GRID ======== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.stat-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    border-radius: 50%;
    opacity: 0.05;
}

.stat-card.purple::before { background: var(--primary); }
.stat-card.green::before { background: var(--secondary); }
.stat-card.orange::before { background: var(--warning); }
.stat-card.blue::before { background: var(--info); }

.stat-icon { font-size: 1.5rem; margin-bottom: 12px; }
.stat-value { font-size: 1.8rem; font-weight: 800; margin-bottom: 4px; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.stat-change { font-size: 0.75rem; margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.stat-change.up { color: var(--secondary); }
.stat-change.down { color: var(--danger); }

/* ======== FORMS ======== */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 7px;
    letter-spacing: 0.3px;
}
.form-label .required { color: var(--danger); }
.form-label .hint { color: var(--text-muted); font-weight: 400; font-size: 0.78rem; }

.form-control {
    width: 100%;
    padding: 11px 14px;
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
    -webkit-appearance: none;
}

.form-control:focus { border-color: var(--primary); background: var(--card3); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { cursor: pointer; }

.form-control-prefix {
    display: flex;
    align-items: center;
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.2s;
}
.form-control-prefix:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control-prefix .prefix { padding: 11px 14px; background: var(--card3); border-right: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; }
.form-control-prefix input { background: transparent; border: none; box-shadow: none; }
.form-control-prefix input:focus { box-shadow: none; }

.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Slider */
.slider-group { display: flex; align-items: center; gap: 12px; }
.slider-group input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    background: var(--card3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
}
.slider-group input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.slider-value {
    min-width: 40px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

/* ======== BUTTONS ======== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(108,99,255,0.3); }

.btn-gradient { background: var(--gradient); color: white; }
.btn-gradient:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(108,99,255,0.35); }

.btn-success { background: var(--secondary); color: #0A0A14; }
.btn-success:hover { background: var(--secondary-dark); transform: translateY(-1px); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-outline { background: transparent; border: 1.5px solid var(--border2); color: var(--text); }
.btn-outline:hover { background: var(--card2); border-color: var(--primary); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--card2); color: var(--text); }

/* Loading spinner */
.spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ======== BADGES ======== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: rgba(0,200,150,0.12); color: var(--secondary); }
.badge-danger { background: rgba(255,71,87,0.12); color: var(--danger); }
.badge-warning { background: rgba(255,165,2,0.12); color: var(--warning); }
.badge-info { background: rgba(62,207,255,0.12); color: var(--info); }

/* ======== ALERTS ======== */
.alert {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}
.alert-success { background: rgba(0,200,150,0.1); border: 1px solid rgba(0,200,150,0.25); color: var(--secondary); }
.alert-danger { background: rgba(255,71,87,0.1); border: 1px solid rgba(255,71,87,0.25); color: var(--danger); }
.alert-warning { background: rgba(255,165,2,0.1); border: 1px solid rgba(255,165,2,0.25); color: var(--warning); }
.alert-info { background: rgba(62,207,255,0.1); border: 1px solid rgba(62,207,255,0.25); color: var(--info); }

/* ======== TABLES ======== */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
tbody td {
    padding: 12px 14px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--card2); }

/* ======== AUDIO PLAYER ======== */
.audio-player {
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.audio-waveform {
    height: 60px;
    background: var(--card3);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 12px;
}

.wave-bar {
    width: 3px;
    background: var(--primary);
    border-radius: 2px;
    animation: wave 1.2s ease-in-out infinite;
    opacity: 0.5;
}

.wave-bar:nth-child(odd) { animation-delay: 0.1s; }
.wave-bar:nth-child(3n) { animation-delay: 0.3s; }
.wave-bar:nth-child(4n) { animation-delay: 0.2s; }

@keyframes wave {
    0%, 100% { height: 8px; }
    50% { height: 40px; }
}

.audio-player.playing .wave-bar { opacity: 1; }
.audio-player:not(.playing) .wave-bar { animation: none; height: 20px; }

.audio-controls { display: flex; align-items: center; gap: 12px; }
.play-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--gradient);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    transition: all 0.2s;
    flex-shrink: 0;
}
.play-btn:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(108,99,255,0.4); }

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--card3);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.time-display {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

/* ======== CHAR COUNTER ======== */
.char-counter {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 5px;
}
.char-counter .count { font-family: 'JetBrains Mono', monospace; }
.char-counter .count.warn { color: var(--warning); }
.char-counter .count.danger { color: var(--danger); }

/* ======== VOICE GRID ======== */
.voice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.voice-option {
    padding: 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: var(--card2);
}

.voice-option:hover { border-color: var(--primary); background: var(--card3); }
.voice-option.selected { border-color: var(--primary); background: var(--primary-light); }
.voice-option .voice-emoji { font-size: 1.5rem; margin-bottom: 6px; }
.voice-option .voice-name { font-size: 0.78rem; font-weight: 600; }
.voice-option .voice-desc { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

/* ======== EMOTION PILLS ======== */
.emotion-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.emotion-pill {
    padding: 7px 14px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--card2);
    transition: all 0.2s;
}
.emotion-pill:hover { border-color: var(--primary); color: var(--primary); }
.emotion-pill.selected { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.emotion-pill .ep-emoji { margin-right: 4px; }

/* ======== TOGGLE ======== */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px; height: 24px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--card3);
    border: 1px solid var(--border2);
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px; width: 18px;
    left: 2px; top: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle input:checked + .toggle-slider { background: var(--primary); border-color: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ======== TABS ======== */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; gap: 0; }
.tab-btn {
    padding: 10px 18px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ======== MODAL ======== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
    background: var(--card);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    width: 100%; max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: all 0.2s;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.2rem; padding: 4px; }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ======== TOAST ======== */
#toast-container {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    background: var(--card2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm);
    padding: 13px 18px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    max-width: 380px;
    pointer-events: all;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow);
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.success { border-left: 3px solid var(--secondary); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.info { border-left: 3px solid var(--info); }
.toast-icon { font-size: 1rem; }
.toast-msg { flex: 1; }

/* ======== LOADING OVERLAY ======== */
.loading-overlay {
    position: fixed; inset: 0;
    background: rgba(10, 10, 20, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    gap: 16px;
    backdrop-filter: blur(4px);
}
.loading-spinner {
    width: 48px; height: 48px;
    border: 3px solid var(--card3);
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-text { font-size: 0.9rem; color: var(--text-muted); }

/* ======== EMPTY STATE ======== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 0.88rem; }

/* ======== DIVIDER ======== */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.divider-text {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 20px 0;
}
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ======== UTILITIES ======== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--secondary); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.72rem; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.fw-bold { font-weight: 700; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-0 { padding: 0 !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ======== RESPONSIVE ======== */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .form-row, .form-row-3, .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .page-content { padding: 16px; }
    .card { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr; }
    .voice-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ======== AUTH PAGES ======== */
.auth-page {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: fixed;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108,99,255,0.12) 0%, transparent 70%);
    top: -200px; right: -200px;
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: fixed;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,200,150,0.08) 0%, transparent 70%);
    bottom: -100px; left: -100px;
    pointer-events: none;
}

.auth-container {
    margin: auto;
    width: 100%; max-width: 440px;
    padding: 24px;
    position: relative; z-index: 1;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo .logo-mark {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 8px;
}

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.auth-logo p { color: var(--text-muted); font-size: 0.88rem; }

.auth-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
}

.auth-card h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.auth-card .auth-subtitle { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 24px; }

.password-wrapper { position: relative; }
.password-wrapper .form-control { padding-right: 44px; }
.password-toggle {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 4px;
    transition: color 0.2s;
}
.password-toggle:hover { color: var(--text); }

.auth-footer { text-align: center; margin-top: 20px; font-size: 0.88rem; color: var(--text-muted); }
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }
