/* ==========================================================================
   CHRONOCASH - APPLICATION LAYOUT & COMPONENT STYLES
   ========================================================================== */

/* Header & Main Navigation */
#global-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--bg-glass-border);
    padding: 0.85rem 1.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    cursor: pointer;
    text-decoration: none;
}

.brand-logo-img {
    height: 40px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: transform var(--transition-bounce);
}

.brand-container:hover .brand-logo-img {
    transform: scale(1.06) rotate(-3deg);
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-pills {
    display: flex;
    align-items: center;
    background: var(--bg-surface-elevated);
    padding: 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    overflow-x: auto;
    max-width: 60vw;
}

.nav-pill-btn {
    padding: 0.5rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-pill-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.03);
}

.nav-pill-btn.active {
    background: var(--bg-surface);
    color: var(--color-sage);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Main Container */
#main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1350px;
    margin: 0 auto;
    padding: 1.8rem;
}

.view-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out forwards;
}

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

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

/* Hero Section */
.hero-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(123, 154, 87, 0.92), rgba(180, 119, 93, 0.88)),
                url('https://images.unsplash.com/photo-1506784983877-45594efa4cbe?auto=format&fit=crop&w=1600&q=80') center/cover;
    border-radius: var(--radius-lg);
    padding: 4.5rem 3rem;
    color: white;
    text-align: center;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2.2rem;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo-img {
    height: 70px;
    width: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    margin-bottom: 1.2rem;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    padding: 0.35rem 1.1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.3rem;
    line-height: 1.15;
    margin-bottom: 1.2rem;
    font-weight: 700;
    color: white;
}

.hero-subtitle {
    font-size: 1.18rem;
    opacity: 0.95;
    margin-bottom: 2.2rem;
    font-weight: 300;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.8rem;
    margin-bottom: 2.5rem;
}

.dash-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    padding: 1.8rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.dash-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid var(--color-sage-light);
    padding-bottom: 0.6rem;
}

.dash-card-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--color-sage);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metric-val {
    font-family: var(--font-code);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.4rem 0;
}

.metric-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Schedule Module */
.schedule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    padding: 1.2rem 1.8rem;
    margin-bottom: 1.8rem;
    box-shadow: var(--shadow-sm);
}

.time-slot-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.time-slot-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.2rem;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    padding: 1rem 1.4rem;
    align-items: center;
    transition: all var(--transition-fast);
}

.time-slot-row:hover {
    border-color: var(--color-sage);
    box-shadow: var(--shadow-sm);
}

.time-label {
    font-family: var(--font-code);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-sage);
}

.event-chip {
    background: var(--color-sage-light);
    border-left: 4px solid var(--color-sage);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Eisenhower Matrix Module */
.eisenhower-matrix-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 850px) {
    .eisenhower-matrix-grid {
        grid-template-columns: 1fr;
    }
}

.quadrant-box {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.quadrant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-subtle);
}

.quadrant-tag {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.task-list-ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.task-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.task-item-card:hover {
    border-color: var(--color-sage);
}

.task-item-card.completed {
    text-decoration: line-through;
    opacity: 0.55;
    background: var(--bg-surface-elevated);
}

/* Cash Flow Module */
.cashflow-summary-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    background: linear-gradient(135deg, var(--bg-surface), var(--color-sage-light));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.tx-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.tx-table th, .tx-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.tx-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-surface-elevated);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.amount-income {
    color: #2E7D32;
    font-family: var(--font-code);
    font-weight: 700;
}

.amount-expense {
    color: var(--color-chestnut);
    font-family: var(--font-code);
    font-weight: 700;
}

/* Settings Module */
.settings-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 2.2rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

footer {
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    padding: 1.8rem;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-top: auto;
}
