/* JD Tools - Content Calendar */
:root {
    --bg: #050505;
    --bg2: #0a0a0f;
    --bg3: #111118;
    --border: rgba(255,255,255,0.08);
    --text: #ffffff;
    --text2: #a0a0b0;
    --text3: #606070;
    --accent: #ffffff;
    --green: #22c55e;
    --yellow: #f59e0b;
    --red: #ef4444;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --radius: 10px;
    --font: 'Inter', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px rgba(255,255,255,0.05);
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); background: var(--bg); color: var(--text); overflow: hidden; height: 100vh; }
body::before {
    content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none; z-index: 9999;
}
::selection { background: #fff; color: #050505; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--text3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text2); }
.hidden { display: none !important; }
.view.hidden { display: none !important; }

/* Login */
.login-screen {
    height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--bg);
}
.login-card {
    text-align: center; padding: 48px; border: 1px solid var(--border);
    border-radius: 16px; background: var(--bg2);
}
.login-logo {
    font-size: 28px; font-weight: 800; color: var(--text);
    font-family: var(--mono); margin-bottom: 12px;
}
.login-logo span { color: var(--text2); }
.login-card p { color: var(--text2); margin-bottom: 32px; font-size: 14px; }
.btn-google {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 14px 28px; border-radius: 50px; border: 1px solid var(--border);
    background: var(--bg3); color: var(--text); font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.3s;
}
.btn-google:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); }

/* App Layout */
.app { display: flex; height: 100vh; }

/* Sidebar */
.sidebar {
    width: 240px; background: var(--bg2); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-header { padding: 20px; border-bottom: 1px solid var(--border); }
.sidebar-logo { font-family: var(--mono); font-size: 18px; font-weight: 700; }
.sidebar-logo span { color: var(--text2); }
.sidebar-nav { padding: 12px 8px; flex: 1; }
.nav-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    color: var(--text2); text-decoration: none; border-radius: 8px;
    font-size: 13px; font-weight: 500; transition: all 0.2s; margin-bottom: 2px;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-item.active { color: var(--text); background: rgba(255,255,255,0.06); }
.sidebar-brands { padding: 16px; border-top: 1px solid var(--border); }
.brand-label { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: var(--text3); margin-bottom: 8px; }
.brand-btn {
    display: block; width: 100%; text-align: left; padding: 8px 12px;
    background: none; border: 1px solid transparent; border-radius: 6px;
    color: var(--text2); font-size: 12px; cursor: pointer; margin-bottom: 4px;
    transition: all 0.2s;
}
.brand-btn:hover { border-color: var(--border); }
.brand-btn.active { border-color: rgba(255,255,255,0.15); color: var(--text); background: rgba(255,255,255,0.04); }
.sidebar-footer {
    padding: 16px; border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.user-info { display: flex; align-items: center; gap: 8px; }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; }
.user-info span { font-size: 12px; color: var(--text2); }
.btn-logout {
    background: none; border: none; color: var(--text3); font-size: 11px;
    cursor: pointer; padding: 4px 8px;
}
.btn-logout:hover { color: var(--red); }

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* Topbar */
.topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 24px; border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 18px; font-weight: 700; }
.topbar-subtitle { font-size: 12px; color: var(--text3); margin-left: 12px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.month-nav { display: flex; align-items: center; gap: 12px; }
.month-nav span { font-size: 13px; font-weight: 600; min-width: 120px; text-align: center; }
.btn-icon {
    background: none; border: 1px solid var(--border); border-radius: 6px;
    color: var(--text2); width: 32px; height: 32px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 16px;
    transition: all 0.2s;
}
.btn-icon:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }
.btn-primary-sm {
    padding: 8px 16px; background: #fff; color: #050505; border: none;
    border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer;
    transition: all 0.2s;
}
.btn-primary-sm:hover { background: #e0e0e0; }
.btn-outline-sm {
    padding: 8px 16px; background: none; color: var(--text2); border: 1px solid var(--border);
    border-radius: 8px; font-size: 12px; font-weight: 500; cursor: pointer;
}
.btn-danger-sm {
    padding: 8px 16px; background: var(--red); color: #fff; border: none;
    border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.btn-sm {
    padding: 6px 12px; background: rgba(255,255,255,0.06); border: 1px solid var(--border);
    border-radius: 6px; color: var(--text2); font-size: 11px; cursor: pointer;
    transition: all 0.2s; white-space: nowrap;
}
.btn-sm:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }
.btn-full { width: 100%; }

/* Calendar */
.view { flex: 1; overflow-y: auto; padding: 16px 24px; display: none; }
.view.active { display: block; }
#calendarView.active { display: flex; gap: 0; overflow: hidden; }
#calendarView .calendar-grid { flex: 1; min-width: 0; overflow-y: auto; padding-right: 16px; }
#calendarView.has-panel .calendar-grid { flex: 0 0 55%; }

.calendar-grid { flex: 1; }
.calendar-header {
    display: grid; grid-template-columns: repeat(7, 1fr);
    text-align: center; font-size: 11px; font-weight: 600;
    color: var(--text3); text-transform: uppercase; letter-spacing: 1px;
    padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.calendar-body { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.cal-day {
    min-height: 110px; padding: 6px; border: 1px solid transparent;
    border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
    cursor: pointer; transition: all 0.2s;
}
.cal-day:hover { background: rgba(255,255,255,0.02); border-color: var(--border); }
.cal-day.empty { cursor: default; }
.cal-day.today { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.15); }
.cal-day.special { background: rgba(245,158,11,0.04); }
.cal-day.missed { background: rgba(239,68,68,0.03); }
.cal-day-num { font-size: 12px; font-weight: 600; color: var(--text2); }
.cal-day.today .cal-day-num { color: var(--text); }
.cal-special { font-size: 9px; color: var(--yellow); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-content {
    display: flex; align-items: flex-start; gap: 4px; padding: 4px 6px;
    background: rgba(255,255,255,0.04); border-radius: 4px; margin-top: 3px;
    font-size: 10px; cursor: pointer; transition: all 0.2s;
}
.cal-content:hover { background: rgba(255,255,255,0.08); }
.cal-content-brand { font-size: 10px; flex-shrink: 0; }
.cal-content-text { flex: 1; color: var(--text2); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cal-content-status { font-size: 10px; flex-shrink: 0; }

/* Script Panel (right column - 45% width) */
.script-panel {
    flex: 0 0 45%; background: var(--bg2); border-left: 1px solid var(--border);
    display: flex; flex-direction: column;
}
.script-panel-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.script-panel-header .panel-actions { display: flex; gap: 6px; }

/* Fullscreen mode */
.script-panel.fullscreen {
    position: fixed; inset: 0; z-index: 200;
    flex: none; width: 100%; border: none;
}
.script-panel.fullscreen .script-panel-body {
    max-width: 800px; margin: 0 auto;
}
.script-panel.fullscreen .script-hook { font-size: 22px; }
.script-panel.fullscreen .script-line { font-size: 16px; }
.script-panel.fullscreen .script-card { padding: 28px; }
.script-panel-header h3 { font-size: 18px; font-weight: 700; }
.script-panel-date { font-size: 11px; color: var(--text3); font-family: var(--mono); }
.script-panel-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.script-panel-footer { padding: 16px 24px; border-top: 1px solid var(--border); }

/* Special Date Alert */
.special-alert {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.12);
    border-radius: 12px; margin-bottom: 16px;
}
.special-alert-icon { font-size: 28px; }
.special-alert strong { font-size: 13px; display: block; }
.special-alert p { font-size: 11px; color: var(--yellow); margin-top: 2px; }

/* Empty State */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { color: var(--text3); font-size: 14px; }
.empty-hint { font-size: 12px !important; margin-top: 4px; }

/* Script Card */
.script-card {
    background: rgba(255,255,255,0.02); border: 1px solid var(--border);
    border-radius: 14px; padding: 20px; margin-bottom: 20px;
    transition: border-color 0.2s;
}
.script-card + .script-card {
    border-top: 2px solid rgba(255,255,255,0.06);
    padding-top: 24px;
}
.script-card:hover { border-color: rgba(255,255,255,0.12); }

.script-card-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.script-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.script-brand { font-size: 12px; font-weight: 600; }
.script-type-badge {
    font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
    padding: 3px 10px; border-radius: 50px; background: rgba(255,255,255,0.06);
    border: 1px solid var(--border); color: var(--text2);
}
.script-series {
    font-size: 10px; color: var(--purple); font-style: italic;
    width: 100%; margin-top: 2px;
}
.status-badge {
    padding: 3px 10px; border-radius: 50px; font-size: 10px;
    font-weight: 600; color: #fff; flex-shrink: 0;
}

/* Script Sections */
.script-section {
    margin-bottom: 16px;
}
.script-section-label {
    font-size: 9px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; color: var(--text3); margin-bottom: 6px;
    font-family: var(--mono);
}
.script-hook {
    font-size: 18px; font-weight: 700; color: var(--text);
    line-height: 1.4; font-style: italic;
    padding: 16px 20px; background: rgba(245,158,11,0.06);
    border-left: 4px solid var(--yellow); border-radius: 0 10px 10px 0;
}
.script-idea {
    font-size: 14px; color: var(--text2); line-height: 1.8;
    padding: 20px; background: rgba(255,255,255,0.02);
    border: 1px solid var(--border); border-radius: 12px;
    white-space: pre-line;
}
.script-idea br + br { display: block; margin-top: 8px; }
.script-cta {
    font-size: 13px; color: var(--green); font-weight: 500;
    padding: 10px 14px; background: rgba(34,197,94,0.06);
    border: 1px solid rgba(34,197,94,0.1); border-radius: 8px;
}
.script-hashtags {
    font-size: 12px; color: var(--blue); font-family: var(--mono);
    line-height: 1.6;
}

/* Tabs */
.sp-tabs {
    display: flex; gap: 0; margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.sp-tab {
    padding: 10px 18px; background: none; border: none; border-bottom: 2px solid transparent;
    color: var(--text3); font-size: 12px; font-weight: 500; cursor: pointer;
    font-family: var(--font); transition: all 0.2s; white-space: nowrap;
}
.sp-tab:hover { color: var(--text2); }
.sp-tab.active { color: var(--text); border-bottom-color: #ffffff; }
.sp-tab-content { display: none; }
.sp-tab-content.active { display: block; }

/* Screenplay Format */
.screenplay {
    font-family: 'Courier Prime', 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 20px;
    margin: 12px 0;
}
.sp-scene-heading {
    font-family: 'Courier Prime', monospace;
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    color: var(--text); padding: 10px 0 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 8px; margin-top: 16px;
    display: flex; justify-content: space-between; align-items: center;
}
.sp-scene-heading:first-child { margin-top: 0; }
.sp-time {
    font-size: 11px; font-weight: 700; color: var(--yellow);
    background: rgba(245,158,11,0.1); padding: 2px 8px;
    border-radius: 4px;
}
.sp-action {
    font-family: 'Courier Prime', monospace;
    font-size: 12px; color: var(--text2); padding: 6px 0;
    line-height: 1.6; font-style: italic;
}
.sp-character {
    font-family: 'Courier Prime', monospace;
    font-size: 12px; font-weight: 700; color: var(--text);
    text-align: center; padding: 10px 0 2px;
    text-transform: uppercase; letter-spacing: 2px;
}
.sp-dialogue {
    font-family: 'Courier Prime', monospace;
    font-size: 14px; color: var(--text); line-height: 1.7;
    text-align: center; padding: 4px 40px 12px;
    max-width: 500px; margin: 0 auto;
}
.sp-parenthetical {
    font-family: 'Courier Prime', monospace;
    font-size: 11px; color: var(--text3); text-align: center;
    padding: 2px 0; font-style: italic;
}
.sp-notes-heading {
    font-family: 'Courier Prime', monospace;
    font-size: 11px; font-weight: 700; color: var(--text3);
    text-transform: uppercase; letter-spacing: 2px;
    padding: 16px 0 8px; margin-top: 16px;
    border-top: 2px solid rgba(255,255,255,0.06);
}
.sp-notes { padding: 0; }
.sp-note {
    font-family: 'Courier Prime', monospace;
    font-size: 11px; color: var(--text2); line-height: 1.8;
    padding: 2px 0;
}

/* Fullscreen - Minimal Teleprompter Mode */
.script-panel.fullscreen {
    background: #000000;
}
.script-panel.fullscreen .script-panel-header {
    position: absolute; top: 16px; right: 16px; z-index: 10;
    border: none; padding: 0; background: none;
}
.script-panel.fullscreen .script-panel-header > div:first-child,
.script-panel.fullscreen .script-panel-header #fullscreenPanel,
.script-panel.fullscreen .script-panel-footer,
.script-panel.fullscreen .script-card-top,
.script-panel.fullscreen .script-section-label,
.script-panel.fullscreen .script-actions,
.script-panel.fullscreen .script-hook,
.script-panel.fullscreen .script-cta,
.script-panel.fullscreen .script-hashtags,
.script-panel.fullscreen .script-section,
.script-panel.fullscreen .special-alert,
.script-panel.fullscreen .sp-tabs {
    display: none !important;
}
.script-panel.fullscreen .script-panel-header #closeDayPanel {
    background: rgba(255,255,255,0.1); border: none;
    width: 40px; height: 40px; font-size: 20px; color: #fff;
    border-radius: 50%;
}
.script-panel.fullscreen .script-panel-body {
    max-width: 700px; margin: 0 auto;
    padding: 60px 40px 100px;
    overflow-y: auto; height: 100vh;
    scrollbar-width: none;
}
.script-panel.fullscreen .script-panel-body::-webkit-scrollbar { display: none; }
.script-panel.fullscreen .screenplay {
    background: none; border: none; padding: 0;
    max-width: 600px; width: 100%;
}
.script-panel.fullscreen .sp-scene-heading {
    font-size: 16px; color: rgba(255,255,255,0.3);
    border-bottom-color: rgba(255,255,255,0.05);
    margin-top: 28px; padding: 14px 0 6px;
}
.script-panel.fullscreen .sp-scene-heading:first-child { margin-top: 0; }
.script-panel.fullscreen .sp-time {
    background: rgba(245,158,11,0.15);
}
.script-panel.fullscreen .sp-action {
    font-size: 14px; color: rgba(255,255,255,0.35);
    padding: 8px 0;
}
.script-panel.fullscreen .sp-parenthetical {
    font-size: 13px; color: rgba(255,255,255,0.25);
}
.script-panel.fullscreen .sp-character {
    font-size: 14px; color: rgba(255,255,255,0.4);
    padding: 14px 0 4px; letter-spacing: 3px;
}
.script-panel.fullscreen .sp-dialogue {
    font-size: 22px; color: #ffffff; line-height: 1.6;
    padding: 6px 20px 20px; max-width: 100%;
}
.script-panel.fullscreen .sp-notes-heading {
    font-size: 12px; color: rgba(255,255,255,0.2);
    border-top-color: rgba(255,255,255,0.05);
}
.script-panel.fullscreen .sp-note {
    font-size: 12px; color: rgba(255,255,255,0.25);
}
/* Show ALL tab contents in fullscreen (scroll through all) */
.script-panel.fullscreen .sp-tab-content { display: block !important; }

/* Script Actions */
.script-actions {
    display: flex; gap: 8px; align-items: center;
    padding-top: 12px; border-top: 1px solid var(--border); margin-top: 4px;
}
.btn-edit-sm {
    padding: 6px 14px; background: rgba(255,255,255,0.06); border: 1px solid var(--border);
    border-radius: 6px; color: var(--text2); font-size: 11px; cursor: pointer;
    transition: all 0.2s; font-family: var(--font);
}
.btn-edit-sm:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }
.status-select {
    padding: 6px 10px; background: var(--bg3); border: 1px solid var(--border);
    border-radius: 6px; color: var(--text2); font-size: 11px; cursor: pointer;
    font-family: var(--font);
}
.status-select:focus { outline: none; border-color: rgba(255,255,255,0.2); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.modal-card {
    position: relative; width: 560px; max-height: 90vh; overflow-y: auto;
    background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 28px;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h2 { font-size: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 11px; font-weight: 600; color: var(--text2); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 12px; background: var(--bg3); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text); font-size: 13px; font-family: var(--font);
    transition: all 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: rgba(255,255,255,0.25);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group select { cursor: pointer; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card {
    padding: 24px; background: var(--bg2); border: 1px solid var(--border);
    border-radius: 12px; text-align: center;
}
.stat-value { font-size: 36px; font-weight: 800; }
.stat-label { font-size: 12px; color: var(--text3); margin-top: 4px; }
.stats-breakdown { max-width: 600px; }
.stats-breakdown h3 { font-size: 14px; margin-bottom: 16px; }
.type-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.type-name { font-size: 12px; color: var(--text2); width: 120px; text-transform: capitalize; }
.type-progress { flex: 1; height: 8px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.type-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.5s; }
.type-pct { font-size: 11px; color: var(--text3); width: 120px; }

/* Special Dates */
.dates-list h3 { font-size: 14px; margin-bottom: 12px; color: var(--text2); }
.date-card {
    display: flex; align-items: center; gap: 16px; padding: 14px;
    background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
    margin-bottom: 8px; transition: all 0.2s;
}
.date-card:hover { border-color: rgba(255,255,255,0.15); }
.date-card.has-content { border-left: 3px solid var(--green); }
.date-card.past { opacity: 0.5; }
.date-card-icon { font-size: 24px; }
.date-card-info { flex: 1; }
.date-card-info strong { font-size: 13px; display: block; }
.date-card-date { font-size: 11px; color: var(--text3); }
.date-card-tip { font-size: 11px; color: var(--yellow); display: block; margin-top: 2px; }
.date-card-status { font-size: 11px; }

/* Ideas */
.ideas-generator { max-width: 800px; }
.ideas-generator h2 { font-size: 20px; margin-bottom: 4px; }
.ideas-generator > p { font-size: 13px; color: var(--text2); margin-bottom: 20px; }
.ideas-form { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.ideas-form select, .ideas-form input {
    padding: 10px 14px; background: var(--bg3); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text); font-size: 13px;
}
.ideas-list { display: flex; flex-direction: column; gap: 8px; }
.idea-card {
    display: flex; align-items: center; gap: 16px; padding: 16px;
    background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
}
.idea-num { font-size: 20px; font-weight: 800; color: var(--text3); width: 40px; text-align: center; }
.idea-content { flex: 1; }
.idea-hook { font-size: 14px; font-weight: 600; font-style: italic; margin-bottom: 4px; }
.idea-desc { font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.idea-type { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; }
.loading { color: var(--text3); font-style: italic; }

/* ============================================
   SETTINGS VIEW
   ============================================ */
#settingsView { padding: 16px; }
.settings-section {
    margin-bottom: 28px;
}
.settings-section-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; color: var(--text3); margin-bottom: 14px;
    font-family: var(--mono);
}

/* Settings Brand Buttons */
.settings-brands {
    display: flex; flex-direction: column; gap: 6px;
}
.settings-brand-btn {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; background: var(--bg2);
    border: 1px solid var(--border); border-radius: 14px;
    color: var(--text2); font-size: 14px; font-weight: 500;
    font-family: var(--font); cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.settings-brand-btn:active { transform: scale(0.97); }
.settings-brand-btn.active {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
    color: var(--text);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.05), var(--shadow-sm);
}
.settings-brand-icon { font-size: 18px; width: 24px; text-align: center; }

/* Settings Account */
.settings-account-card {
    display: flex; align-items: center; gap: 14px;
    padding: 16px; background: var(--bg2);
    border: 1px solid var(--border); border-radius: 16px;
    margin-bottom: 12px;
}
.settings-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.1);
}
.settings-account-info { flex: 1; }
.settings-user-name {
    font-size: 15px; font-weight: 700; color: var(--text);
}
.settings-user-email {
    font-size: 12px; color: var(--text3); margin-top: 2px;
}

/* Settings Logout */
.settings-logout-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 14px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 14px;
    color: var(--red); font-size: 14px; font-weight: 600;
    font-family: var(--font); cursor: pointer;
    transition: all 0.3s ease;
}
.settings-logout-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
}
.settings-logout-btn:active { transform: scale(0.97); }
.settings-logout-btn svg { stroke: var(--red); }

/* Settings Footer */
.settings-footer {
    text-align: center; padding: 24px 0 16px;
    font-family: var(--mono); font-size: 13px;
    color: var(--text3);
}
.settings-footer-dim { color: var(--text3); opacity: 0.5; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.1); }
    50% { box-shadow: 0 0 20px 4px rgba(255,255,255,0.06); }
}
@keyframes dotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================
   BOTTOM NAVIGATION (mobile only)
   ============================================ */
.bottom-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(8, 8, 12, 0.88);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid rgba(255,255,255,0.06);
    height: 68px; padding-bottom: env(safe-area-inset-bottom);
    z-index: 200; justify-content: space-around; align-items: center;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.4);
}
.bottom-tab {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    background: none; border: none; color: var(--text3);
    font-size: 10px; font-weight: 500; font-family: var(--font); cursor: pointer;
    padding: 6px 16px; min-width: 64px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; letter-spacing: 0.3px;
}
.bottom-tab svg {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 0 transparent);
}
.bottom-tab.active {
    color: #ffffff;
    transform: translateY(-2px);
}
.bottom-tab.active svg {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.3));
}
.bottom-tab.active::before {
    content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
    width: 28px; height: 3px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    border-radius: 0 0 4px 4px;
    animation: fadeIn 0.3s ease;
}
.bottom-tab.active span {
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}
.bottom-tab:active { transform: scale(0.88); }

/* FAB - Center elevated button in bottom nav */
.fab-tab {
    position: relative !important;
}
.fab-circle {
    display: none; /* shown in mobile media query */
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #d0d0d0 100%);
    color: #050505; border: none;
    align-items: center; justify-content: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5), 0 0 30px rgba(255,255,255,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulseGlow 3s infinite;
    position: relative; top: -12px;
    border: 3px solid var(--bg2);
}
.fab-circle svg { color: #050505; stroke: #050505; }
.fab-tab:active .fab-circle {
    transform: scale(0.88) rotate(90deg);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

/* Mobile calendar dot indicators */
.cal-dots {
    display: none; /* shown via media query */
    flex-wrap: wrap; gap: 3px; margin-top: 4px;
    justify-content: center;
}
.cal-dot {
    width: 6px; height: 6px; border-radius: 50%;
    transition: all 0.3s ease;
}
.cal-dot.brand-jd { background: #ffffff; box-shadow: 0 0 4px rgba(255,255,255,0.3); }
.cal-dot.brand-berlin { background: #f59e0b; box-shadow: 0 0 4px rgba(245,158,11,0.4); }
.cal-dot.status-publicado {
    box-shadow: 0 0 0 1.5px #22c55e, 0 0 6px rgba(34,197,94,0.3);
    animation: dotPulse 2s infinite;
}

/* Mobile day count badge */
.cal-count {
    display: none; /* shown via media query */
    font-size: 8px; font-weight: 700;
    background: rgba(255,255,255,0.12); color: var(--text2);
    padding: 1px 5px; border-radius: 8px; margin-top: 2px;
    text-align: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1100px) {
    #calendarView.has-panel .calendar-grid { flex: 0 0 50%; }
    .script-panel { flex: 0 0 50%; }
}

/* Mobile */
@media (max-width: 768px) {
    /* Show bottom nav, hide sidebar */
    .bottom-nav { display: flex; }
    .fab-circle { display: flex; }
    .sidebar { display: none; }
    .cal-dots { display: flex; }

    /* App layout */
    .app { flex-direction: column; height: 100vh; height: 100dvh; }
    .main-content {
        padding-bottom: 64px; overflow: hidden;
        display: flex; flex-direction: column;
    }
    #calendarView.active { flex-direction: column; overflow-y: auto; }
    #calendarView .calendar-grid { padding-right: 0; }

    /* Topbar - clean mobile header */
    .topbar {
        padding: 12px 16px;
        background: rgba(10, 10, 15, 0.92);
        backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        position: sticky; top: 0; z-index: 50;
    }
    .topbar h1 { font-size: 15px; font-weight: 700; }
    .topbar-subtitle { display: none; }
    .topbar-left { min-width: 0; }
    .topbar-right { gap: 8px; }
    .month-nav { gap: 8px; }
    .month-nav span { font-size: 13px; font-weight: 700; min-width: 100px; }
    .btn-icon { width: 34px; height: 34px; border-radius: 10px; }
    #addContentBtn { display: none; } /* replaced by FAB */

    /* Calendar - numbers prominent, dots for content */
    .view { padding: 8px; flex: 1; }
    .calendar-header {
        padding: 8px 0; margin-bottom: 4px;
    }
    .calendar-header span {
        font-size: 11px; font-weight: 600; color: var(--text3);
    }
    .calendar-body { gap: 0; animation: fadeIn 0.4s ease; }

    .cal-day {
        min-height: 0; aspect-ratio: 1 / 1;
        padding: 4px 2px; border: none;
        border-radius: 14px; margin: 2px;
        display: flex; flex-direction: column;
        align-items: center; justify-content: flex-start;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-bottom: none; border-right: none;
        padding-top: 6px;
    }
    .cal-day.empty { background: none; }
    .cal-day:active:not(.empty) {
        transform: scale(0.88);
        background: rgba(255,255,255,0.08);
    }

    .cal-day-num {
        font-size: 15px; font-weight: 600; color: var(--text3);
        width: 30px; height: 30px; display: flex;
        align-items: center; justify-content: center;
        border-radius: 10px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Today - glowing white circle */
    .cal-day.today {
        background: rgba(255,255,255,0.04);
        border-radius: 14px;
    }
    .cal-day.today .cal-day-num {
        background: #ffffff; color: #050505;
        font-weight: 800; border-radius: 50%;
        width: 34px; height: 34px;
        box-shadow: 0 0 16px rgba(255,255,255,0.25), 0 2px 8px rgba(0,0,0,0.3);
    }

    /* Special dates - gold glow */
    .cal-day.special {
        background: rgba(245,158,11,0.06);
    }
    .cal-day.special .cal-day-num {
        color: var(--yellow);
        text-shadow: 0 0 8px rgba(245,158,11,0.3);
    }

    /* Missed days */
    .cal-day.missed { opacity: 0.35; }

    /* Has content indicator - slightly brighter */
    .cal-day.has-content .cal-day-num {
        color: var(--text);
    }
    .cal-day.has-content {
        background: rgba(255,255,255,0.02);
    }

    /* Hide full content cards on mobile, show dots */
    .cal-content { display: none; }
    .cal-special { display: none; }
    .cal-count { display: inline-block; }

    /* Script panel - slide up from bottom */
    .script-panel {
        position: fixed; left: 0; right: 0; bottom: 0;
        top: 0; z-index: 300;
        flex: none; width: 100%; height: 100vh; height: 100dvh;
        border: none; background: var(--bg);
        animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .script-panel .script-panel-header {
        padding: 14px 16px;
        background: rgba(8, 8, 12, 0.92);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        position: sticky; top: 0; z-index: 10;
        box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    }
    .script-panel .script-panel-body {
        padding: 16px; padding-bottom: 100px;
        animation: fadeIn 0.4s ease 0.15s both;
    }
    #calendarView.has-panel .calendar-grid { flex: 1; }
    .script-card-top {
        flex-wrap: wrap; gap: 8px;
        animation: slideDown 0.3s ease;
    }
    .screenplay {
        padding: 16px 12px;
        box-shadow: var(--shadow-sm);
    }
    .sp-dialogue { padding: 4px 10px 12px; font-size: 13px; }
    .script-panel-footer {
        position: fixed; bottom: 0; left: 0; right: 0;
        padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom));
        background: rgba(8, 8, 12, 0.92);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    }
    .script-panel-footer .btn-primary-sm {
        padding: 14px; border-radius: 14px; font-size: 14px;
        box-shadow: 0 4px 16px rgba(255,255,255,0.1);
        transition: all 0.3s ease;
    }
    .script-panel-footer .btn-primary-sm:active {
        transform: scale(0.96);
    }

    /* Modal responsive */
    .modal { align-items: flex-end; }
    .modal-overlay { animation: fadeIn 0.2s ease; }
    .modal-card {
        width: 100%; max-width: 100%; max-height: 92vh;
        padding: 20px 16px; margin: 0;
        border-radius: 24px 24px 0 0;
        border-bottom: none;
        animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
    }
    .modal-card::before {
        content: ''; display: block; width: 36px; height: 4px;
        background: rgba(255,255,255,0.15); border-radius: 2px;
        margin: 0 auto 16px;
    }
    .modal-header {
        padding-bottom: 16px; margin-bottom: 16px;
        border-bottom: 1px solid var(--border);
    }
    .form-row { grid-template-columns: 1fr; }
    .form-group input, .form-group select, .form-group textarea {
        padding: 14px 16px; font-size: 16px; /* prevent iOS zoom */
        border-radius: 12px;
        transition: all 0.3s ease;
    }
    .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
        border-color: rgba(255,255,255,0.2);
        box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
    }
    .modal-actions {
        flex-direction: column-reverse; gap: 8px;
        margin-top: 20px; padding-top: 16px;
        border-top: 1px solid var(--border);
    }
    .modal-actions button {
        width: 100%; padding: 14px; border-radius: 14px; font-size: 14px;
        transition: all 0.3s ease;
    }
    .modal-actions button:active { transform: scale(0.97); }
    .btn-primary-sm { font-size: 14px; }

    /* Stats responsive */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr); gap: 12px;
        animation: fadeIn 0.4s ease;
    }
    .stat-card {
        padding: 22px 16px; border-radius: 18px;
        background: var(--bg2);
        box-shadow: var(--shadow-sm);
        transition: all 0.3s ease;
        animation: scaleIn 0.4s ease both;
    }
    .stat-card:nth-child(1) { animation-delay: 0s; }
    .stat-card:nth-child(2) { animation-delay: 0.05s; }
    .stat-card:nth-child(3) { animation-delay: 0.1s; }
    .stat-card:nth-child(4) { animation-delay: 0.15s; }
    .stat-card:active { transform: scale(0.96); }
    .stat-value { font-size: 32px; font-weight: 800; }
    .stat-label { font-size: 11px; color: var(--text3); margin-top: 4px; }
    .stats-breakdown { padding: 0 8px; }
    .type-bar { gap: 8px; }
    .type-name { width: 80px; font-size: 11px; }
    .type-pct { width: auto; font-size: 10px; }

    /* Ideas responsive */
    .ideas-generator { padding: 0 8px; animation: fadeIn 0.4s ease; }
    .ideas-generator h2 { font-size: 18px; }
    .ideas-form { flex-direction: column; gap: 10px; }
    .ideas-form select, .ideas-form input {
        width: 100%; padding: 14px 16px; font-size: 16px;
        border-radius: 12px;
    }
    .ideas-form .btn-primary-sm {
        padding: 14px; border-radius: 14px; font-size: 14px;
        box-shadow: var(--shadow-sm);
    }
    .idea-card {
        padding: 16px; border-radius: 16px;
        box-shadow: var(--shadow-sm);
        transition: all 0.3s ease;
        animation: scaleIn 0.3s ease both;
    }
    .idea-card:active { transform: scale(0.98); }
    .idea-num { font-size: 18px; width: 32px; }
    .idea-hook { font-size: 13px; }
    .idea-desc { font-size: 11px; }

    /* Dates responsive */
    .dates-list { padding: 0 4px; animation: fadeIn 0.4s ease; }
    .date-card {
        flex-wrap: wrap; gap: 10px; padding: 16px;
        border-radius: 16px; margin-bottom: 10px;
        box-shadow: var(--shadow-sm);
        transition: all 0.3s ease;
        animation: scaleIn 0.3s ease both;
    }
    .date-card:active { transform: scale(0.98); }
    .date-card.has-content {
        border-left: 3px solid var(--green);
        box-shadow: var(--shadow-sm), 0 0 12px rgba(34,197,94,0.08);
    }
    .date-card-icon { font-size: 28px; }
    .date-card-info strong { font-size: 14px; }
    .date-card-date { font-size: 12px; }
    .date-card .btn-sm {
        width: 100%; text-align: center; padding: 12px;
        border-radius: 12px; font-size: 12px;
        transition: all 0.3s ease;
    }
    .date-card .btn-sm:active { transform: scale(0.96); }

    /* Login responsive */
    .login-screen { animation: fadeIn 0.5s ease; }
    .login-card {
        padding: 40px 28px; margin: 0 20px;
        border-radius: 24px;
        box-shadow: var(--shadow-lg);
        animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .btn-google {
        padding: 16px 28px; border-radius: 14px;
        font-size: 15px; width: 100%;
        justify-content: center;
        box-shadow: var(--shadow-sm);
        transition: all 0.3s ease;
    }
    .btn-google:active { transform: scale(0.97); }

    /* Settings mobile */
    #settingsView { padding: 16px 12px; animation: fadeIn 0.3s ease; }
    .settings-section {
        animation: scaleIn 0.3s ease both;
    }
    .settings-section:nth-child(1) { animation-delay: 0s; }
    .settings-section:nth-child(2) { animation-delay: 0.08s; }
    .settings-section:nth-child(3) { animation-delay: 0.16s; }
    .settings-account-card {
        box-shadow: var(--shadow-sm);
    }
    .settings-brand-btn {
        box-shadow: var(--shadow-sm);
    }
}

/* Small phones */
@media (max-width: 380px) {
    .cal-day { margin: 1px; padding-top: 4px; }
    .cal-day-num { font-size: 13px; width: 26px; height: 26px; }
    .cal-day.today .cal-day-num { width: 28px; height: 28px; }
    .cal-dot { width: 5px; height: 5px; }
    .topbar h1 { font-size: 13px; }
    .month-nav span { font-size: 12px; min-width: 85px; }
    .stat-value { font-size: 26px; }
    .stats-grid { gap: 8px; }
}
