:root {
  --bg: #f3f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #132033;
  --muted: #627087;
  --line: #dce6f2;
  --navy: #12365b;
  --blue: #2563eb;
  --cyan: #0891b2;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --shadow: 0 18px 50px rgba(18, 54, 91, 0.12);
  --radius: 22px;
}

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

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 5% 0%, rgba(37, 99, 235, 0.10), transparent 30%),
    radial-gradient(circle at 95% 0%, rgba(8, 145, 178, 0.12), transparent 28%),
    linear-gradient(180deg, #f8fbff, var(--bg));
  line-height: 1.5;
}

button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }

.app-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-visual {
  padding: 46px;
  background:
    linear-gradient(135deg, rgba(18, 54, 91, 0.95), rgba(8, 145, 178, 0.86)),
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 30%);
  color: #fff;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-visual h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  margin-top: 26px;
}

.login-visual p { color: rgba(255,255,255,0.78); margin-top: 18px; font-size: 16px; max-width: 520px; }

.lab-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.24);
  font-weight: 900;
  letter-spacing: -0.06em;
}

.login-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.login-pills span {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  font-weight: 800;
  font-size: 12px;
}

.login-form-wrap { padding: 46px; display: flex; flex-direction: column; justify-content: center; }
.login-form-wrap h2 { font-size: 30px; letter-spacing: -0.04em; margin-bottom: 8px; }
.login-form-wrap p { color: var(--muted); margin-bottom: 26px; }

.field { display: grid; gap: 8px; margin-bottom: 16px; color: var(--muted); font-size: 13px; font-weight: 800; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 16px;
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
  transition: 0.18s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(37, 99, 235, 0.68);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}
textarea { min-height: 108px; resize: vertical; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 900;
  transition: 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 14px 28px rgba(18,54,91,0.2); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-soft { background: #eef4fb; color: var(--navy); border: 1px solid var(--line); }
.btn-green { background: var(--green); color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-amber { background: #fff7ed; color: var(--amber); border: 1px solid #fed7aa; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 28px;
  background: rgba(255,255,255,0.84);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  margin-bottom: 26px;
  position: sticky;
  top: 14px;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 48px; height: 48px; border-radius: 18px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy), var(--cyan));
  color: white; font-weight: 900; letter-spacing: -0.06em;
}
.brand strong { display: block; letter-spacing: -0.03em; }
.brand small { color: var(--muted); font-weight: 700; }

.nav-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nav-links button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 900;
}
.nav-links button.active, .nav-links button:hover { background: #eef4fb; color: var(--navy); }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.avatar {
  width: 32px; height: 32px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--navy); color: #fff;
}

.section { display: none; }
.section.active { display: block; }

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-bottom: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-main {
  padding: 34px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(135deg, rgba(18,54,91,0.96), rgba(37,99,235,0.85)),
    radial-gradient(circle at 90% 10%, rgba(255,255,255,0.22), transparent 32%);
  color: #fff;
}
.eyebrow {
  display: inline-flex; gap: 8px; align-items: center;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.18);
  font-weight: 900; font-size: 12px;
}
.hero-main h1 { font-size: clamp(34px, 4vw, 58px); line-height: 0.98; letter-spacing: -0.06em; margin: 22px 0 16px; max-width: 800px; }
.hero-main p { color: rgba(255,255,255,0.78); max-width: 740px; }

.policy-card { padding: 26px; }
.policy-card h2, .section-title h2 { font-size: 25px; letter-spacing: -0.04em; margin-bottom: 8px; }
.policy-card p, .section-title p, .muted-text { color: var(--muted); margin-bottom: 18px; }
.policy-list { display: grid; gap: 12px; margin-top: 18px; }
.policy-item { padding: 14px; border-radius: 18px; background: var(--surface-soft); border: 1px solid var(--line); }
.policy-item strong { color: var(--navy); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { padding: 20px; }
.stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 900; }
.stat strong { display: block; font-size: 30px; margin-top: 6px; letter-spacing: -0.05em; }

.section-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 26px 0 16px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.instrument-card { padding: 20px; position: relative; overflow: hidden; }
.instrument-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.icon-box {
  width: 52px; height: 52px; min-width: 52px; border-radius: 18px; display: grid; place-items: center;
  background: #eef4fb; font-size: 24px; border: 1px solid var(--line);
  background-size: cover; background-position: center;
}
.badge {
  display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 900; background: #dcfce7; color: #166534; border: 1px solid #bbf7d0;
}
.badge.booked { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.instrument-card h3 { margin: 16px 0 8px; font-size: 20px; letter-spacing: -0.04em; }
.meta { display: grid; gap: 7px; color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.lab-note {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.availability-box {
  margin: 0 0 14px;
  padding: 14px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.availability-box.available { background: #dcfce7; border-color: #bbf7d0; color: #166534; }
.availability-box strong { color: var(--navy); }
.availability-box.available strong { color: #166534; }

.panel { padding: 24px; }
.panel h2 { margin-bottom: 8px; letter-spacing: -0.04em; }
.panel h3 { margin: 26px 0 12px; letter-spacing: -0.03em; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.full { grid-column: 1 / -1; }

.duration-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.duration-pill { padding: 15px; border-radius: 18px; background: var(--surface-soft); border: 1px solid var(--line); }
.duration-pill span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.07em; }
.duration-pill strong { display: block; margin-top: 6px; font-size: 20px; letter-spacing: -0.04em; }

.notice { display: none; margin: 16px 0; padding: 14px; border-radius: 18px; font-weight: 800; }
.notice.show { display: block; }
.notice.ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.notice.error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.notice.warn { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }

.system-banner {
  display: none;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  font-weight: 800;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.system-banner.show { display: block; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
td { color: var(--text); font-size: 14px; }

.status {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 7px 10px; font-size: 12px;
  font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em;
}
.confirmed { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.cancelled { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.admin-grid { display: grid; grid-template-columns: 0.78fr 1.22fr; gap: 18px; align-items: start; }
.user-list { display: grid; gap: 10px; }
.user-item {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 12px; border-radius: 18px; background: var(--surface-soft); border: 1px solid var(--line);
}
.user-item strong { display: block; }
.user-item small { color: var(--muted); font-weight: 700; }

.empty { text-align: center; color: var(--muted); border: 1px dashed var(--line); background: var(--surface-soft); padding: 26px; border-radius: var(--radius); }
.footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 36px; }

.hidden { display: none !important; }

@media (max-width: 1060px) {
  .hero, .admin-grid { grid-template-columns: 1fr; }
  .grid, .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .app-shell { width: min(100% - 22px, 1320px); padding-top: 12px; }
  .login-card, .grid, .stats, .form-grid, .duration-box { grid-template-columns: 1fr; }
  .login-visual { min-height: auto; padding: 30px; }
  .login-form-wrap { padding: 30px; }
  .topbar { position: static; border-radius: 24px; align-items: flex-start; flex-direction: column; }
  .nav-links { justify-content: flex-start; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .user-item { align-items: flex-start; flex-direction: column; }
}

/* High-visibility availability colors */
.badge.booked {
  background: #ffedd5;
  color: #9a3412;
  border-color: #fb923c;
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.12);
}

.instrument-card.has-booking {
  border-color: #fb923c;
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

.instrument-card.has-booking .lab-note {
  background: #ffedd5;
  border-color: #fdba74;
  color: #9a3412;
}

.availability-box.busy {
  background: #fff7ed;
  border: 2px solid #fb923c;
  color: #9a3412;
  box-shadow: 0 12px 34px rgba(251, 146, 60, 0.16);
}

.availability-box.busy strong {
  color: #7c2d12;
}

.availability-box.busy table th {
  color: #9a3412;
}

.availability-box.busy table tr {
  background: rgba(255, 237, 213, 0.55);
}

.status.booked-status {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fb923c;
}

.status.available-status {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.unavailable-alert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #ea580c;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.available-alert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


/* =========================================================
   Smart Booking UI Upgrade
   Inspired by the high-fidelity TC Lab booking mockup
   ========================================================= */

body {
  background:
    linear-gradient(90deg, rgba(219, 234, 254, 0.72) 0 128px, transparent 128px),
    radial-gradient(circle at 5% 16%, rgba(37, 99, 235, 0.16), transparent 22%),
    radial-gradient(circle at 2% 62%, rgba(8, 145, 178, 0.12), transparent 20%),
    linear-gradient(180deg, #f8fbff 0%, #f3f7fb 100%);
}

body::before {
  content: "";
  position: fixed;
  left: 0;
  top: 76px;
  bottom: 0;
  width: 150px;
  pointer-events: none;
  opacity: 0.45;
  background:
    radial-gradient(circle at 34px 120px, rgba(37,99,235,0.20) 0 10px, transparent 11px),
    radial-gradient(circle at 88px 190px, rgba(37,99,235,0.18) 0 13px, transparent 14px),
    radial-gradient(circle at 42px 320px, rgba(8,145,178,0.16) 0 12px, transparent 13px),
    linear-gradient(155deg, transparent 0 22%, rgba(37,99,235,0.18) 22.3% 22.8%, transparent 23% 42%, rgba(37,99,235,0.16) 42.3% 42.8%, transparent 43%),
    linear-gradient(25deg, transparent 0 30%, rgba(8,145,178,0.14) 30.3% 30.8%, transparent 31%),
    linear-gradient(180deg, rgba(191,219,254,0.44), rgba(219,234,254,0.18));
  filter: blur(0.1px);
}

.app-shell {
  width: min(1280px, calc(100% - 34px));
}

.topbar {
  margin: 0 calc(50% - 50vw) 28px;
  padding: 12px max(18px, calc((100vw - 1280px) / 2));
  width: 100vw;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #12365b, #2563eb) border-box;
  border: 3px solid transparent;
  color: #12365b;
  font-size: 20px;
  position: relative;
}

.brand-mark::after {
  content: "⚗";
  position: absolute;
  right: -4px;
  bottom: -6px;
  font-size: 14px;
  color: #2563eb;
}

.brand strong {
  font-size: 18px;
  color: #071733;
}

.nav-links button {
  position: relative;
  padding: 14px 14px;
  border-radius: 12px;
  color: #23324d;
}

.nav-links button.active {
  background: transparent;
  color: #0057d9;
}

.nav-links button.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -14px;
  height: 4px;
  border-radius: 999px;
  background: #0b5ed7;
}

.user-chip {
  background: transparent;
  border: 0;
}

.avatar {
  background: linear-gradient(135deg, #0b5ed7, #003c9e);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
}

#booking .booking-title {
  margin-top: 18px;
}

#booking .booking-title h2 {
  font-size: clamp(34px, 4vw, 44px);
  color: #071733;
}

#booking .booking-title p {
  font-size: 16px;
  color: #536176;
}

#booking .panel.card {
  border-radius: 18px;
  border-color: #d8e2ef;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.13);
  padding: 24px;
  background: rgba(255,255,255,0.96);
}

#booking .form-grid {
  grid-template-columns: repeat(6, 1fr);
  gap: 16px 22px;
}

#booking .form-grid > .field {
  margin-bottom: 0;
}

#booking .form-grid > .field:nth-child(1),
#booking .form-grid > .field:nth-child(2) {
  grid-column: span 3;
}

#booking .form-grid > .field:nth-child(3),
#booking .form-grid > #instrumentAvailability,
#booking .form-grid > .field:nth-child(10) {
  grid-column: 1 / -1;
}

#booking .form-grid > .field:nth-child(5),
#booking .form-grid > .field:nth-child(6),
#booking .form-grid > .field:nth-child(7) {
  grid-column: span 2;
}

#booking .form-grid > .field:nth-child(8),
#booking .form-grid > .field:nth-child(9) {
  grid-column: span 3;
}

#booking .field {
  color: #293957;
}

#booking input,
#booking select,
#booking textarea {
  min-height: 48px;
  border-color: #cbd5e1;
  background: #fbfdff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

#booking input[readonly] {
  background: #f8fafc;
  color: #334155;
}

#booking textarea {
  min-height: 48px;
  height: 48px;
}

#booking #safetyConfirm {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #166534;
}

.availability-box.busy {
  border-radius: 16px;
  border: 2px solid #fb923c;
  background: linear-gradient(180deg, #fff7ed, #ffffff);
  color: #9a3412;
  padding: 16px;
}

.availability-box.busy .unavailable-alert {
  background: #ea580c;
  box-shadow: 0 8px 22px rgba(234, 88, 12, 0.20);
}

.availability-box.busy table {
  min-width: 640px !important;
  overflow: hidden;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #ffffff;
}

.availability-box.busy table thead tr {
  background: #ffedd5;
}

.availability-box.busy table th {
  color: #7c2d12;
  border-bottom-color: #fed7aa;
}

.availability-box.busy table td {
  border-bottom-color: #fed7aa;
}

.availability-box.available {
  border: 2px solid #86efac;
  background: linear-gradient(180deg, #f0fdf4, #ffffff);
}

.duration-box {
  gap: 16px;
}

.duration-pill {
  position: relative;
  min-height: 96px;
  border-radius: 14px;
  display: grid;
  align-content: center;
  padding-left: 88px;
  overflow: hidden;
}

.duration-pill::before {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
}

.duration-pill:nth-child(1) {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.duration-pill:nth-child(1)::before {
  content: "◷";
  background: #dbeafe;
  color: #1d4ed8;
}

.duration-pill:nth-child(2) {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.duration-pill:nth-child(2)::before {
  content: "▣";
  background: #dcfce7;
  color: #15803d;
}

.duration-pill:nth-child(3) {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #6d28d9;
}

.duration-pill:nth-child(3)::before {
  content: "⌛";
  background: #f3e8ff;
  color: #7c3aed;
}

.duration-pill strong {
  font-size: 26px;
}

#bookingNotice.notice.ok {
  display: block;
  border-radius: 14px;
  padding: 16px 18px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #86efac;
}

#bookingNotice.notice.ok::before {
  content: "✅ ";
  font-weight: 900;
}

#booking .btn[type="submit"] {
  display: block;
  min-width: 340px;
  margin: 16px auto 0;
  border-radius: 12px;
  font-size: 20px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #0b5ed7, #004bb8);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.26);
}

#booking .btn[type="submit"]::before {
  content: "▣ ";
}

@media (max-width: 920px) {
  body::before { display: none; }
  .topbar {
    margin-left: 0;
    margin-right: 0;
    width: auto;
    border-radius: 24px;
    padding: 14px;
  }
  #booking .form-grid {
    grid-template-columns: 1fr;
  }
  #booking .form-grid > .field,
  #booking .form-grid > .field:nth-child(1),
  #booking .form-grid > .field:nth-child(2),
  #booking .form-grid > .field:nth-child(5),
  #booking .form-grid > .field:nth-child(6),
  #booking .form-grid > .field:nth-child(7),
  #booking .form-grid > .field:nth-child(8),
  #booking .form-grid > .field:nth-child(9) {
    grid-column: 1 / -1;
  }
  #booking .btn[type="submit"] {
    min-width: 100%;
  }
}

@media (max-width: 720px) {
  .brand small { display: none; }
  .nav-links button.active::after { display: none; }
  .duration-pill { padding-left: 72px; }
  .duration-pill::before {
    left: 14px;
    width: 44px;
    height: 44px;
  }
}


/* =========================================================
   Header alignment fix: clean, centered, responsive
   ========================================================= */

.topbar {
  display: grid !important;
  grid-template-columns: minmax(260px, 1.2fr) minmax(430px, 1.6fr) auto !important;
  align-items: center !important;
  gap: 22px !important;
  padding: 16px 20px !important;
}

.brand {
  min-width: 0;
  align-items: center !important;
}

.brand-mark,
.lab-logo {
  flex: 0 0 auto;
}

.brand strong {
  line-height: 1.25 !important;
}

.brand small {
  display: block !important;
  line-height: 1.35 !important;
  margin-top: 4px !important;
}

.nav-links {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.nav-links button {
  white-space: nowrap !important;
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.user-chip {
  justify-self: end !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: max-content !important;
}

.user-chip .avatar {
  flex: 0 0 auto !important;
}

#currentUserText {
  display: inline-block !important;
  max-width: 230px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}

.completed {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}

.status.completed {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  .brand,
  .nav-links,
  .user-chip {
    justify-self: stretch !important;
  }

  .nav-links {
    justify-content: flex-start !important;
  }

  .user-chip {
    justify-content: space-between !important;
    min-width: 0 !important;
  }

  #currentUserText {
    max-width: none !important;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 14px !important;
    gap: 14px !important;
  }

  .brand {
    display: grid !important;
    grid-template-columns: 48px 1fr !important;
  }

  .brand small {
    font-size: 12px !important;
  }

  .nav-links {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .nav-links button {
    width: 100% !important;
    padding: 10px 8px !important;
    font-size: 13px !important;
  }

  .user-chip {
    flex-wrap: wrap !important;
  }
}


/* =========================================================
   Modern / futuristic header refresh
   ========================================================= */

:root {
  --header-bg: rgba(255,255,255,0.90);
  --header-line: rgba(37, 99, 235, 0.12);
  --header-glow: 0 16px 42px rgba(37, 99, 235, 0.10);
}

.topbar {
  position: sticky !important;
  top: 12px;
  z-index: 12;
  display: grid !important;
  grid-template-columns: minmax(280px, 1.2fr) minmax(520px, 1.6fr) auto !important;
  align-items: center !important;
  gap: 18px !important;
  padding: 14px 18px !important;
  border-radius: 24px !important;
  border: 1px solid var(--header-line) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,250,255,0.92)) !important;
  box-shadow: var(--header-glow) !important;
  backdrop-filter: blur(16px) !important;
}

.brand {
  min-width: 0;
  gap: 14px !important;
  align-items: center !important;
}

.brand-mark {
  width: 54px !important;
  height: 54px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(37, 99, 235, 0.18) !important;
  background:
    linear-gradient(180deg, #ffffff, #f6f9ff) padding-box,
    linear-gradient(135deg, rgba(37,99,235,0.9), rgba(8,145,178,0.85)) border-box !important;
  color: #11417a !important;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.12);
}

.brand strong {
  font-size: 18px !important;
  letter-spacing: -0.03em !important;
  color: #102341 !important;
  line-height: 1.2 !important;
}

.brand small {
  display: block !important;
  margin-top: 4px !important;
  color: #60708b !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.nav-links {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
  min-width: 0;
}

.nav-links button {
  position: relative;
  min-height: 42px !important;
  padding: 10px 14px !important;
  border-radius: 14px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #233655 !important;
  white-space: nowrap !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  letter-spacing: -0.01em;
  transition: all 0.18s ease !important;
}

.nav-links button:hover {
  background: rgba(37, 99, 235, 0.06) !important;
  border-color: rgba(37, 99, 235, 0.10) !important;
  color: #0f3e82 !important;
  transform: translateY(-1px);
}

.nav-links button.active {
  background: linear-gradient(180deg, rgba(37,99,235,0.12), rgba(37,99,235,0.06)) !important;
  border-color: rgba(37, 99, 235, 0.16) !important;
  color: #1452d6 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 8px 20px rgba(37,99,235,0.10);
}

.nav-links button.active::after {
  content: "" !important;
  position: absolute !important;
  left: 14px !important;
  right: 14px !important;
  bottom: -6px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #2563eb, #22a5f1) !important;
}

.user-chip {
  justify-self: end !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: max-content !important;
  padding: 8px 10px 8px 8px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(37,99,235,0.10) !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,250,255,0.90)) !important;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05) !important;
}

.avatar {
  width: 38px !important;
  height: 38px !important;
  background: linear-gradient(135deg, #0b56ef, #22a5f1) !important;
  box-shadow: 0 10px 24px rgba(37,99,235,0.25) !important;
  font-size: 14px !important;
}

#currentUserText {
  display: inline-block !important;
  max-width: 250px !important;
  line-height: 1.25 !important;
  color: #5b6d88 !important;
  font-weight: 800 !important;
  white-space: normal !important;
}

#logoutBtn.btn.btn-soft {
  padding: 10px 18px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(37,99,235,0.12) !important;
  background: linear-gradient(180deg, #f3f7ff, #eaf1ff) !important;
  color: #14396f !important;
  font-weight: 900 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9) !important;
}

#logoutBtn.btn.btn-soft:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37,99,235,0.10) !important;
}

/* Ensure hidden admin tab truly disappears for non-admin users */
#adminTab.hidden,
#adminSideBtn.hidden {
  display: none !important;
}

/* Make section headers cleaner with the new header */
.section-title {
  margin-top: 18px !important;
}

/* Responsive */
@media (max-width: 1250px) {
  .topbar {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .brand, .nav-links, .user-chip {
    justify-self: stretch !important;
  }

  .nav-links {
    justify-content: flex-start !important;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-links::-webkit-scrollbar {
    height: 8px;
  }

  .nav-links::-webkit-scrollbar-thumb {
    background: rgba(37,99,235,0.18);
    border-radius: 999px;
  }

  .user-chip {
    justify-content: space-between !important;
    min-width: 0 !important;
  }

  #currentUserText {
    max-width: none !important;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 14px !important;
    border-radius: 20px !important;
  }

  .brand {
    display: grid !important;
    grid-template-columns: 54px 1fr !important;
  }

  .brand strong {
    font-size: 17px !important;
  }

  .brand small {
    font-size: 12px !important;
  }

  .nav-links {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible;
  }

  .nav-links button {
    width: 100% !important;
    min-height: 44px !important;
    padding: 10px 8px !important;
    font-size: 13px !important;
  }

  .nav-links button.active::after {
    left: 10px !important;
    right: 10px !important;
  }

  .user-chip {
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
  }

  #logoutBtn.btn.btn-soft {
    width: 100%;
  }
}


/* =========================================================
   Premium login upgrade + remove Instrument Details focus
   ========================================================= */

.login-screen {
  background:
    radial-gradient(circle at 12% 10%, rgba(37,99,235,0.18), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(34,165,241,0.14), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(8,145,178,0.10), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  position: relative;
  overflow: hidden;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(37,99,235,0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(37,99,235,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  grid-template-columns: 1.08fr 0.92fr;
  border-radius: 34px;
  border: 1px solid rgba(37,99,235,0.14);
  box-shadow: 0 28px 90px rgba(18, 54, 91, 0.18);
  overflow: hidden;
}

.login-visual {
  position: relative;
  min-height: 620px;
  padding: 52px;
  background:
    linear-gradient(135deg, rgba(6,31,68,0.98), rgba(15,82,166,0.92)),
    radial-gradient(circle at 24% 24%, rgba(255,255,255,0.22), transparent 34%);
}

.login-visual::before {
  content: "";
  position: absolute;
  width: 310px;
  height: 310px;
  right: -120px;
  top: -90px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  pointer-events: none;
}

.premium-logo {
  width: 68px !important;
  height: 68px !important;
  border-radius: 24px !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08)) !important;
  border: 1px solid rgba(255,255,255,0.26) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 18px 44px rgba(0,0,0,0.18);
  font-size: 24px;
}

.login-eyebrow {
  display: inline-flex;
  margin-top: 34px;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.86);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.login-visual h1 {
  margin-top: 22px;
  font-size: clamp(40px, 5.4vw, 68px);
  letter-spacing: -0.07em;
  max-width: 680px;
}

.login-visual p {
  max-width: 610px;
  font-size: 17px;
  line-height: 1.65;
}

.login-pills {
  margin-top: 32px;
}

.login-pills span {
  padding: 10px 14px;
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.20);
  backdrop-filter: blur(10px);
}

.login-visual-card {
  position: relative;
  z-index: 1;
  margin-top: 42px;
  width: min(440px, 100%);
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(14px);
}

.login-visual-card strong,
.login-visual-card small {
  display: block;
}

.login-visual-card strong {
  color: #fff;
  font-size: 15px;
}

.login-visual-card small {
  color: rgba(255,255,255,0.72);
  margin-top: 4px;
}

.login-visual-card > span {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-weight: 900;
}

.login-form-wrap {
  padding: 56px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.96));
}

.login-form-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #1452d6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.login-form-wrap h2 {
  font-size: 38px;
  letter-spacing: -0.06em;
  color: #102341;
}

.login-form-wrap p {
  font-size: 15px;
  line-height: 1.6;
  max-width: 390px;
}

.login-form-wrap .field {
  color: #233655;
}

.login-form-wrap input {
  min-height: 52px;
  border-radius: 16px;
  border-color: #cfdced;
  background: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.9);
}

.login-submit {
  width: 100%;
  min-height: 54px;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #1452d6, #22a5f1) !important;
  box-shadow: 0 18px 38px rgba(37,99,235,0.24) !important;
  font-size: 16px;
}

.login-mini-note {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  color: #60708b;
  font-size: 13px;
  font-weight: 750;
}

.login-mini-note span {
  color: #16a34a;
  font-size: 12px;
}

#instrumentDetailsCard {
  display: none !important;
}

@media (max-width: 860px) {
  .login-card {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: auto;
    padding: 34px;
  }

  .login-form-wrap {
    padding: 34px;
  }

  .login-visual h1 {
    font-size: clamp(34px, 10vw, 52px);
  }
}


/* =========================================================
   Simplified login page + cleaner visual density
   ========================================================= */

.login-visual {
  min-height: 560px !important;
}

.login-eyebrow {
  margin-top: 32px !important;
}

.login-visual h1 {
  max-width: 560px !important;
  font-size: clamp(42px, 5vw, 62px) !important;
}

.login-visual p {
  max-width: 440px !important;
  font-size: 17px !important;
}

.simple-login-pills {
  max-width: 420px;
}

.simple-login-pills span {
  font-size: 13px !important;
  padding: 10px 16px !important;
}

.login-visual-card {
  display: none !important;
}

.login-form-wrap h2 {
  font-size: 42px !important;
}

.login-form-wrap p {
  margin-bottom: 28px !important;
}

.login-mini-note {
  justify-content: center;
}

@media (max-width: 860px) {
  .login-visual {
    min-height: 360px !important;
  }

  .login-visual h1 {
    font-size: clamp(34px, 10vw, 48px) !important;
  }
}


/* =========================================================
   Usability upgrade: search/filter, status labels, mobile cards
   ========================================================= */

.instrument-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 0.35fr);
  gap: 16px;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 22px;
}

.instrument-toolbar .field {
  margin-bottom: 0;
}

.instrument-card button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none !important;
  background: #cbd5e1 !important;
  color: #475569 !important;
  box-shadow: none !important;
}

.unavailable-badge {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border-color: #fecaca !important;
}

.status.ongoing {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status.upcoming {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status.completed {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}

.status.cancelled {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge.unavailable-badge {
  box-shadow: 0 0 0 4px rgba(239,68,68,0.08);
}

/* Mobile-friendly tables become cards */
@media (max-width: 760px) {
  .instrument-toolbar {
    grid-template-columns: 1fr;
  }

  #myBookingList table,
  #adminBookingList table,
  #scheduleView table {
    min-width: 0 !important;
    border-collapse: separate;
    border-spacing: 0 12px;
  }

  #myBookingList thead,
  #adminBookingList thead,
  #scheduleView thead {
    display: none;
  }

  #myBookingList tbody,
  #adminBookingList tbody,
  #scheduleView tbody,
  #myBookingList tr,
  #adminBookingList tr,
  #scheduleView tr,
  #myBookingList td,
  #adminBookingList td,
  #scheduleView td {
    display: block;
    width: 100%;
  }

  #myBookingList tr,
  #adminBookingList tr,
  #scheduleView tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(18,54,91,0.08);
    overflow: hidden;
  }

  #myBookingList td,
  #adminBookingList td,
  #scheduleView td {
    border-bottom: 1px solid #eef2f7;
    padding: 12px 14px;
  }

  #myBookingList td:last-child,
  #adminBookingList td:last-child,
  #scheduleView td:last-child {
    border-bottom: 0;
  }

  #myBookingList td:nth-child(1)::before,
  #adminBookingList td:nth-child(1)::before,
  #scheduleView td:nth-child(1)::before {
    content: "Instrument";
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
  }

  #myBookingList td:nth-child(2)::before,
  #adminBookingList td:nth-child(2)::before,
  #scheduleView td:nth-child(2)::before {
    content: "User / Status";
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
  }

  #myBookingList td:nth-child(3)::before,
  #adminBookingList td:nth-child(3)::before,
  #scheduleView td:nth-child(3)::before {
    content: "Schedule";
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
  }
}

/* =========================================================
   Mobile-friendly fix
   ========================================================= */

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 760px) {
  body {
    background: linear-gradient(180deg, #f8fbff, #eef5ff) !important;
  }

  .app-shell {
    width: 100% !important;
    margin: 0 !important;
    padding: 10px 10px 80px !important;
  }

  .topbar {
    position: sticky !important;
    top: 8px !important;
    z-index: 60 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 0 16px 0 !important;
    padding: 14px !important;
    border-radius: 22px !important;
  }

  .brand {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    gap: 12px !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .brand-mark {
    width: 46px !important;
    height: 46px !important;
    border-radius: 16px !important;
    font-size: 16px !important;
  }

  .brand strong {
    font-size: 16px !important;
    line-height: 1.2 !important;
  }

  .brand small {
    font-size: 11px !important;
    line-height: 1.35 !important;
    margin-top: 3px !important;
  }

  .nav-links {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 0 8px !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links::-webkit-scrollbar {
    display: none !important;
  }

  .nav-links button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-height: 38px !important;
    padding: 9px 13px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  .nav-links button.active::after {
    display: none !important;
  }

  .user-chip {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 10px !important;
    min-width: 0 !important;
    padding: 10px !important;
    border-radius: 18px !important;
  }

  .user-chip .avatar {
    width: 38px !important;
    height: 38px !important;
  }

  #currentUserText {
    max-width: 100% !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
  }

  #logoutBtn {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-height: 40px !important;
  }

  .section-title {
    margin: 14px 0 12px !important;
    padding: 0 2px !important;
  }

  .section-title h2 {
    font-size: 30px !important;
    line-height: 1.15 !important;
    letter-spacing: -0.05em !important;
  }

  .section-title p {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  #booking .panel.card,
  .panel {
    padding: 16px !important;
    border-radius: 20px !important;
  }

  .form-grid,
  #booking .form-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .form-grid > *,
  #booking .form-grid > *,
  .full {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
  }

  .field {
    margin-bottom: 0 !important;
    font-size: 13px !important;
  }

  input, select, textarea {
    width: 100% !important;
    min-height: 50px !important;
    font-size: 15px !important;
    border-radius: 15px !important;
  }

  textarea {
    min-height: 88px !important;
    height: auto !important;
  }

  .duration-box {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin: 14px 0 !important;
  }

  .duration-pill {
    min-height: 84px !important;
    padding: 14px 14px 14px 72px !important;
  }

  .duration-pill::before {
    left: 14px !important;
    width: 44px !important;
    height: 44px !important;
    font-size: 22px !important;
  }

  .duration-pill strong {
    font-size: 24px !important;
  }

  #booking .btn[type="submit"] {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 52px !important;
    margin-top: 10px !important;
    font-size: 16px !important;
    border-radius: 15px !important;
  }

  .instrument-toolbar {
    grid-template-columns: 1fr !important;
    padding: 14px !important;
    gap: 10px !important;
  }

  .grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .instrument-card {
    padding: 16px !important;
  }

  .table-wrap {
    overflow-x: visible !important;
  }

  #instrumentAvailability table,
  #instrumentAvailability thead,
  #instrumentAvailability tbody,
  #instrumentAvailability tr,
  #instrumentAvailability th,
  #instrumentAvailability td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #instrumentAvailability thead {
    display: none !important;
  }

  #instrumentAvailability tr {
    margin: 10px 0 !important;
    border: 1px solid #fed7aa !important;
    border-radius: 16px !important;
    background: #fffaf4 !important;
    overflow: hidden !important;
  }

  #instrumentAvailability td {
    padding: 10px 12px !important;
    border-bottom: 1px solid #ffedd5 !important;
    font-size: 13px !important;
  }

  #instrumentAvailability td:last-child {
    border-bottom: 0 !important;
  }

  #instrumentAvailability td:nth-child(1)::before { content: "Booked by"; }
  #instrumentAvailability td:nth-child(2)::before { content: "Date & time"; }
  #instrumentAvailability td:nth-child(3)::before { content: "Sample"; }
  #instrumentAvailability td:nth-child(4)::before { content: "Reason"; }

  #instrumentAvailability td::before {
    display: block;
    color: #9a3412;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
  }

  .availability-box.busy {
    padding: 14px !important;
  }

  .availability-box.busy strong {
    font-size: 18px !important;
    line-height: 1.25 !important;
  }

  .login-screen {
    padding: 12px !important;
  }

  .login-card {
    border-radius: 26px !important;
  }

  .login-visual {
    padding: 28px !important;
    min-height: 300px !important;
  }

  .login-visual h1 {
    font-size: 36px !important;
    line-height: 1.02 !important;
  }

  .login-visual p {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  .login-form-wrap {
    padding: 28px !important;
  }

  .login-form-wrap h2 {
    font-size: 34px !important;
  }
}

@media (max-width: 390px) {
  .app-shell {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .topbar {
    padding: 12px !important;
  }

  .section-title h2 {
    font-size: 28px !important;
  }

  input, select, textarea {
    font-size: 14px !important;
  }
}


/* =========================================================
   Mature release polish: cleaner mobile UX, stronger maturity
   ========================================================= */

:root {
  --focus-ring: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none !important;
  box-shadow: var(--focus-ring) !important;
}

.notice {
  line-height: 1.45;
}

.instrument-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.instrument-card:hover {
  transform: translateY(-2px);
}

.status {
  text-transform: capitalize !important;
  letter-spacing: 0.02em !important;
}

.status.confirmed {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* More mature unavailable slot presentation */
.availability-box.busy {
  background: linear-gradient(180deg, #fff7ed, #fffaf6) !important;
}

.availability-box.busy table {
  border-radius: 14px;
  overflow: hidden;
}

/* Compact mature login */
.login-form-wrap input {
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

/* Mobile bottom breathing space for browser address bar */
@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .app-shell {
    padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
  }

  .topbar {
    box-shadow: 0 16px 42px rgba(18,54,91,0.12) !important;
    backdrop-filter: blur(18px) !important;
  }

  .brand strong {
    max-width: 250px;
  }

  .nav-links {
    mask-image: linear-gradient(90deg, black 0%, black 88%, transparent 100%);
  }

  .nav-links button {
    border: 1px solid rgba(37,99,235,0.10) !important;
    background: rgba(255,255,255,0.72) !important;
  }

  .nav-links button.active {
    background: linear-gradient(180deg, rgba(37,99,235,0.14), rgba(37,99,235,0.08)) !important;
    color: #1452d6 !important;
    border-color: rgba(37,99,235,0.20) !important;
  }

  .user-chip {
    background: rgba(255,255,255,0.88) !important;
  }

  #booking .section-title h2,
  .section-title h2 {
    font-size: 26px !important;
  }

  #booking .section-title p,
  .section-title p {
    font-size: 13px !important;
    color: #64748b !important;
  }

  .panel,
  #booking .panel.card,
  .instrument-toolbar,
  .instrument-card,
  .card {
    box-shadow: 0 12px 30px rgba(18,54,91,0.08) !important;
  }

  .field {
    color: #334155 !important;
  }

  input,
  select,
  textarea {
    border-color: #d5deeb !important;
    background: #ffffff !important;
  }

  input[readonly] {
    background: #f8fafc !important;
  }

  #instrumentSelect {
    font-size: 14px !important;
  }

  .duration-pill {
    border-radius: 18px !important;
  }

  .duration-pill span {
    font-size: 11px !important;
  }

  .duration-pill strong {
    font-size: 22px !important;
  }

  #instrumentAvailability tr {
    box-shadow: 0 8px 18px rgba(154, 52, 18, 0.06);
  }

  #instrumentAvailability td {
    line-height: 1.4 !important;
  }

  #instrumentAvailability td:first-child {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  #instrumentAvailability td:first-child span[style*="width:34px"] {
    width: 32px !important;
    height: 32px !important;
    font-size: 12px !important;
  }

  #myBookingList tr,
  #adminBookingList tr,
  #scheduleView tr {
    margin-bottom: 12px !important;
  }

  #myBookingList td,
  #adminBookingList td,
  #scheduleView td {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  .login-card {
    width: 100% !important;
    min-height: auto !important;
  }

  .login-visual {
    min-height: 260px !important;
  }

  .login-pills {
    display: none !important;
  }

  .login-form-badge {
    font-size: 11px !important;
  }

  .login-mini-note {
    font-size: 12px !important;
  }
}

/* Tablet refinement */
@media (min-width: 761px) and (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr !important;
  }

  .nav-links {
    justify-content: flex-start !important;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Whole-day booking option */
.booking-mode-simple { margin: 2px 0 4px; }
.whole-day-toggle {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start;
  padding: 14px 16px; border: 1px solid #d7e5ff; border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff, #eef6ff); color: #14396f; cursor: pointer;
}
.whole-day-toggle:hover { border-color: #8bb6ff; box-shadow: 0 10px 24px rgba(37,99,235,.08); }
.whole-day-toggle input { width: 18px !important; height: 18px !important; min-height: 18px !important; margin-top: 2px; accent-color: #2563eb; }
.whole-day-toggle strong { display: block; font-size: 14px; color: #11315f; }
.whole-day-toggle small { display: block; margin-top: 2px; color: #60708b; font-size: 12px; font-weight: 700; }
@media (max-width:760px) {
  .whole-day-toggle { border-radius: 16px; padding: 13px 14px; }
  .whole-day-toggle small { font-size: 11px; }
}


/* Full-date whole-day clarification */
.whole-day-toggle small::after {
  content: " Full future dates use 00:00–23:59.";
}

/* =========================================================
   Convenience upgrade: quick duration, next slot, export, dashboard card
   ========================================================= */

.quick-duration {
  display: grid;
  grid-template-columns: minmax(180px, 0.28fr) 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  margin: 16px 0 4px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.quick-duration strong {
  display: block;
  color: #14396f;
  font-size: 14px;
}

.quick-duration small {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-top: 3px;
}

.quick-duration-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.quick-duration-buttons button {
  border: 1px solid rgba(37,99,235,0.14);
  background: #f4f8ff;
  color: #14396f;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
  transition: 0.18s ease;
}

.quick-duration-buttons button:hover {
  transform: translateY(-1px);
  background: #eaf2ff;
  border-color: rgba(37,99,235,0.28);
}

#findNextSlotBtn {
  background: linear-gradient(135deg, #1452d6, #22a5f1);
  color: #fff;
  border-color: transparent;
}

.next-booking-card {
  padding: 18px;
  margin: 18px 0;
  border-radius: 22px;
  background:
    radial-gradient(circle at 95% 0%, rgba(34,165,241,0.14), transparent 30%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.next-booking-content,
.next-booking-empty {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.next-booking-kicker {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.next-booking-card strong {
  display: block;
  color: #102341;
  font-size: 21px;
  letter-spacing: -0.04em;
}

.next-booking-card small {
  display: block;
  color: #64748b;
  margin-top: 3px;
}

.next-booking-status {
  min-width: 96px;
}

@media (max-width: 760px) {
  .quick-duration {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .quick-duration-buttons {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .quick-duration-buttons button {
    flex: 0 0 auto;
    padding: 9px 12px;
  }

  .next-booking-content,
  .next-booking-empty {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .next-booking-card {
    padding: 16px;
    margin: 14px 0;
  }

  .next-booking-card strong {
    font-size: 18px;
  }
}


/* =========================================================
   Booking shortcuts fix: whole day + quick durations together
   ========================================================= */

.booking-shortcuts {
  margin: 4px 0 8px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid #d7e5ff;
  background:
    radial-gradient(circle at 100% 0%, rgba(37,99,235,0.08), transparent 28%),
    linear-gradient(180deg, #ffffff, #f7fbff);
}

.shortcut-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.shortcut-head strong {
  display: block;
  color: #11315f;
  font-size: 14px;
}

.shortcut-head small {
  display: block;
  color: #60708b;
  font-size: 12px;
  margin-top: 2px;
  font-weight: 700;
}

.booking-shortcuts .whole-day-toggle {
  margin-bottom: 10px;
  background: #f8fbff;
}

.quick-duration,
#quickDurationBar.quick-duration {
  display: none !important;
}

.quick-duration-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-duration-inline button {
  border: 1px solid rgba(37,99,235,0.14);
  background: #f4f8ff;
  color: #14396f;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
  transition: 0.18s ease;
}

.quick-duration-inline button:hover,
.quick-duration-inline button.active {
  transform: translateY(-1px);
  background: #eaf2ff;
  border-color: rgba(37,99,235,0.30);
  color: #1452d6;
}

.quick-duration-inline #findNextSlotBtn {
  background: linear-gradient(135deg, #1452d6, #22a5f1);
  color: #fff;
  border-color: transparent;
}

@media (max-width: 760px) {
  .booking-shortcuts {
    padding: 13px;
    border-radius: 18px;
  }

  .quick-duration-inline {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .quick-duration-inline::-webkit-scrollbar {
    display: none;
  }

  .quick-duration-inline button {
    flex: 0 0 auto;
  }
}


/* =========================================================
   Clear-flow rollback polish
   Keeps booking page simple and avoids over-complication
   ========================================================= */

.booking-shortcuts {
  border-radius: 20px !important;
}

.shortcut-head small {
  max-width: 520px;
}

@media (max-width: 760px) {
  .booking-shortcuts {
    padding: 13px !important;
  }

  .shortcut-head {
    margin-bottom: 10px !important;
  }

  .shortcut-head strong {
    font-size: 14px !important;
  }

  .shortcut-head small {
    font-size: 11px !important;
  }

  .quick-duration-inline {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 4px !important;
    -webkit-overflow-scrolling: touch;
  }

  .quick-duration-inline button {
    flex: 0 0 auto !important;
  }
}

/* =========================================================
   Manage next/active booking actions
   ========================================================= */

.btn-green {
  background: #16a34a !important;
  color: #fff !important;
}

.next-booking-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.next-booking-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.next-booking-buttons button {
  border: 1px solid rgba(37,99,235,0.14);
  background: #f4f8ff;
  color: #14396f;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 900;
}

.next-booking-buttons button[data-action="finish-now"] {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.next-booking-buttons button[data-action="user-cancel"] {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

#myBookingList .btn-row,
#adminBookingList .btn-row {
  gap: 8px;
}

#myBookingList .btn-row .btn,
#adminBookingList .btn-row .btn {
  padding: 9px 12px;
  font-size: 12px;
}

@media (max-width: 760px) {
  .next-booking-content {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .next-booking-actions {
    justify-items: stretch;
  }

  .next-booking-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .next-booking-buttons button {
    width: 100%;
    min-height: 40px;
  }

  #myBookingList .btn-row,
  #adminBookingList .btn-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100%;
  }

  #myBookingList .btn-row .btn,
  #adminBookingList .btn-row .btn {
    width: 100%;
  }
}


/* =========================================================
   Booking reminder text
   ========================================================= */

.booking-reminder-card {
  padding: 18px;
  margin: 14px 0 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 98% 0%, rgba(37,99,235,0.12), transparent 30%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.reminder-content {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: center;
}

.reminder-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #22a5f1);
  box-shadow: 0 12px 26px rgba(37,99,235,0.20);
}

.reminder-content.ongoing .reminder-icon {
  background: linear-gradient(135deg, #f97316, #f59e0b);
  box-shadow: 0 12px 26px rgba(249,115,22,0.20);
}

.reminder-content.calm .reminder-icon {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 12px 26px rgba(34,197,94,0.18);
}

.reminder-kicker {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.reminder-content strong {
  display: block;
  color: #102341;
  font-size: 18px;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.reminder-content small {
  display: block;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .booking-reminder-card {
    padding: 16px;
    margin: 12px 0 16px;
  }

  .reminder-content {
    grid-template-columns: 42px 1fr;
    gap: 12px;
  }

  .reminder-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .reminder-content strong {
    font-size: 16px;
  }

  .reminder-content small {
    font-size: 12px;
  }
}


/* PWA app safe-area polish */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}


/* Fixed reference bottom nav - normal stylesheet copy */
.tc-mobile-bottom-nav { display: none; }

@media (max-width: 760px) {
  .topbar .nav-links,
  .nav-links:not(#tcMobileBottomNav),
  header .nav-links {
    display: none !important;
  }

  #tcMobileBottomNav.tc-mobile-bottom-nav {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    z-index: 2147483647 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 8px !important;
    border-radius: 24px !important;
    background: rgba(255,255,255,0.96) !important;
    border: 1px solid rgba(37,99,235,0.14) !important;
    box-shadow: 0 18px 48px rgba(15,23,42,0.20) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
  }
}
@media (min-width: 761px) {
  #tcMobileBottomNav { display: none !important; }
}


/* =========================================================
   Restored dashboard: My Next Booking + Reminder
   ========================================================= */

.next-booking-card,
.booking-reminder-card {
  padding: 18px;
  margin: 14px 0;
  border-radius: 22px;
  background:
    radial-gradient(circle at 98% 0%, rgba(37,99,235,0.12), transparent 30%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.next-booking-content,
.next-booking-empty {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.next-booking-kicker,
.reminder-kicker {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.next-booking-card strong,
.reminder-content strong {
  display: block;
  color: #102341;
  font-size: 18px;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.next-booking-card small,
.reminder-content small {
  display: block;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.45;
}

.next-booking-status {
  min-width: 92px;
  text-align: center;
}

.reminder-content {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: center;
}

.reminder-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #22a5f1);
  box-shadow: 0 12px 26px rgba(37,99,235,0.20);
}

.reminder-content.ongoing .reminder-icon {
  background: linear-gradient(135deg, #f97316, #f59e0b);
  box-shadow: 0 12px 26px rgba(249,115,22,0.20);
}

.reminder-content.calm .reminder-icon {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 12px 26px rgba(34,197,94,0.18);
}

@media (max-width: 760px) {
  .next-booking-card,
  .booking-reminder-card {
    padding: 16px;
    margin: 12px 0;
  }

  .next-booking-content,
  .next-booking-empty {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .next-booking-card .btn {
    width: 100%;
  }

  .reminder-content {
    grid-template-columns: 42px 1fr;
    gap: 12px;
  }

  .reminder-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .next-booking-card strong,
  .reminder-content strong {
    font-size: 16px;
  }

  .next-booking-card small,
  .reminder-content small {
    font-size: 12px;
  }
}


/* =========================================================
   Verified Account Management + One-line Mobile Nav
   ========================================================= */

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.profile-card {
  padding: 20px;
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1452d6, #22a5f1);
  color: #fff;
  font-weight: 1000;
  font-size: 22px;
  box-shadow: 0 16px 34px rgba(37,99,235,0.24);
}

.profile-main h3,
.profile-card h3 {
  margin: 0;
  color: #102341;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.profile-main p,
.profile-muted {
  color: #64748b;
  margin: 4px 0 0;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.profile-role,
.profile-status {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.profile-role {
  background: #eaf2ff;
  color: #1452d6;
}

.profile-status {
  background: #ecfdf5;
  color: #047857;
}

.profile-info-list {
  display: grid;
  gap: 10px;
}

.profile-info-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid #e6eef9;
}

.profile-info-list span {
  color: #64748b;
  font-weight: 800;
}

.profile-info-list strong {
  color: #102341;
  text-align: right;
}

.profile-form {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.profile-form .btn {
  width: 100%;
}

.admin-user-manager {
  grid-column: 1 / -1;
}

.admin-user-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-user-form .btn {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .profile-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .profile-card {
    padding: 16px !important;
    border-radius: 22px !important;
  }

  .profile-main {
    align-items: flex-start;
    gap: 12px;
  }

  .profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 20px;
    font-size: 19px;
  }

  .profile-main h3,
  .profile-card h3 {
    font-size: 20px;
  }

  .profile-info-list > div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .profile-info-list strong {
    text-align: left;
  }

  .admin-user-form {
    grid-template-columns: 1fr;
  }

  #tcMobileBottomNav.tc-mobile-bottom-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 7px !important;
    min-height: 64px !important;
  }

  #tcMobileBottomNav .tc-mobile-nav-item {
    min-width: 0 !important;
    min-height: 50px !important;
    border-radius: 15px !important;
    padding: 5px 1px !important;
  }

  #tcMobileBottomNav .tc-mobile-nav-icon {
    font-size: 17px !important;
  }

  #tcMobileBottomNav .tc-mobile-nav-label {
    font-size: 8.5px !important;
    white-space: nowrap !important;
  }
}


/* =========================================================
   Admin registered user editor
   ========================================================= */

.enhanced-user-item {
  align-items: center;
  gap: 12px;
}

.registered-user-main {
  min-width: 0;
}

.registered-user-main strong {
  display: block;
}

.registered-user-main small {
  display: block;
  color: #64748b;
  margin-top: 4px;
  font-weight: 800;
}

.registered-user-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-user-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.50);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.admin-user-modal.hidden {
  display: none !important;
}

.admin-user-modal-card {
  width: min(680px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border-radius: 28px;
  background: #fff;
  border: 1px solid rgba(37,99,235,0.14);
  box-shadow: 0 28px 90px rgba(15,23,42,0.28);
  padding: 22px;
}

.admin-user-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.admin-user-modal-head h2 {
  margin: 0;
  color: #102341;
  font-size: 28px;
  letter-spacing: -0.05em;
}

.admin-user-modal-head p {
  margin: 4px 0 0;
  color: #64748b;
}

.modal-kicker {
  display: block;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.modal-close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #dbe6f3;
  background: #f8fbff;
  color: #334155;
  font-size: 24px;
  line-height: 1;
}

.registered-user-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.registered-user-edit-form .full,
.registered-user-edit-form .modal-actions {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

@media (max-width: 760px) {
  .enhanced-user-item {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  .registered-user-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
    width: 100%;
  }

  .registered-user-actions .btn {
    width: 100%;
  }

  .admin-user-modal {
    padding: 12px;
  }

  .admin-user-modal-card {
    border-radius: 24px;
    padding: 18px;
  }

  .admin-user-modal-head h2 {
    font-size: 24px;
  }

  .registered-user-edit-form {
    grid-template-columns: 1fr;
  }

  .registered-user-edit-form .full,
  .registered-user-edit-form .modal-actions {
    grid-column: 1;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .modal-actions .btn {
    width: 100%;
  }

  #tcMobileBottomNav.tc-mobile-bottom-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 7px !important;
    min-height: 64px !important;
  }

  #tcMobileBottomNav .tc-mobile-nav-item {
    min-width: 0 !important;
    min-height: 50px !important;
    border-radius: 15px !important;
    padding: 5px 1px !important;
  }

  #tcMobileBottomNav .tc-mobile-nav-icon {
    font-size: 17px !important;
  }

  #tcMobileBottomNav .tc-mobile-nav-label {
    font-size: 8.5px !important;
    white-space: nowrap !important;
  }
}


/* =========================================================
   Clean user profile: remove large profile details block
   ========================================================= */

.profile-grid-clean {
  grid-template-columns: minmax(0, 1fr);
}

.compact-profile-card {
  max-width: 760px;
  margin: 0 auto;
}

.compact-profile-main {
  padding-bottom: 14px;
  border-bottom: 1px solid #e6eef9;
}

#profile .profile-info-list {
  display: none !important;
}

#selfStatusInput[readonly],
#selfUsernameInput[readonly] {
  background: #f8fbff;
  color: #475569;
}

@media (max-width: 760px) {
  .compact-profile-card {
    max-width: 100%;
  }

  .profile-grid-clean {
    grid-template-columns: 1fr !important;
  }

  #tcMobileBottomNav.tc-mobile-bottom-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}


/* =========================================================
   Final profile display/layout fix
   ========================================================= */

#profile {
  width: 100%;
}

#profile .section-title {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.profile-grid-clean {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(420px, 1.15fr);
  gap: 16px;
  align-items: start;
}

.compact-profile-card {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}

.compact-profile-card .profile-form {
  margin-top: 16px;
}

.compact-profile-main {
  padding-bottom: 14px;
  border-bottom: 1px solid #e6eef9;
}

#profile .profile-info-list {
  display: none !important;
}

#selfStatusInput[readonly],
#selfUsernameInput[readonly] {
  background: #f8fbff;
  color: #475569;
}

@media (max-width: 900px) {
  .profile-grid-clean {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  #profile .section-title {
    max-width: 100%;
  }

  .profile-grid-clean {
    width: 100%;
    grid-template-columns: 1fr !important;
  }

  .compact-profile-card {
    max-width: 100% !important;
  }
}


/* =========================================================
   Profile desktop two-column layout
   Function unchanged; layout only.
   ========================================================= */

@media (min-width: 901px) {
  #profile .section-title {
    width: min(1180px, calc(100% - 40px)) !important;
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #profile .profile-grid-clean {
    width: min(1180px, calc(100% - 40px)) !important;
    max-width: 1180px !important;
    margin: 0 auto !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  #profile .compact-profile-card {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 28px !important;
  }

  #profile .compact-profile-main {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 18px !important;
    padding-bottom: 20px !important;
    margin-bottom: 20px !important;
  }

  #profile .profile-avatar {
    width: 72px !important;
    height: 72px !important;
    border-radius: 24px !important;
    font-size: 24px !important;
  }

  #profile .profile-two-column-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 22px !important;
    align-items: start !important;
  }

  #profile .profile-column-block {
    padding: 18px !important;
    border-radius: 22px !important;
    background: #f8fbff !important;
    border: 1px solid #e6eef9 !important;
  }

  #profile .profile-column-block h4 {
    margin: 0 0 4px !important;
    color: #102341 !important;
    font-size: 18px !important;
    letter-spacing: -0.03em !important;
  }

  #profile .profile-column-block .profile-form {
    margin-top: 14px !important;
  }

  #profile #profileNotice {
    margin-top: 16px !important;
  }

  #profile .admin-user-manager {
    width: min(1180px, calc(100% - 40px)) !important;
    max-width: 1180px !important;
    margin: 16px auto 0 !important;
  }
}

@media (max-width: 900px) {
  #profile .profile-two-column-card {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  #profile .profile-column-block {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  #profile .profile-column-block h4 {
    margin: 10px 0 2px !important;
    color: #102341 !important;
  }
}


/* =========================================================
   Hide mobile bottom nav on login page
   ========================================================= */

body.is-login-screen #tcMobileBottomNav,
body:not(.is-app-screen) #tcMobileBottomNav {
  display: none !important;
}

@media (max-width: 760px) {
  body.is-login-screen {
    padding-bottom: 0 !important;
  }

  body.is-login-screen #tcMobileBottomNav,
  body:not(.is-app-screen) #tcMobileBottomNav {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }
}

/* If login and app are both in DOM, only show bottom nav when the portal/app is visible */
.login-screen:not(.hidden) ~ #tcMobileBottomNav,
#loginScreen:not(.hidden) ~ #tcMobileBottomNav {
  display: none !important;
}

/* Booking Ease Upgrade: Next Available + Frequent Instruments */
.frequent-instruments-card{padding:18px;margin:14px 0;border-radius:22px;background:radial-gradient(circle at 98% 0%,rgba(34,165,241,.12),transparent 30%),linear-gradient(180deg,#fff,#f8fbff)}
.frequent-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:14px}
.frequent-kicker,.next-slot-kicker{display:block;color:#64748b;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.08em;margin-bottom:4px}
.frequent-head strong{display:block;color:#102341;font-size:18px;letter-spacing:-.03em}.frequent-head small{display:block;color:#64748b;margin-top:4px}
.frequent-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.frequent-item{width:100%;text-align:left;padding:14px;border-radius:18px;border:1px solid #dbe6f3;background:#fff;color:#102341;box-shadow:0 10px 24px rgba(18,54,91,.06)}
.frequent-item span{display:block;font-weight:900;line-height:1.25}.frequent-item small{display:block;color:#64748b;margin-top:6px;font-weight:800}
.next-available-panel{margin-top:14px;padding:12px;border-radius:16px;background:#f8fbff;border:1px solid #dbe6f3;display:grid;gap:8px}
.next-available-panel strong{color:#102341;font-size:13px;line-height:1.35}.next-available-panel .btn-small{min-height:36px;padding:8px 12px;border-radius:12px;font-size:12px}
.status.auto-completed,.next-booking-status.auto-completed{background:#eef2ff;color:#4338ca}
@media(max-width:760px){.frequent-instruments-card{padding:16px;margin:12px 0}.frequent-grid{grid-template-columns:1fr}.frequent-item{padding:13px}.next-available-panel{margin-top:12px}}


/* =========================================================
   Classy Login Page Upgrade
   Layout only. Login logic unchanged.
   ========================================================= */

.login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 28px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 12% 8%, rgba(34,165,241,0.18), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(20,82,214,0.16), transparent 32%),
    linear-gradient(135deg, #eef5ff 0%, #f8fbff 46%, #ffffff 100%);
  overflow-x: hidden;
}

.login-card {
  width: min(1040px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border-radius: 34px;
  overflow: hidden;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(37,99,235,0.13);
  box-shadow: 0 34px 110px rgba(15,23,42,0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.login-visual {
  position: relative;
  min-height: 620px;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 8%, rgba(255,255,255,0.22), transparent 28%),
    linear-gradient(145deg, #08284f 0%, #11499d 54%, #1b75e5 100%);
  overflow: hidden;
}

.login-visual::before,
.login-visual::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.login-visual::before {
  width: 360px;
  height: 360px;
  right: -120px;
  top: -110px;
  border: 1px solid rgba(255,255,255,0.22);
}

.login-visual::after {
  width: 240px;
  height: 240px;
  left: -70px;
  bottom: -80px;
  background: rgba(255,255,255,0.07);
}

.login-visual .eyebrow,
.login-visual .badge,
.login-visual > span:first-child {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  color: #dcecff;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.login-visual h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #ffffff;
  font-size: clamp(46px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.075em;
  max-width: 560px;
}

.login-visual p {
  position: relative;
  z-index: 1;
  margin: 24px 0 0;
  max-width: 480px;
  color: rgba(255,255,255,0.76);
  font-size: 18px;
  line-height: 1.65;
}

.login-form-wrap {
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,251,255,0.96));
}

.login-form-wrap .eyebrow,
.login-form-wrap .login-kicker,
.login-form-wrap > span:first-child {
  width: fit-content;
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #1452d6;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.login-form-wrap h2 {
  margin: 0;
  color: #102341;
  font-size: 48px;
  line-height: 1.03;
  letter-spacing: -0.065em;
}

.login-form-wrap > p {
  margin: 14px 0 28px;
  color: #64748b;
  font-size: 16px;
  line-height: 1.55;
}

#loginForm {
  display: grid !important;
  gap: 18px !important;
  width: 100%;
}

#loginForm .field {
  display: grid !important;
  gap: 8px !important;
  margin: 0 !important;
  width: 100%;
}

#loginForm label,
#loginForm .field {
  color: #26364f;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

#loginForm input {
  width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border-radius: 18px !important;
  border: 1px solid #d9e5f5 !important;
  background: #ffffff !important;
  color: #102341 !important;
  font-size: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

#loginForm input:focus {
  outline: none !important;
  border-color: #1452d6 !important;
  box-shadow: 0 0 0 4px rgba(20,82,214,0.10) !important;
}

#loginForm button[type="submit"],
#loginForm .btn-primary {
  width: 100% !important;
  min-height: 58px !important;
  margin-top: 8px !important;
  border-radius: 18px !important;
  font-size: 16px !important;
  font-weight: 1000 !important;
  letter-spacing: -0.015em !important;
  background: linear-gradient(135deg, #1452d6, #22a5f1) !important;
  box-shadow: 0 16px 34px rgba(37,99,235,0.25) !important;
}

#loginNotice {
  margin-top: 14px !important;
}

.database-status,
.connection-status,
#connectionStatus {
  margin-top: 18px !important;
}

/* Remove bottom app nav on login immediately and completely */
body.tc-classy-login-active #tcMobileBottomNav,
.login-screen:not(.hidden) ~ #tcMobileBottomNav {
  display: none !important;
}

@media (max-width: 860px) {
  .login-screen {
    place-items: start center;
    padding: 0;
    background:
      radial-gradient(circle at 50% 0%, rgba(37,99,235,0.18), transparent 36%),
      linear-gradient(180deg, #eef5ff 0%, #f8fbff 100%);
  }

  .login-card {
    width: 100%;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .login-visual {
    min-height: 270px !important;
    padding: 46px 28px 38px !important;
    border-radius: 0 0 34px 34px;
  }

  .login-visual h1 {
    font-size: 42px !important;
    line-height: 1.03 !important;
    letter-spacing: -0.06em !important;
  }

  .login-visual p {
    margin-top: 16px !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    max-width: 340px !important;
  }

  .login-form-wrap {
    width: calc(100% - 28px) !important;
    margin: -26px auto 28px !important;
    padding: 28px 22px 24px !important;
    border-radius: 28px !important;
    background: rgba(255,255,255,0.97) !important;
    border: 1px solid rgba(37,99,235,0.12) !important;
    box-shadow: 0 24px 70px rgba(15,23,42,0.13) !important;
    display: block !important;
  }

  .login-form-wrap h2 {
    font-size: 38px !important;
  }

  .login-form-wrap > p {
    margin: 10px 0 22px !important;
    font-size: 14px !important;
  }

  #loginForm {
    gap: 16px !important;
  }

  #loginForm .field {
    gap: 8px !important;
    margin-bottom: 0 !important;
  }

  #loginForm input {
    height: 54px !important;
    min-height: 54px !important;
    border-radius: 17px !important;
    font-size: 16px !important;
  }

  #loginForm button[type="submit"],
  #loginForm .btn-primary {
    min-height: 56px !important;
    margin-top: 4px !important;
    border-radius: 17px !important;
    position: relative !important;
    z-index: 1 !important;
  }
}

@media (max-width: 390px) {
  .login-visual {
    min-height: 250px !important;
    padding: 40px 22px 34px !important;
  }

  .login-visual h1 {
    font-size: 37px !important;
  }

  .login-form-wrap {
    width: calc(100% - 22px) !important;
    padding: 24px 18px 22px !important;
    margin-top: -22px !important;
  }

  .login-form-wrap h2 {
    font-size: 34px !important;
  }
}


/* =========================================================
   Booking Instrument V3.0 — Chemical Inventory UI
   Desktop + Mobile
   ========================================================= */

.chem-page {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.chem-page-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin: 8px 0 26px;
}

.chem-kicker {
  color: #1452d6;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .10em;
  margin-bottom: 6px;
}

.chem-page-head h2 {
  margin: 0;
  color: #102341;
  font-size: 38px;
  line-height: 1.06;
  letter-spacing: -0.06em;
}

.chem-page-head p {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 15px;
}

.chem-head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chem-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.chem-stat-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #dbe6f3;
  box-shadow: 0 14px 34px rgba(18,54,91,.07);
}

.chem-stat-card.total { background: linear-gradient(180deg,#fff,#f8fbff); }
.chem-stat-card.low { background: linear-gradient(180deg,#fff,#fff9ec); border-color:#fde5b1; }
.chem-stat-card.expiring { background: linear-gradient(180deg,#fff,#f7f2ff); border-color:#e5d6ff; }
.chem-stat-card.expired { background: linear-gradient(180deg,#fff,#fff1f1); border-color:#ffd2d2; }

.chem-stat-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #eaf2ff;
  color: #1452d6;
  font-size: 24px;
  font-weight: 900;
}

.chem-stat-card.low .chem-stat-icon { background:#fff1d6;color:#c26a00; }
.chem-stat-card.expiring .chem-stat-icon { background:#efe5ff;color:#6d28d9; }
.chem-stat-card.expired .chem-stat-icon { background:#ffe0e0;color:#dc2626; }

.chem-stat-card small {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.chem-stat-card strong {
  display: block;
  color: #102341;
  font-size: 30px;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 5px 0;
}

.chem-stat-card p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.chem-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
}

.chem-search-card,
.chem-table-card,
.chem-alert-card {
  border: 1px solid #dbe6f3;
  background: rgba(255,255,255,.96);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(18,54,91,.06);
}

.chem-search-card {
  padding: 14px;
  margin-bottom: 14px;
}

.chem-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.chem-search-field {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid #dbe6f3;
  background: #fff;
}

.chem-search-field span {
  color: #64748b;
  font-size: 22px;
}

.chem-search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #102341;
  font-size: 15px;
}

.chem-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.chem-pill {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #dbe6f3;
  background: #fff;
  color: #334155;
  font-weight: 900;
}

.chem-pill.active {
  background: #1452d6;
  color: #fff;
  border-color: #1452d6;
  box-shadow: 0 10px 22px rgba(37,99,235,.20);
}

.chem-table-card {
  overflow: hidden;
}

.chem-table-head,
.chem-row {
  display: grid;
  grid-template-columns: 1.7fr .9fr .75fr 1.25fr .9fr 1fr 1fr .9fr;
  gap: 12px;
  align-items: center;
}

.chem-table-head {
  padding: 16px 18px;
  background: #f8fbff;
  border-bottom: 1px solid #e6eef9;
  color: #334155;
  font-size: 12px;
  font-weight: 1000;
}

.chem-row {
  padding: 14px 18px;
  border-bottom: 1px solid #edf2f7;
  color: #102341;
}

.chem-row:last-child {
  border-bottom: 0;
}

.chem-name-cell {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.chem-bottle-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eaf2ff;
  color: #1452d6;
  font-size: 20px;
}

.chem-name-cell strong {
  display: block;
  color: #102341;
  font-weight: 1000;
}

.chem-name-cell small {
  display: block;
  color: #64748b;
  margin-top: 3px;
}

.chem-status {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 1000;
  background: #ecfdf5;
  color: #047857;
}

.chem-status.low-stock { background:#fff7ed;color:#c2410c; }
.chem-status.expiring-soon { background:#f5f3ff;color:#6d28d9; }
.chem-status.expired { background:#fee2e2;color:#b91c1c; }
.chem-status.restricted { background:#ede9fe;color:#5b21b6; }
.chem-status.out-of-stock { background:#f1f5f9;color:#475569; }

.chem-hazard {
  font-weight: 900;
}

.chem-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.chem-actions .btn {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.chem-side-panel {
  display: grid;
  gap: 14px;
}

.chem-alert-card {
  padding: 18px;
}

.chem-alert-card.expiry { border-color:#fde5b1;background:linear-gradient(180deg,#fff,#fffaf0); }
.chem-alert-card.low { border-color:#fed7aa;background:linear-gradient(180deg,#fff,#fff7ed); }
.chem-alert-card.reorder { border-color:#bfdbfe;background:linear-gradient(180deg,#fff,#eff6ff); }

.chem-alert-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.chem-alert-head strong,
.chem-alert-card > strong {
  color: #102341;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.chem-alert-head button {
  border: 0;
  background: transparent;
  color: #1452d6;
  font-weight: 900;
}

.chem-alert-card p {
  color: #64748b;
  margin: 6px 0 14px;
  font-size: 13px;
}

.chem-alert-list {
  display: grid;
  gap: 8px;
}

.chem-alert-list button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 8px;
  border-radius: 14px;
  border: 0;
  background: rgba(255,255,255,.80);
  text-align: left;
}

.chem-alert-list strong {
  display: block;
  color: #102341;
}

.chem-alert-list small {
  display: block;
  color: #64748b;
  margin-top: 2px;
}

.chem-empty,
.chem-empty-small {
  padding: 22px;
  color: #64748b;
  text-align: center;
}

.chemical-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15,23,42,.52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.chemical-modal.hidden {
  display: none !important;
}

.chemical-modal-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid rgba(37,99,235,.14);
  box-shadow: 0 28px 90px rgba(15,23,42,.28);
}

.chemical-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.chemical-modal-head h2 {
  margin: 0;
  color: #102341;
  font-size: 28px;
  letter-spacing: -0.05em;
}

.chemical-modal-head p {
  margin: 5px 0 0;
  color: #64748b;
}

.chemical-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chemical-form .full {
  grid-column: 1 / -1;
}

.chemical-form textarea {
  min-height: 86px;
}

@media (max-width: 980px) {
  .chem-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chem-layout {
    grid-template-columns: 1fr;
  }

  .chem-side-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chem-alert-card.reorder {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .chem-page {
    width: 100%;
  }

  .chem-page-head {
    display: grid;
    grid-template-columns: 1fr;
    margin: 8px 0 18px;
  }

  .chem-page-head h2 {
    font-size: 34px;
  }

  .chem-head-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chem-head-actions .btn {
    width: 100%;
  }

  .chem-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .chem-stat-card {
    min-width: 178px;
    padding: 14px;
    grid-template-columns: 42px minmax(0, 1fr);
    border-radius: 20px;
  }

  .chem-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 18px;
  }

  .chem-stat-card strong {
    font-size: 25px;
  }

  .chem-search-row {
    grid-template-columns: 1fr;
  }

  .chem-filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .chem-pill {
    white-space: nowrap;
  }

  .chem-table-head {
    display: none;
  }

  .chem-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 16px;
    border-bottom: 10px solid #f1f6fd;
  }

  .chem-row > div:not(.chem-name-cell):not(.chem-actions) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    color: #334155;
  }

  .chem-row > div:not(.chem-name-cell):not(.chem-actions)::before {
    content: attr(data-label);
    color: #64748b;
    font-weight: 900;
  }

  .chem-name-cell {
    grid-column: 1 / -1;
  }

  .chem-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .chem-actions .btn {
    width: 100%;
  }

  .chem-side-panel {
    grid-template-columns: 1fr;
  }

  .chemical-modal {
    padding: 10px;
  }

  .chemical-modal-card {
    padding: 18px;
    border-radius: 24px;
  }

  .chemical-form {
    grid-template-columns: 1fr;
  }

  .chemical-form .full {
    grid-column: 1;
  }

  #tcMobileBottomNav.tc-mobile-bottom-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  #tcMobileBottomNav .tc-mobile-nav-label {
    font-size: 8.5px !important;
  }
}

/* V3.0 actual lab chemical list fields */
@media (min-width: 761px) {
  .chemical-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.chem-name-cell small {
  word-break: break-word;
}


/* =========================================================
   V3.0 Chemical Inventory UI refinement
   - Remove Added By / Date Added concept
   - Use Shelf No. / Storage Note
   - Closer to rendered desktop + mobile chemical UI
   ========================================================= */

.chem-table-head,
.chem-row {
  grid-template-columns: 1.85fr .95fr .72fr 1.22fr .85fr 1fr .85fr .92fr !important;
}

.chem-table-head span:last-child {
  text-align: right;
}

.chem-actions {
  justify-content: flex-end !important;
}

.chem-name-cell small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.chemical-form {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (max-width: 760px) {
  .chem-table-head {
    display: none !important;
  }

  .chem-row {
    grid-template-columns: 1fr !important;
  }

  .chem-actions {
    justify-content: stretch !important;
  }

  .chemical-form {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   Hazard-Enriched Chemical Section
   ========================================================= */

.hazard-table-head,
.hazard-chem-row {
  grid-template-columns: 1.55fr .85fr .65fr 1.1fr .72fr 1.25fr 1.25fr .75fr !important;
}

.chem-hazard-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1.25;
}

.chem-muted {
  display: block;
  color: #64748b;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
}

.chem-note {
  display: block;
  color: #7c3aed;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 800;
}

.chemical-form #chemicalPPE,
.chemical-form #chemicalHazardNote {
  width: 100%;
}

@media (max-width: 760px) {
  .hazard-table-head {
    display: none !important;
  }

  .hazard-chem-row {
    grid-template-columns: 1fr !important;
  }

  .chem-hazard-chip {
    border-radius: 14px;
    width: 100%;
  }
}


/* Full hazard chemical import fix */
.chemical-import-hint {
  margin: 0;
  padding: 12px 16px;
  color: #475569;
  background: #eff6ff;
  border-bottom: 1px solid #dbeafe;
  font-size: 13px;
}
.chemical-import-hint strong {
  color: #1452d6;
}


/* Chemical import repair panel */
.chemical-repair-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
}
.chemical-repair-panel.hidden {
  display: none !important;
}
.chemical-repair-panel strong {
  color: #102341;
  font-size: 16px;
}
.chemical-repair-panel p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}
@media (max-width: 760px) {
  .chemical-repair-panel {
    display: grid;
    grid-template-columns: 1fr;
  }
  .chemical-repair-panel .btn {
    width: 100%;
  }
}


/* =========================================================
   V3.0 True Mobile Chemical List
   Phone UI is different from desktop table.
   ========================================================= */

.mobile-fix-version {
  display: inline-flex;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #075ee8;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}

@media (max-width: 900px) {
  html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  *, *::before, *::after {
    box-sizing: border-box !important;
  }

  #chemicals.section,
  #chemicals,
  #chemicals .chem-page,
  #chemicals .chem-layout,
  #chemicals .chem-main-panel,
  #chemicals .chem-table-card,
  #chemicals .chemical-list,
  #chemicalList {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  #chemicals.section {
    padding: 10px 10px 90px !important;
  }

  #chemicals .chem-page-head {
    display: block !important;
    margin: 0 0 10px !important;
  }

  #chemicals .chem-kicker {
    font-size: 10px !important;
    letter-spacing: .12em !important;
    margin-bottom: 2px !important;
  }

  #chemicals .chem-page-head h2 {
    font-size: 25px !important;
    line-height: 1.05 !important;
    margin: 0 !important;
    letter-spacing: -0.04em !important;
  }

  #chemicals .chem-page-head p {
    font-size: 12px !important;
    line-height: 1.35 !important;
    margin: 4px 0 0 !important;
  }

  #chemicals .chem-head-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    margin-top: 9px !important;
  }

  #chemicals .chem-head-actions .btn {
    width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 8px !important;
    border-radius: 11px !important;
    font-size: 10.5px !important;
  }

  #chemicals .chem-head-actions #addChemicalBtn {
    grid-column: 1 / -1 !important;
    height: 38px !important;
    min-height: 38px !important;
    font-size: 12px !important;
  }

  #chemicals .chem-head-actions #importHazardListBtn,
  #chemicals .chem-head-actions #exportChemicalsBtn,
  #chemicals .chem-head-actions #importLabChemicalsBtn {
    display: none !important;
  }

  #chemicals .chem-stats-grid {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 0 8px !important;
    margin: 0 0 8px !important;
    scrollbar-width: none !important;
  }

  #chemicals .chem-stats-grid::-webkit-scrollbar,
  #chemicals .chem-filter-pills::-webkit-scrollbar {
    display: none !important;
  }

  #chemicals .chem-stat-card {
    flex: 0 0 128px !important;
    width: 128px !important;
    min-width: 128px !important;
    min-height: 68px !important;
    padding: 8px !important;
    border-radius: 13px !important;
    grid-template-columns: 30px 1fr !important;
    gap: 7px !important;
  }

  #chemicals .chem-stat-icon {
    width: 30px !important;
    height: 30px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
  }

  #chemicals .chem-stat-card small {
    font-size: 9px !important;
    line-height: 1.05 !important;
  }

  #chemicals .chem-stat-card strong {
    font-size: 19px !important;
    line-height: .95 !important;
    margin: 0 !important;
  }

  #chemicals .chem-stat-card p {
    font-size: 9px !important;
    line-height: 1.1 !important;
  }

  #chemicals .chem-search-card {
    padding: 7px !important;
    border-radius: 13px !important;
    margin-bottom: 8px !important;
  }

  #chemicals .chem-search-row {
    grid-template-columns: 1fr 70px !important;
    gap: 6px !important;
  }

  #chemicals .chem-search-field {
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 11px !important;
    padding: 0 9px !important;
  }

  #chemicals .chem-search-field span {
    font-size: 16px !important;
  }

  #chemicals .chem-search-field input {
    font-size: 12px !important;
  }

  #chemicals #chemicalClearFilterBtn {
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 11px !important;
    font-size: 11.5px !important;
    padding: 0 !important;
  }

  #chemicals .chem-filter-pills {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 6px !important;
    padding: 7px 0 0 !important;
    scrollbar-width: none !important;
  }

  #chemicals .chem-pill {
    flex: 0 0 auto !important;
    min-height: 30px !important;
    padding: 5px 10px !important;
    font-size: 10.5px !important;
    white-space: nowrap !important;
  }

  #chemicals .chemical-import-hint,
  #chemicals .chem-table-head,
  #chemicals .hazard-table-head,
  #chemicals .chemical-list > .chem-row,
  #chemicals .chemical-list > .hazard-chem-row {
    display: none !important;
  }

  #chemicals .chemical-repair-panel {
    padding: 9px !important;
    margin: 7px 0 !important;
    border-radius: 13px !important;
  }

  #chemicals .chemical-repair-panel.hidden {
    display: none !important;
  }

  #chemicals .chemical-repair-panel strong {
    font-size: 12px !important;
  }

  #chemicals .chemical-repair-panel p {
    font-size: 10.5px !important;
  }

  #chemicals .chemical-repair-panel .btn {
    height: 34px !important;
    min-height: 34px !important;
    font-size: 10.5px !important;
  }

  #chemicals .chem-table-card {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .tc-phone-chemical-list {
    display: grid !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .tc-phone-chemical-card {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) 68px !important;
    gap: 7px !important;
    align-items: center !important;
    min-height: 62px !important;
    padding: 8px !important;
    border-radius: 13px !important;
    border: 1px solid #dfe8f6 !important;
    background: #fff !important;
    text-align: left !important;
    box-shadow: 0 3px 10px rgba(15, 35, 72, .04) !important;
  }

  .tc-phone-chem-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    display: grid !important;
    place-items: center !important;
    background: #eaf2ff !important;
    color: #075ee8 !important;
    font-size: 14px !important;
  }

  .tc-phone-chemical-card.low .tc-phone-chem-icon { background: #fff3df !important; color: #f28c18 !important; }
  .tc-phone-chemical-card.expired .tc-phone-chem-icon { background: #ffe8e8 !important; color: #e43f3f !important; }
  .tc-phone-chemical-card.restricted .tc-phone-chem-icon { background: #f0e9ff !important; color: #6d35e8 !important; }
  .tc-phone-chemical-card.flammable .tc-phone-chem-icon { background: #e7f8ff !important; color: #1599cc !important; }

  .tc-phone-chem-body {
    min-width: 0 !important;
    display: grid !important;
    gap: 0 !important;
  }

  .tc-phone-chem-body strong {
    color: #102341 !important;
    font-size: 12.1px !important;
    line-height: 1.13 !important;
    font-weight: 1000 !important;
    max-height: 2.26em !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
  }

  .tc-phone-chem-body small {
    color: #6b7890 !important;
    font-size: 10.1px !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .tc-phone-chem-body em {
    color: #64748b !important;
    font-style: normal !important;
    font-size: 9.7px !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .tc-phone-chem-end {
    width: 68px !important;
    min-width: 0 !important;
    display: grid !important;
    justify-items: start !important;
    gap: 2px !important;
  }

  .tc-phone-chem-end > strong {
    color: #102341 !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 1000 !important;
    max-width: 68px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .tc-phone-status {
    width: fit-content !important;
    max-width: 68px !important;
    padding: 3px 6px !important;
    border-radius: 999px !important;
    font-size: 8.5px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .tc-phone-status.available { background: #eafbf0 !important; color: #12934b !important; }
  .tc-phone-status.low-stock { background: #fff3de !important; color: #d97706 !important; }
  .tc-phone-status.expiring-soon { background: #efe9ff !important; color: #6536d6 !important; }
  .tc-phone-status.expired { background: #ffe3e3 !important; color: #e12b2b !important; }
  .tc-phone-status.restricted { background: #efe9ff !important; color: #6536d6 !important; }

  .tc-phone-chem-end em {
    color: #64748b !important;
    font-style: normal !important;
    font-size: 8.6px !important;
    line-height: 1 !important;
    max-width: 68px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #tcMobileBottomNav.tc-mobile-bottom-nav {
    width: calc(100% - 18px) !important;
    left: 9px !important;
    right: 9px !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    padding: 7px !important;
    border-radius: 22px !important;
  }

  #tcMobileBottomNav .tc-mobile-nav-item {
    height: 50px !important;
    min-height: 50px !important;
    border-radius: 16px !important;
  }

  #tcMobileBottomNav .tc-mobile-nav-icon {
    font-size: 18px !important;
  }

  #tcMobileBottomNav .tc-mobile-nav-label {
    font-size: 9.5px !important;
  }

  #tcMobileBottomNav [data-mobile-target="instruments"] .tc-mobile-nav-icon,
  #tcMobileBottomNav [data-mobile-target="chemicals"] .tc-mobile-nav-icon {
    font-size: 0 !important;
  }

  #tcMobileBottomNav [data-mobile-target="instruments"] .tc-mobile-nav-icon::before {
    content: "⚙" !important;
    font-size: 18px !important;
  }

  #tcMobileBottomNav [data-mobile-target="chemicals"] .tc-mobile-nav-icon::before {
    content: "⚗" !important;
    font-size: 18px !important;
  }
}


/* =========================================================
   Booking Instrument V3.1.1
   Mobile Chemical Search Bar Only
   Scope: keep search input + Clear button in one line.
   ========================================================= */

@media (max-width: 900px) {
  #chemicals .chem-search-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 8px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  #chemicals .chem-search-row {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 62px !important;
    gap: 7px !important;
    align-items: center !important;
  }

  #chemicals .chem-search-field {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    border-radius: 13px !important;
    padding: 0 10px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  #chemicals .chem-search-field span {
    flex: 0 0 18px !important;
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    margin-right: 6px !important;
    font-size: 14px !important;
    line-height: 1 !important;
    display: grid !important;
    place-items: center !important;
  }

  #chemicals .chem-search-field input {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    border: 0 !important;
    outline: none !important;
    background: transparent !important;
    font-size: 12.5px !important;
    line-height: 1 !important;
    padding: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #chemicals #chemicalClearFilterBtn {
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 0 !important;
    border-radius: 13px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }
}


/* =========================================================
   Booking Instrument V3.1.2 — Admin Mobile Access
   Adds visible admin access for admin/staff without changing logic.
   ========================================================= */

.profile-admin-shortcut {
  width: 100% !important;
  margin: 0 0 18px !important;
  border-radius: 16px !important;
  min-height: 46px !important;
}

.profile-admin-shortcut.hidden,
.tc-mobile-admin-item.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  body.tc-admin-user #tcMobileBottomNav.tc-mobile-bottom-nav {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }

  body.tc-admin-user #tcMobileBottomNav .tc-mobile-nav-item {
    min-width: 0 !important;
  }

  body.tc-admin-user #tcMobileBottomNav .tc-mobile-nav-label {
    font-size: 9px !important;
  }

  body.tc-admin-user #tcMobileBottomNav .tc-mobile-nav-icon {
    font-size: 17px !important;
  }

  #tcMobileBottomNav .tc-mobile-admin-item:not(.hidden) {
    display: grid !important;
  }
}

@media (min-width: 901px) {
  .profile-admin-shortcut {
    width: auto !important;
    min-width: 220px !important;
    margin: -8px 0 22px !important;
  }
}


/* =========================================================
   Booking Instrument V3.1.3 — Mobile Nav Icon Fix
   Fixes duplicated icons and gives Admin a proper icon.
   ========================================================= */

@media (max-width: 900px) {
  /* Kill old pseudo-icons that created double Tools/Chem icons */
  #tcMobileBottomNav .tc-mobile-nav-icon::before,
  #tcMobileBottomNav .tc-mobile-nav-icon::after {
    content: none !important;
    display: none !important;
  }

  #tcMobileBottomNav .tc-mobile-nav-icon {
    font-size: 18px !important;
    line-height: 1 !important;
    width: 24px !important;
    height: 24px !important;
    display: grid !important;
    place-items: center !important;
    margin: 0 auto 3px !important;
  }

  #tcMobileBottomNav .tc-mobile-nav-label {
    font-size: 9.5px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  #tcMobileBottomNav .tc-mobile-nav-item {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  /* Admin/staff: 7 nav items, still one line */
  body.tc-admin-user #tcMobileBottomNav.tc-mobile-bottom-nav {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 1px !important;
  }

  body.tc-admin-user #tcMobileBottomNav .tc-mobile-nav-icon {
    font-size: 16px !important;
    width: 22px !important;
    height: 22px !important;
  }

  body.tc-admin-user #tcMobileBottomNav .tc-mobile-nav-label {
    font-size: 8.5px !important;
  }

  #tcMobileBottomNav .tc-mobile-admin-item:not(.hidden) {
    display: grid !important;
  }

  #tcMobileBottomNav .tc-mobile-admin-item.hidden {
    display: none !important;
  }
}


/* =========================================================
   Booking Instrument V3.1.4 — User Mobile Nav Icon Fix
   Only fixes disappeared Tools/Chem/Admin icons in mobile navbar.
   ========================================================= */

@media (max-width: 900px) {
  #tcMobileBottomNav .tc-mobile-nav-icon::before,
  #tcMobileBottomNav .tc-mobile-nav-icon::after {
    content: none !important;
    display: none !important;
  }

  #tcMobileBottomNav [data-mobile-target="dashboard"] .tc-mobile-nav-icon,
  #tcMobileBottomNav [data-mobile-target="instruments"] .tc-mobile-nav-icon,
  #tcMobileBottomNav [data-mobile-target="booking"] .tc-mobile-nav-icon,
  #tcMobileBottomNav [data-mobile-target="chemicals"] .tc-mobile-nav-icon,
  #tcMobileBottomNav [data-mobile-target="mybookings"] .tc-mobile-nav-icon,
  #tcMobileBottomNav [data-mobile-target="profile"] .tc-mobile-nav-icon,
  #tcMobileBottomNav [data-mobile-target="admin"] .tc-mobile-nav-icon {
    font-size: 18px !important;
    line-height: 1 !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    display: grid !important;
    place-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: currentColor !important;
    margin: 0 auto 3px !important;
  }

  body.tc-admin-user #tcMobileBottomNav [data-mobile-target="dashboard"] .tc-mobile-nav-icon,
  body.tc-admin-user #tcMobileBottomNav [data-mobile-target="instruments"] .tc-mobile-nav-icon,
  body.tc-admin-user #tcMobileBottomNav [data-mobile-target="booking"] .tc-mobile-nav-icon,
  body.tc-admin-user #tcMobileBottomNav [data-mobile-target="chemicals"] .tc-mobile-nav-icon,
  body.tc-admin-user #tcMobileBottomNav [data-mobile-target="mybookings"] .tc-mobile-nav-icon,
  body.tc-admin-user #tcMobileBottomNav [data-mobile-target="profile"] .tc-mobile-nav-icon,
  body.tc-admin-user #tcMobileBottomNav [data-mobile-target="admin"] .tc-mobile-nav-icon {
    font-size: 16px !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
  }
}
