/* ========== Base layout ========== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #0f172a;
    color: #e5e7eb;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* ========== Sidebar ========== */

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #020617, #0b1120);
    border-right: 1px solid #1f2937;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.logo-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: radial-gradient(circle, #22c55e, #16a34a);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
}

.logo-text {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #e5e7eb;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: auto;
}

.nav-link {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #9ca3af;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.nav-link:hover {
    background-color: #111827;
    color: #e5e7eb;
    transform: translateX(2px);
}

.nav-link.active {
    background: linear-gradient(90deg, #22c55e, #16a34a);
    color: #020617;
    font-weight: 600;
}

.sidebar-footer {
    margin-top: 24px;
    font-size: 0.7rem;
    color: #6b7280;
    line-height: 1.4;
}

/* ========== Main area ========== */

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Topbar */

.topbar {
    height: 64px;
    border-bottom: 1px solid #1f2937;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 55%);
}

.topbar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f9fafb;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background-color: #020617;
    border: 1px solid #1f2937;
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Content */

.content {
    padding: 22px 26px 32px;
}

/* ========== Cards & Grid ========== */

.grid {
    display: grid;
    gap: 18px;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 960px) {
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none; /* simple responsive hack for now */
    }
}

.card {
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.2), rgba(15, 23, 42, 0.95));
    border-radius: 14px;
    padding: 16px 18px 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.5);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #9ca3af;
}

.card-metric {
    font-size: 2.2rem;
    font-weight: 600;
    margin: 6px 0 2px;
    color: #f9fafb;
}

.card-label {
    font-size: 0.9rem;
    color: #9ca3af;
}

.card-body {
    font-size: 0.9rem;
    color: #d1d5db;
}

.muted {
    color: #6b7280;
    font-size: 0.85rem;
}

/* ========== Buttons ========== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn-primary {
    background: linear-gradient(90deg, #22c55e, #16a34a);
    color: #020617;
    box-shadow: 0 12px 25px rgba(34, 197, 94, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(34, 197, 94, 0.55);
}

.btn-secondary {
    background: #0f172a;
    border-color: #1f2937;
    color: #e5e7eb;
}

.btn-secondary:hover {
    background: #020617;
}

.btn-outline {
    background: transparent;
    border-color: #374151;
    color: #e5e7eb;
}

.btn-outline:hover {
    background: #111827;
}

.btn-full {
    width: 100%;
}

.buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ========== Spacing utils ========== */

.mt-lg {
    margin-top: 24px;
}

/* ========== Weekly calendar ========== */

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

@media (max-width: 960px) {
    .week-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.week-day {
    background-color: rgba(15, 23, 42, 0.9);
    border-radius: 10px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    padding: 8px 10px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
}

.week-day-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.week-day-name {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
}

.week-day-date {
    font-size: 0.8rem;
    color: #e5e7eb;
}

.week-day-body {
    flex: 1;
}

.shift-pill {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(8, 47, 73, 0.9));
    border-radius: 8px;
    padding: 4px 6px;
    margin-bottom: 4px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    font-size: 0.8rem;
}

.shift-pill strong {
    font-size: 0.85rem;
    color: #f9fafb;
}

.small {
    font-size: 0.76rem;
}
/* ========== Calendar grid ========== */

.calendar-grid-wrapper {
    margin-top: 8px;
}

/* Header row: time column + days */
.calendar-grid-header-row-with-times {
    display: grid;
    grid-template-columns: 60px repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 4px;
}

.calendar-time-header {
    /* left empty for now – could hold "Time" label later */
}

.calendar-day-header {
    text-align: center;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Main grid: time column + day columns */

.calendar-grid-with-times {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 8px;
}

.calendar-time-column {
    /* just a container for time labels */
}

.calendar-time-body {
    position: relative;
    height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calendar-time-label {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Day columns */

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

@media (max-width: 960px) {
    .calendar-grid-header-row-with-times {
        grid-template-columns: 50px repeat(3, minmax(0, 1fr));
    }

    .calendar-grid-with-times {
        grid-template-columns: 50px minmax(0, 1fr);
    }

    .calendar-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.calendar-day-column {
    background-color: rgba(15, 23, 42, 0.9);
    border-radius: 10px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    overflow: hidden;
}

.calendar-day-body {
    position: relative;
    height: 520px; /* vertical size of a day */
    background-image: linear-gradient(
        to bottom,
        rgba(31, 41, 55, 0.9) 1px,
        transparent 1px
    );
    /* background-size is now set inline per user based on time_segment_count */
}


/* Shift block */

.calendar-shift-block {
    position: absolute;
    border-radius: 8px;
    padding: 4px 6px;

    /* Less transparent, more solid background for readability */
    background: linear-gradient(
        135deg,
        rgba(34, 197, 94, 0.55),
        rgba(8, 47, 73, 0.98)
    );
    border: 1px solid rgba(148, 163, 184, 0.85);

    font-size: 0.8rem;
    overflow: hidden;
    text-decoration: none;
    color: #f9fafb; /* force bright text */
    display: block;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.12s ease;

    /* slight text shadow so it sits on dark background better */
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.9);

    left: 6%;
    width: 88%;
}


/* If there are multiple shifts in the same day, stagger them slightly */
.calendar-day-body .calendar-shift-block:nth-child(1) {
    left: 4%;
    z-index: 1;
}

.calendar-day-body .calendar-shift-block:nth-child(2) {
    left: 10%;
    z-index: 2;
}

.calendar-day-body .calendar-shift-block:nth-child(3) {
    left: 16%;
    z-index: 3;
}

/* Just in case there are 4+ in that day */
.calendar-day-body .calendar-shift-block:nth-child(4) {
    left: 22%;
    z-index: 4;
}


.calendar-shift-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.9);
}

.calendar-shift-title {
    font-weight: 600;
    color: #f9fafb;
    margin-bottom: 2px;
}

.calendar-shift-meta {
    color: #e5e7eb;
    font-size: 0.78rem;
}


.calendar-shift-location {
    color: #d1d5db;
    font-size: 0.75rem;
    margin-top: 1px;
}

.menu-button {
    display: none;
    padding: 10px 14px;
    font-weight: 600;
    background: #22c55e;
}
.menu-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.menu-card {
  display: block;
  padding: 16px;
  border-radius: 12px;
  text-decoration: none;   /* kill underline */
  font-weight: 700;

  background: #22c55e;     /* your green */
  color: #000;             /* black text */

  border: none;
}

.menu-card:visited {
  color: #000;             /* kill purple visited state */
}

.menu-card:hover {
  background: #16a34a;     /* darker green on hover */
  color: #000;
}


@media (max-width: 640px) {
  .menu-grid {
    grid-template-columns: 1fr;
  }
}

.btn-menu {
    background-color: #22c55e;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
}

.btn-menu:hover {
    background-color: #16a34a;
    color: #ffffff;
}

.btn-menu {
    background-color: #22c55e;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
}

.btn-menu:hover {
    background-color: #16a34a;
    color: #ffffff;
}
