/* Home Page Styles - Compact Dashboard */

.welcome-message {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 0; /* Reduced from 2rem */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    
    /* Grid Layout for Dashboard */
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 1rem; /* Reduced from 1.5rem */
    align-items: stretch;
}

.welcome-message h2, .welcome-message p {
    display: none; 
}

/* 1. Header Section - Top Full Width */
.home-header {
    grid-column: 1 / -1;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem; /* Reduced from 1rem */
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-title {
    font-size: 1.5rem; /* Reduced from 2.5rem */
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.home-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    margin-left: 1rem;
    opacity: 0.8;
}

.home-date-anchor {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    opacity: 0.6;
}

/* 2. Sections - Compact Cards */
.home-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem; /* Reduced from 1.25rem */
    height: 100%; /* Fill grid cell */
    display: flex;
    flex-direction: column;
    margin-bottom: 0; /* Remove old margin */
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 0; /* Ensure grid items can shrink below content size to respect 1fr */
}

.home-section:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

/* Annual Anchors: Top Left */
.home-section:nth-of-type(1) {
    grid-column: 1 / 2;
}

/* Time Guard: Top Right */
.home-section:nth-of-type(2) {
    grid-column: 2 / 3;
}

/* Gentle Guide: Full Width Bottom */
.home-section:nth-of-type(3),
.home-section:nth-of-type(4) {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
}

/* Feature Demo Specifics */
.home-section:nth-of-type(4) {
    padding: 1rem 1.5rem;
}

.section-header {
    margin-bottom: 0.75rem; /* Reduced from 1rem */
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.section-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 1rem; /* Align with text */
}

/* 3. Anchor List - Compact */
.anchor-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

/* Common Dashboard List Item Style for Symmetry */
.dashboard-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem; /* Reduced from 0.75rem */
    border-radius: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid transparent;
    height: 3.5rem; /* Reduced from 4.5rem for symmetry */
    box-sizing: border-box;
}

.dashboard-list-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color);
    transform: translateX(2px);
}

.anchor-item {
    /* Inherits from .dashboard-list-item in usage or we mixin */
}

.anchor-number {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: bold;
    opacity: 0.7;
    width: 1.5rem;
    flex-shrink: 0;
}

.anchor-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.anchor-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.anchor-text.placeholder {
    color: var(--text-muted);
    font-weight: 400;
    font-style: italic;
    font-size: 0.9rem;
}

.anchor-actions {
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.dashboard-list-item:hover .anchor-actions {
    opacity: 1;
}

/* 4. Time Guard - Compact */
.time-guard-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Match anchor list gap */
    flex: 1;
}
/* Removed old .time-block styles if not used, or keep for compatibility */

.task-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.time-block {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.75rem;
    background: var(--bg-darker);
    border-radius: 0.5rem;
    border-left: 3px solid var(--primary);
    transition: all 0.2s;
}

.time-block:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.time-range {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.time-content {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.add-time-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem; /* Reduced padding */
    border: 1px dashed var(--border-color);
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.add-time-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

/* 5. Gentle Guide - Compact Row */
.guide-actions {
    display: flex;
    gap: 0.75rem; /* Reduced from 1rem */
}

.guide-link {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.4rem 0.75rem; /* Reduced from 0.5rem 1rem */
    border-radius: 2rem; /* Pill shape */
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-link:hover {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
}

/* 6. Input Hint - Hidden or Very Subtle */
.home-input-hint {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--bg-darker);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.home-input-hint:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* Icons */
.action-btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.9rem;
}

.action-btn-icon:hover {
    color: var(--primary);
}

/* Modal Adjustments for Compactness */
.input-modal-body {
    gap: 1rem;
}

.input-modal-body input {
    font-size: 1.1rem;
    padding: 0.5rem 0;
}

/* Daily Note Section Styles */
.daily-note-section {
    grid-column: 1 / -1;
    min-height: 140px; /* Reduced from 200px */
    display: flex;
    flex-direction: column;
}

.note-header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-darker);
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.note-date-display {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 85px;
    text-align: center;
}

.note-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 0.5rem;
    position: relative;
}

.note-textarea {
    width: 100%;
    height: 100%;
    min-height: 80px; /* Reduced from 120px */
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    color: var(--text-primary);
    resize: none;
    font-size: 0.95rem;
    line-height: 1.6;
    outline: none;
    padding: 0.5rem;
    transition: all 0.2s;
}

.note-textarea:hover {
    background: var(--bg-darker);
}

.note-textarea:focus {
    background: var(--bg-darker);
    border-color: var(--border-color);
}

.note-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
    font-style: italic;
}

.note-status {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    height: 1rem;
    margin-top: 0.25rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.note-header-controls .action-btn-icon {
    color: var(--text-muted);
    transition: all 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.note-header-controls .action-btn-icon:hover {
    color: var(--primary);
    background: var(--bg-card);
}

/* Mobile Adaptations */
@media (max-width: 768px) {
    .welcome-message {
        grid-template-columns: 1fr; /* Stack vertically */
        padding: 1rem;
        gap: 1rem;
    }
    
    .home-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .home-subtitle {
        margin-left: 0;
    }

    .home-section:nth-of-type(1),
    .home-section:nth-of-type(2) {
        grid-column: 1 / -1;
    }
    
    .home-section:nth-of-type(3) {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}