/* Reset */

:root {
    --sidebar-width: clamp(175px, 12vw, 250px);
    --topbar-height: clamp(60px, 7vh, 90px);

    --bg-dark-1: #0f172a;
    --bg-dark-2: #1e293b;
    --bg-dark-3: #334155;

    --glass: rgba(0,0,0,0.35);
    --glass-soft: rgba(0,0,0,0.25);

    --border-soft: rgba(255,255,255,0.1);
}

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

/* Full page */

body {
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Loading Screen */

#loader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Spinner */

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255,255,255,0.2);
    border-top: 5px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Background Image */

#content {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: url('../images/background.jpg') center center/cover no-repeat;
}

/* Dark Overlay */

.overlay {
    min-height: 100dvh;

    display: flex;
    flex-direction: column;
}

/* Heading & Paragraph */

.welcome-section {
    flex: 1;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    color: white;
    text-align: center;
}

.welcome-section h1 {
    margin-bottom: 20px;
}

.overlay h1 {
    font-size: 4rem;
    font-weight: bold;
    margin: 0;
}

.overlay p {
    margin-top: 10px;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Login Field */

.login-container {
    width: 100%;
    max-width: 280px;
    margin: 0 auto 15px auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-container input {
    width: 100%;
    padding: 12px;

    background: #1e1e1e;

    border: 1px solid #333;
    border-radius: 8px;

    color: white;
}

.login-container input:hover {
    box-shadow: 
    0 0 10px #13cc19,
    0 0 20px #13cc19;
}

.login-container input:focus {
    outline: none;
    
    box-shadow:
        0 0 10px #b10ad7,
        0 0 20px #b10ad7;
}

.login-container button {
    padding: 12px;

    border: none;
    border-radius: 8px;

    background: #14e705;
    color: white;

    cursor: pointer;
}

.login-container button:hover {
    background: #11b405
}

/* Logout Button */

.logout-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px 24px;
    background: #c0392b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;

    z-index: 1000;
}

.logout-btn:hover {
    opacity: 0.85;
}

/* Top Bar */

.page-topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--topbar-height);

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    padding: 0 20px;

    background: #0f172a;
    border-bottom: 1px solid rgba(255,255,255,0.1);

    z-index: 1000;
}

.page-topbar h1 {
    justify-self: center;
    margin: 0;
    color: white;
}

.topbar-status {
    justify-self: start;

    display: flex;
    align-items: center;
    gap: 10px;

    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

#topbar-clock,
#topbar-weather,
.topbar-divider {
    color: white !important;
    font-size: clamp(1rem, 1.2vw, 1.5rem);
    font-weight: bold;
}

.topbar-divider {
    opacity: 0.5;
}

#topbar-weather {
    white-space: nowrap;
}

/* Dashboard Layout */

.dashboard-page {
    min-height: 100dvh;

    background: linear-gradient(
        135deg,
        var(--bg-dark-1),
        var(--bg-dark-2),
        var(--bg-dark-3)
    );
}

.dashboard-container {
    max-width: 1100px; /* or 900px if you prefer tighter */
    margin: 0 auto;
    padding: clamp(20px, 2vw, 40px);
    color: white;
}

.wip-container {
    margin-left: 250px !important;
    margin-right: auto !important;
    padding-left: 0;
    padding-right: 0;
}

.wip-container p {
    max-width: 800px;
    line-height: 1.6;
    margin-left: 0;
    margin-right: auto;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 20px;

    display: flex;
    justify-content: center;

    margin-bottom: 20px;
}

/* Dashboard Cards */

.dashboard-cards {
    margin-top: 40px;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.dashboard-card {
    width: 250px;
    padding: 25px;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    color: white;
    background: rgba(255,255,255,0.15);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    transition: 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.2);
    box-shadow: 0 0 20px rgba(255,255,255,0.15);
}

/* Card Text */

.dashboard-card h3 {
    margin-bottom: 10px;
}

.dashboard-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Left Sidebar */

.navbar {
    background: var(--glass);
    border-right: 1px solid var(--border-soft);
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100dvh - var(--topbar-height));

    display: flex;
    flex-direction: column;
    padding-top: 40px;
}
.menu-toggle {
    display: none;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 15px 25px;
    transition: 0.3s;
}

.navbar a:hover{
    background: rgba(255,255,255,0.1);
    padding-left: 35px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: rgba(0,0,0,0.5);
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 8px;
        cursor: pointer;
    }

    .navbar {
        position: fixed;
        top: 70px;
        left: -250px;
        width: 240px;
        height: 100dvh;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .navbar.show {
        left: 0;
    }
layout
    .dashboard-container {
        margin-left: 0;
    }

    .page-topbar {
        left: 0;
        width: 100%;
    }

    .dashboard-page {
    margin-left: 0;
    }

    .page-content {
        margin-left: 0;
    }

}

/* =========================
   CALENDAR LAYOUT WRAPPER
   ========================= */

.calendar-layout {
    display: flex;
    gap: 2vw;
    align-items: center;
    justify-content: center; /* centers the whole layout */
}

/* Main calendar container */

.calendar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.calendar-controls {
    text-align: center;
    margin-bottom: 30px;

    width: 100%;
    margin-left: 0;
}

.calendar-controls form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.calendar-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;

    margin-top: 15px;
}

/* Event Category Dropdown */

.calendar-controls form select {
    min-height: 44px;
    padding: 12px 15px;

    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);

    background: rgba(255,255,255,0.08);
    color: white;

    cursor: pointer;

    transition: all 0.2s ease;
}

.calendar-controls form select:focus {
    outline: none;

    border-color: #b10ad7;

    box-shadow:
        0 0 10px rgba(177,10,215,0.4);
}

.calendar-controls form option {
    background: #1e293b;
    color: white;
}

/* Create Event button */

.calendar-controls form button {
    min-height: 44px;
    padding: 12px 24px;

    border: none;
    border-radius: 10px;

    background: #b10ad7;
    color: white;

    font-weight: 600;
    cursor: pointer;

    box-shadow:
        0 0 10px rgba(177,10,215,0.25);

    transition: all 0.2s ease;
}

.calendar-controls form button:hover {
    background: #c21ee6;

    transform: translateY(-2px);

    box-shadow:
        0 0 15px rgba(177,10,215,0.5);
}

.calendar-controls form button:active {
    transform: translateY(0);
}

/* Event Title and Date fields */

.calendar-controls form input {
    min-height: 44px;
    padding: 12px 15px;

    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);

    background: rgba(255,255,255,0.08);
    color: white;

    transition: all 0.2s ease;
}

/* Base button style */
.calendar-nav button {
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;

    background: rgba(255,255,255,0.08);
    color: white;

    cursor: pointer;

    transition: all 0.2s ease;
    font-weight: 600;
}

.calendar-controls form input:focus {
    outline: none;

    border-color: #b10ad7;

    box-shadow:
        0 0 10px rgba(177,10,215,0.4);
}

/* Hover effect */
.calendar-nav button:hover {
    background: rgba(255,255,255,0.18);
    transform: translateY(-2px);
}

/* Active click feel */
.calendar-nav button:active {
    transform: translateY(0px);
}

/* Make "Today" stand out */
.calendar-nav button:nth-child(2) {
    background: #b10ad7;
    color: black;
    border: none;
}

.calendar-nav button:nth-child(2):hover {
    background: #b10ad7;
}

.event-form-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);

    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;

    padding: 20px;

    width: fit-content;
    margin: 20px auto;
}

/* =========================
   CALENDAR GRID
   ========================= */

/* ONLY the days grid (not header) */
#calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    min-height: 200px;
}

/* Weekday header */
.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

/* Each day cell */
.calendar-day {
    min-height: 8vh;
    padding: 10px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    background: rgba(255,255,255,0.1);
    border-radius: 8px;
}

/* Day number */
.calendar-day strong {
    margin-bottom: 5px;
}

/* Today highlight */
.today {
    background: #b10ad7 !important;
    color: black;
    font-weight: bold;
}

/* =========================
   EVENT DOT (FIXED)
   ========================= */

.event-dot {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
}

.event-dot {
    font-size: 20px;
}

.event-dot.birthday {
    background: #ff69b4;
}

.event-dot.work {
    background: #3498db;
}

.event-dot.holiday {
    background: #2ecc71;
}

/* =========================
   DELETE BUTTON
   ========================= */

.delete-event-btn {
    margin-top: 6px;
    padding: 2px 8px;

    border: none;
    border-radius: 4px;

    background: #c0392b;
    color: white;

    cursor: pointer;
}

.delete-event-btn:hover {
    background: #a93226;
}

/* =========================
   SIDEBAR
   ========================= */

.event-sidebar {
    width: 18vw;
    min-width: 260px;
    max-width: 350px;

    background: rgba(255,255,255,0.1);
    border-radius: 12px;

    padding: 20px;
    color: white;
}

.event-sidebar h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;

    border-bottom: 2px solid rgba(255,255,255,0.3);
}

.sidebar-event {
    margin-bottom: 15px;
    padding-bottom: 10px;

    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Page Content */

.dashboard-page {
    padding-top: var(--topbar-height);
}

#last-updated {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 15px;
    text-align: center;
}

/* Garage */

.garage-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;

    justify-content: center;

    margin-top: 30px;
}

.garage-card {
    width: 250px;
    padding: 25px;
    text-align: center;
    background: rgba(255,255,255,0.15);
    border-radius: 16px;
    backdrop-filter: blur(8px);

    text-decoration: none;
    color: white;
    transition: 0.3s ease;
}

.garage-card:hover {
    transform: translateY(-5px);

    background: rgba(255,255,255,0.2);

    box-shadow: 0 0 20px rgba(255,255,255,0.15);
}

.profile-card {
    max-width: 600px;
    margin: 25px auto;
    padding: 25px;
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    color: white;
}

.profile-card h3 {
    margin-bottom: 15px;
}

.garage-back-btn {
    display: inline-block;

    margin-top: 20px;

    padding: 10px 16px;

    background: #b10ad7;

    color: white;

    text-decoration: none;

    border-radius: 10px;
}

.vehicle-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;

    margin-top: 15px;
}

.vehicle-card {
    min-width: 220px;

    padding: 15px;

    background: rgba(255,255,255,0.08);

    border-radius: 12px;

    color: white;
}

.vehicle-card h4 {
    margin-bottom: 8px;
}

/* =========================
   VEHICLE PAGE
   ========================= */

.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 10px 16px;

    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);

    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;

    margin-bottom: 20px;

    font-size: 0.9rem;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: 0.2s ease;
}

.breadcrumb a:hover {
    color: #b10ad7;
}

.breadcrumb span {
    opacity: 0.5;
}

.vehicle-header {
    background: rgba(255,255,255,0.08);

    border-radius: 16px;
    padding: 20px;

    margin-bottom: 25px;
}

.vehicle-sections {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 20px;
}

.vehicle-section {
    background: rgba(255,255,255,0.08);

    border-radius: 16px;

    padding: 20px;
}

.vehicle-section h3 {
    margin-bottom: 10px;
}

.vehicle-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;

    margin-top: 15px;
}

.vehicle-form input {
    padding: 12px;

    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);

    background: rgba(255,255,255,0.08);
    color: white;
}

.vehicle-form button {
    padding: 12px 20px;

    border: none;
    border-radius: 10px;

    background: #b10ad7;
    color: white;

    cursor: pointer;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.delete-vehicle-btn {
    margin-top: 15px;

    padding: 10px 18px;

    border: none;
    border-radius: 10px;

    background: #c0392b;
    color: white;

    cursor: pointer;

    font-weight: bold;

    transition: 0.2s ease;
}

.delete-vehicle-btn:hover {
    background: #a93226;

    transform: translateY(-2px);
}

.vehicle-hero {
    margin-bottom: 25px;

    border-radius: 16px;
    overflow: hidden;

    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.vehicle-hero img {
    width: 100%;
    height: 40vh;

    object-fit: cover;
    object-position: center;

    display: block;
}

/* =========================
   VEHICLE NOTES
   ========================= */

.vehicle-notes-form,
.vehicle-mods-form {
    margin-top: 20px;
}

.vehicle-notes-form textarea,
.vehicle-mods-form textarea {
    width: 100%;

    min-height: 100px;

    padding: 15px;

    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);

    background: rgba(255,255,255,0.08);
    color: white;

    resize: vertical;
}

.vehicle-notes-form textarea:focus,
.vehicle-mods-form textarea:focus {
    outline: none;

    border-color: #b10ad7;

    box-shadow:
        0 0 10px rgba(177,10,215,0.4);
}

.vehicle-notes-form button,
.vehicle-mods-form button {
    margin-top: 10px;

    padding: 12px 20px;

    border: none;
    border-radius: 10px;

    background: #b10ad7;
    color: white;

    cursor: pointer;
}

.vehicle-grid-layout {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 20px;

    margin-top: 25px;
}

.vehicle-section {
    background: rgba(255,255,255,0.08);

    border: 1px solid rgba(255,255,255,0.1);

    border-radius: 16px;

    padding: 20px;
}