/* ============================================================
   app.css — Mechatronics Lab Management System
   Theme: Warm Orange + White (matches logo)
   ============================================================ */

/* Local Noto Sans Thai font */
@font-face {
  font-family: 'Noto Sans Thai';
  src: url('../fonts/noto-sans-thai/NotoSansThai-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans Thai';
  src: url('../fonts/noto-sans-thai/NotoSansThai-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans Thai';
  src: url('../fonts/noto-sans-thai/NotoSansThai-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans Thai';
  src: url('../fonts/noto-sans-thai/NotoSansThai-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans Thai';
  src: url('../fonts/noto-sans-thai/NotoSansThai-ExtraBold.ttf') format('truetype');
  font-weight: 800 900;
  font-style: normal;
  font-display: swap;
}

/* -------------------------------------------------------
   CSS Variables — Orange / White theme
   ------------------------------------------------------- */
:root {
  /* Brand — ส้มจาก logo */
  --brand:       #E8893A;
  --brand-dark:  #C96A1A;
  --brand-light: #FFF1E6;
  --brand-mid:   #F5A962;

  /* Backgrounds */
  --bg:          #F7F3EF;
  --panel:       #FFFFFF;
  --panel-2:     #FFF8F3;
  --panel-3:     #FFF1E6;

  /* Text */
  --text:        #1C1410;
  --text-2:      #4A3728;
  --muted:       #8B6F5E;

  /* Borders */
  --line:        #E8D5C4;
  --line-2:      #F0E0D0;

  /* Status */
  --green:       #16a34a;
  --green-light: #dcfce7;
  --danger:      #dc2626;
  --danger-light:#fee2e2;
  --warn:        #d97706;
  --warn-light:  #fef3c7;
  --blue:        #2563eb;
  --blue-light:  #dbeafe;

  /* Shadows */
  --shadow-sm:   0 1px 2px rgba(0,0,0,.05);
  --shadow:      0 2px 8px rgba(140,80,30,.08), 0 1px 3px rgba(0,0,0,.05);
  --shadow-md:   0 4px 16px rgba(140,80,30,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:   0 8px 24px rgba(140,80,30,.12), 0 4px 12px rgba(0,0,0,.07);

  /* Layout */
  --radius:      14px;
  --radius-sm:   8px;
  --radius-pill: 999px;

  /* Typography */
  --font-base:   14px;
  --font-nav:    14px;
  --font-h1:     24px;
  --font-title:  18px;
}

/* -------------------------------------------------------
   Reset & Base
   ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; margin: 0; }

body {
  margin: 0;
  padding: 28px 20px 48px;
  font-family: 'Noto Sans Thai', 'Segoe UI', ui-sans-serif, system-ui, Roboto, sans-serif;
  font-size: var(--font-base);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

/* Warm gradient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 900px 500px at 80% -10%, rgba(232,137,58,.12), transparent 60%),
    radial-gradient(ellipse 700px 600px at -10% 80%, rgba(245,169,98,.08), transparent 55%),
    linear-gradient(160deg, #FAF5F0 0%, #F7F2EC 50%, #F5EDE5 100%);
}

body, button, input, select, textarea { font-family: 'Noto Sans Thai', 'Segoe UI', ui-sans-serif, system-ui, Roboto, sans-serif; }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--brand-dark); }

/* -------------------------------------------------------
   Layout
   ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* -------------------------------------------------------
   Headings
   ------------------------------------------------------- */
h1, .h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.5px;
}

h2, .h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--text-2); }

/* -------------------------------------------------------
   Card
   ------------------------------------------------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 2px 8px rgba(140,80,30,.08), 0 1px 3px rgba(0,0,0,.05);
}

/* -------------------------------------------------------
   Form / Input
   ------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 12px; }

label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

input[type="text"], input[type="password"], input[type="number"],
input[type="date"], input[type="email"], input[type="search"],
select, textarea {
  width: 100%;
  max-width: 360px;
  padding: 9px 12px;
  font-size: var(--font-base);
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232,137,58,.18);
}

input::placeholder, textarea::placeholder { color: var(--muted); }
select { cursor: pointer; }

/* -------------------------------------------------------
   Buttons
   ------------------------------------------------------- */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  font-size: var(--font-base);
  font-family: inherit;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all .2s ease;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 3px 10px rgba(232,137,58,.30);
}
button:hover, .btn:hover {
  background: var(--brand-dark);
  box-shadow: 0 5px 16px rgba(201,106,26,.35);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}
button:active, .btn:active { transform: translateY(0); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }

.btn-secondary {
  background: var(--panel);
  color: var(--text-2);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--panel-3);
  border-color: var(--brand);
  color: var(--brand-dark);
  box-shadow: var(--shadow);
}

.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 3px 10px rgba(220,38,38,.25); }
.btn-danger:hover { background: #b91c1c; color: #fff; box-shadow: 0 5px 14px rgba(185,28,28,.35); }

.btn-subtle {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--panel-3);
  border: 1.5px solid var(--brand-light);
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: .2s ease;
}
.btn-subtle:hover { background: var(--brand-light); border-color: var(--brand-mid); transform: translateY(-1px); text-decoration: none; }

.btn-approve {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 18px; font-size: 13px; font-weight: 700;
  color: #fff; background: var(--brand);
  border-radius: var(--radius-pill); border: none;
  cursor: pointer; transition: .2s ease;
  box-shadow: 0 3px 10px rgba(232,137,58,.25);
}
.btn-approve:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 5px 14px rgba(201,106,26,.35); }

.btn-reject {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 18px; font-size: 13px; font-weight: 700;
  color: #fff; background: var(--danger);
  border-radius: var(--radius-pill); border: none;
  cursor: pointer; transition: .2s ease;
  box-shadow: 0 3px 10px rgba(220,38,38,.25);
}
.btn-reject:hover { background: #b91c1c; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(185,28,28,.35); }

/* -------------------------------------------------------
   Flash / Alert messages
   ------------------------------------------------------- */
.flash, .flash-ok, .flash-err, .alert-info, .alert-error {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: var(--font-base);
  font-weight: 500;
  border-left: 4px solid;
}

.flash-ok, .alert-info {
  background: var(--blue-light);
  border-color: var(--blue);
  color: #1e40af;
}

.flash-err, .alert-error {
  background: var(--danger-light);
  border-color: var(--danger);
  color: #991b1b;
}

.flash-warn {
  background: var(--warn-light);
  border-color: var(--warn);
  color: #92400e;
}

.badge-info {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
}

/* -------------------------------------------------------
   Table
   ------------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

table, .table {
  border-collapse: collapse;
  width: 100%;
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: var(--font-base);
}

.table thead th, thead th, th {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.table tbody td, tbody td, td {
  background: var(--panel);
  padding: 11px 14px;
  color: var(--text);
  border-bottom: 1px solid var(--line-2);
}

.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr:hover td, tbody tr:hover td {
  background: var(--brand-light);
}

.nowrap { white-space: nowrap; }
.muted  { color: var(--muted); }
.text-center { text-align: center; }

/* -------------------------------------------------------
   NAV — Top navigation bar
   ------------------------------------------------------- */
.nav {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 20px;
  padding: 12px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, #E8893A 0%, #D4721C 60%, #C0600E 100%);
  box-shadow: 0 6px 24px rgba(200,90,20,.28), 0 2px 8px rgba(0,0,0,.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.nav .left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.nav .right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Logo */
.logo-box { display: flex; align-items: center; gap: 10px; }
.logo-box.vertical { flex-direction: column; align-items: center; gap: 6px; }
.logo-title { font-size: 17px; font-weight: 800; color: #fff; letter-spacing: .3px; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.2); }
.logo-link  { display: flex; align-items: center; padding: 0; background: transparent; border: none; box-shadow: none; }
.logo-img   { width: 48px; height: 48px; object-fit: cover; border-radius: 12px; display: block; border: 2px solid rgba(255,255,255,.45); box-shadow: 0 2px 8px rgba(0,0,0,.2); }

/* Nav groups */
.nav-groups { display: flex; flex-direction: column; gap: 5px; }
.nav-row    { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nav-links  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Nav links */
.nav-links a,
.nav-row a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(255,255,255,.18);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,.30);
  color: #fff;
  text-decoration: none;
  transition: all .2s ease;
  backdrop-filter: blur(4px);
}

.nav-links a:hover,
.nav-row a:hover {
  background: rgba(255,255,255,.32);
  border-color: rgba(255,255,255,.55);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.15);
}

.nav-links a.active,
.nav-row a.active {
  background: rgba(255,255,255,.95);
  border-color: #fff;
  color: var(--brand-dark);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* Admin-style nav pills */
.nav-links a.admin-menu,
.nav-row a.admin-menu {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.50);
  color: #fff8f0;
  font-weight: 700;
}
.nav-links a.admin-menu:hover,
.nav-row a.admin-menu:hover {
  background: rgba(255,255,255,.25);
  border-color: #fff;
  color: #fff;
}

/* Nav brand */
.nav-brand {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.nav-brand:hover { text-decoration: none; color: #fff8f0; }

.nav-link {
  display: inline-flex; align-items: center;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,.18);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,.30);
  color: #fff;
  text-decoration: none;
  transition: .2s ease;
}
.nav-link:hover { background: rgba(255,255,255,.30); transform: translateY(-1px); text-decoration: none; color: #fff; }
.nav-link.active { background: rgba(255,255,255,.95); color: var(--brand-dark); font-weight: 700; }

.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-user  { font-size: 13px; color: rgba(255,255,255,.85); white-space: nowrap; }

/* User box */
.user-box  { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.user-label{ font-size: 13px; color: rgba(255,255,255,.85); white-space: nowrap; font-weight: 500; }

/* Logout */
.btn-logout {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 16px; font-size: 13px; font-weight: 700;
  color: var(--brand-dark);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.80);
  border-radius: var(--radius-pill);
  text-decoration: none; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  transition: .2s ease;
}
.btn-logout:hover {
  background: #fff;
  color: var(--danger);
  box-shadow: 0 4px 12px rgba(0,0,0,.20);
  transform: translateY(-1px);
  text-decoration: none;
}

/* PC wider nav */
@media (min-width: 1024px) {
  .nav-links a, .nav-row a, .nav-link { font-size: 14px; padding: 8px 18px; }
}

/* Mobile */
@media (max-width: 768px) {
  .nav { flex-direction: column; align-items: center; gap: 10px; padding: 12px 14px; }
  .nav .left { flex-direction: column; align-items: center; width: 100%; }
  .nav .right { width: 100%; justify-content: center; }
  .nav-groups { width: 100%; }
  .nav-row { justify-content: center; width: 100%; }
  .nav-row a, .nav-links a { flex: 1 1 auto; min-width: 120px; }
}

/* -------------------------------------------------------
   DASHBOARD — navbar + menu
   ------------------------------------------------------- */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; margin-bottom: 28px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(200,90,20,.28);
}

.navbar-brand {
  font-size: 18px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.navbar-user {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; color: rgba(255,255,255,.85);
}

.dashboard-container {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.menu-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow .2s ease;
}
.menu-section:hover { box-shadow: var(--shadow-md); }

.menu-section h3 {
  margin: 0 0 8px;
  font-size: 14px; font-weight: 700;
  color: var(--brand-dark);
  border-bottom: 2px solid var(--brand-light);
  padding-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.menu-card {
  display: flex; align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s ease;
  gap: 8px;
}
.menu-card::before { content: "›"; font-size: 16px; color: var(--brand); font-weight: 900; }
.menu-card:hover {
  background: var(--brand-light);
  border-color: var(--brand);
  color: var(--brand-dark);
  transform: translateX(4px);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

/* -------------------------------------------------------
   LOGIN page
   ------------------------------------------------------- */
body.page-login {
  padding: 0; min-height: 100vh;
  display: grid; place-items: start center; padding-top: 8vh;
  background:
    radial-gradient(ellipse 900px 600px at 60% 0%, rgba(232,137,58,.18), transparent 55%),
    radial-gradient(ellipse 600px 500px at 0% 90%, rgba(245,169,98,.12), transparent 50%),
    linear-gradient(160deg, #FAF5F0, #F0E6DC);
}

body.page-login .container { max-width: 440px; width: 100%; margin: 0; padding: 0 16px; }

body.page-login .login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

body.page-login .login-brand-logo {
  width: 104px;
  height: 104px;
  object-fit: contain;
  display: block;
  border-radius: 22px;
  background: #fff;
  padding: 9px;
  box-shadow: 0 14px 34px rgba(140,80,30,.14);
  border: 1px solid var(--line);
}

body.page-login .h1, body.page-login h1 {
  text-align: center; margin: 0; font-size: 21px; color: var(--text);
  letter-spacing: .14em;
  font-weight: 800;
}

body.page-login .login-subtitle {
  text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 20px;
}

body.page-login .login-logo {
  display: flex; justify-content: center; margin-bottom: 20px;
}

body.page-login .login-card,
body.page-login .card.login-card {
  padding: 28px 28px 24px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(140,80,30,.14), 0 4px 12px rgba(0,0,0,.07);
}

body.page-login .login-card .form-row {
  display: flex; flex-direction: column; gap: 14px;
}

body.page-login label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }

body.page-login input {
  width: 100%; max-width: 100%; padding: 11px 14px;
  border-radius: 10px; font-size: 15px;
  border: 1.5px solid var(--line);
  background: var(--panel-2);
}

body.page-login input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232,137,58,.18);
  background: #fff;
}

body.page-login .login-card .form-actions { margin-top: 6px; }

body.page-login .login-card button,
body.page-login .login-card .btn {
  width: 100%; height: 46px; border-radius: 12px; font-size: 15px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; font-weight: 700; border: none;
  box-shadow: 0 4px 14px rgba(232,137,58,.40);
  transition: all .2s ease;
}
body.page-login .login-card button:hover {
  box-shadow: 0 6px 20px rgba(201,106,26,.50);
  transform: translateY(-1px);
}

body.page-login .login-card .login-note {
  margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center;
}
body.page-login .login-card .login-note a { color: var(--brand-dark); font-weight: 600; }

/* -------------------------------------------------------
   Calendar (Schedule)
   ------------------------------------------------------- */
table.calendar {
  width: 100%; margin-top: 10px; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
table.calendar th {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; font-size: 13px; height: 34px; text-align: center;
}
table.calendar td {
  vertical-align: top; padding: 8px; height: 130px; font-size: 12px;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line-2);
}
table.calendar td:hover { background: var(--brand-light); }

.day-num   { font-weight: 800; margin-bottom: 4px; color: var(--brand-dark); }
.slot-block {
  margin-bottom: 5px; padding: 5px 7px; border-radius: 7px;
  background: var(--brand-light); border: 1px solid rgba(232,137,58,.25);
}
.slot-time  { font-weight: 700; margin-bottom: 3px; color: var(--brand-dark); font-size: 11px; }
.slot-room-line {
  font-size: 11px; padding: 3px 7px; border-radius: var(--radius-pill);
  margin-bottom: 3px; color: var(--text-2);
  background: rgba(255,255,255,.7);
  border: 1px solid transparent;
}
.slot-room-line.busy {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; font-weight: 700; border-color: transparent;
}

.inline-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-row .form-group { flex: 0 0 auto; }
.date-time-row .form-group:nth-child(1) { min-width: 190px; }
.date-time-row .form-group:nth-child(2) { min-width: 230px; }
.date-time-row button { flex: 0 0 auto; margin-bottom: 2px; white-space: nowrap; }

/* -------------------------------------------------------
   Inventory cards
   ------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin-top: 12px;
}

.product-card {
  background: var(--panel);
  border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: all .2s ease;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
  transform: translateY(-2px);
}
.product-card.active {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(22,163,74,.20), var(--shadow);
  background: #f0fdf4;
}

.product-card img {
  width: 100%; height: 140px; object-fit: cover;
  border-radius: 8px; margin-bottom: 10px;
  border: 1px solid var(--line-2);
}

.product-name  { font-size: 14px; font-weight: 700; margin: 4px 0 2px; color: var(--text); }
.product-desc  { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.product-meta  { font-size: 12px; margin-bottom: 6px; color: var(--text-2); }
.product-qty   {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: auto; font-size: 14px;
}
.product-qty input[type="number"] {
  width: 72px; padding: 5px 8px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--line); background: #fff; color: var(--text);
  font-size: 14px; text-align: center; max-width: 72px;
}
.product-qty input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.product-qty input[type="number"]::-webkit-outer-spin-button,
.product-qty input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.product-qty input[type="number"]:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,137,58,.15); }

/* Store select buttons */
.store-actions { display: flex; flex-direction: column; gap: 12px; }
.store-actions .btn { height: 48px; border-radius: 12px; font-size: 15px; font-weight: 600; transition: .18s ease; }

.btn-room {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff; border: none;
  box-shadow: 0 3px 10px rgba(59,130,246,.30);
}
.btn-room:hover { box-shadow: 0 6px 18px rgba(29,78,216,.40); transform: translateY(-1px); }

.btn-f3 {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; border: none;
  box-shadow: 0 3px 10px rgba(232,137,58,.30);
}
.btn-f3:hover { box-shadow: 0 6px 18px rgba(201,106,26,.40); transform: translateY(-1px); }

.btn-f6 {
  background: linear-gradient(135deg, #c2410c, #9a3412);
  color: #fff; border: none;
  box-shadow: 0 3px 10px rgba(194,65,12,.30);
}
.btn-f6:hover { box-shadow: 0 6px 18px rgba(154,52,18,.40); transform: translateY(-1px); }

/* -------------------------------------------------------
   TOPBAR — QR borrow pages header
   ------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 20px;
  margin-bottom: 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, #E8893A 0%, #D4721C 60%, #C0600E 100%);
  box-shadow: 0 6px 24px rgba(200,90,20,.28), 0 2px 8px rgba(0,0,0,.1);
  flex-wrap: wrap;
}

/* Brand with logo */
.brand-with-logo {
  display: flex; align-items: center; gap: 10px;
}

.brand-logo {
  display: flex; align-items: center; padding: 0;
  background: transparent; border: none; box-shadow: none;
  text-decoration: none;
}

.topbar-logo {
  width: 44px; height: 44px; object-fit: cover;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,.40);
  display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: transform .2s ease;
}

.brand-logo:hover .topbar-logo {
  transform: scale(1.08);
}

.brand {
  font-size: 18px; font-weight: 800; color: #fff;
  text-decoration: none; white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.brand:hover { color: #fff8f0; text-decoration: none; }

.topbar nav {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.topbar nav a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 16px; font-size: 13px; font-weight: 600; white-space: nowrap;
  background: rgba(255,255,255,.18);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,.30);
  color: #fff; text-decoration: none;
  transition: all .2s ease; backdrop-filter: blur(4px);
}
.topbar nav a:hover {
  background: rgba(255,255,255,.32);
  border-color: rgba(255,255,255,.55);
  transform: translateY(-1px);
  text-decoration: none; color: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.15);
}
.topbar nav a.active {
  background: rgba(255,255,255,.95);
  border-color: #fff;
  color: var(--brand-dark);
  font-weight: 700;
}

@media (max-width: 768px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px 14px; }
  .topbar nav { width: 100%; }
}

/* -------------------------------------------------------
   QR / Scan pages
   ------------------------------------------------------- */
.qr-scan-box {
  background: var(--panel);
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

/* -------------------------------------------------------
   Page header strip
   ------------------------------------------------------- */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--brand-light);
}
.page-header h2, .page-header .h2 { margin: 0; }

/* -------------------------------------------------------
   Pagination
   ------------------------------------------------------- */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--panel);
  color: var(--text-2);
  font-size: 13px; font-weight: 600;
  text-decoration: none; transition: .18s ease;
}
.pagination a:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand-dark); text-decoration: none; }
.pagination .active { background: var(--brand); border-color: var(--brand-dark); color: #fff; }

/* -------------------------------------------------------
   Status badges
   ------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.badge-pending  { background: var(--warn-light);   color: #92400e; border: 1px solid #fcd34d; }
.badge-approved { background: var(--green-light);  color: #14532d; border: 1px solid #86efac; }
.badge-return   { background: var(--blue-light);   color: #1e3a8a; border: 1px solid #93c5fd; }
.badge-returned { background: #f3f4f6;             color: #374151; border: 1px solid #d1d5db; }
.badge-rejected { background: var(--danger-light); color: #7f1d1d; border: 1px solid #fca5a5; }

/* Audit log source tags */
.src-inv   { background: #fff7ed; color: #c2410c; border: 1px solid #fdba74; border-radius: var(--radius-pill); padding: 2px 8px; font-size: 11px; font-weight: 700; }
.src-sched { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; border-radius: var(--radius-pill); padding: 2px 8px; font-size: 11px; font-weight: 700; }
.src-qr    { background: var(--blue-light); color: #1d4ed8; border: 1px solid #93c5fd; border-radius: var(--radius-pill); padding: 2px 8px; font-size: 11px; font-weight: 700; }
.src-sys   { background: #f5f3ff; color: #5b21b6; border: 1px solid #c4b5fd; border-radius: var(--radius-pill); padding: 2px 8px; font-size: 11px; font-weight: 700; }

/* -------------------------------------------------------
   Misc
   ------------------------------------------------------- */
.footer {
  text-align: center; margin-top: 32px; padding: 12px 0;
  font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-2);
}

.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.center { text-align: center; }

/* QR Borrow — scan box (ช่องสแกนบัตร) */
.card form { display: block; width: 100%; }

input.scan-box {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  font-size: 22px !important;
  padding: 24px 28px !important;
  border-radius: 14px !important;
  border: 2px solid #E8D5C4 !important;
  background: #fff !important;
  color: var(--text) !important;
  outline: none !important;
  transition: border-color .2s, box-shadow .2s;
  text-align: center !important;
  box-sizing: border-box !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
input.scan-box::placeholder { color: var(--muted); font-size: 16px; font-weight: 500; }
input.scan-box:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(232,137,58,.20), 0 4px 16px rgba(232,137,58,.15) !important;
}

/* ══════════════════════════════════════════════════════════════
   REDESIGNED LAYOUT — Full Type A (Modern Professional)
   ══════════════════════════════════════════════════════════════ */

/* ─── HERO SECTION (Two Column) ─────────────────────────────── */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 48px;
  padding: 40px 0;
}

.hero-left {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-icon {
  width: 160px;
  height: 160px;
  border-radius: 20px;
  background: linear-gradient(135deg, #FFEAD1 0%, #FFE0BB 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  color: var(--brand);
  box-shadow: 0 8px 32px rgba(232,137,58,.15);
}

.hero-right h1 {
  font-size: 38px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero-right p {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.8;
  margin: 0;
}

/* ─── SCAN SECTION ──────────────────────────────────────────── */
.scan-section {
  background: linear-gradient(135deg, #FFEAD1 0%, #FFE0BB 100%);
  border-radius: 24px;
  padding: 40px 36px;
  text-align: center;
  margin-bottom: 48px;
  box-shadow: 0 8px 32px rgba(232,137,58,.12);
  border-left: 6px solid var(--brand);
}

.scan-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.scan-header i {
  font-size: 28px;
  color: var(--brand);
}

.scan-header span {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.scan-subtitle {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 24px;
}

.scan-section form {
  margin-bottom: 20px;
}

.scan-box {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  font-size: 20px !important;
  padding: 28px 32px !important;
  border-radius: 16px !important;
  border: 2px solid #fff !important;
  background: #fff !important;
  color: var(--text) !important;
  outline: none !important;
  transition: all .2s;
  text-align: center !important;
  box-sizing: border-box !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  font-weight: 600;
}

.scan-box::placeholder {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

.scan-box:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 4px rgba(232,137,58,.20), 0 8px 24px rgba(232,137,58,.15) !important;
}

.scan-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 24px;
  color: var(--brand);
  opacity: 0.6;
}

/* ─── PROCESS STEPS ─────────────────────────────────────────── */
.process-section {
  margin-bottom: 48px;
}

.process-section h2 {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 40px;
}

.process-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.process-step {
  flex: 0 0 auto;
  width: 140px;
  text-align: center;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  margin: 0 auto 12px;
}

.step-icon {
  font-size: 48px;
  color: var(--brand);
  margin-bottom: 12px;
}

.process-step h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.process-step p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.step-arrow {
  font-size: 24px;
  color: var(--brand);
  opacity: 0.5;
  flex: 0 0 auto;
}

/* ─── ACTION CARDS SECTION ──────────────────────────────────── */
.action-cards-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.action-card {
  background: #fff;
  border: 2px solid #E8D5C4;
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  transition: all .2s ease;
  box-shadow: 0 2px 8px rgba(140,80,30,.06);
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(140,80,30,.12);
  border-color: var(--brand);
}

.action-card-primary {
  border-color: var(--brand);
  background: linear-gradient(135deg, #FFF8F3 0%, #fff 100%);
}

.action-card-primary:hover {
  background: #FFF1E6;
}

.action-card-secondary {
  border-color: #93C5FD;
  background: linear-gradient(135deg, #EFF6FF 0%, #fff 100%);
}

.action-card-secondary:hover {
  background: #DBEAFE;
  border-color: #3B82F6;
}

.card-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.action-card-primary .card-icon {
  color: var(--brand);
}

.action-card-secondary .card-icon {
  color: #3B82F6;
}

.action-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
}

.action-card p {
  font-size: 14px;
  color: var(--text-2);
  margin: 0 0 16px;
  line-height: 1.6;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s;
}

.action-card-primary .card-link {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(232,137,58,.25);
}

.action-card-primary .card-link:hover {
  box-shadow: 0 6px 20px rgba(232,137,58,.35);
  transform: translateY(-1px);
}

.action-card-secondary .card-link {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59,130,246,.25);
}

.action-card-secondary .card-link:hover {
  box-shadow: 0 6px 20px rgba(59,130,246,.35);
  transform: translateY(-1px);
}

/* ─── ADMIN CARD ────────────────────────────────────────────── */
.card-admin {
  margin-bottom: 0;
}

/* ─── Card with gradient top accent ────────────────────────────── */
.card-decorated {
  position: relative;
  overflow: hidden;
}
.card-decorated::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-mid), var(--brand));
}

/* QR Borrow — Action Buttons (secondary) */
.big-action {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.big-action a,
.big-action button {
  display: flex; align-items: center; justify-content: center;
  min-height: 100px;
  font-size: 20px; font-weight: 700;
  border-radius: 16px;
  background: #FFF5E8;
  border: 2px solid #F5A962;
  color: var(--brand-dark);
  text-decoration: none;
  transition: all .2s ease;
  box-shadow: 0 2px 8px rgba(232,137,58,.10);
  padding: 14px;
}
.big-action a:hover,
.big-action button:hover {
  background: #FFF1E6;
  border-color: var(--brand);
  color: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(232,137,58,.20);
  text-decoration: none;
}

.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* Empty state */
.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--muted); font-size: 15px;
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: .4; }

/* -------------------------------------------------------
   Mobile
   ------------------------------------------------------- */
@media (max-width: 768px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 36px;
    padding: 24px 0;
  }

  .hero-icon {
    width: 120px;
    height: 120px;
    font-size: 60px;
  }

  .hero-right h1 {
    font-size: 28px;
  }

  .process-steps {
    flex-direction: column;
    gap: 0;
  }

  .step-arrow {
    transform: rotate(90deg);
    margin: 12px 0;
  }

  .action-cards-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  table, .table { font-size: 12px; }
  th, td { padding: 8px 8px !important; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .menu-grid { grid-template-columns: 1fr 1fr; }

  .hero-right h1 {
    font-size: 26px;
  }

  .scan-section {
    padding: 28px 24px;
  }

  .scan-box {
    font-size: 18px !important;
    padding: 20px 24px !important;
  }

  .step-icon {
    font-size: 40px;
  }

  .action-card {
    padding: 24px 16px;
  }

  .card-icon {
    font-size: 48px;
  }
}

@media (max-width: 480px) {
  body { padding: 16px 12px 32px; }
  body.page-login .container { padding: 0 12px; }
  body.page-login { padding-top: 4vh; }
  .menu-grid { grid-template-columns: 1fr; }
  .nav { border-radius: 14px; }

  .hero-section {
    gap: 20px;
    margin-bottom: 28px;
  }

  .hero-right h1 {
    font-size: 24px;
  }

  .hero-right p {
    font-size: 14px;
  }

  .scan-section {
    padding: 20px 16px;
    margin-bottom: 32px;
  }

  .scan-header span {
    font-size: 18px;
  }

  .scan-subtitle {
    font-size: 14px;
  }

  .scan-icons {
    gap: 16px;
    font-size: 20px;
  }

  .process-section h2 {
    font-size: 22px;
    margin-bottom: 28px;
  }

  .process-step {
    width: 100px;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .step-icon {
    font-size: 36px;
  }

  .action-card {
    padding: 20px 12px;
  }

  .card-icon {
    font-size: 40px;
  }

  .action-card h3 {
    font-size: 16px;
  }

  .action-card p {
    font-size: 13px;
  }
}

/* -------------------------------------------------------
   flyelab landing page
   ------------------------------------------------------- */
body.flye-home {
  padding: 8px 18px 10px;
  background: #fff8f2;
  color: #222;
}

body.flye-home::before {
  background:
    radial-gradient(ellipse 900px 520px at 12% 0%, rgba(255,132,20,.10), transparent 58%),
    radial-gradient(ellipse 800px 560px at 92% 18%, rgba(255,132,20,.09), transparent 56%),
    linear-gradient(180deg, #fffaf5 0%, #fff8f2 48%, #fff4ec 100%);
}

.flye-wrap {
  width: min(1450px, 94vw);
  margin: 0 auto;
}

.flye-svg-icon {
  width: 1em;
  height: 1em;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.flye-navbar {
  min-height: 60px;
  padding: 8px 28px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(90deg, #ff7200, #e95c00);
  box-shadow: 0 12px 28px rgba(234, 92, 0, .24);
}

.flye-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.flye-brand:hover {
  color: #fff;
  text-decoration: none;
}

.flye-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  padding: 5px;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(120, 44, 0, .18);
}

.flye-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.flye-nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.flye-nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  padding: 10px 0;
  border-radius: 18px;
  transition: background .18s ease, transform .18s ease, opacity .18s ease;
}

.flye-nav-links a:hover {
  color: #fff;
  text-decoration: none;
  opacity: .9;
  transform: translateY(-1px);
}

.flye-nav-links a.login {
  padding: 9px 18px;
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}

.flye-alert {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 700;
  background: #fff;
  border: 1px solid #ffd8bd;
  box-shadow: 0 8px 22px rgba(0,0,0,.055);
}

.flye-alert-error {
  color: #991b1b;
  border-color: #fecaca;
  background: #fff5f5;
}

.flye-alert-success,
.flye-alert-ok {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.flye-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  border: 1px solid rgba(255, 216, 189, .38);
  margin-top: 12px;
}

.flye-hero {
  display: block;
  padding: 22px 56px 24px;
}

.flye-hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flye-hero-art img {
  width: min(245px, 100%);
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(120,44,0,.10));
}

.flye-hero-content {
  text-align: center;
  width: 100%;
}

.flye-hero h1 {
  margin: 0 0 6px;
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0;
  color: #222;
}

.flye-hero h1 span {
  color: #f26a00;
}

.flye-hero p {
  margin: 0;
  color: #4c4c4c;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.45;
}

.flye-scan-form {
  width: min(1120px, 100%);
  margin: 18px auto 0;
}

.flye-scan-box {
  width: 100%;
  min-height: 66px;
  border: 2px solid #ff6a00;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 20px;
  background: #fff;
  color: #666;
  box-shadow: 0 8px 22px rgba(255,106,0,.10);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.flye-scan-box:focus-within {
  border-color: #e95c00;
  box-shadow: 0 0 0 4px rgba(255,106,0,.14), 0 12px 28px rgba(255,106,0,.16);
  transform: translateY(-1px);
}

.flye-scan-mini {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff1e8;
  color: #ff6a00;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: 0 0 auto;
}

.flye-scan-box input {
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #26201c;
  font-size: clamp(16px, 1.25vw, 19px);
  font-weight: 600;
  text-align: left;
  box-shadow: none;
  outline: none;
}

.flye-scan-box input:focus {
  border: 0;
  box-shadow: none;
}

.flye-scan-box input::placeholder {
  color: #777;
  font-weight: 600;
}

.flye-steps {
  padding: 20px 28px 18px;
}

.flye-steps h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  color: #171717;
  font-size: clamp(20px, 1.7vw, 24px);
  font-weight: 800;
}

.flye-title-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #ff6a00;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex: 0 0 auto;
}

.flye-step-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr) 40px minmax(0, 1fr) 210px;
  gap: 16px;
  align-items: center;
}

.flye-step-box {
  min-height: 132px;
  border: 1px solid #ffd8bd;
  border-radius: 18px;
  background: #fffaf6;
  padding: 16px;
  display: flex;
  gap: 12px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(255,106,0,.035);
}

.flye-step-number {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff9d2c, #ff6200);
  color: #fff;
  font-size: 25px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  box-shadow: 0 10px 18px rgba(255,98,0,.22);
}

.flye-step-content h3,
.flye-ready h3 {
  margin: 0 0 6px;
  color: #111;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.flye-step-content p,
.flye-ready p {
  margin: 0;
  color: #555;
  font-size: 13px;
  line-height: 1.42;
}

.flye-step-content img {
  display: block;
  margin-top: 8px;
  max-width: 132px;
  max-height: 52px;
  object-fit: contain;
}

.flye-step-arrow {
  text-align: center;
  color: #ff6a00;
  font-size: 30px;
}

.flye-step-divider {
  display: none;
}

.flye-ready {
  min-height: 132px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fffaf6 0%, #fff 100%);
  border: 1px solid #ffd8bd;
  box-shadow: 0 8px 18px rgba(255,106,0,.035);
}

.flye-ready h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 21px;
}

.flye-ready h3 i {
  color: #ff6a00;
}

.flye-ready h3 .flye-svg-icon {
  color: #ff6a00;
}

.flye-ready img {
  width: 76px;
  margin-top: 8px;
  display: block;
  object-fit: contain;
}

.flye-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.flye-action-card {
  min-height: 82px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #ffd8bd;
  box-shadow: 0 6px 20px rgba(0,0,0,.055);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 24px;
  text-decoration: none;
  color: #222;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.flye-action-card:hover {
  color: #222;
  text-decoration: none;
  transform: translateY(-3px);
  border-color: #ff9d2c;
  box-shadow: 0 12px 28px rgba(255,106,0,.11);
}

.flye-action-card > i {
  color: #ff6a00;
  font-size: 24px;
  flex: 0 0 auto;
}

.flye-action-icon,
.flye-return-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
}

.flye-action-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.flye-return-icon {
  border-radius: 50%;
  background: linear-gradient(180deg, #58a7ff, #1b76f2);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 25px;
  box-shadow: 0 10px 20px rgba(27,118,242,.22);
}

.flye-action-return {
  background: #f5f9ff;
  border-color: #cde3ff;
}

.flye-action-return:hover {
  border-color: #78b7ff;
  box-shadow: 0 12px 28px rgba(27,118,242,.12);
}

.flye-action-return > i {
  color: #1b76f2;
}

.flye-action-text {
  flex: 1 1 auto;
}

.flye-action-text strong {
  display: block;
  margin-bottom: 4px;
  color: #111;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.flye-action-text small {
  display: block;
  color: #555;
  font-size: 13px;
  line-height: 1.35;
}

.flye-tip {
  margin: 6px 0 0;
  text-align: center;
  color: #999;
  font-size: 12px;
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1120px) {
  .flye-step-grid {
    grid-template-columns: 1fr;
  }

  .flye-step-arrow,
  .flye-step-divider {
    display: none;
  }

  .flye-ready {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    align-items: center;
    gap: 20px;
    padding: 10px 4px;
  }
}

@media (max-width: 1000px) {
  .flye-navbar {
    min-height: auto;
    flex-direction: column;
    justify-content: center;
    padding: 18px;
  }

  .flye-nav-links {
    justify-content: center;
    gap: 18px;
  }

  .flye-hero {
    padding: 34px 22px;
  }

  .flye-actions {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1001px) and (max-height: 820px) {
  body.flye-home {
    padding: 6px 14px 4px;
    overflow: hidden;
  }

  .flye-wrap {
    width: min(1320px, 94vw);
  }

  .flye-navbar {
    min-height: 54px;
    padding: 6px 22px;
    border-radius: 16px;
  }

  .flye-brand {
    gap: 12px;
    font-size: 22px;
  }

  .flye-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .flye-nav-links {
    gap: 22px;
  }

  .flye-nav-links a {
    font-size: 14px;
    padding: 7px 0;
  }

  .flye-nav-links a.login {
    padding: 8px 16px;
  }

  .flye-card {
    margin-top: 10px;
    border-radius: 18px;
  }

  .flye-hero {
    padding: 16px 48px 18px;
  }

  .flye-hero h1 {
    font-size: 38px;
    margin-bottom: 4px;
  }

  .flye-hero p {
    font-size: 14px;
    line-height: 1.38;
  }

  .flye-scan-form {
    width: min(1040px, 100%);
    margin-top: 14px;
  }

  .flye-scan-box {
    min-height: 58px;
    border-radius: 15px;
    padding: 7px 18px;
  }

  .flye-scan-mini {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 18px;
  }

  .flye-scan-box input {
    height: 40px;
    font-size: 15px;
  }

  .flye-steps {
    padding: 16px 24px 14px;
  }

  .flye-steps h2 {
    margin-bottom: 12px;
    font-size: 21px;
  }

  .flye-title-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 14px;
  }

  .flye-step-grid {
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr) 188px;
    gap: 14px;
  }

  .flye-step-box,
  .flye-ready {
    min-height: 126px;
    border-radius: 16px;
    padding: 13px 14px;
  }

  .flye-step-number {
    width: 42px;
    height: 42px;
    font-size: 23px;
  }

  .flye-step-content h3,
  .flye-ready h3 {
    font-size: 16px;
    margin-bottom: 4px;
  }

  .flye-step-content p,
  .flye-ready p {
    font-size: 12px;
  }

  .flye-step-content img {
    max-width: 128px;
    max-height: 46px;
    margin-top: 6px;
  }

  .flye-step-arrow {
    font-size: 26px;
  }

  .flye-ready h3 {
    font-size: 19px;
  }

  .flye-ready img {
    width: 66px;
    margin-top: 6px;
  }

  .flye-actions {
    gap: 14px;
    margin-top: 10px;
  }

  .flye-action-card {
    min-height: 68px;
    border-radius: 16px;
    padding: 10px 22px;
  }

  .flye-action-icon,
  .flye-return-icon {
    width: 48px;
    height: 48px;
  }

  .flye-action-text strong {
    font-size: 20px;
    margin-bottom: 2px;
  }

  .flye-action-text small {
    font-size: 12px;
    line-height: 1.25;
  }

  .flye-action-card > .flye-svg-icon {
    font-size: 22px;
  }
}

@media (max-width: 680px) {
  body.flye-home {
    padding: 12px 10px 30px;
  }

  .flye-wrap {
    width: 100%;
  }

  .flye-brand {
    font-size: 24px;
  }

  .flye-nav-links {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .flye-nav-links a,
  .flye-nav-links a.login {
    justify-content: center;
    padding: 10px 12px;
    font-size: 15px;
  }

  .flye-hero h1 {
    font-size: 36px;
  }

  .flye-hero p {
    font-size: 16px;
  }

  .flye-scan-box {
    min-height: 78px;
    padding: 12px 14px;
    gap: 10px;
  }

  .flye-scan-mini {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .flye-scan-box input {
    height: 48px;
    font-size: 16px;
    text-align: center;
  }

  .flye-steps {
    padding: 24px 16px;
  }

  .flye-step-box {
    min-height: auto;
    padding: 18px;
    flex-direction: column;
  }

  .flye-step-content img {
    max-width: 180px;
  }

  .flye-ready {
    grid-template-columns: 1fr;
  }

  .flye-action-card {
    padding: 20px 18px;
    gap: 14px;
  }

  .flye-action-icon,
  .flye-return-icon {
    width: 66px;
    height: 66px;
  }

  .flye-action-text strong {
    font-size: 23px;
  }

  .flye-action-text small {
    font-size: 14px;
  }

  .flye-tip {
    display: block;
  }
}

/* -------------------------------------------------------
   Print
   ------------------------------------------------------- */
/* -------------------------------------------------------
   Schedule dashboard
   ------------------------------------------------------- */
body.schedule-dashboard-page {
  padding: 0;
  min-height: 100vh;
  background: #f7f7f7;
  color: #222;
}

body.schedule-dashboard-page::before { display: none; }

.schedule-dashboard-page * {
  letter-spacing: 0;
}

.schedule-layout {
  display: flex;
  min-height: 100vh;
}

.schedule-sidebar {
  width: 280px;
  background: #fff;
  border-right: 1px solid #ececec;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 4px 0 18px rgba(0,0,0,.04);
  flex: 0 0 auto;
}

.schedule-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  text-decoration: none;
}

.schedule-logo:hover { text-decoration: none; }

.schedule-logo-box {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #eee;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(255,106,0,.12);
  overflow: hidden;
}

.schedule-logo-box img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.schedule-logo strong {
  color: #ff6a00;
  font-size: 30px;
  font-weight: 800;
}

.schedule-menu-title {
  font-size: 13px;
  color: #999;
  margin: 20px 0 12px;
  font-weight: 800;
}

.schedule-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-menu a,
.schedule-menu-group-toggle {
  min-height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 0;
  width: 100%;
  background: transparent;
  text-decoration: none;
  color: #333;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: .2s ease;
}

.schedule-menu a:hover,
.schedule-menu-group-toggle:hover,
.schedule-menu-group-toggle.is-open {
  background: #fff2e8;
  color: #ff6a00;
  text-decoration: none;
}

.schedule-menu a.active {
  background: linear-gradient(90deg,#ff7a00,#f26500);
  color: #fff;
  box-shadow: 0 10px 22px rgba(255,106,0,.25);
}

.schedule-menu-group-toggle span:not(.schedule-menu-caret) {
  flex: 1 1 auto;
}

.schedule-menu-caret {
  margin-left: auto;
  font-size: 22px;
  line-height: 1;
  transition: transform .2s ease;
}

.schedule-menu-group-toggle.is-open .schedule-menu-caret {
  transform: rotate(90deg);
}

.schedule-submenu {
  display: grid;
  gap: 6px;
  padding: 2px 0 4px 14px;
  margin-left: 14px;
  border-left: 2px solid #ffe0c7;
}

.schedule-submenu[hidden] {
  display: none;
}

.schedule-submenu a {
  min-height: 42px;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 14px;
}

.schedule-submenu .sd-icon {
  width: 1.05em;
  height: 1.05em;
}

.sd-icon {
  width: 1.15em;
  height: 1.15em;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.schedule-guide-btn {
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid #e9e9e9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #444;
  font-weight: 800;
  text-decoration: none;
}

.schedule-guide-btn:hover {
  color: #ff6a00;
  background: #fff8f3;
  text-decoration: none;
}

.schedule-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.schedule-topbar {
  min-height: 90px;
  background: #fff;
  border-bottom: 1px solid #ececec;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 36px;
}

.schedule-menu-toggle {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
  color: #444;
  font-size: 24px;
  cursor: pointer;
  display: none;
  place-items: center;
  flex: 0 0 auto;
}

.schedule-menu-toggle .sd-icon {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  stroke-width: 2.35;
}

.schedule-menu-toggle:hover,
.schedule-menu-toggle:focus-visible {
  background: #e8f0ff;
  color: #0b63ce;
}

.schedule-welcome h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 4px;
}

.schedule-welcome h1 span { color: #ff6a00; }
.schedule-welcome p { color: #666; font-size: 15px; margin: 0; }

.schedule-top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.schedule-notify {
  position: relative;
  color: #555;
  font-size: 24px;
}

.schedule-notification-widget {
  position: relative;
}

.schedule-notify-button {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f3f4f6;
  cursor: pointer;
  transition: .2s ease;
}

.schedule-notify-button .sd-icon {
  width: 24px;
  height: 24px;
  stroke-width: 2.35;
}

.schedule-notify-button:hover,
.schedule-notify-button[aria-expanded="true"] {
  background: #e8f0ff;
  color: #0b63ce;
}

.schedule-notify span {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ff6a00;
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.schedule-notify-badge[hidden] {
  display: none;
}

.notification-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 80;
  width: min(430px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 118px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 18px;
  box-shadow: 0 20px 54px rgba(15, 23, 42, .22);
  color: #111827;
}

.notification-popover[hidden] {
  display: none;
}

.notification-popover::before {
  content: '';
  position: absolute;
  top: -7px;
  right: 18px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 1px solid rgba(226, 232, 240, .95);
  border-top: 1px solid rgba(226, 232, 240, .95);
  transform: rotate(45deg);
}

.notification-popover-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 8px;
}

.notification-popover-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 900;
}

.notification-mark-all {
  border: 0;
  background: transparent;
  color: #ff6a00;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.notification-tabs {
  display: flex;
  gap: 8px;
  padding: 6px 20px 10px;
}

.notification-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #1f2937;
  cursor: pointer;
  font-weight: 900;
}

.notification-tabs button.active {
  background: #e8f0ff;
  color: #0b63ce;
}

.notification-popover-list {
  overflow: auto;
  padding: 2px 10px 10px;
}

.notification-popover-state {
  padding: 26px 12px;
  text-align: center;
  color: #6b7280;
  font-size: 15px;
}

.notification-popover-item {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 12px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: transparent;
  color: #111827;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease;
}

.notification-popover-item:hover {
  background: #f3f4f6;
}

.notification-popover-item.is-unread {
  background: #fff7ed;
}

.notification-popover-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff7a00, #ffb36b);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}

.notification-popover-content {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.notification-popover-content strong,
.notification-popover-content span,
.notification-popover-content small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-popover-content strong {
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
}

.notification-popover-content span {
  color: #374151;
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notification-popover-content small {
  color: #0b63ce;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.notification-popover-item i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.notification-popover-item.is-unread i {
  background: #0b63ce;
}

.notification-see-all {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin: 0 10px 10px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
  text-decoration: none;
  font-weight: 900;
}

.notification-see-all:hover {
  background: #e5e7eb;
  text-decoration: none;
}

.schedule-batch-badge {
  display: inline-flex;
  align-items: center;
  max-width: 180px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff2e8;
  color: #b84f00;
  border: 1px solid #ffd3ad;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.schedule-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.schedule-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #efefef;
  display: grid;
  place-items: center;
  font-size: 23px;
  color: #555;
}

.schedule-profile strong {
  display: block;
  font-size: 16px;
  color: #111;
}

.schedule-profile small {
  display: block;
  font-size: 12px;
  color: #777;
}

.schedule-logout {
  padding: 7px 11px;
  border-radius: 10px;
  color: #ff6a00;
  background: #fff2e8;
  font-weight: 800;
  text-decoration: none;
}

.schedule-content {
  padding: 24px;
  flex: 1;
}

body.schedule-shell-page {
  min-height: 100vh;
  padding: 0;
  background: #f7f7f7;
  color: #222;
}

body.schedule-shell-page::before { display: none; }

body.schedule-shell-page > .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 116px 24px 28px 304px;
  min-height: 100vh;
}

body.schedule-shell-page .schedule-shell-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 280px;
  z-index: 40;
  overflow-y: auto;
}

body.schedule-shell-page .schedule-shell-topbar {
  position: fixed;
  inset: 0 0 auto 280px;
  z-index: 35;
  box-shadow: 0 6px 18px rgba(0,0,0,.035);
}

body.schedule-shell-page .container > .schedule-shell-sidebar,
body.schedule-shell-page .container > .schedule-shell-topbar {
  margin: 0;
}

body.schedule-shell-page .container > .h1,
body.schedule-shell-page .container > h1 {
  margin-top: 0;
}

body.schedule-shell-page .container > .card,
body.schedule-shell-page .container > .table-wrap,
body.schedule-shell-page .container > form.card {
  border-radius: 22px;
  border-color: #f1f1f1;
  box-shadow: 0 4px 18px rgba(0,0,0,.05);
}

body.schedule-shell-page .schedule-manage-form-card {
  padding: 28px;
}

body.schedule-shell-page .schedule-manage-create-form {
  display: block;
}

body.schedule-shell-page .schedule-form-title {
  color: #ff6a00;
  font-size: 22px;
  margin-bottom: 22px;
}

body.schedule-shell-page .schedule-form {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(540px, 1.35fr);
  gap: 32px;
  align-items: start;
}

body.schedule-shell-page .left-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.schedule-shell-page .left-form .grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

body.schedule-shell-page .schedule-manage-create-form .form-group {
  margin: 0;
}

body.schedule-shell-page .schedule-manage-create-form label {
  display: block;
  margin-bottom: 6px;
  color: #5f4a3a;
  font-size: 13px;
  font-weight: 800;
}

body.schedule-shell-page .schedule-manage-create-form input,
body.schedule-shell-page .schedule-manage-create-form select,
body.schedule-shell-page .schedule-manage-create-form textarea {
  width: 100%;
  max-width: none;
  min-height: 50px;
  border-radius: 12px;
  background: #fff;
  border-color: #e6cdb9;
}

body.schedule-shell-page .left-form textarea {
  min-height: 96px;
  resize: vertical;
}

body.schedule-shell-page .date-panel {
  border: 1px solid #ecd9c7;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(140,80,30,.05);
  margin-top: 29px;
}

body.schedule-shell-page .date-panel-head {
  display: grid !important;
  grid-template-columns: 52px minmax(160px, .75fr) minmax(220px, 1fr) 72px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fff8f3 0%, #fff 100%);
  border-bottom: 1px solid #ecd9c7;
  color: #1c1410;
  font-weight: 900;
}

body.schedule-shell-page .date-panel-head span {
  grid-column: 2 / 4;
}

body.schedule-shell-page .date-panel-head small {
  justify-self: end;
  color: #8b6f5e;
  font-size: 12px;
  font-weight: 800;
}

body.schedule-shell-page .date-panel-columns {
  display: grid;
  grid-template-columns: 52px minmax(160px, .75fr) minmax(220px, 1fr) 72px;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #ecd9c7;
  color: #1c1410;
  font-size: 13px;
  font-weight: 900;
  background: #fff;
}

body.schedule-shell-page .date-panel-columns span {
  text-align: center;
}

body.schedule-shell-page .date-time-row {
  display: grid !important;
  grid-template-columns: 52px minmax(160px, .75fr) minmax(220px, 1fr) 72px;
  gap: 12px !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 14px 16px;
  border-bottom: 1px solid #f0e0d0;
}

body.schedule-shell-page .date-time-row:last-child {
  border-bottom: 0;
}

body.schedule-shell-page .date-time-row .row-number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  justify-self: center;
  background: #fff1e6;
  color: #c2410c;
  font-weight: 900;
}

body.schedule-shell-page .schedule-manage-create-form .date-time-row input,
body.schedule-shell-page .schedule-manage-create-form .date-time-row select {
  min-height: 44px;
}

body.schedule-shell-page .date-time-row .btn-delete {
  width: 48px;
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid #ff4d4f;
  background: #fff;
  color: #dc2626;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

body.schedule-shell-page .date-time-row .btn-delete:hover {
  background: #fff1f2;
}

body.schedule-shell-page .date-panel .btn-add {
  width: calc(100% - 32px);
  min-height: 52px;
  margin: 14px 16px 16px;
  border: 1.5px dashed #ff8a2a;
  border-radius: 14px;
  background: #fffaf6;
  color: #ff6a00;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

body.schedule-shell-page .date-panel .btn-add:hover {
  background: #fff1e6;
}

body.schedule-shell-page .schedule-manage-create-form .schedule-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  padding-top: 12px;
  border-top: 1px solid #f0e0d0;
  margin-top: 8px;
  max-width: 100%;
}

body.schedule-shell-page .schedule-manage-create-form .schedule-manage-actions .btn {
  min-width: 138px;
  min-height: 52px;
  justify-content: center;
  max-width: 100%;
  flex: 0 1 auto;
}

body.schedule-shell-page .schedule-manage-form-card .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
  overflow: hidden;
}

body.schedule-shell-page .schedule-manage-form-card .form-actions .btn,
body.schedule-shell-page .schedule-manage-form-card .form-actions button {
  max-width: 100%;
  flex: 0 1 auto;
}

.schedule-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.schedule-availability-panel {
  margin-bottom: 14px;
  padding: 18px 22px 20px;
}

.schedule-availability-panel .schedule-panel-header {
  margin-bottom: 12px;
}

.schedule-available-by-building {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px 28px;
  max-height: 150px;
  overflow-y: auto;
  padding: 2px 4px 2px 0;
}

.schedule-building-group {
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffaf6 0%, #fff 100%);
  border: 1px solid #ffe1cc;
  box-shadow: 0 4px 14px rgba(255,106,0,.045);
}

.schedule-building-group > h3 {
  margin: 0 0 10px;
  color: #c94f00;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  padding-bottom: 8px;
  border-bottom: 1px solid #ffe5d4;
}

.schedule-building-rooms {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-available-row {
  display: grid;
  grid-template-columns: 18px minmax(58px, auto) 1fr;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.82);
  border: 1px solid #f4eee9;
  color: #111;
}

.schedule-available-row > span {
  width: 14px;
  height: 14px;
  color: #22b14c;
}

.schedule-available-row strong {
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.schedule-available-row em {
  justify-self: end;
  color: #18863a;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
  line-height: 1.45;
}

.schedule-available-row em span {
  display: block;
}

.schedule-stat-card {
  background: #fff;
  border-radius: 22px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 18px rgba(0,0,0,.05);
  border: 1px solid #f1f1f1;
}

.schedule-stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 26px;
}

.schedule-stat-icon.orange { background:#fff2e7; color:#ff6a00; }
.schedule-stat-icon.blue { background:#eef5ff; color:#4285f4; }
.schedule-stat-icon.green { background:#ecfff0; color:#22b14c; }
.schedule-stat-icon.purple { background:#f6efff; color:#9c5cff; }
.schedule-stat-icon.yellow { background:#fff8e5; color:#f2a900; }

.schedule-stat-card h2 {
  font-size: 34px;
  line-height: 1;
  margin: 0 0 4px;
}

.schedule-stat-card p {
  color: #333;
  font-size: 14px;
  font-weight: 800;
  margin: 0;
}

.schedule-stat-card small {
  color: #777;
  font-size: 12px;
}

.schedule-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(330px, 1fr);
  gap: 20px;
}

.schedule-week-panel {
  grid-column: 1 / -1;
}

.schedule-panel {
  background: #fff;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 4px 18px rgba(0,0,0,.05);
  border: 1px solid #f1f1f1;
}

.schedule-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.schedule-panel-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  margin: 0;
}

.schedule-panel-header a,
.schedule-outline-btn {
  color: #ff6a00;
  font-weight: 800;
  text-decoration: none;
}

.schedule-outline-btn {
  padding: 9px 18px;
  border-radius: 12px;
  border: 1px solid #ff6a00;
}

.schedule-week-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.schedule-calendar-filters {
  display: grid;
  grid-template-columns: 1.1fr .55fr 1.2fr 1.1fr .8fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 18px;
  background: #fafafa;
  border: 1px solid #eee;
}

.schedule-calendar-filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.schedule-calendar-filters span {
  color: #666;
  font-size: 12px;
  font-weight: 800;
}

.schedule-calendar-filters select,
.schedule-calendar-filters input {
  width: 100%;
  max-width: none;
  height: 42px;
  border-radius: 12px;
  border: 1px solid #e6e6e6;
  background: #fff;
  color: #222;
  padding: 0 12px;
  font: inherit;
  font-weight: 700;
}

.schedule-calendar-filters button {
  height: 42px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(90deg,#ff7a00,#f26500);
  color: #fff;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
}

.schedule-week-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #333;
  display: grid;
  place-items: center;
  text-decoration: none;
}

.schedule-week-label {
  background: #f7f7f7;
  padding: 11px 24px;
  border-radius: 14px;
  font-weight: 800;
}

.schedule-table-wrap {
  overflow: auto;
}


body.schedule-shell-page .schedule-search-autocomplete {
  position: relative;
  width: min(430px, 48vw);
}

body.schedule-shell-page .schedule-search-autocomplete input {
  width: 100%;
}

body.schedule-shell-page .schedule-suggest-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  background: #fff;
  border: 1px solid rgba(232, 137, 58, .22);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(83, 57, 35, .14);
  padding: 8px;
  max-height: 310px;
  overflow: auto;
}

body.schedule-shell-page .schedule-suggest-menu.open {
  display: block;
}

body.schedule-shell-page .schedule-suggest-item {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: #2b211a;
  text-align: left;
  box-shadow: none;
}

body.schedule-shell-page .schedule-suggest-item:hover,
body.schedule-shell-page .schedule-suggest-item:focus {
  background: #fff3e8;
  outline: none;
}

body.schedule-shell-page .schedule-suggest-item span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

body.schedule-shell-page .schedule-suggest-item b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

body.schedule-shell-page .schedule-suggest-item small {
  color: #8a7565;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.schedule-shell-page .schedule-suggest-item em {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: #c95700;
  background: #fff0e3;
  border: 1px solid #ffd5b7;
  border-radius: 999px;
  padding: 4px 8px;
}

body.schedule-shell-page .schedule-suggest-empty {
  padding: 12px;
  color: #8a7565;
  font-size: 13px;
}
body.schedule-shell-page .schedule-table-card {
  margin-top: 24px;
}

body.schedule-shell-page .schedule-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

body.schedule-shell-page .schedule-section-head .h2 {
  margin-bottom: 4px;
}

body.schedule-shell-page .schedule-section-head p {
  margin: 0;
  color: #7c6b60;
  font-size: 14px;
}

body.schedule-shell-page .schedule-table-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

body.schedule-shell-page .schedule-table-result {
  margin-bottom: 10px;
  color: #5f534d;
}

body.schedule-shell-page .schedule-pagination {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
  flex-wrap: wrap;
}

body.schedule-shell-page .schedule-page-label {
  color: #6d625c;
  font-size: 14px;
}

body.schedule-shell-page .my-table-card {
  background: #fff;
  border-radius: 22px;
  padding: 26px;
  border: 1px solid rgba(232, 137, 58, .10);
  box-shadow: 0 10px 30px rgba(83, 57, 35, .055);
}

body.schedule-shell-page .table-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

body.schedule-shell-page .table-head h2 {
  font-size: 26px;
  font-weight: 800;
  color: #222;
  margin: 0;
}

body.schedule-shell-page .table-head p {
  color: #777;
  margin: 4px 0 0;
  font-size: 15px;
}

body.schedule-shell-page .table-search {
  display: flex;
  gap: 10px;
}

body.schedule-shell-page .table-search input {
  width: min(430px, 48vw);
  height: 42px;
  border: 1px solid #ead8ca;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  background: #fff;
  color: #222;
}

body.schedule-shell-page .table-search input:focus {
  outline: none;
  border-color: #ff7a00;
  box-shadow: 0 0 0 4px rgba(255,106,0,.12);
}

body.schedule-shell-page .table-search button {
  height: 42px;
  padding: 0 24px;
  border: none;
  border-radius: 22px;
  background: linear-gradient(135deg,#ff8a22,#f26500);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(242,101,0,.16);
}

body.schedule-shell-page .schedule-modern-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  padding-bottom: 8px;
}

body.schedule-shell-page .modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1480px;
}

body.schedule-shell-page .schedule-master-table {
  min-width: 760px;
}

body.schedule-shell-page .modern-table thead th {
  background: linear-gradient(180deg,#fff4ea 0%,#ffe9d8 100%);
  color: #b84f00;
  padding: 15px 18px;
  font-size: 15px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
  border-top: 1px solid #ffd9bd;
  border-bottom: 1px solid #f3c7a7;
}

body.schedule-shell-page .modern-table thead th:first-child {
  border-radius: 12px 0 0 0;
  text-align: center;
  border-left: 1px solid #ffd9bd;
}

body.schedule-shell-page .modern-table thead th:last-child {
  border-radius: 0 12px 0 0;
  text-align: center;
  border-right: 1px solid #ffd9bd;
}

body.schedule-shell-page .modern-table tbody tr {
  background: #fff;
}

body.schedule-shell-page .modern-table tbody td {
  padding: 20px 18px;
  border-bottom: 1px solid #f1e5dc;
  font-size: 14px;
  vertical-align: middle;
  color: #191919;
}

body.schedule-shell-page .modern-table tbody tr:hover {
  background: #fff9f3;
}

body.schedule-shell-page .modern-table td:first-child {
  text-align: center;
}

body.schedule-shell-page .modern-table .no {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  background: #fff3e9;
  color: #d76500;
  border-radius: 10px;
  font-weight: 800;
}

body.schedule-shell-page .modern-table small {
  display: block;
  color: #888;
  margin-top: 4px;
}

body.schedule-shell-page .modern-table .subject-name-cell {
  min-width: 180px;
}

body.schedule-shell-page .modern-table .date-cell {
  min-width: 130px;
}

body.schedule-shell-page .schedule-manage-table .schedule-note-cell {
  width: 170px;
  min-width: 150px;
  max-width: 190px;
}

body.schedule-shell-page .schedule-manage-table .schedule-note-cell span {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.45;
  max-height: calc(1.45em * 3);
}

body.schedule-shell-page .modern-empty {
  text-align: center !important;
  padding: 34px 18px !important;
  color: #8b6f5e !important;
}

body.schedule-shell-page .action-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  white-space: nowrap;
  min-width: max-content;
}

body.schedule-shell-page .action-btns form {
  display: inline;
  margin: 0;
}

body.schedule-shell-page .action-btns a,
body.schedule-shell-page .action-btns button {
  height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14px;
}

body.schedule-shell-page .action-btns .btn-edit {
  border: 1px solid #f3b078;
  color: #d76500;
  background: #fff8f2;
}

body.schedule-shell-page .action-btns .btn-batch {
  border: 1px solid #93c5fd;
  color: #1d4ed8;
  background: #eff6ff;
  white-space: nowrap;
}

body.schedule-shell-page .action-btns .btn-delete {
  border: 1px solid #f4a0a8;
  color: #c92335;
  background: #fff7f8;
}

body.schedule-shell-page .schedule-manage-table th:last-child,
body.schedule-shell-page .schedule-manage-table td.schedule-actions-cell {
  width: 285px;
  min-width: 285px;
  padding-right: 24px;
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -10px 0 18px rgba(255,255,255,.92);
}

body.schedule-shell-page .schedule-manage-table th:last-child {
  z-index: 3;
  background: linear-gradient(180deg,#fff4ea 0%,#ffe9d8 100%);
}

body.schedule-shell-page .schedule-manage-table td.schedule-actions-cell {
  overflow: visible;
}

body.schedule-shell-page .schedule-manage-table tbody tr:hover td.schedule-actions-cell {
  background: #fff9f3;
}

body.schedule-shell-page .action-btns .is-disabled {
  pointer-events: none;
  opacity: .45;
  filter: grayscale(1);
}

body.schedule-shell-page .table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  gap: 14px;
}

body.schedule-shell-page .show-count {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #666;
  font-size: 14px;
}

body.schedule-shell-page .show-count select {
  height: 38px;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: #333;
}

body.schedule-shell-page .schedule-modern-pagination {
  display: flex;
  gap: 8px;
  margin-top: 0;
}

body.schedule-shell-page .schedule-modern-pagination a,
body.schedule-shell-page .schedule-modern-pagination span {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  cursor: pointer;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-weight: 700;
}

body.schedule-shell-page .schedule-modern-pagination .active {
  background: #ff6a00;
  color: #fff;
  border-color: #ff6a00;
}

body.schedule-shell-page .schedule-modern-pagination .is-disabled {
  pointer-events: none;
  opacity: .45;
}

.schedule-week-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.schedule-week-table th,
.schedule-week-table td {
  border: 1px solid #efefef;
  padding: 10px;
  text-align: center;
  vertical-align: top;
  background: #fff;
}

.schedule-week-table th {
  background: #fafafa;
  color: #111;
  font-size: 14px;
}

.schedule-week-table th small {
  display: block;
  color: #777;
  font-size: 12px;
  font-weight: 500;
}

.schedule-week-table .time-cell {
  font-weight: 800;
  color: #333;
  white-space: nowrap;
}

.schedule-month-wrap {
  max-height: none;
}

.schedule-month-calendar {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  table-layout: fixed;
}

.schedule-month-calendar th,
.schedule-month-calendar td {
  border: 1px solid #efefef;
  vertical-align: top;
  background: #fff;
}

.schedule-month-calendar th {
  height: 42px;
  background: #fafafa;
  color: #111;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.schedule-month-calendar td {
  min-height: 230px;
  height: 230px;
  padding: 10px;
}

.schedule-month-empty {
  background: #fbfbfb !important;
}

.schedule-month-day {
  font-size: 15px;
  font-weight: 900;
  color: #111;
  margin-bottom: 8px;
}

.schedule-slot-block {
  margin-top: 8px;
}

.schedule-slot-time {
  color: #111;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 5px;
}

.schedule-room-line {
  display: block;
  padding: 4px 6px;
  margin-bottom: 4px;
  border-radius: 9px;
  background: #fafafa;
  color: #9a9a9a;
  font-size: 11px;
  line-height: 1.35;
}

.schedule-room-line.busy {
  border: 1px solid transparent;
  border-left-width: 4px;
  color: #111;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(0,0,0,.025);
}

.schedule-room-line.busy strong,
.schedule-room-line.busy span {
  display: block;
}

.schedule-room-line.busy.orange { background:#fff0e5; color:#9a4800; border-color:#ff7a00 #ffd7bd #ffd7bd #ff7a00; }
.schedule-room-line.busy.green { background:#eaffee; color:#146c31; border-color:#22c55e #bcf2c7 #bcf2c7 #22c55e; }
.schedule-room-line.busy.blue { background:#e9f4ff; color:#1559b3; border-color:#3b82f6 #b9dcff #b9dcff #3b82f6; }
.schedule-room-line.busy.purple { background:#f2eaff; color:#5b21b6; border-color:#8b5cf6 #dac6ff #dac6ff #8b5cf6; }
.schedule-room-line.busy.yellow { background:#fff7dc; color:#805d00; border-color:#eab308 #ffe7a0 #ffe7a0 #eab308; }
.schedule-room-line.busy.rose { background:#fff1f2; color:#a20f35; border-color:#f43f5e #fecdd3 #fecdd3 #f43f5e; }
.schedule-room-line.busy.teal { background:#e6fffb; color:#0c635c; border-color:#14b8a6 #99f6e4 #99f6e4 #14b8a6; }
.schedule-room-line.busy.indigo { background:#eef2ff; color:#3730a3; border-color:#6366f1 #c7d2fe #c7d2fe #6366f1; }
.schedule-room-line.busy.cyan { background:#ecfeff; color:#0e667d; border-color:#06b6d4 #a5f3fc #a5f3fc #06b6d4; }
.schedule-room-line.busy.lime { background:#f7fee7; color:#3f6212; border-color:#84cc16 #d9f99d #d9f99d #84cc16; }
.schedule-room-line.busy.amber { background:#fffbeb; color:#92400e; border-color:#f59e0b #fde68a #fde68a #f59e0b; }
.schedule-room-line.busy.emerald { background:#ecfdf5; color:#047857; border-color:#10b981 #a7f3d0 #a7f3d0 #10b981; }
.schedule-room-line.busy.violet { background:#f5f3ff; color:#6d28d9; border-color:#7c3aed #ddd6fe #ddd6fe #7c3aed; }
.schedule-room-line.busy.pink { background:#fdf2f8; color:#be185d; border-color:#ec4899 #fbcfe8 #fbcfe8 #ec4899; }
.schedule-room-line.busy.sky { background:#f0f9ff; color:#0369a1; border-color:#0ea5e9 #bae6fd #bae6fd #0ea5e9; }
.schedule-room-line.busy.stone { background:#f5f5f4; color:#44403c; border-color:#78716c #d6d3d1 #d6d3d1 #78716c; }

.schedule-subject {
  border-radius: 14px;
  padding: 9px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 6px;
}

.schedule-subject strong,
.schedule-subject span,
.schedule-subject em {
  display: block;
  font-style: normal;
}

.schedule-subject span { font-weight: 600; }
.schedule-subject.orange { background:#fff0e5; color:#b95a00; }
.schedule-subject.green { background:#eaffee; color:#18863a; }
.schedule-subject.blue { background:#e9f4ff; color:#1f6ec7; }
.schedule-subject.purple { background:#f2eaff; color:#6e33c7; }
.schedule-subject.yellow { background:#fff7dc; color:#9f7600; }
.schedule-subject.rose { background:#fff1f2; color:#be123c; }
.schedule-subject.teal { background:#e6fffb; color:#0f766e; }
.schedule-subject.indigo { background:#eef2ff; color:#4338ca; }
.schedule-subject.cyan { background:#ecfeff; color:#0e7490; }
.schedule-subject.lime { background:#f7fee7; color:#4d7c0f; }
.schedule-subject.amber { background:#fffbeb; color:#92400e; }
.schedule-subject.emerald { background:#ecfdf5; color:#047857; }
.schedule-subject.violet { background:#f5f3ff; color:#6d28d9; }
.schedule-subject.pink { background:#fdf2f8; color:#be185d; }
.schedule-subject.sky { background:#f0f9ff; color:#0369a1; }
.schedule-subject.stone { background:#f5f5f4; color:#44403c; }

.schedule-side-column {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.schedule-side-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.schedule-room-item,
.schedule-activity-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f1f1;
}

.schedule-room-item:last-child,
.schedule-activity-item:last-child { border-bottom: none; padding-bottom: 0; }

.schedule-room-item > span {
  width: 24px;
  height: 24px;
  color: #22b14c;
  flex: 0 0 auto;
}

.schedule-room-item div { flex: 1; }

.schedule-room-item h3,
.schedule-activity-item h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: #111;
}

.schedule-room-item p,
.schedule-activity-item p {
  margin: 0;
  color: #777;
  font-size: 13px;
}

.schedule-activity-item span {
  color: #777;
  font-size: 13px;
  white-space: nowrap;
}

.schedule-empty {
  margin: 0;
  color: #777;
  font-size: 14px;
}

.schedule-footer {
  text-align: center;
  color: #888;
  padding: 18px;
  font-size: 13px;
}

@media (max-width: 1280px) {
  .schedule-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .schedule-dashboard-grid { grid-template-columns: 1fr; }
  .schedule-side-column { grid-template-columns: 1fr; }
  .schedule-calendar-filters { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .schedule-calendar-filters button { width: 100%; }
  body.schedule-shell-page .schedule-form {
    grid-template-columns: 1fr;
  }
  body.schedule-shell-page .date-panel {
    margin-top: 0;
  }
}

@media (max-width: 900px) {
  body.schedule-shell-page .table-head {
    flex-direction: column;
  }
  body.schedule-shell-page .table-search {
    width: 100%;
  }
  body.schedule-shell-page .table-search input {
    width: 100%;
  }
  body.schedule-shell-page .table-footer {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }
  .schedule-layout { flex-direction: column; }
  .schedule-sidebar {
    width: 100%;
    display: none;
  }
  body.schedule-sidebar-open .schedule-sidebar { display: flex; }
  .schedule-menu-toggle { display: grid; place-items: center; }
  body.schedule-shell-page > .container {
    padding: 104px 16px 20px;
  }
  body.schedule-shell-page .schedule-shell-sidebar {
    inset: 0 0 auto 0;
    max-height: calc(100vh - 76px);
    top: 76px;
    z-index: 50;
    overflow-y: auto;
  }
  body.schedule-shell-page .schedule-shell-topbar {
    inset: 0 0 auto 0;
  }
  .schedule-topbar {
    min-height: auto;
    padding: 18px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .schedule-welcome h1 { font-size: 24px; }
  .schedule-content { padding: 16px; }
  .schedule-stats { grid-template-columns: 1fr; }
  .schedule-calendar-filters { grid-template-columns: 1fr; }
  body.schedule-shell-page .left-form .grid-2,
  body.schedule-shell-page .date-time-row,
  body.schedule-shell-page .date-panel-head,
  body.schedule-shell-page .date-panel-columns {
    grid-template-columns: 1fr;
  }
  body.schedule-shell-page .date-panel-head span,
  body.schedule-shell-page .date-panel-head small,
  body.schedule-shell-page .date-panel-columns span {
    grid-column: auto;
    justify-self: start;
    text-align: left;
  }
  body.schedule-shell-page .schedule-manage-create-form .schedule-manage-actions {
    justify-content: stretch;
  }
  body.schedule-shell-page .schedule-manage-create-form .schedule-manage-actions .btn {
    width: 100%;
  }
  body.schedule-shell-page .schedule-manage-form-card .form-actions .btn,
  body.schedule-shell-page .schedule-manage-form-card .form-actions button {
    width: 100%;
  }
}

@media print {
  body { background: #fff !important; padding: 0; }
  .nav, .navbar, .btn-logout, .actions { display: none !important; }
  .card, .table-wrap { box-shadow: none !important; border: 1px solid #ccc; }
}

/* -------------------------------------------------------
   Admin users page
   ------------------------------------------------------- */
body.admin-users-page {
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 122, 0, .08), transparent 30%),
    linear-gradient(180deg, #fbf7f2 0%, #f6f1eb 100%);
}

body.admin-users-page > .container {
  max-width: 1240px;
}

body.admin-users-page .nav {
  background: #fff;
  border: 1px solid rgba(232, 137, 58, .16);
  box-shadow: 0 10px 28px rgba(83, 57, 35, .08);
}

body.admin-users-page .nav-brand {
  color: #f26500;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

body.admin-users-page .nav-link {
  color: #6b5142;
}

body.admin-users-page .nav-link.active {
  background: linear-gradient(135deg, #ff8a22, #f26500);
  color: #fff;
  box-shadow: 0 8px 18px rgba(242,101,0,.18);
}

body.admin-users-page .nav-user {
  color: #3b2b22;
  font-weight: 800;
}

body.admin-users-page .admin-user-form-card,
body.admin-users-page .my-table-card {
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(232, 137, 58, .12);
  box-shadow: 0 10px 30px rgba(83, 57, 35, .055);
  padding: 26px;
  margin-bottom: 24px;
}

body.admin-users-page .admin-user-form-card {
  max-width: none;
}

body.admin-users-page .admin-section-head,
body.admin-users-page .table-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}

body.admin-users-page .admin-section-head h2,
body.admin-users-page .table-head h2 {
  font-size: 26px;
  font-weight: 800;
  color: #222;
  margin: 0;
}

body.admin-users-page .admin-section-head p,
body.admin-users-page .table-head p {
  color: #777;
  margin: 4px 0 0;
  font-size: 15px;
}

body.admin-users-page .admin-user-form-card form {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px 22px;
}

body.admin-users-page .admin-user-form-card .roles-check,
body.admin-users-page .admin-user-form-card button[type="submit"] {
  grid-column: 1 / -1;
}

body.admin-users-page .roles-check {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.admin-users-page .roles-check label {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #ead8ca;
  border-radius: 999px;
  background: #fffaf5;
  color: #4e4038;
  font-weight: 700;
}

body.admin-users-page .table-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.admin-users-page .role-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #fff3e9;
  color: #b84f00;
  border: 1px solid #ffd9bd;
  white-space: nowrap;
}

body.admin-users-page .role-badge.sys {
  background: #fff0f1;
  color: #c92335;
  border-color: #f4a0a8;
}

body.admin-users-page .admin-modern-table-wrap {
  width: 100%;
  overflow-x: auto;
}

body.admin-users-page .modern-table {
  width: 100%;
  min-width: 1020px;
  border-collapse: separate;
  border-spacing: 0;
}

body.admin-users-page .modern-table thead th {
  background: linear-gradient(180deg,#fff4ea 0%,#ffe9d8 100%);
  color: #b84f00;
  padding: 15px 18px;
  font-size: 15px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
  border-top: 1px solid #ffd9bd;
  border-bottom: 1px solid #f3c7a7;
}

body.admin-users-page .modern-table thead th:first-child {
  border-radius: 12px 0 0 0;
  text-align: center;
  border-left: 1px solid #ffd9bd;
}

body.admin-users-page .modern-table thead th:last-child {
  border-radius: 0 12px 0 0;
  text-align: center;
  border-right: 1px solid #ffd9bd;
}

body.admin-users-page .modern-table tbody td {
  padding: 18px;
  border-bottom: 1px solid #f1e5dc;
  font-size: 14px;
  vertical-align: middle;
}

body.admin-users-page .modern-table tbody tr:hover {
  background: #fff9f3;
}

body.admin-users-page .modern-table td:first-child {
  text-align: center;
}

body.admin-users-page .modern-table .no {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  background: #fff3e9;
  color: #d76500;
  border-radius: 10px;
  font-weight: 800;
}

body.admin-users-page .actions-col {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.admin-users-page .actions-col form {
  margin: 0;
}

body.admin-users-page .actions-col button {
  height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14px;
}

body.admin-users-page .btn-edit {
  border: 1px solid #f3b078;
  color: #d76500;
  background: #fff8f2;
}

body.admin-users-page .btn-delete {
  border: 1px solid #f4a0a8;
  color: #c92335;
  background: #fff7f8;
}

body.admin-users-page .btn-more {
  border: 1px solid #eadfd7;
  color: #665b54;
  background: #fffdfa;
}

body.admin-users-page .modal-overlay {
  background: rgba(28, 20, 16, .38);
  backdrop-filter: blur(4px);
}

body.admin-users-page .modal-title {
  color: #1f1a17;
}

@media (max-width: 900px) {
  body.admin-users-page .admin-user-form-card form {
    grid-template-columns: 1fr;
  }
  body.admin-users-page .admin-section-head,
  body.admin-users-page .table-head {
    flex-direction: column;
  }
}

/* -------------------------------------------------------
   Schedule density: comfortable at browser zoom 100%
   ------------------------------------------------------- */
@media (min-width: 901px) {
  body.schedule-shell-page {
    font-size: 14px;
  }

  body.schedule-shell-page > .container {
    padding: 88px 18px 22px 264px;
  }

  body.schedule-shell-page .schedule-shell-sidebar,
  body.schedule-shell-page .schedule-sidebar {
    width: 246px;
  }

  body.schedule-shell-page .schedule-shell-topbar {
    left: 246px;
    right: 0;
    top: 0;
  }

  body.schedule-shell-page .schedule-sidebar {
    padding: 18px 14px;
  }

  body.schedule-shell-page .schedule-logo {
    gap: 10px;
    margin-bottom: 22px;
  }

  body.schedule-shell-page .schedule-logo-box {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  body.schedule-shell-page .schedule-logo-box img {
    width: 38px;
    height: 38px;
  }

  body.schedule-shell-page .schedule-logo strong {
    font-size: 26px;
  }

  body.schedule-shell-page .schedule-menu-title {
    font-size: 12px;
    margin: 16px 0 8px;
  }

  body.schedule-shell-page .schedule-menu {
    gap: 6px;
  }

  body.schedule-shell-page .schedule-menu a,
  body.schedule-shell-page .schedule-menu-group-toggle {
    min-height: 42px;
    border-radius: 12px;
    gap: 10px;
    padding: 0 12px;
    font-size: 14px;
  }

  body.schedule-shell-page .schedule-guide-btn {
    min-height: 44px;
    border-radius: 12px;
    font-size: 13px;
  }

  body.schedule-shell-page .schedule-topbar {
    min-height: 72px;
    padding: 0 28px;
  }

  body.schedule-shell-page .schedule-welcome h1 {
    font-size: 25px;
    margin-bottom: 2px;
  }

  body.schedule-shell-page .schedule-welcome p {
    font-size: 13px;
  }

  body.schedule-shell-page .schedule-top-actions {
    gap: 14px;
  }

  body.schedule-shell-page .schedule-notify {
    font-size: 21px;
  }

  body.schedule-shell-page .schedule-avatar {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  body.schedule-shell-page .schedule-profile strong {
    font-size: 14px;
  }

  body.schedule-shell-page .schedule-profile small {
    font-size: 11px;
  }

  body.schedule-shell-page .h1 {
    font-size: 26px;
    margin-bottom: 14px;
  }

  body.schedule-shell-page .card,
  body.schedule-shell-page .my-table-card {
    border-radius: 18px;
    padding: 20px;
  }

  body.schedule-shell-page .schedule-manage-form-card {
    padding: 20px;
  }

  body.schedule-shell-page .schedule-form-title {
    font-size: 20px;
    margin-bottom: 16px;
  }

  body.schedule-shell-page .schedule-form {
    grid-template-columns: minmax(320px, .85fr) minmax(500px, 1.4fr);
    gap: 24px;
  }

  body.schedule-shell-page .left-form {
    gap: 14px;
  }

  body.schedule-shell-page .left-form .grid-2 {
    gap: 12px;
  }

  body.schedule-shell-page .date-panel-head,
  body.schedule-shell-page .date-panel-columns,
  body.schedule-shell-page .date-time-row {
    grid-template-columns: 44px minmax(150px, .75fr) minmax(200px, 1fr) 66px;
    gap: 10px;
  }

  body.schedule-shell-page .date-panel .btn-add {
    min-height: 46px;
  }

  body.schedule-shell-page input,
  body.schedule-shell-page select,
  body.schedule-shell-page textarea {
    font-size: 14px;
  }

  body.schedule-shell-page .table-head {
    margin-bottom: 18px;
  }

  body.schedule-shell-page .table-head h2 {
    font-size: 23px;
  }

  body.schedule-shell-page .table-head p {
    font-size: 13px;
  }

  body.schedule-shell-page .table-search input,
  body.schedule-shell-page .table-search button {
    height: 38px;
    font-size: 13px;
  }

  body.schedule-shell-page .table-search button {
    padding: 0 20px;
  }

  body.schedule-shell-page .modern-table thead th {
    padding: 12px 14px;
    font-size: 13px;
  }

  body.schedule-shell-page .modern-table tbody td {
    padding: 14px;
    font-size: 13px;
  }

  body.schedule-shell-page .modern-table {
    min-width: 1120px;
  }

  body.schedule-shell-page .schedule-master-table {
    min-width: 720px;
  }

  body.schedule-shell-page .modern-table .no {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  body.schedule-shell-page .action-btns a,
  body.schedule-shell-page .action-btns button {
    height: 31px;
    padding: 0 11px;
    font-size: 13px;
  }

}

/* -------------------------------------------------------
   Schedule dashboard density: comfortable at browser zoom 100%
   ------------------------------------------------------- */
@media (min-width: 901px) {
  body.schedule-dashboard-page {
    font-size: 14px;
  }

  body.schedule-dashboard-page .schedule-sidebar {
    width: 246px;
    padding: 18px 14px;
  }

  body.schedule-dashboard-page .schedule-logo {
    gap: 10px;
    margin-bottom: 22px;
  }

  body.schedule-dashboard-page .schedule-logo-box {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  body.schedule-dashboard-page .schedule-logo-box img {
    width: 38px;
    height: 38px;
  }

  body.schedule-dashboard-page .schedule-logo strong {
    font-size: 26px;
  }

  body.schedule-dashboard-page .schedule-menu-title {
    font-size: 12px;
    margin: 16px 0 8px;
  }

  body.schedule-dashboard-page .schedule-menu {
    gap: 6px;
  }

  body.schedule-dashboard-page .schedule-menu a,
  body.schedule-dashboard-page .schedule-menu-group-toggle {
    min-height: 42px;
    border-radius: 12px;
    gap: 10px;
    padding: 0 12px;
    font-size: 14px;
  }

  body.schedule-dashboard-page .schedule-guide-btn {
    min-height: 44px;
    border-radius: 12px;
    font-size: 13px;
  }

  body.schedule-dashboard-page .schedule-topbar {
    min-height: 72px;
    padding: 0 28px;
    gap: 16px;
  }

  body.schedule-dashboard-page .schedule-welcome h1 {
    font-size: 25px;
    margin-bottom: 2px;
  }

  body.schedule-dashboard-page .schedule-welcome p {
    font-size: 13px;
  }

  body.schedule-dashboard-page .schedule-top-actions {
    gap: 14px;
  }

  body.schedule-dashboard-page .schedule-notify {
    font-size: 21px;
  }

  body.schedule-dashboard-page .schedule-avatar {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  body.schedule-dashboard-page .schedule-profile strong {
    font-size: 14px;
  }

  body.schedule-dashboard-page .schedule-profile small {
    font-size: 11px;
  }

  body.schedule-dashboard-page .schedule-logout {
    height: 36px;
    padding: 0 14px;
    border-radius: 11px;
    font-size: 13px;
  }

  body.schedule-dashboard-page .schedule-content {
    padding: 18px;
  }

  body.schedule-dashboard-page .schedule-panel {
    border-radius: 18px;
    padding: 20px;
  }

  body.schedule-dashboard-page .schedule-availability-panel {
    padding: 16px 18px;
    margin-bottom: 12px;
  }

  body.schedule-dashboard-page .schedule-panel-header {
    margin-bottom: 14px;
  }

  body.schedule-dashboard-page .schedule-panel-header h2 {
    font-size: 22px;
  }

  body.schedule-dashboard-page .schedule-available-by-building {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px 20px;
    max-height: 176px;
  }

  body.schedule-dashboard-page .schedule-building-group {
    padding: 12px 14px;
    border-radius: 14px;
  }

  body.schedule-dashboard-page .schedule-building-title {
    font-size: 14px;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  body.schedule-dashboard-page .schedule-building-rooms {
    gap: 6px;
  }

  body.schedule-dashboard-page .schedule-available-row {
    min-height: 30px;
    grid-template-columns: 17px minmax(52px, auto) 1fr;
    padding: 5px 8px;
    border-radius: 9px;
  }

  body.schedule-dashboard-page .schedule-available-row strong,
  body.schedule-dashboard-page .schedule-available-row em {
    font-size: 10.5px;
  }

  body.schedule-dashboard-page .schedule-calendar-filters {
    gap: 10px;
  }

  body.schedule-dashboard-page .schedule-calendar-filters label {
    font-size: 12px;
  }

  body.schedule-dashboard-page .schedule-calendar-filters select,
  body.schedule-dashboard-page .schedule-calendar-filters input,
  body.schedule-dashboard-page .schedule-calendar-filters button {
    height: 38px;
    border-radius: 11px;
    font-size: 13px;
  }

  body.schedule-dashboard-page .schedule-week-selector {
    margin: 16px 0;
  }

  body.schedule-dashboard-page .schedule-week-btn {
    width: 42px;
    height: 42px;
  }

  body.schedule-dashboard-page .schedule-week-label {
    padding: 10px 20px;
    border-radius: 13px;
    font-size: 14px;
  }

  body.schedule-dashboard-page .schedule-month-calendar {
    min-width: 940px;
  }

  body.schedule-dashboard-page .schedule-month-calendar th {
    height: 38px;
    font-size: 13px;
  }

  body.schedule-dashboard-page .schedule-month-calendar td {
    height: 188px;
    min-height: 188px;
    padding: 8px;
  }

  body.schedule-dashboard-page .schedule-month-day {
    font-size: 14px;
    margin-bottom: 6px;
  }

  body.schedule-dashboard-page .schedule-slot-block {
    margin-top: 6px;
  }

  body.schedule-dashboard-page .schedule-slot-time {
    font-size: 11px;
    margin-bottom: 4px;
  }

  body.schedule-dashboard-page .schedule-room-line {
    padding: 3px 5px;
    margin-bottom: 3px;
    border-radius: 8px;
    font-size: 10.5px;
    line-height: 1.25;
  }
}

/* -------------------------------------------------------
   Inventory cards: modern light layout
   ------------------------------------------------------- */
body.inventory-cards-page,
body.inventory-shell-page {
  padding: 0;
  min-height: 100vh;
  background: #f7f4ef;
  color: #222;
}

body.inventory-cards-page::before,
body.inventory-shell-page::before {
  display: none;
}

body.schedule-shell-page.inventory-cards-page .inventory-main-content,
body.schedule-shell-page.inventory-shell-page .inventory-main-content {
  padding: 0;
}

body.schedule-shell-page.inventory-cards-page > .container,
body.schedule-shell-page.inventory-shell-page > .container {
  padding-top: 142px;
}

body.schedule-shell-page.inventory-cards-page .inventory-page-head {
  margin-bottom: 22px;
}

body.schedule-shell-page.inventory-cards-page .inventory-pick-card {
  border-radius: 22px;
  border-color: #f1e4da;
}

body.schedule-shell-page.inventory-cards-page .inventory-module-topbar,
body.schedule-shell-page.inventory-shell-page .inventory-module-topbar {
  min-height: 96px;
  padding: 10px 20px;
  background: linear-gradient(90deg, #f06500, #e46908 62%, #cb5a00);
  color: #fff;
  border-bottom: 0;
  box-shadow: 0 12px 28px rgba(226, 99, 0, .18);
  gap: 18px;
}

body.schedule-shell-page.inventory-cards-page .inventory-module-menu,
body.schedule-shell-page.inventory-shell-page .inventory-module-menu {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 4px;
}

body.schedule-shell-page.inventory-cards-page .inventory-module-menu a,
body.schedule-shell-page.inventory-shell-page .inventory-module-menu a {
  min-width: 88px;
  min-height: 60px;
  padding: 8px 11px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 11px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.14);
  white-space: nowrap;
  transition: background .18s, transform .18s, box-shadow .18s;
}


body.schedule-shell-page.inventory-cards-page .inventory-module-menu a.inventory-user-menu,
body.schedule-shell-page.inventory-shell-page .inventory-module-menu a.inventory-user-menu {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.24);
}

body.schedule-shell-page.inventory-cards-page .inventory-module-menu a.inventory-admin-menu,
body.schedule-shell-page.inventory-shell-page .inventory-module-menu a.inventory-admin-menu {
  background: rgba(126, 43, 0, .32);
  border: 1px solid rgba(255,255,255,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

body.schedule-shell-page.inventory-cards-page .inventory-module-menu a.inventory-admin-menu i,
body.schedule-shell-page.inventory-shell-page .inventory-module-menu a.inventory-admin-menu i {
  color: #fff7ed;
}

body.schedule-shell-page.inventory-cards-page .inventory-module-menu a:hover,
body.schedule-shell-page.inventory-cards-page .inventory-module-menu a.active,
body.schedule-shell-page.inventory-shell-page .inventory-module-menu a:hover,
body.schedule-shell-page.inventory-shell-page .inventory-module-menu a.active {
  background: rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.20), 0 8px 18px rgba(135,55,0,.16);
  transform: translateY(-1px);
  text-decoration: none;
}

body.schedule-shell-page.inventory-cards-page .inventory-module-menu i,
body.schedule-shell-page.inventory-shell-page .inventory-module-menu i {
  font-size: 20px;
}

body.schedule-shell-page.inventory-cards-page .inventory-module-user,
body.schedule-shell-page.inventory-shell-page .inventory-module-user {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 260px;
}

body.schedule-shell-page.inventory-cards-page .inventory-module-avatar,
body.schedule-shell-page.inventory-shell-page .inventory-module-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.94);
  color: #242424;
  font-size: 22px;
}

body.schedule-shell-page.inventory-cards-page .inventory-module-user strong,
body.schedule-shell-page.inventory-cards-page .inventory-module-user small,
body.schedule-shell-page.inventory-shell-page .inventory-module-user strong,
body.schedule-shell-page.inventory-shell-page .inventory-module-user small {
  display: block;
}

body.schedule-shell-page.inventory-cards-page .inventory-module-user small,
body.schedule-shell-page.inventory-shell-page .inventory-module-user small {
  color: rgba(255,255,255,.78);
  font-weight: 700;
}

body.schedule-shell-page.inventory-cards-page .inventory-module-user a,
body.schedule-shell-page.inventory-shell-page .inventory-module-user a {
  color: #f06500;
  background: #fff;
  border-radius: 999px;
  padding: 10px 17px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(102, 42, 0, .12);
}

.inventory-top-ribbon {
  margin: 14px 14px 22px;
  min-height: 86px;
  padding: 12px 28px;
  border-radius: 16px;
  background: linear-gradient(90deg, #f06500, #e46908 62%, #cb5a00);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: 0 12px 28px rgba(226, 99, 0, .24);
}

.inventory-ribbon-brand {
  display: flex;
  align-items: baseline;
  gap: 18px;
  min-width: 220px;
}

.inventory-ribbon-brand strong {
  font-size: 27px;
  font-weight: 900;
}

.inventory-ribbon-brand span {
  color: rgba(255,255,255,.72);
  font-weight: 700;
}

.inventory-ribbon-menu {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex: 1;
  overflow-x: auto;
  padding-bottom: 2px;
}

.inventory-ribbon-menu a {
  min-width: 86px;
  min-height: 66px;
  padding: 10px 13px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 12px;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.12);
}

.inventory-ribbon-menu a.active,
.inventory-ribbon-menu a:hover {
  background: rgba(255,255,255,.20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  text-decoration: none;
}

.inventory-ribbon-menu i {
  font-size: 22px;
}

.inventory-ribbon-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
  justify-content: flex-end;
}

.inventory-ribbon-user strong,
.inventory-ribbon-user small {
  display: block;
}

.inventory-ribbon-user small {
  color: rgba(255,255,255,.78);
}

.inventory-ribbon-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.9);
  color: #333;
  font-size: 22px;
}

.inventory-ribbon-user a {
  color: #f06500;
  background: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 900;
  text-decoration: none;
}

.inventory-app-layout {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 26px;
  padding: 0 14px 24px;
}

.inventory-sidebar {
  min-height: calc(100vh - 124px);
  background: #fff;
  border: 1px solid #ead8ca;
  border-radius: 14px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.inventory-side-title {
  margin: 0 0 12px;
  color: #8f8277;
  font-size: 14px;
  font-weight: 800;
}

.inventory-side-title:not(:first-child) {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid #efe2d8;
}

.inventory-side-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inventory-side-menu a {
  min-height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  color: #252525;
  text-decoration: none;
  font-weight: 800;
}

.inventory-side-menu a:hover {
  background: #fff3e8;
  color: #f06500;
  text-decoration: none;
}

.inventory-side-menu a.active {
  color: #fff;
  background: linear-gradient(90deg, #ff7800, #f06500);
  box-shadow: 0 8px 18px rgba(255,106,0,.22);
}

.inventory-side-menu i {
  width: 20px;
  text-align: center;
}

.inventory-guide-btn {
  min-height: 52px;
  border-radius: 12px;
  border: 1px solid #ead8ca;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #333;
  text-decoration: none;
  font-weight: 800;
}

.inventory-main-content {
  min-width: 0;
}

.inventory-page-head {
  margin-bottom: 18px;
}

.inventory-page-title {
  display: flex;
  align-items: center;
  gap: 18px;
}

.inventory-page-title > i {
  color: #f06500;
  font-size: 36px;
}

.inventory-page-title h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 900;
}

.inventory-page-title h1 span {
  color: #f06500;
}

.inventory-page-title p {
  margin: 3px 0 0;
  color: #6d625a;
}

.inventory-pick-card {
  background: #fff;
  border: 1px solid #ead8ca;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.inventory-pick-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.inventory-pick-head h2 {
  margin: 0 0 14px;
  font-size: 18px;
  color: #6a4b35;
}

.inventory-card-search {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.inventory-card-search i {
  margin-left: -42px;
  color: #6c625c;
  pointer-events: none;
}

.inventory-card-search input {
  width: 360px;
  height: 42px;
  border: 1px solid #ead8ca;
  border-radius: 999px;
  padding: 0 44px 0 18px;
  background: #fff;
}

.inventory-cards-page .inventory-borrow-btn {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg,#ff7a00,#f26500);
  box-shadow: 0 10px 22px rgba(255,106,0,.24);
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

body.inventory-cards-page .inventory-equipment-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

body.inventory-cards-page .inventory-equipment-card {
  background: #fff;
  border: 1px solid #ead8ca;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 5px 16px rgba(0,0,0,.045);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}

body.inventory-cards-page .inventory-equipment-card:hover {
  transform: translateY(-3px);
  border-color: #ffc197;
  box-shadow: 0 12px 24px rgba(255,106,0,.12);
}

body.inventory-cards-page .inventory-equipment-card.active {
  border-color: #ff7a00;
  box-shadow: 0 0 0 3px rgba(255,106,0,.12), 0 12px 24px rgba(255,106,0,.12);
}

body.inventory-cards-page .inventory-equipment-image {
  height: 156px;
  border-radius: 11px;
  background: #f8f7f5;
}

body.inventory-cards-page .inventory-equipment-body h3 {
  color: #111;
  font-size: 16px;
  line-height: 1.3;
  min-height: 42px;
}

body.inventory-cards-page .inventory-remain {
  color: #3f3935;
}

body.inventory-cards-page .inventory-remain span {
  color: #168b42;
  font-weight: 900;
}

body.inventory-cards-page .inventory-qty-row {
  color: #111;
  font-weight: 900;
}

body.inventory-cards-page .inventory-qty-control button {
  background: #fff;
  border-color: #ffab75;
  color: #f06500;
}

body.inventory-cards-page .inventory-qty-control input {
  background: #fff;
  color: #111;
  border-color: #ded6ce;
}

body.inventory-cards-page .inventory-pagination {
  margin-top: 18px;
}

.inventory-adjust-form {
  display: grid;
  grid-template-columns: 118px 76px minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 640px;
}

.inventory-adjust-form select,
.inventory-adjust-form input {
  height: 36px;
  border: 1px solid #ead8ca;
  border-radius: 9px;
  padding: 0 10px;
  background: #fff;
}

.inventory-admin-card .grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.inventory-admin-card .form-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .inventory-app-layout {
    grid-template-columns: 1fr;
  }

  .inventory-sidebar {
    min-height: auto;
  }

  .inventory-ribbon-user {
    display: none;
  }
}

@media (max-width: 760px) {
  .inventory-top-ribbon,
  .inventory-pick-head,
  .inventory-card-search {
    flex-direction: column;
    align-items: stretch;
  }

  .inventory-card-search input {
    width: 100%;
  }

  .inventory-admin-card .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Warehouse/Inventory Page Styles
   ============================================================ */

.inventory-page {
  padding: 28px 0;
  max-width: 900px;
  margin: 0 auto;
}

.inventory-header {
  text-align: center;
  margin-bottom: 48px;
}

.inventory-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
  letter-spacing: -0.5px;
}

.inventory-header p {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}

.inventory-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

/* Warehouse Cards */
.warehouse-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 150px;
  padding: 0;
  border: none;
  border-radius: 28px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  background: #fff;
  position: relative;
  overflow: hidden;
}

.warehouse-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.warehouse-card-f3 {
  background: linear-gradient(135deg, #3dbb6b 0%, #228d52 100%);
  border: 2px solid rgba(61, 187, 107, 0.3);
}

.warehouse-card-f4 {
  background: linear-gradient(135deg, #2f80ed 0%, #1f5fbf 100%);
  border: 2px solid rgba(47, 128, 237, 0.3);
}

.warehouse-card-f6 {
  background: linear-gradient(135deg, #ff5d3d 0%, #d93b22 100%);
  border: 2px solid rgba(255, 93, 61, 0.3);
}

.warehouse-left {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 32px;
  flex: 1;
}

.warehouse-icon {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #fff;
  flex-shrink: 0;
}

.warehouse-text {
  color: #fff;
}

.warehouse-text h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.3px;
}

.warehouse-text p {
  font-size: 14px;
  margin: 0;
  opacity: 0.9;
}

.warehouse-arrow {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  margin-right: 20px;
  flex-shrink: 0;
}

/* Quick Action Buttons */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 20px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 600;
}

.quick-action-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.quick-action-btn i {
  font-size: 32px;
}

/* Updates Card (kept for compatibility) */
.updates-card {
  max-width: 720px;
  margin: 20px auto 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.updates-title {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--brand);
}

.update-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.update-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.update-item:first-child {
  border-top: none;
  padding-top: 0;
}

.update-date {
  min-width: 90px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
}

.update-detail {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

/* Responsive Design */
@media (max-width: 900px) {
  .inventory-page {
    padding: 24px 0;
  }

  .inventory-header {
    margin-bottom: 40px;
  }

  .warehouse-left {
    gap: 16px;
    padding: 16px 24px;
  }

  .warehouse-icon {
    width: 80px;
    height: 80px;
    font-size: 40px;
  }

  .warehouse-text h3 {
    font-size: 20px;
  }

  .warehouse-arrow {
    width: 64px;
    height: 64px;
    font-size: 24px;
    margin-right: 16px;
  }
}

@media (max-width: 640px) {
  .inventory-header h1 {
    font-size: 28px;
  }

  .warehouse-card {
    min-height: 130px;
  }

  .warehouse-left {
    gap: 12px;
    padding: 14px 16px;
  }

  .warehouse-icon {
    width: 70px;
    height: 70px;
    font-size: 32px;
  }

  .warehouse-text h3 {
    font-size: 18px;
  }

  .warehouse-text p {
    font-size: 13px;
  }

  .warehouse-arrow {
    width: 56px;
    height: 56px;
    font-size: 20px;
    margin-right: 12px;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Inventory Layout Styles
   ============================================================ */

/* Header Bar */
.inventory-header-bar {
  background: linear-gradient(90deg, #ff7a00, #f26500);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 4px 12px rgba(255, 106, 0, 0.2);
}

.inventory-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 200px;
}

.inventory-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
}

.inventory-header-logo i {
  font-size: 28px;
}

.inventory-header-store {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 14px;
}

.inventory-header-menu {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.inventory-header-menu a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
}

.inventory-header-menu a:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.inventory-header-menu i {
  font-size: 14px;
}

.inventory-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  justify-content: flex-end;
}

.inventory-header-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.inventory-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.inventory-header-profile strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.inventory-header-profile small {
  display: block;
  font-size: 12px;
  opacity: 0.9;
}

.inventory-header-logout {
  padding: 8px 16px;
  background: #fff;
  color: #ff6a00;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.2s ease;
}

.inventory-header-logout:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.inventory-layout {
  display: flex;
  min-height: 100vh;
  background: #f7f7f7;
}

/* Sidebar */
.inventory-sidebar {
  width: 270px;
  background: #fff;
  border-right: 1px solid #eee;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.inventory-logo-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.inventory-logo-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff7a00, #e46000);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 26px;
}

.inventory-logo-box h1 {
  font-size: 34px;
  color: #ff6a00;
  font-weight: 800;
}

.inventory-logo-box p {
  color: #888;
  font-size: 14px;
}

.inventory-menu-title {
  margin: 26px 0 14px;
  color: #999;
  font-size: 14px;
  font-weight: 700;
}

.inventory-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inventory-menu a {
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 600;
}

.inventory-menu a:hover {
  background: #fff3e8;
  color: #ff6a00;
}

.inventory-menu a.active {
  background: linear-gradient(90deg, #ff7a00, #f26500);
  color: #fff;
  box-shadow: 0 10px 20px rgba(255, 106, 0, 0.2);
}

.inventory-guide-btn {
  height: 54px;
  border-radius: 14px;
  border: 1px solid #e6e6e6;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
}

.inventory-guide-btn:hover {
  background: #fff3e8;
  color: #ff6a00;
}

/* Main Content */
.inventory-main-content {
  flex: 1;
  padding: 28px;
}

.inventory-topbar {
  background: #fff;
  border-radius: 26px;
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.inventory-topbar h2 {
  font-size: 42px;
  font-weight: 800;
  color: #222;
}

.inventory-topbar h2 span {
  color: #ff6a00;
}

.inventory-topbar p {
  color: #777;
  margin-top: 6px;
}

.inventory-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.inventory-search-box {
  width: 360px;
  height: 52px;
  border: 1px solid #ead8ca;
  border-radius: 14px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
}

.inventory-search-box i {
  color: #999;
}

.inventory-search-box input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 15px;
}

.inventory-borrow-btn {
  height: 52px;
  padding: 0 24px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(90deg, #ff7a00, #f26500);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(255, 106, 0, 0.25);
  transition: all 0.2s ease;
}

.inventory-borrow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 106, 0, 0.3);
}

/* Equipment Grid */
.inventory-equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.inventory-equipment-card {
  background: #020617;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  transition: 0.2s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
}

.inventory-equipment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.inventory-equipment-card.active {
  border-color: rgba(34, 197, 94, 0.8);
  box-shadow:
    0 0 0 1px rgba(34, 197, 94, 0.35),
    0 12px 30px rgba(0, 0, 0, 0.55);
  background: #022c22;
}

.inventory-equipment-image {
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
  background: #0b1220;
  margin-bottom: 8px;
  display: block;
}

.inventory-equipment-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.inventory-equipment-body {
  padding: 0;
}

/* Pagination */
.inventory-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.inventory-pagination-info {
  color: #666;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inventory-pagination-info span {
  color: #ff6a00;
  font-weight: 700;
}

.inventory-per-page-form {
  display: inline-flex;
  margin: 0;
}

.inventory-per-page-form select {
  height: 34px;
  min-width: 88px;
  border: 1px solid #ead8ca;
  border-radius: 9px;
  background: #fff;
  color: #222;
  padding: 0 10px;
  font-weight: 800;
}

.inventory-pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 320px;
}

.inventory-page-summary {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff7f0;
  color: #9a4b0f;
  border: 1px solid #f3d8c2;
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  white-space: nowrap;
}

.inventory-page-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #333;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

.inventory-page-btn:hover {
  border-color: #ff6a00;
  color: #ff6a00;
  background: #fff3e8;
}

.inventory-page-btn.active {
  background: #ff6a00;
  color: #fff;
  border-color: #ff6a00;
}

.inventory-page-btn.disabled {
  opacity: .45;
  pointer-events: none;
  background: #f6f6f6;
  color: #999;
}

.inventory-equipment-body h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 4px 0 2px;
  color: #fff;
}

.inventory-remain {
  color: #94a3b8;
  margin-bottom: 6px;
  font-size: 13px;
}

.inventory-remain span {
  color: #22c55e;
  font-weight: 800;
}

.inventory-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  font-size: 14px;
  color: #e5e7eb;
}

.inventory-qty-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inventory-qty-control button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: #020617;
  color: #e5e7eb;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.inventory-qty-control button:hover {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.9);
}

.inventory-qty-control input {
  width: 60px;
  height: 28px;
  padding: 4px 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: #020617;
  color: #e5e7eb;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

.inventory-qty-control input::-webkit-outer-spin-button,
.inventory-qty-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.inventory-qty-control input {
  appearance: textfield;
}

/* Responsive Design */
@media (max-width: 900px) {
  .inventory-layout {
    flex-direction: column;
  }

  .inventory-sidebar {
    width: 100%;
    padding: 20px;
  }

  .inventory-topbar {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  .inventory-topbar h2 {
    font-size: 32px;
  }

  .inventory-topbar-right {
    width: 100%;
    flex-direction: column;
  }

  .inventory-search-box {
    width: 100%;
  }
}

@media (max-width: 1000px) {
  .inventory-header-menu {
    gap: 4px;
  }

  .inventory-header-menu a {
    padding: 6px 10px;
    font-size: 12px;
  }

  .inventory-header-menu i {
    display: none;
  }

  .inventory-header-right {
    min-width: auto;
  }
}

@media (max-width: 640px) {
  .inventory-header-bar {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }

  .inventory-header-left {
    width: 100%;
  }

  .inventory-header-menu {
    display: none;
  }

  .inventory-header-right {
    width: 100%;
  }

  .inventory-main-content {
    padding: 16px;
  }

  .inventory-topbar {
    padding: 16px;
    border-radius: 16px;
  }

  .inventory-topbar h2 {
    font-size: 24px;
  }

  .inventory-equipment-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .inventory-equipment-card {
    padding: 12px;
  }

  .inventory-equipment-image {
    height: 180px;
  }

  .inventory-equipment-body h3 {
    font-size: 18px;
  }

  .inventory-pagination {
    flex-direction: column;
    gap: 16px;
  }

  .inventory-pagination-controls {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .inventory-page {
    padding: 16px 0;
  }

  .inventory-header {
    margin-bottom: 32px;
  }

  .inventory-header h1 {
    font-size: 24px;
  }

  .warehouse-card {
    flex-direction: column;
    text-align: center;
    min-height: auto;
    padding: 20px 16px;
  }

  .warehouse-left {
    width: 100%;
    margin-bottom: 16px;
    justify-content: center;
  }

  .warehouse-arrow {
    display: none;
  }
}

@media (max-width: 900px) {
  body.schedule-shell-page .schedule-search-autocomplete {
    width: 100%;
  }
}
/* Modern schedule smart search dropdown */
body.schedule-shell-page .schedule-search-autocomplete {
  position: relative;
  width: min(430px, 48vw);
  height: 50px;
  border: 2px solid #ff7a00;
  border-radius: 16px;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 10px 0 16px;
  box-shadow: 0 8px 18px rgba(255, 106, 0, .12);
}

body.schedule-shell-page .schedule-search-autocomplete input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0;
  font-size: 16px;
  color: #211815;
  box-shadow: none;
}

body.schedule-shell-page .schedule-search-autocomplete input:focus {
  border: 0;
  box-shadow: none;
}

body.schedule-shell-page .schedule-search-clear,
body.schedule-shell-page .schedule-search-arrow {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  margin-left: 6px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: #777;
  font-size: 16px;
  line-height: 1;
}

body.schedule-shell-page .schedule-search-clear {
  background: #f3f3f3;
}

body.schedule-shell-page .schedule-search-arrow {
  background: transparent;
  font-size: 18px;
}

body.schedule-shell-page .schedule-search-clear:hover,
body.schedule-shell-page .schedule-search-arrow:hover {
  color: #f26500;
  background: #fff2e8;
}

body.schedule-shell-page .schedule-suggest-menu {
  display: none;
  position: absolute;
  top: 58px;
  left: 0;
  right: 0;
  z-index: 120;
  background: #fff;
  border: 1px solid #ffe0c7;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .15);
  overflow: hidden;
  padding: 0;
  max-height: 440px;
  overflow-y: auto;
}

body.schedule-shell-page .schedule-suggest-menu.open {
  display: block;
}

body.schedule-shell-page .schedule-suggest-item {
  width: 100%;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  border: 0;
  border-bottom: 1px solid #f1e7df;
  border-radius: 0;
  background: #fff;
  color: #222;
  text-align: left;
}

body.schedule-shell-page .schedule-suggest-item:hover,
body.schedule-shell-page .schedule-suggest-item:focus,
body.schedule-shell-page .schedule-suggest-item.is-active {
  background: #fff4ea;
  outline: none;
}

body.schedule-shell-page .schedule-suggest-main {
  min-width: 0;
  display: block;
}

body.schedule-shell-page .schedule-suggest-item strong,
body.schedule-shell-page .schedule-suggest-item b {
  display: block;
  color: #222;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.schedule-shell-page .schedule-suggest-main > span {
  display: block;
  color: #333;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

body.schedule-shell-page .schedule-suggest-item small {
  display: block;
  color: #777;
  font-size: 13px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.schedule-shell-page .schedule-suggest-item em {
  flex: 0 0 auto;
  height: 26px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #ffe7d2;
  color: #f26500;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

body.schedule-shell-page .schedule-suggest-footer {
  width: 100%;
  border: 0;
  padding: 14px 16px;
  color: #ff6a00;
  background: #fffaf6;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

body.schedule-shell-page .schedule-suggest-footer:hover,
body.schedule-shell-page .schedule-suggest-footer:focus {
  background: #fff2e8;
  outline: none;
}

body.schedule-shell-page .schedule-suggest-empty {
  padding: 14px 16px;
  color: #8a7565;
  font-size: 14px;
  background: #fffaf6;
}

@media (max-width: 900px) {
  body.schedule-shell-page .schedule-search-autocomplete {
    width: 100%;
  }
}
/* Strong reset for manage.php smart dropdown buttons */
body.schedule-shell-page .table-search .schedule-search-autocomplete {
  width: min(430px, 48vw) !important;
  height: 50px !important;
  padding: 0 10px 0 16px !important;
  overflow: visible !important;
}

body.schedule-shell-page .table-search .schedule-search-autocomplete input {
  height: 100% !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.schedule-shell-page .table-search .schedule-search-clear,
body.schedule-shell-page .table-search .schedule-search-arrow {
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  margin: 0 0 0 6px !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  transform: none !important;
  color: #888 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

body.schedule-shell-page .table-search .schedule-search-clear {
  background: #f1f1f1 !important;
}

body.schedule-shell-page .table-search .schedule-search-arrow {
  background: transparent !important;
}

body.schedule-shell-page .table-search .schedule-suggest-menu {
  top: 58px !important;
  left: 0 !important;
  right: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  border: 1px solid #ffe0c7 !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.15) !important;
  overflow: hidden auto !important;
}

body.schedule-shell-page .table-search .schedule-suggest-menu .schedule-suggest-item {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 14px 16px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 14px !important;
  border: 0 !important;
  border-bottom: 1px solid #f1e7df !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #222 !important;
  box-shadow: none !important;
  text-align: left !important;
  transform: none !important;
}

body.schedule-shell-page .table-search .schedule-suggest-menu .schedule-suggest-item:hover,
body.schedule-shell-page .table-search .schedule-suggest-menu .schedule-suggest-item:focus,
body.schedule-shell-page .table-search .schedule-suggest-menu .schedule-suggest-item.is-active {
  background: #fff4ea !important;
  color: #222 !important;
  box-shadow: none !important;
  transform: none !important;
}

body.schedule-shell-page .table-search .schedule-suggest-menu .schedule-suggest-main {
  display: block !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

body.schedule-shell-page .table-search .schedule-suggest-menu .schedule-suggest-item strong {
  display: block !important;
  color: #222 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  margin: 0 0 4px !important;
}

body.schedule-shell-page .table-search .schedule-suggest-menu .schedule-suggest-main > span {
  display: block !important;
  color: #333 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
}

body.schedule-shell-page .table-search .schedule-suggest-menu .schedule-suggest-item small {
  display: block !important;
  color: #777 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  margin-top: 4px !important;
}

body.schedule-shell-page .table-search .schedule-suggest-menu .schedule-suggest-item em {
  flex: 0 0 auto !important;
  height: 26px !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  background: #ffe7d2 !important;
  color: #f26500 !important;
  font-style: normal !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

body.schedule-shell-page .table-search .schedule-suggest-menu .schedule-suggest-footer {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  display: block !important;
  padding: 14px 16px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fffaf6 !important;
  color: #ff6a00 !important;
  box-shadow: none !important;
  text-align: left !important;
  font-weight: 800 !important;
  transform: none !important;
}

body.schedule-shell-page .table-search .schedule-suggest-menu .schedule-suggest-footer:hover,
body.schedule-shell-page .table-search .schedule-suggest-menu .schedule-suggest-footer:focus {
  background: #fff2e8 !important;
  color: #ff6a00 !important;
}

@media (max-width: 900px) {
  body.schedule-shell-page .table-search .schedule-search-autocomplete {
    width: 100% !important;
  }
}
/* Shared smart dropdown for local pages */
body.schedule-shell-page .local-smart-search {
  position: relative;
  width: min(430px, 48vw);
  height: 50px;
  padding: 0 10px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid #ff7a00;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(255,106,0,.12);
  overflow: visible;
}

body.schedule-shell-page .local-smart-search > i {
  flex: 0 0 auto;
  color: #f26500;
}

body.schedule-shell-page .local-smart-search input {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
  font-size: 15px;
}

body.schedule-shell-page .table-search .local-smart-search input,
body.schedule-shell-page .inventory-card-search .local-smart-search input {
  width: auto !important;
}

body.schedule-shell-page .local-smart-search .schedule-search-clear,
body.schedule-shell-page .local-smart-search .schedule-search-arrow,
body.schedule-shell-page .table-search .local-smart-search .schedule-search-clear,
body.schedule-shell-page .table-search .local-smart-search .schedule-search-arrow {
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  margin: 0 0 0 4px !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  transform: none !important;
  color: #888 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

body.schedule-shell-page .local-smart-search .schedule-search-clear { background: #f1f1f1 !important; }
body.schedule-shell-page .local-smart-search .schedule-search-arrow { background: transparent !important; }

body.schedule-shell-page .local-smart-search .schedule-suggest-menu {
  top: 58px !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 180 !important;
}

body.schedule-shell-page .inventory-card-search {
  align-items: center;
  flex-wrap: wrap;
}

body.schedule-shell-page .inventory-card-search > i {
  display: none;
}

body.schedule-shell-page .inventory-card-search .local-smart-search {
  width: min(430px, 52vw);
}

body.schedule-shell-page .smart-search-form {
  align-items: flex-start;
}

body.schedule-shell-page .smart-search-form > button[type="submit"] {
  height: 50px;
}

@media (max-width: 900px) {
  body.schedule-shell-page .local-smart-search,
  body.schedule-shell-page .inventory-card-search .local-smart-search {
    width: 100%;
  }
}
body.schedule-shell-page .inventory-card-search .local-smart-search > i {
  margin-left: 0;
}

/* QR borrow/return shared header aligned with the landing page */
body.qr-flow-page {
  min-height: 100vh;
  overflow-x: hidden;
}

.qr-flow-wrap {
  width: min(1580px, 94vw);
}

.flye-navbar.flye-qr-navbar {
  margin-bottom: 18px;
  gap: 22px;
}

.flye-navbar.flye-qr-navbar .flye-brand-logo img {
  object-fit: contain;
}

.flye-navbar.flye-qr-navbar .qr-nav-links {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.flye-navbar.flye-qr-navbar .qr-nav-links a {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: none;
}

.flye-navbar.flye-qr-navbar .qr-nav-links a:hover,
.flye-navbar.flye-qr-navbar .qr-nav-links a.active {
  background: rgba(255,255,255,.24);
  border-color: rgba(255,255,255,.48);
  transform: translateY(-1px);
}

.flye-navbar.flye-qr-navbar .qr-nav-links a.login {
  padding-inline: 16px;
  background: rgba(255,255,255,.16);
}

.flye-navbar.flye-qr-navbar .qr-nav-links i {
  font-size: 14px;
  line-height: 1;
}

.flye-alert {
  width: 100%;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 800;
  background: #fff;
  border: 1px solid var(--line, #ead8ca);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

.flye-alert-success,
.flye-alert-ok {
  color: #047857;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.flye-alert-error,
.flye-alert-err,
.flye-alert-danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff1f2;
}

@media (max-width: 1180px) {
  .flye-navbar.flye-qr-navbar {
    align-items: flex-start;
  }

  .flye-navbar.flye-qr-navbar .qr-nav-links {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .qr-flow-wrap {
    width: 100%;
  }

  .flye-navbar.flye-qr-navbar .qr-nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .flye-navbar.flye-qr-navbar .qr-nav-links a,
  .flye-navbar.flye-qr-navbar .qr-nav-links a.login {
    justify-content: center;
    padding: 10px 12px;
  }
}
/* -------------------------------------------------------
   Responsive safety pass: mobile / iPad
   ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; }
body { overflow-x: hidden; }
img, svg, video, canvas { max-width: 100%; }
input, select, textarea, button { max-width: 100%; }

.table-wrap,
.schedule-table-wrap,
body.schedule-shell-page .schedule-modern-table-wrap,
body.admin-users-page .admin-modern-table-wrap {
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 681px) and (max-width: 1120px) {
  .flye-step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flye-step-arrow { display: none; }
  .flye-ready { min-height: 132px; }
}

@media (max-width: 900px) {
  body.schedule-shell-page .schedule-topbar {
    flex-wrap: wrap;
    gap: 12px;
  }
  body.schedule-shell-page .schedule-welcome { min-width: 0; }
  body.schedule-shell-page .schedule-welcome h1 { font-size: clamp(22px, 6vw, 30px); }
  body.schedule-shell-page .schedule-top-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  body.schedule-shell-page .schedule-profile,
  body.schedule-shell-page .inventory-module-user { min-width: 0; }
  body.schedule-shell-page .schedule-profile strong,
  body.schedule-shell-page .schedule-profile small,
  body.schedule-shell-page .inventory-module-user strong,
  body.schedule-shell-page .inventory-module-user small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 42vw;
  }
  body.schedule-shell-page .schedule-section-head,
  body.schedule-shell-page .schedule-table-toolbar,
  body.schedule-shell-page .admin-section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  body.schedule-shell-page .table-search,
  body.schedule-shell-page .smart-search-form {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  body.schedule-shell-page .smart-search-form > button[type="submit"],
  body.schedule-shell-page .table-search button { width: 100%; }
  body.schedule-shell-page .schedule-modern-pagination,
  body.schedule-shell-page .pagination {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  body.schedule-shell-page .schedule-suggest-menu,
  body.schedule-shell-page .local-smart-search .schedule-suggest-menu {
    max-height: min(52vh, 420px);
    overflow: auto;
  }
  body.schedule-shell-page.inventory-cards-page > .container,
  body.schedule-shell-page.inventory-shell-page > .container { padding-top: 118px; }
  body.schedule-shell-page.inventory-cards-page .inventory-module-topbar,
  body.schedule-shell-page.inventory-shell-page .inventory-module-topbar {
    min-height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
  }
  body.schedule-shell-page.inventory-cards-page .inventory-module-menu,
  body.schedule-shell-page.inventory-shell-page .inventory-module-menu {
    order: 2;
    width: 100%;
    flex: 0 0 100%;
  }
  body.schedule-shell-page.inventory-cards-page .inventory-module-user,
  body.schedule-shell-page.inventory-shell-page .inventory-module-user { margin-left: auto; }
}

@media (max-width: 680px) {
  .flye-card,
  .card { padding: 18px; border-radius: 18px; }
  .flye-hero h1 { font-size: clamp(30px, 9vw, 42px); }
  .scan-box,
  input.scan-box { min-height: 58px; font-size: 16px !important; }
  .return-status-grid { grid-template-columns: 1fr; }
  .return-status-box,
  .return-status-box.empty { min-height: auto; }
  .return-step-grid .flye-step-box,
  .return-step-grid .flye-ready { min-height: auto; }
  .flye-navbar.flye-qr-navbar { border-radius: 16px; }
}

@media (max-width: 640px) {
  body.schedule-shell-page > .container { padding-left: 10px; padding-right: 10px; }
  body.schedule-shell-page .card,
  body.schedule-shell-page .my-table-card { padding: 16px; border-radius: 16px; }
  body.schedule-shell-page .h1 { font-size: 24px; }
  body.schedule-shell-page .modern-table { min-width: 900px; }
  body.schedule-shell-page .schedule-master-table { min-width: 680px; }
  /* Calendar rendered at a readable width; JS scales it to fit the screen
     (fitMonthCalendar in dashboard.php) so the whole week is visible without
     manual pinch-zoom, matching the "zoomed-out" look. */
  .schedule-month-calendar { min-width: 760px; }
  body.schedule-dashboard-page .schedule-month-calendar th { height: 38px; font-size: 13px; }
  body.schedule-dashboard-page .schedule-month-calendar td { height: 176px; min-height: 176px; padding: 8px; }
  body.schedule-dashboard-page .schedule-month-day { font-size: 14px; margin-bottom: 6px; }
  body.schedule-dashboard-page .schedule-slot-time { font-size: 11px; margin-bottom: 4px; }
  body.schedule-dashboard-page .schedule-room-line { font-size: 11px; padding: 3px 6px; }
  body.admin-users-page .admin-user-form-card form { grid-template-columns: 1fr; }
  body.admin-users-page .table-head { flex-direction: column; gap: 12px; }
}
/* Small-screen modal and inline-form cleanup */
@media (max-width: 520px) {
  body.admin-users-page .modal-card,
  body.admin-users-page .modal-content,
  .modal-card,
  .modal-content {
    width: calc(100vw - 24px) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 24px) !important;
    padding: 18px !important;
  }
}
/* QR flow scroll fix: admin pages must scroll even in compact desktop mode. */
body.flye-home.qr-flow-page {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
body.flye-home.qr-flow-page .qr-flow-wrap {
  padding-bottom: 28px;
}
@media (min-width: 1001px) and (max-height: 820px) {
  body.flye-home.qr-flow-page {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  body.flye-home.qr-flow-page .flye-navbar.flye-qr-navbar {
    margin-bottom: 10px;
  }
  body.flye-home.qr-flow-page .card {
    margin-bottom: 10px;
  }
}
/* Shared soft table theme for QR, inventory, and audit pages. */
.qr-modern-table-wrap,
.inventory-modern-table-wrap,
.admin-log-modern-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid #f3dfcf;
  box-shadow: 0 8px 24px rgba(140,80,30,.045);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.qr-modern-table-wrap .modern-table,
.inventory-modern-table-wrap .modern-table,
.admin-log-modern-table-wrap .modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 920px;
  background: #fff;
}
.qr-modern-table-wrap .modern-table thead th,
.inventory-modern-table-wrap .modern-table thead th,
.admin-log-modern-table-wrap .modern-table thead th {
  background: linear-gradient(180deg,#fff4ea 0%,#ffe9d8 100%);
  color: #b84f00;
  border-top: 1px solid #ffd9bd;
  border-bottom: 1px solid #ffc99d;
  padding: 15px 18px;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}
.qr-modern-table-wrap .modern-table thead th:first-child,
.inventory-modern-table-wrap .modern-table thead th:first-child,
.admin-log-modern-table-wrap .modern-table thead th:first-child {
  border-radius: 12px 0 0 0;
  border-left: 1px solid #ffd9bd;
  text-align: center;
}
.qr-modern-table-wrap .modern-table thead th:last-child,
.inventory-modern-table-wrap .modern-table thead th:last-child,
.admin-log-modern-table-wrap .modern-table thead th:last-child {
  border-radius: 0 12px 0 0;
  border-right: 1px solid #ffd9bd;
  text-align: center;
}
.qr-modern-table-wrap .modern-table tbody td,
.inventory-modern-table-wrap .modern-table tbody td,
.admin-log-modern-table-wrap .modern-table tbody td {
  background: #fff;
  color: #201713;
  border-bottom: 1px solid #f1e5dc;
  padding: 18px;
  font-size: 14px;
  vertical-align: middle;
}
.qr-modern-table-wrap .modern-table tbody tr:hover td,
.inventory-modern-table-wrap .modern-table tbody tr:hover td,
.admin-log-modern-table-wrap .modern-table tbody tr:hover td {
  background: #fff9f3;
}
.qr-modern-table-wrap .modern-table td:first-child,
.inventory-modern-table-wrap .modern-table td:first-child,
.admin-log-modern-table-wrap .modern-table td:first-child {
  text-align: center;
}
.qr-modern-table-wrap .modern-table .actions,
.inventory-modern-table-wrap .modern-table .actions,
.admin-log-modern-table-wrap .modern-table .actions {
  justify-content: center;
  gap: 8px;
}
.qr-modern-table-wrap .badge,
.inventory-modern-table-wrap .badge,
.admin-log-modern-table-wrap .badge {
  border-radius: 999px;
  font-weight: 800;
}
@media (max-width: 900px) {
  .qr-modern-table-wrap .modern-table,
  .inventory-modern-table-wrap .modern-table,
  .admin-log-modern-table-wrap .modern-table {
    min-width: 820px;
  }
  .qr-modern-table-wrap .modern-table thead th,
  .inventory-modern-table-wrap .modern-table thead th,
  .admin-log-modern-table-wrap .modern-table thead th,
  .qr-modern-table-wrap .modern-table tbody td,
  .inventory-modern-table-wrap .modern-table tbody td,
  .admin-log-modern-table-wrap .modern-table tbody td {
    padding: 13px 14px;
    font-size: 13px;
  }
}
/* QR admin row action buttons: keep edit/toggle/delete tidy in table cells. */
.qr-modern-table-wrap .modern-table th:last-child,
.qr-modern-table-wrap .modern-table td.qr-actions-cell {
  width: 280px;
  min-width: 260px;
}
.qr-modern-table-wrap .qr-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.qr-modern-table-wrap .qr-row-actions form,
.qr-modern-table-wrap .qr-row-actions a {
  display: inline-flex;
  margin: 0;
  text-decoration: none;
}
.qr-modern-table-wrap .qr-row-actions button {
  height: 36px;
  min-width: 70px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
  white-space: nowrap;
}
.qr-modern-table-wrap .qr-row-actions .qr-action-edit {
  color: #d76500;
  background: #fff8f2;
  border: 1px solid #f3b078;
}
.qr-modern-table-wrap .qr-row-actions .qr-action-toggle {
  color: #7a3f00;
  background: #fff1df;
  border: 1px solid #f0b878;
}
.qr-modern-table-wrap .qr-row-actions .qr-action-delete {
  min-width: 54px;
  color: #c92335;
  background: #fff7f8;
  border: 1px solid #f4a0a8;
}
.qr-modern-table-wrap .qr-row-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(140,80,30,.12);
}
@media (max-width: 900px) {
  .qr-modern-table-wrap .modern-table th:last-child,
  .qr-modern-table-wrap .modern-table td.qr-actions-cell {
    width: 230px;
    min-width: 230px;
  }
  .qr-modern-table-wrap .qr-row-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}
/* Admin shell layout shared with inventory */
body.admin-users-page.schedule-shell-page {
  background: #f7f4ef;
}

body.admin-users-page.schedule-shell-page > .container {
  width: 100%;
  max-width: none;
}

body.admin-users-page.schedule-shell-page .admin-main-content {
  padding: 0;
}

body.admin-users-page.schedule-shell-page .admin-module-topbar {
  min-height: 96px;
  padding: 10px 20px;
  background: linear-gradient(90deg, #f06500, #e46908 62%, #cb5a00);
  color: #fff;
}

body.admin-users-page.schedule-shell-page .admin-module-menu {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

body.admin-users-page.schedule-shell-page .admin-module-menu::-webkit-scrollbar {
  display: none;
}

body.admin-users-page.schedule-shell-page .admin-module-menu a {
  min-width: 104px;
  min-height: 60px;
  padding: 8px 12px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.20);
  font-weight: 800;
  text-decoration: none;
  transition: background .18s, box-shadow .18s, transform .18s;
}

body.admin-users-page.schedule-shell-page .admin-module-menu a:hover,
body.admin-users-page.schedule-shell-page .admin-module-menu a.active {
  background: rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.20), 0 8px 18px rgba(135,55,0,.16);
  transform: translateY(-1px);
}

body.admin-users-page.schedule-shell-page .admin-module-menu .sd-icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
}

body.admin-users-page.schedule-shell-page .admin-module-user {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

body.admin-users-page.schedule-shell-page .admin-module-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #191919;
  display: grid;
  place-items: center;
}

body.admin-users-page.schedule-shell-page .admin-module-avatar .sd-icon {
  width: 23px;
  height: 23px;
}

body.admin-users-page.schedule-shell-page .admin-module-user strong,
body.admin-users-page.schedule-shell-page .admin-module-user small {
  display: block;
  line-height: 1.2;
}

body.admin-users-page.schedule-shell-page .admin-module-user strong {
  font-weight: 900;
}

body.admin-users-page.schedule-shell-page .admin-module-user small {
  margin-top: 2px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 700;
}

body.admin-users-page.schedule-shell-page .admin-module-user a {
  color: #f06500;
  background: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

body.admin-users-page.schedule-shell-page .admin-user-form-card,
body.admin-users-page.schedule-shell-page .my-table-card {
  margin-top: 18px;
}

@media (min-width: 901px) {
  body.admin-users-page.schedule-shell-page > .container {
    padding-top: 142px;
  }
}

@media (max-width: 900px) {
  body.admin-users-page.schedule-shell-page .admin-module-topbar {
    min-height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
  }

  body.admin-users-page.schedule-shell-page .admin-module-menu {
    order: 2;
    width: 100%;
    flex: 0 0 100%;
  }

  body.admin-users-page.schedule-shell-page .admin-module-user {
    margin-left: auto;
    min-width: 0;
  }

  body.admin-users-page.schedule-shell-page .admin-module-user strong,
  body.admin-users-page.schedule-shell-page .admin-module-user small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 42vw;
  }
}

/* Password reset recovery */
.login-note-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.password-reset-page .password-reset-card,
.password-reset-page .reset-wait-box,
.password-reset-page .reset-result-card {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.password-reset-page .reset-wait-box {
  background: #fffaf6;
  border: 1px solid #ffd8ba;
}

.reset-wait-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #fff1e6;
  color: #d35400;
  font-weight: 800;
  margin: 8px 0 14px;
}

.reset-wait-status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ff6a00;
  box-shadow: 0 0 0 6px rgba(255, 106, 0, .12);
}

.schedule-notify-link {
  text-decoration: none;
  color: inherit;
}

.schedule-notify-link.has-alert {
  color: #ff6a00;
}

.notifications-main {
  display: grid;
  gap: 18px;
}

.notifications-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 2px;
}

.notifications-header .h1 {
  margin-bottom: 4px;
}

.notifications-header p,
.notification-admin-card p {
  margin: 0;
  color: #78675c;
}

.notification-admin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.notifications-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid #f1e5dc;
  border-radius: 16px;
  background: #fff;
  color: #241914;
  text-decoration: none;
  transition: .2s ease;
}

.notification-item:hover {
  border-color: #ffbe8a;
  background: #fff9f3;
  text-decoration: none;
  transform: translateY(-1px);
}

.notification-item.is-unread {
  border-color: #ffd3b0;
  background: #fffaf6;
  box-shadow: 0 10px 24px rgba(255,106,0,.08);
}

.notification-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 999px;
  background: #d7c7ba;
}

.notification-item.is-unread .notification-dot {
  background: #ff6a00;
  box-shadow: 0 0 0 4px rgba(255,106,0,.12);
}

.notification-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.notification-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.notification-topline strong {
  min-width: 0;
  font-size: 16px;
}

.notification-topline em {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff2e8;
  color: #c55200;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.notification-message {
  color: #4c3c32;
  line-height: 1.55;
}

.notification-meta {
  color: #8a7565;
  font-size: 13px;
}

.notifications-empty {
  padding: 28px 10px;
  text-align: center;
  color: #7c6b60;
}

.notifications-empty h2 {
  margin: 0 0 6px;
  color: #241914;
}

@media (max-width: 720px) {
  .notification-popover {
    position: fixed;
    top: 84px;
    left: 10px;
    right: 10px;
    width: auto;
    max-height: calc(100vh - 104px);
  }

  .notification-popover::before {
    display: none;
  }

  .notification-popover-head {
    padding: 16px 16px 8px;
  }

  .notification-tabs {
    padding-left: 16px;
    padding-right: 16px;
  }

  .notifications-header,
  .notification-admin-card,
  .notification-topline {
    flex-direction: column;
    align-items: stretch;
  }
}

.reset-summary-pill {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff1e6;
  color: #b94f00;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.reset-summary-pill strong {
  font-size: 22px;
  color: #ff6a00;
}

.reset-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
  background: #f5f5f5;
  color: #555;
}

.reset-status-badge.pending { background: #fff1e6; color: #dc5f00; }
.reset-status-badge.approved { background: #eaf6ff; color: #1d66b2; }
.reset-status-badge.used { background: #eafaf0; color: #157a39; }
.reset-status-badge.expired { background: #f3f4f6; color: #6b7280; }
.reset-status-badge.cancelled { background: #fee2e2; color: #b91c1c; }

.password-reset-admin-card .inline-form {
  margin: 0;
}

@media (max-width: 700px) {
  .password-reset-page .password-reset-card,
  .password-reset-page .reset-wait-box,
  .password-reset-page .reset-result-card {
    max-width: none;
  }

  .reset-summary-pill {
    width: 100%;
    justify-content: center;
  }
}

/* Keep non-dashboard schedule pages aligned with dashboard shell edges */
@media (min-width: 901px) {
  body.schedule-shell-page:not(.inventory-shell-page):not(.inventory-cards-page):not(.admin-users-page) .schedule-shell-sidebar {
    left: 0;
    top: 0;
    bottom: 0;
    width: 246px;
    border-radius: 0;
    box-shadow: 4px 0 18px rgba(0,0,0,.04);
  }

  body.schedule-shell-page:not(.inventory-shell-page):not(.inventory-cards-page):not(.admin-users-page) .schedule-shell-topbar {
    left: 246px;
    right: 0;
    top: 0;
    border-radius: 0;
    box-shadow: 0 1px 0 #ececec, 0 6px 18px rgba(0,0,0,.035);
  }

  body.schedule-shell-page:not(.inventory-shell-page):not(.inventory-cards-page):not(.admin-users-page) > .container {
    padding-left: 246px;
    padding-top: 88px;
  }
}

/* QR borrow scan page */
.qr-borrow-member-card,
.qr-borrow-scan-card,
.qr-borrow-list-card {
  margin-bottom: 14px;
}

.qr-borrow-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.qr-eyebrow {
  margin: 0 0 4px;
  color: #f26500;
  font-weight: 800;
}

.qr-borrow-header h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
}

.qr-borrow-count {
  min-width: 150px;
  padding: 14px 18px;
  border: 1px solid #ffd8bd;
  border-radius: 18px;
  background: #fff7ef;
  text-align: center;
}

.qr-borrow-count strong {
  display: block;
  color: #ff6a00;
  font-size: 34px;
  line-height: 1;
}

.qr-borrow-count span {
  color: #8b6f5e;
  font-size: 13px;
  font-weight: 700;
}

.qr-member-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.qr-member-item {
  padding: 14px 16px;
  border: 1px solid #f1dfd0;
  border-radius: 14px;
  background: #fffaf6;
}

.qr-member-item span {
  display: block;
  margin-bottom: 4px;
  color: #8b6f5e;
  font-size: 13px;
}

.qr-member-item strong {
  color: #1f1a17;
  font-size: 16px;
}

.qr-borrow-scan-card h2,
.qr-borrow-list-card h2 {
  margin-top: 0;
}

.qr-borrow-scan-form {
  width: min(1320px, 100%);
}

.qr-borrow-step-grid {
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr) 220px;
}

.qr-borrow-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.qr-borrow-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.qr-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: #f28a35;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(242, 106, 0, .18);
}

.qr-action-button.secondary {
  border: 1px solid #ffd1b2;
  background: #fff7ef;
  color: #c65300;
  box-shadow: none;
}

.qr-action-button.danger {
  border: 1px solid #ffc9d2;
  background: #fff5f5;
  color: #e11d48;
  box-shadow: none;
}

.qr-borrow-table-wrap {
  overflow: auto;
  border: 1px solid #ffe1c9;
  border-radius: 18px;
}

.qr-borrow-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.qr-borrow-table th {
  padding: 14px 16px;
  background: #fff0e2;
  color: #b34d00;
  text-align: left;
  white-space: nowrap;
}

.qr-borrow-table td {
  padding: 14px 16px;
  border-top: 1px solid #f3e2d5;
  vertical-align: middle;
}

.qr-borrow-table .center {
  text-align: center;
}

.qr-item-code {
  display: block;
  margin-top: 3px;
  color: #8b6f5e;
  font-size: 13px;
}

.qr-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.qr-status-pill.borrowed {
  background: #fff4df;
  color: #b45309;
}

.qr-status-pill.returned {
  background: #ecfdf3;
  color: #15803d;
}

@media (max-width: 1120px) {
  .qr-borrow-step-grid {
    grid-template-columns: 1fr;
  }

  .qr-borrow-step-grid .flye-step-arrow,
  .qr-borrow-step-grid .flye-step-divider {
    display: none;
  }

  .qr-member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .qr-borrow-header,
  .qr-borrow-list-head {
    flex-direction: column;
  }

  .qr-borrow-count {
    width: 100%;
  }

  .qr-member-grid {
    grid-template-columns: 1fr;
  }

  .qr-borrow-actions,
  .qr-borrow-actions form,
  .qr-action-button {
    width: 100%;
  }
}

/* Compact borrower summary on borrow scan page */
.qr-borrow-member-card {
  padding: 18px 22px;
  margin-bottom: 12px;
}

.qr-borrow-member-card .qr-borrow-header {
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.qr-borrow-member-card .qr-eyebrow {
  margin: 0 0 3px;
  font-size: 13px;
  line-height: 1.2;
}

.qr-borrow-member-card .qr-borrow-header h1,
.qr-borrow-member-card .qr-borrow-header h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
}

.qr-borrow-member-card .qr-borrow-header p:not(.qr-eyebrow) {
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.45;
}

.qr-borrow-member-card .qr-borrow-count {
  min-width: 112px;
  padding: 10px 12px;
  border-radius: 14px;
}

.qr-borrow-member-card .qr-borrow-count strong {
  font-size: 28px;
}

.qr-borrow-member-card .qr-borrow-count span {
  font-size: 12px;
  line-height: 1.25;
}

.qr-borrow-member-card .qr-member-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.qr-borrow-member-card .qr-member-item {
  flex: 1 1 170px;
  min-height: 0;
  padding: 8px 11px;
  border-radius: 12px;
  background: #fffaf6;
}

.qr-borrow-member-card .qr-member-item span {
  margin-bottom: 2px;
  font-size: 11px;
  line-height: 1.2;
}

.qr-borrow-member-card .qr-member-item strong {
  font-size: 13px;
  line-height: 1.25;
}

@media (max-width: 720px) {
  .qr-borrow-member-card {
    padding: 16px;
  }

  .qr-borrow-member-card .qr-borrow-header {
    align-items: flex-start;
  }

  .qr-borrow-member-card .qr-borrow-header h1,
  .qr-borrow-member-card .qr-borrow-header h2 {
    font-size: 24px;
  }

  .qr-borrow-member-card .qr-member-item {
    flex-basis: 140px;
  }
}

/* QR borrow list action polish */
.qr-borrow-list-card {
  position: relative;
  padding-bottom: 24px;
}

.qr-borrow-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f5dfcf;
}

.qr-borrow-list-head h2 {
  margin-bottom: 4px;
}

.qr-borrow-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 8px;
  background: #fffaf6;
  border: 1px solid #ffd9bf;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(255, 106, 0, .08);
}

.qr-borrow-actions form {
  margin: 0;
}

.qr-action-button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font-weight: 800;
  line-height: 1;
}

.qr-action-button.secondary {
  background: #fff;
  border: 1px solid rgba(255, 106, 0, .34);
  color: #c65300;
  box-shadow: none;
}

.qr-action-button.secondary:hover {
  background: #fff3e8;
  border-color: #ff7a00;
}

.qr-action-button:not(.secondary) {
  background: linear-gradient(90deg, #ff7a00, #f26500);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 106, 0, .24);
}

.qr-action-button:not(.secondary):hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(255, 106, 0, .28);
}

@media (max-width: 900px) {
  .qr-borrow-list-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .qr-borrow-actions {
    width: 100%;
    border-radius: 18px;
    justify-content: stretch;
  }

  .qr-borrow-actions form {
    flex: 1 1 180px;
  }

  .qr-action-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .qr-borrow-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Borrow scan page spacing alignment */
.qr-borrow-scan-card,
.qr-borrow-list-card {
  padding: 24px clamp(28px, 2.2vw, 42px);
}

.qr-borrow-list-card {
  padding-bottom: 26px;
}

.qr-borrow-scan-card > h2,
.qr-borrow-list-card > h2,
.qr-borrow-list-head {
  margin-left: 0;
}

.qr-borrow-scan-card > .muted,
.qr-borrow-list-card > .muted {
  margin-top: 8px;
  margin-bottom: 18px;
}

@media (max-width: 720px) {
  .qr-borrow-scan-card,
  .qr-borrow-list-card {
    padding: 18px;
  }
}

/* Notification bell icon hard override */
.schedule-top-actions .schedule-notification-widget .schedule-notify-button {
  font-size: 28px !important;
  line-height: 1 !important;
  padding: 0 !important;
}

.schedule-top-actions .schedule-notification-widget .schedule-notify-button svg.sd-icon {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  stroke-width: 2.4 !important;
  display: block !important;
}

.admin-module-topbar .schedule-notification-widget,
.inventory-module-topbar .schedule-notification-widget {
  flex: 0 0 auto;
}

.admin-module-topbar .schedule-notification-widget .schedule-notify-button,
.inventory-module-topbar .schedule-notification-widget .schedule-notify-button {
  width: 46px !important;
  height: 46px !important;
  font-size: 28px !important;
  line-height: 1 !important;
  padding: 0 !important;
  background: rgba(255,255,255,.92);
  color: #2a2a2a;
}

.admin-module-topbar .schedule-notification-widget .schedule-notify-button svg.sd-icon,
.inventory-module-topbar .schedule-notification-widget .schedule-notify-button svg.sd-icon {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  stroke-width: 2.4 !important;
  display: block !important;
}

/* Select store uses the regular schedule topbar, not the orange inventory module bar. */
body.schedule-shell-page.inventory-select-page > .container {
  padding-top: 88px;
}

@media (max-width: 900px) {
  body.schedule-shell-page.inventory-select-page > .container {
    padding: 104px 16px 20px;
  }
}

@media (max-width: 640px) {
  body.schedule-shell-page.inventory-select-page > .container {
    padding: 84px 12px 18px;
  }
}

/* -------------------------------------------------------
   Mobile responsive refinements
   Goal: compact, usable schedule shell on phones WITHOUT
   needing to pinch-zoom (initial-scale=1 kept).
   Appended last so these win cascade over earlier mobile rules.
   ------------------------------------------------------- */
@media (max-width: 900px) {
  body.schedule-shell-page .schedule-topbar {
    gap: 12px;
  }
  /* keep the hamburger balanced next to the bell on every topbar variant */
  .admin-module-topbar .schedule-menu-toggle,
  .inventory-module-topbar .schedule-menu-toggle {
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
  }
}

@media (max-width: 640px) {
  /* The month calendar renders wider than the phone and is scaled to fit by
     fitMonthCalendar() (dashboard.php). Clip its wrapper and kill page-level
     horizontal scroll so the top bar is never pushed off-screen and there is
     no empty space to scroll into on the right. */
  html, body.schedule-shell-page {
    overflow-x: hidden;
    max-width: 100%;
  }
  body.schedule-dashboard-page .schedule-month-wrap {
    max-width: 100%;
    overflow: hidden;
  }
  /* Give the calendar more room: trim the panel padding around it so the
     scaled table fills closer to the screen edges. */
  body.schedule-dashboard-page .schedule-week-panel {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (max-width: 640px) {
  /* tighter top bar + welcome (applies to all phones; 640px net so it is not
     missed on large phones that report a CSS width above 480px) */
  body.schedule-shell-page > .container {
    padding: 84px 12px 18px;
  }
  body.schedule-shell-page .schedule-topbar {
    padding: 12px 14px;
    gap: 10px;
  }
  body.schedule-shell-page .schedule-welcome h1 {
    font-size: 19px;
  }
  body.schedule-shell-page .schedule-welcome p {
    display: none;
  }
  body.schedule-shell-page .schedule-menu-toggle {
    width: 42px;
    height: 42px;
  }
  body.schedule-shell-page .schedule-menu-toggle .sd-icon {
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
  }
  /* hide bulky profile sub-text, keep avatar + logout compact */
  body.schedule-shell-page .schedule-profile small,
  body.schedule-shell-page .inventory-module-user small,
  body.schedule-shell-page .admin-module-user small {
    display: none;
  }

  /* panels & filters: denser */
  body.schedule-dashboard-page .schedule-content { padding: 12px; gap: 14px; }
  body.schedule-dashboard-page .schedule-panel { padding: 14px; }
  body.schedule-dashboard-page .schedule-panel-header h2 { font-size: 18px; }

  /* room-availability panel: show every building at a glance — 2 per row, no
     cramped inner scrollbar, so F3/F4/F5/F6 are all visible by page scroll */
  body.schedule-dashboard-page .schedule-availability-panel { padding: 14px; }
  body.schedule-dashboard-page .schedule-available-by-building {
    grid-template-columns: 1fr 1fr;
    max-height: none;
    gap: 10px;
  }
  body.schedule-dashboard-page .schedule-building-group { padding: 9px 10px; }
  body.schedule-dashboard-page .schedule-building-group > h3,
  body.schedule-dashboard-page .schedule-building-title { font-size: 13px; margin-bottom: 6px; }
  body.schedule-dashboard-page .schedule-building-rooms { gap: 5px; }
  body.schedule-dashboard-page .schedule-available-row {
    min-height: 26px;
    padding: 5px 7px;
    grid-template-columns: 15px minmax(46px, auto) 1fr;
  }
  body.schedule-dashboard-page .schedule-available-row strong,
  body.schedule-dashboard-page .schedule-available-row em { font-size: 11px; }

  /* filters: 2 columns to cut vertical space + shorter controls */
  body.schedule-dashboard-page .schedule-calendar-filters {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px;
  }
  body.schedule-dashboard-page .schedule-calendar-filters span { font-size: 11px; }
  body.schedule-dashboard-page .schedule-calendar-filters select,
  body.schedule-dashboard-page .schedule-calendar-filters input {
    height: 38px;
    font-size: 13px;
    padding: 0 10px;
  }
  body.schedule-dashboard-page .schedule-calendar-filters button {
    grid-column: 1 / -1;
    height: 40px;
  }

  /* calendar keeps the readable ≤640 sizing; fitMonthCalendar() (dashboard.php)
     scales it to the screen width so the whole week shows without pinch-zoom. */
}

/* Shared schedule profile dropdown + password modal */
.schedule-profile-menu {
  position: relative;
  flex: 0 0 auto;
}

.schedule-profile-button {
  border: 0;
  cursor: pointer;
  transition: .18s ease;
}

.schedule-profile-button:hover,
.schedule-profile-button[aria-expanded="true"] {
  background: #e8f0ff;
  color: #0b63ce;
  box-shadow: 0 10px 24px rgba(255, 106, 0, .18);
}

.schedule-profile-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 260px;
  background: #fff;
  border: 1px solid rgba(222, 193, 178, .72);
  border-radius: 18px;
  box-shadow: 0 20px 44px rgba(36, 25, 20, .16);
  padding: 12px;
  z-index: 82;
}

.schedule-profile-dropdown[hidden] {
  display: none;
}

.schedule-profile-dropdown::before {
  content: '';
  position: absolute;
  top: -7px;
  right: 24px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 1px solid rgba(222, 193, 178, .72);
  border-top: 1px solid rgba(222, 193, 178, .72);
  transform: rotate(45deg);
}

.schedule-profile-summary {
  display: grid;
  gap: 0;
  padding: 8px 10px 12px;
  border-bottom: 1px solid #f3ded5;
  margin-bottom: 8px;
}

.schedule-profile-summary strong {
  color: #111;
  font-size: 15px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-profile-menu-item {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
  color: #763300;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
}

.schedule-profile-menu-item:hover {
  background: #ffeadb;
  color: #ff5f00;
}

.schedule-profile-menu-item svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.schedule-password-modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(36, 25, 20, .42);
  z-index: 100;
}

.schedule-password-modal-backdrop[hidden] {
  display: none;
}

.schedule-password-modal {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid rgba(222, 193, 178, .78);
  border-radius: 20px;
  box-shadow: 0 26px 70px rgba(36, 25, 20, .28);
  overflow: hidden;
}

.schedule-password-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid #f3ded5;
}

.schedule-password-modal-head h2 {
  margin: 0;
  color: #241914;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
}

.schedule-modal-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #333;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-modal-close:hover {
  background: #fff1eb;
  color: #ff5f00;
}

.schedule-password-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.schedule-password-field {
  display: grid;
  gap: 6px;
}

.schedule-password-field label {
  color: #574238;
  font-size: 14px;
  font-weight: 900;
}

.schedule-password-field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dec1b2;
  border-radius: 12px;
  padding: 0 14px;
  font: inherit;
  color: #241914;
  background: #fff;
}

.schedule-password-field input:focus {
  outline: 2px solid rgba(255, 106, 0, .24);
  border-color: #ff6a00;
}

.schedule-password-message {
  border-radius: 12px;
  padding: 11px 13px;
  font-weight: 800;
  font-size: 14px;
}

.schedule-password-message.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.schedule-password-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.schedule-password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}

.schedule-password-actions button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
}

.schedule-password-cancel {
  border: 1px solid #dec1b2;
  background: #fff;
  color: #574238;
}

.schedule-password-submit {
  border: 0;
  background: #ff6a00;
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 106, 0, .22);
}

/* Shared compact Inventory shell */
body.schedule-shell-page.inventory-shell-page > .container,
body.schedule-shell-page.inventory-cards-page > .container {
  padding-top: 80px;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-topbar {
  min-height: 65px;
  height: 65px;
  padding: 0 32px;
  flex-wrap: nowrap;
  gap: 12px;
  background: rgba(255, 255, 255, .97);
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .03), 0 4px 14px rgba(15, 23, 42, .04);
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-topbar .schedule-menu-toggle {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #64748b;
  background: #f8fafc;
  box-shadow: none;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu {
  order: initial;
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 0;
  scrollbar-width: thin;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu a,
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu a.inventory-user-menu,
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu a.inventory-admin-menu {
  flex: 0 0 auto;
  min-width: max-content;
  min-height: 32px;
  padding: 6px 12px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  box-shadow: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transform: none;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu a:hover,
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu a.inventory-user-menu:hover,
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu a.inventory-admin-menu:hover {
  color: #0f172a;
  background: #f1f5f9;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu a.active,
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu a.inventory-user-menu.active,
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu a.inventory-admin-menu.active {
  color: #c2410c;
  background: #fff7ed;
  border-color: #fed7aa;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transform: none;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu i,
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu a.inventory-admin-menu i {
  color: #94a3b8;
  font-size: 13px;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu a.active i {
  color: #ea580c;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-topbar .schedule-notification-widget {
  position: relative;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-topbar .schedule-notify-button {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border: 0;
  border-radius: 8px;
  color: #64748b;
  background: transparent;
  box-shadow: none;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-topbar .schedule-notify-button:hover {
  color: #0f172a;
  background: #f1f5f9;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-topbar .schedule-notify-button svg.sd-icon {
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-user {
  min-width: 0;
  margin-left: 0;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-avatar {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ea580c;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-user-copy {
  min-width: 0;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-user strong,
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-user small {
  display: block;
  max-width: 150px;
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-user strong {
  font-size: 12px;
  line-height: 1.2;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-user small {
  margin-top: 2px;
  color: #64748b;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-user a.inventory-module-logout {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #94a3b8;
  background: transparent;
  border-radius: 7px;
  box-shadow: none;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-user a.inventory-module-logout:hover {
  color: #e11d48;
  background: #fff1f2;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-logout svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 900px) {
  body.schedule-shell-page.inventory-shell-page > .container,
  body.schedule-shell-page.inventory-cards-page > .container {
    padding-top: 80px;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-topbar {
    min-height: 65px;
    height: 65px;
    padding: 0 12px;
    flex-wrap: nowrap;
    gap: 8px;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu {
    order: initial;
    width: auto;
    flex: 1 1 auto;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-user {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-actions {
    gap: 4px;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-user-copy {
    display: none;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-user {
    gap: 2px;
    padding: 4px;
  }
}
/* Inventory mobile topbar: keep every permitted menu item visible. */
@media (max-width: 640px) {
  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) > .container {
    padding-top: 128px !important;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-topbar {
    height: auto;
    min-height: 112px;
    padding: 6px 8px 8px;
    align-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-topbar .schedule-menu-toggle {
    order: 1;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-actions {
    order: 2;
    margin-left: auto;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 4px;
    padding-top: 2px;
    overflow: visible;
    scrollbar-width: none;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu::-webkit-scrollbar {
    display: none;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu a,
  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu a.inventory-user-menu,
  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-module-menu a.inventory-admin-menu {
    min-height: 27px;
    padding: 5px 7px;
    font-size: 10.5px;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .schedule-shell-sidebar {
    top: 112px !important;
    max-height: calc(100vh - 112px) !important;
  }
}
@media (max-width: 340px) {
  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) > .container {
    padding-top: 160px !important;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .schedule-shell-sidebar {
    top: 148px !important;
    max-height: calc(100vh - 148px) !important;
  }
}
/* Dashboard-style status and account actions for the shared Inventory topbar. */
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-actions {
  gap: 8px;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-system-status {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-system-status > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-divider {
  width: 1px;
  height: 20px;
  margin: 0 2px;
  background: #e2e8f0;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-profile-button {
  min-height: 42px;
  padding: 3px 5px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-profile-button:hover,
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-profile-button[aria-expanded="true"] {
  background: #f1f5f9;
  color: #0f172a;
  box-shadow: none;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-avatar {
  width: 36px;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #0f172a;
  color: #fb923c;
  font-size: 13px;
  font-weight: 800;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-profile-name {
  max-width: 150px;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-chevron {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #94a3b8;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-profile-dropdown {
  top: calc(100% + 8px);
  right: 0;
  width: 224px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-profile-dropdown::before {
  display: none;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-profile-summary {
  margin-bottom: 4px;
  padding: 8px 12px 10px;
  border-color: #e2e8f0;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-profile-summary strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-password,
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-logout {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-password {
  color: #334155;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-password:hover {
  background: #f8fafc;
  color: #0f172a;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-logout {
  color: #e11d48;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-logout:hover {
  background: #fff1f2;
  color: #be123c;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-password svg,
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-logout svg {
  width: 18px;
  min-width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1280px) {
  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-system-status {
    display: none;
  }
}

@media (max-width: 900px) {
  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-profile-name {
    display: none;
  }
}

@media (max-width: 640px) {
  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-divider {
    display: none;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-profile-button {
    min-height: 36px;
    padding: 2px;
    gap: 3px;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-avatar {
    width: 32px;
    min-width: 32px;
    height: 32px;
  }

  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-profile-dropdown {
    position: fixed;
    top: 46px;
    right: 8px;
  }
}
/* Dashboard notification popover applied only to the Inventory shell. */
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget {
  position: relative;
  flex: 0 0 auto;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .schedule-notify-button {
  position: relative;
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  box-shadow: none;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .schedule-notify-button:hover,
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .schedule-notify-button[aria-expanded="true"] {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #ea580c;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .schedule-notify-button svg.sd-icon {
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  stroke-width: 2 !important;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .schedule-notify-badge {
  top: -5px;
  right: -5px;
  width: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 9px;
  line-height: 14px;
  font-weight: 700;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover {
  top: calc(100% + 10px);
  right: 0;
  width: min(400px, calc(100vw - 24px));
  max-height: min(620px, calc(100vh - 88px));
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, .08), 0 8px 10px -6px rgba(15, 23, 42, .04);
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover::before {
  display: none;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-head {
  padding: 16px 16px 10px;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-head h2 {
  color: #0f172a;
  font-size: 18px;
  line-height: 26px;
  font-weight: 700;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-mark-all {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 600;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-mark-all:hover {
  background: #ffedd5;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-tabs {
  gap: 6px;
  padding: 0 16px 12px;
  border-bottom: 1px solid #e2e8f0;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-tabs button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-tabs button.active {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-list {
  max-height: 420px;
  padding: 8px;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-state {
  padding: 30px 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-item {
  grid-template-columns: 40px minmax(0, 1fr) 8px;
  gap: 10px;
  margin: 0 0 4px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-item:hover {
  border-color: #e2e8f0;
  background: #f8fafc;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-item.is-unread {
  border-color: #ffedd5;
  background: #fff7ed;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-icon {
  width: 38px;
  height: 38px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #ea580c;
  font-size: 14px;
  box-shadow: none;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-icon > i {
  font-size: 17px;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-content {
  gap: 2px;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-content strong,
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-content span,
body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-content small {
  white-space: nowrap;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-content strong {
  color: #0f172a;
  font-size: 13px;
  line-height: 19px;
  font-weight: 700;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-content span {
  display: block;
  color: #475569;
  font-size: 12px;
  line-height: 18px;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-content small {
  color: #64748b;
  font-size: 11px;
  line-height: 16px;
  font-weight: 500;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-item i:last-child {
  width: 7px;
  height: 7px;
  background: transparent;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover-item.is-unread i:last-child {
  background: #f97316;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-see-all {
  min-height: 42px;
  margin: 0 8px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-see-all:hover {
  background: #f8fafc;
  color: #c2410c;
}

@media (max-width: 640px) {
  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover {
    position: fixed;
    top: 120px;
    right: 8px;
    left: 8px;
    width: auto;
    max-height: calc(100vh - 136px);
  }
}

@media (max-width: 340px) {
  body.schedule-shell-page:is(.inventory-shell-page,.inventory-cards-page) .inventory-dashboard-notification-widget .notification-popover {
    top: 151px;
    max-height: calc(100vh - 167px);
  }
}