:root {
  --bg: #03050a;
  --panel: rgba(12, 17, 31, 0.64);
  --panel-strong: rgba(13, 18, 31, 0.78);
  --ink: #f7fbff;
  --muted: #9aa8bd;
  --line: rgba(255, 255, 255, 0.12);
  --primary: #00f5d4;
  --pink: #ff2bd6;
  --violet: #9b5cff;
  --danger: #ff6b6b;
  --glass: rgba(255, 255, 255, 0.075);
  --glass-strong: rgba(255, 255, 255, 0.12);
  --glass-line: rgba(255, 255, 255, 0.16);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow: 0 28px 72px rgba(0, 0, 0, 0.38);
  --shadow-glass: 0 24px 70px rgba(0, 0, 0, 0.32), var(--glass-inner);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 43, 214, 0.16), transparent 28%),
    radial-gradient(circle at 82% 0, rgba(0, 245, 212, 0.12), transparent 28%),
    linear-gradient(180deg, #03050a 0%, #080b14 48%, #03050a 100%);
  color: var(--ink);
  font-family: "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 245, 212, 0.08) 1px, transparent 1px) 0 0 / 82px 82px,
    linear-gradient(0deg, rgba(155, 92, 255, 0.08) 1px, transparent 1px) 0 0 / 82px 82px;
  mask-image: linear-gradient(180deg, #000, transparent 88%);
  pointer-events: none;
}

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

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(14px, 4vw, 52px);
  border-bottom: 1px solid rgba(255, 43, 214, 0.2);
  background: rgba(3, 5, 10, 0.78);
  backdrop-filter: blur(18px) saturate(1.2);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-monogram {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 245, 212, 0.62);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.16), rgba(255, 43, 214, 0.14), rgba(155, 92, 255, 0.18));
  font-weight: 800;
  box-shadow: 0 0 28px rgba(255, 43, 214, 0.22);
}

.brand-lockup small,
.section-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-lockup strong {
  display: block;
  font-size: 1.02rem;
}

.site-nav {
  justify-self: center;
  display: flex;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.035);
}

.site-nav button,
.account-chip,
.icon-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 0 14px;
  background: transparent;
  color: #dce8f7;
  font-weight: 800;
}

.site-nav button.active,
.site-nav button:hover,
.account-chip:hover,
.icon-chip:hover {
  border-color: rgba(0, 245, 212, 0.38);
  background: rgba(0, 245, 212, 0.1);
  color: #ffffff;
}

svg {
  width: 18px;
  height: 18px;
}

.account-actions {
  display: flex;
  justify-content: end;
  gap: 8px;
}

.icon-chip {
  width: 40px;
  padding: 0;
}

main {
  width: min(1500px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 54px;
  min-width: 0;
}

.page {
  display: none;
  min-width: 0;
}

.page.active {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.page.active > *,
.page-heading,
.page-heading > *,
.glass-panel,
.borrow-workflow,
.step-layout,
.asset-grid,
.asset-card {
  min-width: 0;
  max-width: 100%;
}

.home-hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: 28px;
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid rgba(255, 43, 214, 0.26);
  border-radius: 34px;
  background:
    linear-gradient(90deg, rgba(3, 5, 10, 0.96) 0%, rgba(10, 14, 26, 0.86) 48%, rgba(155, 92, 255, 0.22) 100%),
    url("/assets/borrow-request-hero.png") center / cover no-repeat;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.home-copy {
  max-width: 760px;
}

.home-copy h1,
.page-heading h1 {
  margin: 0;
  color: #ffffff;
  line-height: 1.1;
}

.home-copy h1 {
  font-size: clamp(2.1rem, 6vw, 4.6rem);
}

.home-copy p:not(.section-kicker) {
  max-width: 640px;
  margin: 18px 0 0;
  color: #c4d0e3;
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.row-actions {
  margin-top: 0;
}

.row-actions.center {
  justify-content: center;
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.btn.primary {
  border-color: rgba(255, 43, 214, 0.36);
  background: linear-gradient(135deg, var(--pink), var(--violet) 52%, #1ed6e2);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(255, 43, 214, 0.24);
}

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

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.full {
  width: 100%;
}

.hero-dashboard {
  display: grid;
  gap: 4px;
  padding: 22px;
  border: 1px solid rgba(255, 43, 214, 0.34);
  border-radius: var(--radius-lg);
  background: rgba(14, 10, 26, 0.68);
  box-shadow: inset 0 0 26px rgba(255, 43, 214, 0.12);
}

.hero-dashboard span,
.hero-dashboard small {
  color: #bac8dc;
  font-weight: 800;
}

.hero-dashboard strong {
  color: var(--primary);
  font-size: 4rem;
  line-height: 1;
}

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

.feature-grid article,
.glass-panel,
.auth-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 0 0, rgba(255, 43, 214, 0.11), transparent 34%),
    linear-gradient(180deg, rgba(13, 18, 31, 0.84), rgba(6, 9, 17, 0.9));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px) saturate(1.08);
}

.feature-grid article {
  padding: 20px;
}

.feature-grid i {
  color: var(--primary);
}

.feature-grid h2 {
  margin: 12px 0 6px;
  font-size: 1.1rem;
}

.feature-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 2px;
}

.page-heading h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.selected-meter {
  min-width: 150px;
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  border: 1px solid rgba(0, 245, 212, 0.28);
  border-radius: var(--radius-md);
  background: rgba(0, 245, 212, 0.08);
}

.selected-meter span {
  color: var(--muted);
  font-weight: 800;
}

.selected-meter strong {
  color: var(--primary);
}

.glass-panel {
  padding: 16px;
}

.panel-tools {
  display: flex;
  justify-content: end;
  margin-bottom: 12px;
}

.search-box {
  width: min(430px, 100%);
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255, 43, 214, 0.24);
  border-radius: var(--radius-pill);
  background: rgba(3, 5, 10, 0.56);
  color: var(--muted);
}

.search-box input,
input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(3, 5, 10, 0.56);
  color: var(--ink);
}

.search-box input {
  min-height: auto;
  border: 0;
  outline: 0;
  background: transparent;
}

input,
select,
textarea {
  min-height: 46px;
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #77869d;
}

select option {
  background: #101624;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(255, 43, 214, 0.16);
}

.category-scroll {
  display: flex;
  gap: 10px;
  padding-bottom: 14px;
  overflow-x: auto;
}

.category-scroll button {
  flex: 0 0 auto;
  min-width: 126px;
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  text-align: left;
}

.category-scroll button.active {
  border-color: rgba(0, 245, 212, 0.82);
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.18), rgba(155, 92, 255, 0.18), rgba(255, 43, 214, 0.1));
}

.category-scroll span {
  color: var(--muted);
  font-weight: 800;
}

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

.asset-card {
  position: relative;
  overflow: hidden;
  min-height: 192px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(18, 25, 39, 0.84), rgba(9, 12, 22, 0.88));
}

.asset-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--pink), var(--violet));
}

.asset-card.selected {
  border-color: rgba(0, 245, 212, 0.58);
  box-shadow: 0 0 0 1px rgba(0, 245, 212, 0.12), 0 18px 36px rgba(255, 43, 214, 0.13);
}

.asset-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.asset-card strong {
  display: block;
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}

.asset-card span,
.asset-card dt {
  color: var(--muted);
}

.asset-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.asset-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.asset-card dd,
.asset-card dt {
  margin: 0;
}

.asset-card dd {
  color: var(--ink);
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}

.login-gate {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}

.login-gate > svg {
  width: 54px;
  height: 54px;
  color: var(--primary);
}

.login-gate p {
  max-width: 520px;
  color: var(--muted);
}

.borrow-workflow {
  display: grid;
  gap: 14px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stepper li {
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 800;
}

.stepper li.active {
  border-color: rgba(0, 245, 212, 0.44);
  background: rgba(0, 245, 212, 0.1);
  color: #ffffff;
}

.step-layout,
.confirm-panel,
.done-panel {
  display: none;
}

.step-layout.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
  gap: 14px;
  align-items: start;
}

.confirm-panel.active,
.done-panel.active {
  display: grid;
  gap: 16px;
}

.sticky-panel {
  position: sticky;
  top: 92px;
}

.panel-title {
  margin-bottom: 14px;
}

.panel-title h2 {
  margin: 0;
}

.selected-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  margin-bottom: 14px;
}

.selected-list article,
.confirm-assets article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 43, 214, 0.17);
  border-radius: var(--radius-md);
  background: rgba(3, 5, 10, 0.46);
}

.selected-list span,
.confirm-assets span {
  color: var(--muted);
  font-size: 0.88rem;
}

.icon-button,
.dialog-close,
.password-toggle {
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.icon-button:hover,
.dialog-close:hover,
.password-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.profile-grid article,
.confirm-grid article {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
}

.confirm-grid article.wide {
  grid-column: 1 / -1;
}

.profile-grid span,
.confirm-grid span,
label span {
  color: #b7c4d8;
  font-size: 0.88rem;
  font-weight: 800;
}

label span b {
  color: var(--pink);
  font-size: 0.78rem;
}

.field-hint {
  color: #8795aa;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
}

.field-message {
  color: #ff7f98;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.5;
}

.field-invalid {
  border-color: #ff5b7c !important;
  box-shadow: 0 0 0 3px rgba(255, 43, 214, 0.16);
}

.borrow-form {
  display: grid;
  gap: 13px;
}

label {
  display: grid;
  gap: 7px;
}

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

.confirm-assets {
  display: grid;
  gap: 10px;
}

.done-panel {
  justify-items: center;
  text-align: center;
}

.done-panel > svg {
  width: 64px;
  height: 64px;
  color: var(--primary);
}

.done-panel h2 {
  max-width: 760px;
  margin: 0;
}

.print-card {
  width: min(760px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.print-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.print-card section {
  display: grid;
  gap: 8px;
}

.print-card p {
  margin: 0;
}

.print-card b {
  display: inline-block;
  min-width: 92px;
  color: #b7c4d8;
}

html:has(dialog[open]),
body:has(dialog[open]) {
  overflow: hidden;
}

.auth-dialog {
  width: min(460px, calc(100% - 28px));
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--ink);
  overflow: hidden;
}

.auth-dialog::backdrop {
  background: rgba(3, 5, 10, 0.74);
  backdrop-filter: blur(6px);
}

.auth-card {
  position: relative;
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: calc(100dvh - 28px);
  padding: 24px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.auth-card > * {
  min-width: 0;
}

.auth-card h2 {
  margin: 0;
  padding-right: 42px;
  overflow-wrap: anywhere;
}

.dialog-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.password-control {
  position: relative;
}

.password-control input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border-radius: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  user-select: none;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--cyan);
}

.check-row span {
  color: #c8d4e8;
  font-size: 0.9rem;
  font-weight: 800;
}

[data-ascii-input] {
  ime-mode: disabled;
}

.text-link {
  border: 0;
  background: transparent;
  color: #c9b9ff;
  font-weight: 800;
}

.empty {
  margin: 0;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(380px, calc(100vw - 36px));
  padding: 12px 16px;
  border: 1px solid rgba(0, 245, 212, 0.26);
  border-radius: var(--radius-md);
  background: rgba(12, 17, 31, 0.96);
  color: #ffffff;
  box-shadow: var(--shadow);
  font-weight: 800;
}

/* Liquid glass visual layer */
body {
  background:
    linear-gradient(135deg, rgba(3, 5, 10, 0.98), rgba(9, 14, 25, 0.94) 46%, rgba(4, 7, 13, 0.98)),
    var(--bg);
}

body::before {
  background:
    linear-gradient(110deg, rgba(0, 245, 212, 0.1), transparent 36%, rgba(255, 43, 214, 0.08) 64%, transparent),
    linear-gradient(90deg, rgba(0, 245, 212, 0.055) 1px, transparent 1px) 0 0 / 86px 86px,
    linear-gradient(0deg, rgba(155, 92, 255, 0.05) 1px, transparent 1px) 0 0 / 86px 86px;
  mask-image: linear-gradient(180deg, #000, transparent 86%);
  opacity: 0.74;
}

.site-header,
.site-nav,
.brand-monogram,
.account-chip,
.icon-chip,
.feature-grid article,
.glass-panel,
.auth-card,
.selected-meter,
.search-box,
.category-scroll button,
.asset-card,
.asset-thumb,
.borrow-workflow,
.stepper,
.side-summary,
.sticky-panel,
.form-card,
.review-card,
.done-panel,
.print-card,
.profile-card,
.btn,
input,
select,
textarea,
.toast {
  border-color: var(--glass-line);
  background-color: var(--glass);
  box-shadow: var(--glass-inner);
  backdrop-filter: blur(24px) saturate(1.26);
  -webkit-backdrop-filter: blur(24px) saturate(1.26);
}

.site-header,
.feature-grid article,
.glass-panel,
.auth-card,
.asset-card,
.borrow-workflow,
.side-summary,
.sticky-panel,
.form-card,
.review-card,
.done-panel,
.print-card,
.profile-card,
.toast {
  box-shadow: var(--shadow-glass);
}

.site-header {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.04)),
    rgba(3, 5, 10, 0.62);
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.site-nav,
.account-chip,
.icon-chip {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 32px rgba(0, 0, 0, 0.18);
}

.brand-monogram {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(0, 245, 212, 0.14), rgba(255, 43, 214, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 18px 38px rgba(0, 245, 212, 0.12);
}

.home-hero {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(90deg, rgba(3, 5, 10, 0.9) 0%, rgba(10, 14, 26, 0.68) 50%, rgba(155, 92, 255, 0.2) 100%),
    url("/assets/borrow-request-hero.png") center / cover no-repeat;
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(10px) saturate(1.16);
  -webkit-backdrop-filter: blur(10px) saturate(1.16);
}

.feature-grid article,
.glass-panel,
.auth-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
    rgba(12, 17, 31, 0.54);
}

.asset-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(13, 18, 31, 0.58);
  box-shadow: var(--shadow-glass);
}

.asset-card.selected,
.category-scroll button.active,
.site-nav button.active,
.site-nav button:hover,
.account-chip:hover,
.icon-chip:hover {
  border-color: rgba(0, 245, 212, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(0, 245, 212, 0.13), rgba(255, 43, 214, 0.08)),
    rgba(255, 255, 255, 0.075);
  box-shadow: 0 18px 46px rgba(0, 245, 212, 0.1), var(--glass-inner);
}

.btn {
  background: rgba(255, 255, 255, 0.085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 34px rgba(0, 0, 0, 0.18);
}

.btn.primary {
  border-color: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(255, 43, 214, 0.62) 34%, rgba(155, 92, 255, 0.58) 62%, rgba(0, 245, 212, 0.46)),
    rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 18px 44px rgba(255, 43, 214, 0.18);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.075);
}

input,
select,
textarea,
.search-box {
  background: rgba(3, 5, 10, 0.36);
  border-color: rgba(255, 255, 255, 0.14);
}

input:focus,
select:focus,
textarea:focus,
.search-box:focus-within {
  border-color: rgba(0, 245, 212, 0.56);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(0, 245, 212, 0.12), var(--glass-inner);
}

.asset-card:hover,
.feature-grid article:hover,
.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: var(--shadow-glass), 0 0 0 1px rgba(0, 245, 212, 0.06);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .site-nav,
  .account-actions {
    justify-self: stretch;
    justify-content: center;
  }

  .home-hero,
  .step-layout.active {
    grid-template-columns: 1fr;
  }

  .hero-dashboard,
  .sticky-panel {
    position: static;
  }

  .feature-grid,
  .profile-grid,
  .confirm-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .auth-dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .auth-card {
    max-height: calc(100dvh - 16px);
    gap: 12px;
    padding: 18px;
  }

  main {
    width: 100%;
    padding: 12px;
  }

  .site-header {
    padding: 10px 12px;
  }

  .site-nav {
    overflow-x: auto;
    justify-content: start;
  }

  .site-nav button {
    flex: 0 0 auto;
  }

  .home-hero {
    min-height: 0;
    padding: 22px;
    border-radius: 26px;
  }

  .home-copy h1 {
    font-size: 2.2rem;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .page-heading .btn {
    width: 100%;
  }

  .glass-panel {
    padding: 14px;
    border-radius: 22px;
  }

  .asset-grid,
  .date-grid {
    grid-template-columns: 1fr;
  }

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

  .row-actions .btn {
    flex: 1 1 180px;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  .site-header,
  .page-heading,
  .stepper,
  .no-print,
  .toast,
  .auth-dialog,
  .feature-grid,
  #homePage,
  #catalogPage,
  #borrowLoginGate,
  #selectStep,
  #detailsStep,
  #confirmStep {
    display: none !important;
  }

  main {
    width: 100%;
    padding: 0;
  }

  #borrowPage,
  #borrowWorkflow,
  #doneStep {
    display: block !important;
  }

  .done-panel {
    border: 0;
    box-shadow: none;
    background: #ffffff;
    color: #000000;
  }

  .done-panel > svg,
  .done-panel > .section-kicker,
  .done-panel > h2,
  #doneRequestId {
    display: none;
  }

  .print-card {
    width: 100%;
    border: 1px solid #000;
    border-radius: 0;
    background: #ffffff;
    color: #000000;
  }
}

/* ===== 會員通知鈴鐺 ===== */
.notif-shell { position: relative; display: inline-flex; }
.notif-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  border-radius: 999px; background: #ff2bd6; color: #fff; font-size: 11px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 320px; max-width: 86vw;
  background: rgba(10, 14, 24, 0.97); border: 1px solid rgba(0,245,212,0.3);
  border-radius: 16px; padding: 14px; z-index: 60;
  box-shadow: 0 24px 50px rgba(0,0,0,0.55); backdrop-filter: blur(14px);
}
.notif-panel-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.notif-panel-head button {
  background: none; border: none; color: #00f5d4; font-weight: 700; font-size: 13px; cursor: pointer;
}
.notif-list { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.notif-item {
  border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.notif-item.unread { border-color: rgba(0,245,212,0.45); background: rgba(0,245,212,0.06); }
.notif-item strong { font-size: 14px; }
.notif-item p { font-size: 13px; color: rgba(230,240,250,0.75); margin: 0; }
.notif-item time { font-size: 11.5px; color: rgba(230,240,250,0.45); }
.notif-item .empty { color: rgba(230,240,250,0.5); }
