/* ============================================
   Time-Block Planner Styles
   Cal Newport Methodology Implementation
   ============================================ */

/* CSS Variables - Design System */
:root {
    /* Primary Colors */
    --deep-focus: #3D5A73;
    --calm-ground: #F7F5F2;
    
    /* Secondary Colors */
    --growth: #6B8F71;
    --structure: #E8E4DE;
    
    /* Accent */
    --action: #D4896A;
    
    /* Neutrals */
    --text-primary: #2C3E44;
    --text-secondary: #6B7B82;
    --dividers: #D1CCC4;
    
    /* Block Type Colors */
    --block-deep-work: #3D5A73;
    --block-admin: #E8E4DE;
    --block-priority: #D4896A;
    --block-growth: #6B8F71;
    --block-break: #F7F5F2;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    
    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    
    /* Line Heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    
    /* Border & Shadow */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --shadow-sm: 0 1px 2px rgba(44, 62, 68, 0.05);
    --shadow-md: 0 4px 6px rgba(44, 62, 68, 0.07);
    --shadow-lg: 0 10px 15px rgba(44, 62, 68, 0.1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--calm-ground);
    overflow-x: hidden;
}

/* Header */
.app-header {
    background-color: white;
    border-bottom: 1px solid var(--dividers);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1920px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.app-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--deep-focus);
    line-height: var(--leading-tight);
}

.app-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: var(--font-medium);
}

.header-nav {
    display: flex;
    gap: var(--space-2);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background-color: var(--structure);
    color: var(--text-primary);
}

.nav-btn.active {
    background-color: var(--deep-focus);
    color: white;
    border-color: var(--deep-focus);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background-color: var(--action);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #c27a5a;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background-color: white;
    color: var(--text-primary);
    border: 1px solid var(--dividers);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: var(--structure);
    border-color: var(--text-secondary);
}

.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: var(--structure);
    color: var(--text-primary);
}

.btn-add {
    width: 32px;
    height: 32px;
    padding: 0;
    background-color: var(--deep-focus);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add:hover {
    background-color: #2d4456;
}

/* Main Content */
.app-main {
    max-width: 1920px;
    margin: 0 auto;
    padding: var(--space-6);
    min-height: calc(100vh - 100px);
}

/* View Container */
.view-container {
    display: none;
}

.view-container.active {
    display: block;
}

.view-header {
    margin-bottom: var(--space-6);
}

.view-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--deep-focus);
    margin-bottom: var(--space-2);
}

.date-navigation {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.date-picker {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--dividers);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    color: var(--text-primary);
    background-color: white;
}

/* Daily View Layout */
.daily-layout {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: var(--space-6);
    align-items: start;
}

/* Collection Sidebar */
.collection-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.collection-column {
    background-color: white;
    border: 1px solid var(--dividers);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.collection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.collection-header h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--deep-focus);
}

.collection-input {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.collection-input input {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--dividers);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.collection-input input:focus {
    outline: none;
    border-color: var(--deep-focus);
}

.collection-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-height: 400px;
    overflow-y: auto;
}

.collection-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    background-color: var(--calm-ground);
    border: 1px solid var(--dividers);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    transition: all 0.2s ease;
    cursor: move;
}

.collection-item:hover {
    background-color: var(--structure);
    border-color: var(--text-secondary);
}

.collection-item.processed {
    opacity: 0.5;
    text-decoration: line-through;
}

.collection-item-text {
    flex: 1;
    word-break: break-word;
}

.collection-item-actions {
    display: flex;
    gap: var(--space-1);
}

.item-action-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.item-action-btn:hover {
    background-color: white;
    color: var(--text-primary);
}

/* Time-Block Section */
.timeblock-section {
    background-color: white;
    border: 1px solid var(--dividers);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.timeblock-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
}

.timeblock-header h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--deep-focus);
}

.timeblock-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.timeblock-grid-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 800px;
}

.timeblock-grid {
    display: grid;
    grid-template-columns: 60px repeat(var(--column-count, 1), 1fr);
    gap: 1px;
    background-color: var(--dividers);
    border: 1px solid var(--dividers);
    border-radius: var(--radius-md);
    overflow: hidden;
    min-width: 600px;
}

.time-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2);
    background-color: var(--structure);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    border-right: 1px solid var(--dividers);
}

.time-cell {
    position: relative;
    min-height: 60px;
    background-color: white;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.time-cell:hover {
    background-color: var(--calm-ground);
}

.time-cell.half-hour {
    border-top: 1px dashed var(--dividers);
}

.time-block {
    position: absolute;
    left: 4px;
    right: 4px;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.time-block:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.time-block.selected {
    box-shadow: 0 0 0 3px var(--action);
}

.time-block.completed::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
}

.time-block.crossed-out {
    opacity: 0.5;
    text-decoration: line-through;
}

/* Block Type Styles */
.time-block.deepWork {
    background-color: var(--block-deep-work);
    color: white;
}

.time-block.admin {
    background-color: var(--block-admin);
    color: var(--text-primary);
}

.time-block.priority {
    background-color: var(--block-priority);
    color: white;
}

.time-block.growth {
    background-color: var(--block-growth);
    color: white;
}

.time-block.break {
    background-color: var(--block-break);
    color: var(--text-primary);
    border: 2px dashed var(--dividers);
}

.block-title {
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.block-time {
    font-size: var(--text-xs);
    opacity: 0.9;
}

/* Metrics Sidebar */
.metrics-sidebar {
    position: sticky;
    top: 100px;
}

.metrics-panel {
    background-color: white;
    border: 1px solid var(--dividers);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.metrics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.metrics-header h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--deep-focus);
}

.metrics-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.metric-label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

.metric-value {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.metric-input {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--dividers);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--deep-focus);
}

.metric-input:focus {
    outline: none;
    border-color: var(--deep-focus);
}

.metric-unit {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* Shutdown Section */
.shutdown-section {
    padding-top: var(--space-5);
    border-top: 1px solid var(--dividers);
}

.shutdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.shutdown-header h4 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--deep-focus);
}

.shutdown-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background-color: var(--calm-ground);
    border: 2px solid var(--dividers);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.shutdown-checkbox:hover {
    background-color: var(--structure);
    border-color: var(--growth);
}

.shutdown-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.shutdown-checkbox input[type="checkbox"]:checked + .shutdown-label {
    color: var(--growth);
    font-weight: var(--font-semibold);
}

.shutdown-label {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

/* Weekly View */
.weekly-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.weekly-planning {
    background-color: white;
    border: 1px solid var(--dividers);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.planning-section h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--deep-focus);
    margin-bottom: var(--space-4);
}

.planning-textarea {
    width: 100%;
    min-height: 150px;
    padding: var(--space-4);
    border: 1px solid var(--dividers);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--text-primary);
    resize: vertical;
}

.planning-textarea:focus {
    outline: none;
    border-color: var(--deep-focus);
}

.week-overview {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-3);
}

.day-card {
    background-color: white;
    border: 1px solid var(--dividers);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.day-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--deep-focus);
}

.day-card-header {
    text-align: center;
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--dividers);
}

.day-name {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.day-date {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--deep-focus);
}

.day-blocks {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-height: 200px;
}

.day-block-mini {
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
}

.weekly-summary {
    display: flex;
    justify-content: center;
    gap: var(--space-8);
    padding: var(--space-6);
    background-color: white;
    border: 1px solid var(--dividers);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: var(--font-medium);
}

.stat-value {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--deep-focus);
}

/* Monthly View */
.monthly-calendar {
    background-color: white;
    border: 1px solid var(--dividers);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.calendar-day-name {
    text-align: center;
    padding: var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-2);
}

.calendar-day {
    aspect-ratio: 1;
    padding: var(--space-3);
    border: 1px solid var(--dividers);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-day:hover {
    background-color: var(--calm-ground);
    border-color: var(--deep-focus);
}

.calendar-day.today {
    background-color: var(--deep-focus);
    color: white;
    border-color: var(--deep-focus);
}

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

.calendar-day-number {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-2);
}

.calendar-day-dots {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}

.calendar-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--deep-focus);
}

/* Settings View */
.settings-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    max-width: 800px;
}

.settings-section {
    background-color: white;
    border: 1px solid var(--dividers);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.settings-section h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--deep-focus);
    margin-bottom: var(--space-5);
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.settings-group label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

.settings-group input[type="time"] {
    padding: var(--space-3);
    border: 1px solid var(--dividers);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: var(--text-base);
}

.settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 68, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.modal-sm {
    max-width: 500px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
    border-bottom: 1px solid var(--dividers);
}

.modal-header h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--deep-focus);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: var(--text-2xl);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--structure);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-6);
    border-top: 1px solid var(--dividers);
}

/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.form-group label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="time"],
.form-group select {
    padding: var(--space-3);
    border: 1px solid var(--dividers);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--deep-focus);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-6);
}

.modal-actions-right {
    display: flex;
    gap: var(--space-3);
}

/* Help Content */
.help-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.help-section {
    padding: var(--space-5);
    background-color: var(--calm-ground);
    border-left: 4px solid var(--deep-focus);
    border-radius: var(--radius-md);
}

.help-section h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--deep-focus);
    margin-bottom: var(--space-3);
}

.help-section p {
    line-height: var(--leading-relaxed);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.help-section .source {
    font-size: var(--text-sm);
    font-style: italic;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1280px) {
    .daily-layout {
        grid-template-columns: 250px 1fr 280px;
    }
}

@media (max-width: 1024px) {
    .daily-layout {
        grid-template-columns: 1fr;
    }
    
    .collection-sidebar {
        flex-direction: row;
    }
    
    .metrics-sidebar {
        position: static;
    }
    
    .week-overview {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .header-nav {
        order: 3;
        width: 100%;
        justify-content: space-around;
    }
    
    .nav-btn span {
        display: none;
    }
    
    .week-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calendar-grid {
        gap: var(--space-1);
    }
}

@media (max-width: 640px) {
    .app-main {
        padding: var(--space-4);
    }
    
    .collection-sidebar {
        flex-direction: column;
    }
    
    .week-overview {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .app-header,
    .header-actions,
    .nav-btn,
    .btn-icon,
    .help-trigger,
    .modal {
        display: none !important;
    }
    
    body {
        background-color: white;
    }
    
    .app-main {
        padding: 0;
    }
    
    .daily-layout {
        display: block;
    }
    
    .timeblock-section {
        page-break-inside: avoid;
    }
}

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--action);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--calm-ground);
}

::-webkit-scrollbar-thumb {
    background: var(--dividers);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
