
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --background: #101923;
    --panel: #1b2734;
    --panel-light: #243342;
    --text: #f5f7fa;
    --muted: #9baaba;
    --accent: #e8c99c;
    --border: rgba(255,255,255,0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
}

.dashboard {
    width: 100%;
    max-width: 1920px;
    min-height: 100vh;
    margin: auto;
    padding: 26px 34px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* HERO */

.hero {
    position: relative;
    min-height: 420px;
    flex: 1.2;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 34px 42px;
    background: #263b48;
}

.hero-photo {
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1511895426328-dc8714191300?w=1920&auto=format&fit=crop&q=85');
    background-position: center 45%;
    background-size: cover;
    transform: scale(1.01);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8,17,25,.82), rgba(8,17,25,.25) 70%),
        linear-gradient(0deg, rgba(8,17,25,.75), transparent 75%);
}

.hero-top,
.hero-bottom {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.brand {
    display: flex;
    gap: 13px;
    align-items: center;
}

.brand-icon {
    font-size: 38px;
    color: var(--accent);
}

.brand-name {
    font-family: 'Manrope', sans-serif;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 3px;
}

.brand-subtitle {
    font-size: 10px;
    color: #d0d9e1;
    letter-spacing: 2px;
    margin-top: 3px;
}

.weather-current {
    display: flex;
    gap: 14px;
    align-items: center;
    background: rgba(12,23,32,.45);
    backdrop-filter: blur(12px);
    padding: 13px 20px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 18px;
}

.weather-icon {
    font-size: 38px;
}

.current-temp {
    font-family: 'Manrope', sans-serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
}

.current-condition {
    font-size: 12px;
    margin-top: 5px;
}

.current-location {
    color: #c0cbd4;
    font-size: 11px;
    margin-top: 3px;
}

.hero-bottom {
    align-items: flex-end;
}

.hero-clock #clock {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(68px, 7vw, 112px);
    line-height: 1;
    font-weight: 600;
    letter-spacing: -5px;
}

#date {
    font-size: 19px;
    color: #e0e7ec;
    margin-top: 12px;
}

.next-event {
    background: rgba(12,23,32,.57);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.13);
    padding: 21px 25px;
    border-radius: 18px;
    min-width: 270px;
    max-width: 370px;
}

.eyebrow {
    color: var(--accent);
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 700;
}

.next-event-title {
    font-family: 'Manrope', sans-serif;
    font-size: 23px;
    font-weight: 700;
    margin-top: 9px;
}

.next-event-date {
    color: #d0d9e1;
    font-size: 13px;
    margin-top: 6px;
}

/* COUNTDOWN */

.countdown-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(110deg, #344b5b, #243746);
    padding: 19px 30px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.countdown-title {
    font-family: 'Manrope', sans-serif;
    font-size: 21px;
    font-weight: 700;
    margin-top: 5px;
}

.countdown-subtitle {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.countdown-numbers {
    display: flex;
    gap: 30px;
    text-align: center;
}

.count-unit {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.count-unit span {
    font-family: 'Manrope', sans-serif;
    font-size: 31px;
    font-weight: 700;
}

.count-unit small {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 1px;
}

/* LOWER PANELS */

.information-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr .8fr;
    gap: 18px;
    flex: 1;
    min-height: 290px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 17px;
}

.panel-heading h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 19px;
    margin: 5px 0 0;
}

.panel-icon {
    font-size: 24px;
    color: var(--accent);
}

.loading {
    color: var(--muted);
    font-size: 13px;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event {
    display: flex;
    align-items: center;
    gap: 12px;
}

.event-date {
    background: var(--panel-light);
    width: 48px;
    min-width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.event-date strong {
    font-size: 17px;
}

.event-date small {
    font-size: 8px;
    color: var(--muted);
}

.event-info {
    min-width: 0;
}

.event-info strong {
    font-size: 13px;
    display: block;
}

.event-info small {
    color: var(--muted);
    font-size: 11px;
    display: block;
    margin-top: 4px;
}

.event-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.panel-footer {
    margin-top: auto;
    padding-top: 15px;
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 1.5px;
}

/* FORECAST */

.forecast-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.forecast-day {
    display: grid;
    grid-template-columns: 1fr 35px 1fr 1fr;
    align-items: center;
    gap: 9px;
    font-size: 12px;
}

.forecast-day .day-name {
    color: #dce4eb;
}

.forecast-day .forecast-icon {
    font-size: 20px;
    text-align: center;
}

.forecast-day .rain {
    color: #9bc9e7;
    text-align: center;
    font-size: 10px;
}

.forecast-day .temperatures {
    text-align: right;
    font-weight: 600;
}

.forecast-day .temperatures span {
    color: var(--muted);
    font-weight: 400;
    margin-left: 5px;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: auto;
    padding-top: 17px;
}

.weather-details div {
    background: var(--panel-light);
    border-radius: 11px;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.weather-details div span {
    font-size: 16px;
}

.weather-details small {
    color: var(--muted);
    font-size: 8px;
    letter-spacing: 1px;
}

.weather-details strong {
    font-size: 12px;
}

/* RIDE */

.ride-status {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 17px;
    border-radius: 15px;
    background: var(--panel-light);
    margin-top: 7px;
}

.ride-status-icon {
    font-size: 30px;
}

.ride-status-text {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 16px;
}

.ride-description {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    margin-top: 15px;
}

.ride-footer {
    margin-top: auto;
    color: var(--accent);
    font-size: 9px;
    letter-spacing: 1px;
    line-height: 1.6;
}

/* FOOTER */

.dashboard-footer {
    display: flex;
    justify-content: space-between;
    color: #758696;
    font-size: 9px;
    letter-spacing: 1.5px;
    padding: 3px 5px;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .dashboard {
        padding: 14px;
        gap: 12px;
    }

    .hero {
        min-height: 350px;
        padding: 24px;
    }

    .information-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ride-panel {
        grid-column: span 2;
        min-height: 180px;
    }
}

@media (max-width: 600px) {
    .hero {
        min-height: 430px;
        padding: 20px;
    }

    .hero-top {
        flex-wrap: wrap;
        gap: 20px;
    }

    .hero-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .hero-clock #clock {
        font-size: 68px;
    }

    .next-event {
        width: 100%;
        max-width: none;
    }

    .countdown-panel {
        flex-direction: column;
        align-items: flex-start;
        gap: 17px;
    }

    .countdown-numbers {
        width: 100%;
        justify-content: space-around;
    }

    .information-grid {
        grid-template-columns: 1fr;
    }

    .ride-panel {
        grid-column: auto;
    }

    .dashboard-footer {
        font-size: 8px;
    }
}

/* ==========================================
   VERSION 1.1 - PHOTO LED FAMILY LAYOUT
   ========================================== */

@media (min-width: 901px) {

    html, body {
        height: 100%;
        overflow: hidden;
    }

    .dashboard {
        height: 100vh;
        min-height: 0;
        overflow: hidden;
        padding: 22px 30px 14px;
        gap: 14px;
    }

    /* Give the family photograph much more space */
    .hero {
        flex: 1.25 1 0;
        min-height: 0;
        padding: 30px 38px;
    }

    /* Smaller, more elegant countdown */
    .countdown-panel {
        flex: 0 0 auto;
        padding: 10px 24px;
        border-radius: 15px;
    }

    .countdown-title {
        font-size: 16px;
        margin-top: 3px;
    }

    .countdown-subtitle {
        font-size: 11px;
    }

    .countdown-numbers {
        gap: 23px;
    }

    .count-unit span {
        font-size: 23px;
    }

    .count-unit small {
        font-size: 8px;
    }

    /* Two-column layout */
    .information-grid {
        flex: 1 1 0;
        min-height: 0;
        grid-template-columns: 1.3fr 0.85fr;
        gap: 14px;
    }

    /* More generous calendar space */
    .calendar-panel {
        padding: 25px 28px;
    }

    .calendar-panel .calendar-events {
        gap: 15px;
    }

    .calendar-panel .event-date {
        width: 55px;
        min-width: 55px;
        height: 55px;
    }

    .calendar-panel .event-info strong {
        font-size: 15px;
    }

    .calendar-panel .event-info small {
        font-size: 12px;
    }

    /* More compact weather */
    .forecast-panel {
        padding: 18px 22px;
    }

    .forecast-panel .panel-heading {
        margin-bottom: 10px;
    }

    .forecast-panel .forecast-list {
        gap: 7px;
    }

    .forecast-panel .forecast-day {
        font-size: 11px;
    }

    .forecast-panel .forecast-icon {
        font-size: 17px;
    }

    .forecast-panel .weather-details {
        padding-top: 10px;
    }

    .forecast-panel .weather-details div {
        padding: 7px 4px;
    }

    .dashboard-footer {
        flex: 0 0 auto;
    }
}

/* VERSION 1.2 - COMPACT COUNTDOWN */

.countdown-panel {
    flex: 0 0 auto;
    min-height: 0;
    padding: 7px 20px;
    border-radius: 12px;
    gap: 12px;
}

.countdown-title {
    font-size: 13px;
    margin-top: 2px;
}

.countdown-subtitle {
    font-size: 10px;
    margin-top: 1px;
}

.countdown-panel .eyebrow {
    font-size: 8px;
}

.countdown-numbers {
    gap: 17px;
}

.count-unit {
    gap: 0;
}

.count-unit span {
    font-size: 17px;
    line-height: 1.2;
}

.count-unit small {
    font-size: 7px;
}

@media (max-width: 600px) {
    .countdown-panel {
        flex-direction: row;
        align-items: center;
    }

    .countdown-numbers {
        width: auto;
        justify-content: flex-end;
    }
}
/* COUNTDOWN - HALF WIDTH, ORIGINAL FONT SIZE */

.countdown-panel {
    flex: 0 0 auto;
    width: 50%;
    max-width: 650px;
    min-height: 0;
    padding: 10px 20px;
    margin: 12px auto;
    border-radius: 12px;
    gap: 12px;
}

.countdown-title {
    font-size: 18px;
}

.countdown-subtitle {
    font-size: 13px;
}

.countdown-panel .eyebrow {
    font-size: 10px;
}

.countdown-numbers {
    gap: 20px;
}

.count-unit span {
    font-size: 28px;
    line-height: 1.2;
}

.count-unit small {
    font-size: 10px;
}

@media (max-width: 900px) {
    .countdown-panel {
        width: 90%;
        max-width: none;
    }
}

/* TWO-WEEK FAMILY CALENDAR */

.calendar-panel {
    min-width: 0;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calendar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.calendar-toolbar strong {
    font-size: 16px;
}

.calendar-toolbar span {
    font-size: 9px;
    letter-spacing: 1px;
    opacity: 0.65;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
}

.calendar-weekday {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    opacity: 0.65;
    padding: 5px 0;
}

.calendar-day {
    min-height: 105px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.07);
    overflow: hidden;
}

.calendar-day.weekend {
    background: rgba(255,255,255,0.075);
}

.calendar-day.today {
    border: 2px solid #d6b477;
    background: rgba(214,180,119,0.13);
}

.calendar-day-number {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
}

.calendar-day.today .calendar-day-number {
    color: #e6c58e;
}

.calendar-day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-event-item {
    border-left: 3px solid;
    background: rgba(255,255,255,0.07);
    border-radius: 3px;
    padding: 4px 5px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.calendar-event-item strong {
    font-size: 10px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.calendar-event-item small {
    font-size: 9px;
    opacity: 0.7;
}

@media (max-width: 900px) {
    .calendar-day {
        min-height: 75px;
        padding: 5px;
    }

    .calendar-day-number {
        font-size: 14px;
    }

    .calendar-event-item strong {
        font-size: 8px;
    }
}

/* ========================================
   TWO-WEEK FAMILY CALENDAR
   ======================================== */

.calendar-events {
    width: 100%;
}

/* Sunday-Saturday headings */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
    margin-bottom: 6px;
}

.calendar-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.08em;
}

/* 14-day area: exactly 7 columns x 2 rows */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
}

/* Individual day */
.calendar-day {
    min-width: 0;
    min-height: 92px;
    padding: 7px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

/* Today's date */
.calendar-day.today {
    background: rgba(145, 185, 217, 0.14);
    border-color: rgba(145, 185, 217, 0.65);
}

/* Date number */
.calendar-day-number {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 5px;
}

.calendar-day.today .calendar-day-number {
    color: #ffffff;
}

/* Event inside a day */
.calendar-event-item {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    min-width: 0;
    margin-top: 4px;
    padding: 4px 5px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.055);
}

.calendar-event-dot {
    width: 7px;
    height: 7px;
    min-width: 7px;
    border-radius: 50%;
    margin-top: 3px;
}

.calendar-event-item > div {
    min-width: 0;
    overflow: hidden;
}

.calendar-event-item strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.92);
}

.calendar-event-item small {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    line-height: 1.1;
    color: rgba(255, 255, 255, 0.55);
}

/* Smaller screens */
@media (max-width: 900px) {
    .calendar-day {
        min-height: 75px;
        padding: 5px;
    }

    .calendar-day-number {
        font-size: 14px;
    }

    .calendar-event-item strong {
        font-size: 8px;
    }
}

/* ========================================
   CALENDAR HEIGHT FIX - TABLET DASHBOARD
   ======================================== */

.calendar-panel {
    overflow: hidden;
}

.calendar-panel .calendar-events {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.calendar-panel .calendar-weekdays {
    flex: 0 0 auto;
    margin-bottom: 4px;
}

.calendar-panel .calendar-grid {
    grid-template-rows: repeat(2, 1fr);
    gap: 5px;
    min-height: 0;
}

.calendar-panel .calendar-day {
    min-height: 64px;
    height: 64px;
    padding: 5px 6px;
}

.calendar-panel .calendar-day-number {
    font-size: 12px;
    line-height: 1;
    margin-bottom: 3px;
}

.calendar-panel .calendar-event-item {
    margin-top: 2px;
    padding: 3px 4px;
    gap: 4px;
}

.calendar-panel .calendar-event-item strong {
    font-size: 8px;
    line-height: 1.1;
}

.calendar-panel .calendar-event-item small {
    font-size: 7px;
    line-height: 1;
    margin-top: 1px;
}

.calendar-panel .calendar-event-dot {
    width: 5px;
    height: 5px;
    min-width: 5px;
    margin-top: 2px;
}

/* Give removed calendar heading space to the calendar */

.calendar-panel .calendar-events {
    margin-top: 0;
}

.calendar-panel .calendar-day {
    height: 78px;
    min-height: 78px;
}