/*  Wedding Dashboard V3 - Elegant Teal Wedding Planner
    Main: Teal #407E8C background
    Accents: Deep Blue #0834AF, Seafoam #C0D5D6, Tan #A58D76, Ivory #E5E1DD
    Font: Cormorant Garamond (elegant serif, similar to Seasons)
    Style: Minimal, elegant, wedding invitation aesthetic
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Lato:wght@300;400&display=swap');

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

:root {
    --teal: #407E8C;
    --deep-blue: #0834AF;
    --seafoam: #C0D5D6;
    --tan: #A58D76;
    --ivory: #E5E1DD;
    --white: #FFFFFF;
    --text-light: rgba(255, 255, 255, 0.95);
    --text-muted: rgba(255, 255, 255, 0.7);

    --font-elegant: 'Cormorant Garamond', serif;
    --font-body: 'Lato', sans-serif;
}

body {
    font-family: var(--font-body);
    background: var(--teal);
    min-height: 100vh;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== HEADER ===== */
header {
    padding: 2rem 3rem;
    text-align: center;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    font-family: var(--font-elegant);
    font-size: 3.5rem;
    color: var(--ivory);
    margin-bottom: 0.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    font-style: italic;
}

#countdown {
    font-family: var(--font-elegant);
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 1px;
}

.btn-logout {
    position: absolute;
    top: 2rem;
    right: 3rem;
    padding: 0.5rem 1.25rem;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-elegant);
    font-size: 0.95rem;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ===== NAVIGATION ===== */
nav {
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: center;
    gap: 3rem;
    background: transparent;
}

.nav-btn {
    padding: 0.5rem 0;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-elegant);
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 2px;
    transition: all 0.3s;
    position: relative;
    border-bottom: 2px solid transparent;
}

.nav-btn:hover {
    color: var(--text-light);
}

.nav-btn.active {
    color: var(--ivory);
    border-bottom-color: var(--ivory);
}

/* ===== MAIN CONTAINER ===== */
main {
    max-width: 100%;
    padding: 2rem 3rem;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* ===== TIMELINE VIEW (Custom Gantt) ===== */
#timeline-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 2rem;
    overflow-x: auto;
}

.timeline-header {
    display: flex;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    padding-top: 3.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.timeline-labels {
    width: 250px;
    flex-shrink: 0;
}

.timeline-chart {
    flex: 1;
    position: relative;
    min-width: 1600px; /* Doubled for better granularity */
}

/* Timeline grid */
.timeline-months {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.timeline-month {
    flex: 1;
    text-align: center;
    font-family: var(--font-elegant);
    font-size: 0.95rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* Date grid lines */
.date-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.date-grid-line {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
}

.date-grid-label {
    position: absolute;
    top: 0.5rem;
    left: 2px;
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    transform: rotate(-45deg);
    transform-origin: left top;
}

/* Milestone markers */
.milestone-marker {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--ivory);
    opacity: 0.6;
    z-index: 10;
}

.milestone-marker::before {
    content: '◆';
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--ivory);
    font-size: 1.2rem;
}

.milestone-label {
    position: absolute;
    top: -2.8rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-elegant);
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    letter-spacing: 1px;
}

/* Swimlanes */
.swimlane {
    margin-bottom: 0.5rem;
}

.swimlane-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    cursor: pointer;
    transition: all 0.2s;
}

.swimlane-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.swimlane-toggle {
    width: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.swimlane.collapsed .swimlane-toggle {
    transform: rotate(-90deg);
}

.swimlane-title {
    flex: 1;
    font-family: var(--font-elegant);
    font-size: 1.2rem;
    color: var(--ivory);
    font-weight: 400;
    letter-spacing: 1.5px;
}

.swimlane-chart {
    position: relative;
    min-height: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Task rows (Beam, Brick, Tile) */
.task-row {
    display: flex;
    align-items: center;
    min-height: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

/* Level indentation and colors */
.task-row.level-2 {
    padding-left: 1rem;
    background: rgba(8, 52, 175, 0.08); /* Deep blue tint */
}

.task-row.level-3 {
    padding-left: 2.5rem;
    background: rgba(192, 213, 214, 0.08); /* Seafoam tint */
}

.task-row.level-4 {
    padding-left: 4rem;
    background: rgba(165, 141, 118, 0.08); /* Tan tint */
}

/* Level name colors */
.task-row.level-2 .task-level-name { color: var(--deep-blue); }
.task-row.level-3 .task-level-name { color: var(--seafoam); }
.task-row.level-4 .task-level-name { color: var(--tan); }

/* Owner color coding - left border */
.task-row[data-owner="Walt"] {
    border-left: 3px solid var(--deep-blue);
}

.task-row[data-owner="Sthuthi"] {
    border-left: 3px solid var(--seafoam);
}

.task-label {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.task-level-name {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 50px;
}

.task-title {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-light);
}

.task-chart {
    flex: 1;
    position: relative;
    height: 28px;
}

/* Task bars */
.task-bar {
    position: absolute;
    height: 20px;
    top: 4px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
}

.task-bar:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: var(--ivory);
}

.task-bar.completed {
    background: rgba(128, 128, 128, 0.3);
    border-color: rgba(128, 128, 128, 0.5);
    opacity: 0.6;
    text-decoration: line-through;
}

.task-bar.in_progress {
    background: rgba(165, 141, 118, 0.3);
    border-color: var(--tan);
}

.task-row.completed .task-title {
    opacity: 0.5;
    text-decoration: line-through;
}

/* Add row button */
.add-row-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.75rem;
    transition: all 0.2s;
    margin-left: 0.5rem;
}

.add-row-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ===== BUDGET VIEW ===== */
#budget-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.budget-stat {
    background: rgba(255, 255, 255, 0.08);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.budget-stat h3 {
    font-family: var(--font-elegant);
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.budget-stat p {
    font-size: 2rem;
    color: var(--ivory);
    font-weight: 300;
}

#budget-list {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 2rem;
}

.budget-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s;
}

.budget-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.budget-item h4 {
    font-family: var(--font-elegant);
    font-size: 1.1rem;
    color: var(--ivory);
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.budget-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--teal);
    padding: 2.5rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.close {
    float: right;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: var(--ivory);
}

.modal-content h2 {
    font-family: var(--font-elegant);
    font-size: 2rem;
    color: var(--ivory);
    margin-bottom: 1.5rem;
    font-weight: 300;
    letter-spacing: 1.5px;
}

.modal-content label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-light);
    transition: all 0.2s;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--ivory);
}

/* Fix dropdown option colors - dark text on light background */
.modal-content select option {
    background: white;
    color: #333;
    padding: 0.5rem;
}

.modal-content textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary {
    flex: 1;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    color: var(--ivory);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-elegant);
    font-size: 1.1rem;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: var(--ivory);
}

.btn-secondary {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-elegant);
    font-size: 1.1rem;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    nav {
        gap: 2rem;
    }

    .timeline-labels {
        width: 150px;
    }

    .task-label {
        width: 150px;
    }

    main {
        padding: 1rem;
    }
}

/* ===== UTILITY ===== */
.hidden {
    display: none !important;
}
