:root {
  color-scheme: light;
  --brand-950: #36070b;
  --brand-900: #510b10;
  --brand-800: #741116;
  --brand-700: #94171e;
  --brand-600: #ad2028;
  --brand-500: #c5343d;
  --brand-100: #f9e8e9;
  --brand-50: #fff6f6;

  --gold-600: #a97726;
  --gold-500: #c99a47;
  --gold-100: #f8edda;

  --ink-950: #171315;
  --ink-800: #30292c;
  --ink-700: #494044;
  --ink-500: #746a6e;
  --ink-400: #958b8f;

  --surface: #ffffff;
  --surface-soft: #fbf9f8;
  --surface-muted: #f5f1ef;
  --canvas: #f3efed;
  --line: #e9e1de;
  --line-strong: #d9ceca;

  --ok: #13734a;
  --ok-soft: #e7f6ee;
  --warn: #a96108;
  --warn-soft: #fff3d9;
  --bad: #b3261e;
  --bad-soft: #fdeceb;
  --info: #23678c;
  --info-soft: #e8f3f9;

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --shadow-xs: 0 2px 8px rgba(35, 22, 25, .05);
  --shadow-sm: 0 8px 24px rgba(35, 22, 25, .07);
  --shadow-md: 0 18px 48px rgba(35, 22, 25, .10);
  --shadow-lg: 0 28px 80px rgba(25, 12, 16, .18);

  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink-950);
  background: var(--canvas);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 82% 2%, rgba(173, 32, 40, .07), transparent 30rem),
    radial-gradient(circle at 12% 92%, rgba(201, 154, 71, .08), transparent 28rem),
    var(--canvas);
  color: var(--ink-950);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

::selection {
  color: #fff;
  background: var(--brand-700);
}

.hidden {
  display: none !important;
}

/* Accessibility */
:focus-visible {
  outline: 3px solid rgba(197, 52, 61, .26);
  outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
}

/* Loading */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-content: center;
  gap: 16px;
  text-align: center;
  color: var(--ink-700);
  background:
    radial-gradient(circle, rgba(173, 32, 40, .08), transparent 18rem),
    #fff;
}

.loading-screen::before {
  width: 72px;
  height: 72px;
  margin: 0 auto -72px;
  content: "";
  border-radius: 50%;
  background: url("assets/logo.png") center / 48px no-repeat;
  opacity: .16;
}

.spinner {
  width: 72px;
  height: 72px;
  margin: auto;
  border: 3px solid rgba(173, 32, 40, .10);
  border-top-color: var(--brand-600);
  border-right-color: var(--gold-500);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}

.loading-screen p {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .04em;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(.975); }
  to { opacity: 1; transform: scale(1); }
}

/* Toast */
.toast {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 10000;
  min-width: 290px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 15px 18px 15px 48px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-md);
  color: #fff;
  background: rgba(23, 19, 21, .96);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-14px) scale(.98);
  transition: opacity .2s ease, transform .2s ease;
  backdrop-filter: blur(16px);
}

.toast::before {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 18px;
  height: 18px;
  content: "✓";
  display: grid;
  place-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  transform: translateY(-50%);
}

.toast.show {
  opacity: 1;
  transform: none;
}

.toast.success {
  background: rgba(19, 115, 74, .97);
}

.toast.error {
  background: rgba(179, 38, 30, .97);
}

.toast.error::before {
  content: "!";
}

/* Authentication */
.auth-layout {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(500px, 1.08fr) minmax(440px, .92fr);
  overflow: hidden;
  background: #fff;
}

.auth-brand {
  position: relative;
  min-height: 100vh;
  padding: clamp(42px, 5.5vw, 88px);
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(11, 9, 10, .30), transparent 45%),
    linear-gradient(135deg, #160f11 0%, #2a1216 45%, #751118 100%);
}

.auth-brand::before {
  position: absolute;
  inset: 0;
  z-index: -3;
  content: "";
  background:
    radial-gradient(circle at 13% 8%, rgba(255, 255, 255, .10), transparent 18rem),
    radial-gradient(circle at 84% 76%, rgba(201, 154, 71, .18), transparent 26rem),
    linear-gradient(110deg, transparent 0 48%, rgba(255,255,255,.025) 48% 49%, transparent 49% 100%);
}

.auth-brand::after {
  position: absolute;
  right: -170px;
  bottom: -220px;
  z-index: -2;
  width: 620px;
  height: 620px;
  content: "";
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 50%;
  box-shadow:
    0 0 0 72px rgba(255, 255, 255, .024),
    0 0 0 144px rgba(255, 255, 255, .018);
}

.auth-brand-content {
  position: relative;
  z-index: 3;
  width: min(760px, 100%);
  min-height: calc(100vh - clamp(84px, 11vw, 176px));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  top: -170px;
  left: -210px;
  width: 510px;
  height: 510px;
}

.orbit-two {
  right: 8%;
  top: 14%;
  width: 190px;
  height: 190px;
  box-shadow: inset 0 0 0 32px rgba(255,255,255,.018);
}

.music-lines {
  position: absolute;
  right: 6%;
  top: 22%;
  z-index: -1;
  width: 210px;
  display: grid;
  gap: 18px;
  opacity: .09;
  transform: rotate(-8deg);
}

.music-lines i {
  height: 1px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
}

.institution-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(42px, 6vh, 72px);
}

.logo-frame {
  position: relative;
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  display: grid;
  place-content: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 26px;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px rgba(255,255,255,.16), 0 16px 40px rgba(0,0,0,.16);
  backdrop-filter: blur(14px);
}

.logo-frame::after {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 18px;
  height: 18px;
  content: "";
  border: 3px solid #321014;
  border-radius: 50%;
  background: var(--gold-500);
}

.auth-logo {
  width: 65px;
  height: 65px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.18));
}

.institution-lockup > div:last-child {
  display: grid;
  gap: 7px;
}

.institution-name {
  color: rgba(255, 255, 255, .70);
  font-size: 13px;
  font-weight: 650;
}

.eyebrow {
  color: var(--brand-700);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: #ffc4c7;
}

.brand-copy {
  max-width: 720px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.055);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-brand h1 {
  margin: 0;
  font-size: clamp(58px, 7vw, 96px);
  line-height: .90;
  letter-spacing: -.065em;
}

.auth-brand h1 span {
  color: #ee767d;
}

.auth-brand .brand-copy > p {
  max-width: 690px;
  margin: 24px 0 0;
  color: rgba(255,255,255,.72);
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.75;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(34px, 5vh, 54px);
}

.feature-grid article {
  min-height: 112px;
  padding: 17px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: start;
  gap: 13px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
  box-shadow: inset 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.feature-grid article:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.09);
}

.feature-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-content: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-700));
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  font-size: 18px;
  font-weight: 900;
}

.feature-grid article > div {
  display: grid;
  gap: 7px;
}

.feature-grid b {
  font-size: 14px;
}

.feature-grid article div span {
  color: rgba(255,255,255,.60);
  font-size: 12px;
  line-height: 1.55;
}

.auth-trust {
  margin-top: 27px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: rgba(255,255,255,.58);
  font-size: 11px;
  font-weight: 650;
}

.auth-trust span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.auth-trust i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #69d39d;
  box-shadow: 0 0 0 4px rgba(105,211,157,.10);
}

.auth-card {
  position: relative;
  min-width: 0;
  padding: clamp(30px, 5vw, 72px);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 105% -5%, rgba(173,32,40,.09), transparent 24rem),
    linear-gradient(180deg, #fff, #fbf8f7);
}

.auth-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  content: "";
  background: linear-gradient(transparent, rgba(148,23,30,.16), transparent);
}

.auth-card-inner {
  width: min(590px, 100%);
}

.auth-card-kicker {
  margin: 0 0 16px 4px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-400);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .16em;
}

.auth-card-kicker span {
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-600);
}

.auth-mobile-brand {
  display: none;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-muted);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.025);
}

.auth-tab {
  min-height: 43px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  color: var(--ink-500);
  background: transparent;
  font-size: 13px;
  font-weight: 780;
  transition: .2s ease;
}

.auth-tab span {
  color: var(--ink-400);
  font-size: 15px;
}

.auth-tab:hover {
  color: var(--brand-700);
  background: rgba(255,255,255,.62);
}

.auth-tab.active {
  color: var(--brand-700);
  background: var(--surface);
  box-shadow: var(--shadow-xs), inset 0 -2px var(--brand-600);
}

.auth-tab.active span {
  color: var(--brand-600);
}

.auth-form {
  width: 100%;
  padding: clamp(24px, 3vw, 34px);
  display: grid;
  gap: 17px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.auth-form:not(.hidden) {
  animation: scale-in .26s ease both;
}

.auth-form > div:first-child {
  margin-bottom: 4px;
}

.auth-form h2 {
  margin: 7px 0 8px;
  color: var(--ink-950);
  font-size: clamp(27px, 3vw, 34px);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.auth-form p {
  margin: 0;
  color: var(--ink-500);
  font-size: 13px;
  line-height: 1.65;
}

.auth-form label,
.field,
.form-grid label,
.stack > label {
  display: grid;
  gap: 8px;
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 750;
}

.auth-form input,
.form-grid input,
.form-grid select,
.form-grid textarea,
.toolbar input,
.toolbar select,
.input,
.stack input,
.stack select,
.stack textarea {
  width: 100%;
  min-height: 45px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: none;
  color: var(--ink-950);
  background: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.7);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

textarea.input,
.form-grid textarea,
.stack textarea {
  min-height: 96px;
  resize: vertical;
}

.auth-form input::placeholder,
.form-grid input::placeholder,
.toolbar input::placeholder,
.input::placeholder {
  color: #aaa0a4;
}

.auth-form input:hover,
.form-grid input:hover,
.form-grid select:hover,
.form-grid textarea:hover,
.toolbar input:hover,
.toolbar select:hover,
.input:hover {
  border-color: #cfc0bc;
}

.auth-form input:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.toolbar input:focus,
.toolbar select:focus,
.input:focus,
.stack input:focus,
.stack select:focus,
.stack textarea:focus {
  border-color: rgba(173,32,40,.65);
  background: #fffdfd;
  box-shadow: 0 0 0 4px rgba(173,32,40,.09);
}

.auth-footnote {
  max-width: 500px;
  margin: 17px auto 0;
  color: var(--ink-400);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

.check-line {
  display: flex !important;
  grid-template-columns: auto 1fr !important;
  align-items: flex-start;
  gap: 9px !important;
  color: var(--ink-500) !important;
  font-weight: 600 !important;
}

.check-line input {
  width: 16px;
  min-height: auto;
  margin-top: 1px;
  accent-color: var(--brand-700);
}

/* Buttons */
.btn {
  position: relative;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-950);
  background: var(--surface);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn.primary {
  color: #fff;
  border-color: var(--brand-700);
  background: linear-gradient(145deg, var(--brand-600), var(--brand-800));
  box-shadow: 0 9px 22px rgba(148,23,30,.20);
}

.btn.primary:hover:not(:disabled) {
  background: linear-gradient(145deg, #bd2c35, var(--brand-700));
  box-shadow: 0 12px 28px rgba(148,23,30,.28);
}

.btn.secondary {
  color: #fff;
  background: linear-gradient(145deg, #322b2e, #171315);
  box-shadow: 0 9px 20px rgba(23,19,21,.14);
}

.btn.outline {
  color: var(--ink-800);
  border-color: var(--line-strong);
  background: rgba(255,255,255,.92);
}

.btn.outline:hover:not(:disabled) {
  border-color: #c7b5b1;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.btn.ghost {
  color: var(--brand-700);
  background: var(--brand-50);
}

.btn.ghost:hover:not(:disabled) {
  background: var(--brand-100);
}

.btn.danger {
  color: var(--bad);
  border-color: #f2cac7;
  background: var(--bad-soft);
}

.btn.danger:hover:not(:disabled) {
  border-color: #dfa29d;
  background: #fbdedc;
}

.btn.small {
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 11px;
}

.btn.full {
  width: 100%;
  min-height: 48px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: .46;
  transform: none;
  box-shadow: none;
}

.icon-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: grid;
  place-content: center;
  background: #fff;
}

/* Generic form/layout helpers */
.form-grid {
  display: grid;
  gap: 15px;
}

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

.span-2 {
  grid-column: span 2;
}

.stack {
  display: grid;
  gap: 12px;
}

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

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

/* Application shell */
.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 70;
  height: 100vh;
  padding: 22px 15px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 25% -10%, rgba(197,52,61,.28), transparent 18rem),
    linear-gradient(180deg, #21191c 0%, #151113 60%, #0e0c0d 100%);
  box-shadow: 14px 0 48px rgba(25, 12, 16, .10);
}

.sidebar::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  content: "";
  background: linear-gradient(transparent, rgba(255,255,255,.12), transparent);
}

.sidebar::after {
  position: absolute;
  right: -130px;
  bottom: -160px;
  width: 340px;
  height: 340px;
  content: "";
  border: 1px solid rgba(255,255,255,.035);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(255,255,255,.016), 0 0 0 104px rgba(255,255,255,.012);
  pointer-events: none;
}

.side-brand {
  position: relative;
  z-index: 1;
  min-height: 70px;
  padding: 5px 7px 21px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.side-logo {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  padding: 5px;
  display: grid;
  place-content: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.07);
  box-shadow: inset 0 1px rgba(255,255,255,.10);
}

.side-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.side-brand > div:last-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.side-brand b {
  font-size: 18px;
  letter-spacing: -.02em;
}

.side-brand span,
.side-user span {
  overflow: hidden;
  color: rgba(255,255,255,.48);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-nav {
  position: relative;
  z-index: 1;
  margin: 19px 0;
  display: grid;
  gap: 5px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}

.nav-btn {
  position: relative;
  min-height: 47px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.64);
  background: transparent;
  font-size: 12px;
  font-weight: 720;
  text-align: left;
  transition: color .18s ease, background .18s ease, transform .18s ease, border-color .18s ease;
}

.nav-btn::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: -15px;
  width: 3px;
  content: "";
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.nav-btn:hover {
  color: #fff;
  border-color: rgba(255,255,255,.06);
  background: rgba(255,255,255,.055);
  transform: translateX(2px);
}

.nav-btn.active {
  color: #fff;
  border-color: rgba(255,255,255,.09);
  background: linear-gradient(90deg, rgba(173,32,40,.30), rgba(255,255,255,.055));
  box-shadow: inset 0 1px rgba(255,255,255,.05);
}

.nav-btn.active::before {
  background: linear-gradient(var(--gold-500), var(--brand-500));
  box-shadow: 0 0 14px rgba(201,154,71,.35);
}

.nav-icon {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: grid;
  place-content: center;
  border-radius: 10px;
  color: rgba(255,255,255,.66);
  background: rgba(255,255,255,.055);
  font-size: 15px;
  font-weight: 900;
}

.nav-btn.active .nav-icon {
  color: #fff;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-800));
  box-shadow: 0 7px 18px rgba(0,0,0,.18);
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-profile {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 17px;
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 1px rgba(255,255,255,.045);
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-content: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-800));
  box-shadow: 0 8px 20px rgba(0,0,0,.20);
  font-size: 12px;
  font-weight: 900;
}

.side-user {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.side-user b {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-logout {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 37px;
  margin-top: 3px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.045);
  font-size: 11px;
  font-weight: 750;
  transition: .18s ease;
}

.side-logout:hover {
  color: #fff;
  border-color: rgba(255, 111, 118, .22);
  background: rgba(173,32,40,.22);
}

.sidebar-scrim {
  display: none;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  min-height: 88px;
  padding: 0 clamp(20px, 2.5vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(217,206,202,.75);
  background: rgba(249,247,246,.86);
  box-shadow: 0 5px 22px rgba(40,25,29,.035);
  backdrop-filter: blur(18px) saturate(140%);
}

.topbar > div:nth-child(2) {
  min-width: 0;
}

.topbar h2 {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--ink-950);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.15;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.menu-toggle {
  width: 42px;
  height: 42px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  align-content: center;
  gap: 4px;
  background: #fff;
}

.menu-toggle i {
  width: 100%;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: var(--ink-700);
}

.mobile-only {
  display: none;
}

.content {
  width: 100%;
  max-width: 1580px;
  margin: 0 auto;
  padding: clamp(20px, 2.4vw, 36px);
}

.content > * {
  animation: fade-up .28s ease both;
}

/* Hero */
.hero {
  position: relative;
  min-height: 214px;
  padding: clamp(25px, 3.3vw, 43px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(22,13,16,.16), transparent 58%),
    linear-gradient(135deg, var(--brand-900), var(--brand-600) 64%, #d9535b 130%);
  box-shadow: 0 24px 60px rgba(116,17,22,.18);
}

.hero::before {
  position: absolute;
  right: 3%;
  top: 50%;
  z-index: -2;
  width: 260px;
  height: 260px;
  content: "";
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow:
    0 0 0 42px rgba(255,255,255,.028),
    0 0 0 84px rgba(255,255,255,.018);
}

.hero::after {
  position: absolute;
  right: 54px;
  bottom: -78px;
  z-index: -1;
  width: 240px;
  height: 240px;
  content: "";
  background: url("assets/logo.png") center / contain no-repeat;
  opacity: .09;
  filter: grayscale(1) brightness(4);
  transform: rotate(-8deg);
}

.hero > div {
  max-width: 820px;
}

.hero h3 {
  margin: 8px 0 12px;
  font-size: clamp(29px, 3.5vw, 44px);
  line-height: 1.05;
  letter-spacing: -.045em;
}

.hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: 14px;
  line-height: 1.75;
}

.hero .btn {
  position: relative;
  z-index: 2;
  min-width: 170px;
  color: var(--brand-800);
  background: #fff;
  box-shadow: 0 12px 30px rgba(49,7,11,.22);
  white-space: nowrap;
}

.hero .btn:hover {
  background: #fff9f9;
}

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

.stat {
  position: relative;
  min-height: 142px;
  padding: 20px;
  display: grid;
  align-content: center;
  gap: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.90);
  box-shadow: var(--shadow-xs);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.stat::before {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  content: "";
  border-radius: 12px;
  background: var(--brand-50);
  box-shadow: inset 0 0 0 1px var(--brand-100);
}

.stat::after {
  position: absolute;
  top: 30px;
  right: 29px;
  width: 16px;
  height: 16px;
  content: "";
  border: 2px solid var(--brand-500);
  border-radius: 5px;
  transform: rotate(45deg);
}

.stat:nth-child(2)::before {
  background: var(--gold-100);
  box-shadow: inset 0 0 0 1px #efddbc;
}

.stat:nth-child(2)::after {
  border-color: var(--gold-600);
  border-radius: 50%;
}

.stat:nth-child(3)::before {
  background: var(--info-soft);
  box-shadow: inset 0 0 0 1px #cde3ef;
}

.stat:nth-child(3)::after {
  border-color: var(--info);
  border-radius: 50% 50% 50% 0;
}

.stat:nth-child(4)::before {
  background: var(--ok-soft);
  box-shadow: inset 0 0 0 1px #cdebdc;
}

.stat:nth-child(4)::after {
  border-color: var(--ok);
  border-radius: 50%;
}

.stat:hover {
  transform: translateY(-3px);
  border-color: #dacbc7;
  box-shadow: var(--shadow-sm);
}

.stat span,
.meta {
  color: var(--ink-500);
  font-size: 11px;
  line-height: 1.55;
}

.stat > span {
  max-width: calc(100% - 52px);
  font-weight: 750;
}

.stat strong {
  color: var(--ink-950);
  font-size: clamp(27px, 3vw, 36px);
  line-height: 1;
  letter-spacing: -.045em;
}

.stat small {
  max-width: calc(100% - 38px);
}

/* Panels */
.panel {
  position: relative;
  padding: clamp(18px, 2vw, 24px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-xs);
}

.panel::before {
  position: absolute;
  top: 0;
  left: 28px;
  width: 52px;
  height: 2px;
  content: "";
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--brand-700), var(--gold-500));
  opacity: .68;
}

.panel-head,
.section-head {
  margin-bottom: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.section-head {
  min-height: 54px;
}

.panel-head h3,
.section-head h3 {
  margin: 0;
  color: var(--ink-950);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.2;
  letter-spacing: -.025em;
}

.panel-head p,
.section-head p {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--ink-500);
  font-size: 12px;
  line-height: 1.55;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.toolbar input {
  min-width: 230px;
}

.toolbar select {
  min-width: 170px;
}

/* Catalog */
.catalog {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
}

.card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: #d8c9c5;
  box-shadow: var(--shadow-md);
}

.card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: grid;
  place-content: center;
  background:
    linear-gradient(145deg, rgba(173,32,40,.08), transparent),
    var(--surface-muted);
}

.card-image::after {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  content: "";
  background: linear-gradient(transparent, rgba(20,12,15,.12));
  pointer-events: none;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.card:hover .card-image img {
  transform: scale(1.035);
}

.card-body {
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 9px;
  flex: 1;
}

.card h4 {
  margin: 1px 0;
  color: var(--ink-950);
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -.015em;
}

.card-body > b {
  font-size: 12px;
  line-height: 1.5;
}

.card-actions {
  margin-top: auto;
  padding-top: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* Badges */
.badge {
  width: max-content;
  max-width: 100%;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e5d8d4;
  border-radius: 999px;
  color: #765c60;
  background: var(--surface-muted);
  font-size: 10px;
  font-weight: 820;
  line-height: 1.2;
}

.badge::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  content: "";
  border-radius: 50%;
  background: currentColor;
  opacity: .65;
}

.badge.ok {
  color: var(--ok);
  border-color: #cfe9dc;
  background: var(--ok-soft);
}

.badge.warn {
  color: var(--warn);
  border-color: #eedaaa;
  background: var(--warn-soft);
}

.badge.bad {
  color: var(--bad);
  border-color: #efc9c6;
  background: var(--bad-soft);
}

/* Tables */
.table-wrap {
  position: relative;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-xs);
  scrollbar-width: thin;
  scrollbar-color: #d8cac6 transparent;
}

.data-table {
  width: 100%;
  min-width: 880px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.data-table th,
.data-table td {
  padding: 14px 15px;
  border-bottom: 1px solid #eee8e6;
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--ink-500);
  background: rgba(248,245,244,.96);
  box-shadow: inset 0 -1px #e7dfdc;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.data-table tbody tr {
  transition: background .16s ease;
}

.data-table tbody tr:nth-child(even) {
  background: #fdfcfc;
}

.data-table tbody tr:hover {
  background: var(--brand-50);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table td > b {
  color: var(--ink-950);
}

.thumb {
  width: 64px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 11px;
  object-fit: cover;
  background: var(--surface-muted);
  box-shadow: var(--shadow-xs);
}

/* Empty/error/information */
.empty {
  min-height: 150px;
  padding: 38px 24px;
  display: grid;
  place-content: center;
  border: 1px dashed #d9cbc7;
  border-radius: 18px;
  color: var(--ink-500);
  background:
    radial-gradient(circle at 50% 0%, rgba(173,32,40,.05), transparent 12rem),
    rgba(255,255,255,.70);
  text-align: center;
}

.info-box,
.notice,
.error-box {
  border-radius: 15px;
  line-height: 1.55;
}

.info-box {
  padding: 14px 15px;
  display: grid;
  gap: 4px;
  border: 1px solid #eadbd7;
  color: var(--ink-700);
  background: var(--brand-50);
}

.notice {
  padding: 13px 15px;
  border: 1px solid #efdbad;
  color: #78500d;
  background: var(--warn-soft);
  font-size: 12px;
}

.error-box {
  padding: 22px;
  border: 1px solid #efc6c3;
  border-left: 5px solid var(--bad);
  background: linear-gradient(90deg, var(--bad-soft), #fff);
}

.error-box h2,
.error-box h3 {
  margin-top: 7px;
}

.link-btn {
  padding: 0;
  border: 0;
  color: var(--brand-700);
  background: transparent;
  font-weight: 800;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 22px;
  display: grid;
  place-items: center;
  background: rgba(18, 11, 13, .68);
  backdrop-filter: blur(7px);
  animation: scale-in .18s ease both;
}

.modal {
  width: min(770px, 100%);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.modal.wide {
  width: min(1100px, 100%);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 19px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
}

.modal-head h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.025em;
}

.modal-body {
  padding: 22px;
}

.modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  padding: 15px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
}

.close-btn {
  width: 37px;
  height: 37px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-700);
  background: var(--surface-muted);
  font-size: 18px;
}

/* Borrow workflow */
.borrow-step {
  position: relative;
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  gap: 13px;
}

.borrow-step:not(:last-child)::after {
  position: absolute;
  top: 40px;
  bottom: -12px;
  left: 20px;
  width: 1px;
  content: "";
  background: linear-gradient(var(--brand-100), transparent);
}

.step-num {
  position: relative;
  z-index: 1;
  width: 39px;
  height: 39px;
  display: grid;
  place-content: center;
  border: 4px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-800));
  box-shadow: 0 0 0 1px var(--brand-100), 0 8px 18px rgba(148,23,30,.20);
  font-size: 12px;
  font-weight: 900;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.choice {
  min-height: 70px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink-700);
  background: #fff;
  text-align: left;
  transition: .18s ease;
}

.choice:hover {
  border-color: #d5c5c1;
  box-shadow: var(--shadow-xs);
}

.choice.active {
  color: var(--brand-800);
  border-color: rgba(173,32,40,.45);
  background: var(--brand-50);
  box-shadow: inset 0 0 0 1px rgba(173,32,40,.08);
}

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

.select-row {
  min-width: 0;
  padding: 11px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition: .18s ease;
}

.select-row:hover {
  border-color: #d5c5c1;
  box-shadow: var(--shadow-xs);
}

.select-row img {
  width: 72px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-muted);
}

.quantity {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.quantity button {
  width: 37px;
  height: 37px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--brand-800);
  background: #fff;
  font-size: 18px;
  font-weight: 900;
  transition: .16s ease;
}

.quantity button:hover:not(:disabled) {
  border-color: rgba(173,32,40,.42);
  background: var(--brand-50);
}

.quantity b {
  min-width: 28px;
  color: var(--ink-950);
  text-align: center;
}

.camera-box {
  min-height: 320px;
  overflow: hidden;
  display: grid;
  place-content: center;
  border: 1px solid #30282b;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 45%, #30282b, #151113 65%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.camera-box video,
.camera-box img {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
}

/* Requests and approvals */
.progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.progress-step {
  padding: 7px 10px;
  border: 1px solid #e1d8d5;
  border-radius: 999px;
  color: var(--ink-500);
  background: var(--surface-muted);
  font-size: 10px;
  font-weight: 800;
}

.progress-step.done {
  color: var(--ok);
  border-color: #cde8da;
  background: var(--ok-soft);
}

.progress-step.current {
  color: var(--brand-700);
  border-color: #efc1c4;
  background: var(--brand-50);
  box-shadow: 0 0 0 3px rgba(173,32,40,.05);
}

.request-card {
  position: relative;
  padding: 16px;
  display: grid;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: .18s ease;
}

.request-card:hover {
  border-color: #d8c9c5;
  box-shadow: var(--shadow-sm);
}

.request-card::before {
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 0;
  width: 3px;
  content: "";
  border-radius: 0 4px 4px 0;
  background: linear-gradient(var(--brand-500), var(--gold-500));
}

.request-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.request-top h4 {
  margin: 0;
  font-size: 15px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.detail-item {
  min-width: 0;
  padding: 12px;
  display: grid;
  gap: 4px;
  border: 1px solid #eee7e4;
  border-radius: 13px;
  background: var(--surface-soft);
}

.detail-item b {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.approval-row {
  padding: 13px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

/* Letter */
.letter {
  max-width: 900px;
  margin: auto;
  padding: 46px;
  color: #111;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.letter-head {
  padding-bottom: 18px;
  border-bottom: 3px double #111;
  text-align: center;
}

.letter-logo {
  width: 92px;
}

/* Reports */
.report-filter {
  margin-bottom: 18px;
}

.report-filter-grid {
  grid-template-columns: 220px 260px minmax(0, 1fr);
  align-items: end;
}

.report-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.report-heading {
  margin: 24px 0 13px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.report-heading h3 {
  margin: 4px 0;
  font-size: 29px;
  letter-spacing: -.035em;
}

.report-heading p {
  margin: 0;
  color: var(--ink-500);
}

.report-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  color: var(--ink-500);
  font-size: 11px;
}

.report-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 3px;
}

.legend-dot.transaction,
.trend-bar.transaction {
  background: var(--brand-700);
}

.legend-dot.equipment,
.trend-bar.equipment {
  background: var(--gold-500);
}

.legend-dot.room,
.trend-bar.room {
  background: var(--info);
}

.report-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.trend-chart {
  height: 290px;
  padding: 13px 5px 0;
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(to top, transparent 0 54px, rgba(233,225,222,.68) 54px 55px);
}

.trend-column {
  min-width: 36px;
  flex: 1;
  display: grid;
  grid-template-rows: 1fr 34px;
  gap: 7px;
  text-align: center;
}

.trend-bars {
  min-height: 205px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
}

.trend-bar {
  width: 8px;
  min-height: 0;
  display: block;
  border-radius: 6px 6px 1px 1px;
  box-shadow: 0 -3px 8px rgba(0,0,0,.06);
}

.trend-column > span {
  color: var(--ink-500);
  font-size: 9px;
  white-space: nowrap;
  transform: rotate(-35deg);
  transform-origin: center;
}

.report-ranking {
  margin: 17px 0;
}

.bar-list {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.3fr) minmax(100px, 1fr) 70px;
  align-items: center;
  gap: 12px;
}

.bar-label {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.bar-label b,
.bar-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-label b {
  font-size: 12px;
}

.bar-label span {
  color: var(--ink-500);
  font-size: 10px;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee7e4;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.04);
}

.bar-track i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-800), var(--brand-500));
}

.room-bars .bar-track i {
  background: linear-gradient(90deg, #245f7c, #58a0bf);
}

.bar-row > strong {
  font-size: 11px;
  text-align: right;
}

.report-table {
  min-width: 1160px;
}

.report-table td:nth-child(4),
.report-table td:nth-child(5) {
  max-width: 280px;
  white-space: normal;
}

.report-table .meta {
  line-height: 1.5;
}

/* Misc */
.demo-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.demo-box summary {
  cursor: pointer;
  font-weight: 800;
}

.demo-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.demo-grid button {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

/* Responsive */
@media (max-width: 1240px) {
  .catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .auth-brand {
    padding: 45px;
  }

  .feature-grid article {
    min-height: 105px;
  }
}

@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: 1fr;
    background: var(--surface-soft);
  }

  .auth-brand {
    min-height: auto;
    padding: 32px 30px;
  }

  .auth-brand-content {
    min-height: auto;
  }

  .institution-lockup,
  .feature-grid,
  .auth-trust,
  .brand-badge {
    display: none;
  }

  .auth-brand h1 {
    font-size: 48px;
  }

  .auth-brand .brand-copy > p {
    max-width: 680px;
    margin-top: 12px;
    font-size: 14px;
  }

  .auth-card {
    padding: 28px;
  }

  .auth-mobile-brand {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 11px;
  }

  .auth-mobile-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
  }

  .auth-mobile-brand > div {
    display: grid;
    gap: 3px;
  }

  .auth-mobile-brand b {
    font-size: 17px;
  }

  .auth-mobile-brand span {
    color: var(--ink-500);
    font-size: 10px;
  }

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

  .sidebar {
    position: fixed;
    left: -304px;
    width: 286px;
    transition: left .22s ease;
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 65;
    display: block;
    border: 0;
    background: rgba(20,12,15,.52);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
    backdrop-filter: blur(3px);
  }

  .sidebar-scrim.show {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-only {
    display: grid;
  }

  .content {
    padding: 20px;
  }

  .topbar {
    min-height: 78px;
    padding: 0 17px;
  }

  .top-actions .outline {
    display: none;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

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

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .report-filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .report-filter-actions {
    grid-column: span 2;
    justify-content: flex-start;
  }

  .report-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .auth-brand {
    padding: 25px 20px;
  }

  .auth-brand h1 {
    font-size: 42px;
  }

  .auth-brand .brand-copy > p {
    display: none;
  }

  .auth-card {
    padding: 18px 14px 28px;
  }

  .auth-card-kicker {
    display: none;
  }

  .auth-form {
    padding: 21px 17px;
    border-radius: 20px;
  }

  .auth-form h2 {
    font-size: 27px;
  }

  .auth-tabs {
    border-radius: 15px;
  }

  .auth-tab {
    padding: 9px 7px;
    font-size: 11px;
  }

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

  .span-2 {
    grid-column: auto;
  }

  .content {
    padding: 15px;
  }

  .topbar h2 {
    font-size: 18px;
  }

  .top-actions #quickBorrow {
    display: none;
  }

  .hero {
    min-height: 250px;
    padding: 24px 20px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-end;
  }

  .hero h3 {
    font-size: 30px;
  }

  .hero p {
    font-size: 12px;
  }

  .hero .btn {
    min-width: 0;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat {
    min-height: 130px;
    padding: 16px;
  }

  .stat::before,
  .stat::after {
    display: none;
  }

  .stat > span,
  .stat small {
    max-width: 100%;
  }

  .stat strong {
    font-size: 28px;
  }

  .panel,
  .card {
    border-radius: 18px;
  }

  .panel-head,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head .toolbar,
  .section-head > .btn {
    width: 100%;
  }

  .section-head > .btn {
    justify-content: center;
  }

  .toolbar {
    width: 100%;
  }

  .toolbar input,
  .toolbar select {
    min-width: 0;
    flex: 1 1 100%;
  }

  .catalog {
    grid-template-columns: 1fr;
  }

  .select-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .select-row img {
    width: 58px;
    height: 50px;
  }

  .select-row > div:last-child {
    grid-column: 2;
  }

  .request-top {
    flex-direction: column;
  }

  .modal-backdrop {
    padding: 7px;
  }

  .modal {
    max-height: 96vh;
    border-radius: 18px;
  }

  .modal-head,
  .modal-actions {
    padding: 14px 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .letter {
    padding: 22px;
  }

  .report-filter-grid {
    grid-template-columns: 1fr;
  }

  .report-filter-actions {
    grid-column: auto;
  }

  .report-filter-actions .btn {
    flex: 1;
  }

  .report-stats {
    grid-template-columns: 1fr 1fr;
  }

  .bar-row {
    grid-template-columns: minmax(0, 1fr) 68px;
  }

  .bar-track {
    grid-column: 1;
  }

  .bar-row > strong {
    grid-column: 2;
    grid-row: 2;
  }

  .trend-chart {
    height: 245px;
  }

  .trend-column {
    min-width: 31px;
  }
}

@media (max-width: 390px) {
  .stats,
  .report-stats {
    grid-template-columns: 1fr;
  }

  .auth-tab span {
    display: none;
  }

  .topbar {
    gap: 10px;
  }

  .topbar .eyebrow {
    font-size: 9px;
  }
}

/* Print */
@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .sidebar-scrim,
  .topbar,
  .modal-actions,
  .no-print {
    display: none !important;
  }

  .workspace,
  .content {
    max-width: none;
    padding: 0;
  }

  .letter {
    max-width: none;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
/* ==========================================================
   InventyHub v5.1 — Password visibility and profile pictures
   ========================================================== */

.password-control {
  position: relative;
  width: 100%;
}

.password-control > input {
  padding-right: 48px !important;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  display: grid;
  place-content: center;
  color: var(--ink-400);
  background: transparent;
  transform: translateY(-50%);
  transition: color .16s ease, background .16s ease;
}

.password-toggle:hover,
.password-toggle.visible {
  color: var(--brand-700);
  background: var(--brand-50);
}

.password-toggle svg {
  width: 19px;
  height: 19px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle::after {
  position: absolute;
  width: 22px;
  height: 2px;
  content: "";
  border-radius: 999px;
  background: currentColor;
  opacity: .9;
  transform: rotate(-45deg) scaleX(1);
  transition: transform .16s ease, opacity .16s ease;
}

.password-toggle.visible::after {
  opacity: 0;
  transform: rotate(-45deg) scaleX(0);
}

.avatar {
  overflow: hidden;
}

.avatar > span {
  display: grid;
  place-content: center;
}

.avatar.has-photo {
  padding: 0;
  border-color: rgba(255,255,255,.22);
  background: #fff;
}

.side-avatar-image {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.hero-main {
  position: relative;
  z-index: 2;
  max-width: 860px;
}

.hero-user {
  margin: 11px 0 15px;
  display: flex;
  align-items: center;
  gap: 17px;
}

.hero-avatar {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  overflow: hidden;
  display: grid;
  place-content: center;
  border: 3px solid rgba(255,255,255,.70);
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(145deg, rgba(255,255,255,.20), rgba(255,255,255,.08));
  box-shadow: 0 16px 32px rgba(38,4,8,.24), inset 0 1px rgba(255,255,255,.25);
  font-size: 23px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.hero-avatar-image {
  width: 100%;
  height: 100%;
  display: grid;
  place-content: center;
  border-radius: inherit;
  object-fit: cover;
}

.hero-user-copy {
  min-width: 0;
}

.hero-user-copy > span {
  display: block;
  margin-bottom: 4px;
  color: rgba(255,255,255,.60);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.hero-user-copy h3 {
  margin: 0 0 8px;
}

.hero-identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: rgba(255,255,255,.67);
  font-size: 11px;
}

.hero-identity b {
  color: rgba(255,255,255,.88);
}

.hero-identity i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-500);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: start;
}

.profile-overview {
  grid-row: span 2;
  overflow: hidden;
  padding: 0 0 24px;
}

.profile-overview::before {
  display: none;
}

.profile-cover {
  position: relative;
  height: 150px;
  margin-bottom: 62px;
  border-radius: 21px 21px 0 0;
  background:
    radial-gradient(circle at 85% 10%, rgba(255,255,255,.19), transparent 11rem),
    linear-gradient(135deg, #321014, var(--brand-800) 66%, var(--brand-500));
}

.profile-cover::before,
.profile-cover::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 50%;
}

.profile-cover::before {
  right: -42px;
  top: -66px;
  width: 210px;
  height: 210px;
}

.profile-cover::after {
  left: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  box-shadow: 0 0 0 18px rgba(255,255,255,.025);
}

.profile-photo-shell {
  position: absolute;
  left: 50%;
  bottom: -55px;
  width: 122px;
  height: 122px;
  transform: translateX(-50%);
}

.profile-photo {
  width: 122px;
  height: 122px;
  overflow: hidden;
  display: grid;
  place-content: center;
  border: 6px solid #fff;
  border-radius: 38px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-900));
  box-shadow: 0 16px 34px rgba(50,16,20,.23);
  font-size: 31px;
  font-weight: 900;
}

.profile-photo.has-photo {
  background: #fff;
}

.profile-photo-image {
  width: 100%;
  height: 100%;
  display: grid;
  place-content: center;
  border-radius: 31px;
  object-fit: cover;
}

.photo-edit-btn {
  position: absolute;
  right: -4px;
  bottom: 3px;
  z-index: 3;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 13px;
  display: grid;
  place-content: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-800));
  box-shadow: 0 8px 18px rgba(50,16,20,.28);
  font-size: 15px;
  font-weight: 900;
}

.photo-edit-btn:hover {
  transform: translateY(-1px);
}

.profile-heading {
  padding: 0 24px;
  text-align: center;
}

.profile-heading .badge {
  margin: auto;
}

.profile-heading h3 {
  margin: 13px 0 6px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.profile-heading p {
  margin: 0;
  color: var(--ink-500);
  font-size: 12px;
  line-height: 1.55;
}

.profile-photo-actions {
  margin-top: 21px;
  padding: 0 24px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
}

.profile-photo-help {
  margin: 12px auto 0;
  padding: 0 28px;
  max-width: 390px;
  color: var(--ink-400);
  font-size: 10px;
  line-height: 1.65;
  text-align: center;
}

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

.profile-security .stack {
  max-width: 620px;
}

.soft-divider {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

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

  .profile-overview {
    grid-row: auto;
  }
}

@media (max-width: 650px) {
  .hero-user {
    align-items: flex-start;
  }

  .hero-avatar {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    border-radius: 19px;
    font-size: 19px;
  }

  .hero-user-copy h3 {
    font-size: 27px;
  }

  .hero-identity {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .hero-identity i {
    display: none;
  }

  .profile-detail-grid {
    grid-template-columns: 1fr;
  }

  .profile-detail-grid .span-2 {
    grid-column: auto;
  }

  .profile-photo-actions .btn {
    flex: 1 1 100%;
  }
}
/* InventyHub v5.2 — manual equipment category */
.field-help {
  margin-top: -2px;
  color: var(--ink-400);
  font-size: 10px;
  font-weight: 560;
  line-height: 1.55;
}
/* ==========================================================
   InventyHub v5.3 — Borrower return and admin verification
   ========================================================== */

.return-summary {
  position: relative;
  margin-bottom: 18px;
  padding: clamp(22px,3vw,34px);
  overflow: hidden;
  border: 1px solid rgba(173,32,40,.13);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background:
    radial-gradient(circle at 90% 20%, rgba(201,154,71,.18), transparent 15rem),
    linear-gradient(135deg, #fff, var(--brand-50));
  box-shadow: var(--shadow-sm);
}

.return-summary::after {
  position: absolute;
  right: 150px;
  bottom: -90px;
  width: 190px;
  height: 190px;
  content: "↩";
  display: grid;
  place-content: center;
  border: 1px solid rgba(173,32,40,.06);
  border-radius: 50%;
  color: rgba(173,32,40,.05);
  font-size: 110px;
  font-weight: 900;
}

.return-summary h3 {
  margin: 7px 0 8px;
  font-size: clamp(25px,3vw,34px);
  letter-spacing: -.04em;
}

.return-summary p {
  max-width: 700px;
  margin: 0;
  color: var(--ink-500);
  line-height: 1.65;
}

.return-summary-number {
  position: relative;
  z-index: 1;
  min-width: 150px;
  padding: 18px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--brand-100);
  border-radius: 18px;
  background: rgba(255,255,255,.90);
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.return-summary-number strong {
  color: var(--brand-700);
  font-size: 36px;
  line-height: 1;
}

.return-summary-number span {
  color: var(--ink-500);
  font-size: 10px;
  font-weight: 750;
}

.return-history {
  margin-top: 18px;
}

.return-pending-card {
  border-left: 4px solid var(--brand-600);
  background: linear-gradient(90deg,var(--brand-50),#fff 16%);
}

.return-pending-card::before {
  display: none;
}

.return-item-row {
  padding-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

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

.return-information {
  border-color: #ead2d3;
  background: linear-gradient(145deg,#fff,var(--brand-50));
}

.return-note {
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink-700);
  background: #fff;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.return-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: #cfe8dc;
  background: linear-gradient(135deg,var(--ok-soft),#fff);
}

.return-callout h3 {
  margin: 0 0 7px;
}

.return-callout p {
  max-width: 680px;
  margin: 0;
  color: var(--ink-500);
  line-height: 1.6;
}

.technician-return-panel {
  border-color: #e4ccc8;
}

.technician-return-actions {
  margin: 17px 0 13px;
  justify-content: flex-end;
}

.return-form-intro {
  padding: 14px;
  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--brand-100);
  border-radius: 15px;
  background: var(--brand-50);
}

.return-form-intro .step-num {
  border-width: 0;
}

.return-form-intro p {
  margin: 4px 0 0;
  color: var(--ink-500);
  font-size: 11px;
}

.return-photo-preview {
  min-height: 112px;
  padding: 12px;
  border: 1px dashed #d8c6c2;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: var(--ink-400);
  background: var(--surface-soft);
  text-align: center;
}

.return-photo-preview img {
  width: 112px;
  height: 84px;
  flex: 0 0 112px;
  border-radius: 12px;
  object-fit: cover;
}

.return-photo-preview div {
  min-width: 0;
  display: grid;
  gap: 5px;
  text-align: left;
}

.return-photo-preview b,
.return-photo-preview span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.return-photo-preview b {
  color: var(--ink-800);
  font-size: 12px;
}

.return-photo-preview span {
  font-size: 10px;
}

@media (max-width: 650px) {
  .return-summary,
  .return-callout {
    align-items: flex-start;
    flex-direction: column;
  }

  .return-summary-number {
    width: 100%;
  }

  .return-callout .btn {
    width: 100%;
  }

  .return-item-row {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .return-photo-preview {
    align-items: flex-start;
    flex-direction: column;
  }

  .return-photo-preview img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
  }
}

/* ==========================================================
   InventyHub v5.5 — Teknisi Laboratorium as full administrator
   ========================================================== */

.return-success-popup {
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 8px 4px;
  text-align: center;
}

.return-success-icon {
  position: relative;
  width: 98px;
  height: 98px;
  margin: 0 auto 22px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg,#1e9a65,var(--ok));
  box-shadow: 0 18px 38px rgba(19,115,74,.25),0 0 0 12px var(--ok-soft);
}

.return-success-icon::before,
.return-success-icon::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(19,115,74,.16);
  border-radius: 50%;
}

.return-success-icon::before { inset: -21px; }
.return-success-icon::after { inset: -34px; opacity: .55; }

.return-success-icon span {
  position: relative;
  z-index: 1;
  font-size: 47px;
  font-weight: 900;
  line-height: 1;
}

.return-success-popup h2 {
  margin: 9px 0 10px;
  color: var(--ink-950);
  font-size: clamp(27px,4vw,36px);
  letter-spacing: -.04em;
}

.return-success-popup > p {
  max-width: 500px;
  margin: 0 auto;
  color: var(--ink-500);
  font-size: 14px;
  line-height: 1.75;
}

.return-success-meta {
  width: min(360px,100%);
  margin: 20px auto 14px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid #cde8da;
  border-radius: 14px;
  color: var(--ink-500);
  background: var(--ok-soft);
  font-size: 11px;
}

.return-success-meta b {
  color: var(--ok);
  font-size: 12px;
}
/* InventyHub v5.5.2 — clarity for return availability */
.btn.waiting-pickup,
.btn.waiting-pickup:disabled {
  color: var(--warn);
  border-color: #efd9a5;
  background: var(--warn-soft);
  opacity: 1;
  cursor: default;
  box-shadow: none;
}

.btn.waiting-pickup::before {
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(169,97,8,.10);
}

.handover-panel {
  border-color: #e8d4ac;
  background: linear-gradient(145deg,#fff,var(--warn-soft));
}

.handover-panel::before {
  background: linear-gradient(90deg,var(--gold-600),var(--brand-600));
}
/* InventyHub v5.5.3 — direct return action */
.request-card .card-actions {
  align-items: center;
}

.request-card .card-actions [data-return-request] {
  order: 3;
}
/* ==========================================================
   InventyHub v5.6 — Surat Bebas & Forgot Password
   ========================================================== */

.auth-help-row {
  margin-top: -8px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.auth-link {
  padding: 4px 1px;
  border: 0;
  color: var(--brand-700);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.auth-link:hover {
  color: var(--brand-500);
  text-decoration: underline;
}

.password-reset-intro {
  margin-bottom: 16px;
  padding: 15px;
  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  align-items: center;
  gap: 13px;
  border: 1px solid var(--brand-100);
  border-radius: 16px;
  background: var(--brand-50);
}

.password-reset-intro p {
  margin: 4px 0 0;
  color: var(--ink-500);
  font-size: 11px;
  line-height: 1.55;
}

.reset-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-content: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg,var(--brand-500),var(--brand-800));
  font-size: 20px;
  font-weight: 900;
}

.reset-success {
  padding: 18px 8px;
  text-align: center;
}

.reset-success > span {
  width: 58px;
  height: 58px;
  margin: auto;
  display: grid;
  place-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ok);
  font-size: 25px;
  font-weight: 900;
}

.reset-success h3 {
  margin: 15px 0 8px;
}

.reset-success p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--ink-500);
  line-height: 1.65;
}

.reset-success small {
  display: block;
  margin-top: 12px;
  color: var(--ink-400);
}

.clearance-hero,
.clearance-admin-head {
  position: relative;
  margin-bottom: 18px;
  padding: clamp(24px,3vw,38px);
  overflow: hidden;
  border: 1px solid #e5d7d2;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  background:
    radial-gradient(circle at 88% 20%, rgba(201,154,71,.17), transparent 15rem),
    linear-gradient(135deg,#fff,var(--brand-50));
  box-shadow: var(--shadow-sm);
}

.clearance-hero h3,
.clearance-admin-head h3 {
  margin: 7px 0 10px;
  font-size: clamp(27px,3vw,38px);
  letter-spacing: -.04em;
}

.clearance-hero p,
.clearance-admin-head p {
  max-width: 800px;
  margin: 0;
  color: var(--ink-500);
  line-height: 1.7;
}

.clearance-symbol {
  width: 94px;
  height: 94px;
  flex: 0 0 94px;
  display: grid;
  place-content: center;
  border: 1px solid rgba(173,32,40,.12);
  border-radius: 30px;
  color: var(--brand-700);
  background: rgba(255,255,255,.85);
  box-shadow: var(--shadow-sm);
  font-size: 49px;
  font-weight: 300;
}

.clearance-warning {
  margin-bottom: 18px;
  border-color: #ead9b7;
  background: linear-gradient(145deg,#fff,var(--warn-soft));
}

.clearance-checks {
  margin: 14px 0;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}

.clearance-checks > div {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.clearance-checks > div > b {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-content: center;
  border-radius: 50%;
}

.clearance-checks .done > b {
  color: var(--ok);
  background: var(--ok-soft);
}

.clearance-checks .blocked > b {
  color: var(--bad);
  background: var(--bad-soft);
}

.clearance-checks span {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.clearance-status-card {
  border-left: 4px solid var(--brand-600);
}

.clearance-history {
  margin-top: 18px;
}

.clearance-final-warning {
  padding: 15px;
  border: 1px solid #efc7c3;
  border-left: 4px solid var(--bad);
  border-radius: 14px;
  background: var(--bad-soft);
}

.clearance-final-warning p {
  margin: 6px 0 0;
  color: #704643;
  font-size: 11px;
  line-height: 1.6;
}

.destructive-approval {
  border-color: #efc5c2;
  background: linear-gradient(145deg,#fff,var(--bad-soft));
}

.destructive-approval .notice {
  margin-top: 13px;
}

@media(max-width:650px){
  .clearance-hero,
  .clearance-admin-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .clearance-symbol {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
    border-radius: 20px;
    font-size: 34px;
  }

  .clearance-checks {
    grid-template-columns: 1fr;
  }
}
/* ==========================================================
   InventyHub v5.7 — Separate official letter signer
   ========================================================== */

.letter-settings-hero {
  position: relative;
  margin-bottom: 18px;
  padding: clamp(24px,3vw,38px);
  overflow: hidden;
  border: 1px solid #e5d7d2;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background:
    radial-gradient(circle at 90% 18%, rgba(201,154,71,.18), transparent 15rem),
    linear-gradient(135deg,#fff,var(--brand-50));
  box-shadow: var(--shadow-sm);
}

.letter-settings-hero h3 {
  margin: 7px 0 10px;
  font-size: clamp(27px,3vw,38px);
  letter-spacing: -.04em;
}

.letter-settings-hero p {
  max-width: 800px;
  margin: 0;
  color: var(--ink-500);
  line-height: 1.7;
}

.letter-settings-grid {
  align-items: start;
}

.signature-current {
  padding: 14px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
}

.signature-current > img {
  width: 220px;
  max-height: 100px;
  margin: 4px auto;
  object-fit: contain;
}

.signer-preview-panel {
  position: sticky;
  top: 108px;
}

.signer-preview {
  min-height: 380px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.signer-preview > p {
  margin: 0 0 5px;
}

.signer-preview > b {
  font-size: 14px;
}

.preview-signature {
  width: 230px;
  height: 118px;
  margin: 14px 0 6px;
  display: grid;
  place-content: center;
  border-bottom: 1px solid #ccc;
  color: var(--ink-400);
}

.preview-signature img {
  width: 210px;
  height: 105px;
  object-fit: contain;
}

.signer-preview > strong {
  margin-top: 8px;
  font-size: 16px;
  text-decoration: underline;
}

.signer-preview > span {
  margin-top: 5px;
  color: var(--ink-500);
  font-size: 12px;
}

.clearance-settings-link {
  margin-top: 13px;
}

@media(max-width:900px){
  .signer-preview-panel {
    position: static;
  }
}

@media(max-width:650px){
  .letter-settings-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-signature,
  .preview-signature img {
    max-width: 100%;
  }
}
/* ==========================================================
   InventyHub v5.8 — Chat & User Search
   ========================================================== */

.nav-btn {
  padding-right: 10px;
}

.nav-badge {
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 6px;
  display: inline-grid;
  place-content: center;
  border: 2px solid #21191c;
  border-radius: 999px;
  color: #fff;
  background: #d8333c;
  box-shadow: 0 5px 12px rgba(216,51,60,.28);
  font-size: 9px;
  font-weight: 900;
}

.user-search-box {
  width: min(390px,100%);
  height: 44px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.user-search-box > span {
  color: var(--ink-400);
  font-size: 20px;
}

.user-search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.user-search-summary {
  margin: -5px 0 12px;
  color: var(--ink-500);
  font-size: 11px;
}

.user-search-summary b {
  color: var(--brand-700);
}

.user-cell {
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-table-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  overflow: hidden;
  display: grid;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg,var(--brand-500),var(--brand-800));
  font-size: 10px;
  font-weight: 900;
}

.user-table-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-page {
  height: calc(100vh - 160px);
  min-height: 590px;
  display: grid;
  grid-template-columns: 350px minmax(0,1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.chat-contacts-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0,1fr);
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
}

.chat-panel-head {
  padding: 20px 18px 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.chat-panel-head h3 {
  margin: 3px 0 0;
  font-size: 26px;
  letter-spacing: -.035em;
}

.chat-total-badge {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--brand-700);
  background: var(--brand-100);
  font-size: 9px;
  font-weight: 850;
}

.chat-contact-search {
  padding: 0 14px 12px;
}

.chat-contact-search input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: #fff;
}

.chat-contact-search input:focus {
  border-color: rgba(173,32,40,.55);
  box-shadow: 0 0 0 4px rgba(173,32,40,.07);
}

.chat-contact-list {
  min-height: 0;
  padding: 0 9px 12px;
  overflow-y: auto;
}

.chat-contact {
  position: relative;
  width: 100%;
  min-height: 78px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--ink-800);
  background: transparent;
  text-align: left;
  transition: .17s ease;
}

.chat-contact:hover {
  border-color: var(--line);
  background: #fff;
}

.chat-contact.active {
  border-color: #e6c6c7;
  background: var(--brand-50);
  box-shadow: var(--shadow-xs);
}

.chat-contact-avatar,
.chat-peer-avatar {
  overflow: hidden;
  display: grid;
  place-content: center;
  color: #fff;
  background: linear-gradient(145deg,var(--brand-500),var(--brand-800));
  font-weight: 900;
}

.chat-contact-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 11px;
}

.chat-contact-avatar img,
.chat-peer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-contact-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.chat-contact-copy > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-contact-copy b,
.chat-contact-copy span,
.chat-contact-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-contact-copy b {
  font-size: 12px;
}

.chat-contact-copy > span {
  color: var(--ink-500);
  font-size: 9px;
}

.chat-contact-copy small {
  color: var(--ink-400);
  font-size: 10px;
}

.contact-unread {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-content: center;
  border-radius: 999px;
  color: #fff !important;
  background: var(--brand-600);
  font-size: 8px !important;
  font-weight: 900;
}

.loan-reminder-dot {
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  display: grid;
  place-content: center;
  border-radius: 9px;
  color: var(--warn);
  background: var(--warn-soft);
  font-size: 9px;
  font-weight: 900;
}

.chat-conversation-panel {
  min-width: 0;
  min-height: 0;
  background:
    radial-gradient(circle at 100% 0%,rgba(173,32,40,.045),transparent 22rem),
    #fff;
}

.chat-conversation,
.chat-conversation-empty {
  height: 100%;
  min-height: 0;
}

.chat-conversation {
  display: grid;
  grid-template-rows: auto auto minmax(0,1fr) auto;
}

.chat-conversation-empty {
  display: grid;
  place-content: center;
  gap: 10px;
  color: var(--ink-400);
  text-align: center;
}

.spinner.mini {
  width: 34px;
  height: 34px;
}

.chat-conversation-head {
  min-height: 72px;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.95);
}

.chat-peer {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.chat-peer-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  font-size: 11px;
}

.chat-peer > div:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.chat-peer b,
.chat-peer span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-peer b {
  font-size: 13px;
}

.chat-peer span {
  color: var(--ink-500);
  font-size: 10px;
}

.chat-quick-actions {
  padding: 9px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  background: #fffdfb;
}

.chat-messages {
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background:
    radial-gradient(circle at 15% 20%,rgba(201,154,71,.045),transparent 18rem),
    var(--surface-soft);
}

.chat-message-row {
  width: 100%;
  display: flex;
}

.chat-message-row.mine {
  justify-content: flex-end;
}

.chat-message-row.theirs {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: min(650px,78%);
  padding: 10px 12px 7px;
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 5px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.chat-message-row.mine .chat-bubble {
  color: #fff;
  border-color: var(--brand-700);
  border-radius: 16px 16px 5px 16px;
  background: linear-gradient(145deg,var(--brand-600),var(--brand-800));
}

.chat-bubble p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.chat-loan-ref {
  margin-bottom: 6px;
  padding: 4px 7px;
  display: inline-flex;
  border-radius: 7px;
  color: var(--brand-700);
  background: var(--brand-50);
  font-size: 8px;
  font-weight: 850;
}

.chat-message-row.mine .chat-loan-ref {
  color: #fff;
  background: rgba(255,255,255,.13);
}

.chat-message-meta {
  margin-top: 5px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  color: var(--ink-400);
  font-size: 8px;
}

.chat-message-row.mine .chat-message-meta {
  color: rgba(255,255,255,.60);
}

.chat-empty-message {
  margin: auto;
  display: grid;
  place-items: center;
  gap: 6px;
  color: var(--ink-400);
  text-align: center;
}

.chat-empty-message > span {
  font-size: 34px;
  color: var(--brand-300,var(--brand-500));
  opacity: .45;
}

.chat-empty-message p {
  margin: 0;
  font-size: 10px;
}

.chat-composer {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: end;
  gap: 9px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-composer select {
  width: 210px;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  font-size: 10px;
}

.chat-composer textarea {
  width: 100%;
  min-height: 44px;
  max-height: 130px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: 0;
}

.chat-composer textarea:focus {
  border-color: rgba(173,32,40,.55);
  box-shadow: 0 0 0 4px rgba(173,32,40,.07);
}

.chat-composer .btn {
  min-height: 44px;
}

.empty.compact {
  min-height: 80px;
  padding: 20px 12px;
}

@media(max-width:900px){
  .chat-page {
    height: auto;
    min-height: 700px;
    grid-template-columns: 290px minmax(0,1fr);
  }

  .chat-composer {
    grid-template-columns: 1fr auto;
  }

  .chat-composer select {
    width: 100%;
    grid-column: 1 / -1;
  }
}

@media(max-width:700px){
  .user-search-box {
    width: 100%;
  }

  .chat-page {
    min-height: 760px;
    grid-template-columns: 1fr;
    grid-template-rows: 280px 620px;
  }

  .chat-contacts-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chat-contact-list {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 5px;
  }

  .chat-contact {
    min-height: 72px;
  }

  .chat-bubble {
    max-width: 88%;
  }

  .chat-conversation-head {
    align-items: flex-start;
  }
}

@media(max-width:440px){
  .chat-contact-list {
    grid-template-columns: 1fr;
  }

  .chat-page {
    grid-template-rows: 300px 640px;
  }

  .chat-composer {
    grid-template-columns: 1fr;
  }

  .chat-composer .btn {
    width: 100%;
  }
}
/* ==========================================================
   InventyHub v5.9 — Account registration approval
   ========================================================== */

.account-pending-success {
  padding: 12px 8px 8px;
  text-align: center;
}

.account-pending-success > span {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  display: grid;
  place-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ok);
  font-size: 26px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(19,115,74,.18);
}

.account-pending-success h3 {
  margin: 15px 0 8px;
}

.account-pending-success p {
  max-width: 580px;
  margin: 0 auto;
  color: var(--ink-500);
  line-height: 1.65;
}

.pending-account-code {
  width: max-content;
  max-width: 100%;
  margin: 17px auto;
  padding: 11px 18px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--brand-100);
  border-radius: 13px;
  background: var(--brand-50);
}

.pending-account-code span {
  color: var(--ink-500);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pending-account-code b {
  color: var(--brand-800);
  font-size: 15px;
}

.account-pending-success small {
  color: var(--ink-400);
}

.account-approval-head {
  position: relative;
  margin-bottom: 18px;
  padding: clamp(24px,3vw,38px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  border: 1px solid #e5d7d2;
  border-radius: 25px;
  background:
    radial-gradient(circle at 89% 18%,rgba(201,154,71,.18),transparent 15rem),
    linear-gradient(135deg,#fff,var(--brand-50));
  box-shadow: var(--shadow-sm);
}

.account-approval-head h3 {
  margin: 7px 0 10px;
  font-size: clamp(27px,3vw,38px);
  letter-spacing: -.04em;
}

.account-approval-head p {
  max-width: 780px;
  margin: 0;
  color: var(--ink-500);
  line-height: 1.65;
}

.account-approval-list {
  display: grid;
  gap: 11px;
}

.account-approval-card {
  padding: 15px;
  display: grid;
  grid-template-columns: 58px minmax(0,1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.account-avatar {
  width: 58px;
  height: 58px;
  overflow: hidden;
  display: grid;
  place-content: center;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(145deg,var(--brand-500),var(--brand-800));
  font-size: 15px;
  font-weight: 900;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-approval-copy {
  min-width: 0;
}

.account-approval-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.account-approval-title h4 {
  margin: 0 0 4px;
  font-size: 15px;
}

.account-approval-title > div > span {
  color: var(--ink-500);
  font-size: 10px;
}

.account-meta-grid {
  margin: 12px 0;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 8px;
}

.account-meta-grid span {
  min-width: 0;
  padding: 9px 10px;
  display: grid;
  gap: 3px;
  border: 1px solid #eee7e4;
  border-radius: 11px;
  color: var(--ink-700);
  background: var(--surface-soft);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.account-meta-grid b {
  color: var(--ink-400);
  font-size: 8px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.registration-note {
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--ink-700);
  background: var(--warn-soft);
  font-size: 10px;
  line-height: 1.55;
}

.account-rejected-history {
  margin-top: 18px;
}

@media(max-width:820px){
  .account-meta-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media(max-width:650px){
  .account-approval-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-approval-card {
    grid-template-columns: 1fr;
  }

  .account-approval-title {
    flex-direction: column;
  }

  .account-meta-grid {
    grid-template-columns: 1fr;
  }
}
/* ==========================================================
   InventyHub v6.0 — Live camera evidence & transaction alerts
   ========================================================== */

.live-camera-section,
.live-return-proof {
  display: grid;
  gap: 11px;
}

.camera-proof-label {
  display: grid;
  gap: 3px;
}

.camera-proof-label b {
  color: var(--ink-800);
  font-size: 12px;
}

.camera-proof-label span {
  color: var(--ink-500);
  font-size: 10px;
  line-height: 1.55;
}

.live-proof-camera {
  position: relative;
  min-height: 290px;
  overflow: hidden;
  border: 2px dashed #d7c8c4;
  border-radius: 18px;
  background:
    radial-gradient(circle at center,rgba(173,32,40,.05),transparent 17rem),
    #191719;
}

.live-proof-camera video,
.live-proof-camera img {
  width: 100%;
  min-height: 290px;
  max-height: 500px;
  display: block;
  object-fit: cover;
}

.live-capture-stamp {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  color: #fff;
  background: rgba(14,12,13,.72);
  backdrop-filter: blur(8px);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .05em;
}

.live-proof-notice {
  padding: 10px 12px;
  border: 1px solid #dfd4d1;
  border-left: 4px solid var(--brand-600);
  border-radius: 11px;
  color: var(--ink-600);
  background: var(--brand-50);
  font-size: 10px;
  line-height: 1.6;
}

.transaction-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.transaction-title-line h4 {
  margin: 0;
}

.transaction-alert {
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.transaction-alert::before {
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 50%;
  background: currentColor;
  animation: transactionPulse 1.5s ease-in-out infinite;
}

.transaction-alert.borrow-alert {
  color: #9b4a07;
  background: #fff0d5;
}

.transaction-alert.return-alert {
  color: #a51e26;
  background: #fdebed;
}

.transaction-needs-attention {
  border-color: #e8c9c6;
  box-shadow: 0 6px 18px rgba(173,32,40,.075);
}

.transaction-notice-panel {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid #e5cbc7;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.transaction-notice-head {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background:
    radial-gradient(circle at 93% 18%,rgba(201,154,71,.16),transparent 15rem),
    linear-gradient(135deg,#fff,var(--brand-50));
}

.transaction-notice-head h3 {
  margin: 5px 0 4px;
  font-size: 22px;
  letter-spacing: -.035em;
}

.transaction-notice-head p {
  margin: 0;
  color: var(--ink-500);
  font-size: 10px;
}

.transaction-notice-counts {
  display: flex;
  gap: 9px;
}

.notice-count {
  min-width: 110px;
  padding: 10px 14px;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.notice-count strong {
  font-size: 24px;
  line-height: 1;
}

.notice-count span {
  margin-top: 5px;
  font-size: 8px;
  font-weight: 800;
}

.notice-count.borrow strong {
  color: #a35a11;
}

.notice-count.returns strong {
  color: var(--brand-700);
}

.transaction-notice-list {
  padding: 12px;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.transaction-notice-item {
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 12px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.transaction-notice-item.borrow {
  border-left: 4px solid #d29a45;
}

.transaction-notice-item.return {
  border-left: 4px solid var(--brand-600);
}

.notice-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-600);
  box-shadow: 0 0 0 5px rgba(173,32,40,.09);
  animation: transactionPulse 1.5s ease-in-out infinite;
}

.transaction-notice-item.borrow .notice-pulse {
  background: #c48221;
  box-shadow: 0 0 0 5px rgba(196,130,33,.10);
}

.transaction-notice-item b {
  font-size: 11px;
}

.transaction-notice-item p {
  margin: 2px 0;
  color: var(--ink-600);
  font-size: 10px;
}

.transaction-notice-item small {
  color: var(--ink-400);
  font-size: 8px;
}

.all-clear {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--ink-500);
}

.all-clear > span {
  width: 35px;
  height: 35px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  color: var(--ok);
  background: var(--ok-soft);
  font-weight: 900;
}

.all-clear b {
  display: block;
  color: var(--ink-800);
}

.all-clear p {
  margin: 2px 0 0;
  font-size: 9px;
}

@keyframes transactionPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.75); }
}

@media(max-width:720px){
  .transaction-notice-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .transaction-notice-counts {
    width: 100%;
  }

  .notice-count {
    flex: 1;
  }

  .transaction-notice-item {
    grid-template-columns: 12px minmax(0,1fr);
  }

  .transaction-notice-item .btn {
    grid-column: 2;
    width: max-content;
  }

  .live-proof-camera {
    min-height: 230px;
  }

  .live-proof-camera video,
  .live-proof-camera img {
    min-height: 230px;
  }
}
/* InventyHub v6.1 — simplified equipment location and post-approval actions */
#usageLocationWrap.hidden {
  display: none !important;
}
/* ==========================================================
   InventyHub v6.2 — Room schedule tags & time conflict prevention
   ========================================================== */

.room-schedule-legend {
  margin: -4px 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  color: var(--ink-500);
  font-size: 10px;
}

.room-schedule-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot,
.room-slot-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
}

.legend-dot.in-use,
.room-schedule-slot.in-use .room-slot-dot {
  background: var(--bad);
  box-shadow: 0 0 0 4px rgba(176,39,45,.09);
}

.legend-dot.reserved,
.room-schedule-slot.reserved .room-slot-dot,
.room-schedule-slot.pending .room-slot-dot {
  background: #c88418;
  box-shadow: 0 0 0 4px rgba(200,132,24,.09);
}

.legend-dot.free {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(19,115,74,.08);
}

.room-card-schedule {
  margin-top: 12px;
  padding: 11px;
  border: 1px solid #ece3df;
  border-radius: 13px;
  background: var(--surface-soft);
}

.room-card-schedule-head,
.selected-room-head {
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.room-card-schedule-head b,
.selected-room-head b {
  font-size: 10px;
}

.room-card-schedule-head > span,
.selected-room-head > div > span {
  color: var(--ink-400);
  font-size: 8px;
}

.selected-room-head > div {
  display: grid;
  gap: 2px;
}

.room-schedule-list {
  display: grid;
  gap: 7px;
}

.room-schedule-slot {
  padding: 8px 9px;
  display: grid;
  grid-template-columns: 8px minmax(0,1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid #ece7e4;
  border-radius: 10px;
  background: #fff;
}

.room-schedule-slot > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.room-schedule-slot b {
  color: var(--ink-750,var(--ink-800));
  font-size: 9px;
  line-height: 1.4;
}

.room-schedule-slot span {
  color: var(--ink-400);
  font-size: 8px;
}

.room-schedule-slot.in-use {
  border-color: #edc9c7;
  background: #fff7f7;
}

.room-schedule-slot.reserved,
.room-schedule-slot.pending {
  border-color: #eadcbf;
  background: #fffaf0;
}

.room-schedule-empty {
  padding: 9px 10px;
  border: 1px dashed #ddd2cd;
  border-radius: 10px;
  color: var(--ink-450,var(--ink-500));
  background: #fff;
  font-size: 9px;
}

.room-schedule-empty > span {
  margin-right: 5px;
  color: var(--ok);
  font-weight: 900;
}

.room-more-slots {
  padding: 5px 7px 0;
  color: var(--ink-400);
  font-size: 8px;
  text-align: right;
}

.selected-room-schedule {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.room-tag-hint {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #e8e0dc;
  color: var(--ink-500);
  font-size: 9px;
  line-height: 1.5;
}

.room-availability-status {
  margin-top: 11px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 31px minmax(0,1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.room-availability-status > span {
  width: 31px;
  height: 31px;
  display: grid;
  place-content: center;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 900;
}

.room-availability-status > div {
  display: grid;
  gap: 2px;
}

.room-availability-status b {
  font-size: 10px;
}

.room-availability-status p {
  margin: 0;
  color: var(--ink-500);
  font-size: 9px;
  line-height: 1.5;
}

.room-availability-status small {
  margin-top: 4px;
  padding: 5px 7px;
  display: block;
  border-radius: 8px;
  color: var(--ink-650,var(--ink-700));
  background: rgba(255,255,255,.72);
  font-size: 8px;
}

.room-availability-status.neutral > span,
.room-availability-status.checking > span {
  color: var(--ink-500);
  background: #f1eeee;
}

.room-availability-status.available {
  border-color: #cce3d6;
  background: var(--ok-soft);
}

.room-availability-status.available > span {
  color: var(--ok);
  background: #fff;
}

.room-availability-status.conflict {
  border-color: #efc7c5;
  background: var(--bad-soft);
}

.room-availability-status.conflict > span {
  color: var(--bad);
  background: #fff;
}

.room-availability-status.checking {
  border-color: #eadfca;
  background: var(--warn-soft);
}

.room-card .btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@media(max-width:600px){
  .room-card-schedule-head,
  .selected-room-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* ==========================================================
   InventyHub v6.3 — User availability center & room drill-down
   ========================================================== */

.availability-hub {
  margin: 18px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.availability-hub-head {
  margin-bottom: 15px;
}

.availability-hub-head h3 {
  margin: 4px 0 6px;
  font-size: 22px;
  letter-spacing: -.035em;
}

.availability-hub-head p {
  max-width: 820px;
  margin: 0;
  color: var(--ink-500);
  font-size: 10px;
  line-height: 1.6;
}

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

.availability-launch-card {
  position: relative;
  min-height: 170px;
  padding: 20px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) 34px;
  align-items: center;
  gap: 15px;
  border: 1px solid #e7ddda;
  border-radius: 20px;
  color: var(--ink-800);
  background: linear-gradient(145deg,#fff,#fbf7f5);
  text-align: left;
  box-shadow: var(--shadow-xs);
  transition: transform .17s ease, box-shadow .17s ease, border-color .17s ease;
}

.availability-launch-card:hover {
  transform: translateY(-2px);
  border-color: #dfc0bd;
  box-shadow: var(--shadow-sm);
}

.availability-launch-card.room {
  background: radial-gradient(circle at 95% 10%,rgba(201,154,71,.16),transparent 12rem),linear-gradient(145deg,#fff,#fcfaf4);
}

.availability-launch-card.equipment {
  background: radial-gradient(circle at 95% 10%,rgba(173,32,40,.11),transparent 12rem),linear-gradient(145deg,#fff,#fff7f7);
}

.availability-launch-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-content: center;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(145deg,var(--brand-500),var(--brand-800));
  font-size: 23px;
}

.availability-launch-card.room .availability-launch-icon {
  background: linear-gradient(145deg,#b5812f,#76531c);
}

.availability-kicker {
  color: var(--brand-700);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .11em;
}

.availability-launch-card h4 {
  margin: 4px 0 6px;
  font-size: 18px;
}

.availability-launch-card p {
  margin: 0 0 10px;
  color: var(--ink-500);
  font-size: 10px;
  line-height: 1.55;
}

.availability-launch-card b {
  color: var(--ink-700);
  font-size: 9px;
}

.availability-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,.8);
  font-size: 16px;
}

.availability-directory-head {
  margin-bottom: 13px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.availability-directory-head h3 {
  margin: 4px 0 6px;
  font-size: 27px;
  letter-spacing: -.04em;
}

.availability-directory-head p {
  max-width: 760px;
  margin: 0;
  color: var(--ink-500);
  font-size: 10px;
  line-height: 1.6;
}

.room-directory-search {
  width: min(390px,100%);
  height: 44px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #fff;
}

.room-directory-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.room-directory-legend {
  margin: 4px 0 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--ink-500);
  font-size: 9px;
}

.room-directory-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.room-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(270px,1fr));
  gap: 14px;
}

.room-directory-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.room-directory-image {
  position: relative;
  height: 170px;
  overflow: hidden;
  background: var(--surface-soft);
}

.room-directory-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room-directory-image .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  backdrop-filter: blur(8px);
}

.room-directory-body {
  padding: 15px;
}

.room-directory-body h4 {
  margin: 0 0 9px;
  font-size: 17px;
}

.room-directory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 11px;
  color: var(--ink-500);
  font-size: 9px;
}

.room-directory-body > p {
  min-height: 34px;
  margin: 10px 0;
  color: var(--ink-500);
  font-size: 9px;
  line-height: 1.55;
}

.room-directory-summary {
  margin: 11px 0 13px;
  display: grid;
  grid-template-columns: 90px minmax(0,1fr);
  gap: 8px;
}

.room-directory-summary > div {
  min-width: 0;
  padding: 9px;
  display: grid;
  gap: 2px;
  border: 1px solid #eee6e3;
  border-radius: 11px;
  background: var(--surface-soft);
}

.room-directory-summary strong {
  overflow: hidden;
  color: var(--ink-800);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-directory-summary > div:first-child strong {
  color: var(--brand-700);
  font-size: 19px;
}

.room-directory-summary span {
  color: var(--ink-400);
  font-size: 7px;
}

.availability-detail-toolbar {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.availability-detail-toolbar > span {
  color: var(--ink-400);
  font-size: 9px;
}

.room-availability-hero {
  margin-bottom: 15px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(240px,34%) minmax(0,1fr);
  border: 1px solid var(--line);
  border-radius: 23px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.room-availability-photo {
  min-height: 270px;
  background: var(--surface-soft);
}

.room-availability-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room-availability-copy {
  padding: clamp(22px,3vw,34px);
}

.room-availability-copy > div:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}

.room-availability-copy h3 {
  margin: 10px 0 7px;
  font-size: clamp(27px,4vw,39px);
  letter-spacing: -.045em;
}

.room-availability-copy > p {
  margin: 0 0 18px;
  color: var(--ink-500);
  line-height: 1.65;
}

.room-fact-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 8px;
}

.room-fact-grid span {
  padding: 10px;
  display: grid;
  gap: 3px;
  border: 1px solid #eee6e3;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--ink-700);
  font-size: 9px;
}

.room-fact-grid b {
  color: var(--ink-400);
  font-size: 7px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.room-calendar-panel {
  margin-bottom: 14px;
}

.room-date-jump {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-500);
  font-size: 9px;
  font-weight: 700;
}

.room-date-jump input {
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}

.room-date-strip {
  padding-bottom: 5px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(70px,1fr);
  gap: 7px;
  overflow-x: auto;
}

.room-date-chip {
  position: relative;
  min-height: 82px;
  padding: 8px 5px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink-700);
  background: #fff;
}

.room-date-chip span,
.room-date-chip small {
  color: var(--ink-400);
  font-size: 8px;
}

.room-date-chip b {
  font-size: 20px;
}

.room-date-chip i {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: grid;
  place-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--brand-600);
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
}

.room-date-chip.active {
  color: #fff;
  border-color: var(--brand-700);
  background: linear-gradient(145deg,var(--brand-600),var(--brand-800));
  box-shadow: 0 8px 20px rgba(173,32,40,.18);
}

.room-date-chip.active span,
.room-date-chip.active small {
  color: rgba(255,255,255,.72);
}

.room-date-chip.active i {
  color: var(--brand-700);
  background: #fff;
}

.room-availability-columns {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}

.availability-day-count {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--brand-700);
  background: var(--brand-50);
  font-size: 8px;
  font-weight: 850;
}

.room-day-schedule,
.free-time-list {
  display: grid;
  gap: 8px;
}

.room-day-slot {
  padding: 11px;
  display: grid;
  grid-template-columns: 112px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #c88418;
  border-radius: 12px;
  background: #fffaf0;
}

.room-day-slot.in-use {
  border-left-color: var(--bad);
  background: #fff7f7;
}

.room-day-time {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-800);
}

.room-day-time b {
  font-size: 11px;
}

.room-day-time span {
  color: var(--ink-400);
}

.room-day-slot > div:last-child {
  display: grid;
  gap: 3px;
}

.room-day-slot strong {
  font-size: 10px;
}

.room-day-slot small {
  color: var(--ink-450,var(--ink-500));
  font-size: 8px;
  line-height: 1.45;
}

.room-day-empty {
  min-height: 130px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px dashed #cfe0d6;
  border-radius: 13px;
  background: var(--ok-soft);
}

.room-day-empty > span {
  width: 35px;
  height: 35px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  color: var(--ok);
  background: #fff;
  font-weight: 900;
}

.room-day-empty b {
  display: block;
  font-size: 10px;
}

.room-day-empty p {
  margin: 3px 0 0;
  color: var(--ink-500);
  font-size: 8px;
}

.room-day-empty.unavailable {
  border-color: #efcfcc;
  background: var(--bad-soft);
}

.room-day-empty.unavailable > span {
  color: var(--bad);
}

.free-time-slot {
  padding: 12px;
  display: grid;
  grid-template-columns: 65px minmax(0,1fr);
  align-items: center;
  gap: 3px 10px;
  border: 1px solid #cde1d5;
  border-radius: 12px;
  color: var(--ink-800);
  background: var(--ok-soft);
  text-align: left;
}

.free-time-slot:hover {
  border-color: var(--ok);
  background: #eef9f3;
}

.free-time-slot > span {
  grid-row: 1 / 3;
  padding: 5px 6px;
  border-radius: 8px;
  color: var(--ok);
  background: #fff;
  font-size: 7px;
  font-weight: 900;
  text-align: center;
}

.free-time-slot b {
  font-size: 12px;
}

.free-time-slot small {
  color: var(--ink-500);
  font-size: 8px;
}

.room-checker-form {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr)) auto;
  align-items: end;
  gap: 9px;
}

.room-checker-form label {
  display: grid;
  gap: 5px;
  color: var(--ink-600);
  font-size: 9px;
  font-weight: 750;
}

.room-checker-form input {
  min-height: 43px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
}

.room-detail-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

@media(max-width:900px){
  .availability-launch-grid,
  .room-availability-columns {
    grid-template-columns: 1fr;
  }

  .room-availability-hero {
    grid-template-columns: 1fr;
  }

  .room-availability-photo {
    min-height: 230px;
    max-height: 310px;
  }

  .room-fact-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media(max-width:700px){
  .availability-directory-head {
    align-items: stretch;
    flex-direction: column;
  }

  .room-directory-search {
    width: 100%;
  }

  .availability-launch-card {
    grid-template-columns: 46px minmax(0,1fr);
  }

  .availability-launch-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .availability-arrow {
    display: none;
  }

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

@media(max-width:520px){
  .room-fact-grid,
  .room-directory-summary {
    grid-template-columns: 1fr;
  }

  .room-day-slot {
    grid-template-columns: 1fr;
  }

  .availability-detail-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* ==========================================================
   InventyHub v6.4 SAFE - Two technician signers for clearance letter
   ========================================================== */
.letter-reference-note{
  margin-bottom:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
.letter-reference-note p{
  margin:4px 0 0;
  max-width:750px;
  color:var(--ink-500);
  font-size:10px;
  line-height:1.6;
}
.letter-logo-mini{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:9px;
}
.letter-logo-mini img{
  width:58px;
  height:58px;
  object-fit:contain;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  padding:5px;
}
.letter-logo-mini span{
  color:var(--ink-400);
  font-weight:900;
}
.two-signer-settings{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.signer-setting-card{
  min-width:0;
}
.signer-setting-card .signature-current{
  margin-top:4px;
}
.dual-signer-preview-panel{
  overflow:hidden;
}
.mengetahui-title{
  margin:4px 0 2px;
  text-align:center;
  font-size:13px;
  font-weight:700;
}
.dual-signer-preview{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:50px;
}
.dual-signer-preview .signer-preview{
  min-height:300px;
  padding:22px;
}
.dual-signer-preview .signer-preview > b{
  font-size:12px;
}
.dual-signer-preview .signer-preview > span{
  font-size:10px;
}
@media(max-width:850px){
  .two-signer-settings,
  .dual-signer-preview{
    grid-template-columns:1fr;
  }
  .letter-reference-note{
    align-items:flex-start;
    flex-direction:column;
  }
}
/* InventyHub v6.5 — Document-only access after clearance */
.document-access-hero{margin-bottom:16px;padding:clamp(24px,3vw,36px);display:grid;grid-template-columns:62px minmax(0,1fr);align-items:center;gap:18px;border:1px solid #cfe4d8;border-radius:24px;background:radial-gradient(circle at 92% 15%,rgba(24,120,74,.10),transparent 16rem),linear-gradient(135deg,#fff,#f1faf5);box-shadow:var(--shadow-sm)}
.document-access-icon{width:62px;height:62px;display:grid;place-content:center;border-radius:19px;color:#fff;background:var(--ok);font-size:26px;font-weight:900;box-shadow:0 10px 24px rgba(19,115,74,.17)}
.document-access-hero h3{margin:5px 0 7px;font-size:clamp(25px,3.2vw,38px);letter-spacing:-.04em}
.document-access-hero p{max-width:800px;margin:0;color:var(--ink-500);line-height:1.65}
.document-letter-card{margin-bottom:16px;display:grid;grid-template-columns:150px minmax(0,1fr);overflow:hidden;border:1px solid #e3d7d3;border-radius:22px;background:#fff;box-shadow:var(--shadow-sm)}
.document-letter-status{min-height:300px;padding:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#fff;background:linear-gradient(160deg,#18734a,#0d4f34)}
.document-letter-status span{width:48px;height:48px;display:grid;place-content:center;border:1px solid rgba(255,255,255,.35);border-radius:50%;background:rgba(255,255,255,.12);font-size:22px;font-weight:900}
.document-letter-status b{font-size:10px;letter-spacing:.12em}
.document-letter-main{padding:clamp(22px,3vw,34px)}
.document-letter-main h3{margin:5px 0 8px;font-size:24px;letter-spacing:-.035em}
.document-letter-main>p{margin:0 0 16px;color:var(--ink-500);line-height:1.6}
.document-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.document-meta-grid>div{padding:10px 11px;display:grid;gap:3px;border:1px solid #eee6e3;border-radius:11px;background:var(--surface-soft)}
.document-meta-grid span{color:var(--ink-400);font-size:7px;font-weight:850;letter-spacing:.06em;text-transform:uppercase}
.document-meta-grid b{color:var(--ink-800);font-size:10px;overflow-wrap:anywhere}
.document-meta-grid .span-2{grid-column:1/-1}
.document-actions{margin-top:16px;display:flex;flex-wrap:wrap;gap:9px}
.borrowing-closed-card{margin-bottom:16px;padding:20px 22px;display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:14px;border:1px solid #ead3d1;border-radius:18px;background:#fff7f7}
.borrowing-lock{width:48px;height:48px;display:grid;place-content:center;border-radius:14px;color:var(--brand-700);background:#fff;border:1px solid #edd0ce;font-size:21px}
.borrowing-closed-card h4{margin:4px 0 4px;font-size:17px}
.borrowing-closed-card p{margin:0;color:var(--ink-500);font-size:10px;line-height:1.6}
.approved-document-access{margin-top:14px;padding:14px;display:flex;align-items:center;justify-content:space-between;gap:15px;border:1px solid #cde3d5;border-radius:14px;background:var(--ok-soft)}
.approved-document-access b{font-size:11px}
.approved-document-access p{margin:3px 0 0;color:var(--ink-500);font-size:9px;line-height:1.5}
.approved-clearance-hero{border-color:#cfe4d8;background:linear-gradient(135deg,#fff,#f2faf5)}
@media(max-width:700px){.document-access-hero{grid-template-columns:1fr}.document-letter-card{grid-template-columns:1fr}.document-letter-status{min-height:auto;flex-direction:row}.document-meta-grid{grid-template-columns:1fr}.document-meta-grid .span-2{grid-column:auto}.approved-document-access{align-items:flex-start;flex-direction:column}}
/* ==========================================================
   InventyHub v6.6 — Chat draft + account diagnostics
   ========================================================== */
.user-admin-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.account-recovery-intro{
  margin-bottom:12px;
  padding:17px 18px;
  border:1px solid var(--line);
  border-radius:16px;
  background:linear-gradient(135deg,#fff,#fbf7f5);
}
.account-recovery-intro h3{margin:4px 0 5px}
.account-recovery-intro p{margin:0;color:var(--ink-500);font-size:10px;line-height:1.6}
.account-diagnostic-empty{
  margin-top:14px;
  padding:18px;
  border:1px dashed var(--line);
  border-radius:14px;
  background:var(--surface-soft);
}
.account-diagnostic-empty b{display:block;margin-bottom:5px}
.account-diagnostic-empty p{margin:0;color:var(--ink-500);font-size:10px;line-height:1.6}
.diagnostic-section-title{
  margin:18px 0 8px;
  color:var(--ink-500);
  font-size:8px;
  font-weight:900;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.account-diagnostic-card{
  margin-bottom:9px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.account-diagnostic-card.legacy-card{
  border-color:#ead7ae;
  background:#fffdf7;
}
.account-diagnostic-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.account-diagnostic-head>div{display:grid;gap:3px}
.account-diagnostic-head>div>b{font-size:11px}
.account-diagnostic-head>div>span{color:var(--ink-400);font-size:9px}
.ok-note{border-color:#cfe4d8!important;background:#f2faf5!important}
.warn-note{border-color:#ead7ae!important;background:#fffaf0!important}
.notice code{
  padding:2px 5px;
  border-radius:5px;
  background:rgba(0,0,0,.05);
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
}
@media(max-width:760px){
  .user-admin-actions{width:100%;justify-content:stretch}
  .user-admin-actions>.btn{width:100%}
  .user-admin-actions .user-search-box{width:100%}
  .account-diagnostic-head{flex-direction:column}
}
