:root {
    --navy: #0d1f4e;
    --royal: #1a3a8f;
    --sky: #2563eb;
    --lavender: #c084fc;
    --soft: #f0f4ff;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.12);
    --text: #1e293b;
    --muted: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --booked: #fca5a5;
    --available: #bbf7d0;
    --selected: #93c5fd;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: linear-gradient(145deg, #0d1f4e 0%, #1a3a8f 40%, #7c3aed 80%, #c084fc 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text);
}


/* ===== BLOB BACKGROUND ===== */
body::before {
  content: '';
  position: fixed;
  width: 65vw;
  height: 65vw;
  max-width: 700px;
  max-height: 700px;
  background: rgba(255, 255, 255, 0.055);
  border-radius: 62% 38% 46% 54% / 42% 58% 42% 58%;
  top: -15%;
  right: -10%;
  pointer-events: none;
  z-index: 0;
  animation: blobA 9s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  width: 50vw;
  height: 50vw;
  max-width: 550px;
  max-height: 550px;
  background: rgba(235, 235, 237, 0.058);
  border-radius: 48% 52% 38% 62% / 55% 45% 62% 38%;
  bottom: -10%;
  left: -8%;
  pointer-events: none;
  z-index: 0;
  animation: blobB 9s ease-in-out infinite alternate;
}

@keyframes blobA {
  0% {
    border-radius: 62% 38% 46% 54% / 42% 58% 42% 58%;
    transform: translate(0, 0) rotate(0deg);
  }

  100% {
    border-radius: 38% 62% 58% 42% / 55% 45% 58% 42%;
    transform: translate(30px, 50px) rotate(8deg);
  }
}

@keyframes blobB {
  0% {
    border-radius: 48% 52% 38% 62% / 55% 45% 62% 38%;
    transform: translate(0, 0) rotate(0deg);
  }

  100% {
    border-radius: 60% 40% 52% 48% / 40% 60% 40% 60%;
    transform: translate(-20px, -30px) rotate(-6deg);
  }
}
/* ── TOP BAR ── */
.bar {
    background: linear-gradient(90deg, #0a1a4a 0%, #11327a 50%, #0a1a4a 100%);
    color: white;
    padding: 10px 50px;
    display: flex;
    justify-content: flex-end;
    gap: 30px;
    font-size: 13px;
    border-bottom: 2px solid rgba(100, 160, 255, 0.4);
    box-shadow: 0 4px 18px rgba(0, 0, 80, 0.45);
    letter-spacing: 0.3px;
}

.bar a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bar img {
    height: 16px;
    filter: brightness(0) invert(1);
}

/* ── NAVBAR ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 50px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 36px;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: 0.2s;
}

.nav-links a:hover {
    color: #c084fc;
}

/* ── HERO TITLE ── */
.page-title {
    text-align: center;
    padding: 48px 20px 30px;
    color: white;
}

.page-title h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.page-title p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

/* ── MAIN LAYOUT ── */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* ── CARD BASE ── */
.card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 12px 40px rgba(0, 0, 30, 0.2);
    overflow: hidden;
}

/* ── SCHEDULE PANEL ── */


.panel-header {
    background: linear-gradient(135deg, var(--navy), var(--royal));
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.panel-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
}

.week-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.week-nav button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.week-nav button:hover {
    background: rgba(255, 255, 255, 0.28);
}

.week-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    min-width: 160px;
    text-align: center;
}

/* ── GRID ── */
.schedule-body {
    padding: 20px;
    overflow-x: auto;
}

.schedule-grid {
    display: grid;
    grid-template-columns: 60px repeat(6, 1fr);
    gap: 3px;
    min-width: 500px;
}

.grid-header {
    background: var(--soft);
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--royal);
    letter-spacing: 0.3px;
}

.grid-header.time-col {
    background: transparent;
}

.time-label {
    font-size: 11px;
    color: var(--muted);
    text-align: right;
    padding-right: 10px;
    padding-top: 8px;
    font-weight: 500;
}

.slot {
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    font-weight: 600;
    position: relative;
}

.slot.available {
    background: #dcfce7;
    color: #15803d;
}

.slot.available:hover {
    background: #bbf7d0;
    border-color: #4ade80;
    transform: scale(1.04);
}

.slot.booked {
    background: #fee2e2;
    color: #b91c1c;
    cursor: not-allowed;
}

.slot.selected {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1d4ed8;
    transform: scale(1.06);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.slot.past {
    background: #f1f5f9;
    color: #cbd5e1;
    cursor: not-allowed;
}

/* ── LEGEND ── */
.legend {
    display: flex;
    gap: 16px;
    padding: 12px 20px 16px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

/* ── FORM PANEL ── */


.form-inner {
    padding: 28px 24px;
}

.form-inner h3 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.form-inner .subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 22px;
}

.selected-slot-display {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #1d4ed8;
    font-weight: 600;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-slot-display.empty {
    color: var(--muted);
    font-weight: 400;
}

.input-group {
    margin-bottom: 14px;
}

.input-group label {
    display: block;
    font-weight: 600;
    font-size: 12.5px;
    color: var(--navy);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13.5px;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    outline: none;
    transition: 0.2s;
    background: #fafbff;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--sky);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--navy), var(--royal));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: 0.25s;
    margin-top: 4px;
    letter-spacing: 0.3px;
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--royal), var(--sky));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 58, 143, 0.35);
}

.submit-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* ── TOAST ── */
#toast {
    display: none;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    color: white;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

#toast.success {
    background: var(--success);
}

#toast.error {
    background: var(--danger);
}

@media (max-width: 460px) {
    .main-layout {
        grid-template-columns: 2fr;
    }
}

/* ── USER ICONS ── */
.user-icons {
    position: relative;
}
.user-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}
#menu {
    position: absolute;
    right: 0;
    top: 50px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 8px 0;
    min-width: 150px;
    z-index: 1100;
}
#menu li { padding: 0; }
#menu li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}
#menu li:hover { background: #f0f2f5; }

/* ── HAMBURGER BUTTON ── */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    z-index: 1001;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    transition: 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
    .bar { padding: 8px 16px !important; justify-content: center; flex-wrap: wrap; gap: 8px !important; font-size: 11px !important; }
    .navbar { position: relative !important; padding: 10px 16px !important; }
    .logo { order: 1; z-index: 2; }
    .hamburger { display: flex; order: 2; position: absolute; left: 50%; transform: translateX(-50%); z-index: 1002; }
    .user-icons { order: 3; z-index: 2; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        gap: 0 !important;
        padding: 8px 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
        z-index: 999;
        border-radius: 0 0 16px 16px;
    }
    .nav-links.open { display: flex !important; }
    .nav-links li { padding: 0 !important; width: 100%; }
    .nav-links a {
        display: block;
        padding: 13px 24px !important;
        color: #0a3d6d !important;
        font-size: 15px !important;
        border-bottom: 1px solid #f0f0f0;
        font-weight: 700;
    }
    .nav-links a:hover { background: #f0f7ff; }
    .main-layout { grid-template-columns: 1fr; }
}