/* ============================================
   Candidate's Toolbox Calendar - styles.css
   V15_4 - Extracted from monolithic HTML
   ============================================ */

/* ============================================
   MAIN APPLICATION STYLES
   ============================================ */

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

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #3d3d3d;
    background: #f5f1e8;
    min-height: 100vh;
}

:root {
    --vintage-red: #b85450;
    --vintage-blue: #4a5f7f;
    --cream: #f5f1e8;
    --dark-cream: #e8e0d0;
    --text-dark: #3d3d3d;
    --compliance-red: #c44741;
    --outreach-blue: #5b7fa6;
    --fundraising-green: #6b8e6f;
    --media-purple: #8b6f9e;
    --internal-yellow: #d4a574;
}

.header-stripes {
    height: 60px;
    background: 
        linear-gradient(to right, 
            var(--vintage-red) 0%, 
            var(--vintage-red) 30%, 
            transparent 30%, 
            transparent 35%,
            var(--cream) 35%,
            var(--cream) 40%,
            transparent 40%,
            transparent 45%,
            var(--vintage-blue) 45%,
            var(--vintage-blue) 100%
        );
}

header {
    background: white;
    padding: 30px 20px;
    text-align: center;
    border-bottom: 3px solid var(--vintage-blue);
}

header h2 {
    color: var(--vintage-blue);
    font-size: 1.8em;
    margin-top: 10px;
    font-weight: normal;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.content {
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 2px solid var(--dark-cream);
}

.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s;
    padding-bottom: 100px;
    margin-right: 90px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.question {
    margin-bottom: 30px;
}

.question h2 {
    color: var(--vintage-blue);
    margin-bottom: 15px;
    font-size: 1.8em;
}

.question p {
    color: #666;
    margin-bottom: 20px;
}

.options {
    display: grid;
    gap: 15px;
}

.option-btn {
    background: white;
    border: 3px solid var(--dark-cream);
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    font-size: 1em;
    font-family: inherit;
}

.option-btn:hover {
    border-color: var(--vintage-blue);
    background: var(--cream);
    transform: translateX(5px);
}

.option-btn strong {
    display: block;
    color: var(--vintage-blue);
    margin-bottom: 5px;
    font-size: 1.2em;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--dark-cream);
    border-radius: 8px;
    font-size: 1em;
    margin-bottom: 15px;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--vintage-blue);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--vintage-blue);
}

.btn {
    background: var(--vintage-blue);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    margin-right: 10px;
    font-family: inherit;
}

.btn:hover {
    background: #3d4d66;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 95, 127, 0.4);
}

.btn-secondary {
    background: #8a8a8a;
}

.btn-secondary:hover {
    background: #6a6a6a;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
    margin: 0;
}

.btn-red {
    background: var(--vintage-red);
}

.btn-red:hover {
    background: #9f4440;
}

.success-box {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.success-box strong {
    color: #065f46;
    display: block;
    margin-bottom: 5px;
}

.warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.warning-box strong {
    color: #92400e;
    display: block;
    margin-bottom: 5px;
}

.info-box {
    background: #e8f4f8;
    border-left: 4px solid var(--vintage-blue);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.info-box strong {
    color: var(--vintage-blue);
    display: block;
    margin-bottom: 5px;
}

.calendar-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-top: 30px;
    position: relative; /* For absolute-positioned pinned sticky notes */
}

.calendar-main {
    background: white;
    border: 2px solid var(--dark-cream);
    border-radius: 8px;
    padding: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--dark-cream);
}

.calendar-header h3 {
    color: var(--vintage-blue);
    font-size: 1.5em;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav button {
    background: var(--vintage-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
}

.calendar-nav button:hover {
    background: #3d4d66;
}

.view-toggle {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.view-toggle button {
    padding: 8px 16px;
    background: var(--cream);
    border: 2px solid var(--dark-cream);
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
}

.view-toggle button.active {
    background: var(--vintage-blue);
    color: white;
    border-color: var(--vintage-blue);
}

.month-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.day-header {
    text-align: center;
    padding: 10px;
    font-weight: bold;
    color: var(--vintage-blue);
    background: var(--cream);
    border-radius: 4px;
}

.day-cell {
    min-height: 100px;
    border: 2px solid var(--dark-cream);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    position: relative;
}

.day-cell.has-tasks {
    border-left-width: 5px;
    border-left-color: var(--vintage-blue);
}

.day-cell.has-many-tasks {
    border-left-width: 7px;
    border-left-color: var(--vintage-red);
}

.day-cell:hover {
    border-color: var(--vintage-blue);
    background: var(--cream);
    transform: scale(1.02);
}

.day-cell.other-month {
    opacity: 0.3;
}

.day-cell.today {
    border-color: var(--vintage-red);
    background: #fef5f5;
    box-shadow: 0 0 0 2px var(--vintage-red);
}

.day-cell.election-day {
    border-color: var(--vintage-red);
    background: linear-gradient(135deg, #fee5e5, #ffe0e0);
    box-shadow: 0 0 0 3px var(--vintage-red);
}

.day-cell.election-day .day-number {
    color: var(--vintage-red);
    font-weight: bold;
    font-size: 1.1em;
}

.day-number {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.task-count-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--vintage-blue);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.task-count-badge.many {
    background: var(--vintage-red);
    width: 32px;
    height: 32px;
    font-size: 1em;
}

.day-tasks {
    font-size: 0.75em;
    margin-top: 5px;
}

.task-preview {
    background: var(--cream);
    padding: 4px 6px;
    border-radius: 3px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.85em;
}

/* Add Event Button */
.add-event-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: var(--vintage-blue);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 10;
}

.day-cell:hover .add-event-btn {
    opacity: 1;
}

.add-event-btn:hover {
    background: var(--vintage-red);
    transform: scale(1.1);
}

/* Event Preview */
.event-preview {
    background: linear-gradient(135deg, #e8f4e8, #d4edda);
    border-left: 3px solid var(--fundraising-green);
    padding: 3px 6px;
    border-radius: 3px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.75em;
    cursor: pointer;
}

.event-preview:hover {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
}

.sidebar {
    background: white;
    border: 2px solid var(--dark-cream);
    border-radius: 8px;
    padding: 20px;
    max-height: 800px;
    overflow-y: auto;
}

.sidebar h3 {
    color: var(--vintage-blue);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--dark-cream);
}

.notes-section {
    margin-bottom: 30px;
}

.notes-section textarea {
    min-height: 100px;
    resize: vertical;
}

.budget-section {
    margin-bottom: 30px;
}

.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.budget-total {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--vintage-blue);
}

.budget-category {
    background: var(--cream);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.budget-category-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.budget-category-name {
    font-weight: 600;
    color: var(--text-dark);
}

.budget-category-amount {
    color: #666;
}

.budget-progress {
    background: #d1d5db;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid #b0b5bc;
}

.budget-progress-fill {
    height: 100%;
    transition: width 0.3s, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: bold;
    color: white;
}

.budget-progress-fill.low {
    background: #10b981;
}

.budget-progress-fill.medium {
    background: #3b82f6;
}

.budget-progress-fill.warning {
    background: #f59e0b;
}

.budget-progress-fill.danger {
    background: #ef4444;
}

.budget-alert {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 10px;
    margin-top: 8px;
    border-radius: 4px;
    font-size: 0.85em;
}

.budget-alert.danger {
    background: #fee2e2;
    border-left-color: #ef4444;
}

.expense-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--dark-cream);
}

.expense-form select,
.expense-form input {
    margin-bottom: 10px;
}

.cost-per-voter {
    background: #e8f4f8;
    border-radius: 6px;
    padding: 12px;
    margin-top: 15px;
    text-align: center;
}

.cost-per-voter-amount {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--vintage-blue);
}

.cost-per-voter-label {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

.task-item {
    background: var(--cream);
    border-left: 4px solid var(--vintage-blue);
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 0.9em;
}

.task-item.compliance { border-left-color: var(--compliance-red); }
.task-item.outreach { border-left-color: var(--outreach-blue); }
.task-item.fundraising { border-left-color: var(--fundraising-green); }
.task-item.media { border-left-color: var(--media-purple); }
.task-item.internal { border-left-color: var(--internal-yellow); }

.task-item strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.task-item small {
    color: #666;
    display: block;
}

.progress-bar {
    background: var(--dark-cream);
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    background: linear-gradient(90deg, var(--vintage-blue) 0%, var(--vintage-red) 100%);
    height: 100%;
    transition: width 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9em;
}

.phase-indicator {
    background: linear-gradient(135deg, var(--vintage-blue), var(--vintage-red));
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.phase-indicator h4 {
    font-size: 1.2em;
    margin-bottom: 5px;
}

.legend {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
    padding: 15px;
    background: var(--cream);
    border-radius: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.all-tasks-list {
    max-height: 600px;
    overflow-y: auto;
}

.faq-container {
    max-height: 600px;
    overflow-y: auto;
    padding: 10px;
}

.faq-section {
    background: var(--cream);
    border: 2px solid var(--dark-cream);
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
}

.faq-section h3 {
    color: var(--vintage-blue);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.faq-section h4 {
    color: var(--vintage-red);
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.faq-section p {
    margin-bottom: 12px;
    line-height: 1.7;
}

.faq-section ul {
    margin-left: 25px;
    margin-bottom: 15px;
}

.faq-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.faq-section strong {
    color: var(--vintage-blue);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 3px solid var(--vintage-blue);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--dark-cream);
}

.modal-header h3 {
    color: var(--vintage-blue);
    font-size: 1.5em;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.close-modal:hover {
    color: var(--vintage-red);
}

/* Auto-Populate Modal Styles */
.auto-step {
    padding: 8px 16px;
    background: var(--dark-cream);
    border-radius: 20px;
    font-size: 0.85em;
    color: #666;
}

.auto-step.active {
    background: var(--vintage-blue);
    color: white;
}

.auto-step.completed {
    background: var(--fundraising-green);
    color: white;
}

.auto-panel {
    display: none;
}

.auto-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.activity-row {
    padding: 12px;
    background: var(--cream);
    border-radius: 8px;
    border: 1px solid var(--dark-cream);
}

.activity-row:hover {
    border-color: var(--vintage-blue);
}

/* Compliance Chat Styles */
.chat-message {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 85%;
    line-height: 1.4;
}

.chat-message.assistant {
    background: #e8f4fd;
    border: 1px solid #b8d4e8;
    margin-right: auto;
}

.chat-message.user {
    background: var(--vintage-blue);
    color: white;
    margin-left: auto;
}

.chat-message p {
    margin: 0;
}

.chat-message.loading {
    background: #f0f0f0;
    color: #666;
    font-style: italic;
}

.day-detail-tasks {
    list-style: none;
}

.day-detail-tasks li {
    padding: 15px;
    margin-bottom: 10px;
    background: var(--cream);
    border-radius: 6px;
    border-left: 4px solid var(--vintage-blue);
}

@media (max-width: 1024px) {
    .calendar-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 20px;
    }

    .day-cell {
        min-height: 60px;
        font-size: 0.85em;
    }
}

/* ============================================ */
/* STICKY NOTES - Realistic Post-It Styling    */
/* ============================================ */

.sticky-note {
    position: fixed;
    width: 250px;
    min-height: 180px;
    padding: 20px 20px 35px 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%), #fef08a;
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-top: 1px solid rgba(234, 179, 8, 0.5);
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.05),
        0 4px 8px rgba(0,0,0,0.08),
        0 8px 16px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.4);
    transform: rotate(-1.5deg);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 1000;
    cursor: move;
    font-family: 'Caveat', cursive;
    font-size: 22px;
    line-height: 1.6;
    color: #374151;
    user-select: none;
}

.sticky-note:hover {
    transform: rotate(0deg) translateY(-2px);
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.08),
        0 8px 16px rgba(0,0,0,0.12),
        0 16px 24px rgba(0,0,0,0.10);
    z-index: 1001;
}

.sticky-note.dragging {
    transform: rotate(0deg) translateY(-4px);
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.12),
        0 16px 32px rgba(0,0,0,0.15);
    cursor: grabbing !important;
    z-index: 9999;
}

/* Curled corner effect */
.sticky-note::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 24px 24px;
    border-color: transparent transparent #f5e6c0 transparent;
    box-shadow: -2px 2px 3px rgba(0,0,0,0.15);
    transition: border-width 0.2s;
}

.sticky-note:hover::after {
    border-width: 0 0 32px 32px;
}

/* Color variations */
.sticky-note.yellow { background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%), #fef08a; }
.sticky-note.yellow::after { border-color: transparent transparent #f5e6c0 transparent; }

.sticky-note.pink { background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%), #fecdd3; }
.sticky-note.pink::after { border-color: transparent transparent #fdb8c2 transparent; }

.sticky-note.blue { background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%), #bfdbfe; }
.sticky-note.blue::after { border-color: transparent transparent #a5cffe transparent; }

.sticky-note.green { background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%), #bbf7d0; }
.sticky-note.green::after { border-color: transparent transparent #a3f5c0 transparent; }

.sticky-note.orange { background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%), #fed7aa; }
.sticky-note.orange::after { border-color: transparent transparent #fdc68a transparent; }

.sticky-note.purple { background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%), #e9d5ff; }
.sticky-note.purple::after { border-color: transparent transparent #ddc4ff transparent; }

/* Sticky note header */
.sticky-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(0,0,0,0.15);
}

.sticky-title {
    font-weight: 600;
    font-size: 24px;
    color: #1f2937;
}

.sticky-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.sticky-close:hover {
    color: #ef4444;
}

.sticky-pin {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: transform 0.2s;
}

.sticky-pin:hover {
    transform: scale(1.2);
}

.sticky-note.pinned {
    cursor: default !important;
    position: absolute !important; /* Scroll with page instead of viewport */
}

.sticky-note.pinned::before {
    content: '\1F4CD';
    position: absolute;
    bottom: 5px;
    left: 5px;
    font-size: 12px;
    opacity: 0.3;
}

.sticky-content {
    margin-bottom: 15px;
    word-wrap: break-word;
}

.sticky-text {
    white-space: pre-wrap;
}

.sticky-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
}

.sticky-btn {
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.1);
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Caveat', cursive;
    font-size: 16px;
    transition: all 0.2s;
}

.sticky-btn:hover {
    background: rgba(255,255,255,0.8);
    border-color: rgba(0,0,0,0.2);
}

/* Animations */
@keyframes stickyWobble {
    0% { transform: rotate(-1.5deg) scale(0.8); opacity: 0; }
    60% { transform: rotate(2deg) scale(1.05); opacity: 1; }
    100% { transform: rotate(-1.5deg) scale(1); opacity: 1; }
}

.sticky-note.new {
    animation: stickyWobble 0.4s ease-out forwards;
}

/* Sticky note edit mode */
.sticky-edit-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 2px dashed rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.3);
    font-family: 'Caveat', cursive;
    font-size: 18px;
    resize: vertical;
}

/* Notes section enhancement */
.notes-section .color-picker {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: rgba(0,0,0,0.3);
}

.color-option.selected {
    border-color: rgba(0,0,0,0.5);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.8);
}

.warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 0.9em;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sticky-note {
        width: 200px;
        min-height: 150px;
        transform: rotate(-0.5deg);
        font-size: 16px;
        padding: 15px 15px 30px 15px;
    }
    
    .sticky-note::after {
        border-width: 0 0 20px 20px;
    }
}

/* Folders Styles */
.folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: linear-gradient(135deg, #f8f6f0, #f0ebe0);
    border: 1px solid var(--dark-cream);
    border-left: 4px solid var(--vintage-blue);
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.folder-item:hover {
    background: linear-gradient(135deg, #f0ebe0, #e8e0d0);
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.folder-item .folder-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.folder-item .folder-icon {
    font-size: 28px;
}

.folder-item .folder-name {
    font-weight: bold;
    color: var(--vintage-blue);
    font-size: 1.1em;
}

.folder-item .folder-meta {
    font-size: 0.85em;
    color: #888;
}

.folder-item .folder-actions {
    display: flex;
    gap: 8px;
}

.folder-item .folder-actions button {
    padding: 5px 10px;
    font-size: 0.85em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.folder-item .folder-actions .btn-open {
    background: var(--vintage-blue);
    color: white;
}

.folder-item .folder-actions .btn-open:hover {
    background: #3a4f6f;
}

.folder-item .folder-actions .btn-delete {
    background: #f8d7da;
    color: var(--vintage-red);
}

.folder-item .folder-actions .btn-delete:hover {
    background: var(--vintage-red);
    color: white;
}

/* Notes Styles */
.note-item {
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    background: #fffef8;
    border: 1px solid #f0e6c8;
    border-left: 4px solid var(--vintage-gold);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.note-item:hover {
    background: #fdf8ee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

.note-item .note-title {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1em;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-item .note-preview {
    font-size: 0.85em;
    color: #888;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.note-item .note-meta {
    font-size: 0.75em;
    color: #aaa;
    margin-bottom: 10px;
}

.note-item .note-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #f0e6c8;
}

.note-item .note-actions button {
    padding: 6px 14px;
    font-size: 0.8em;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.note-item .note-actions .btn-edit {
    background: var(--vintage-blue);
    color: white;
    flex: 1;
}

.note-item .note-actions .btn-edit:hover {
    opacity: 0.9;
}

.note-item .note-actions .btn-calendar {
    background: white;
    color: var(--fundraising-green);
    border-color: var(--fundraising-green);
}

.note-item .note-actions .btn-calendar:hover {
    background: var(--fundraising-green);
    color: white;
}

.note-item .note-actions .btn-delete-note {
    background: white;
    color: #cc6b6b;
    border-color: #e8c4c4;
    padding: 6px 10px;
}

.note-item .note-actions .btn-delete-note:hover {
    background: #fdf0f0;
    border-color: #cc6b6b;
}

/* ============================================
   CAMPAIGN SERVICES PANEL
   ============================================ */

.services-category {
    margin-bottom: 28px;
    background: #f5f3ee;
    border-radius: 10px;
    padding: 18px;
    border-top: 3px solid var(--vintage-red);
}

.services-category:last-of-type {
    margin-bottom: 10px;
}

.services-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #1a2e4a, #2d5a7b);
    margin: -18px -18px 14px -18px;
    padding: 14px 18px;
    border-radius: 8px 8px 0 0;
}

.services-category-header h4 {
    margin: 0;
    font-size: 1.1em;
    color: white;
    font-family: Georgia, serif;
}

.services-category-icon {
    font-size: 1.4em;
}

.services-category-desc {
    color: #666;
    font-size: 0.88em;
    margin: 0 0 14px 0;
    line-height: 1.4;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.service-card {
    background: white;
    border: 1.5px solid #e0ddd5;
    border-radius: 10px;
    padding: 16px 18px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.service-card:hover {
    border-color: #2d8a56;
    background: #f0faf4;
    box-shadow: 0 3px 12px rgba(45,138,86,0.1);
    transform: translateY(-1px);
}

.service-card-header {
    font-weight: 600;
    font-size: 0.95em;
    color: #1a2e4a;
    margin-bottom: 6px;
}

.service-card p {
    font-size: 0.85em;
    color: #666;
    line-height: 1.5;
    margin: 0 0 10px 0;
}

.service-btn {
    background: white !important;
    color: #1a2e4a !important;
    border: 1.5px solid #1a2e4a !important;
    padding: 6px 16px !important;
    font-size: 0.82em !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all 0.15s ease;
}

.service-btn:hover {
    background: #1a2e4a !important;
    color: white !important;
}

.service-btn.selected {
    background: #2d8a56 !important;
    border-color: #2d8a56 !important;
    color: white !important;
    cursor: default;
}

@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   SAM CAMPAIGN MANAGER STYLES
   ============================================ */

/* Floating Action Button */
#manager-fab {
    position: fixed;
    bottom: 25px;
    right: 25px;
    height: 65px;
    padding: 4px 18px 4px 4px;
    background: linear-gradient(135deg, var(--vintage-blue), #1e4a6d);
    border-radius: 35px;
    display: none;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 9998;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sam-avatar-btn {
    width: 57px;
    height: 57px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.sam-avatar-header {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    border: 2px solid white;
}

.fab-text {
    color: white;
    font-weight: bold;
    font-size: 17px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

#manager-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Pulsing animation for first-time users */
#manager-fab.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(45, 90, 123, 0.6), 0 0 30px rgba(45, 90, 123, 0.4);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }
}

/* Tooltip */
#manager-tooltip {
    position: fixed;
    bottom: 95px;
    right: 30px;
    background: var(--vintage-red);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    z-index: 9997;
    display: none;
    animation: bounce 1s infinite;
}

#manager-tooltip.show {
    display: block;
}

.tooltip-arrow {
    position: absolute;
    bottom: -8px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--vintage-blue);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Campaign Manager Panel */
#manager-panel {
    position: fixed;
    bottom: 80px;
    right: 25px;
    width: 400px;
    height: 550px;
    max-height: calc(100vh - 120px); /* Ensure panel fits in viewport with some margin */
    background: white;
    border-radius: 16px;
    box-shadow: 0 5px 40px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
}

#manager-panel.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#manager-header {
    background: linear-gradient(135deg, var(--vintage-blue), #1e4a6d);
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.1em;
}

#manager-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9f9f9;
}

#manager-messages .chat-message {
    margin-bottom: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 90%;
    line-height: 1.5;
    font-size: 14px;
}

#manager-messages .chat-message.assistant {
    background: white;
    border: 1px solid #e0e0e0;
    margin-right: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#manager-messages .chat-message.user {
    background: var(--vintage-blue);
    color: white;
    margin-left: auto;
}

#manager-messages .chat-message.loading {
    background: #f0f0f0;
    color: #666;
    font-style: italic;
}

/* Suggestion Chips */
.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chip {
    background: white;
    border: 2px solid var(--vintage-blue);
    color: var(--vintage-blue);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.chip:hover {
    background: var(--vintage-blue);
    color: white;
}

/* Campaign Planner Checklist */
.campaign-planner {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid var(--vintage-blue);
    border-radius: 12px;
    padding: 16px;
    margin-top: 10px;
}
.campaign-planner h4 {
    margin: 0 0 12px 0;
    color: var(--vintage-blue);
    font-size: 14px;
}
.planner-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin: 4px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.planner-item:hover {
    background: rgba(0,0,0,0.05);
}
.planner-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--vintage-blue);
    cursor: pointer;
}
.planner-item label {
    font-size: 14px;
    cursor: pointer;
    flex: 1;
}
.planner-item.checked {
    background: rgba(40, 167, 69, 0.1);
}
.planner-item.checked label {
    color: #28a745;
}
.planner-other-input {
    width: calc(100% - 28px);
    margin-left: 28px;
    margin-top: 4px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
    display: none;
}
.planner-other-input.visible {
    display: block;
}
.planner-submit-btn {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 10px;
    background: var(--vintage-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.planner-submit-btn:hover {
    background: #1a3a5c;
}
.planner-submit-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* Onboarding Structured Inputs */
.onboarding-input-area {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
    border: 1px solid #ddd;
}
.onboarding-text-input,
.onboarding-date-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.onboarding-text-input:focus,
.onboarding-date-input:focus {
    border-color: var(--vintage-blue);
    outline: none;
}
.onboarding-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    margin-top: 8px;
    background: white;
    transition: border-color 0.2s;
}
.onboarding-select:focus {
    border-color: var(--vintage-blue);
    outline: none;
}

/* Calendar Added Notice */
.calendar-added-notice {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 10px 0;
}

.calendar-added-notice p {
    margin: 0 0 8px 0;
    color: #155724;
}

.calendar-added-notice ul {
    margin: 0;
    padding-left: 20px;
    color: #155724;
}

.calendar-added-notice li {
    margin: 4px 0;
}

#manager-input-area {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    background: white;
}

#manager-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#manager-input:focus {
    border-color: var(--vintage-blue);
}

#manager-input-area button {
    padding: 12px 24px;
    background: var(--vintage-blue);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

#manager-input-area button:hover {
    background: #1a4a7a;
}

/* Microphone button styles */
#mic-button {
    position: relative;
    transition: all 0.3s ease;
}

#mic-button:hover {
    background: #5a6268 !important;
}

#mic-button.listening {
    background: #dc3545 !important;
    animation: pulse-mic 1.5s infinite;
}

#mic-button.listening::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background: rgba(220, 53, 69, 0.4);
    animation: pulse-ring 1.5s infinite;
    z-index: -1;
}

@keyframes pulse-mic {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulse-ring {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

#mic-button:disabled {
    background: #ccc !important;
    cursor: not-allowed;
}

/* Draft Export Buttons */
.sam-export-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sam-export-btn {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background 0.2s, color 0.2s;
}

.sam-export-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    /* === SAM PANEL: FULL SCREEN ON MOBILE === */
    #manager-panel {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
        border-radius: 0;
        z-index: 10000;
    }

    #manager-messages {
        padding: 12px;
    }

    #manager-messages .chat-message {
        font-size: 15px;
        padding: 12px 14px;
    }

    #manager-input-area {
        padding: 10px;
        gap: 8px;
    }

    #manager-input {
        padding: 10px 14px;
        font-size: 15px;
    }

    #manager-input-area button {
        padding: 10px 16px;
        font-size: 14px;
    }

    /* === SAM FAB BUTTON === */
    #manager-fab {
        bottom: 15px;
        right: 15px;
        height: 60px;
        padding: 4px 16px 4px 4px;
        gap: 10px;
    }

    .sam-avatar-btn {
        width: 52px;
        height: 52px;
    }

    .fab-text {
        font-size: 14px;
    }

    #manager-tooltip {
        right: 15px;
        bottom: 80px;
    }

    /* === HEADER AREA === */
    .header-stripes {
        height: 30px;
    }

    header {
        padding: 15px 10px;
    }

    header h2 {
        font-size: 1.2em;
    }

    /* === CALENDAR SCREEN TOP BAR === */
    #screen-calendar > div:first-child {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    #screen-calendar > div:first-child h2 {
        font-size: 1.1em;
    }

    #screen-calendar > div:first-child p {
        font-size: 0.82em;
    }

    /* Toolbox button full width on mobile */
    #toolbox-btn {
        width: 100%;
        text-align: center;
    }

    /* === BUTTON BAR: GRID ON MOBILE === */
    #screen-calendar > div:first-child > div:last-child {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 6px !important;
        width: 100%;
    }

    #screen-calendar > div:first-child > div:last-child span {
        display: none;
    }

    #screen-calendar > div:first-child > div:last-child .btn-small {
        font-size: 0.75em;
        padding: 8px 4px;
        white-space: nowrap;
        text-align: center;
        width: 100%;
    }

    /* === CALENDAR GRID === */
    .calendar-days {
        font-size: 0.8em;
    }

    .day-cell {
        min-height: 50px;
        padding: 2px;
        font-size: 0.8em;
    }

    .day-cell .task-dot {
        font-size: 0.7em;
    }

    .calendar-nav button {
        padding: 6px 10px;
        font-size: 0.85em;
    }

    /* === PHASE INDICATOR === */
    .phase-indicator {
        font-size: 0.8em;
    }

    /* === LEGEND === */
    .legend {
        flex-wrap: wrap;
        gap: 6px;
        font-size: 0.75em;
    }

    /* === WELCOME SCREEN === */
    #screen-welcome .content {
        padding: 10px;
    }

    #screen-welcome h2 {
        font-size: 1.3em;
    }

    /* Free vs Paid boxes */
    #screen-welcome div[style*="display: flex"][style*="gap: 20px"] {
        flex-direction: column;
    }

    /* === MODALS === */
    .modal-content {
        padding: 18px;
        margin: 10px;
        max-height: 90vh;
    }

    /* === SIDEBAR PANEL === */
    .sidebar-panel {
        width: 100% !important;
        right: 0 !important;
    }

    /* === DAY DETAIL PANEL === */
    #day-detail {
        width: 100%;
        font-size: 0.9em;
    }

    /* === GENERAL SPACING === */
    .content {
        padding: 10px;
    }

    .screen.active {
        margin-right: 0;
    }

    .container {
        padding: 0 5px;
    }

    /* === LOGO === */
    .logo img {
        max-width: 180px;
    }
}

/* ============================================
   DASHBOARD STYLES
   V16 - Translated from React mockup (Display 4)
   Append to end of styles.css (after line 2077)
   ============================================ */

/* --- DASHBOARD SCREEN OVERRIDES --- */
/* Override .screen.active defaults that conflict */
#dashboard-screen.screen.active {
    margin-right: 0;
    padding-bottom: 0;
    background: #0B1120;
    min-height: 100vh;
    font-family: 'DM Sans', sans-serif;
}

/* --- TOP BAR --- */
.dash-topbar {
    background: #131B2E;
    border-bottom: 1px solid #1E293B;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dash-topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-topbar-logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.dash-topbar-logo-text {
    color: #F1F5F9;
    font-size: 16px;
    font-weight: 700;
}

.dash-topbar-btn {
    background: #1E293B;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #94A3B8;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}

/* --- MAIN CONTENT CONTAINER --- */
.dash-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 16px;
    padding-bottom: 80px;
}

/* --- GREETING --- */
.dash-greeting {
    margin-bottom: 24px;
    animation: dashFadeUp 0.4s ease;
}

.dash-greeting h1 {
    color: #F1F5F9;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.dash-greeting p {
    color: #64748B;
    font-size: 14px;
    margin: 4px 0 0;
    line-height: 1.6;
}

.dash-edit-link {
    margin-left: 8px;
    color: #60A5FA;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 13px;
}

.dash-edit-link svg {
    width: 14px;
    height: 14px;
}

/* --- HERO ROW: COUNTDOWN + WIN NUMBER --- */
.dash-hero-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    animation: dashFadeUp 0.5s ease;
}

/* Election Countdown - RED */
.dash-countdown-card {
    background: linear-gradient(135deg, #991B1B, #B91C1C);
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(153, 27, 27, 0.25);
}

.dash-countdown-label {
    color: #FCA5A5;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.dash-countdown-number {
    color: #FFFFFF;
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
}

.dash-countdown-sub {
    color: #FECACA;
    font-size: 14px;
    margin-top: 4px;
}

.dash-countdown-date {
    color: #FCA5A5;
    font-size: 12px;
    margin-top: 8px;
}

/* Win Number - GREEN */
.dash-win-card {
    background: linear-gradient(135deg, #166534, #15803D);
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(22, 101, 52, 0.2);
}

.dash-win-label {
    color: #86EFAC;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dash-win-label svg {
    width: 20px;
    height: 20px;
}

.dash-win-number {
    color: #FFFFFF;
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
}

.dash-win-sub {
    color: #BBF7D0;
    font-size: 14px;
    margin-top: 4px;
}

.dash-win-hint {
    color: #6EE7A0;
    font-size: 12px;
    margin-top: 8px;
    opacity: 0.8;
}

/* --- QUICK ACTIONS --- */
.dash-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
    animation: dashFadeUp 0.55s ease;
}

.dash-quick-btn {
    background: #131B2E;
    border: 1px solid #1E293B;
    border-radius: 10px;
    padding: 14px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.dash-quick-btn:hover {
    background: #1E293B;
    border-color: #334155;
}

.dash-quick-btn svg {
    width: 18px;
    height: 18px;
}

.dash-quick-btn.blue {
    color: #3B82F6;
}

.dash-quick-btn.purple {
    color: #8B5CF6;
}

.dash-quick-btn.green {
    color: #10B981;
}

/* --- SAM'S BRIEFING --- */
.dash-briefing-card {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 16px;
    animation: dashFadeUp 0.6s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dash-briefing-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.dash-briefing-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #10B981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
    color: #fff;
    font-weight: 700;
}

.dash-briefing-title {
    color: #0F172A;
    font-size: 14px;
    font-weight: 600;
}

.dash-briefing-date {
    color: #94A3B8;
    font-size: 11px;
}

.dash-briefing-text {
    color: #334155;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* --- MIDDLE ROW: TASKS + EVENTS --- */
.dash-middle-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    animation: dashFadeUp 0.65s ease;
}

/* --- WHITE CARD BASE (tasks, events, budget) --- */
.dash-card {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dash-card-header {
    color: #0F172A;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dash-card-header-sub {
    color: #94A3B8;
    font-size: 12px;
    font-weight: 400;
}

/* --- TASK ITEMS --- */
.dash-task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-task-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.dash-task-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 5px;
    margin-top: 1px;
    border: 2px solid #CBD5E1;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    cursor: pointer;
}

.dash-task-checkbox.checked {
    border: none;
    background: #3B82F6;
}

.dash-task-checkbox svg {
    width: 14px;
    height: 14px;
}

.dash-task-name {
    color: #1E293B;
    font-size: 13px;
    line-height: 1.3;
}

.dash-task-name.done {
    color: #94A3B8;
    text-decoration: line-through;
}

.dash-task-category {
    color: #94A3B8;
    font-size: 11px;
    margin-top: 2px;
}

/* --- OVERDUE SECTION --- */
.dash-overdue-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #F1F5F9;
}

.dash-overdue-label {
    color: #DC2626;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dash-overdue-label svg {
    width: 14px;
    height: 14px;
}

.dash-overdue-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.dash-overdue-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #DC2626;
    min-width: 6px;
}

.dash-overdue-item span {
    color: #DC2626;
    font-size: 13px;
}

/* --- EVENT ITEMS --- */
.dash-event-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dash-event-item {
    background: #F8FAFC;
    border-radius: 10px;
    padding: 14px 16px;
    border-left: 3px solid #8B5CF6;
}

.dash-event-name {
    color: #1E293B;
    font-size: 14px;
    font-weight: 500;
}

.dash-event-details {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.dash-event-time {
    color: #7C3AED;
    font-size: 12px;
}

.dash-event-location {
    color: #94A3B8;
    font-size: 12px;
}

/* --- CAMPAIGN PROFILE CARD (inside events card) --- */
.dash-profile-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #F1F5F9;
}

.dash-profile-label {
    color: #64748B;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dash-profile-label svg {
    width: 16px;
    height: 16px;
}

.dash-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.dash-profile-key {
    color: #94A3B8;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dash-profile-value {
    color: #334155;
    font-size: 12px;
    font-weight: 500;
}

/* --- BUDGET SNAPSHOT --- */
.dash-budget-card {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 18px 20px;
    animation: dashFadeUp 0.7s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dash-budget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.dash-budget-title {
    color: #0F172A;
    font-size: 14px;
    font-weight: 600;
}

.dash-budget-pct {
    color: #94A3B8;
    font-size: 12px;
}

/* Progress Bar */
.dash-budget-bar-bg {
    background: #F1F5F9;
    border-radius: 8px;
    height: 10px;
    margin-bottom: 16px;
    overflow: hidden;
}

.dash-budget-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3B82F6, #60A5FA);
    border-radius: 8px;
    transition: width 0.6s ease;
}

.dash-budget-bar-fill.warning {
    background: linear-gradient(90deg, #F59E0B, #EF4444);
}

/* Budget Numbers Row */
.dash-budget-numbers {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    text-align: center;
    margin-bottom: 16px;
}

.dash-budget-stat-label {
    color: #94A3B8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.dash-budget-stat-total {
    color: #0F172A;
    font-size: 22px;
    font-weight: 700;
}

.dash-budget-stat-spent {
    color: #D97706;
    font-size: 22px;
    font-weight: 700;
}

.dash-budget-stat-remaining {
    color: #059669;
    font-size: 22px;
    font-weight: 700;
}

/* Recent Expenses */
.dash-expenses-section {
    border-top: 1px solid #F1F5F9;
    padding-top: 14px;
}

.dash-expenses-label {
    color: #94A3B8;
    font-size: 12px;
    margin-bottom: 10px;
}

.dash-expense-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dash-expense-name {
    color: #334155;
    font-size: 13px;
}

.dash-expense-amount {
    color: #64748B;
    font-size: 13px;
    font-weight: 500;
}

/* --- BOTTOM NAV BAR (global, fixed on all screens) --- */
.dash-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-top: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-around;
    padding: 10px 0 14px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
    z-index: 100;
}

/* Prevent content from sitting under the fixed bottom nav */
.content {
    padding-bottom: 72px;
}

.dash-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}

.dash-nav-item svg {
    width: 18px;
    height: 18px;
}

.dash-nav-item .nav-icon {
    color: #94A3B8;
}

.dash-nav-item .nav-label {
    color: #94A3B8;
    font-size: 10px;
    font-weight: 400;
}

.dash-nav-item.active .nav-icon {
    color: #3B82F6;
}

.dash-nav-item.active .nav-label {
    color: #3B82F6;
    font-weight: 600;
}

/* --- PROFILE SETUP FORM (first-time user) --- */
#profile-setup-screen.screen.active {
    margin-right: 0;
    padding-bottom: 0;
    background: #0B1120;
    min-height: 100vh;
    font-family: 'DM Sans', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.profile-form-wrapper {
    width: 100%;
    max-width: 520px;
    animation: dashFadeUp 0.6s ease;
}

.profile-form-header {
    text-align: center;
    margin-bottom: 36px;
}

.profile-form-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.profile-form-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.profile-form-logo-text {
    color: #F1F5F9;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.profile-form-subtitle {
    color: #94A3B8;
    font-size: 15px;
    margin: 0;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.profile-form-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.profile-form-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-field-label {
    display: block;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-field-input {
    width: 100%;
    padding: 11px 14px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    color: #0F172A;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    transition: border 0.2s, box-shadow 0.2s;
}

.profile-field-input:focus {
    border-color: #1D4ED8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.profile-submit-btn {
    width: 100%;
    margin-top: 28px;
    padding: 14px 20px;
    background: #E2E8F0;
    color: #94A3B8;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.profile-submit-btn.ready {
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.profile-form-footnote {
    color: #94A3B8;
    font-size: 12px;
    text-align: center;
    margin-top: 12px;
    line-height: 1.4;
}

/* --- DASHBOARD ANIMATION --- */
@keyframes dashFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- MOBILE RESPONSIVE --- */
#folders-modal-content {
    max-width: 700px;
    max-height: 85vh;
}

@media (max-width: 640px) {
    /* Hero row: keep side by side but compact */
    .dash-hero-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .dash-countdown-card,
    .dash-win-card {
        padding: 16px 12px;
    }

    .dash-countdown-number,
    .dash-win-number {
        font-size: 36px;
    }

    .dash-countdown-sub,
    .dash-win-sub {
        font-size: 12px;
    }

    .dash-countdown-label,
    .dash-win-label {
        font-size: 10px;
    }

    .dash-countdown-date,
    .dash-win-hint {
        font-size: 10px;
    }

    /* Quick actions: stay horizontal */
    .dash-quick-actions {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 6px;
    }

    .dash-quick-btn {
        padding: 10px 6px;
        font-size: 11px;
        gap: 4px;
    }

    .dash-quick-btn svg {
        width: 14px;
        height: 14px;
    }

    /* Middle row: stack cards */
    .dash-middle-row {
        grid-template-columns: 1fr;
    }

    /* Budget: horizontal row */
    .dash-budget-numbers {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
        text-align: center;
    }

    .dash-budget-stat-total,
    .dash-budget-stat-spent,
    .dash-budget-stat-remaining {
        font-size: 16px;
    }

    .dash-budget-stat-label {
        font-size: 10px;
    }

    /* Briefing: tighter */
    .dash-briefing-card {
        padding: 14px 16px;
    }

    .dash-briefing-text {
        font-size: 13px;
        line-height: 1.5;
    }

    /* Greeting */
    .dash-greeting h1 {
        font-size: 20px;
    }

    .dash-greeting p {
        font-size: 12px;
    }

    /* Profile form */
    .profile-form-logo-text {
        font-size: 18px;
    }

    .profile-form-logo-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    /* === HIDE SAM FAB ON MOBILE === */
    #manager-fab {
        display: none !important;
    }

    #manager-tooltip {
        display: none !important;
    }

    /* === CALENDAR: HIDE DESKTOP-ONLY SECTIONS === */
    /* Hide toolbox button cluster */
    #toolbox-btn {
        display: none !important;
    }

    /* Hide Learn About Sam, Race Data, Contact Us, Start Over, Reset, Folders button row */
    #screen-calendar > div:first-child > div:last-child {
        display: none !important;
    }

    /* Hide "Chat with Sam (bottom right)" text */
    #screen-calendar > div:first-child p[style*="vintage-red"] {
        display: none !important;
    }

    /* Hide phase indicator */
    .phase-indicator {
        display: none !important;
    }

    /* Hide sidebar (sticky notes, budget, quick add, progress, completed tasks) */
    .sidebar {
        display: none !important;
    }

    /* Calendar goes full width without sidebar */
    .calendar-main {
        width: 100%;
    }

    /* Calendar grid: fit 7 columns */
    .calendar-container {
        grid-template-columns: 1fr;
    }

    /* Compact legend to one line */
    .legend {
        flex-wrap: wrap;
        gap: 4px 10px;
        font-size: 0.7em;
        margin-bottom: 10px;
    }

    /* Calendar header compact */
    .calendar-header h3 {
        font-size: 1.1em;
    }

    /* View toggle compact */
    .view-toggle button {
        padding: 6px 10px;
        font-size: 0.8em;
    }

    /* === ALL INPUTS: 16px to prevent iOS zoom === */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* === MODALS: full width on mobile === */
    .modal-content {
        width: calc(100% - 24px);
        margin: 12px;
        max-height: 90vh;
    }

    /* Full width container */
    .container {
        padding: 0 !important;
        max-width: none !important;
    }

    .content {
        border-radius: 0;
        border: none;
    }

    /* === HIDE OLD HEADER/LOGO ON MOBILE === */
    .header-stripes {
        display: none !important;
    }

    header {
        display: none !important;
    }

    /* === CALENDAR: fix Saturday cutoff === */
    .day-cell {
        min-height: 45px;
        padding: 2px;
        font-size: 0.75em;
    }

    .calendar-days {
        font-size: 0.75em;
    }

    .calendar-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .calendar-header h3 {
        font-size: 1em;
    }

    .calendar-nav button {
        padding: 5px 8px;
        font-size: 0.8em;
    }

    /* === HIDE "Chat with Sam" on calendar === */
    #screen-calendar > div:first-child > div:first-child > p:last-child {
        display: none !important;
    }

    /* === CALENDAR SCREEN: remove extra padding === */
    #screen-calendar {
        padding: 10px 8px !important;
        background: white !important;
        min-height: 100vh;
    }

    /* Kill content wrapper styling on calendar screen */
    .content:has(#screen-calendar.active) {
        background: white !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    .container:has(#screen-calendar.active) {
        padding: 0 !important;
        max-width: none !important;
        background: white !important;
    }

    body:has(#screen-calendar.active) {
        background: white !important;
    }

    /* Calendar title compact */
    #screen-calendar h2 {
        font-size: 1em;
        margin-bottom: 2px;
    }

    #screen-calendar > div:first-child > div:first-child > p {
        font-size: 0.8em;
    }

    /* === FIX SATURDAY CUTOFF === */
    .month-view {
        gap: 3px;
    }

    .calendar-main {
        padding: 10px 6px;
        border: none;
        border-radius: 0;
    }

    .day-header {
        padding: 4px 2px;
        font-size: 0.75em;
    }

    .day-cell {
        border-width: 1px;
        padding: 2px;
    }

    /* Fix "Today" button cutoff */
    .calendar-nav {
        gap: 4px;
    }

    .calendar-nav button {
        padding: 4px 8px;
        font-size: 0.75em;
    }

    /* View toggle tighter */
    .view-toggle {
        gap: 3px;
        margin-bottom: 10px;
    }

    .view-toggle button {
        padding: 5px 8px;
        font-size: 0.75em;
    }

    /* Content wrapper: minimal padding on calendar */
    .content {
        padding: 6px !important;
    }

    /* === MOBILE DAY VIEW === */
    .mobile-day-view {
        display: block;
        padding: 0 4px;
    }

    /* Hide month grid on mobile */
    .calendar-container {
        display: none !important;
    }

    /* Week strip */
    .week-strip {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        margin-bottom: 12px;
        border-bottom: 1px solid #E2E8F0;
    }

    .week-strip-day {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 6px 8px;
        border-radius: 10px;
        cursor: pointer;
        min-width: 40px;
    }

    .week-strip-day.selected {
        background: var(--vintage-blue);
    }

    .week-strip-day.selected .week-strip-name,
    .week-strip-day.selected .week-strip-date {
        color: white;
    }

    .week-strip-day.today .week-strip-date {
        font-weight: 700;
    }

    .week-strip-name {
        font-size: 10px;
        color: #94A3B8;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .week-strip-date {
        font-size: 16px;
        font-weight: 600;
        color: #334155;
    }

    .week-strip-dot {
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: var(--vintage-blue);
    }

    /* Day view date header */
    .day-view-date {
        font-size: 18px;
        font-weight: 700;
        color: var(--vintage-blue);
        margin-bottom: 16px;
        padding: 0 4px;
    }

    /* Day view sections */
    .day-view-section {
        margin-bottom: 20px;
    }

    .day-view-section-title {
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #94A3B8;
        margin-bottom: 8px;
        padding: 0 4px;
    }

    /* Event items */
    .day-view-event {
        display: flex;
        gap: 12px;
        padding: 12px;
        background: white;
        border-radius: 10px;
        margin-bottom: 6px;
        border: 1px solid #E2E8F0;
    }

    .day-view-event-time {
        font-size: 13px;
        font-weight: 600;
        color: var(--vintage-blue);
        min-width: 65px;
        padding-top: 1px;
    }

    .day-view-event-name {
        font-size: 14px;
        font-weight: 600;
        color: #1E293B;
    }

    .day-view-event-location {
        font-size: 12px;
        color: #3B82F6;
        margin-top: 4px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    /* Task items */
    .day-view-task {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px;
        background: white;
        border-radius: 10px;
        margin-bottom: 6px;
        border: 1px solid #E2E8F0;
    }

    .day-view-task.completed {
        opacity: 0.6;
    }

    .day-view-task-check {
        cursor: pointer;
        flex-shrink: 0;
        padding: 4px;
    }

    .day-view-task-name {
        font-size: 14px;
        color: #1E293B;
        flex: 1;
    }

    .day-view-task-name.done {
        text-decoration: line-through;
        color: #94A3B8;
    }

    .day-view-task-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    /* Empty state */
    .day-view-empty {
        text-align: center;
        padding: 40px 20px;
        color: #94A3B8;
    }

    .day-view-empty p {
        margin-bottom: 16px;
        font-size: 14px;
    }

    .day-view-add-btn {
        display: inline-block;
        background: var(--vintage-blue);
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 8px;
        font-size: 14px;
        cursor: pointer;
        margin: 4px;
        font-family: inherit;
    }

    /* Hide calendar header info on mobile (day view replaces it) */
    #screen-calendar > div:first-child {
        display: none !important;
    }

    /* Hide legend on mobile */
    .legend {
        display: none !important;
    }

    /* Coming Up items */
    .day-view-upcoming-item {
        display: flex;
        gap: 12px;
        align-items: center;
        padding: 10px 12px;
        background: #F8FAFC;
        border-radius: 8px;
        margin-bottom: 4px;
        cursor: pointer;
    }

    .day-view-upcoming-item:active {
        background: #E2E8F0;
    }

    .day-view-upcoming-date {
        font-size: 12px;
        font-weight: 600;
        color: var(--vintage-blue);
        min-width: 50px;
    }

    .day-view-upcoming-name {
        font-size: 13px;
        color: #334155;
    }

    /* === SAM PANEL MOBILE IMPROVEMENTS === */
    #manager-panel {
        width: 100%;
        height: 100%;
        max-height: 100%;
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
        border-radius: 0;
        z-index: 10001;
    }

    #manager-header {
        padding: 12px 12px;
        font-size: 0.95em;
        padding-top: env(safe-area-inset-top, 12px);
    }

    #manager-header span {
        font-size: 14px;
    }

    /* Header buttons: proper touch targets */
    #manager-header button {
        min-width: 36px;
        min-height: 36px;
    }

    #manager-messages {
        padding: 12px 10px;
        background: #F1F5F9;
    }

    #manager-messages .chat-message {
        max-width: 88%;
        font-size: 14px;
        padding: 10px 14px;
        border-radius: 16px;
    }

    #manager-messages .chat-message.assistant {
        border-radius: 16px 16px 16px 4px;
    }

    #manager-messages .chat-message.user {
        border-radius: 16px 16px 4px 16px;
    }

    /* Input area: safe area + keyboard friendly */
    #manager-input-area {
        padding: 10px 10px;
        padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
        gap: 8px;
    }

    #manager-input {
        padding: 10px 16px;
        font-size: 16px;
        border-radius: 20px;
    }

    #manager-input-area button {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 44px;
        border-radius: 20px;
    }

    /* Suggestion chips: scrollable row */
    .suggestion-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .chip {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 13px;
    }

    /* === FOLDERS MODAL: FULL SCREEN ON MOBILE === */
    #folders-modal .modal-content {
        max-width: 100%;
        max-height: 100%;
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
        padding: 16px;
        margin: 0;
    }

    #folders-modal {
        padding: 0;
    }

    #folders-modal .modal-header {
        padding-bottom: 12px;
        margin-bottom: 12px;
    }

    #folders-modal .modal-header h3 {
        font-size: 1.2em;
    }

    /* Close button: proper touch target */
    #folders-modal .close-modal {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Folder list items: full width tap targets */
    #folders-list > div {
        padding: 14px 12px;
    }

    /* Notes list: more space */
    #notes-list {
        max-height: none !important;
    }

    /* Note editor: taller textarea */
    #note-editor-content {
        height: 40vh !important;
    }

    /* Note editor buttons: stack on mobile */
    #note-editor-view > div:last-of-type {
        flex-direction: column;
        gap: 10px;
    }

    #note-editor-view > div:last-of-type > div {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    #note-editor-view > div:last-of-type > div .btn {
        flex: 1;
    }

    /* === ALL MODALS: FULL SCREEN ON MOBILE === */
    .modal {
        padding: 0 !important;
    }

    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        height: 100%;
        border-radius: 0 !important;
        border: none !important;
        padding: 16px !important;
        margin: 0 !important;
    }

    .close-modal {
        min-width: 44px;
        min-height: 44px;
    }

    /* === FOLDERS SCREEN: auto-open folders === */
    .content:has(#screen-folders.active) {
        background: white !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    .container:has(#screen-folders.active) {
        padding: 0 !important;
        max-width: none !important;
        background: white !important;
    }

    body:has(#screen-folders.active) {
        background: white !important;
    }

    #screen-folders {
        padding: 20px 16px !important;
    }

    /* === NEXT UP BAR === */
    .next-up-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: linear-gradient(135deg, #1E3A5F, #2A5298);
        border-radius: 12px;
        padding: 14px 16px;
        margin-bottom: 14px;
        gap: 12px;
    }

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

    .next-up-label {
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #93C5FD;
        margin-bottom: 4px;
    }

    .next-up-name {
        font-size: 15px;
        font-weight: 700;
        color: #FFFFFF;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .next-up-location {
        font-size: 12px;
        color: #BAD7FF;
        margin-top: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .next-up-nav-btn {
        background: #FFFFFF;
        color: #1E3A5F;
        border: none;
        border-radius: 8px;
        padding: 10px 14px;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        flex-shrink: 0;
        font-family: inherit;
    }

    .next-up-nav-btn:active {
        background: #E2E8F0;
    }

    /* === LOADING STATE FOR DASHBOARD === */
    .dash-briefing-loading {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #94A3B8;
        font-size: 13px;
        padding: 12px 0;
    }

    .dash-briefing-loading .spinner {
        width: 16px;
        height: 16px;
        border: 2px solid #E2E8F0;
        border-top-color: #3B82F6;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

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

    /* === ERROR/OFFLINE BANNER === */
    .offline-banner {
        background: #FEF2F2;
        border: 1px solid #FECACA;
        border-radius: 8px;
        padding: 10px 14px;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        color: #991B1B;
    }

    /* === PULL TO REFRESH INDICATOR === */
    .pull-refresh-indicator {
        text-align: center;
        padding: 12px;
        color: #94A3B8;
        font-size: 12px;
        display: none;
    }

    .pull-refresh-indicator.visible {
        display: block;
    }
}

/* ============================================
   DASHBOARD CSS FIX - Override parent styles
   Append after the dashboard styles block
   ============================================ */

/* Override .content styles when dashboard is active */
#dashboard-screen.screen.active .dash-content,
#dashboard-screen.screen.active .dash-topbar {
    /* These elements are inside .content which has white bg */
}

/* Kill .content wrapper styles when it contains the dashboard */
.content:has(#dashboard-screen.active) {
    background: #0B1120 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 0 72px 0 !important; /* keep bottom padding for fixed nav */
    border-radius: 0 !important;
}

/* Kill .container padding when dashboard is showing */
.container:has(#dashboard-screen.active) {
    padding: 0 !important;
    max-width: none !important;
}

/* Kill body cream background when dashboard is showing */
body:has(#dashboard-screen.active) {
    background: #0B1120 !important;
}

/* Force greeting text white with high specificity */
#dashboard-screen .dash-greeting h1 {
    color: #F1F5F9 !important;
    font-family: 'DM Sans', sans-serif !important;
}

#dashboard-screen .dash-greeting p {
    color: #64748B !important;
}