/* styles.css | Version: 2.31.0 (Modular Clean Architecture) */
:root {
    --primary: #007AFF; --secondary-accent: #5856D6; --bg: #F2F2F7; --card: #FFFFFF; --text: #000000;
    --border: #C6C6C8; --header-bg: #f9f9f9; --danger: #ff3b30; --success: #34C759;
    --warning: #FF9500; --sidebar-width: 80px; --nav-bg: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000; --card: #1C1C1E; --text: #FFFFFF; --border: #38383A;
        --header-bg: #1C1C1E; --nav-bg: #1C1C1E; --secondary-accent: #7D7AFF;
    }
    input[type="text"], input[type="number"], input[type="time"], input[type="url"], input[type="password"], select {
        background: #2C2C2E !important; color: #FFF !important; border-color: #38383A !important;
    }
    .task-item { background: #1C1C1E; border-color: #38383A; }
    .dashboard-card { background: #1C1C1E; border-color: #38383A; }
    .task-category-group { background: #1C1C1E; }
}
* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0; background-color: var(--bg); color: var(--text); height: 100vh;
    display: flex; overflow: hidden; overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent; user-select: none;
}
nav.app-nav {
    background: var(--nav-bg); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; align-items: center; padding: 20px 0;
    width: var(--sidebar-width); z-index: 100; flex-shrink: 0; position: relative;
}
.nav-sortable { display: flex; flex-direction: column; width: 100%; align-items: center; }
.nav-item {
    width: 60px; height: 60px; border-radius: 16px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: #8E8E93; cursor: pointer;
    margin-bottom: 10px; transition: all 0.2s;
}
.nav-item svg { width: 28px; height: 28px; fill: currentColor; margin-bottom: 4px; }
.nav-item span { font-size: 0.65rem; font-weight: 600; }
.nav-item.active { background: rgba(0, 122, 255, 0.1); color: var(--primary); }
.nav-version { margin-top: auto; font-size: 0.7rem; font-weight: 700; color: #8E8E93; opacity: 0.8; }
.sortable-ghost { opacity: 0.4; }
.sortable-drag { cursor: grabbing !important; box-shadow: 0 15px 30px rgba(0,0,0,0.2) !important; transform: scale(1.02); }
main.content { flex: 1; position: relative; overflow: hidden; }
.tab-content { display: none; height: 100%; width: 100%; overflow-y: auto; padding: calc(env(safe-area-inset-top) + 16px) 24px 24px 24px; -webkit-overflow-scrolling: touch; }
.tab-content.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.centered-page-container { max-width: 1100px; margin: 0 auto; }
.settings-container { max-width: 860px; margin: 0 auto; }
.dashboard-header { display: flex; flex-direction: column; width: 100%; margin-bottom: 14px; }
.header-top-bar { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 8px; flex-wrap: nowrap; }
.header-date-nav { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; }
.dashboard-header h1 {
    margin: 0; font-size: clamp(1.15rem, 2.5vw, 1.85rem); font-weight: 800; line-height: 1.1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.dashboard-header h1.is-offset { color: var(--primary); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.dashboard-header p { margin: 4px 0 0; color: #8E8E93; font-size: 0.9rem; font-weight: 500; }
.dashboard-header p:empty { display: none; }
.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.header-nav-btn {
    width: 34px; height: 34px; padding: 0 !important; border-radius: 10px !important;
    font-size: 0.95rem !important; font-weight: 800 !important; margin: 0; flex-shrink: 0;
    background: var(--primary) !important; color: #FFFFFF !important;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.25); transition: transform 0.15s, background 0.2s;
}
.header-nav-btn:hover { filter: brightness(1.08); }
.header-nav-btn:active { transform: scale(0.92); }
.header-icon-btn {
    width: 34px; height: 34px; padding: 0 !important; border-radius: 10px !important;
    margin: 0; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ai-icon-btn {
    background: linear-gradient(135deg, #5856D6, #AF52DE) !important;
    color: #FFFFFF !important; font-size: 1rem !important;
    box-shadow: 0 2px 8px rgba(175, 82, 222, 0.35);
}
.ai-icon-btn:hover { filter: brightness(1.1); }
.ai-icon-btn:active { transform: scale(0.92); }
.modal.ai-modal {
    max-width: 620px; height: 85vh; max-height: 88vh;
    display: flex; flex-direction: column; padding: 18px 20px; overflow: hidden;
}
.ai-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    gap: 8px; margin-bottom: 12px; flex-shrink: 0; flex-wrap: nowrap;
}
.ai-modal-title {
    margin: 0; font-size: 1.2rem; font-weight: 800;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ai-modal-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ai-close-btn {
    width: 32px; height: 32px; padding: 0 !important; border-radius: 50% !important;
    font-size: 0.9rem !important; margin: 0; flex-shrink: 0;
}
.ai-quick-actions {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 8px; margin-bottom: 12px; flex-shrink: 0;
}
.ai-action-chip {
    padding: 10px 8px !important; border-radius: 12px !important; font-size: 0.85rem !important;
    font-weight: 700 !important; background: var(--bg) !important; color: var(--text) !important;
    border: 1.5px solid var(--border) !important; cursor: pointer; transition: all 0.2s;
    text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ai-action-chip:hover { border-color: var(--secondary-accent) !important; }
.ai-action-chip.active {
    background: rgba(88, 86, 214, 0.16) !important;
    color: var(--secondary-accent) !important; border-color: var(--secondary-accent) !important;
}
.ai-action-chip:active { transform: scale(0.96); }
.ai-status-pill {
    display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 800;
    padding: 4px 9px; border-radius: 8px; text-transform: uppercase; white-space: nowrap;
    flex-shrink: 0; background: rgba(142, 142, 147, 0.15); color: #8E8E93;
}
.ai-status-pill.connected { background: rgba(52, 199, 89, 0.15); color: var(--success); }
.ai-status-pill.error { background: rgba(255, 59, 48, 0.15); color: var(--danger); }
.ai-response-box {
    flex: 1; background: var(--bg); border: 1.5px solid var(--border); border-radius: 14px;
    padding: 14px 16px; margin-bottom: 12px; overflow-y: auto; font-size: 0.95rem;
    line-height: 1.5; user-select: text; -webkit-overflow-scrolling: touch;
}
.ai-section-title {
    font-size: 0.92rem; font-weight: 800; color: var(--primary);
    margin: 14px 0 6px 0; padding-bottom: 4px; border-bottom: 1px solid var(--border);
}
.ai-section-title:first-child { margin-top: 0; }
.ai-bullet { margin: 6px 0; padding-left: 14px; position: relative; }
.ai-bullet::before { content: "•"; position: absolute; left: 2px; color: var(--primary); font-weight: bold; }
.ai-para { margin: 6px 0; }
.stat-badge { padding: 6px 10px; border-radius: 10px; font-weight: 800; font-size: 0.9rem; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.streak-badge { background: rgba(255, 149, 0, 0.12); color: #FF9500; }
.points-badge { background: rgba(52, 199, 89, 0.12); color: var(--success); }
.sync-btn { background: var(--primary); padding: 10px 18px; border-radius: 14px; border: none; cursor: pointer; display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.95rem; color: white; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.sync-btn:active { transform: scale(0.95); }
.sync-btn svg { width: 16px; height: 16px; fill: currentColor; }
.dashboard-grid { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.dashboard-card { background: var(--card); border-radius: 20px; padding: 14px 18px; border: 1.5px solid var(--border); box-shadow: 0 4px 20px rgba(0,0,0,0.03); display: flex; flex-direction: column; height: auto; }
.dashboard-grid .dashboard-card { flex: 1 1 calc(50% - 8px); min-width: 300px; height: calc(50vh - 50px); min-height: 320px; }
#card-schedule { border-color: var(--danger); }
#card-allowance { border-color: var(--success); }
#card-standard { border-color: var(--warning); }
#card-training { border-color: #AF52DE; }
.dashboard-card h2 { margin: 0 0 6px 0; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.dashboard-list { overflow-y: auto; flex: 1; padding-right: 6px; }
.sub-section-header { font-size: 0.85rem; color: #8E8E93; margin: 18px 0 10px 0; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.task-category-group {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 18px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}
.task-category-group.allowance-group { border-color: var(--success); }
.task-category-group.standard-group { border-color: var(--warning); }
.task-category-group.training-group { border-color: #AF52DE; margin-bottom: 32px; }
.task-category-group .sub-section-header {
    margin: 0 0 14px 0;
    font-size: 0.95rem;
    color: var(--text);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.task-category-group .manage-tasks-grid { margin-bottom: 0; }
.schedule-day-header {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px;
    padding: 5px 10px; border-radius: 8px; margin: 10px 0 7px 0;
}
.schedule-day-header:first-child { margin-top: 0; }
.schedule-day-header.primary-day { color: var(--primary); background: rgba(0, 122, 255, 0.1); border-left: 4px solid var(--primary); }
.schedule-day-header.secondary-day { color: var(--secondary-accent); background: rgba(88, 86, 214, 0.1); border-left: 4px solid var(--secondary-accent); }
.progress-bar-bg { height: 12px; background: var(--border); border-radius: 6px; margin-bottom: 10px; overflow: hidden; }
.progress-bar-bg.mini { height: 12px; border-radius: 6px; margin-bottom: 0; }
.progress-bar-fill { height: 100%; background: var(--success); width: 0%; transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.task-item { background: var(--bg); border: 1px solid var(--border); border-radius: 11px; padding: 7px 12px; margin-bottom: 6px; display: flex; flex-direction: column; align-items: stretch; cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.task-item:active { transform: scale(0.98); }
.checkbox { width: 22px; height: 22px; border: 2px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }
.checkbox svg { width: 14px; height: 14px; fill: white; opacity: 0; transform: scale(0.5); transition: all 0.2s; }
.task-title { font-size: 0.95rem; font-weight: 600; line-height: 1.2; transition: color 0.2s; flex: 1; display:flex; align-items:center; }
.task-item.checked { background: rgba(52, 199, 89, 0.1); border-color: rgba(52, 199, 89, 0.3); }
.task-item.checked .checkbox { background: var(--success); border-color: var(--success); }
.task-item.checked .checkbox svg { opacity: 1; transform: scale(1); }
.task-item.checked .task-title { text-decoration: line-through; color: #8E8E93; }
.tracker-day {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 1px 5px; border-radius: 6px; border: 1.5px solid transparent; transition: all 0.2s;
}
.tracker-day .tracker-day-label { font-size: 0.58rem; line-height: 1; color: #8E8E93; font-weight: 600; }
.tracker-day.active-day { background: rgba(0, 122, 255, 0.12); border-color: var(--primary); }
.tracker-day.active-day .tracker-day-label { color: var(--primary); font-weight: 800; }
.manage-tasks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; margin-bottom: 20px; }
.manage-tasks-grid .task-item { margin-bottom: 0; padding: 10px 14px; }
.settings-card { padding: 18px 22px; margin-bottom: 16px; }
.settings-form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.settings-label { font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; display: block; color: #8E8E93; }
.compact-input { padding: 10px 14px !important; font-size: 1rem !important; font-weight: 600; margin-bottom: 0 !important; border-radius: 10px !important; }
.compact-btn { padding: 11px 20px !important; font-size: 0.95rem !important; border-radius: 10px !important; height: 42px; flex-shrink: 0; }
.bank-container { display: flex; gap: 16px; margin-bottom: 24px; }
.bank-card { flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,0.02); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.bank-label { font-size: 0.85rem; color: #8E8E93; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; }
.bank-value { font-size: 2.3rem; font-weight: 800; line-height: 1; }
.reward-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.02); height: auto; }
.reward-header { display: flex; align-items: center; gap: 12px; }
.reward-icon { font-size: 1.8rem; background: var(--bg); width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 12px; }
.reward-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.reward-cost { font-size: 0.9rem; font-weight: 700; color: var(--success); }
.reward-history { margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 0.8rem; color: #8E8E93; line-height: 1.4; }
.ledger-table { width: 100%; border-collapse: collapse; text-align: center; font-size: 0.9rem; }
.ledger-table th { color: #8E8E93; font-weight: 700; padding: 12px; border-bottom: 1px solid var(--border); text-transform: uppercase; font-size: 0.78rem; }
.ledger-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ledger-table tr:last-child td { border-bottom: none; }
.agenda-item { display: flex; gap: 10px; margin-bottom: 7px; align-items: flex-start; cursor: pointer; transition: all 0.2s; }
.agenda-item:active { transform: scale(0.98); }
.agenda-time { width: 58px; font-weight: 700; color: #8E8E93; font-size: 0.82rem; text-align: right; line-height: 1.25; flex-shrink: 0; padding-top: 2px; }
.agenda-details { flex: 1; padding: 7px 11px; border-radius: 10px; transition: all 0.2s; }
.agenda-details h4 { margin: 0; font-size: 0.95rem; line-height: 1.25; }
.agenda-details p { margin: 0; font-size: 0.8rem; opacity: 0.85; line-height: 1.25; }
.agenda-details .agenda-loc { margin: 2px 0 0 !important; }
.agenda-details .agenda-cal { margin: 2px 0 0 !important; font-size: 0.68rem !important; }
.rsvp-badge { font-size: 0.68rem; font-weight: 800; padding: 2px 7px; border-radius: 6px; text-transform: uppercase; white-space: nowrap; flex-shrink: 0; }
.rsvp-badge.unset { background: rgba(142, 142, 147, 0.15); color: #8E8E93; }
.rsvp-badge.yes { background: var(--success); color: white; }
.rsvp-badge.no { background: var(--danger); color: white; }
.agenda-item.rsvp-yes .agenda-details { box-shadow: inset 0 0 0 2px var(--success); }
.agenda-item.rsvp-no .agenda-details { box-shadow: inset 0 0 0 1.5px rgba(255, 59, 48, 0.45); }
.agenda-item.rsvp-no .agenda-title { text-decoration: line-through; text-decoration-color: var(--danger); text-decoration-thickness: 2px; opacity: 0.8; }
.event-chip.rsvp-no, .grid-event.rsvp-no { text-decoration: line-through; opacity: 0.78; }
.event-chip.rsvp-yes, .grid-event.rsvp-yes { font-weight: 700; }
#scheduleContainer { height: 100%; overflow: auto; border-radius: 16px; border: 1px solid var(--border); background: var(--card); }
table { border-collapse: separate; border-spacing: 0; width: 100%; }
th, td { padding: 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: center; }
thead th { background: var(--header-bg); position: sticky; top: 0; z-index: 10; padding: 12px; font-size: 1rem; }
tbody td { height: 80px; vertical-align: top; }
.event-chip { color: white; padding: 4px 8px; border-radius: 6px; font-size: 0.8rem; margin-bottom: 4px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-toggle { display: flex; background: var(--border); border-radius: 8px; padding: 2px; }
.view-toggle button { padding: 6px 16px; font-size: 0.9rem; border-radius: 6px; background: transparent; color: var(--text); box-shadow: none; font-weight: 600; margin: 0; }
.view-toggle button.active { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.grid-header { background: var(--header-bg); text-align: center; padding: 10px 5px; font-size: 0.8rem; font-weight: 700; color: #8E8E93; text-transform: uppercase; }
.grid-day { background: var(--card); min-height: 105px; padding: 8px; display: flex; flex-direction: column; min-width: 0; cursor: pointer; transition: background 0.2s; }
.grid-day:not(.empty):hover { background: var(--bg); }
.grid-day.empty { background: var(--bg); cursor: default; }
.grid-day.today .day-number { background: var(--primary); color: white; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: -4px; margin-left: -4px; font-weight: bold; }
.day-number { font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.day-events-container { flex: 1; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; min-width: 0; padding-right: 4px; }
.grid-event { font-size: 0.75rem; color: white; padding: 3px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; max-width: 100%; box-sizing: border-box; }
.event-dot { display: none; }
.event-text { display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
input[type="text"], input[type="number"], input[type="url"], input[type="password"], select { width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 12px; font-size: 1rem; margin-bottom: 16px; background: var(--bg); }
button { border: none; cursor: pointer; padding: 12px 22px; border-radius: 14px; font-weight: 600; font-size: 1rem; transition: background 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button.primary { background: var(--primary); color: white; }
button.secondary { background: var(--border); color: var(--text); }
button.danger { background: var(--danger); color: white; }
.day-picker { display: flex; gap: 8px; margin-bottom: 20px; }
.day-bubble { width: 40px; height: 40px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-weight: 600; cursor: pointer; color: var(--text); transition: 0.2s; }
.day-bubble.selected { background: var(--primary); color: white; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(4px); padding: 20px; box-sizing: border-box; }
.modal { background: var(--card); width: 100%; max-width: 500px; padding: 28px; border-radius: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); max-height: 90vh; overflow-y: auto; }
.status-bar { position: absolute; top: 20px; right: 20px; display: flex; gap: 10px; z-index: 200; }
.badge { padding: 6px 12px; border-radius: 12px; font-size: 0.8rem; font-weight: 800; display: none; color: white; }
.badge.offline { background: var(--danger); display: block; }
.badge.sync { background: var(--primary); }
.confetti { position: fixed; width: 10px; height: 10px; background: var(--success); z-index: 9999; animation: fall 3s linear forwards; pointer-events: none; }
@keyframes fall { to { transform: translateY(100vh) rotate(720deg); } }
.compact-mode .agenda-tz, .compact-mode .agenda-loc, .compact-mode .agenda-cal { display: none !important; }
.compact-mode .agenda-item { margin-bottom: 5px; align-items: center; }
.compact-mode .agenda-time { font-size: 0.8rem; width: 52px; }
.compact-mode .agenda-details { padding: 5px 10px; overflow: hidden; }
.compact-mode .agenda-title { font-size: 0.9rem !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-mode .task-item { padding: 9px 14px; margin-bottom: 8px; }
.compact-mode .task-tracker { display: none !important; }
.compact-mode .task-title { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 800px) {
    body { flex-direction: column-reverse; }
    nav.app-nav { width: 100%; height: 80px; flex-direction: row; padding: 0; border-right: none; border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
    .nav-sortable { flex-direction: row; justify-content: space-around; height: 100%; }
    .nav-item { margin: 0; height: 100%; }
    .nav-version { display: none; }
    .dashboard-grid { display: block; height: auto; }
    .dashboard-grid .dashboard-card { margin-bottom: 16px; height: auto !important; min-height: 150px !important; max-height: 62vh !important; }
    .dashboard-list { overflow-y: auto; }
    .tab-content { padding: calc(env(safe-area-inset-top) + 12px) 14px calc(env(safe-area-inset-bottom) + 96px) 14px; }
    .dashboard-header { margin-bottom: 12px; }
    .header-date-nav { gap: 6px; }
    .dashboard-header h1 { font-size: 1.1rem; }
    .header-nav-btn, .header-icon-btn { width: 32px; height: 32px; border-radius: 9px !important; font-size: 0.85rem !important; }
    .header-actions { gap: 5px; }
    .stat-badge { padding: 5px 8px; font-size: 0.82rem; border-radius: 9px; }
    .modal-overlay { padding: 10px; }
    .modal.ai-modal { height: 86vh; max-height: 88vh; padding: 16px; border-radius: 20px; }
    .ai-modal-title { font-size: 1.12rem; }
    .ai-quick-actions { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .ai-action-chip { padding: 9px 8px !important; font-size: 0.82rem !important; border-radius: 10px !important; }
    .manage-tasks-grid { grid-template-columns: 1fr; }
    .task-category-group { padding: 14px 16px; }
    .settings-form-row .compact-btn { width: 100%; }
    .grid-day { min-height: 60px; padding: 4px; }
    .day-events-container { flex-direction: row; flex-wrap: wrap; gap: 2px; align-content: flex-start; overflow: hidden; padding-right: 0; }
    .grid-event { background: transparent !important; padding: 0; width: auto; display: inline-flex; margin-bottom: 2px; }
    .event-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
    .event-text { display: none; }
    .day-number { font-size: 0.8rem; margin-bottom: 4px; text-align: center; width: 100%; }
    .grid-day.today .day-number { margin: 0 auto 4px auto; }
    .bank-container { flex-direction: column; gap: 12px; }
}
@page {
    size: letter landscape;
    margin: 0.25in;
}
@media print {
    :root {
        --bg: #FFFFFF !important;
        --card: #FFFFFF !important;
        --text: #000000 !important;
        --border: #CCCCCC !important;
        --header-bg: #F2F2F7 !important;
    }
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    body {
        background: #FFFFFF !important;
        color: #000000 !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
    }
    nav.app-nav,
    .status-bar,
    .modal-overlay,
    .calendar-top-header,
    #scheduleContainer,
    #calendarGridNav button,
    .tab-content:not(#tab-calendar) {
        display: none !important;
    }
    main.content,
    #tab-calendar {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }
    #calendarGridNav {
        display: flex !important;
        justify-content: center !important;
        margin-bottom: 8px !important;
    }
    #gridMonthTitle {
        font-size: 1.35rem !important;
        font-weight: 800 !important;
        color: #000000 !important;
    }
    #scheduleGridContainer {
        display: block !important;
    }
    .calendar-grid {
        border: 1px solid #999999 !important;
        background: #999999 !important;
        border-radius: 6px !important;
    }
    .grid-header {
        background: #F2F2F7 !important;
        color: #333333 !important;
        padding: 5px 4px !important;
        font-size: 0.72rem !important;
    }
    .grid-day {
        background: #FFFFFF !important;
        min-height: 102px !important;
        max-height: 112px !important;
        padding: 4px 5px !important;
        overflow: hidden !important;
        page-break-inside: avoid !important;
    }
    .grid-day.empty {
        background: #FAFAFA !important;
    }
    .day-number {
        font-size: 0.78rem !important;
        margin-bottom: 3px !important;
        text-align: left !important;
        color: #000000 !important;
    }
    .grid-day.today .day-number {
        background: #007AFF !important;
        color: #FFFFFF !important;
        width: 20px !important;
        height: 20px !important;
        margin: 0 0 3px 0 !important;
    }
    .day-events-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        overflow: hidden !important;
        padding-right: 0 !important;
    }
    .grid-event {
        background: var(--primary);
        padding: 2px 4px !important;
        font-size: 0.64rem !important;
        line-height: 1.15 !important;
        border-radius: 3px !important;
        width: 100% !important;
        display: flex !important;
        color: #FFFFFF !important;
    }
    .event-dot {
        display: none !important;
    }
    .event-text {
        display: inline !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
}
