:root{
  --bg: #0b0f12;
  --card: #0f1720;
  --surface: #0d1316;
  --text: #e6eef6;
  --muted: #94a3b8;
  --accent: #7c3aed; /* purple accent */
  --accent-2: #5a2ed6;
  --success: #16a34a; /* green for success toasts */
  --radius: 10px;
}

*{ box-sizing: border-box; }
body{
  background: linear-gradient(180deg,#071018 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  margin:0;
}

.card{ background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border: none; border-radius: var(--radius); padding: 1rem; }

.btn-accent{ background: linear-gradient(90deg, var(--accent), #5a2ed6); color: white; border: none; border-radius: 8px; }
.btn-outline-accent{ border-color: var(--accent); color: var(--accent); background: transparent; border-radius: 8px; }

.navbar{ background: rgba(255,255,255,0.02) !important; border-bottom: 1px solid rgba(255,255,255,0.03); }

.container{ max-width: 1100px; }

.calendar-grid{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  align-items: start;
}

.calendar-cell{
  background: linear-gradient(180deg,#071018 0%, #081421 100%);
  border-radius: 8px;
  height: 120px; /* fixed height */
  min-height: 120px;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transition: transform .08s ease, box-shadow .08s ease;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.calendar-cell .date-num{ font-weight: 700; color: var(--muted); font-size: 0.95rem; }

.calendar-cell .res-list{
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 12px;
  display: flex;
  gap: 6px;
  pointer-events: none; /* container doesn't catch clicks, pills do */
  max-height: 40%;
  overflow: hidden;
  align-items: flex-start; /* anchor pills a bit above center */
}

.reservation-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(90deg,var(--accent), #5a2ed6);
  color: white;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  margin-top:0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: auto;
  position: relative;
  box-shadow: 0 4px 8px rgba(0,0,0,0.35);
  height: 26px;
  line-height: 26px;
}

.reservation-pill.more-pill{ background: rgba(255,255,255,0.03); color: var(--muted); }

/* ensure bars are consistent and single-colored */
.reservation-bar{ background: var(--accent); }

/* remove hover animation for bars */
.reservation-bar:hover{ transform: none; }

/* ensure other-month pills are muted and pointer-events none */
.calendar-cell.other-month .reservation-pill{ opacity: 0.6; background: rgba(255,255,255,0.03); color: var(--muted); pointer-events: none; }

.calendar-cell.other-month{
  opacity: 0.45;
  filter: grayscale(0.3);
  pointer-events: none; /* disable clicks */
  background: linear-gradient(180deg,#061018 0%, #07121a 100%);
}

.calendar-cell.other-month .date-num{ color: #7b8a99; }

.calendar-cell.in-month:hover{ transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.6); }

/* ensure no hover for other-month */
.calendar-cell.other-month:hover{ transform: none; box-shadow: none; }

/* delete icon inside bar for admins */
.reservation-bar-del{
  background: rgba(255,255,255,0.95);
  color: #222;
  border-radius: 4px;
  width: 18px;
  height: 18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  position:absolute;
  right:6px;
  top:4px;
  cursor:pointer;
  z-index:60;
}

/* hide delete icons by default, show on hover */
.pill-delete,
.reservation-bar-del{
  opacity: 0;
  transform: scale(0.9);
  transition: opacity .12s ease, transform .12s ease;
  pointer-events: none;
}

.reservation-pill:hover .pill-delete,
.reservation-bar:hover .reservation-bar-del{
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* more-pill (muted counter) */
.reservation-pill.small.muted.more-pill{
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 6px;
}

.reservation-pill.small.muted{ background: rgba(255,255,255,0.03); color: var(--muted); padding: 4px 8px; font-size: 11px; }

/* small delete button inside pill (admin) */
.pill-delete{
  background: rgba(255,255,255,0.95);
  color: #222;
  border: none;
  border-radius: 4px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  margin-left: 8px;
  cursor: pointer;
}

/* Week view styling */
.calendar-grid.week-view, .calendar-grid.week-view .calendar-cell{
  /* keep 7 columns but make cells more spacious for week view */
}

.calendar-grid.week-view{
  grid-auto-rows: 160px;
}

.calendar-grid.week-view .calendar-cell{
  height: 160px;
  min-height: 160px;
  padding: 12px;
}

.calendar-cell .week-label{
  font-size: 0.95rem;
  color: #d7e6ff; /* brighter */
  font-weight: 800; /* stronger */
  margin-bottom: 6px;
}

/* make the main header more prominent in week view */
body .container .d-flex #current-month{
  font-weight: 700;
}

/* Auth page specific */
.auth-header{ margin-top:18px; }
.auth-header .h4{ letter-spacing: 0.4px; }
.auth-card{ border: 1px solid rgba(255,255,255,0.03); }
.auth-card .form-control{ background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.03); color: var(--text); }
.auth-card .form-control:focus{ box-shadow:none; border-color: rgba(124,58,237,0.85); }
.auth-actions .btn-outline-accent{ border-color: rgba(124,58,237,0.25); color: rgba(255,255,255,0.9); }

/* Toast success color override */
.toast.text-bg-success{ background-color: rgba(22,163,74,0.95) !important; color: #fff; }

/* Forgot modal tweaks */
.modal-content.bg-dark{ background: linear-gradient(180deg,#0d1114, #0a0e11); border: 1px solid rgba(255,255,255,0.03); }

/* Improve the register overlay: centered card inside the auth card (not full-screen) */
#register-form {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 640px;
  height: auto;
  padding: 1.25rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  z-index: 20;
}
#register-form.d-none{ display: none !important; }

/* Slightly lift the auth card and tighten spacing */
.auth-card{ padding: 1rem; transform: none; }
#auth-forms { min-height: 220px; }

/* Make header smaller on auth page to allow full-height look */
.auth-header{ padding-top:12px; padding-bottom:8px; }

/* make the register button a bit more subtle */
.auth-actions .btn-outline-accent{ opacity: 0.95; }

/* Fix small-screen layout: ensure forms stack nicely */
@media (max-width:480px){
  #register-form { width: calc(100% - 16px); top:6px; }
  .auth-card { padding: 0.75rem; }
}

/* small responsive tweaks */
@media (max-width:600px){
  .calendar-cell{ height: 92px; min-height: 92px; padding:8px; }
  .reservation-bar{ height:22px; line-height:22px; padding-right:10px; }
  .pill-delete, .reservation-bar-del{ width:16px; height:16px; font-size:11px; }
}
