:root{
  --bg:#081526;
  --bg-accent:#123055;
  --bg-deep:#06111f;
  --panel:#10233c;
  --panel-soft:rgba(255,255,255,0.08);
  --line:rgba(255,255,255,0.12);
  --line-strong:rgba(143,211,255,0.22);
  --text:#f5f7ff;
  --muted:#b7c4db;
  --brand:#8fd3ff;
  --brand-strong:#47b4ff;
  --brand-soft:rgba(143,211,255,0.16);
  --brand-ink:#08213b;
  --glass-highlight:rgba(255,255,255,0.14);
  --danger:#ff7f7f;
  --success:#8fe3b0;
  --warning:#ffd37a;
  --shadow:0 24px 50px rgba(0,0,0,0.28);
  --shadow-soft:0 18px 38px rgba(0,0,0,0.2);
  --shadow-hover:0 30px 60px rgba(0,0,0,0.38);
  --ease-standard:cubic-bezier(.2,.8,.2,1);
}

:root[data-theme="light"]{
  --bg:#eef4fb;
  --bg-accent:#dfe8f5;
  --bg-deep:#d4e0ef;
  --panel:#ffffff;
  --panel-soft:rgba(16,35,60,0.06);
  --line:rgba(18,39,71,0.12);
  --line-strong:rgba(60,125,255,0.26);
  --text:#16233a;
  --muted:#5d6f89;
  --brand:#2f6dff;
  --brand-strong:#5a96ff;
  --brand-soft:rgba(47,109,255,0.14);
  --brand-ink:#f7fbff;
  --glass-highlight:rgba(255,255,255,0.75);
  --shadow:0 22px 44px rgba(34,63,112,0.12);
  --shadow-soft:0 16px 30px rgba(34,63,112,0.1);
  --shadow-hover:0 24px 46px rgba(34,63,112,0.16);
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

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

@keyframes fade-in{
  from{opacity:0}
  to{opacity:1}
}

@keyframes soft-float{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-4px)}
}

@keyframes shimmer{
  from{background-position:0% 50%}
  to{background-position:100% 50%}
}

@keyframes pulse-glow{
  0%,100%{box-shadow:0 0 0 0 rgba(143,211,255,0)}
  50%{box-shadow:0 0 0 8px rgba(143,211,255,0.08)}
}

@keyframes border-flow{
  0%{background-position:0% 50%}
  100%{background-position:100% 50%}
}

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

body{
  margin:0;
  min-height:100vh;
  font-family:"Trebuchet MS","Segoe UI",Tahoma,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(71,180,255,0.18), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(255,255,255,0.08), transparent 18%),
    radial-gradient(circle at bottom right, rgba(143,211,255,0.12), transparent 24%),
    linear-gradient(160deg, var(--bg) 0%, #0a1d34 52%, var(--bg-accent) 100%);
  animation:fade-in .55s var(--ease-standard);
}

:root[data-theme="light"] body{
  background:
    radial-gradient(circle at top left, rgba(47,109,255,0.12), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(255,255,255,0.8), transparent 22%),
    radial-gradient(circle at bottom right, rgba(90,150,255,0.12), transparent 24%),
    linear-gradient(160deg, var(--bg) 0%, #e6edf8 52%, var(--bg-accent) 100%);
}

a{color:var(--brand);text-decoration:none}
a,
button,
.button,
input,
select,
.badge,
.chip,
.book-cover,
tr,
.notice{
  transition:
    transform .24s var(--ease-standard),
    box-shadow .24s var(--ease-standard),
    border-color .24s var(--ease-standard),
    background-color .24s var(--ease-standard),
    opacity .24s var(--ease-standard);
}

a:hover{
  text-decoration:underline;
  opacity:.92;
}

.site-shell{
  width:min(1180px, calc(100% - 32px));
  margin:0 auto;
  padding:24px 0 40px;
  position:relative;
}

.admin-shell{
  width:calc(100% - 20px);
  max-width:none;
  margin:0 10px 0 8px;
}

.auth-shell{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
  position:relative;
  isolation:isolate;
}

.auth-shell-otp{
  padding:32px 24px;
  align-content:center;
}

body.auth-page{
  background:
    linear-gradient(180deg, rgba(7,19,33,0.86), rgba(11,27,45,0.94)),
    url('/librarymanage/assets/images/awitmo.jfif') center / cover fixed no-repeat;
}

body.auth-page::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 16% 18%, rgba(143,211,255,0.18), transparent 26%),
    radial-gradient(circle at 82% 16%, rgba(255,255,255,0.10), transparent 18%),
    radial-gradient(circle at 50% 100%, rgba(71,180,255,0.14), transparent 28%);
  z-index:0;
}

.auth-shell::before{
  content:"";
  position:absolute;
  inset:18px;
  border-radius:28px;
  border:1px solid rgba(143,211,255,0.08);
  background:linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.05);
  z-index:-1;
}

body.auth-page .auth-shell::before{
  display:none;
}

:root[data-theme="light"] body.auth-page{
  background:
    linear-gradient(180deg, rgba(244,248,253,0.84), rgba(231,239,249,0.92)),
    url('/librarymanage/assets/images/awitmo.jfif') center / cover fixed no-repeat;
}

:root[data-theme="light"] body.auth-page::before{
  background:
    radial-gradient(circle at 16% 18%, rgba(47,109,255,0.12), transparent 26%),
    radial-gradient(circle at 82% 16%, rgba(255,255,255,0.52), transparent 18%),
    radial-gradient(circle at 50% 100%, rgba(90,150,255,0.12), transparent 28%);
}

.topbar{
  position:relative;
  overflow:hidden;
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:18px;
  padding:20px 24px;
  margin-bottom:20px;
  border:1px solid var(--line);
  border-radius:22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    rgba(8,21,38,0.7);
  backdrop-filter:blur(16px);
  box-shadow:var(--shadow);
  animation:fade-up .55s var(--ease-standard);
}


.topbar::after{
  content:"";
  position:absolute;
  inset:auto -10% -70% auto;
  width:220px;
  height:220px;
  background:radial-gradient(circle, rgba(143,211,255,0.18), transparent 70%);
  pointer-events:none;
}

.topbar > div:first-child{
  min-width:0;
  display:grid;
  gap:6px;
  flex:1 1 auto;
}

.topbar h1,
.topbar p{
  margin:0;
}

.topbar h1{
  font-size:clamp(1.7rem, 2.1vw, 2.2rem);
  line-height:1.08;
  letter-spacing:-0.03em;
  max-width:20ch;
}

.topbar p{
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
  max-width:60ch;
}

.topbar-nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  flex:0 0 auto;
  align-self:center;
}

.topbar .topbar-nav a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 15px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.1);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
    rgba(8,21,38,0.46);
  color:#dce9fb;
  text-decoration:none;
  box-shadow:0 8px 16px rgba(0,0,0,0.14);
  font-weight:600;
}

.topbar .topbar-nav a:hover{
  text-decoration:none;
  transform:translateY(-1px);
  border-color:rgba(143,211,255,0.2);
  box-shadow:0 12px 20px rgba(0,0,0,0.18);
}

.topbar .topbar-nav a[href*="logout.php"]{
  border-color:rgba(255,127,127,0.2);
  background:
    linear-gradient(180deg, rgba(255,127,127,0.14), rgba(255,127,127,0.08)),
    rgba(8,21,38,0.46);
  color:#ffd7d7;
}

.brand-block{
  display:flex;
  align-items:center;
  gap:14px;
}

.brand-logo{
  width:64px;
  height:64px;
  border-radius:50%;
  object-fit:cover;
  border:1px solid rgba(255,255,255,0.14);
  box-shadow:0 10px 20px rgba(0,0,0,0.22);
  background:rgba(255,255,255,0.08);
}

.brand-copy{
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.panel,
.card{
  position:relative;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04)),
    linear-gradient(140deg, rgba(16,35,60,0.9), rgba(8,24,41,0.86));
  box-shadow:var(--shadow);
  backdrop-filter:blur(14px);
  animation:soft-scale-in .45s var(--ease-standard) both, fade-up .6s var(--ease-standard) both;
}

.panel::before,
.card::before,
.stat-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  opacity:.7;
}

.card{
  padding:24px;
}

.panel{
  padding:20px;
}

.panel:hover,
.card:hover,
.stat-card:hover{
  transform:translateY(-4px);
  border-color:var(--line-strong);
  box-shadow:var(--shadow-hover);
}

.muted{
  color:var(--muted);
}

.grid{
  display:grid;
  gap:16px;
}

.grid.cards{
  grid-template-columns:repeat(auto-fit, minmax(230px, 1fr));
}

.grid.form{
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
}

.form-span-2{
  grid-column:1 / -1;
}

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

.panel h3,
.card h2,
.card h3{
  margin-top:0;
  margin-bottom:10px;
}

.panel::after,
.card::after{
  content:"";
  position:absolute;
  inset:auto 0 0 0;
  height:2px;
  background:linear-gradient(90deg, transparent, rgba(143,211,255,0.46), transparent);
  background-size:200% 100%;
  opacity:.45;
}

.panel:hover::after,
.card:hover::after{
  animation:border-flow 1.2s linear infinite;
}

.dashboard-icon{
  --icon-image:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:54px;
  height:54px;
  border-radius:18px;
  background:linear-gradient(180deg, rgba(143,211,255,0.18), rgba(71,180,255,0.1));
  border:1px solid rgba(143,211,255,0.22);
  box-shadow:0 14px 24px rgba(0,0,0,0.2);
  flex-shrink:0;
  position:relative;
  color:transparent;
  font-size:0;
}

.dashboard-icon::before{
  content:"";
  width:24px;
  height:24px;
  display:block;
  background:linear-gradient(180deg, rgba(245,247,255,0.98), rgba(143,211,255,0.88));
  box-shadow:0 0 18px rgba(143,211,255,0.16);
  -webkit-mask-image:var(--icon-image);
  mask-image:var(--icon-image);
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
  -webkit-mask-position:center;
  mask-position:center;
  -webkit-mask-size:contain;
  mask-size:contain;
}

.icon-accounts{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M16 11c1.66 0 3-1.57 3-3.5S17.66 4 16 4s-3 1.57-3 3.5S14.34 11 16 11Zm-8 0c1.66 0 3-1.57 3-3.5S9.66 4 8 4 5 5.57 5 7.5 6.34 11 8 11Zm0 2c-2.67 0-8 1.34-8 4v1h10v-1c0-2.66-5.33-4-8-4Zm8 0c-.29 0-.62.02-.97.05 1.19.86 1.97 1.98 1.97 3.45v1h7v-1c0-2.66-5.33-4-8-4Z'/%3E%3C/svg%3E");
}

.icon-payments{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M3 6.75A2.75 2.75 0 0 1 5.75 4h12.5A2.75 2.75 0 0 1 21 6.75v10.5A2.75 2.75 0 0 1 18.25 20H5.75A2.75 2.75 0 0 1 3 17.25V6.75Zm2.75-1.25a1.25 1.25 0 0 0-1.25 1.25V8h15V6.75a1.25 1.25 0 0 0-1.25-1.25H5.75ZM4.5 10v7.25c0 .69.56 1.25 1.25 1.25h12.5c.69 0 1.25-.56 1.25-1.25V10h-15Zm2.5 4.25A.75.75 0 0 1 7.75 13h3.5a.75.75 0 0 1 0 1.5h-3.5A.75.75 0 0 1 7 14.25Z'/%3E%3C/svg%3E");
}

.icon-penalties{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 3.25c.3 0 .58.16.72.42l8.5 15A.75.75 0 0 1 20.57 20H3.43a.75.75 0 0 1-.65-1.33l8.5-15c.14-.26.42-.42.72-.42Zm0 5a.75.75 0 0 0-.75.75v4.5a.75.75 0 0 0 1.5 0V9A.75.75 0 0 0 12 8.25Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z'/%3E%3C/svg%3E");
}

.icon-feedback{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M4.75 4A2.75 2.75 0 0 0 2 6.75v7.5A2.75 2.75 0 0 0 4.75 17H6.5v3.5c0 .3.18.58.46.69.28.12.61.06.83-.14L12.84 17h6.41A2.75 2.75 0 0 0 22 14.25v-7.5A2.75 2.75 0 0 0 19.25 4H4.75Zm2.5 5.25a.75.75 0 0 1 .75-.75h8a.75.75 0 0 1 0 1.5H8a.75.75 0 0 1-.75-.75Zm0 4a.75.75 0 0 1 .75-.75h5.5a.75.75 0 0 1 0 1.5H8a.75.75 0 0 1-.75-.75Z'/%3E%3C/svg%3E");
}

.icon-books{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M5.75 3A2.75 2.75 0 0 0 3 5.75v12.5A2.75 2.75 0 0 0 5.75 21h11.5A2.75 2.75 0 0 0 20 18.25V5.75A2.75 2.75 0 0 0 17.25 3H5.75Zm0 1.5h6.5v15h-6.5c-.69 0-1.25-.56-1.25-1.25V5.75c0-.69.56-1.25 1.25-1.25Zm8 0h3.5c.69 0 1.25.56 1.25 1.25v12.5c0 .69-.56 1.25-1.25 1.25h-3.5v-15Z'/%3E%3C/svg%3E");
}

.icon-checklist{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M9 3.75A1.75 1.75 0 0 1 10.75 2h2.5A1.75 1.75 0 0 1 15 3.75V4h2.25A2.75 2.75 0 0 1 20 6.75v11.5A2.75 2.75 0 0 1 17.25 21H6.75A2.75 2.75 0 0 1 4 18.25V6.75A2.75 2.75 0 0 1 6.75 4H9v-.25ZM10.5 4v.25c0 .41.34.75.75.75h1.5a.75.75 0 0 0 .75-.75V4a.25.25 0 0 0-.25-.25h-2.5A.25.25 0 0 0 10.5 4Zm5.03 5.22a.75.75 0 1 0-1.06-1.06L10.5 12.13 9.53 11.16a.75.75 0 0 0-1.06 1.06l1.5 1.5a.75.75 0 0 0 1.06 0l4.5-4.5Zm0 5a.75.75 0 1 0-1.06-1.06L10.5 17.13l-.97-.97a.75.75 0 1 0-1.06 1.06l1.5 1.5a.75.75 0 0 0 1.06 0l4.5-4.5Z'/%3E%3C/svg%3E");
}

.icon-recent{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 3.25a8.75 8.75 0 1 0 8.54 10.67.75.75 0 0 0-1.46-.34A7.25 7.25 0 1 1 12 4.75c2.13 0 4.04.92 5.37 2.39h-1.62a.75.75 0 0 0 0 1.5H19A.75.75 0 0 0 19.75 7V3.75a.75.75 0 0 0-1.5 0v1.43A8.71 8.71 0 0 0 12 3.25Zm-.75 4.5a.75.75 0 0 1 1.5 0v3.94l2.58 1.49a.75.75 0 1 1-.75 1.3l-2.95-1.7a.75.75 0 0 1-.38-.65V7.75Z'/%3E%3C/svg%3E");
}

.icon-logout{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M9.75 3A2.75 2.75 0 0 0 7 5.75v1.5a.75.75 0 0 0 1.5 0v-1.5c0-.69.56-1.25 1.25-1.25h7.5c.69 0 1.25.56 1.25 1.25v12.5c0 .69-.56 1.25-1.25 1.25h-7.5c-.69 0-1.25-.56-1.25-1.25v-1.5a.75.75 0 0 0-1.5 0v1.5A2.75 2.75 0 0 0 9.75 21h7.5A2.75 2.75 0 0 0 20 18.25V5.75A2.75 2.75 0 0 0 17.25 3h-7.5ZM3.22 12.53l3.5 3.5a.75.75 0 1 0 1.06-1.06L5.56 12.75H14a.75.75 0 0 0 0-1.5H5.56l2.22-2.22a.75.75 0 0 0-1.06-1.06l-3.5 3.5a.75.75 0 0 0 0 1.06Z'/%3E%3C/svg%3E");
}

.icon-notes{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M6.75 3A2.75 2.75 0 0 0 4 5.75v12.5A2.75 2.75 0 0 0 6.75 21h10.5A2.75 2.75 0 0 0 20 18.25V8.56a2.75 2.75 0 0 0-.8-1.95l-2.81-2.8A2.75 2.75 0 0 0 14.44 3H6.75Zm7.5 1.56c.33 0 .65.13.88.36l2.81 2.8c.23.23.36.55.36.88V18.25c0 .69-.56 1.25-1.25 1.25H6.75c-.69 0-1.25-.56-1.25-1.25V5.75c0-.69.56-1.25 1.25-1.25h7.5Zm-6 5.19a.75.75 0 0 1 .75-.75h6a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75Zm0 4a.75.75 0 0 1 .75-.75h6a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75Z'/%3E%3C/svg%3E");
}

.icon-ledger{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M5.75 4A2.75 2.75 0 0 0 3 6.75v10.5A2.75 2.75 0 0 0 5.75 20h12.5A2.75 2.75 0 0 0 21 17.25V6.75A2.75 2.75 0 0 0 18.25 4H5.75Zm0 1.5h12.5c.69 0 1.25.56 1.25 1.25V8H4.5V6.75c0-.69.56-1.25 1.25-1.25ZM4.5 10h15v7.25c0 .69-.56 1.25-1.25 1.25H5.75c-.69 0-1.25-.56-1.25-1.25V10Zm2.5 2.25A.75.75 0 0 1 7.75 11h3a.75.75 0 0 1 0 1.5h-3A.75.75 0 0 1 7 12.25Zm0 3A.75.75 0 0 1 7.75 14h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 7 15.25Z'/%3E%3C/svg%3E");
}

.icon-edit{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M15.44 3.53a1.75 1.75 0 0 1 2.47 0l2.56 2.56a1.75 1.75 0 0 1 0 2.47l-9.9 9.9a2.75 2.75 0 0 1-1.25.71l-3.75.94a.75.75 0 0 1-.91-.91l.94-3.75a2.75 2.75 0 0 1 .71-1.25l9.9-9.9ZM16.5 4.6 7.37 13.73a1.25 1.25 0 0 0-.32.57l-.59 2.35 2.35-.59a1.25 1.25 0 0 0 .57-.32l9.13-9.13-2.01-2.01ZM4 5.75A2.75 2.75 0 0 1 6.75 3H11a.75.75 0 0 1 0 1.5H6.75c-.69 0-1.25.56-1.25 1.25v11.5c0 .69.56 1.25 1.25 1.25h11.5c.69 0 1.25-.56 1.25-1.25V13a.75.75 0 0 1 1.5 0v4.25A2.75 2.75 0 0 1 18.25 20H6.75A2.75 2.75 0 0 1 4 17.25V5.75Z'/%3E%3C/svg%3E");
}

.icon-view{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 5c4.72 0 8.77 2.86 10.53 6.95a.75.75 0 0 1 0 .6C20.77 16.14 16.72 19 12 19s-8.77-2.86-10.53-6.95a.75.75 0 0 1 0-.6C3.23 7.86 7.28 5 12 5Zm0 1.5c-3.97 0-7.43 2.29-9 5.25 1.57 2.96 5.03 5.25 9 5.25s7.43-2.29 9-5.25c-1.57-2.96-5.03-5.25-9-5.25Zm0 2.5A2.75 2.75 0 1 1 9.25 11.75 2.75 2.75 0 0 1 12 9Zm0 1.5a1.25 1.25 0 1 0 1.25 1.25A1.25 1.25 0 0 0 12 10.5Z'/%3E%3C/svg%3E");
}

.icon-add{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 4a.75.75 0 0 1 .75.75v6.5h6.5a.75.75 0 0 1 0 1.5h-6.5v6.5a.75.75 0 0 1-1.5 0v-6.5h-6.5a.75.75 0 0 1 0-1.5h6.5v-6.5A.75.75 0 0 1 12 4Z'/%3E%3C/svg%3E");
}

.icon-guide{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2.75a9.25 9.25 0 1 0 9.25 9.25A9.26 9.26 0 0 0 12 2.75Zm0 1.5A7.75 7.75 0 1 1 4.25 12 7.76 7.76 0 0 1 12 4.25Zm3.61 4.14a.75.75 0 0 1 .2.78l-1.8 5.4a.75.75 0 0 1-.47.47l-5.4 1.8a.75.75 0 0 1-.98-.98l1.8-5.4a.75.75 0 0 1 .47-.47l5.4-1.8a.75.75 0 0 1 .78.2Zm-5.16 2.7-.98 2.93 2.93-.98.98-2.93-2.93.98Z'/%3E%3C/svg%3E");
}

.icon-tools{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M14.82 3.79a4.5 4.5 0 0 0-5.69 5.69L3.47 15.15a2.25 2.25 0 1 0 3.18 3.18l5.67-5.66a4.5 4.5 0 0 0 5.69-5.69l-2.17 2.17a1.25 1.25 0 0 1-1.77 0l-.72-.72a1.25 1.25 0 0 1 0-1.77l2.17-2.17ZM4.53 16.21l5.99-5.99.43.2a3 3 0 0 0 3.46-.64l.37-.37.21.22a2.75 2.75 0 0 0 3.89 0l.37-.37a3 3 0 0 1-3.46 3.46l-.43-.2-5.99 5.99a.75.75 0 0 1-1.06 0l-1.78-1.78a.75.75 0 0 1 0-1.06Z'/%3E%3C/svg%3E");
}

.icon-upload{
  --icon-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 3.25a.75.75 0 0 1 .75.75v8.19l2.72-2.72a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l2.72 2.72V4a.75.75 0 0 1 .75-.75ZM4.75 15a.75.75 0 0 1 .75.75v2.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-2.5a.75.75 0 0 1 1.5 0v2.5A2.75 2.75 0 0 1 17.25 21H6.75A2.75 2.75 0 0 1 4 18.25v-2.5A.75.75 0 0 1 4.75 15Z'/%3E%3C/svg%3E");
}

.card-head{
  display:flex;
  align-items:flex-start;
  gap:14px;
  margin-bottom:14px;
}

.card-head > div:last-child{
  min-width:0;
}

.button,
button,
input[type="submit"]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:10px 16px;
  border:0;
  border-radius:14px;
  background:linear-gradient(135deg, var(--brand), var(--brand-strong));
  color:var(--brand-ink);
  font-weight:700;
  letter-spacing:.01em;
  cursor:pointer;
  box-shadow:0 14px 26px rgba(71,180,255,0.25);
  background-size:180% 180%;
  position:relative;
  overflow:hidden;
  text-decoration:none;
}

button.secondary,
.button.secondary{
  background:rgba(255,255,255,0.07);
  color:var(--text);
  box-shadow:0 10px 18px rgba(0,0,0,0.08);
  border:1px solid var(--line);
}

button.secondary,
.button.secondary,
button.danger,
.button.danger{
  backdrop-filter:blur(8px);
}

button.danger,
.button.danger{
  background:rgba(255,127,127,0.14);
  color:#ffd5d5;
  box-shadow:0 10px 18px rgba(0,0,0,0.08);
  border:1px solid rgba(255,127,127,0.28);
}

form{margin:0}

.button:hover,
button:hover,
input[type="submit"]:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 30px rgba(71,180,255,0.32);
  animation:shimmer 1.2s linear infinite alternate;
}

.button:disabled,
button:disabled,
input[type="submit"]:disabled,
.button[aria-disabled="true"],
button[aria-disabled="true"],
input[type="submit"][aria-disabled="true"]{
  cursor:not-allowed;
  opacity:.58;
  transform:none;
  box-shadow:none;
  animation:none;
}

.button::after,
button::after,
input[type="submit"]::after{
  content:"";
  position:absolute;
  inset:-120% auto auto -40%;
  width:40%;
  height:300%;
  transform:rotate(18deg);
  background:linear-gradient(180deg, transparent, rgba(255,255,255,0.22), transparent);
  opacity:0;
  transition:transform .5s var(--ease-standard), opacity .3s var(--ease-standard);
}

.button:hover::after,
button:hover::after,
input[type="submit"]:hover::after{
  opacity:1;
  transform:translateX(220%) rotate(18deg);
}

button.secondary:hover,
.button.secondary:hover,
button.danger:hover,
.button.danger:hover{
  box-shadow:none;
  transform:translateY(-1px);
}

label{
  display:block;
  margin-bottom:7px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
}

input,
select,
textarea{
  width:100%;
  min-height:48px;
  padding:13px 16px;
  border:1px solid rgba(255,255,255,0.12);
  border-radius:16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04)),
    rgba(255,255,255,0.03);
  color:var(--text);
  outline:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.05), 0 8px 16px rgba(0,0,0,0.06);
}

textarea{
  min-height:132px;
  resize:vertical;
  line-height:1.55;
}

select option{
  color:#111;
}

input::placeholder{
  color:#91a5c3;
}

input:focus,
select:focus,
textarea:focus{
  border-color:rgba(143,211,255,0.65);
  box-shadow:0 0 0 4px rgba(143,211,255,0.15);
  animation:pulse-glow 1.2s ease-out 1;
}

.notice{
  position:relative;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04)),
    rgba(6,17,31,0.62);
  animation:fade-up .45s var(--ease-standard);
  box-shadow:var(--shadow-soft);
  overflow:hidden;
}

.notice::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  border-radius:inherit;
  background:rgba(255,255,255,0.22);
}

.notice.success{border-color:rgba(143,227,176,0.35);color:#dcf8e6}
.notice.success::before{background:var(--success)}
.notice.warning{border-color:rgba(255,211,122,0.4);color:#fff4d4}
.notice.warning::before{background:var(--warning)}
.notice.info{border-color:rgba(125,197,255,0.42);color:#dff3ff}
.notice.info::before{background:#6ec2ff}
.notice.error{border-color:rgba(255,127,127,0.35);color:#ffe0e0}
.notice.error::before{background:var(--danger)}

.table-wrap{overflow-x:auto}

.table-wrap{
  border:1px solid rgba(255,255,255,0.08);
  border-radius:20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)),
    rgba(4,14,27,0.34);
  box-shadow:0 16px 30px rgba(0,0,0,0.16);
  overflow:hidden;
}

table{
  width:100%;
  border-collapse:collapse;
  table-layout:auto;
}

th,td{
  padding:15px 14px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:middle;
}

th{
  color:var(--muted);
  font-size:11px;
  font-weight:700;
  letter-spacing:0.08em;
  text-transform:uppercase;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025)),
    rgba(7,20,35,0.94);
  position:sticky;
  top:0;
  z-index:1;
  backdrop-filter:blur(10px);
  border-bottom-color:rgba(255,255,255,0.1);
}

tbody tr:hover{
  background:rgba(255,255,255,0.05);
  transform:none;
}

tbody tr:nth-child(even){
  background:rgba(255,255,255,0.018);
}

tbody tr:last-child td{
  border-bottom:0;
}

tbody td > .label-block + .muted{
  margin-top:4px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(255,255,255,0.07);
  border:1px solid var(--line);
  font-size:12px;
  font-weight:600;
  letter-spacing:.01em;
  color:var(--text);
  animation:fade-up .75s var(--ease-standard) both;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.05), 0 8px 16px rgba(0,0,0,0.08);
}

.badge.complaint-status-badge{
  min-width:92px;
  justify-content:center;
  padding:8px 14px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
}

.badge.complaint-status-badge .status-dot{
  width:9px;
  height:9px;
  box-shadow:none;
}

.badge.complaint-status-badge.complaint-status-new{
  background:linear-gradient(180deg, rgba(71,180,255,0.16), rgba(71,180,255,0.08));
  border-color:rgba(71,180,255,0.28);
  color:#dff2ff;
}

.badge.complaint-status-badge.complaint-status-reviewed{
  background:linear-gradient(180deg, rgba(255,211,122,0.16), rgba(255,211,122,0.08));
  border-color:rgba(255,211,122,0.3);
  color:#ffefc7;
}

.badge.complaint-status-badge.complaint-status-resolved{
  background:linear-gradient(180deg, rgba(143,227,176,0.16), rgba(143,227,176,0.08));
  border-color:rgba(143,227,176,0.3);
  color:#e4fff0;
}

.complaint-response-card{
  display:grid;
  gap:6px;
  min-width:220px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(143,211,255,0.12);
  background:linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
}

.complaint-response-card-empty{
  background:linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
  border-style:dashed;
}

.complaint-response-card strong{
  font-size:12px;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--brand);
}

.complaint-response-card p{
  margin:0;
  line-height:1.55;
}

.complaint-response-form{
  display:grid;
  gap:8px;
  min-width:240px;
}

.complaint-action-stack{
  display:grid;
  gap:10px;
  align-items:start;
}

.complaint-response-box{
  width:100%;
  min-height:86px;
  resize:vertical;
}

.complaint-response-form-actions{
  justify-content:flex-start;
  flex-wrap:wrap;
}

.status-dot.new{
  background:var(--brand);
}

.status-dot.reviewed{
  background:var(--warning);
}

.status-dot.resolved{
  background:var(--success);
}

:root[data-theme="light"] .badge.complaint-status-badge.complaint-status-new{
  background:linear-gradient(180deg, rgba(47,109,255,0.14), rgba(47,109,255,0.08));
  border-color:rgba(47,109,255,0.24);
  color:#19407d;
}

:root[data-theme="light"] .badge.complaint-status-badge.complaint-status-reviewed{
  background:linear-gradient(180deg, rgba(245,158,11,0.16), rgba(245,158,11,0.08));
  border-color:rgba(245,158,11,0.24);
  color:#7b4a05;
}

:root[data-theme="light"] .badge.complaint-status-badge.complaint-status-resolved{
  background:linear-gradient(180deg, rgba(34,197,94,0.14), rgba(34,197,94,0.08));
  border-color:rgba(34,197,94,0.24);
  color:#155b32;
}

:root[data-theme="light"] .complaint-response-card{
  background:linear-gradient(180deg, rgba(255,255,255,0.96), rgba(242,247,255,0.92));
  border-color:rgba(18,39,71,0.12);
}

.inline-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.auth-inline-actions{
  align-items:stretch;
  justify-self:start;
}

.auth-inline-actions > :first-child{
  min-width:172px;
}

.auth-back-link{
  margin-top:4px;
  justify-self:start;
  align-self:start;
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:auto;
  max-width:max-content;
  padding:0;
  border:0;
  background:none;
  color:var(--muted);
  font:inherit;
  font-size:12px;
  font-weight:500;
  letter-spacing:.01em;
  text-decoration:none;
  box-shadow:none;
  min-height:auto;
  opacity:.8;
}

.auth-back-link:hover{
  color:var(--text);
  transform:none;
  box-shadow:none;
  animation:none;
  text-decoration:underline;
  opacity:.96;
}

.auth-back-link::after{
  display:none;
}

.auth-back-link span[aria-hidden="true"]{
  font-size:12px;
  line-height:1;
  opacity:0;
  width:0;
  overflow:hidden;
  position:relative;
}

.auth-back-link span[aria-hidden="true"]::before{
  content:"\2190";
  opacity:.72;
}

.auth-form-otp .auth-back-link,
:root[data-theme="light"] .auth-form-otp .auth-back-link,
:root:not([data-theme="light"]) .auth-form-otp .auth-back-link{
  padding:0;
  min-height:auto;
  border:0;
  background:none;
  background-image:none;
  color:var(--muted);
  box-shadow:none;
  flex:0 0 auto;
}

.auth-form-otp .auth-back-link:hover,
:root[data-theme="light"] .auth-form-otp .auth-back-link:hover,
:root:not([data-theme="light"]) .auth-form-otp .auth-back-link:hover{
  color:var(--text);
  background:none;
  box-shadow:none;
  transform:none;
}

.inline-form{
  display:inline;
}

.empty-state{
  position:relative;
  padding:18px 18px 18px 20px;
  border-radius:18px;
  border:1px dashed rgba(255,255,255,0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)),
    rgba(255,255,255,0.018);
  color:var(--muted);
  line-height:1.55;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
}

.empty-state::before{
  content:"";
  position:absolute;
  left:0;
  top:14px;
  bottom:14px;
  width:3px;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(143,211,255,0.7), rgba(143,211,255,0.16));
}

.empty-state strong{
  color:var(--text);
  font-weight:700;
}

.empty-state a{
  color:inherit;
  text-decoration-color:rgba(143,211,255,0.5);
  text-underline-offset:3px;
}

.empty-state .label-block + .muted{
  display:block;
  margin-top:6px;
}

.empty-state .chip,
.empty-state .code-pill{
  margin-bottom:8px;
}

.toolbar{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  align-items:end;
}

.toolbar .grow{
  flex:1 1 240px;
}

.stat-grid{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card{
  position:relative;
  overflow:hidden;
  isolation:isolate;
  display:grid;
  align-content:start;
  gap:8px;
  min-height:152px;
  padding:20px;
  border-radius:20px;
  border:1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(143,211,255,0.14), transparent 32%),
    linear-gradient(180deg, rgba(15,35,58,0.95), rgba(8,24,41,0.9));
  animation:fade-up .65s var(--ease-standard) both;
}

.stat-card::after{
  content:"";
  position:absolute;
  inset:auto auto -20px -20px;
  width:72px;
  height:72px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(143,211,255,0.14), transparent 72%);
}

.stat-card > *{
  position:relative;
  z-index:1;
}

.stat-card span,
.stat-card .muted{
  font-size:14px;
  letter-spacing:0.01em;
}

.stat-card strong{
  display:block;
  max-width:100%;
  font-size:clamp(1.85rem, 2.4vw, 2.55rem);
  line-height:1.05;
  letter-spacing:-0.03em;
  margin-bottom:2px;
  text-wrap:balance;
  animation:soft-float 3.6s ease-in-out infinite;
}

.stat-card .code-pill,
.stat-card .chip{
  width:max-content;
  max-width:100%;
}

.stat-card .muted{
  line-height:1.45;
}

.dashboard-chart{
  padding:24px;
  border-radius:24px;
  border:1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(143,211,255,0.1), transparent 28%),
    linear-gradient(180deg, rgba(15,35,58,0.92), rgba(8,24,41,0.88));
  box-shadow:var(--shadow-soft);
}

.analytics-chart-layout{
  display:grid;
  grid-template-columns:minmax(0, 1.45fr) minmax(240px, 0.75fr);
  gap:22px;
  align-items:start;
}

.analytics-weekly-chart{
  position:relative;
  min-height:470px;
  border-radius:24px;
  border:1px solid rgba(143,211,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)),
    rgba(8,19,34,0.44);
  padding:18px 18px 16px;
  overflow:hidden;
}

.analytics-weekly-summary{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-bottom:16px;
}

.analytics-month-filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.analytics-month-filters-below{
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid rgba(143,211,255,0.08);
}

.analytics-month-filter{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid rgba(143,211,255,0.12);
  background:rgba(8,19,34,0.5);
  color:#b9d7ef;
  font-size:12px;
  font-weight:700;
  text-decoration:none;
  transition:background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.analytics-month-filter:hover{
  background:rgba(14,31,52,0.72);
  border-color:rgba(143,211,255,0.22);
  color:#e7f5ff;
  transform:translateY(-1px);
}

.analytics-month-filter.is-active{
  background:linear-gradient(180deg, rgba(150,214,255,0.24), rgba(78,174,241,0.18));
  border-color:rgba(143,211,255,0.34);
  color:#f3fbff;
  box-shadow:0 10px 20px rgba(78,174,241,0.12);
}

.analytics-weekly-insight{
  margin:0 0 16px;
  padding:12px 15px;
  border-radius:16px;
  border:1px solid rgba(143,211,255,0.08);
  background:linear-gradient(180deg, rgba(143,211,255,0.09), rgba(143,211,255,0.03));
  color:#d8eaff;
  font-size:13px;
  line-height:1.45;
}

.analytics-weekly-summary-item{
  padding:15px 16px;
  border-radius:20px;
  border:1px solid rgba(143,211,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)),
    rgba(8,19,34,0.42);
}

.analytics-weekly-summary-item strong{
  display:block;
  margin:8px 0 6px;
  font-size:22px;
  line-height:1.05;
  letter-spacing:-0.03em;
}

.analytics-weekly-axis{
  position:absolute;
  inset:16px auto 42px 0;
  width:36px;
  display:grid;
  grid-template-rows:repeat(5, 1fr);
  align-items:end;
  z-index:2;
  padding-left:0;
}

.analytics-weekly-axis span{
  font-size:11px;
  color:var(--muted);
  transform:translateY(50%);
}

.analytics-weekly-plot{
  position:relative;
  margin-left:38px;
  min-height:426px;
}

.analytics-weekly-grid-lines{
  position:absolute;
  inset:0 0 38px 0;
  display:grid;
  grid-template-rows:repeat(5, 1fr);
  z-index:1;
  pointer-events:none;
}

.analytics-weekly-grid-lines span{
  border-top:1px solid rgba(143,211,255,0.045);
}

.analytics-weekly-grid{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
  align-items:end;
  min-height:426px;
}

.analytics-week-col{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  min-width:0;
}

.analytics-week-bar-wrap{
  width:100%;
  max-width:78px;
  min-height:366px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  position:relative;
}

.analytics-week-badge{
  position:absolute;
  top:8px;
  left:50%;
  transform:translateX(-50%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 9px;
  border-radius:999px;
  background:rgba(97,184,255,0.14);
  border:1px solid rgba(97,184,255,0.24);
  color:#dff3ff;
  font-size:10px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.analytics-week-col.is-peak .analytics-week-badge{
  top:-8px;
}

.analytics-week-bar{
  width:100%;
  max-width:56px;
  min-height:18px;
  height:18px;
  border-radius:18px 18px 10px 10px;
  background:linear-gradient(180deg, #9fd5ff, #4eaef1);
  box-shadow:0 14px 26px rgba(78,174,241,0.18);
  transition:
    height .85s cubic-bezier(.22, 1, .36, 1),
    opacity .5s var(--ease-standard),
    transform .85s cubic-bezier(.22, 1, .36, 1);
  opacity:.28;
  position:relative;
}

.analytics-week-candle{
  --candle-wick-bottom:0px;
  --candle-wick-height:18px;
  --candle-body-bottom:0px;
  --candle-body-height:18px;
  position:relative;
  width:100%;
  height:100%;
  transition:opacity .45s var(--ease-standard), transform .45s var(--ease-standard);
}

.analytics-week-candle-wick{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:var(--candle-wick-bottom);
  height:var(--candle-wick-height);
  width:3px;
  border-radius:999px;
  background:rgba(159,213,255,0.82);
  box-shadow:0 0 0 1px rgba(159,213,255,0.08);
  transform-origin:center bottom;
  transition:opacity .45s var(--ease-standard), transform .55s var(--ease-standard);
}

.analytics-week-candle-body{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:var(--candle-body-bottom);
  height:var(--candle-body-height);
  width:44px;
  border-radius:14px;
  background:linear-gradient(180deg, #9fd5ff, #4eaef1);
  border:1px solid rgba(194,231,255,0.22);
  box-shadow:0 16px 28px rgba(78,174,241,0.2);
  transform-origin:center bottom;
  transition:opacity .45s var(--ease-standard), transform .55s var(--ease-standard);
}

.analytics-week-range{
  font-size:11px;
  text-align:center;
  color:var(--muted);
  line-height:1.3;
}

.analytics-week-share{
  font-size:11px;
  line-height:1.2;
  color:#9ecfff;
  font-weight:700;
  text-align:center;
}

.analytics-week-bar-value{
  position:absolute;
  inset:auto 50% calc(100% + 10px) auto;
  transform:translateX(50%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  min-height:20px;
  padding:2px 7px;
  border-radius:999px;
  background:rgba(9,21,37,0.92);
  border:1px solid rgba(143,211,255,0.1);
  box-shadow:0 10px 18px rgba(0,0,0,0.18);
  font-size:10px;
  font-weight:800;
  color:var(--text);
  transition:opacity .45s var(--ease-standard), transform .45s var(--ease-standard);
}

.analytics-week-bar.is-empty .analytics-week-bar-value{
  min-width:auto;
  padding:5px 9px;
  background:rgba(9,25,43,0.92);
  border-color:rgba(143,211,255,0.14);
  color:#9fb6d6;
  font-size:10px;
  font-weight:700;
  letter-spacing:0;
  text-transform:none;
}

.analytics-week-bar.is-empty{
  background:linear-gradient(180deg, rgba(143,211,255,0.24), rgba(143,211,255,0.14));
  border:1px dashed rgba(143,211,255,0.2);
  box-shadow:none;
}

.analytics-week-candle.is-empty .analytics-week-candle-body{
  height:18px;
  background:linear-gradient(180deg, rgba(143,211,255,0.24), rgba(143,211,255,0.14));
  border:1px dashed rgba(143,211,255,0.2);
  box-shadow:none;
}

.analytics-week-candle.is-empty .analytics-week-candle-wick{
  background:rgba(143,211,255,0.18);
}

.analytics-week-candle.is-empty .analytics-week-bar-value{
  min-width:auto;
  padding:5px 9px;
  background:rgba(9,25,43,0.92);
  border-color:rgba(143,211,255,0.14);
  color:#9fb6d6;
  font-size:10px;
  font-weight:700;
  letter-spacing:0;
  text-transform:none;
}

.analytics-week-candle.is-up .analytics-week-candle-body{
  background:linear-gradient(180deg, #bfeeff, #63beff);
}

.analytics-week-candle.is-down .analytics-week-candle-body{
  background:linear-gradient(180deg, #ffd1b3, #ff8a5d);
  border-color:rgba(255,174,138,0.26);
  box-shadow:0 16px 28px rgba(255,138,93,0.16);
}

.analytics-week-candle.is-down .analytics-week-candle-wick{
  background:rgba(255,196,168,0.82);
}

.analytics-week-candle.is-flat .analytics-week-candle-body{
  background:linear-gradient(180deg, #d6e7f8, #98b4cf);
  border-color:rgba(214,231,248,0.24);
  box-shadow:0 16px 28px rgba(152,180,207,0.14);
}

.analytics-week-col.is-peak .analytics-week-bar{
  background:linear-gradient(180deg, #c2e7ff, #61b8ff);
  box-shadow:0 18px 32px rgba(97,184,255,0.28);
}

.analytics-week-col.is-peak .analytics-week-candle-body{
  background:linear-gradient(180deg, #dff3ff, #6ac2ff);
  box-shadow:0 18px 32px rgba(97,184,255,0.24);
}

.analytics-week-col.is-peak .analytics-week-bar-value{
  background:#dff3ff;
  color:#10304f;
  border-color:rgba(97,184,255,0.24);
}

.analytics-week-col.is-peak .analytics-week-share{
  color:#dff3ff;
}

.analytics-donut-panel{
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:16px;
  border-radius:22px;
  border:1px solid rgba(143,211,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015)),
    rgba(8,19,34,0.48);
}

.analytics-donut-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px 0 2px;
}

.analytics-donut{
  --donut-segment-1: 0%;
  --donut-segment-1-end: 25%;
  --donut-segment-2: 25%;
  --donut-segment-2-end: 50%;
  --donut-segment-3: 50%;
  --donut-segment-3-end: 75%;
  --donut-segment-4: 75%;
  --donut-segment-4-end: 100%;
  width:188px;
  height:188px;
  border-radius:50%;
  background:
    radial-gradient(circle at center, rgba(9,21,37,0.98) 0 42%, transparent 43%),
    conic-gradient(
      from -90deg,
      #67c6ff var(--donut-segment-1) var(--donut-segment-1-end),
      #9b8cff var(--donut-segment-2) var(--donut-segment-2-end),
      #4ade80 var(--donut-segment-3) var(--donut-segment-3-end),
      rgba(143,211,255,0.18) var(--donut-segment-4) var(--donut-segment-4-end)
    );
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 22px 36px rgba(0,0,0,0.18);
  position:relative;
}

.analytics-donut-center{
  width:110px;
  height:110px;
  border-radius:50%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  background:
    linear-gradient(180deg, rgba(13,30,51,0.98), rgba(8,20,35,0.96));
  border:1px solid rgba(143,211,255,0.08);
  text-align:center;
  gap:4px;
  padding:12px;
}

.analytics-donut-center strong{
  display:block;
  max-width:100%;
  font-size:13px;
  line-height:1.2;
  letter-spacing:-0.03em;
  white-space:normal;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
}

.analytics-donut-center span{
  margin-top:0;
  font-size:11px;
  line-height:1.2;
  color:var(--muted);
}

.analytics-donut-center-label{
  margin:0;
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#9ecfff;
}

.analytics-donut-legend{
  display:grid;
  gap:12px;
}

.analytics-donut-legend-item{
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid rgba(143,211,255,0.08);
  background:rgba(255,255,255,0.02);
  min-height:68px;
}

.analytics-donut-legend-item.is-muted{
  border-color:rgba(143,211,255,0.05);
  background:rgba(255,255,255,0.015);
}

.analytics-donut-legend-item strong{
  display:block;
  max-width:100%;
  margin-bottom:4px;
  line-height:1.3;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.analytics-donut-legend-copy{
  min-width:0;
  display:grid;
  gap:2px;
}

.analytics-donut-insight{
  margin:0;
  padding:11px 14px;
  border-radius:16px;
  border:1px solid rgba(143,211,255,0.08);
  background:linear-gradient(180deg, rgba(143,211,255,0.08), rgba(143,211,255,0.025));
  color:#d8eaff;
  font-size:13px;
  line-height:1.45;
}

.analytics-donut-swatch{
  width:12px;
  height:12px;
  margin-top:5px;
  border-radius:50%;
  flex:0 0 auto;
}

.analytics-donut-swatch-book-1{
  background:#67c6ff;
  box-shadow:0 0 0 4px rgba(103,198,255,0.14);
}

.analytics-donut-swatch-book-2{
  background:#9b8cff;
  box-shadow:0 0 0 4px rgba(155,140,255,0.14);
}

.analytics-donut-swatch-book-3{
  background:#4ade80;
  box-shadow:0 0 0 4px rgba(74,222,128,0.14);
}

.analytics-donut-swatch-others{
  background:rgba(143,211,255,0.3);
  box-shadow:0 0 0 4px rgba(143,211,255,0.08);
}

.analytics-summary-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(210px, 1fr));
  gap:18px;
  margin-bottom:20px;
}

.analytics-summary-card{
  position:relative;
  overflow:hidden;
  display:grid;
  align-content:start;
  gap:8px;
  min-height:172px;
  padding:20px;
  border-radius:24px;
  border:1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(12,31,52,0.98), rgba(7,21,37,0.94)),
    rgba(10,25,43,0.92);
  box-shadow:var(--shadow-soft);
}

.analytics-summary-card::after{
  content:"";
  position:absolute;
  inset:auto -18px -24px auto;
  width:88px;
  height:88px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(143,211,255,0.16), transparent 70%);
}

.analytics-summary-card strong,
.analytics-summary-card span{
  position:relative;
  z-index:1;
}

.analytics-summary-card strong{
  display:block;
  margin:6px 0 8px;
  font-size:clamp(1.7rem, 2.3vw, 2.3rem);
  line-height:1.05;
  letter-spacing:-0.03em;
}

.analytics-summary-card-primary{
  background:
    radial-gradient(circle at top right, rgba(143,211,255,0.22), transparent 34%),
    linear-gradient(180deg, rgba(19,72,121,0.98), rgba(14,42,75,0.95));
}

.analytics-summary-label{
  display:block;
  font-size:12px;
  font-weight:700;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--muted);
}

.analytics-summary-meta{
  display:block;
  font-size:13px;
  line-height:1.45;
  color:var(--muted);
}

.analytics-summary-tone-good{
  color:#86efac;
}

.analytics-summary-tone-warning{
  color:#fdba74;
}

.analytics-summary-tone-neutral{
  color:var(--muted);
}

.analytics-print-head{
  align-items:flex-start;
  gap:16px;
}

.analytics-print-actions{
  flex-wrap:nowrap;
  align-items:center;
}

.analytics-year-filter{
  margin:0;
}

.analytics-year-filter .ui-select-shell{
  min-width:136px;
}

.analytics-print-note{
  display:none;
}

.analytics-print-modal{
  position:fixed;
  inset:0;
  background:
    radial-gradient(circle at top left, rgba(103, 198, 255, 0.06), transparent 24%),
    radial-gradient(circle at bottom right, rgba(103, 198, 255, 0.04), transparent 28%),
    linear-gradient(180deg, rgba(11, 26, 45, 0.98), rgba(7, 18, 32, 0.98)),
    rgba(7, 18, 32, 0.98);
  isolation:isolate;
}

.analytics-print-modal .desk-modal-backdrop{
  background:
    radial-gradient(circle at top left, rgba(103, 198, 255, 0.05), transparent 22%),
    linear-gradient(180deg, rgba(9, 21, 37, 0.98), rgba(7, 18, 32, 0.99)),
    rgba(7, 18, 32, 0.99) !important;
  backdrop-filter:blur(10px) saturate(0.7) brightness(0.4);
}

.analytics-print-modal-dialog{
  width:min(1120px, calc(100vw - 32px));
  max-height:min(88vh, 980px);
  padding:20px;
  overflow:hidden;
  background:
    radial-gradient(circle at top right, rgba(103,198,255,0.08), transparent 18%),
    linear-gradient(180deg, rgba(11,26,45,0.98), rgba(7,18,32,0.97)),
    rgba(7,18,32,0.97);
  border:1px solid rgba(143,211,255,0.09);
  box-shadow:0 28px 50px rgba(0,0,0,0.32);
}

.analytics-print-modal-head{
  align-items:flex-start;
  gap:16px;
}

.analytics-print-preview-frame{
  padding:16px;
  border-radius:24px;
  border:1px solid rgba(143,211,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)),
    rgba(8,19,34,0.52);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 16px 32px rgba(0,0,0,0.18);
  overflow:auto;
}

.analytics-print-preview-sheet{
  width:min(980px, 100%);
  margin:0 auto;
  padding:22px;
  border-radius:22px;
  border:1px solid #d8dee8;
  background:#fff;
  color:#162435;
  box-shadow:0 22px 36px rgba(0,0,0,0.12);
}

.analytics-print-report-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:0 0 18px;
  margin:0 0 18px;
  border-bottom:1px solid #d8dee8;
}

.analytics-print-report-kicker{
  margin:0 0 6px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#5d6f85;
}

.analytics-print-report-title{
  margin:0;
  font-size:28px;
  line-height:1.1;
  letter-spacing:-0.03em;
  color:#162435;
}

.analytics-print-report-meta{
  display:grid;
  gap:6px;
  justify-items:end;
  font-size:13px;
  line-height:1.45;
  color:#4a5b70;
}

.analytics-print-preview-sheet .panel,
.analytics-print-preview-sheet .card,
.analytics-print-preview-sheet .dashboard-chart,
.analytics-print-preview-sheet .analytics-summary-card,
.analytics-print-preview-sheet .analytics-ranking-item,
.analytics-print-preview-sheet .analytics-leader-item,
.analytics-print-preview-sheet .analytics-breakdown-item,
.analytics-print-preview-sheet .analytics-weekly-chart,
.analytics-print-preview-sheet .analytics-donut-panel,
.analytics-print-preview-sheet .analytics-weekly-summary-item{
  background:#fff !important;
  color:#162435 !important;
  box-shadow:none !important;
  border:1px solid #d8dee8 !important;
}

.analytics-print-preview-sheet .analytics-print-actions{
  display:none !important;
}

.analytics-print-preview-sheet .muted,
.analytics-print-preview-sheet .analytics-summary-meta,
.analytics-print-preview-sheet .analytics-section-note,
.analytics-print-preview-sheet .chart-label,
.analytics-print-preview-sheet .analytics-week-range,
.analytics-print-preview-sheet .analytics-week-share,
.analytics-print-preview-sheet .analytics-donut-center span{
  color:#627489 !important;
}

.analytics-print-preview-sheet .analytics-summary-label,
.analytics-print-preview-sheet .analytics-donut-center-label{
  color:#607286 !important;
}

.analytics-print-preview-sheet .code-pill,
.analytics-print-preview-sheet .badge{
  background:#f3f6fa !important;
  border:1px solid #d8dee8 !important;
  color:#243547 !important;
}

.analytics-print-preview-sheet .analytics-donut-insight{
  background:#f7fafc !important;
  border:1px solid #d8dee8 !important;
  color:#243547 !important;
}

.analytics-print-preview-sheet .analytics-month-filter{
  background:#f8fafc !important;
  border:1px solid #d8dee8 !important;
  color:#33465b !important;
}

.analytics-print-preview-sheet .analytics-month-filter.is-active{
  background:#eaf4ff !important;
  border-color:#b6d7f3 !important;
  color:#18476f !important;
}

.analytics-print-preview-sheet .analytics-weekly-grid-lines span{
  border-top-color:#e8edf3 !important;
}

.analytics-print-preview-sheet .analytics-ranking-meter{
  background:#edf2f7 !important;
}

.analytics-print-preview-sheet .analytics-breakdown-summary{
  background:#fbfcfd;
}

.analytics-layout{
  display:grid;
  grid-template-columns:minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap:20px;
}

.analytics-panel{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.analytics-section-head{
  align-items:flex-start;
}

.analytics-section-note{
  margin:-8px 0 0;
  font-size:12px;
  line-height:1.45;
  color:var(--muted);
}

.analytics-ranking-list,
.analytics-leader-list,
.analytics-breakdown-list{
  display:grid;
  gap:14px;
}

.analytics-ranking-item,
.analytics-leader-item{
  display:grid;
  gap:12px;
  align-items:center;
  border-radius:20px;
  border:1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)),
    rgba(8,19,34,0.52);
  padding:16px 18px;
  box-shadow:0 10px 18px rgba(0,0,0,0.1);
}

.analytics-ranking-item{
  grid-template-columns:minmax(0, 1.2fr) minmax(150px, .9fr) auto;
  gap:16px;
}

.analytics-ranking-item.is-top{
  border-color:rgba(143,211,255,0.18);
  background:
    linear-gradient(180deg, rgba(143,211,255,0.08), rgba(143,211,255,0.025)),
    rgba(8,19,34,0.56);
  box-shadow:0 14px 26px rgba(0,0,0,0.18);
}

.analytics-ranking-copy{
  display:flex;
  align-items:flex-start;
  gap:14px;
  min-width:0;
}

.analytics-ranking-copy strong,
.analytics-leader-item strong{
  display:block;
  line-height:1.25;
}

.analytics-ranking-text{
  min-width:0;
  display:grid;
  gap:4px;
}

.analytics-ranking-meta{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.analytics-ranking-rank{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(143,211,255,0.18);
  background:rgba(143,211,255,0.08);
  font-size:12px;
  font-weight:700;
  color:var(--text);
  flex:0 0 auto;
}

.analytics-ranking-item.is-top .analytics-ranking-rank{
  border-color:rgba(143,211,255,0.28);
  background:rgba(143,211,255,0.16);
  color:#e8f6ff;
}

.analytics-ranking-meter{
  position:relative;
  height:10px;
  border-radius:999px;
  background:rgba(143,211,255,0.08);
  overflow:hidden;
  align-self:center;
}

.analytics-ranking-fill{
  position:absolute;
  inset:0 auto 0 0;
  border-radius:999px;
  background:linear-gradient(90deg, var(--brand), var(--brand-strong));
  box-shadow:0 10px 16px rgba(71,180,255,0.16);
}

.analytics-ranking-item.is-top .analytics-ranking-fill{
  box-shadow:0 12px 18px rgba(71,180,255,0.24);
}

.analytics-leader-item{
  grid-template-columns:minmax(0, 1fr) auto;
}

.analytics-leader-meta{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.analytics-breakdown-item{
  border-radius:20px;
  border:1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.012)),
    rgba(8,19,34,0.4);
  overflow:hidden;
  box-shadow:0 10px 18px rgba(0,0,0,0.08);
}

.analytics-breakdown-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  list-style:none;
  cursor:pointer;
  padding:17px 18px;
}

.analytics-breakdown-summary::-webkit-details-marker{
  display:none;
}

.analytics-breakdown-item[open] .analytics-breakdown-summary{
  border-bottom:1px solid rgba(143,211,255,0.08);
}

.analytics-breakdown-item .table-wrap{
  margin:14px;
}

.chart-label{
  font-size:12px;
  color:var(--muted);
  text-align:center;
}

.activity-feed{
  display:grid;
  gap:16px;
}

.activity-item{
  padding:16px 18px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.025);
  box-shadow:var(--shadow-soft);
}

.activity-item-link{
  display:block;
  color:inherit;
  text-decoration:none;
  transition:transform .2s var(--ease-standard), border-color .2s var(--ease-standard), background .2s var(--ease-standard), box-shadow .2s var(--ease-standard);
}

.activity-item-link:hover,
.activity-item-link:focus-visible{
  text-decoration:none;
  transform:translateY(-1px);
  border-color:rgba(143,211,255,0.2);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025)),
    rgba(255,255,255,0.035);
  box-shadow:0 16px 28px rgba(0,0,0,0.16);
}

.activity-item-link.is-unread{
  border-color:rgba(143,211,255,0.18);
}

.activity-item strong{
  display:block;
  margin-bottom:5px;
}

.activity-item .meta{
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

.member-notification-card{
  position:relative;
  display:grid;
  gap:10px;
  overflow:hidden;
}

.member-notification-card::before{
  content:"";
  position:absolute;
  inset:14px auto 14px 0;
  width:3px;
  border-radius:999px;
  background:transparent;
  opacity:0;
  transition:opacity .18s ease, background .18s ease;
}

.member-notification-card.is-unread::before{
  opacity:1;
}

.member-notification-card--info.is-unread::before{
  background:linear-gradient(180deg, rgba(126,210,255,0.96), rgba(74,157,255,0.9));
}

.member-notification-card--warning.is-unread::before{
  background:linear-gradient(180deg, rgba(255,214,102,0.96), rgba(255,167,38,0.9));
}

.member-notification-card--critical.is-unread::before{
  background:linear-gradient(180deg, rgba(255,142,142,0.96), rgba(255,97,97,0.9));
}

.member-notification-card-head,
.member-notification-card-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.member-notification-pill{
  min-height:28px;
  padding:5px 10px;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:10px;
  font-weight:800;
}

.member-notification-time{
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}

.member-notification-card-title{
  display:flex !important;
  align-items:flex-start;
  gap:10px;
  margin:0 !important;
  line-height:1.35;
}

.member-notification-card-title-copy{
  flex:1 1 auto;
  min-width:0;
}

.member-notification-state-chip{
  margin-left:auto;
}

.member-notification-card-copy{
  margin:0;
  font-size:14px !important;
  line-height:1.6 !important;
}

.member-notification-link-cta{
  color:#9ad6ff;
  font-size:12px;
  font-weight:700;
  letter-spacing:.01em;
}

.member-notification-card.is-unread{
  border-color:rgba(143,211,255,0.22);
  box-shadow:0 18px 30px rgba(0,0,0,0.18);
}

.member-notification-card--warning{
  background:
    linear-gradient(180deg, rgba(255,196,87,0.06), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.025);
}

.member-notification-card--critical{
  background:
    linear-gradient(180deg, rgba(255,124,124,0.07), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.025);
}

.status-dot{
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:50%;
  margin-right:0;
  vertical-align:middle;
  box-shadow:0 0 0 4px rgba(255,255,255,0.04);
}

.status-dot.pending,
.status-dot.due,
.status-dot.return_requested{
  background:var(--warning);
}

.status-dot.waiting_stock{
  background:#f59e0b;
}

.status-dot.approved,
.status-dot.paid,
.status-dot.returned{
  background:var(--success);
}

.status-dot.rejected,
.status-dot.unpaid,
.status-dot.overdue{
  background:var(--danger);
}

.status-dot.borrowed{
  background:var(--brand);
}

.status-dot.idle{
  background:#8ea4c4;
}

.review-state{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  font-size:0.84rem;
  font-weight:600;
  line-height:1;
  border:1px solid rgba(255,255,255,0.1);
  background:rgba(255,255,255,0.05);
  color:var(--muted);
}

.code-pill{
  display:inline-flex;
  align-items:center;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.1);
  font-size:12px;
  color:var(--muted);
}

.book-media{
  display:flex;
  align-items:center;
  gap:12px;
}

.book-cover{
  width:52px;
  height:68px;
  border-radius:12px;
  object-fit:cover;
  border:1px solid var(--line);
  background:rgba(255,255,255,0.06);
  box-shadow:0 10px 18px rgba(0,0,0,0.18);
}

.book-cover:hover{
  transform:scale(1.06);
}

.book-cover.placeholder{
  display:grid;
  place-items:center;
  color:var(--muted);
  font-size:12px;
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(255,255,255,0.08);
  border:1px solid var(--line);
  color:var(--muted);
  font-size:13px;
  animation:fade-up .8s var(--ease-standard) both;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.05);
}

.topbar-nav a,
.inline-actions a{
  position:relative;
}

.topbar-nav a::after,
.inline-actions a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-2px;
  width:100%;
  height:1px;
  background:currentColor;
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .24s var(--ease-standard);
}

.topbar .topbar-nav a::after{
  display:none;
}

.topbar-nav a:hover::after,
.inline-actions a:hover::after{
  transform:scaleX(1);
}

.split{
  display:grid;
  gap:18px;
  grid-template-columns:2fr 1fr;
}

.pagination{
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  margin-top:18px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,0.08);
}

.pagination .current{
  color:var(--muted);
  font-size:14px;
}

.footer-note{
  margin-top:18px;
  color:var(--muted);
  font-size:14px;
}

.otp-resend-status{
  min-height:18px;
  margin-top:2px;
  justify-self:start;
  align-self:start;
  color:rgba(183,196,219,0.88);
  font-size:12px;
  line-height:1.45;
}

.otp-resend-status.is-active{
  color:#d9e5f7;
}

.theme-toggle{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:46px;
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:999px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
    rgba(8,21,38,0.84);
  color:var(--text);
  box-shadow:var(--shadow-soft);
  backdrop-filter:blur(14px);
  cursor:pointer;
  flex:0 0 auto;
}

.theme-toggle:hover{
  transform:translateY(-2px);
  border-color:var(--line-strong);
  box-shadow:var(--shadow);
}

body > .theme-toggle{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:9999;
}

body.auth-page > .theme-toggle{
  right:28px;
  top:24px;
  bottom:auto;
}

.topbar-nav .theme-toggle{
  min-height:38px;
  padding:6px 10px 6px 8px;
  gap:6px;
  border-radius:999px;
  box-shadow:none;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03)),
    rgba(8,21,38,0.56);
  transition:transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.theme-toggle-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:40px;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:linear-gradient(135deg, var(--brand), var(--brand-strong));
  color:var(--brand-ink);
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  transition:transform .24s ease, background .24s ease, color .24s ease, box-shadow .24s ease;
}

.theme-toggle-text{
  font-size:13px;
  font-weight:700;
  letter-spacing:.02em;
  transition:opacity .2s ease, transform .2s ease, color .2s ease;
}

.topbar-nav .theme-toggle-icon{
  min-width:34px;
  min-height:28px;
  padding:0 4px;
  border-radius:999px;
}

.theme-toggle-icon svg{
  width:15px;
  height:15px;
  display:block;
  transition:transform .24s ease, opacity .24s ease;
}

.topbar-nav .theme-toggle-text{
  font-size:12px;
  font-weight:800;
  letter-spacing:.01em;
  min-width:36px;
  text-align:center;
}

.topbar-nav .theme-toggle[aria-pressed="true"]{
  background:
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(245,249,255,0.88)),
    rgba(255,255,255,0.92);
}

.topbar-nav .theme-toggle[aria-pressed="true"] .theme-toggle-icon{
  background:linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08));
  color:#dbe8ff;
  box-shadow:0 2px 6px rgba(0,0,0,0.12);
  transform:translateX(0);
}

.topbar-nav .theme-toggle[aria-pressed="false"] .theme-toggle-icon{
  background:linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  color:#dbe8ff;
  box-shadow:0 2px 6px rgba(0,0,0,0.12);
  transform:translateX(0);
}

.topbar-nav .theme-toggle:hover{
  transform:translateY(-1px);
}

.topbar-nav .theme-toggle:hover .theme-toggle-icon svg{
  transform:scale(1.08);
}

.topbar-nav .theme-toggle:focus-visible{
  outline:none;
  box-shadow:0 0 0 4px rgba(71,180,255,0.12);
}

.topbar-nav .theme-toggle[aria-pressed="true"] .theme-toggle-icon svg{
  transform:rotate(8deg);
}

.topbar-nav .theme-toggle[aria-pressed="false"] .theme-toggle-icon svg{
  transform:rotate(-7deg);
}

:root[data-theme="light"] .theme-toggle{
  background:
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(245,249,255,0.88)),
    rgba(255,255,255,0.9);
  color:var(--text);
}

:root[data-theme="light"] .topbar-nav .theme-toggle{
  border-color:rgba(47,109,255,0.12);
  box-shadow:0 8px 18px rgba(34,63,112,0.05);
}

:root[data-theme="light"] .topbar h1{
  color:#162f4d;
}

:root[data-theme="light"] .topbar .topbar-nav a{
  border-color:rgba(47,109,255,0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,247,255,0.95)),
    rgba(255,255,255,0.98);
  color:#274469;
  box-shadow:0 10px 18px rgba(34,63,112,0.07);
}

:root[data-theme="light"] .topbar .topbar-nav a:hover{
  border-color:rgba(47,109,255,0.22);
  background:
    linear-gradient(180deg, rgba(255,255,255,1), rgba(237,244,255,0.98)),
    rgba(255,255,255,0.99);
  box-shadow:0 12px 20px rgba(34,63,112,0.1);
}

:root[data-theme="light"] .topbar .topbar-nav a[href*="logout.php"]{
  border-color:rgba(180,74,74,0.2);
  background:
    linear-gradient(180deg, rgba(255,247,247,0.99), rgba(255,237,237,0.95)),
    rgba(255,255,255,0.98);
  color:#7e3232;
}

:root[data-theme="light"] .topbar-nav .theme-toggle:hover{
  border-color:rgba(47,109,255,0.18);
  box-shadow:0 10px 20px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .topbar-nav .theme-toggle[aria-pressed="true"] .theme-toggle-icon,
:root[data-theme="light"] .topbar-nav .theme-toggle[aria-pressed="false"] .theme-toggle-icon{
  background:linear-gradient(135deg, rgba(26,45,71,0.12), rgba(26,45,71,0.05));
  color:#233853;
  box-shadow:0 2px 6px rgba(34,63,112,0.12);
}

.auth-card-shell{
  width:min(100%, 1040px);
  padding:0;
  overflow:hidden;
  margin-top:-12px;
  border-radius:24px;
  box-shadow:var(--shadow);
}

.auth-card-shell-otp{
  width:min(100%, 620px);
  margin-top:0;
}

.auth-card-shell-otp .auth-split{
  grid-template-columns:minmax(0, 1fr);
}

.auth-split{
  align-items:stretch;
  grid-template-columns:minmax(0, 1.08fr) minmax(300px, .92fr);
  gap:0;
}

.auth-panel{
  padding:36px;
}

.auth-panel-main{
  background:
    radial-gradient(circle at top left, rgba(143,211,255,0.06), transparent 28%),
    linear-gradient(180deg, rgba(14,32,54,0.22), rgba(7,18,31,0.08));
}

.auth-panel-main-otp{
  padding:38px 38px 32px;
}

.auth-panel-side{
  background:
    radial-gradient(circle at top right, rgba(143,211,255,0.16), transparent 30%),
    linear-gradient(180deg, rgba(10,28,47,0.96), rgba(6,17,31,0.96));
  border-left:1px solid rgba(255,255,255,0.08);
}

.auth-kicker{
  text-transform:uppercase;
  letter-spacing:.12em;
}

.auth-title{
  margin:0 0 10px;
  font-size:34px;
  letter-spacing:-0.03em;
}

.auth-intro{
  max-width:560px;
  line-height:1.7;
}

.auth-form{
  margin-top:18px;
}

.password-field{
  position:relative;
}

.password-field-input{
  padding-right:54px;
}

.password-field-input::-ms-reveal,
.password-field-input::-ms-clear{
  display:none;
}

.password-toggle{
  position:absolute;
  top:50%;
  right:10px;
  z-index:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  min-height:36px;
  padding:0;
  border:0 !important;
  border-radius:999px;
  background:transparent !important;
  background-image:none !important;
  color:rgba(207,231,255,0.72);
  box-shadow:none !important;
  transform:translateY(-50%);
  animation:none;
}

.password-toggle::after{
  display:none;
}

.password-toggle:hover,
.password-toggle:focus-visible{
  transform:translateY(-50%);
  border:0 !important;
  background:rgba(143,211,255,0.12) !important;
  background-image:none !important;
  color:#eaf6ff;
  box-shadow:0 0 0 4px rgba(143,211,255,0.08) !important;
}

.password-toggle[data-visible="true"]{
  border:0 !important;
  background:rgba(94,186,255,0.16) !important;
  background-image:none !important;
  color:#f4fbff;
  box-shadow:0 0 0 3px rgba(83,178,255,0.08) !important;
}

.password-toggle-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:17px;
  height:17px;
}

.password-toggle-icon svg{
  width:17px;
  height:17px;
  fill:currentColor;
}

.password-toggle-icon-eye-off{
  display:none;
}

.password-toggle[data-visible="true"] .password-toggle-icon-eye{
  display:none;
}

.password-toggle[data-visible="true"] .password-toggle-icon-eye-off{
  display:block;
}

.auth-inline-note{
  margin-top:-2px;
  margin-bottom:2px;
  text-align:right;
}

.auth-inline-note a{
  color:var(--text-soft);
  font-size:13px;
  font-weight:700;
  letter-spacing:0.01em;
  text-decoration:none;
}

.auth-inline-note a:hover{
  color:var(--accent);
  text-decoration:underline;
}

.auth-form-otp{
  gap:12px;
}

.auth-form-otp .notice{
  padding:12px 14px;
  border-radius:14px;
  margin-bottom:2px;
}

.auth-form-otp .otp-code-group{
  display:grid;
  grid-template-columns:repeat(6, minmax(0, 1fr));
  gap:8px;
  align-items:center;
}

.auth-form-otp .otp-code-slot{
  width:100%;
  max-width:none;
  margin:0;
  min-height:62px;
  padding:0;
  border-radius:18px;
  font-size:24px;
  font-weight:800;
  letter-spacing:0;
  text-align:center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 10px 22px rgba(0,0,0,0.16);
}

.auth-form-otp .otp-code-slot:focus{
  border-color:rgba(143,211,255,0.75);
  box-shadow:
    0 0 0 4px rgba(143,211,255,0.16),
    0 14px 26px rgba(28,97,163,0.22);
  transform:translateY(-1px);
}

.auth-form-otp .otp-code-slot::placeholder{
  color:#91a5c3;
}

.auth-side-title{
  margin:16px 0 0;
  font-size:28px;
  letter-spacing:-0.03em;
}

.auth-role-list{
  margin-top:18px;
}

.auth-role-item strong{
  display:block;
  margin-bottom:6px;
  color:var(--text);
}

.auth-role-item-compact{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  gap:12px;
  align-items:flex-start;
  padding:18px 18px 16px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
    rgba(9,22,38,0.34);
  box-shadow:0 12px 24px rgba(0,0,0,0.14);
}

.auth-role-item-compact > div{
  min-width:0;
}

.auth-role-item-compact strong{
  margin-bottom:4px;
}

.auth-role-item-compact span:not(.auth-role-marker){
  display:block;
  color:var(--muted);
  line-height:1.55;
}

.auth-role-marker{
  width:12px;
  height:12px;
  margin-top:5px;
  border-radius:999px;
  background:radial-gradient(circle at 35% 35%, #dff3ff, var(--brand-strong));
  box-shadow:0 0 0 5px rgba(143,211,255,0.12);
}

:root[data-theme="light"] .topbar,
:root[data-theme="light"] .panel,
:root[data-theme="light"] .card,
:root[data-theme="light"] .stat-card{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(244,248,255,0.86)),
    linear-gradient(140deg, rgba(255,255,255,0.96), rgba(233,240,250,0.92));
  color:var(--text);
  box-shadow:var(--shadow-soft);
  border-color:rgba(18,39,71,0.22);
}

:root[data-theme="light"] .topbar::after{
  opacity:.45;
}

:root[data-theme="light"] .topbar p,
:root[data-theme="light"] .auth-intro,
:root[data-theme="light"] .empty-state,
:root[data-theme="light"] .footer-note,
:root[data-theme="light"] label,
:root[data-theme="light"] th,
:root[data-theme="light"] .stat-card span,
:root[data-theme="light"] .stat-card .muted,
:root[data-theme="light"] .muted{
  color:var(--muted);
}

:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea{
  border-color:rgba(18,39,71,0.22);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,249,255,0.94)),
    rgba(255,255,255,0.96);
  color:var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 8px 16px rgba(34,63,112,0.06);
}

:root[data-theme="light"] input::placeholder{
  color:#7a8ca7;
}

:root[data-theme="light"] input:hover,
:root[data-theme="light"] select:hover,
:root[data-theme="light"] textarea:hover{
  border-color:rgba(47,109,255,0.24);
}

:root[data-theme="light"] input:focus,
:root[data-theme="light"] select:focus,
:root[data-theme="light"] textarea:focus{
  border-color:rgba(47,109,255,0.48);
  box-shadow:
    0 0 0 4px rgba(47,109,255,0.12),
    0 6px 16px rgba(47,109,255,0.08);
}

:root[data-theme="light"] select option{
  color:#16233a;
  background:#ffffff;
}

:root[data-theme="light"] .button,
:root[data-theme="light"] button,
:root[data-theme="light"] input[type="submit"]{
  background:linear-gradient(135deg, #2f6dff, #5a96ff);
  color:#f8fbff;
  box-shadow:0 14px 24px rgba(47,109,255,0.22);
}

:root[data-theme="light"] .button:hover,
:root[data-theme="light"] button:hover,
:root[data-theme="light"] input[type="submit"]:hover{
  box-shadow:0 18px 30px rgba(47,109,255,0.26);
}

:root[data-theme="light"] .button.secondary,
:root[data-theme="light"] button.secondary{
  background:linear-gradient(180deg, rgba(255,255,255,0.96), rgba(242,247,255,0.92));
  color:#28405f;
  border-color:rgba(18,39,71,0.18);
  box-shadow:0 8px 18px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .button.secondary:hover,
:root[data-theme="light"] button.secondary:hover{
  background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(236,243,255,0.96));
  border-color:rgba(47,109,255,0.18);
  color:#1e3760;
}

:root[data-theme="light"] .button.danger,
:root[data-theme="light"] button.danger{
  background:linear-gradient(180deg, rgba(255,244,244,0.98), rgba(255,234,234,0.94));
  color:#8a2f2f;
  border-color:rgba(180,74,74,0.18);
  box-shadow:0 8px 18px rgba(156,70,70,0.08);
}

:root[data-theme="light"] .button.danger:hover,
:root[data-theme="light"] button.danger:hover{
  background:linear-gradient(180deg, rgba(255,240,240,1), rgba(255,228,228,0.96));
  border-color:rgba(180,74,74,0.24);
  color:#7a2323;
}

:root[data-theme="light"] .panel{
  box-shadow:0 14px 28px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .badge{
  font-weight:700;
}

:root[data-theme="light"] .stat-card{
  border-color:rgba(18,39,71,0.24);
  background:
    radial-gradient(circle at top right, rgba(47,109,255,0.08), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,246,253,0.94));
  box-shadow:0 14px 26px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .stat-card::after{
  background:radial-gradient(circle, rgba(47,109,255,0.1), transparent 72%);
}

:root[data-theme="light"] .stat-card strong{
  color:#1e3c76;
}

:root[data-theme="light"] .dashboard-chart{
  border-color:rgba(18,39,71,0.24);
  background:
    radial-gradient(circle at top right, rgba(47,109,255,0.08), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,247,253,0.94));
  box-shadow:0 14px 26px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .chart-label{
  color:#6a7b94;
}

:root[data-theme="light"] .activity-item{
  border-color:rgba(18,39,71,0.24);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,247,253,0.94)),
    rgba(255,255,255,0.98);
}

:root[data-theme="light"] .activity-item-link:hover,
:root[data-theme="light"] .activity-item-link:focus-visible{
  border-color:rgba(59,130,246,0.22);
  background:
    linear-gradient(180deg, rgba(255,255,255,1), rgba(238,246,255,0.96)),
    rgba(255,255,255,1);
  box-shadow:0 16px 28px rgba(34,63,112,0.14);
}

:root[data-theme="light"] .activity-item strong{
  color:#1d2c47;
}

:root[data-theme="light"] .activity-item .meta{
  color:#61728d;
}

:root[data-theme="light"] .member-notification-card.is-unread{
  border-color:rgba(47,109,255,0.2);
  box-shadow:0 18px 28px rgba(34,63,112,0.1);
}

:root[data-theme="light"] .member-notification-card--info{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.995), rgba(248,250,255,0.97)),
    rgba(255,255,255,0.99);
}

:root[data-theme="light"] .member-notification-card--warning{
  background:
    linear-gradient(180deg, rgba(255,220,158,0.12), rgba(255,255,255,0.97)),
    rgba(255,255,255,0.99);
}

:root[data-theme="light"] .member-notification-card--critical{
  background:
    linear-gradient(180deg, rgba(255,186,186,0.11), rgba(255,255,255,0.97)),
    rgba(255,255,255,0.99);
}

:root[data-theme="light"] .member-notification-time{
  color:#7a8da7;
}

:root[data-theme="light"] .member-notification-pill{
  border-color:rgba(58,114,198,0.12);
  background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,253,0.96));
  color:#6a7f97;
}

:root[data-theme="light"] .member-notification-state-chip{
  border-color:rgba(58,114,198,0.11);
  background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,253,0.96));
  color:#70839a;
}

:root[data-theme="light"] .member-notification-card-copy{
  color:#5f738c;
}

:root[data-theme="light"] .member-notification-link-cta{
  color:#2f6dff;
}

:root[data-theme="light"] .member-notification-card.is-unread .member-notification-pill{
  border-color:rgba(76,130,210,0.14);
  background:linear-gradient(180deg, rgba(251,253,255,0.99), rgba(240,246,253,0.97));
  color:#56728d;
}

:root[data-theme="light"] .member-notification-card.is-unread .member-notification-card-title-copy{
  color:#223247;
}

:root[data-theme="light"] .member-notification-card.is-unread .member-notification-time{
  color:#6f86a3;
}

:root[data-theme="light"] .code-pill{
  background:linear-gradient(180deg, rgba(248,251,255,0.98), rgba(235,242,252,0.94));
  border-color:rgba(47,109,255,0.14);
  color:#31527f;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.95);
}

:root[data-theme="light"] .toolbar{
  gap:14px;
}

:root[data-theme="light"] .toolbar > div,
:root[data-theme="light"] .toolbar > form{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,247,253,0.94)),
    rgba(255,255,255,0.98);
  border:1px solid rgba(18,39,71,0.18);
  border-radius:18px;
  padding:14px;
  box-shadow:0 10px 20px rgba(34,63,112,0.05);
}

:root[data-theme="light"] .toolbar .grow{
  flex:1 1 280px;
}

:root[data-theme="light"] .inline-actions{
  gap:8px 10px;
}

:root[data-theme="light"] .inline-actions .chip{
  background:linear-gradient(180deg, rgba(248,251,255,0.98), rgba(237,243,252,0.94));
}

:root[data-theme="light"] .table-wrap td .inline-actions{
  align-items:flex-start;
}

:root[data-theme="light"] .table-wrap td .button,
:root[data-theme="light"] .table-wrap td button,
:root[data-theme="light"] .table-wrap td input[type="submit"]{
  min-height:38px;
  padding:8px 14px;
  box-shadow:none;
}

:root[data-theme="light"] input[type="file"]{
  padding:10px 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,246,253,0.94)),
    rgba(255,255,255,0.98);
  color:#4e607c;
}

:root[data-theme="light"] input[type="file"]::file-selector-button{
  margin-right:12px;
  padding:8px 12px;
  border:1px solid rgba(47,109,255,0.12);
  border-radius:999px;
  background:linear-gradient(180deg, rgba(248,251,255,0.98), rgba(235,242,252,0.94));
  color:#2a4f88;
  font-weight:700;
}

:root[data-theme="light"] .book-media .muted,
:root[data-theme="light"] .table-wrap .muted,
:root[data-theme="light"] .inline-actions .muted{
  color:#697a95;
}

:root[data-theme="light"] .table-wrap td strong,
:root[data-theme="light"] .book-media strong{
  color:#1d2c47;
}

:root[data-theme="light"] .table-wrap td a{
  color:#1f55d4;
  font-weight:600;
}

:root[data-theme="light"] .table-wrap td a:hover{
  color:#1846b6;
}

:root[data-theme="light"] .notice,
:root[data-theme="light"] .empty-state,
:root[data-theme="light"] .table-wrap{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.95), rgba(243,247,253,0.9)),
    rgba(255,255,255,0.96);
  border-color:rgba(18,39,71,0.24);
  box-shadow:var(--shadow-soft);
}

:root[data-theme="light"] th{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(239,245,252,0.92)),
    rgba(255,255,255,0.98);
  color:#5f708a;
  border-bottom-color:rgba(18,39,71,0.2);
  box-shadow:inset 0 -1px 0 rgba(18,39,71,0.14);
}

:root[data-theme="light"] td{
  color:#1d2c47;
  border-bottom-color:rgba(18,39,71,0.18);
}

:root[data-theme="light"] tbody tr:nth-child(even){
  background:rgba(18,39,71,0.02);
}

:root[data-theme="light"] tbody tr:hover{
  background:rgba(47,109,255,0.06);
  transform:translateX(2px);
}

:root[data-theme="light"] .table-wrap{
  border-color:rgba(18,39,71,0.24);
}

:root[data-theme="light"] .notice{
  color:#23324d;
}

:root[data-theme="light"] .notice.success{
  background:
    linear-gradient(180deg, rgba(244,255,248,0.98), rgba(234,250,240,0.94)),
    #f4fff8;
  color:#1d5b37;
}

:root[data-theme="light"] .notice.warning{
  background:
    linear-gradient(180deg, rgba(255,252,243,0.98), rgba(255,246,224,0.94)),
    #fffaf0;
  color:#7a5a16;
}

:root[data-theme="light"] .notice.info{
  background:
    linear-gradient(180deg, rgba(245,251,255,0.98), rgba(232,244,255,0.94)),
    #f5fbff;
  color:#22557b;
}

:root[data-theme="light"] .notice.error{
  background:
    linear-gradient(180deg, rgba(255,246,246,0.98), rgba(255,236,236,0.94)),
    #fff5f5;
  color:#8a2f2f;
}

:root[data-theme="light"] .badge,
:root[data-theme="light"] .chip{
  color:#28405f;
}

:root[data-theme="light"] .empty-state{
  border-style:solid;
  color:#52647f;
}

:root[data-theme="light"] .empty-state::before{
  background:linear-gradient(180deg, rgba(46,108,255,0.72), rgba(46,108,255,0.18));
}

:root[data-theme="light"] .empty-state strong{
  color:#162742;
}

:root[data-theme="light"] .book-cover{
  border-color:rgba(18,39,71,0.1);
  background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(239,245,252,0.94));
  box-shadow:0 10px 18px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .book-cover.placeholder{
  color:#60728d;
}

:root[data-theme="light"] .auth-title,
:root[data-theme="light"] .auth-side-title,
:root[data-theme="light"] .card h2,
:root[data-theme="light"] .card h3,
:root[data-theme="light"] .panel h3,
:root[data-theme="light"] .stat-card strong,
:root[data-theme="light"] .topbar h1{
  color:var(--text);
}

:root[data-theme="light"] .analytics-summary-card,
:root[data-theme="light"] .analytics-ranking-item,
:root[data-theme="light"] .analytics-leader-item,
:root[data-theme="light"] .analytics-breakdown-item{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,248,255,0.97)),
    rgba(255,255,255,0.98);
  border-color:rgba(35,72,127,0.08);
  box-shadow:0 10px 18px rgba(34,63,112,0.045);
}

:root[data-theme="light"] .analytics-ranking-item.is-top{
  border-color:rgba(47,109,255,0.16);
  background:
    linear-gradient(180deg, rgba(47,109,255,0.08), rgba(47,109,255,0.025)),
    rgba(255,255,255,0.98);
  box-shadow:0 12px 20px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .analytics-ranking-item.is-top .analytics-ranking-rank{
  border-color:rgba(47,109,255,0.18);
  background:rgba(47,109,255,0.12);
  color:#23416b;
}

:root[data-theme="light"] .analytics-weekly-chart{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,248,255,0.97)),
    rgba(255,255,255,0.98);
  border-color:rgba(35,72,127,0.08);
  box-shadow:0 10px 18px rgba(34,63,112,0.045);
}

:root[data-theme="light"] .analytics-weekly-summary-item{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,248,255,0.97)),
    rgba(255,255,255,0.98);
  border-color:rgba(35,72,127,0.08);
  box-shadow:0 10px 18px rgba(34,63,112,0.045);
}

:root[data-theme="light"] .analytics-weekly-insight{
  border-color:rgba(47,109,255,0.12);
  background:linear-gradient(180deg, rgba(47,109,255,0.08), rgba(47,109,255,0.03));
  color:#23416b;
}

:root[data-theme="light"] .analytics-weekly-grid-lines span{
  border-top-color:rgba(35,72,127,0.05);
}

:root[data-theme="light"] .analytics-month-filter{
  background:rgba(255,255,255,0.92);
  border-color:rgba(35,72,127,0.08);
  color:#43668d;
}

:root[data-theme="light"] .analytics-month-filter:hover{
  background:#f6fbff;
  border-color:rgba(83,167,230,0.18);
  color:#224c79;
}

:root[data-theme="light"] .analytics-month-filter.is-active{
  background:linear-gradient(180deg, #eef8ff, #dff1ff);
  border-color:rgba(83,167,230,0.24);
  color:#1f4f80;
  box-shadow:0 10px 16px rgba(34,63,112,0.06);
}

:root[data-theme="light"] .analytics-week-bar{
  background:linear-gradient(180deg, #8fd0ff, #53a7e6);
  box-shadow:0 16px 24px rgba(83,167,230,0.16);
}

:root[data-theme="light"] .analytics-week-candle-body{
  background:linear-gradient(180deg, #8fd0ff, #53a7e6);
  border-color:rgba(83,167,230,0.2);
  box-shadow:0 16px 24px rgba(83,167,230,0.14);
}

:root[data-theme="light"] .analytics-week-candle-wick{
  background:rgba(83,167,230,0.72);
}

:root[data-theme="light"] .analytics-week-badge{
  background:rgba(83,167,230,0.12);
  border-color:rgba(83,167,230,0.2);
  color:#1c4b78;
}

:root[data-theme="light"] .analytics-week-bar-value{
  background:rgba(255,255,255,0.98);
  color:#17345a;
  border-color:rgba(35,72,127,0.08);
  box-shadow:0 10px 18px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .analytics-week-share{
  color:#4170a3;
}

:root[data-theme="light"] .analytics-week-col.is-peak .analytics-week-share{
  color:#24598a;
}

:root[data-theme="light"] .analytics-week-bar.is-empty .analytics-week-bar-value{
  background:rgba(248,251,255,0.98);
  border-color:rgba(47,109,255,0.14);
  color:#5a7193;
}

:root[data-theme="light"] .analytics-week-candle.is-empty .analytics-week-bar-value{
  background:rgba(248,251,255,0.98);
  border-color:rgba(47,109,255,0.14);
  color:#5a7193;
}

:root[data-theme="light"] .analytics-week-col.is-peak .analytics-week-bar-value{
  background:#dff1ff;
  color:#12365c;
}

:root[data-theme="light"] .analytics-week-candle.is-down .analytics-week-candle-body{
  background:linear-gradient(180deg, #ffcfae, #f28c5d);
  border-color:rgba(242,140,93,0.22);
  box-shadow:0 16px 24px rgba(242,140,93,0.12);
}

:root[data-theme="light"] .analytics-week-candle.is-down .analytics-week-candle-wick{
  background:rgba(242,140,93,0.68);
}

:root[data-theme="light"] .analytics-donut-panel{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,248,255,0.97)),
    rgba(255,255,255,0.98);
  border-color:rgba(35,72,127,0.08);
  box-shadow:0 10px 18px rgba(34,63,112,0.045);
}

:root[data-theme="light"] .analytics-donut{
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.98) 0 42%, transparent 43%),
    conic-gradient(
      from -90deg,
      #53a7e6 var(--donut-segment-1) var(--donut-segment-1-end),
      #7f78f2 var(--donut-segment-2) var(--donut-segment-2-end),
      #32c96c var(--donut-segment-3) var(--donut-segment-3-end),
      rgba(35,72,127,0.14) var(--donut-segment-4) var(--donut-segment-4-end)
    );
}

:root[data-theme="light"] .analytics-donut-center{
  background:linear-gradient(180deg, rgba(255,255,255,0.99), rgba(243,247,255,0.97));
  border-color:rgba(35,72,127,0.08);
}

:root[data-theme="light"] .analytics-donut-center-label{
  color:#4170a3;
}

:root[data-theme="light"] .analytics-donut-label{
  background:rgba(255,255,255,0.98);
  border-color:rgba(35,72,127,0.08);
  box-shadow:0 10px 18px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .analytics-donut-legend-item{
  background:rgba(35,72,127,0.03);
  border-color:rgba(35,72,127,0.08);
}

:root[data-theme="light"] .analytics-donut-insight{
  border-color:rgba(47,109,255,0.12);
  background:linear-gradient(180deg, rgba(47,109,255,0.08), rgba(47,109,255,0.03));
  color:#23416b;
}

:root[data-theme="light"] .analytics-summary-card-primary{
  background:
    radial-gradient(circle at top right, rgba(83,167,230,0.18), transparent 34%),
    linear-gradient(180deg, rgba(233,246,255,0.99), rgba(219,238,255,0.97));
}

:root[data-theme="light"] .analytics-ranking-meter{
  background:rgba(35,72,127,0.08);
}

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

  .auth-panel-side{
    display:none;
    border-left:0;
    border-top:1px solid rgba(255,255,255,0.08);
  }

  .topbar{
    padding:18px 20px;
  }

  .topbar-nav{
    gap:10px;
  }

  .stat-grid{
    grid-template-columns:repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 720px){
  .site-shell{
    width:min(100% - 20px, 1180px);
    padding:16px 0 28px;
  }

  .auth-shell{
    min-height:100dvh;
    padding:72px 16px 18px;
    place-items:start center;
  }

  .auth-card-shell{
    width:min(100%, 680px);
    margin-top:0;
  }

  .auth-panel{
    padding:26px 24px;
  }

  body.auth-page > .theme-toggle{
    right:16px;
    top:14px;
  }

  .auth-title{
    font-size:30px;
  }

  .auth-intro{
    line-height:1.6;
  }

  .auth-side-title{
    font-size:24px;
  }

  .card{
    padding:22px;
  }

  .panel{
    padding:18px;
    border-radius:20px;
  }

  .topbar{
    border-radius:18px;
  }

  th,
  td{
    padding:12px 10px;
  }

  .toolbar{
    align-items:stretch;
  }

  .toolbar .grow{
    flex:1 1 100%;
  }

  .inline-actions{
    align-items:stretch;
  }

  .inline-actions .button,
  .inline-actions button,
  .inline-actions input[type="submit"]{
    flex:1 1 auto;
  }

  .pagination{
    justify-content:flex-start;
  }

}

@media (max-width: 560px){
  body{
    background:
      radial-gradient(circle at top left, rgba(71,180,255,0.14), transparent 32%),
      radial-gradient(circle at bottom right, rgba(143,211,255,0.1), transparent 28%),
      linear-gradient(160deg, var(--bg) 0%, #0a1d34 52%, var(--bg-accent) 100%);
  }

  body.auth-page{
    background:
      radial-gradient(circle at top left, rgba(71,180,255,0.14), transparent 32%),
      radial-gradient(circle at bottom right, rgba(143,211,255,0.1), transparent 28%),
      linear-gradient(160deg, var(--bg) 0%, #0a1d34 52%, var(--bg-accent) 100%);
  }

  body.auth-page::before,
  .auth-shell::before{
    display:none;
  }

  :root[data-theme="light"] body.auth-page{
    background:
      radial-gradient(circle at top left, rgba(47,109,255,0.12), transparent 28%),
      radial-gradient(circle at bottom right, rgba(90,150,255,0.12), transparent 24%),
      linear-gradient(160deg, var(--bg) 0%, #e6edf8 52%, var(--bg-accent) 100%);
  }

  .auth-card-shell{
    width:100%;
    margin-top:0;
    border-radius:20px;
    box-shadow:0 20px 38px rgba(0,0,0,0.22);
  }

  body.auth-page > .theme-toggle{
    right:12px;
    top:10px;
    transform:scale(.94);
    transform-origin:top right;
  }

  .topbar{
    flex-direction:column;
    align-items:flex-start;
    gap:14px;
  }

  .topbar-nav{
    width:100%;
    justify-content:flex-start;
  }

  .topbar-nav a{
    font-size:14px;
  }

  .topbar-nav .theme-toggle{
    padding:6px;
    min-width:40px;
  }

  .auth-form-otp .otp-code-group{
    gap:6px;
  }

  .auth-form-otp .otp-code-slot{
    min-height:52px;
    border-radius:14px;
    font-size:20px;
  }

  .auth-inline-actions{
    width:100%;
    gap:8px;
    grid-template-columns:minmax(0, 1fr);
  }

  .auth-inline-actions > :first-child{
    min-width:0;
  }

  .auth-panel,
  .auth-panel-main,
  .auth-panel-main-otp{
    padding:24px 20px;
  }

  .auth-title{
    margin-bottom:8px;
    font-size:28px;
    line-height:1.12;
  }

  .auth-kicker{
    font-size:11px;
    letter-spacing:.14em;
  }

  .auth-intro{
    font-size:13px;
    line-height:1.68;
    max-width:none;
  }

  .auth-form{
    margin-top:18px;
    gap:14px;
  }

  .auth-form label{
    margin-bottom:8px;
    font-size:11px;
    letter-spacing:.08em;
  }

  .auth-form input{
    min-height:50px;
    padding:14px 15px;
    border-radius:15px;
  }

  .auth-form .password-field-input{
    padding-right:60px;
  }

  .auth-form .password-toggle{
    right:8px;
    width:40px;
    height:40px;
    min-height:40px;
    border-radius:13px;
  }

  .auth-inline-note{
    margin-top:0;
    margin-bottom:4px;
  }

  .auth-inline-note a{
    font-size:12px;
  }

  .auth-form .inline-actions{
    gap:10px;
  }

  .auth-form .inline-actions .button,
  .auth-form .inline-actions button,
  .auth-form .inline-actions input[type="submit"]{
    min-height:46px;
    border-radius:13px;
  }

  .auth-form .button.secondary{
    opacity:.9;
  }

  .footer-note{
    font-size:12px;
    line-height:1.5;
  }

  .topbar-nav .theme-toggle-text{
    display:none;
  }

  .dashboard-icon{
    width:48px;
    height:48px;
    border-radius:16px;
  }

  .card-head{
    gap:12px;
  }

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

  .chip,
  .badge,
  .code-pill{
    font-size:11px;
  }

}

.stack > *:nth-child(1),
.grid > *:nth-child(1){animation-delay:.02s}
.stack > *:nth-child(2),
.grid > *:nth-child(2){animation-delay:.08s}
.stack > *:nth-child(3),
.grid > *:nth-child(3){animation-delay:.14s}
.stack > *:nth-child(4),
.grid > *:nth-child(4){animation-delay:.2s}
.stack > *:nth-child(5),
.grid > *:nth-child(5){animation-delay:.26s}

.surface-shell-wide{
  width:min(100%, 980px);
  padding:0;
  overflow:hidden;
}

.surface-shell-xl{
  width:min(100%, 1100px);
  padding:0;
  overflow:hidden;
}

.split-stretch{
  align-items:stretch;
}

.panel-pad-lg{
  padding:34px;
}

.eyebrow{
  margin:0 0 6px;
  text-transform:uppercase;
  letter-spacing:.12em;
}

.eyebrow-compact{
  margin:0 0 6px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.heading-tight{
  margin:0 0 8px;
}

.heading-section{
  margin:0 0 10px;
}

.heading-card{
  margin-bottom:6px;
}

.heading-top{
  margin-top:16px;
}

.text-measure{
  max-width:560px;
  margin:0;
}

.text-measure-wide{
  max-width:620px;
}

.flow-top-md{
  margin-top:18px;
}

.flow-top-sm{
  margin-top:12px;
}

.flow-top-lg{
  margin-top:20px;
}

.flow-top-xl{
  margin-top:22px;
}

.hero-panel-dark{
  background:
    radial-gradient(circle at top right, rgba(143,211,255,0.16), transparent 30%),
    linear-gradient(180deg, rgba(10,28,47,0.96), rgba(6,17,31,0.96));
}

.hero-panel-dark-soft{
  background:
    radial-gradient(circle at top right, rgba(143,211,255,0.16), transparent 32%),
    linear-gradient(180deg, rgba(10,28,47,0.96), rgba(6,17,31,0.96));
}

.panel-soft-glass{
  background:rgba(255,255,255,0.04);
}

.label-block{
  display:block;
}

.label-block-gap{
  display:block;
  margin-bottom:6px;
}

.book-media-top{
  margin-top:10px;
}

.book-media-start{
  margin-top:18px;
  align-items:flex-start;
}

.book-cover-tall{
  width:96px;
  height:128px;
}

.empty-state-top{
  margin-top:18px;
}

.stack-copy{
  margin:0 0 8px;
}

.stack-copy-md{
  margin-bottom:10px;
}

.meta-top{
  margin-top:6px;
}

.meta-top-sm{
  margin-top:4px;
}

.toolbar-top{
  align-items:flex-start;
}

.card-head-tight{
  margin-bottom:0;
}

.chips-row{
  margin-top:16px;
}

.table-wrap-top{
  margin-top:16px;
}

.borrower-quick-filters{
  align-items:center;
  gap:8px;
}

.borrower-quick-label{
  margin-right:2px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.borrower-filter-chip{
  text-decoration:none;
  cursor:pointer;
}

.borrower-filter-chip.is-active{
  border-color:var(--brand);
  color:var(--brand);
  background:var(--brand-soft);
}

.borrower-row{
  position:relative;
  cursor:pointer;
}

.borrower-row:hover{
  background:rgba(143,211,255,0.06);
}

.borrower-row:focus{
  outline:2px solid var(--brand);
  outline-offset:-2px;
}

.borrower-row.is-overdue{
  box-shadow:inset 4px 0 0 rgba(255,127,127,0.82);
  background:linear-gradient(90deg, rgba(255,127,127,0.1), transparent 42%);
}

.borrower-row.is-overdue:hover{
  background:linear-gradient(90deg, rgba(255,127,127,0.14), rgba(143,211,255,0.06) 58%, transparent);
}

.borrower-balance-breakdown{
  display:block;
  margin-top:4px;
  font-size:13px;
  line-height:1.45;
}

.borrower-balance-label{
  display:block;
  margin-bottom:3px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.admin-borrowers-toolbar{
  grid-template-columns:minmax(280px, 1fr) minmax(170px, 210px) minmax(190px, 240px) auto;
}

.inline-actions-spread{
  justify-content:space-between;
}

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

.heading-top-md{
  margin-top:10px;
}

.copy-bottom{
  margin:0 0 16px;
}

.chart-empty{
  grid-column:1 / -1;
}

.panel-pad-sm{
  padding:18px;
}

.align-end{
  align-self:end;
}

[data-theme="light"] .hero-panel-dark,
[data-theme="light"] .hero-panel-dark-soft{
  background:
    radial-gradient(circle at top right, rgba(64,147,255,0.15), transparent 34%),
    linear-gradient(180deg, rgba(234,243,255,0.98), rgba(222,236,255,0.98));
}

[data-theme="light"] .panel-soft-glass{
  background:rgba(255,255,255,0.72);
}

:root[data-theme="light"]{
  --light-surface:#ffffff;
  --light-surface-soft:#f8fbff;
  --light-surface-alt:#f2f6fc;
  --light-panel-border:rgba(27,61,114,0.1);
  --light-panel-shadow:0 18px 34px rgba(34,63,112,0.08);
  --light-panel-shadow-hover:0 22px 40px rgba(34,63,112,0.12);
}

:root[data-theme="light"] .topbar,
:root[data-theme="light"] .panel,
:root[data-theme="light"] .card,
:root[data-theme="light"] .stat-card,
:root[data-theme="light"] .auth-panel-main,
:root[data-theme="light"] .auth-panel-side,
:root[data-theme="light"] .dashboard-chart,
:root[data-theme="light"] .activity-item,
:root[data-theme="light"] .table-wrap,
:root[data-theme="light"] .empty-state,
:root[data-theme="light"] .notice{
  backdrop-filter:none;
}

:root[data-theme="light"] .topbar,
:root[data-theme="light"] .panel,
:root[data-theme="light"] .card{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(245,249,255,0.97)),
    var(--light-surface);
  border-color:var(--light-panel-border);
  box-shadow:var(--light-panel-shadow);
}

:root[data-theme="light"] .topbar:hover,
:root[data-theme="light"] .panel:hover,
:root[data-theme="light"] .card:hover,
:root[data-theme="light"] .stat-card:hover{
  box-shadow:var(--light-panel-shadow-hover);
}

:root[data-theme="light"] .stat-card,
:root[data-theme="light"] .dashboard-chart{
  background:
    radial-gradient(circle at top right, rgba(90,150,255,0.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,248,255,0.96));
  border-color:rgba(47,109,255,0.1);
  box-shadow:0 14px 28px rgba(34,63,112,0.06);
}

:root[data-theme="light"] .auth-panel-main,
:root[data-theme="light"] .auth-panel-side{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(245,249,255,0.96)),
    var(--light-surface);
  border-color:var(--light-panel-border);
  box-shadow:var(--light-panel-shadow);
}

:root[data-theme="light"] .auth-panel-side{
  border-left:1px solid var(--light-panel-border);
}

:root[data-theme="light"] .dashboard-icon{
  background:linear-gradient(180deg, #ffffff, #edf4ff);
  border-color:rgba(28,61,113,0.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.98),
    0 10px 18px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .dashboard-icon::before{
  background:linear-gradient(180deg, #18304f, #2f4f78);
  box-shadow:0 2px 6px rgba(24,48,79,0.12);
}

:root[data-theme="light"] .icon-books{
  background:linear-gradient(180deg, #ffffff, #f4f8ff);
}

:root[data-theme="light"] .icon-books::before{
  background:linear-gradient(180deg, #24476f, #3a638e);
}

:root[data-theme="light"] .icon-payments,
:root[data-theme="light"] .icon-ledger{
  background:linear-gradient(180deg, #ffffff, #f3f8f8);
}

:root[data-theme="light"] .icon-payments::before,
:root[data-theme="light"] .icon-ledger::before{
  background:linear-gradient(180deg, #295754, #3f716d);
}

:root[data-theme="light"] .icon-penalties,
:root[data-theme="light"] .icon-feedback{
  background:linear-gradient(180deg, #ffffff, #fbf3f2);
}

:root[data-theme="light"] .icon-penalties::before,
:root[data-theme="light"] .icon-feedback::before{
  background:linear-gradient(180deg, #6a3843, #88505b);
}

:root[data-theme="light"] .icon-accounts,
:root[data-theme="light"] .icon-tools,
:root[data-theme="light"] .icon-checklist,
:root[data-theme="light"] .icon-notes,
:root[data-theme="light"] .icon-guide{
  background:linear-gradient(180deg, #ffffff, #f6f4fb);
}

:root[data-theme="light"] .icon-accounts::before,
:root[data-theme="light"] .icon-tools::before,
:root[data-theme="light"] .icon-checklist::before,
:root[data-theme="light"] .icon-notes::before,
:root[data-theme="light"] .icon-guide::before{
  background:linear-gradient(180deg, #514670, #6a5f89);
}

:root[data-theme="light"] .icon-recent,
:root[data-theme="light"] .icon-view,
:root[data-theme="light"] .icon-edit,
:root[data-theme="light"] .icon-add,
:root[data-theme="light"] .icon-upload{
  background:linear-gradient(180deg, #ffffff, #fbf6ef);
}

:root[data-theme="light"] .icon-recent::before,
:root[data-theme="light"] .icon-view::before,
:root[data-theme="light"] .icon-edit::before,
:root[data-theme="light"] .icon-add::before,
:root[data-theme="light"] .icon-upload::before{
  background:linear-gradient(180deg, #705230, #8c6b44);
}

:root[data-theme="light"] .button.secondary,
:root[data-theme="light"] button.secondary{
  background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,247,255,0.95));
  color:#21406d;
  border-color:rgba(35,72,127,0.16);
  box-shadow:0 10px 18px rgba(34,63,112,0.06);
}

:root[data-theme="light"] .button.secondary:hover,
:root[data-theme="light"] button.secondary:hover{
  background:linear-gradient(180deg, rgba(255,255,255,1), rgba(238,245,255,0.98));
  border-color:rgba(35,72,127,0.22);
}

:root[data-theme="light"] .badge,
:root[data-theme="light"] .chip,
:root[data-theme="light"] .code-pill{
  background:linear-gradient(180deg, rgba(255,255,255,0.99), rgba(242,247,255,0.96));
  border-color:rgba(47,109,255,0.14);
  color:#325170;
  box-shadow:0 8px 16px rgba(34,63,112,0.05);
}

:root[data-theme="light"] .table-wrap,
:root[data-theme="light"] .empty-state,
:root[data-theme="light"] .notice,
:root[data-theme="light"] .activity-item{
  box-shadow:0 12px 24px rgba(34,63,112,0.05);
}

:root[data-theme="light"] th{
  background:
    linear-gradient(180deg, rgba(251,253,255,0.98), rgba(239,245,253,0.95)),
    rgba(255,255,255,0.96);
  color:#566d8e;
  border-bottom-color:rgba(47,109,255,0.06);
}

:root[data-theme="light"] .topbar-nav a{
  color:#28415f;
}

:root[data-theme="light"] .auth-card-shell{
  box-shadow:0 24px 46px rgba(34,63,112,0.12);
}

:root[data-theme="light"] .auth-panel-main{
  padding:40px 38px;
}

:root[data-theme="light"] .auth-panel-side{
  padding:40px 34px;
  background:
    radial-gradient(circle at top right, rgba(47,109,255,0.08), transparent 28%),
    linear-gradient(180deg, rgba(248,251,255,0.98), rgba(239,245,255,0.95));
}

:root[data-theme="light"] .auth-title{
  color:#13253e;
}

:root[data-theme="light"] .auth-role-item{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(243,248,255,0.96)),
    rgba(255,255,255,0.96);
  border-color:rgba(47,109,255,0.1);
  color:#5b6f8a;
  box-shadow:0 10px 20px rgba(34,63,112,0.05);
}

:root[data-theme="light"] .auth-role-item-compact{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(243,248,255,0.96)),
    rgba(255,255,255,0.96);
  border-color:rgba(47,109,255,0.1);
  box-shadow:0 10px 20px rgba(34,63,112,0.05);
}

:root[data-theme="light"] .auth-role-item strong,
:root[data-theme="light"] .auth-side-title{
  color:#173053;
}

:root[data-theme="light"] .auth-role-item-compact span:not(.auth-role-marker){
  color:#5b6f8a;
}

:root[data-theme="light"] .auth-role-marker{
  background:radial-gradient(circle at 35% 35%, #ffffff, #4f84ff);
  box-shadow:0 0 0 5px rgba(79,132,255,0.12);
}

:root[data-theme="light"] .auth-form .inline-actions{
  padding-top:4px;
}

:root[data-theme="light"] .password-toggle{
  border:0 !important;
  background:transparent !important;
  background-image:none !important;
  color:rgba(63,95,134,0.7);
  box-shadow:none !important;
}

:root[data-theme="light"] .password-toggle:hover,
:root[data-theme="light"] .password-toggle:focus-visible{
  border:0 !important;
  background:rgba(47,109,255,0.1) !important;
  background-image:none !important;
  color:#234f7d;
  box-shadow:0 0 0 4px rgba(47,109,255,0.08) !important;
}

:root[data-theme="light"] .password-toggle[data-visible="true"]{
  border:0 !important;
  background:rgba(47,109,255,0.14) !important;
  background-image:none !important;
  color:#21466f;
  box-shadow:0 0 0 3px rgba(47,109,255,0.08) !important;
}

:root[data-theme="light"] .button,
:root[data-theme="light"] button,
:root[data-theme="light"] input[type="submit"]{
  background:linear-gradient(135deg, #3f78f6, #6a9bff);
  box-shadow:0 10px 18px rgba(47,109,255,0.16);
}

:root[data-theme="light"] .button:hover,
:root[data-theme="light"] button:hover,
:root[data-theme="light"] input[type="submit"]:hover{
  box-shadow:0 14px 24px rgba(47,109,255,0.2);
}

:root[data-theme="light"] .button.secondary,
:root[data-theme="light"] button.secondary{
  background:linear-gradient(180deg, rgba(255,255,255,0.99), rgba(245,249,255,0.97));
  color:#35506d;
  border-color:rgba(35,72,127,0.14);
  box-shadow:0 8px 16px rgba(34,63,112,0.05);
}

:root[data-theme="light"] .button.secondary:hover,
:root[data-theme="light"] button.secondary:hover{
  background:linear-gradient(180deg, rgba(255,255,255,1), rgba(242,247,255,0.98));
  border-color:rgba(35,72,127,0.18);
}

:root[data-theme="light"] .button.danger,
:root[data-theme="light"] button.danger{
  background:linear-gradient(180deg, rgba(255,248,248,0.99), rgba(255,240,240,0.96));
  color:#7c3c3c;
  border-color:rgba(180,74,74,0.16);
  box-shadow:0 8px 16px rgba(156,70,70,0.05);
}

:root[data-theme="light"] .button.danger:hover,
:root[data-theme="light"] button.danger:hover{
  background:linear-gradient(180deg, rgba(255,246,246,1), rgba(255,236,236,0.98));
}

:root[data-theme="light"] .badge,
:root[data-theme="light"] .chip,
:root[data-theme="light"] .code-pill{
  background:linear-gradient(180deg, rgba(255,255,255,0.99), rgba(246,249,255,0.97));
  border-color:rgba(47,109,255,0.1);
  color:#48607a;
  box-shadow:none;
}

:root:not([data-theme="light"]) .topbar,
:root:not([data-theme="light"]) .panel,
:root:not([data-theme="light"]) .card{
  background:
    linear-gradient(180deg, rgba(16,33,55,0.94), rgba(9,21,37,0.92)),
    rgba(8,21,38,0.9);
  border-color:rgba(143,211,255,0.1);
  box-shadow:0 20px 40px rgba(0,0,0,0.24);
}

:root:not([data-theme="light"]) .stat-card,
:root:not([data-theme="light"]) .dashboard-chart,
:root:not([data-theme="light"]) .activity-item,
:root:not([data-theme="light"]) .table-wrap,
:root:not([data-theme="light"]) .empty-state,
:root:not([data-theme="light"]) .notice{
  border-color:rgba(143,211,255,0.1);
  box-shadow:0 16px 30px rgba(0,0,0,0.2);
}

:root:not([data-theme="light"]) .stat-card{
  background:
    radial-gradient(circle at top right, rgba(143,211,255,0.12), transparent 34%),
    linear-gradient(180deg, rgba(16,35,58,0.96), rgba(9,23,40,0.94));
}

:root:not([data-theme="light"]) .dashboard-chart{
  background:
    radial-gradient(circle at top right, rgba(143,211,255,0.08), transparent 28%),
    linear-gradient(180deg, rgba(15,34,56,0.94), rgba(8,21,37,0.92));
}

:root:not([data-theme="light"]) .button,
:root:not([data-theme="light"]) button,
:root:not([data-theme="light"]) input[type="submit"]{
  background:linear-gradient(135deg, #7bc8ff, #4eaef8);
  box-shadow:0 12px 22px rgba(71,180,255,0.22);
}

:root:not([data-theme="light"]) .button:hover,
:root:not([data-theme="light"]) button:hover,
:root:not([data-theme="light"]) input[type="submit"]:hover{
  box-shadow:0 16px 28px rgba(71,180,255,0.28);
}

:root:not([data-theme="light"]) .button.secondary,
:root:not([data-theme="light"]) button.secondary{
  background:linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border-color:rgba(143,211,255,0.1);
  color:#dce9fb;
}

:root:not([data-theme="light"]) .button.danger,
:root:not([data-theme="light"]) button.danger{
  background:linear-gradient(180deg, rgba(255,127,127,0.14), rgba(255,127,127,0.09));
  border-color:rgba(255,127,127,0.22);
}

:root:not([data-theme="light"]) .badge,
:root:not([data-theme="light"]) .chip,
:root:not([data-theme="light"]) .code-pill{
  background:linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  border-color:rgba(143,211,255,0.1);
  color:#cdd9ef;
}

:root:not([data-theme="light"]) .auth-card-shell{
  box-shadow:0 24px 48px rgba(0,0,0,0.28);
}

:root:not([data-theme="light"]) .auth-panel-main{
  background:
    radial-gradient(circle at top left, rgba(143,211,255,0.06), transparent 28%),
    linear-gradient(180deg, rgba(13,28,47,0.94), rgba(8,20,36,0.9));
}

:root:not([data-theme="light"]) .auth-panel-side{
  background:
    radial-gradient(circle at top right, rgba(143,211,255,0.12), transparent 30%),
    linear-gradient(180deg, rgba(10,25,43,0.98), rgba(6,17,31,0.98));
  border-left-color:rgba(143,211,255,0.08);
}

.toolbar{
  gap:14px;
}

.toolbar > div,
.toolbar > form{
  border-radius:18px;
}

.stat-grid{
  gap:16px;
}

.stat-card{
  min-height:150px;
}

.stat-card strong{
  letter-spacing:-0.03em;
}

.table-wrap{
  border-radius:20px;
}

th{
  padding:15px 12px;
}

td{
  padding:15px 12px;
}

.table-wrap td .inline-actions{
  gap:8px;
  align-items:flex-start;
}

.table-wrap td .button,
.table-wrap td button,
.table-wrap td input[type="submit"]{
  min-height:38px;
  padding:8px 13px;
  font-size:12px;
}

.activity-item .meta{
  line-height:1.55;
}

.dashboard-chart{
  border-radius:24px;
}

@media (max-width: 940px){
  .analytics-chart-layout,
  .analytics-layout{
    grid-template-columns:1fr;
  }

  .analytics-weekly-grid{
    gap:10px;
  }

  .analytics-weekly-axis{
    width:30px;
  }

  .analytics-weekly-plot{
    margin-left:32px;
  }

  .analytics-weekly-summary{
    grid-template-columns:1fr;
  }

  .analytics-weekly-insight{
    font-size:12px;
  }

  .analytics-ranking-item,
  .analytics-leader-item{
    grid-template-columns:1fr;
  }

  .analytics-leader-meta{
    justify-content:flex-start;
  }
}

:root[data-theme="light"] .toolbar > div,
:root[data-theme="light"] .toolbar > form{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,248,255,0.96)),
    rgba(255,255,255,0.98);
  border-color:rgba(35,72,127,0.08);
  box-shadow:0 10px 18px rgba(34,63,112,0.045);
}

:root[data-theme="light"] .stat-card{
  min-height:152px;
}

:root[data-theme="light"] .table-wrap{
  border-color:rgba(35,72,127,0.08);
}

:root[data-theme="light"] .table-wrap td .button,
:root[data-theme="light"] .table-wrap td button,
:root[data-theme="light"] .table-wrap td input[type="submit"]{
  box-shadow:none;
}

:root[data-theme="light"] .activity-item{
  box-shadow:0 10px 18px rgba(34,63,112,0.045);
}

:root:not([data-theme="light"]) .toolbar > div,
:root:not([data-theme="light"]) .toolbar > form{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025)),
    rgba(9,21,37,0.56);
  border:1px solid rgba(143,211,255,0.08);
  padding:14px;
  box-shadow:0 12px 22px rgba(0,0,0,0.16);
}

:root:not([data-theme="light"]) .table-wrap td .button,
:root:not([data-theme="light"]) .table-wrap td button,
:root:not([data-theme="light"]) .table-wrap td input[type="submit"]{
  box-shadow:none;
}

.notice.warning strong,
.notice.error strong,
.notice.success strong{
  letter-spacing:-0.02em;
}

.book-media{
  gap:14px;
}

.book-media > div{
  min-width:0;
}

.book-cover{
  flex-shrink:0;
}

.book-cover.placeholder{
  text-align:center;
  line-height:1.35;
}

.panel .inline-actions{
  row-gap:10px;
}

.panel .button,
.panel button,
.panel input[type="submit"]{
  min-height:40px;
}

.table-wrap td{
  line-height:1.55;
}

.table-wrap td strong + .muted,
.book-media strong + .muted{
  display:block;
  margin-top:2px;
}

.table-wrap td .badge{
  margin-top:2px;
}

.table-wrap td .inline-form{
  display:inline-flex;
}

:root[data-theme="light"] .notice.warning{
  border-color:rgba(210,162,58,0.2);
}

:root[data-theme="light"] .book-cover{
  background:linear-gradient(180deg, rgba(255,255,255,1), rgba(243,247,255,0.97));
}

:root[data-theme="light"] .book-cover.placeholder{
  background:linear-gradient(180deg, rgba(252,254,255,0.99), rgba(244,248,255,0.96));
  border-style:dashed;
}

:root[data-theme="light"] .panel .muted,
:root[data-theme="light"] .notice .muted{
  color:#657791;
}

:root[data-theme="light"] .table-wrap td{
  color:#20314d;
}

:root[data-theme="light"] .table-wrap td .inline-actions{
  gap:7px;
}

:root:not([data-theme="light"]) .notice.warning{
  background:
    linear-gradient(180deg, rgba(255,235,184,0.08), rgba(255,211,122,0.05)),
    rgba(17,23,33,0.68);
}

:root:not([data-theme="light"]) .book-cover{
  background:linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
}

:root:not([data-theme="light"]) .book-cover.placeholder{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.02);
  border-style:dashed;
}

:root:not([data-theme="light"]) .panel .muted,
:root:not([data-theme="light"]) .notice .muted{
  color:#aebdd4;
}

:root:not([data-theme="light"]) .table-wrap td{
  color:#edf3ff;
}

:root:not([data-theme="light"]) .table-wrap td .inline-actions{
  gap:7px;
}

.manage-users-toolbar{
  align-items:stretch;
  gap:0;
  margin-bottom:10px;
}

.manage-users-head{
  margin-bottom:0;
}

.manage-users-filters{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(180px, 220px) auto;
  gap:12px 18px;
  align-items:end;
  padding:0;
  flex:1 1 auto;
  min-width:0;
  width:100%;
}

.manage-users-filters label{
  padding-left:2px;
}

.manage-users-filters > div{
  min-width:0;
}

.manage-users-filters > .grow{
  grid-column:auto;
}

.manage-users-filters > div:not(.grow):not(.inline-actions){
  min-width:0;
  max-width:none;
}

.manage-users-filters input,
.manage-users-filters .ui-select{
  padding-left:18px;
}

.manage-users-filters input{
  padding-right:18px;
}

.manage-users-summary{
  row-gap:8px;
  justify-content:flex-start;
}

.manage-users-actions{
  justify-content:flex-start;
}

.manage-users-filters .inline-actions{
  align-items:flex-end;
  justify-content:flex-end;
  gap:12px;
  padding-top:0;
  align-self:end;
  justify-self:end;
  flex-wrap:nowrap;
  padding-left:18px;
}

.manage-users-filters .inline-actions .button,
.manage-users-filters .inline-actions button{
  min-width:94px;
  flex:0 0 auto;
}

.manage-users-filters .inline-actions button[type="submit"],
.manage-books-tablefilters .inline-actions button[type="submit"]{
  background:linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
  border-color:rgba(143,211,255,0.16);
  box-shadow:none;
}

.manage-users-filters .inline-actions button[type="submit"]:hover,
.manage-users-filters .inline-actions button[type="submit"]:focus-visible,
.manage-books-tablefilters .inline-actions button[type="submit"]:hover,
.manage-books-tablefilters .inline-actions button[type="submit"]:focus-visible{
  transform:none;
  box-shadow:0 0 0 3px rgba(71,180,255,0.08);
}

.manage-users-filters .inline-actions > .button.secondary,
.manage-books-tablefilters .inline-actions > .button.secondary{
  opacity:0.92;
}

@media (max-width: 720px){
  .manage-users-filters{
    min-width:0;
  }

  .manage-users-filters{
    grid-template-columns:minmax(0, 1fr);
    gap:10px;
  }

  .manage-users-filters > div:not(.grow):not(.inline-actions){
    min-width:0;
    max-width:none;
  }

  .manage-users-filters .inline-actions{
    justify-self:start;
    padding-left:0;
    flex-wrap:wrap;
  }
}

.manage-users-actions .button,
.manage-users-actions button{
  min-width:82px;
}

.manage-users-toolbar + .manage-users-summary{
  justify-content:space-between;
}

.manage-users-summary .chip{
  min-height:36px;
  border-width:1px;
}

.manage-users-printbar{
  margin-top:14px;
  row-gap:10px;
  justify-content:space-between;
}

.admin-maintenance-bar{
  align-items:center;
  gap:14px;
}

.admin-maintenance-copy{
  display:grid;
  gap:6px;
  padding:16px 18px;
  min-width:0;
}

.admin-maintenance-copy .code-pill{
  width:max-content;
}

.admin-maintenance-copy .heading-top-md{
  margin:0;
}

.admin-maintenance-copy p{
  margin:0;
  max-width:62ch;
}

.admin-maintenance-action{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  padding:16px 18px;
  flex:0 0 auto;
}

.admin-maintenance-action button{
  min-width:180px;
}

/* Role-specific UI blocks */

.table-wrap td.inline-actions{
  gap:8px;
  align-items:center;
}

.table-wrap td.inline-actions .button,
.table-wrap td.inline-actions button{
  min-width:82px;
}

.payment-record-reference{
  min-width:170px;
}

.payment-record-reference-head{
  min-width:170px;
}

.payment-record-reference-copy{
  display:grid;
  gap:4px;
  min-width:0;
}

.payment-record-inline-actions{
  margin-top:8px;
}

.payment-record-inline-actions .inline-form{
  display:inline-flex;
}

.payment-record-inline-actions button{
  min-width:96px;
}

.payment-records-table th,
.payment-records-table td{
  padding-top:11px;
  padding-bottom:11px;
}

.payment-records-table td{
  border-bottom-color:rgba(255,255,255,0.055);
}

.payment-records-table tbody tr:nth-child(even){
  background:rgba(255,255,255,0.014);
}

.payment-records-table tbody tr:hover{
  background:rgba(255,255,255,0.038);
}

.payment-record-actions{
  min-width:176px;
  padding-left:12px;
  padding-right:12px;
  background:transparent;
  box-shadow:none;
  border-left:0;
  backdrop-filter:none;
  text-align:center;
}

.payment-record-actions-head{
  min-width:176px;
  text-align:center;
  box-shadow:none;
  border-left:0;
}

.payment-record-action-stack{
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:center;
  justify-content:center;
  width:auto;
  max-width:none;
  margin:0;
}

.payment-record-action-stack .inline-form{
  display:block;
  width:120px;
}

.payment-record-action-stack .inline-form button{
  width:100%;
  min-width:0;
  justify-content:center;
  border-radius:14px;
  min-height:36px;
  padding:8px 12px;
  font-size:12px;
}

.payment-record-actions .payment-review-badge{
  display:inline-flex;
  margin:0 auto;
  justify-content:center;
  vertical-align:middle;
}

.payment-record-actions .payment-review-badge .status-dot{
  width:8px;
  height:8px;
}

:root[data-theme="light"] .payment-record-actions{
  background:transparent;
  box-shadow:none;
  border-left:0;
}

:root[data-theme="light"] .payment-record-actions-head{
  box-shadow:none;
  border-left:0;
}

.librarian-desk-tabs-shell{
  display:grid;
  gap:18px;
}

.librarian-desk-tabs-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.librarian-desk-tablist{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.librarian-desk-tab{
  min-height:42px;
  padding:8px 14px;
  box-shadow:none;
}

.librarian-desk-tab[aria-selected="true"]{
  background:linear-gradient(135deg, var(--brand), var(--brand-strong));
  color:var(--brand-ink);
  border-color:transparent;
  box-shadow:0 14px 26px rgba(71,180,255,0.22);
}

.librarian-desk-tab[aria-selected="true"] .chip{
  background:rgba(255,255,255,0.18);
  border-color:rgba(255,255,255,0.2);
  color:inherit;
}

.librarian-desk-tabpanel{
  animation:fade-up .28s var(--ease-standard);
}

:root[data-theme="light"] .librarian-desk-tab[aria-selected="true"]{
  color:#f8fbff;
  box-shadow:0 14px 24px rgba(47,109,255,0.2);
}

.librarian-penalties-panel .card-head{
  margin-bottom:0;
}

.librarian-penalties-summary{
  row-gap:10px;
  margin-top:14px;
}

.librarian-penalties-summary .chip{
  min-height:36px;
}

.librarian-penalties-table tbody td{
  vertical-align:top;
}

.librarian-dashboard-overview .stat-card,
.librarian-dashboard-grid .panel,
.librarian-edit-book-overview,
.librarian-edit-book-main,
.librarian-edit-book-side{
  border-radius:24px;
}

.librarian-dashboard-overview .stat-card{
  min-height:164px;
}

.librarian-dashboard-focus .empty-state,
.librarian-dashboard-queue .empty-state{
  min-height:72px;
  display:flex;
  align-items:center;
}

.librarian-dashboard-activity .activity-item{
  border-radius:20px;
}

.librarian-batch-card{
  padding:18px;
  border:1px solid rgba(143,211,255,0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
    linear-gradient(135deg, rgba(55,122,191,0.08), rgba(15,30,52,0));
  box-shadow:0 18px 38px rgba(3,12,28,0.16);
}

.librarian-catalog-grid{
  grid-template-columns:repeat(auto-fit, minmax(320px, 1fr));
}

.librarian-catalog-card{
  display:grid;
  gap:0;
  padding:0;
  text-decoration:none;
  color:inherit;
  overflow:hidden;
}

.librarian-catalog-card-link{
  display:grid;
  grid-template-columns:112px minmax(0, 1fr);
  align-items:center;
  gap:18px;
  min-height:100%;
  padding:18px;
  color:inherit;
  text-decoration:none;
}

.librarian-catalog-card-link:hover{
  text-decoration:none;
}

.librarian-catalog-card:hover{
  text-decoration:none;
}

.librarian-catalog-card .stack{
  gap:14px;
}

.librarian-catalog-card .label-block{
  margin:0;
  font-size:1.08rem;
  line-height:1.25;
}

.librarian-catalog-card .muted{
  line-height:1.4;
}

.librarian-catalog-card.is-active{
  border-color:var(--line-strong);
  box-shadow:var(--shadow-hover);
}

.catalog-search-field{
  position:relative;
}

#catalogSearchForm{
  align-items:flex-start;
  gap:14px;
}

#catalogSearchForm .catalog-search-field{
  min-width:min(420px, 100%);
}

#catalogSearchForm .inline-actions{
  align-self:flex-start;
  padding-top:26px;
}

.catalog-search-suggestions{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  right:0;
  z-index:30;
  display:grid;
  gap:4px;
  max-height:240px;
  overflow:auto;
  padding:8px;
  border-radius:16px;
  border:1px solid rgba(126, 197, 255, 0.14);
  background:linear-gradient(180deg, rgba(15, 28, 46, 0.98), rgba(9, 18, 31, 0.98));
  box-shadow:0 14px 28px rgba(2, 10, 24, 0.3);
}

.catalog-search-suggestion,
button.catalog-search-suggestion{
  width:100%;
  justify-content:flex-start;
  text-align:left;
  min-height:0;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid transparent !important;
  background:transparent !important;
  color:rgba(236, 244, 255, 0.92) !important;
  font-weight:500;
  box-shadow:none !important;
  animation:none !important;
}

.catalog-search-suggestion:hover,
.catalog-search-suggestion:focus-visible,
.catalog-search-suggestion:active,
.catalog-search-suggestion.is-active{
  transform:none;
  border-color:rgba(132, 150, 176, 0.18) !important;
  background:linear-gradient(180deg, rgba(58, 72, 91, 0.42), rgba(48, 62, 79, 0.38)) !important;
  color:#edf3fa !important;
  box-shadow:none !important;
  animation:none !important;
  outline:none;
}

:root[data-theme="light"] .catalog-search-suggestions{
  border-color:rgba(47,109,255,0.12);
  background:linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,248,255,0.97));
  box-shadow:0 14px 28px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .catalog-search-suggestion,
:root[data-theme="light"] button.catalog-search-suggestion{
  color:#38506f !important;
}

:root[data-theme="light"] .catalog-search-suggestion:hover,
:root[data-theme="light"] .catalog-search-suggestion:focus-visible,
:root[data-theme="light"] .catalog-search-suggestion:active,
:root[data-theme="light"] .catalog-search-suggestion.is-active{
  transform:none;
  border-color:rgba(145, 162, 188, 0.18) !important;
  background:linear-gradient(180deg, rgba(233, 238, 245, 0.98), rgba(223, 231, 240, 0.94)) !important;
  color:#24384f !important;
  box-shadow:none !important;
  animation:none !important;
}

.librarian-catalog-card-media{
  display:flex;
  justify-content:center;
  align-items:center;
  align-self:stretch;
}

.librarian-catalog-card .book-cover,
.librarian-catalog-card .book-cover.placeholder{
  width:100%;
  max-width:112px;
  height:152px;
  border-radius:16px;
  box-shadow:0 14px 30px rgba(0,0,0,0.22);
}

.librarian-catalog-card .chips-row{
  gap:8px;
  justify-content:flex-start;
}

.librarian-catalog-card .chip{
  min-height:30px;
  padding:6px 10px;
  font-size:0.74rem;
}

@media (max-width: 640px){
  .librarian-catalog-grid{
    grid-template-columns:minmax(0, 1fr);
  }

  .librarian-catalog-card-link{
    grid-template-columns:minmax(0, 1fr);
    justify-items:start;
    gap:14px;
  }

  .librarian-catalog-card-media{
    justify-content:flex-start;
  }
}

.librarian-catalog-book-item{
  display:grid;
  gap:14px;
}

.member-catalog-grid{
  grid-template-columns:repeat(auto-fit, minmax(260px, 300px));
  align-items:stretch;
  justify-content:center;
}

.member-catalog-card .librarian-catalog-card-link{
  min-height:100%;
  grid-template-columns:minmax(0, 1fr);
  grid-template-rows:1fr;
  align-content:start;
  justify-items:center;
}

.member-catalog-card{
  padding:0;
}

.member-catalog-card .librarian-catalog-card-link{
  padding:20px 18px 22px;
  gap:18px;
}

.member-catalog-card-media{
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  align-items:start;
  justify-items:center;
  gap:16px;
  transform:none;
}

.member-catalog-card .book-cover,
.member-catalog-card .book-cover.placeholder{
  width:114px;
  height:148px;
  max-width:none;
  margin:0;
  justify-self:center;
  align-self:start;
  border-radius:16px;
}

.member-catalog-card-copy{
  display:grid;
  align-content:start;
  gap:12px;
  min-width:0;
  width:100%;
  text-align:center;
  justify-items:center;
}

.member-catalog-card-title{
  margin:0;
  line-height:1.2;
  font-size:1.12rem;
}

.member-catalog-card-description{
  margin:0;
  line-height:1.45;
  font-size:0.95rem;
  max-width:20ch;
  min-height:0;
  display:block;
  overflow:visible;
  text-align:center;
  overflow-wrap:normal;
  word-break:normal;
  hyphens:none;
}

.member-catalog-card .chips-row{
  align-self:start;
  gap:8px;
  justify-content:center;
  flex-wrap:wrap;
}

.member-catalog-card .chip{
  min-height:31px;
  padding:6px 11px;
  font-size:0.73rem;
}

@media (max-width: 640px){
  .member-catalog-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
  }

  .member-books-context{
    align-items:stretch;
    flex-direction:column;
  }

  .member-books-context .button{
    width:100%;
  }

  .member-catalog-card .librarian-catalog-card-link{
    padding:16px;
    gap:14px;
  }

  .member-catalog-card-media{
    grid-template-columns:minmax(0, 1fr);
    gap:12px;
    transform:none;
  }

  .member-catalog-card .book-cover,
  .member-catalog-card .book-cover.placeholder{
    width:72px;
    height:96px;
    justify-self:center;
    transform:none;
  }

  .member-catalog-card-copy{
    transform:none;
  }

  .member-catalog-card-title{
    font-size:1rem;
  }

  .member-catalog-card-description{
    font-size:0.9rem;
    -webkit-line-clamp:3;
  }

  .member-catalog-card .chips-row{
    gap:8px;
    justify-content:center;
  }

  .member-catalog-card .chip{
    min-height:32px;
    padding:6px 10px;
    font-size:0.74rem;
  }
}

.catalog-modal{
  position:fixed;
  inset:0;
  z-index:90;
  display:grid;
  place-items:center;
  padding:24px;
}

.catalog-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(4, 10, 20, 0.68);
  backdrop-filter:blur(10px);
}

.catalog-modal-dialog{
  position:relative;
  z-index:1;
  width:min(1100px, calc(100vw - 32px));
  max-height:calc(100vh - 32px);
  overflow:auto;
  border-radius:24px;
}

.catalog-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:20px;
  padding-bottom:16px;
  border-bottom:1px solid var(--line);
}

.desk-modal{
  position:fixed;
  inset:0;
  z-index:400;
  display:grid;
  place-items:center;
  padding:0;
}

.member-borrow-modal{
  z-index:1300;
}

.desk-modal[hidden]{
  display:none !important;
}

.desk-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(8, 17, 29, 0.78);
  backdrop-filter:blur(10px);
}

.desk-modal-dialog{
  position:relative;
  z-index:1;
  width:min(1100px, calc(100vw - 32px));
  max-height:calc(100vh - 32px);
  overflow:auto;
  border-radius:24px;
}

.member-notification-page-dialog{
  width:min(980px, calc(100vw - 32px));
}

.member-notification-page-card{
  margin-top:4px;
}

.desk-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:20px;
  padding-bottom:16px;
  border-bottom:1px solid var(--line);
}

.librarian-desk-queue-grid{
  grid-template-columns:repeat(auto-fit, minmax(420px, 1fr));
  align-items:start;
}

.borrow-records-toolbar{
  display:grid;
  grid-template-columns:minmax(0, 1.3fr) minmax(180px, 220px) auto;
  align-items:end;
  gap:14px;
  margin-top:12px;
}

.borrow-records-toolbar .grow{
  min-width:0;
}

.borrow-records-toolbar .inline-actions{
  align-self:end;
  justify-self:end;
}

.librarian-queue-searchbar{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:end;
  gap:14px;
}

.librarian-queue-searchbar .grow{
  min-width:0;
}

.librarian-queue-searchbar .inline-actions{
  display:flex;
  align-items:end;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.grid.cards.librarian-borrow-batch-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  align-items:stretch;
}

.librarian-batch-summary-card{
  display:grid;
  grid-template-rows:auto 1fr;
  gap:14px;
  min-height:180px;
  padding:20px;
  border-radius:24px;
  text-decoration:none;
  color:inherit;
  border:1px solid rgba(255,255,255,0.09);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.022);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.librarian-batch-summary-card:hover{
  text-decoration:none;
  transform:translateY(-2px);
}

.librarian-batch-summary-card.is-actionable{
  border-color:rgba(113,227,184,0.2);
  box-shadow:0 18px 34px rgba(4,18,34,0.2), inset 0 1px 0 rgba(113,227,184,0.08);
}

.librarian-batch-summary-card.is-return-ready{
  border-color:rgba(255,214,102,0.18);
  box-shadow:0 18px 34px rgba(4,18,34,0.2), inset 0 1px 0 rgba(255,214,102,0.06);
}

.librarian-batch-summary-card.is-blocked{
  border-color:rgba(255,255,255,0.06);
  opacity:.96;
}

.librarian-batch-head,
.librarian-batch-item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.librarian-batch-head{
  padding-bottom:14px;
  margin-bottom:14px;
  border-bottom:1px solid rgba(255,255,255,0.08);
}

.librarian-batch-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
  align-items:flex-start;
}

.librarian-batch-preview{
  margin:8px 0 0;
  max-width:58ch;
  color:#f4f8ff;
  font-weight:600;
  line-height:1.45;
}

.librarian-batch-status-line{
  margin-top:10px;
}

.librarian-batch-status-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:34px;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.04);
  font-weight:700;
}

.librarian-batch-status-badge.is-actionable{
  border-color:rgba(113,227,184,0.18);
  background:rgba(113,227,184,0.08);
  color:#d8ffee;
}

.librarian-batch-status-badge.is-return-ready{
  border-color:rgba(255,214,102,0.2);
  background:rgba(255,214,102,0.09);
  color:#fff2c4;
}

.librarian-batch-status-badge.is-blocked{
  border-color:rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.03);
  color:rgba(232,240,252,0.88);
}

.librarian-batch-list{
  gap:10px;
}

.librarian-batch-item{
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.07);
  background:linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
}

.librarian-batch-item.is-actionable{
  border-color:rgba(113,227,184,0.16);
  background:
    linear-gradient(180deg, rgba(113,227,184,0.08), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.024);
}

.librarian-batch-item.is-return-ready{
  border-color:rgba(255,214,102,0.18);
  background:
    linear-gradient(180deg, rgba(255,214,102,0.08), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.024);
}

.librarian-batch-item.is-blocked{
  border-color:rgba(255,255,255,0.05);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.012)),
    rgba(255,255,255,0.016);
}

.librarian-batch-item .inline-form button{
  min-height:42px;
  padding-inline:16px;
  font-weight:800;
}

.approval-days-control{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-right:8px;
  font-size:.85rem;
}

.approval-days-control select{
  min-height:38px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(13,24,38,0.86);
  color:var(--text);
  padding:0 34px 0 12px;
  font-weight:700;
}

.librarian-batch-card .flow-top-md{
  margin-top:14px;
}

.librarian-batch-primary-action{
  margin-top:auto;
  padding:14px 16px 0;
  border-top:1px solid rgba(255,255,255,0.08);
}

.librarian-batch-primary-action .inline-form button{
  width:100%;
  min-height:46px;
  font-weight:800;
}

.librarian-batch-primary-action.is-blocked{
  border-top-color:rgba(255,255,255,0.05);
}

.manage-books-records-head{
  display:grid;
  gap:14px;
}

.manage-books-summary-chips{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-top:16px;
}

.manage-books-stock-cell,
.manage-books-action-cell{
  vertical-align:middle;
}

.manage-books-stock-stack,
.manage-books-action-stack{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:88px;
}

.manage-books-action-stack .inline-form{
  display:flex;
}

.manage-books-action-stack .button,
.manage-books-action-stack button{
  min-width:82px;
}

.manage-books-printcontrol{
  min-width:0;
  margin-right:0;
}

.manage-books-printbar{
  display:grid;
  grid-template-columns:minmax(260px, 340px);
  align-items:start;
  margin-top:0;
  gap:6px;
}

.manage-books-printcontrol .manage-users-print-label{
  margin-bottom:7px;
}

.manage-books-printhint{
  display:block;
}

.manage-books-print-hint{
  display:block;
  max-width:340px;
  padding-left:4px;
  line-height:1.25;
  font-size:0.76rem;
  opacity:0.8;
  letter-spacing:0.01em;
}

.manage-books-print-action{
  display:flex;
  align-items:flex-end;
}

.manage-books-printbar .button,
#runBooksPrintAction{
  width:100%;
}

.manage-books-tablefilters{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(180px, 220px) minmax(280px, 360px) auto;
  gap:14px 20px;
  align-items:start;
}

.manage-books-tablefilters > div{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}

.manage-books-tablefilters .grow{
  min-width:220px;
}

.manage-books-tablefilters .inline-actions{
  align-self:stretch;
  flex-wrap:nowrap;
  gap:12px;
  align-items:flex-start;
  justify-self:end;
  padding-top:25px;
}

.manage-books-tablefilters .inline-actions::before{
  content:none;
}

.manage-books-tablefilters .inline-actions .button,
.manage-books-tablefilters .inline-actions button{
  flex:0 0 auto;
}

@media (max-width: 720px){
  .manage-books-printcontrol{
    padding-right:0;
    border-right:0;
  }

  .manage-books-printbar{
    grid-template-columns:minmax(0, 1fr);
  }

  .manage-books-print-action{
    width:100%;
  }

  .manage-books-printcontrol{
    margin-right:0;
  }

  .manage-books-tablefilters{
    min-width:0;
  }

  .manage-books-tablefilters{
    grid-template-columns:minmax(0, 1fr);
  }

  .manage-books-tablefilters .inline-actions{
    flex-wrap:wrap;
    padding-left:0;
  }
}

.librarian-edit-book-grid{
  align-items:start;
}

.librarian-edit-book-main .grid.form{
  gap:16px 18px;
}

.librarian-edit-book-actions{
  justify-content:flex-start;
}

.librarian-edit-book-actions .button,
.librarian-edit-book-actions button{
  min-width:144px;
}

.librarian-edit-book-stock-grid,
.librarian-book-add-stock-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:14px;
}

.librarian-edit-book-stock-card,
.librarian-book-add-stock-card{
  min-height:120px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:8px;
}

.librarian-edit-book-stock-card strong,
.librarian-book-add-stock-card strong{
  font-size:1.8rem;
  line-height:1;
}

.librarian-edit-book-stock-controls{
  gap:16px 18px;
}

.librarian-edit-book-chips{
  row-gap:10px;
}

.librarian-edit-book-side .empty-state{
  min-height:56px;
}

.member-dashboard-alert .meta-top-sm{
  padding-left:2px;
}

.member-shell{
  --member-sidebar-width:272px;
  display:grid;
  grid-template-columns:var(--member-sidebar-width) minmax(0, 1fr);
  gap:20px;
  align-items:start;
}

.admin-shell.member-shell{
  --member-sidebar-width:220px;
  gap:16px;
}

.admin-shell .member-main{
  display:grid;
  gap:18px;
}

.admin-shell .topbar.topbar-admin{
  align-items:flex-start;
  min-height:132px;
  padding:24px 28px 22px;
  margin-bottom:0;
  border-radius:26px;
  border-color:rgba(143,211,255,0.14);
  background:
    radial-gradient(circle at top right, rgba(143,211,255,0.16), transparent 24%),
    linear-gradient(135deg, rgba(255,255,255,0.075), rgba(255,255,255,0.03)),
    linear-gradient(145deg, rgba(12,31,53,0.92), rgba(6,17,31,0.96));
  box-shadow:0 24px 46px rgba(0,0,0,0.24);
}

.admin-shell .topbar.topbar-admin::before{
  content:"";
  position:absolute;
  inset:14px 14px auto 14px;
  height:1px;
  background:linear-gradient(90deg, rgba(255,255,255,0.12), transparent 72%);
  pointer-events:none;
}

.admin-shell .topbar-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:max-content;
  max-width:100%;
  margin:0 0 10px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(143,211,255,0.16);
  background:rgba(143,211,255,0.08);
  color:#cfe8ff;
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.admin-shell .topbar-kicker::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:999px;
  background:var(--brand);
  box-shadow:0 0 0 5px rgba(143,211,255,0.1);
  flex:0 0 auto;
}

.admin-shell .topbar.topbar-admin h1{
  max-width:16ch;
  font-size:clamp(2rem, 2.4vw, 2.75rem);
}

.admin-shell .topbar.topbar-admin p:last-child{
  max-width:68ch;
  font-size:14px;
}

.admin-shell .stack{
  gap:20px;
}

.admin-shell .panel,
.admin-shell .card{
  border-radius:24px;
  border-color:rgba(143,211,255,0.1);
  background:
    radial-gradient(circle at top right, rgba(143,211,255,0.08), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
    linear-gradient(145deg, rgba(12,31,53,0.9), rgba(7,18,32,0.94));
}

.admin-shell .panel{
  padding:22px;
}

.admin-shell .card-head{
  margin-bottom:18px;
  align-items:flex-start;
}

.admin-shell .heading-panel,
.admin-shell .heading-card,
.admin-shell .heading-top-md{
  letter-spacing:-0.02em;
}

.admin-shell .heading-panel,
.admin-shell .heading-card{
  margin-bottom:8px;
}

.admin-shell .eyebrow-compact,
.admin-shell .stack-copy{
  color:#9fc7ea;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-size:11px;
  font-weight:800;
}

.admin-shell .stat-grid{
  gap:16px;
  grid-template-columns:repeat(auto-fit, minmax(190px, 1fr));
}

.admin-shell .stat-card{
  min-height:164px;
  padding:22px;
  border-radius:22px;
  border-color:rgba(143,211,255,0.1);
  background:
    radial-gradient(circle at top right, rgba(143,211,255,0.18), transparent 34%),
    linear-gradient(180deg, rgba(20,43,69,0.96), rgba(8,24,41,0.92));
  box-shadow:0 16px 30px rgba(0,0,0,0.14);
}

.admin-shell .stat-card strong{
  font-size:clamp(2rem, 2.6vw, 2.85rem);
}

.admin-shell .stat-card .muted{
  max-width:20ch;
  color:#bfd0e6;
}

.admin-shell .toolbar-top{
  gap:16px;
}

:root[data-theme="light"] .admin-shell .topbar.topbar-admin{
  border-color:rgba(47,109,255,0.16);
  background:
    radial-gradient(circle at top right, rgba(47,109,255,0.12), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,248,255,0.95)),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(239,245,255,0.94));
  box-shadow:0 20px 38px rgba(34,63,112,0.12);
}

:root[data-theme="light"] .admin-shell .topbar-kicker{
  border-color:rgba(47,109,255,0.14);
  background:rgba(47,109,255,0.08);
  color:#29507d;
}

:root[data-theme="light"] .admin-shell .topbar-kicker::before{
  box-shadow:0 0 0 5px rgba(47,109,255,0.08);
}

:root[data-theme="light"] .admin-shell .panel,
:root[data-theme="light"] .admin-shell .card{
  border-color:rgba(47,109,255,0.14);
  background:
    radial-gradient(circle at top right, rgba(47,109,255,0.08), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,248,255,0.94)),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(240,246,255,0.92));
}

:root[data-theme="light"] .admin-shell .eyebrow-compact,
:root[data-theme="light"] .admin-shell .stack-copy{
  color:#54779e;
}

:root[data-theme="light"] .admin-shell .stat-card{
  border-color:rgba(47,109,255,0.14);
  background:
    radial-gradient(circle at top right, rgba(47,109,255,0.14), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(239,245,255,0.96));
  box-shadow:0 14px 24px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .admin-shell .stat-card .muted{
  color:#59708d;
}

.librarian-shell{
  width:calc(100% - 20px);
  max-width:none;
  margin:0 10px 0 8px;
}

.librarian-shell.member-shell{
  --member-sidebar-width:228px;
  gap:16px;
}

.librarian-shell .member-main{
  display:grid;
  gap:18px;
}

.librarian-shell .topbar.topbar-librarian{
  align-items:flex-start;
  min-height:128px;
  padding:24px 28px 22px;
  margin-bottom:0;
  border-radius:26px;
  border-color:rgba(110,224,186,0.14);
  background:
    radial-gradient(circle at top right, rgba(110,224,186,0.16), transparent 24%),
    linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03)),
    linear-gradient(145deg, rgba(9,35,42,0.94), rgba(6,21,31,0.96));
  box-shadow:0 22px 42px rgba(0,0,0,0.22);
}

.librarian-shell .topbar.topbar-librarian::before{
  content:"";
  position:absolute;
  inset:14px 14px auto 14px;
  height:1px;
  background:linear-gradient(90deg, rgba(255,255,255,0.14), transparent 72%);
  pointer-events:none;
}

.librarian-shell .topbar-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:max-content;
  max-width:100%;
  margin:0 0 10px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(110,224,186,0.16);
  background:rgba(110,224,186,0.08);
  color:#d6fff0;
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.librarian-shell .topbar-kicker::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:999px;
  background:#6ee0ba;
  box-shadow:0 0 0 5px rgba(110,224,186,0.1);
  flex:0 0 auto;
}

.librarian-shell .topbar.topbar-librarian h1{
  max-width:16ch;
  font-size:clamp(1.95rem, 2.35vw, 2.65rem);
}

.librarian-shell .topbar.topbar-librarian p:last-child{
  max-width:68ch;
  font-size:14px;
}

.librarian-shell .stack{
  gap:20px;
}

.librarian-shell .panel,
.librarian-shell .card{
  border-radius:24px;
  border-color:rgba(110,224,186,0.1);
  background:
    radial-gradient(circle at top right, rgba(110,224,186,0.08), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
    linear-gradient(145deg, rgba(9,35,42,0.92), rgba(7,24,33,0.94));
}

.librarian-shell .panel{
  padding:22px;
}

.librarian-shell .card-head{
  margin-bottom:18px;
  align-items:flex-start;
}

.librarian-shell .heading-panel,
.librarian-shell .heading-card,
.librarian-shell .heading-top-md{
  letter-spacing:-0.02em;
}

.librarian-shell .heading-panel,
.librarian-shell .heading-card{
  margin-bottom:8px;
}

.librarian-shell .eyebrow-compact,
.librarian-shell .stack-copy{
  color:#9fd8c5;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-size:11px;
  font-weight:800;
}

.librarian-shell .stat-grid{
  gap:16px;
  grid-template-columns:repeat(auto-fit, minmax(190px, 1fr));
}

.librarian-shell .stat-card{
  min-height:160px;
  padding:22px;
  border-radius:22px;
  border-color:rgba(110,224,186,0.1);
  background:
    radial-gradient(circle at top right, rgba(110,224,186,0.18), transparent 34%),
    linear-gradient(180deg, rgba(14,47,57,0.96), rgba(7,24,33,0.92));
  box-shadow:0 16px 28px rgba(0,0,0,0.14);
}

.librarian-shell .stat-card strong{
  font-size:clamp(1.95rem, 2.5vw, 2.75rem);
}

.librarian-shell .stat-card .muted{
  max-width:20ch;
  color:#c3dbd4;
}

.librarian-shell .toolbar-top{
  gap:16px;
}

.librarian-shell .member-sidebar{
  border-color:rgba(110,224,186,0.1);
  background:
    linear-gradient(170deg, rgba(9,35,42,0.97), rgba(6,21,31,0.96)),
    rgba(6,21,31,0.92);
}

.librarian-shell .member-sidebar::after{
  background:
    radial-gradient(circle at top left, rgba(110,224,186,0.14), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 16%);
}

.librarian-shell .member-sidebar-toggle,
.librarian-shell .member-sidebar-link,
.librarian-shell .member-sidebar .theme-toggle{
  border-color:rgba(110,224,186,0.08);
}

.librarian-shell .member-sidebar-group-label{
  color:rgba(171,220,205,0.72);
}

.librarian-shell .member-sidebar-group-label::before{
  background:rgba(110,224,186,0.78);
  box-shadow:0 0 0 4px rgba(110,224,186,0.08);
}

.librarian-shell .member-sidebar-section::after{
  background:linear-gradient(90deg, rgba(110,224,186,0.32), transparent);
}

.librarian-shell .member-sidebar-link:hover,
.librarian-shell .member-sidebar .theme-toggle:hover{
  border-color:rgba(110,224,186,0.26);
  background:
    linear-gradient(180deg, rgba(110,224,186,0.12), rgba(110,224,186,0.05)),
    rgba(110,224,186,0.08);
}

.librarian-shell .member-sidebar-link::after{
  background:linear-gradient(90deg, rgba(110,224,186,0.14), transparent 42%);
}

.librarian-shell .member-sidebar-link:focus-visible,
.librarian-shell .member-sidebar .theme-toggle:focus-visible{
  border-color:rgba(110,224,186,0.42);
  box-shadow:0 0 0 3px rgba(110,224,186,0.12), 0 12px 24px rgba(6,17,31,0.18);
}

.librarian-shell .member-sidebar-link.is-active{
  border-color:rgba(110,224,186,0.34);
  background:
    linear-gradient(180deg, rgba(110,224,186,0.18), rgba(110,224,186,0.06)),
    rgba(7,24,33,0.44);
  box-shadow:0 14px 28px rgba(7,24,33,0.28), 0 0 0 1px rgba(110,224,186,0.08);
}

.librarian-shell .member-sidebar-link.is-active::before{
  background:rgba(110,224,186,0.98);
}

.librarian-shell .member-sidebar-link.is-active .dashboard-icon{
  border-color:rgba(110,224,186,0.22);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.16), rgba(110,224,186,0.08)),
    rgba(255,255,255,0.06);
}

.librarian-shell .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link:first-child{
  border-color:rgba(110,224,186,0.14);
  background:
    linear-gradient(180deg, rgba(110,224,186,0.08), rgba(110,224,186,0.03)),
    rgba(255,255,255,0.02);
}

:root[data-theme="light"] .librarian-shell .topbar.topbar-librarian{
  border-color:rgba(38,157,128,0.16);
  background:
    radial-gradient(circle at top right, rgba(38,157,128,0.12), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,249,247,0.95)),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(238,246,243,0.94));
  box-shadow:0 20px 38px rgba(38,94,88,0.12);
}

:root[data-theme="light"] .librarian-shell .topbar-kicker{
  border-color:rgba(38,157,128,0.14);
  background:rgba(38,157,128,0.08);
  color:#245d55;
}

:root[data-theme="light"] .librarian-shell .topbar-kicker::before{
  background:#269d80;
  box-shadow:0 0 0 5px rgba(38,157,128,0.08);
}

:root[data-theme="light"] .librarian-shell .panel,
:root[data-theme="light"] .librarian-shell .card{
  border-color:rgba(38,157,128,0.14);
  background:
    radial-gradient(circle at top right, rgba(38,157,128,0.08), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,249,247,0.94)),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(239,247,244,0.92));
}

:root[data-theme="light"] .librarian-shell .eyebrow-compact,
:root[data-theme="light"] .librarian-shell .stack-copy{
  color:#5b867e;
}

:root[data-theme="light"] .librarian-shell .stat-card{
  border-color:rgba(38,157,128,0.14);
  background:
    radial-gradient(circle at top right, rgba(38,157,128,0.14), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(238,246,243,0.96));
  box-shadow:0 14px 24px rgba(38,94,88,0.08);
}

:root[data-theme="light"] .librarian-shell .stat-card .muted{
  color:#5f7774;
}

:root[data-theme="light"] .librarian-shell .member-sidebar{
  border-color:rgba(38,157,128,0.14);
  background:
    linear-gradient(170deg, rgba(255,255,255,0.98), rgba(242,249,246,0.96)),
    rgba(255,255,255,0.94);
}

:root[data-theme="light"] .librarian-shell .member-sidebar::after{
  background:
    radial-gradient(circle at top left, rgba(38,157,128,0.1), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.7), transparent 14%);
}

:root[data-theme="light"] .librarian-shell .member-sidebar-toggle,
:root[data-theme="light"] .librarian-shell .member-sidebar-link,
:root[data-theme="light"] .librarian-shell .member-sidebar .theme-toggle{
  border-color:rgba(38,157,128,0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(240,247,244,0.88)),
    rgba(38,157,128,0.04);
  color:#1f4a44;
}

:root[data-theme="light"] .librarian-shell .member-sidebar-group-label{
  color:rgba(41,102,92,0.56);
}

:root[data-theme="light"] .librarian-shell .member-sidebar-group-label::before{
  background:rgba(38,157,128,0.76);
  box-shadow:0 0 0 4px rgba(38,157,128,0.08);
}

:root[data-theme="light"] .librarian-shell .member-sidebar-section::after{
  background:linear-gradient(90deg, rgba(38,157,128,0.26), transparent);
}

:root[data-theme="light"] .librarian-shell .member-sidebar-link:hover,
:root[data-theme="light"] .librarian-shell .member-sidebar .theme-toggle:hover{
  border-color:rgba(38,157,128,0.24);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(234,244,240,0.92)),
    rgba(38,157,128,0.08);
}

:root[data-theme="light"] .librarian-shell .member-sidebar-link::after{
  background:linear-gradient(90deg, rgba(38,157,128,0.12), transparent 42%);
}

:root[data-theme="light"] .librarian-shell .member-sidebar-link:focus-visible,
:root[data-theme="light"] .librarian-shell .member-sidebar .theme-toggle:focus-visible{
  border-color:rgba(38,157,128,0.34);
  box-shadow:0 0 0 3px rgba(38,157,128,0.1), 0 12px 22px rgba(38,94,88,0.1);
}

:root[data-theme="light"] .librarian-shell .member-sidebar-link.is-active{
  border-color:rgba(38,157,128,0.36);
  background:
    linear-gradient(180deg, rgba(255,255,255,1), rgba(229,242,238,0.96)),
    linear-gradient(180deg, rgba(38,157,128,0.18), rgba(38,157,128,0.08)),
    rgba(255,255,255,0.94);
  color:#173f39;
  box-shadow:0 16px 28px rgba(38,94,88,0.12), 0 0 0 1px rgba(38,157,128,0.08);
}

:root[data-theme="light"] .librarian-shell .member-sidebar-link.is-active::before{
  background:#269d80;
}

:root[data-theme="light"] .librarian-shell .member-sidebar-link.is-active .dashboard-icon{
  border-color:rgba(38,157,128,0.2);
  background:
    linear-gradient(180deg, rgba(255,255,255,1), rgba(231,243,239,0.96)),
    rgba(38,157,128,0.08);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.92), 0 8px 16px rgba(38,94,88,0.08);
}

:root[data-theme="light"] .librarian-shell .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link:first-child{
  border-color:rgba(38,157,128,0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(235,245,241,0.92)),
    rgba(38,157,128,0.05);
}

@media (min-width: 769px){
  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell){
    width:calc(100% - 20px);
    max-width:none;
    margin:0 10px 0 8px;
  }
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell){
  --member-sidebar-width:236px;
  gap:18px;
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-main{
  display:grid;
  gap:18px;
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar.topbar-member{
  align-items:flex-start;
  min-height:126px;
  padding:24px 28px 22px;
  margin-bottom:0;
  border-radius:26px;
  border-color:rgba(123,219,255,0.14);
  background:
    radial-gradient(circle at top right, rgba(123,219,255,0.16), transparent 24%),
    linear-gradient(135deg, rgba(255,255,255,0.075), rgba(255,255,255,0.03)),
    linear-gradient(145deg, rgba(12,30,49,0.94), rgba(7,18,32,0.97));
  box-shadow:0 22px 42px rgba(0,0,0,0.22);
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar.topbar-member::before{
  content:"";
  position:absolute;
  inset:14px 14px auto 14px;
  height:1px;
  background:linear-gradient(90deg, rgba(255,255,255,0.14), transparent 72%);
  pointer-events:none;
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:max-content;
  max-width:100%;
  margin:0 0 10px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(123,219,255,0.16);
  background:rgba(123,219,255,0.08);
  color:#d8f4ff;
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar-kicker::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:999px;
  background:#7bdbff;
  box-shadow:0 0 0 5px rgba(123,219,255,0.1);
  flex:0 0 auto;
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar.topbar-member h1{
  max-width:16ch;
  font-size:clamp(1.95rem, 2.35vw, 2.65rem);
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar.topbar-member p:last-child{
  max-width:68ch;
  font-size:14px;
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .stack{
  gap:20px;
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .panel,
.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .card{
  border-radius:24px;
  border-color:rgba(123,219,255,0.09);
  background:
    radial-gradient(circle at top right, rgba(123,219,255,0.08), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
    linear-gradient(145deg, rgba(12,31,50,0.92), rgba(7,19,34,0.95));
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .panel{
  padding:22px;
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .card-head{
  margin-bottom:18px;
  align-items:flex-start;
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .heading-panel,
.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .heading-card,
.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .heading-top-md{
  letter-spacing:-0.02em;
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .eyebrow-compact,
.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .stack-copy{
  color:#a8dff4;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-size:11px;
  font-weight:800;
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .stat-grid{
  gap:16px;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .stat-card{
  min-height:156px;
  padding:22px;
  border-radius:22px;
  border-color:rgba(123,219,255,0.1);
  background:
    radial-gradient(circle at top right, rgba(123,219,255,0.16), transparent 34%),
    linear-gradient(180deg, rgba(18,41,64,0.96), rgba(8,23,40,0.92));
  box-shadow:0 16px 30px rgba(0,0,0,0.14);
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .stat-card strong{
  font-size:clamp(1.95rem, 2.45vw, 2.7rem);
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .stat-card .muted{
  max-width:22ch;
  color:#c2d7e7;
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar{
  border-color:rgba(123,219,255,0.12);
  background:
    radial-gradient(circle at top right, rgba(123,219,255,0.12), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    linear-gradient(180deg, rgba(11,28,48,0.98), rgba(8,20,35,0.99));
  box-shadow:0 24px 42px rgba(0,0,0,0.22);
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar::after{
  background:linear-gradient(180deg, rgba(123,219,255,0.18), transparent 24%, transparent 78%, rgba(123,219,255,0.08));
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-toggle,
.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link,
.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar .theme-toggle{
  border-color:rgba(123,219,255,0.1);
  background:linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-group-label{
  color:#98bed3;
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-group-label::before{
  background:rgba(123,219,255,0.28);
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-section::after{
  background:linear-gradient(90deg, rgba(123,219,255,0.16), transparent);
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link:hover,
.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar .theme-toggle:hover{
  border-color:rgba(123,219,255,0.16);
  background:
    radial-gradient(circle at left center, rgba(123,219,255,0.12), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link:focus-visible,
.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar .theme-toggle:focus-visible{
  border-color:rgba(123,219,255,0.22);
  box-shadow:0 0 0 3px rgba(123,219,255,0.16);
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link.is-active{
  border-color:rgba(123,219,255,0.22);
  background:
    radial-gradient(circle at left center, rgba(123,219,255,0.18), transparent 34%),
    linear-gradient(180deg, rgba(39,72,102,0.92), rgba(20,42,67,0.92));
  box-shadow:0 16px 28px rgba(0,0,0,0.18);
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link.is-active::before{
  background:linear-gradient(180deg, #a9efff, #66ccff);
  box-shadow:0 0 0 6px rgba(123,219,255,0.08);
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link.is-active .dashboard-icon{
  color:#ecfbff;
  border-color:rgba(123,219,255,0.2);
  background:linear-gradient(180deg, rgba(123,219,255,0.18), rgba(123,219,255,0.08));
}

.site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link:first-child{
  border-color:rgba(123,219,255,0.14);
  background:
    radial-gradient(circle at left center, rgba(123,219,255,0.12), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar.topbar-member{
  border-color:rgba(49,118,182,0.16);
  background:
    radial-gradient(circle at top right, rgba(95,180,226,0.14), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,248,252,0.95)),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(240,247,252,0.94));
  box-shadow:0 20px 38px rgba(37,71,110,0.1);
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar-kicker{
  border-color:rgba(95,180,226,0.16);
  background:rgba(95,180,226,0.08);
  color:#35617d;
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar-kicker::before{
  box-shadow:0 0 0 5px rgba(95,180,226,0.08);
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .panel,
:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .card{
  border-color:rgba(95,180,226,0.12);
  background:
    radial-gradient(circle at top right, rgba(95,180,226,0.08), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,249,252,0.95)),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(241,247,252,0.93));
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .eyebrow-compact,
:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .stack-copy{
  color:#5a7d96;
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .stat-card{
  border-color:rgba(95,180,226,0.14);
  background:
    radial-gradient(circle at top right, rgba(95,180,226,0.14), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(241,247,252,0.96));
  box-shadow:0 14px 24px rgba(37,71,110,0.08);
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .stat-card .muted{
  color:#5d7489;
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar{
  border-color:rgba(95,180,226,0.16);
  background:
    radial-gradient(circle at top right, rgba(95,180,226,0.08), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,249,253,0.98));
  box-shadow:0 28px 62px rgba(37,71,110,0.14);
  backdrop-filter:blur(14px);
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar::after{
  background:linear-gradient(180deg, rgba(95,180,226,0.18), transparent 20%, transparent 76%, rgba(95,180,226,0.1));
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-toggle,
:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link,
:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar .theme-toggle{
  border-color:rgba(95,180,226,0.2);
  background:linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,248,252,0.98));
  color:#233d58;
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-group-label{
  color:#5b7f9f;
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-group-label::before{
  background:rgba(95,180,226,0.25);
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-section::after{
  background:linear-gradient(90deg, rgba(95,180,226,0.24), transparent);
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link:hover,
:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar .theme-toggle:hover{
  border-color:rgba(95,180,226,0.32);
  background:
    radial-gradient(circle at left center, rgba(95,180,226,0.14), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,1), rgba(244,249,253,0.98));
  box-shadow:0 14px 26px rgba(14,48,81,0.12);
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link:focus-visible,
:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar .theme-toggle:focus-visible{
  border-color:rgba(95,180,226,0.28);
  box-shadow:0 0 0 3px rgba(95,180,226,0.16), 0 12px 28px rgba(14,48,81,0.12);
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link.is-active{
  border-color:rgba(95,180,226,0.32);
  background:
    radial-gradient(circle at left center, rgba(95,180,226,0.16), transparent 40%),
    linear-gradient(180deg, rgba(245,252,255,0.98), rgba(229,241,250,0.96));
  box-shadow:0 18px 34px rgba(14,48,81,0.14);
  color:#1d405f;
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link.is-active::before{
  box-shadow:0 0 0 6px rgba(95,180,226,0.12);
  background:linear-gradient(180deg, #86d1ff, #5faae1);
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link.is-active .dashboard-icon{
  color:#1f4363;
  border-color:rgba(95,180,226,0.24);
  background:linear-gradient(180deg, rgba(65,130,186,0.18), rgba(95,180,226,0.11));
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.8), 0 7px 18px rgba(17,55,86,0.12);
}

:root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link:first-child{
  border-color:rgba(95,180,226,0.18);
  background:
    radial-gradient(circle at left center, rgba(95,180,226,0.12), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,248,252,0.96));
}

.admin-record-filters{
  display:grid;
  grid-template-columns:minmax(220px, 1.35fr) repeat(2, minmax(170px, 0.95fr)) minmax(96px, max-content);
  gap:14px 16px;
  align-items:end;
}

.toolbar > form.admin-record-filters{
  background:transparent;
  border:0;
  box-shadow:none;
  padding:0;
  border-radius:0;
}

.admin-record-filters > div{
  min-width:0;
}

.admin-record-filters > .grow{
  min-width:180px;
}

.admin-record-filters label{
  display:block;
  margin-bottom:8px;
}

.admin-record-filters .ui-select-shell,
.admin-record-filters .ui-select{
  min-width:0;
  width:100%;
  box-sizing:border-box;
}

.admin-record-filters .inline-actions{
  align-items:flex-end;
  justify-content:flex-end;
  justify-self:end;
  flex-wrap:nowrap;
  gap:10px;
  padding-left:0;
  min-width:0;
  align-self:end;
  margin-left:8px;
}

.admin-record-filters .inline-actions .button,
.admin-record-filters .inline-actions button{
  min-width:94px;
  margin:0;
  min-height:48px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 18px;
}

@media (max-width: 1180px){
  .admin-record-filters{
    grid-template-columns:minmax(220px, 1.2fr) repeat(2, minmax(160px, 1fr));
  }

  .admin-record-filters .inline-actions{
    grid-column:1 / -1;
    justify-self:start;
    justify-content:flex-start;
    margin-left:0;
  }
}

.penalties-record-filters{
  grid-template-columns:repeat(2, minmax(180px, 220px));
  gap:16px 18px;
}

.penalties-record-filters .inline-actions{
  grid-column:1 / -1;
  justify-self:start;
  align-self:end;
  gap:12px;
  padding-left:0;
  margin-left:0;
  margin-top:2px;
  flex-wrap:wrap;
}

.penalties-record-filters .inline-actions .button,
.penalties-record-filters .inline-actions button{
  min-width:88px;
  box-shadow:none;
}

.penalties-record-filters .ui-select-shell{
  min-width:0;
}

.toolbar > form.penalties-record-filters{
  flex:1 1 420px;
}

.audit-log-filters{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(180px, 220px) auto;
  gap:12px;
  align-items:end;
}

.audit-log-filters .grow{
  min-width:0;
}

.audit-log-filters .inline-actions{
  justify-self:start;
  align-self:end;
}

:root[data-theme="light"] .toolbar > form.admin-record-filters,
:root:not([data-theme="light"]) .toolbar > form.admin-record-filters{
  background:transparent;
  border:0;
  box-shadow:none;
  padding:0;
}

.admin-record-filters-compact{
  grid-template-columns:minmax(180px, 220px) auto;
}

@media (max-width: 820px){
  .admin-record-filters,
  .admin-record-filters-compact,
  .penalties-record-filters{
    grid-template-columns:minmax(0, 1fr);
  }

  .audit-log-filters{
    grid-template-columns:minmax(0, 1fr);
  }

  .admin-record-filters .inline-actions{
    justify-self:start;
    padding-left:0;
    flex-wrap:wrap;
  }

  .penalties-record-filters .inline-actions{
    margin-left:0;
    padding-left:0;
  }
}

.member-shell.is-collapsed{
  --member-sidebar-width:92px;
}

.member-sidebar{
  grid-column:1;
  position:sticky;
  top:16px;
  max-height:calc(100vh - 32px);
  margin-bottom:0;
  padding:14px;
  display:grid;
  align-content:start;
  grid-auto-rows:max-content;
  gap:10px;
  width:100%;
  min-width:0;
  overflow-x:visible;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  scrollbar-width:none;
  -ms-overflow-style:none;
  border:1px solid rgba(143,211,255,0.1);
  border-radius:24px;
  box-shadow:0 22px 44px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter:blur(18px);
  background:
    linear-gradient(170deg, rgba(12,31,53,0.96), rgba(6,17,31,0.95)),
    rgba(8,21,38,0.84);
}

.member-sidebar::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-radius:inherit;
  background:
    radial-gradient(circle at top left, rgba(143,211,255,0.14), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 16%);
  opacity:.9;
}

.member-sidebar::-webkit-scrollbar{
  width:0;
  height:0;
}

.member-sidebar-head{
  margin-bottom:4px;
  padding:4px 6px 10px;
  border-bottom:1px solid rgba(255,255,255,0.08);
  position:relative;
  z-index:1;
}

.member-main{
  grid-column:2;
  min-width:0;
}

.site-footer-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  margin-top:18px;
  padding:14px 26px;
  border-radius:20px;
  border:1px solid rgba(143,211,255,0.1);
  background:
    linear-gradient(180deg, rgba(11,26,45,0.98), rgba(7,18,32,0.97)),
    rgba(7,18,32,0.97);
  box-shadow:0 18px 36px rgba(0,0,0,0.18);
}

.site-desktop-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  width:100%;
  margin:0;
  padding:14px 26px;
  border:1px solid rgba(143,211,255,0.1);
  border-radius:0;
  border-left:0;
  border-right:0;
  border-top:0;
  background:
    linear-gradient(180deg, rgba(11,26,45,0.98), rgba(7,18,32,0.97)),
    rgba(7,18,32,0.97);
  box-shadow:0 18px 36px rgba(0,0,0,0.18);
  overflow:visible;
}

.site-desktop-header-theme{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
  padding:6px;
  margin:-6px;
  overflow:visible;
}

.student-header-notification-shortcut{
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  position:relative;
  color:#eef6ff;
  text-decoration:none;
  border:0 !important;
  border-radius:12px !important;
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  padding:0;
  cursor:pointer;
  appearance:none !important;
  -webkit-appearance:none !important;
  overflow:visible;
}

.student-mobile-notification-shortcut{
  min-height:36px !important;
  width:36px !important;
  height:36px !important;
}

.student-mobile-notification-shortcut .dashboard-icon{
  width:36px !important;
  height:36px !important;
}

.student-header-notification-shortcut .dashboard-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius:12px;
  background:linear-gradient(180deg, rgba(20,41,64,0.98), rgba(10,23,39,0.98)) !important;
  background-image:none !important;
  border:1px solid rgba(120,190,255,0.24) !important;
  box-shadow:0 12px 22px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.06) !important;
  color:#eef6ff !important;
  opacity:1 !important;
  visibility:visible !important;
}

.student-header-notification-shortcut .dashboard-icon::before{
  background:#eef6ff !important;
  box-shadow:none !important;
  opacity:1 !important;
  visibility:visible !important;
}

.student-header-notification-shortcut:hover .dashboard-icon,
.student-header-notification-shortcut:focus-visible .dashboard-icon,
.student-header-notification-shortcut:focus .dashboard-icon,
.student-header-notification-shortcut:active .dashboard-icon,
.student-header-notification-shortcut.is-active .dashboard-icon{
  background:linear-gradient(180deg, rgba(24,50,77,1), rgba(12,28,46,1)) !important;
  background-image:none !important;
  border:1px solid rgba(143,211,255,0.34) !important;
  box-shadow:0 14px 26px rgba(0,0,0,0.24), 0 0 0 1px rgba(143,211,255,0.08) !important;
  color:#eef6ff !important;
  transform:none !important;
  opacity:1 !important;
  visibility:visible !important;
}

.student-header-notification-shortcut:hover .dashboard-icon::before,
.student-header-notification-shortcut:focus-visible .dashboard-icon::before,
.student-header-notification-shortcut:focus .dashboard-icon::before,
.student-header-notification-shortcut:active .dashboard-icon::before,
.student-header-notification-shortcut.is-active .dashboard-icon::before{
  background:#eef6ff !important;
  box-shadow:none !important;
  transform:none !important;
  opacity:1 !important;
  visibility:visible !important;
}

.student-header-notification-shortcut:hover,
.student-header-notification-shortcut:focus-visible,
.student-header-notification-shortcut:focus,
.student-header-notification-shortcut:active,
.student-header-notification-shortcut.is-active{
  text-decoration:none;
  transform:none !important;
  opacity:1 !important;
  border:0 !important;
  border-radius:12px !important;
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  animation:none !important;
  outline:none !important;
}

:root[data-theme="light"] .student-header-notification-shortcut{
  color:#24476f !important;
}

:root[data-theme="light"] .student-header-notification-shortcut .dashboard-icon{
  background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,247,255,0.95)) !important;
  border:1px solid rgba(35,72,127,0.14) !important;
  box-shadow:0 10px 18px rgba(34,63,112,0.08) !important;
  color:#24476f !important;
}

:root[data-theme="light"] .student-header-notification-shortcut .dashboard-icon::before{
  background:#24476f !important;
}

:root[data-theme="light"] .student-header-notification-shortcut:hover .dashboard-icon,
:root[data-theme="light"] .student-header-notification-shortcut:focus-visible .dashboard-icon,
:root[data-theme="light"] .student-header-notification-shortcut:focus .dashboard-icon,
:root[data-theme="light"] .student-header-notification-shortcut:active .dashboard-icon,
:root[data-theme="light"] .student-header-notification-shortcut.is-active .dashboard-icon{
  background:linear-gradient(180deg, #ffffff, #edf4ff) !important;
  border:1px solid rgba(47,109,255,0.22) !important;
  box-shadow:0 12px 20px rgba(34,63,112,0.1) !important;
  color:#1d4169 !important;
}

:root[data-theme="light"] .student-header-notification-shortcut:hover .dashboard-icon::before,
:root[data-theme="light"] .student-header-notification-shortcut:focus-visible .dashboard-icon::before,
:root[data-theme="light"] .student-header-notification-shortcut:focus .dashboard-icon::before,
:root[data-theme="light"] .student-header-notification-shortcut:active .dashboard-icon::before,
:root[data-theme="light"] .student-header-notification-shortcut.is-active .dashboard-icon::before{
  background:#1d4169 !important;
}

.student-header-notification-shortcut::after{
  display:none !important;
  content:none !important;
}

.student-header-notification-badge{
  position:absolute;
  top:-5px;
  right:-6px;
  min-width:18px;
  height:18px;
  padding:0 4px;
  border-radius:999px;
  background:linear-gradient(180deg, #ff7d7d, #ef4444);
  color:#fff;
  font-size:10px;
  line-height:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-weight:700;
  border:2px solid rgba(9,22,37,0.96);
  box-shadow:0 8px 16px rgba(239,68,68,0.28), 0 4px 10px rgba(0,0,0,0.2);
}

.student-header-notification-badge[hidden]{
  display:none !important;
}

:root[data-theme="light"] .student-header-notification-badge{
  border-color:rgba(247,250,255,0.96);
  box-shadow:0 8px 14px rgba(239,68,68,0.24), 0 5px 12px rgba(62,92,138,0.14);
}

.student-header-notification-shortcut:has(.student-header-notification-badge:not([hidden])) .dashboard-icon{
  border-color:rgba(143,211,255,0.3) !important;
  box-shadow:0 12px 22px rgba(0,0,0,0.2), 0 0 0 2px rgba(143,211,255,0.14) !important;
}

.student-notification-panel{
  position:fixed;
  top:78px;
  right:16px;
  width:min(380px, calc(100vw - 24px));
  max-height:min(70vh, 620px);
  overflow:hidden;
  z-index:1180;
  border:1px solid rgba(138,198,244,0.16);
  border-radius:20px;
  background:
    linear-gradient(180deg, rgba(10, 25, 44, 0.96), rgba(8, 20, 35, 0.98)),
    rgba(8, 20, 35, 0.98);
  box-shadow:0 20px 34px rgba(2,10,20,0.3), 0 10px 20px rgba(0,0,0,0.18);
  backdrop-filter:blur(18px);
  transform-origin:top right;
  animation:soft-scale-in .22s var(--ease-standard) both;
}

.student-notification-panel::before{
  content:"";
  position:absolute;
  top:-9px;
  right:28px;
  width:18px;
  height:18px;
  border-top:1px solid rgba(138,198,244,0.16);
  border-left:1px solid rgba(138,198,244,0.16);
  background:linear-gradient(180deg, rgba(12, 30, 52, 0.98), rgba(10, 24, 40, 0.98));
  transform:rotate(45deg);
}

@media (max-width: 768px) {
  .student-notification-panel{
    top:62px;
    right:10px;
    left:10px;
    width:auto;
    max-height:calc(100dvh - 82px);
  }

  .student-notification-panel::before{
    display:none;
  }

  .student-notification-panel-body{
    max-height:calc(100dvh - 144px);
  }

  .student-header-notification-badge{
    top:-4px;
    right:-5px;
  }
}

.student-notification-panel-head{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  padding:15px 16px 14px;
  border-bottom:1px solid rgba(138,198,244,0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)),
    linear-gradient(90deg, rgba(120,184,234,0.08), transparent 55%);
}

.student-notification-panel-body{
  display:grid;
  gap:10px;
  max-height:calc(70vh - 62px);
  overflow:auto;
  padding:12px 16px 16px;
  scrollbar-width:thin;
  scrollbar-color:rgba(143,211,255,0.26) transparent;
  background:linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0));
}

.student-notification-section{
  display:grid;
  gap:10px;
}

.student-notification-section-label{
  padding:2px 2px 0;
  color:rgba(154,214,255,0.78);
  font-size:11px;
  font-weight:800;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.student-notification-panel-body::-webkit-scrollbar{
  width:10px;
}

.student-notification-panel-body::-webkit-scrollbar-thumb{
  border:3px solid transparent;
  border-radius:999px;
  background:rgba(143,211,255,0.22);
  background-clip:padding-box;
}

.student-notification-item{
  display:grid;
  gap:8px;
  padding:12px 14px;
  border:1px solid rgba(255,255,255,0.07);
  border-radius:16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.024);
  transition:transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.student-notification-kicker{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.student-notification-category-chip{
  min-height:24px;
  padding:4px 9px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.student-notification-relative-time{
  color:rgba(154,214,255,0.78);
  font-size:11px;
  line-height:1.35;
}

.student-notification-item.is-linked{
  cursor:pointer;
}

.student-notification-item:hover{
  transform:translateY(-1px);
  border-color:rgba(143,211,255,0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025)),
    rgba(255,255,255,0.04);
  box-shadow:0 10px 18px rgba(0,0,0,0.12);
}

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

.student-notification-title strong{
  color:var(--text);
}

.student-notification-copy,
.student-notification-meta,
.student-notification-empty{
  color:var(--muted);
}

.student-notification-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font-size:12px;
  line-height:1.45;
}

.student-notification-link-hint{
  color:#9ad6ff;
  font-weight:700;
  letter-spacing:.01em;
  white-space:nowrap;
}

.student-notification-read{
  opacity:0.78;
}

.student-notification-empty{
  padding:10px 2px 4px;
}

:root[data-theme="light"] .student-notification-panel{
  border-color:rgba(35,72,127,0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(242,247,255,0.97)),
    #ffffff;
  box-shadow:0 18px 30px rgba(34,63,112,0.14), 0 8px 18px rgba(34,63,112,0.08);
  backdrop-filter:none;
}

:root[data-theme="light"] .student-notification-panel::before{
  border-top-color:rgba(35,72,127,0.14);
  border-left-color:rgba(35,72,127,0.14);
  background:linear-gradient(180deg, rgba(255,255,255,0.99), rgba(242,247,255,0.97));
}

:root[data-theme="light"] .student-notification-panel-head{
  border-bottom-color:rgba(35,72,127,0.1);
  color:var(--text);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(243,247,255,0.9)),
    linear-gradient(90deg, rgba(74,138,232,0.08), transparent 55%);
}

:root[data-theme="light"] .student-notification-item{
  border-color:rgba(35,72,127,0.1);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,249,255,0.95)),
    rgba(255,255,255,0.96);
  box-shadow:0 10px 18px rgba(34,63,112,0.06);
}

:root[data-theme="light"] .student-notification-category-chip{
  border-color:rgba(58,114,198,0.12);
  background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,253,0.96));
  color:#6a7f97;
}

:root[data-theme="light"] .student-notification-relative-time{
  color:#7a8da7;
}

:root[data-theme="light"] .student-notification-section-label{
  color:#7a8da3;
}

:root[data-theme="light"] .student-notification-item:hover{
  border-color:rgba(47,109,255,0.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(239,245,255,0.95)),
    rgba(255,255,255,0.98);
  box-shadow:0 14px 22px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .student-notification-title strong{
  color:var(--text);
}

:root[data-theme="light"] .student-notification-copy,
:root[data-theme="light"] .student-notification-meta,
:root[data-theme="light"] .student-notification-empty{
  color:#5f738c;
}

:root[data-theme="light"] .student-notification-read{
  opacity:1;
  border-color:rgba(58,114,198,0.11);
  background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,253,0.96));
  color:#70839a;
}

:root[data-theme="light"] .student-notification-link-hint{
  color:#2f6dff;
}

:root[data-theme="light"] .student-notification-item:not(.is-read){
  border-color:rgba(83,138,214,0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.995), rgba(245,249,255,0.97)),
    rgba(255,255,255,0.99);
  box-shadow:0 12px 22px rgba(34,63,112,0.06);
}

:root[data-theme="light"] .student-notification-item:not(.is-read) .student-notification-category-chip{
  border-color:rgba(76,130,210,0.14);
  background:linear-gradient(180deg, rgba(251,253,255,0.99), rgba(240,246,253,0.97));
  color:#56728d;
}

:root[data-theme="light"] .student-notification-item:not(.is-read) .student-notification-title strong{
  color:#223247;
}

.site-desktop-header-toggle{
  min-height:42px;
  padding:0;
  width:42px;
  height:42px;
  border-radius:12px;
  border:0 !important;
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  appearance:none !important;
  -webkit-appearance:none !important;
  -webkit-tap-highlight-color:transparent !important;
  color:#eef6ff !important;
}

.site-desktop-header-toggle .theme-toggle-text{
  display:none;
}

.site-desktop-header-toggle .theme-toggle-icon{
  min-width:42px;
  min-height:42px;
  padding:0;
  border-radius:12px;
  background:rgba(255,255,255,0.06) !important;
  background-image:none !important;
  border:1px solid rgba(255,255,255,0.1) !important;
  box-shadow:0 10px 18px rgba(0,0,0,0.16) !important;
  color:#eef6ff !important;
}

.site-desktop-header-toggle .theme-toggle-icon svg{
  width:22px;
  height:22px;
}

.site-desktop-header-toggle::after{
  display:none !important;
  content:none !important;
}

.site-desktop-header-toggle:hover,
.site-desktop-header-toggle:focus,
.site-desktop-header-toggle:focus-visible,
.site-desktop-header-toggle:active,
.site-desktop-header-toggle[aria-pressed="true"],
.site-desktop-header-toggle[aria-pressed="false"]{
  border-color:transparent !important;
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  transform:none !important;
  outline:none !important;
}

.site-desktop-header-toggle:hover .theme-toggle-icon,
.site-desktop-header-toggle:focus .theme-toggle-icon,
.site-desktop-header-toggle:focus-visible .theme-toggle-icon,
.site-desktop-header-toggle:active .theme-toggle-icon,
.site-desktop-header-toggle[aria-pressed="true"] .theme-toggle-icon,
.site-desktop-header-toggle[aria-pressed="false"] .theme-toggle-icon{
  background:rgba(255,255,255,0.1) !important;
  background-image:none !important;
  border:1px solid rgba(143,211,255,0.24) !important;
  box-shadow:0 12px 22px rgba(0,0,0,0.18) !important;
  color:#eef6ff !important;
  transform:none !important;
}

:root[data-theme="light"] .site-desktop-header-toggle{
  color:#24476f !important;
}

:root[data-theme="light"] .site-desktop-header-toggle .theme-toggle-icon{
  background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,247,255,0.95)) !important;
  border:1px solid rgba(35,72,127,0.14) !important;
  box-shadow:0 10px 18px rgba(34,63,112,0.08) !important;
  color:#24476f !important;
}

:root[data-theme="light"] .site-desktop-header-toggle:hover .theme-toggle-icon,
:root[data-theme="light"] .site-desktop-header-toggle:focus .theme-toggle-icon,
:root[data-theme="light"] .site-desktop-header-toggle:focus-visible .theme-toggle-icon,
:root[data-theme="light"] .site-desktop-header-toggle:active .theme-toggle-icon,
:root[data-theme="light"] .site-desktop-header-toggle[aria-pressed="true"] .theme-toggle-icon,
:root[data-theme="light"] .site-desktop-header-toggle[aria-pressed="false"] .theme-toggle-icon{
  background:linear-gradient(180deg, #ffffff, #edf4ff) !important;
  border:1px solid rgba(47,109,255,0.22) !important;
  box-shadow:0 12px 20px rgba(34,63,112,0.1) !important;
  color:#1d4169 !important;
}

.site-footer-brand{
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
  color:inherit;
  text-decoration:none;
}

.site-footer-brand:hover{
  text-decoration:none;
}

.site-footer-brand-mark{
  width:38px;
  height:38px;
  border-radius:999px;
  border:1px solid rgba(143,211,255,0.22);
  object-fit:cover;
  flex:0 0 auto;
}

.site-footer-copy{
  display:grid;
  gap:4px;
}

.site-footer-copy strong{
  font-size:1rem;
  line-height:1.2;
}

.site-footer-copy span{
  color:var(--muted);
  font-size:.92rem;
}

.site-footer-nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:30px;
  flex:1 1 auto;
}

.site-footer-nav a{
  color:#d9e7f6;
  text-decoration:none;
  font-size:.96rem;
}

.site-footer-nav a:hover{
  color:#86d6ff;
  text-decoration:none;
}

.site-footer-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex:0 0 auto;
}

.site-footer-home-link{
  min-height:36px;
  padding:8px 16px;
}

.site-footer-theme-toggle{
  min-height:42px;
  padding:0;
  width:42px;
  height:42px;
  border-radius:14px;
}

.site-footer-theme-toggle .theme-toggle-text{
  display:none;
}

.site-footer-theme-toggle .theme-toggle-icon{
  min-width:42px;
  min-height:42px;
  padding:0;
  border-radius:14px;
}

.site-footer-actions-theme{
  gap:10px;
}

.member-sidebar-toggle{
  width:100%;
  min-height:auto;
  border:1px solid rgba(255,255,255,0.06);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.02);
  color:#d9e8fb;
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  cursor:default;
  box-shadow:none;
  pointer-events:none;
  text-transform:uppercase;
  letter-spacing:.18em;
  justify-content:space-between;
  border-radius:16px;
}

.member-sidebar-nav{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:9px;
  width:100%;
}

.member-sidebar-group-label{
  margin:14px 6px 1px;
  color:rgba(183,196,219,0.62);
  font-size:10px;
  font-weight:800;
  letter-spacing:.18em;
  text-transform:uppercase;
  padding-left:4px;
}

.member-sidebar-group-label::before{
  content:"";
  display:inline-block;
  width:6px;
  height:6px;
  margin-right:8px;
  border-radius:999px;
  background:rgba(143,211,255,0.72);
  box-shadow:0 0 0 4px rgba(143,211,255,0.08);
  vertical-align:middle;
}

.member-sidebar-nav > .member-sidebar-group-label:first-child{
  margin-top:2px;
}

.member-sidebar-section{
  margin:12px 8px 6px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--muted);
  opacity:.88;
}

.member-sidebar-section::after{
  content:"";
  display:block;
  width:34px;
  height:1px;
  margin-top:8px;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(143,211,255,0.28), transparent);
}

.member-sidebar-utilities{
  margin-top:12px;
  padding:14px 8px 8px;
  border-top:1px solid rgba(255,255,255,0.08);
  display:grid;
  grid-template-columns:1fr;
  gap:9px;
  justify-content:flex-start;
  width:100%;
  border-radius:18px;
  background:linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
}

.member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link:first-child{
  border-color:rgba(143,211,255,0.14);
  background:
    linear-gradient(180deg, rgba(143,211,255,0.08), rgba(143,211,255,0.03)),
    rgba(255,255,255,0.02);
}

.member-sidebar-quick-icons{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
}

.member-sidebar-quick-icons .member-sidebar-link,
.member-sidebar-quick-icons .theme-toggle{
  flex:0 0 46px;
  width:46px !important;
  min-width:46px;
  min-height:46px;
  justify-content:center !important;
  padding:0 !important;
}

.member-sidebar-quick-icons .member-sidebar-label,
.member-sidebar-quick-icons .theme-toggle-text{
  display:none !important;
}

.member-sidebar-quick-icons .dashboard-icon,
.member-sidebar-quick-icons .theme-toggle-icon{
  margin:0;
}

.member-sidebar-utilities .member-sidebar-link,
.member-sidebar-utilities .theme-toggle{
  width:100%;
  min-height:38px;
  box-sizing:border-box;
}

.member-sidebar .topbar-nav.member-sidebar-utilities{
  display:flex !important;
  flex-direction:column;
  align-items:stretch;
  width:100%;
}

.member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link,
.member-sidebar .topbar-nav.member-sidebar-utilities > .theme-toggle{
  width:100% !important;
  justify-content:flex-start !important;
}

.member-shell.is-collapsed .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link,
.member-shell.is-collapsed .member-sidebar .topbar-nav.member-sidebar-utilities > .theme-toggle{
  justify-content:center !important;
}

.member-sidebar-link{
  width:100%;
  min-height:46px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.03);
  color:var(--text);
  display:flex;
  align-items:center;
  gap:13px;
  padding:0 13px;
  text-decoration:none;
  position:relative;
  overflow:hidden;
  transition:transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}

.member-sidebar-link::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, rgba(143,211,255,0.12), transparent 42%);
  opacity:0;
  transition:opacity .18s ease;
  pointer-events:none;
}

.member-sidebar-link.is-secondary{
  min-height:42px;
  border-color:rgba(255,255,255,0.05);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.015)),
    rgba(255,255,255,0.018);
  color:rgba(245,247,255,0.86);
}

.member-sidebar-link.is-secondary .dashboard-icon{
  opacity:.82;
}

.member-sidebar-link:hover{
  transform:translateX(2px);
  border-color:rgba(143,211,255,0.22);
  background:
    linear-gradient(180deg, rgba(143,211,255,0.12), rgba(143,211,255,0.05)),
    rgba(143,211,255,0.08);
  box-shadow:0 10px 24px rgba(6, 17, 31, 0.18);
  text-decoration:none;
}

.member-sidebar-link:hover::after,
.member-sidebar-link.is-active::after{
  opacity:1;
}

.member-sidebar-link:focus-visible,
.member-sidebar .theme-toggle:focus-visible{
  outline:none;
  border-color:rgba(143,211,255,0.42);
  box-shadow:0 0 0 3px rgba(143,211,255,0.12), 0 12px 24px rgba(6,17,31,0.18);
}

.member-sidebar-link[href*="logout.php"]:hover{
  border-color:rgba(255,127,127,0.45);
  background:
    linear-gradient(180deg, rgba(255,127,127,0.2), rgba(255,127,127,0.08)),
    rgba(8,21,38,0.46);
  color:#ffd7d7;
}

.member-sidebar-link.is-active{
  border-color:rgba(143,211,255,0.35);
  background:
    linear-gradient(180deg, rgba(143,211,255,0.2), rgba(143,211,255,0.07)),
    rgba(8,21,38,0.36);
  color:#f2f8ff;
  box-shadow:0 14px 28px rgba(10, 28, 49, 0.28), 0 0 0 1px rgba(143,211,255,0.08);
}

.member-sidebar-link.is-active::before{
  content:"";
  position:absolute;
  left:-1px;
  top:8px;
  bottom:8px;
  width:3px;
  border-radius:0 6px 6px 0;
  background:rgba(143,211,255,0.95);
}

.member-sidebar .dashboard-icon{
  flex:0 0 auto;
  width:32px;
  height:32px;
  border-radius:11px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03)),
    rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.05);
}

.member-sidebar-link.is-active .dashboard-icon{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(143,211,255,0.08)),
    rgba(255,255,255,0.08);
  border-color:rgba(143,211,255,0.22);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 18px rgba(3,14,25,0.18);
}

.member-sidebar .theme-toggle{
  min-height:48px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.03);
  color:var(--text);
  justify-content:flex-start;
  padding:0 13px;
  transition:transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}

.member-sidebar .theme-toggle:hover{
  border-color:rgba(143,211,255,0.24);
  background:
    linear-gradient(180deg, rgba(143,211,255,0.12), rgba(143,211,255,0.05)),
    rgba(143,211,255,0.08);
  box-shadow:0 10px 24px rgba(6, 17, 31, 0.18);
}

.member-sidebar .theme-toggle-icon{
  background:linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.06));
  color:#dbe8ff;
  box-shadow:none;
}

.member-sidebar .theme-toggle[aria-pressed="true"],
.member-sidebar .theme-toggle[aria-pressed="false"]{
  background:rgba(255,255,255,0.03);
}

.member-sidebar .theme-toggle[aria-pressed="true"] .theme-toggle-icon,
.member-sidebar .theme-toggle[aria-pressed="false"] .theme-toggle-icon{
  background:rgba(255,255,255,0.08);
  color:#dbe8ff;
  box-shadow:none;
  transform:none;
}

.member-sidebar-label{
  font-size:13px;
  font-weight:650;
  letter-spacing:0.01em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  transition:opacity .2s ease, width .2s ease, margin .2s ease;
}

.member-shell.is-collapsed .member-sidebar{
  padding-left:12px;
  padding-right:12px;
}

.member-shell.is-collapsed .member-sidebar-toggle,
.member-shell.is-collapsed .member-sidebar-link{
  justify-content:center;
  padding-left:0;
  padding-right:0;
  gap:0;
}

.member-shell.is-collapsed .member-sidebar .theme-toggle{
  justify-content:center;
  padding-left:0;
  padding-right:0;
  gap:0;
}

.member-shell.is-collapsed .member-sidebar-label{
  width:0;
  opacity:0;
  margin:0;
}

.member-shell.is-collapsed .member-sidebar-link.is-active::before{
  display:none;
}

.member-shell.is-collapsed .member-sidebar-section{
  height:0;
  margin:0;
  overflow:hidden;
}

.member-shell.is-collapsed .member-sidebar .theme-toggle-text{
  width:0;
  min-width:0;
  opacity:0;
  margin:0;
  padding:0;
  overflow:hidden;
}

.member-shell.is-collapsed .member-sidebar .theme-toggle-icon{
  min-width:30px;
  min-height:30px;
  padding:0;
}

.member-shell.is-collapsed .member-sidebar-link[data-tooltip]{
  position:relative;
}

.member-shell.is-collapsed .member-sidebar-link[data-tooltip]:hover::after,
.member-shell.is-collapsed .member-sidebar-link[data-tooltip]:focus-visible::after{
  content:attr(data-tooltip);
  position:absolute;
  left:calc(100% + 10px);
  top:50%;
  transform:translateY(-50%);
  white-space:nowrap;
  padding:7px 10px;
  border-radius:10px;
  border:1px solid rgba(143,211,255,0.24);
  background:rgba(6,17,31,0.95);
  color:#f2f8ff;
  font-size:12px;
  line-height:1;
  pointer-events:none;
  z-index:30;
  box-shadow:0 10px 20px rgba(0,0,0,0.28);
  animation:tooltip-fade .16s ease forwards;
  animation-delay:.12s;
}

@keyframes tooltip-fade{
  from{opacity:0; transform:translateY(-50%) translateX(-2px)}
  to{opacity:1; transform:translateY(-50%) translateX(0)}
}

@keyframes member-mobile-drawer-in{
  from{
    opacity:0;
    transform:translate3d(calc(100% + 28px), 0, 0) scale(0.985);
  }
  to{
    opacity:1;
    transform:translate3d(0, 0, 0) scale(1);
  }
}

@keyframes member-mobile-drawer-out-right{
  from{
    opacity:1;
    transform:translate3d(0, 0, 0) scale(1);
  }
  to{
    opacity:1;
    transform:translate3d(calc(100% + 14px), 0, 0) scale(1);
  }
}

@keyframes member-mobile-item-in{
  from{
    opacity:0;
    transform:translateY(8px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

:root[data-theme="light"] .member-sidebar{
  background:
    linear-gradient(170deg, rgba(255,255,255,0.95), rgba(243,248,255,0.94)),
    rgba(255,255,255,0.92);
  border-color:rgba(47,109,255,0.22);
  box-shadow:0 18px 38px rgba(36, 61, 99, 0.12), inset 0 1px 0 rgba(255,255,255,0.7);
}

:root[data-theme="light"] .member-sidebar::after{
  background:
    radial-gradient(circle at top left, rgba(47,109,255,0.1), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.7), transparent 14%);
}

:root[data-theme="light"] .member-sidebar-toggle,
:root[data-theme="light"] .member-sidebar-link{
  border-color:rgba(47,109,255,0.2);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(241,246,255,0.86)),
    rgba(47,109,255,0.05);
  color:#1b3354;
}

:root[data-theme="light"] .member-sidebar-toggle{
  color:#28466b;
}

:root[data-theme="light"] .member-sidebar .dashboard-icon{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(237,243,255,0.86)),
    rgba(47,109,255,0.08);
  border-color:rgba(47,109,255,0.18);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.88);
}

:root[data-theme="light"] .member-sidebar-utilities{
  border-top-color:rgba(47,109,255,0.22);
  background:linear-gradient(180deg, rgba(255,255,255,0.72), rgba(241,246,255,0.58));
}

:root[data-theme="light"] .member-sidebar-head{
  border-bottom-color:rgba(47,109,255,0.18);
}

:root[data-theme="light"] .member-sidebar-section::after{
  background:linear-gradient(90deg, rgba(47,109,255,0.28), transparent);
}

:root[data-theme="light"] .member-sidebar .theme-toggle{
  border-color:rgba(47,109,255,0.2);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(241,246,255,0.86)),
    rgba(47,109,255,0.05);
  color:#1b3354;
}

:root[data-theme="light"] .member-sidebar .theme-toggle-icon{
  background:linear-gradient(180deg, rgba(245,248,255,0.96), rgba(229,237,251,0.9));
  color:#1f3556;
}

:root[data-theme="light"] .member-sidebar .theme-toggle[aria-pressed="true"],
:root[data-theme="light"] .member-sidebar .theme-toggle[aria-pressed="false"]{
  background:rgba(47,109,255,0.05);
}

:root[data-theme="light"] .member-sidebar .theme-toggle[aria-pressed="true"] .theme-toggle-icon,
:root[data-theme="light"] .member-sidebar .theme-toggle[aria-pressed="false"] .theme-toggle-icon{
  background:rgba(16,35,60,0.1);
  color:#1f3556;
}

:root[data-theme="light"] .member-sidebar-link:hover{
  border-color:rgba(47,109,255,0.34);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(235,243,255,0.92)),
    rgba(47,109,255,0.1);
  box-shadow:0 12px 24px rgba(34,63,112,0.1);
}

:root[data-theme="light"] .member-sidebar-link::after{
  background:linear-gradient(90deg, rgba(47,109,255,0.12), transparent 42%);
}

:root[data-theme="light"] .member-sidebar-group-label{
  color:rgba(35,72,127,0.56);
}

:root[data-theme="light"] .member-sidebar-group-label::before{
  background:rgba(47,109,255,0.78);
  box-shadow:0 0 0 4px rgba(47,109,255,0.08);
}

:root[data-theme="light"] .member-sidebar-link.is-secondary{
  border-color:rgba(47,109,255,0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(245,249,255,0.82)),
    rgba(47,109,255,0.03);
  color:rgba(27,51,84,0.82);
}

:root[data-theme="light"] .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link:first-child{
  border-color:rgba(47,109,255,0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(237,244,255,0.9)),
    rgba(47,109,255,0.05);
}

:root[data-theme="light"] .member-sidebar-link:focus-visible,
:root[data-theme="light"] .member-sidebar .theme-toggle:focus-visible{
  border-color:rgba(47,109,255,0.4);
  box-shadow:0 0 0 3px rgba(47,109,255,0.1), 0 12px 22px rgba(34,63,112,0.1);
}

:root[data-theme="light"] .member-sidebar-link[href*="logout.php"]:hover{
  border-color:rgba(221,58,58,0.38);
  background:
    linear-gradient(180deg, rgba(255,127,127,0.22), rgba(255,127,127,0.1)),
    rgba(255,255,255,0.92);
  color:#9f1d1d;
}

:root[data-theme="light"] .member-sidebar .theme-toggle:hover{
  border-color:rgba(47,109,255,0.26);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(235,243,255,0.92)),
    rgba(47,109,255,0.1);
  box-shadow:0 12px 24px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .member-sidebar-link.is-active{
  border-color:rgba(47,109,255,0.44);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.995), rgba(228,239,255,0.96)),
    linear-gradient(180deg, rgba(47,109,255,0.28), rgba(47,109,255,0.14)),
    rgba(255,255,255,0.9);
  color:#0f2950;
  box-shadow:0 16px 28px rgba(34,63,112,0.14), 0 0 0 1px rgba(47,109,255,0.08);
}

:root[data-theme="light"] .member-sidebar-link.is-active::before{
  background:rgba(47,109,255,1);
}

:root[data-theme="light"] .member-sidebar-link.is-active .dashboard-icon{
  background:
    linear-gradient(180deg, rgba(255,255,255,1), rgba(233,242,255,0.96)),
    rgba(47,109,255,0.08);
  border-color:rgba(47,109,255,0.22);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.92), 0 8px 16px rgba(62,92,138,0.08);
}

:root[data-theme="light"] .member-shell.is-collapsed .member-sidebar-link[data-tooltip]:hover::after,
:root[data-theme="light"] .member-shell.is-collapsed .member-sidebar-link[data-tooltip]:focus-visible::after{
  border-color:rgba(47,109,255,0.2);
  background:rgba(255,255,255,0.98);
  color:#1b3354;
}

:root[data-theme="light"] .site-footer-bar{
  border-color:rgba(47,109,255,0.2);
  background:
    linear-gradient(180deg, rgba(247,250,255,0.98), rgba(238,244,252,0.97)),
    rgba(238,244,252,0.97);
  box-shadow:0 14px 30px rgba(56, 91, 136, 0.08);
}

:root[data-theme="light"] .site-desktop-header{
  border-color:rgba(47,109,255,0.2);
  background:
    linear-gradient(180deg, rgba(247,250,255,0.98), rgba(238,244,252,0.97)),
    rgba(238,244,252,0.97);
  box-shadow:0 14px 30px rgba(56, 91, 136, 0.08);
}

:root[data-theme="light"] .site-footer-brand,
:root[data-theme="light"] .site-footer-copy strong{
  color:#173455;
}

:root[data-theme="light"] .site-footer-copy span{
  color:rgba(39,70,108,0.72);
}

:root[data-theme="light"] .site-footer-nav a{
  color:#27466c;
}

:root[data-theme="light"] .site-footer-nav a:hover{
  color:#1a96bf;
}

.member-dashboard-overview .stat-card,
.member-dashboard-grid .panel,
.member-workspace-overview .stat-card,
.member-workspace-grid .panel,
.member-workspace-history{
  border-radius:24px;
}

.member-incident-print-host,
.member-incident-print-source{
  display:none;
}

.member-incident-print-report{
  color:#111827;
  background:#fff;
  font-family:Arial, Helvetica, sans-serif;
}

.member-incident-print-header{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:14px;
  padding-bottom:16px;
  border-bottom:2px solid #111827;
  text-align:left;
}

.member-incident-print-header img{
  width:58px;
  height:58px;
  object-fit:cover;
  border:1px solid #d1d5db;
  border-radius:999px;
}

.member-incident-print-header div{
  display:grid;
  gap:4px;
}

.member-incident-print-header p,
.member-incident-print-header h1,
.member-incident-print-header span{
  margin:0;
}

.member-incident-print-header p{
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.member-incident-print-header h1{
  font-size:24px;
}

.member-incident-print-header span{
  color:#4b5563;
  font-size:12px;
}

.member-incident-print-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:0;
  margin-top:18px;
  border:1px solid #d1d5db;
  border-bottom:0;
  border-right:0;
}

.member-incident-print-grid > div{
  display:grid;
  gap:4px;
  min-height:54px;
  padding:9px 10px;
  border-right:1px solid #d1d5db;
  border-bottom:1px solid #d1d5db;
}

.member-incident-print-grid strong{
  color:#374151;
  font-size:11px;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.member-incident-print-grid span{
  font-size:13px;
}

.member-incident-print-block{
  margin-top:16px;
  padding:12px;
  border:1px solid #d1d5db;
}

.member-incident-print-block h2{
  margin:0 0 8px;
  font-size:14px;
}

.member-incident-print-block p{
  margin:0;
  min-height:44px;
  font-size:13px;
  line-height:1.55;
}

.member-dashboard-overview .stat-card,
.member-workspace-overview .stat-card{
  min-height:164px;
}

.member-dashboard-focus .empty-state{
  min-height:70px;
  display:flex;
  align-items:center;
}

.member-dashboard-alert-list{
  gap:10px;
}

.member-dashboard-alert-item{
  justify-content:space-between;
  gap:12px;
  font-size:14px;
  line-height:1.6;
}

.member-dashboard-alert-count{
  flex-shrink:0;
  font-size:1rem;
  color:var(--text);
}

.member-dashboard-catalog-list{
  gap:10px;
}

.member-dashboard-catalog-item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:16px 18px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,0.07);
  background:linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
}

.member-dashboard-catalog-item .chip{
  flex-shrink:0;
}

.member-dashboard-shortcuts-row{
  row-gap:10px;
}

@media (max-width: 560px){
  .member-shell{
    --member-sidebar-width:92px;
    gap:12px;
  }

  .member-shell:not(.is-collapsed){
    --member-sidebar-width:220px;
  }

  .member-sidebar{
    position:sticky;
    top:12px;
    max-height:calc(100vh - 24px);
  }

  .member-shell .member-sidebar-toggle,
  .member-shell .member-sidebar-link,
  .member-shell .member-sidebar .theme-toggle{
    justify-content:center;
    padding-left:0;
    padding-right:0;
    gap:0;
  }

  .member-shell .member-sidebar-label,
  .member-shell .member-sidebar-section,
  .member-shell .member-sidebar .theme-toggle-text{
    width:0;
    opacity:0;
    margin:0;
    padding:0;
    overflow:hidden;
  }

  .member-shell .member-sidebar-section{
    height:0;
  }

  .member-shell .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link,
  .member-shell .member-sidebar .topbar-nav.member-sidebar-utilities > .theme-toggle{
    justify-content:center !important;
  }

  .member-shell:not(.is-collapsed) .member-sidebar-toggle,
  .member-shell:not(.is-collapsed) .member-sidebar-link,
  .member-shell:not(.is-collapsed) .member-sidebar .theme-toggle{
    justify-content:flex-start;
    padding-left:10px;
    padding-right:10px;
    gap:10px;
  }

  .member-shell:not(.is-collapsed) .member-sidebar-label{
    width:auto;
    opacity:1;
  }

  .member-shell:not(.is-collapsed) .member-sidebar-section{
    height:auto;
    margin:8px 4px 6px;
  }

  .member-shell:not(.is-collapsed) .member-sidebar .theme-toggle-text{
    width:auto;
    opacity:1;
  }
}


.member-workspace-alert .meta-top-sm{
  padding-left:2px;
}

.member-workspace-grid{
  align-items:start;
}

.grid.cards.member-workspace-grid-borrow{
  grid-template-columns:minmax(0, 1fr);
}

.grid.cards.member-workspace-grid-borrow .member-workspace-main{
  min-width:0;
}

.grid.cards.member-workspace-grid-borrow .member-workspace-side{
  max-width:760px;
}

.member-workspace-main .stack.chips-row{
  gap:12px;
}

.member-books-context{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.member-books-context-copy{
  display:grid;
  gap:8px;
}

.member-books-context-copy strong{
  font-size:1.02rem;
  line-height:1.25;
}

.member-book-picker{
  display:grid;
  gap:10px;
  padding:0;
  overflow:visible;
  border-radius:0;
  border:0;
  background:transparent;
}

.member-book-group{
  display:grid;
  gap:12px;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:none;
  box-shadow:none;
  outline:none;
  overflow:visible;
}

.member-book-group-title{
  display:inline-flex;
  width:fit-content;
  justify-self:start;
  margin:0;
  padding:0 2px;
  font-size:0.82rem;
  font-weight:700;
  letter-spacing:0.08em;
  line-height:1.2;
  text-transform:uppercase;
  color:var(--muted);
  background:transparent;
  border:0;
  box-shadow:none;
}

.member-book-group-grid{
  display:grid;
  gap:10px;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  align-items:stretch;
}

.member-book-search{
  margin-bottom:0;
}

.member-book-search-field{
  position:relative;
  min-width:0;
}

.member-book-search-suggestions{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  right:0;
  z-index:26;
  display:grid;
  gap:4px;
  max-height:240px;
  overflow:auto;
  padding:8px;
  border-radius:16px;
  border:1px solid rgba(126, 197, 255, 0.14);
  background:linear-gradient(180deg, rgba(15, 28, 46, 0.98), rgba(9, 18, 31, 0.98));
  box-shadow:0 14px 28px rgba(2, 10, 24, 0.3);
}

.member-book-search-suggestions[hidden]{
  display:none !important;
}

.member-book-search-suggestion,
button.member-book-search-suggestion{
  width:100%;
  justify-content:flex-start;
  text-align:left;
  min-height:0;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid transparent !important;
  background:transparent !important;
  color:rgba(236, 244, 255, 0.92) !important;
  font-weight:500;
  box-shadow:none !important;
  animation:none !important;
}

.member-book-search-suggestion:hover,
.member-book-search-suggestion:focus-visible,
.member-book-search-suggestion:active,
.member-book-search-suggestion.is-active{
  transform:none;
  border-color:rgba(132, 150, 176, 0.18) !important;
  background:linear-gradient(180deg, rgba(58, 72, 91, 0.42), rgba(48, 62, 79, 0.38)) !important;
  color:#edf3fa !important;
  box-shadow:none !important;
  animation:none !important;
  outline:none;
}

.member-book-filters{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(190px, 220px);
  gap:10px;
  margin-bottom:10px;
}

.member-book-category-shell{
  min-width:0;
}

.member-book-option{
  display:grid;
  grid-template-columns:88px minmax(0, 1fr);
  gap:14px;
  align-items:center;
  padding:16px;
  min-height:132px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.03);
  cursor:pointer;
}

.member-book-option.member-book-option-button{
  width:100%;
  text-align:left;
  color:#16314f;
  min-height:0;
  appearance:none;
  -webkit-appearance:none;
  padding:16px;
  border:1px solid rgba(35,72,127,0.08);
  border-radius:18px;
  background-color:rgba(255,255,255,0.98);
  background-image:none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.995), rgba(243,248,255,0.95)),
    rgba(255,255,255,0.98);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.96),
    0 10px 18px rgba(34,63,112,0.05);
  justify-content:initial;
  overflow:visible;
}

.member-book-option-static{
  border:1px solid rgba(255,255,255,0.05);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0.008)),
    rgba(7,17,30,0.76);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.02);
  cursor:default;
}

.member-book-option:hover{
  border-color:rgba(47,109,255,0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,1), rgba(236,244,255,0.96)),
    rgba(255,255,255,0.99);
  box-shadow:0 14px 24px rgba(34,63,112,0.08);
}

.member-book-option.member-book-option-button::after{
  display:none;
}

:root:not([data-theme="light"]) .member-book-option.member-book-option-button{
  background-color:rgba(6,16,29,0.68) !important;
  background-image:none !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.016), rgba(255,255,255,0.004)) !important,
    rgba(6,16,29,0.68) !important;
  border-color:rgba(255,255,255,0.05) !important;
  color:#eef5ff !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.016) !important;
}

:root:not([data-theme="light"]) .member-book-option.member-book-option-button:hover{
  background-color:rgba(8,20,35,0.8) !important;
  background-image:none !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.022), rgba(255,255,255,0.008)) !important,
    rgba(8,20,35,0.8) !important;
  border-color:rgba(143,211,255,0.1) !important;
  box-shadow:0 10px 18px rgba(0,0,0,0.12) !important;
}

.member-book-option.is-selected{
  border-color:rgba(95, 183, 255, 0.55);
  background:linear-gradient(135deg, rgba(95,183,255,0.16), rgba(143,211,255,0.08));
  box-shadow:0 14px 30px rgba(44,112,180,0.18);
}

.member-book-option.is-selected .member-book-option-cover{
  border-color:rgba(143,211,255,0.4);
  box-shadow:0 12px 24px rgba(44,112,180,0.2);
}

.member-book-option.is-unavailable{
  opacity:0.68;
}

.member-book-option.is-unavailable:hover{
  border-color:inherit;
  background:inherit;
  box-shadow:inherit;
}

.member-book-option.is-limit-locked{
  opacity:0.72;
  border-style:dashed;
}

.member-book-option input{
  margin:0;
}

.member-book-option-cover{
  width:88px;
  height:118px;
  display:block;
  object-fit:contain;
  object-position:center;
  justify-self:center;
  align-self:center;
  padding:4px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(10, 20, 34, 0.42);
  box-shadow:0 10px 20px rgba(0,0,0,0.18);
}

.member-book-option-cover-placeholder{
  display:grid;
  place-items:center;
  padding:8px;
  text-align:center;
  font-size:0.72rem;
  color:var(--muted);
  background:rgba(255,255,255,0.04);
}

.member-book-option-copy{
  display:grid;
  gap:6px;
  min-width:0;
  align-content:center;
  justify-items:center;
  text-align:center;
}

.member-book-action-hint{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:fit-content;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.06);
  background:rgba(255,255,255,0.025);
  color:#c9d6e7;
  font-size:0.8rem;
  font-weight:700;
}

.member-book-quantity{
  display:grid;
  gap:6px;
  justify-items:start;
}

.member-book-quantity-shell{
  min-width:150px;
}

.member-book-quantity-select{
  min-height:40px;
}

.member-book-option-copy strong{
  display:block;
  overflow-wrap:anywhere;
  word-break:break-word;
  font-size:1.08rem;
  line-height:1.24;
  text-align:center;
}

.member-book-option-copy .muted{
  width:min(100%, 22ch);
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.45;
  text-align:left;
}

.member-book-description{
  display:-webkit-box;
  width:min(100%, 22ch);
  overflow:hidden;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  line-height:1.45;
  color:rgba(228, 236, 248, 0.88);
  font-size:0.9rem;
  text-align:left;
}

:root[data-theme="light"] .member-book-picker{
  background:transparent;
  box-shadow:none;
}

:root[data-theme="light"] .member-book-search-suggestions{
  border-color:rgba(47,109,255,0.12);
  background:linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,248,255,0.97));
  box-shadow:0 14px 28px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .member-book-search-suggestion,
:root[data-theme="light"] button.member-book-search-suggestion{
  color:#38506f !important;
}

:root[data-theme="light"] .member-book-search-suggestion:hover,
:root[data-theme="light"] .member-book-search-suggestion:focus-visible,
:root[data-theme="light"] .member-book-search-suggestion:active,
:root[data-theme="light"] .member-book-search-suggestion.is-active{
  transform:none;
  border-color:rgba(145, 162, 188, 0.18) !important;
  background:linear-gradient(180deg, rgba(233, 238, 245, 0.98), rgba(223, 231, 240, 0.94)) !important;
  color:#24384f !important;
  box-shadow:none !important;
  animation:none !important;
}

:root[data-theme="light"] .member-book-group-title{
  color:#5c6f8a;
}

:root[data-theme="light"] .member-book-option{
  border-color:rgba(35,72,127,0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,248,255,0.95)),
    rgba(255,255,255,0.98);
  box-shadow:0 10px 18px rgba(34,63,112,0.07);
}

:root[data-theme="light"] .member-book-option-static{
  border-color:rgba(35,72,127,0.16);
  background:
    linear-gradient(180deg, rgba(249,251,255,0.98), rgba(241,246,253,0.94)),
    rgba(246,249,253,0.98);
  box-shadow:0 8px 16px rgba(34,63,112,0.06);
}

:root[data-theme="light"] .member-book-option-copy strong{
  color:#173455;
}

:root[data-theme="light"] .member-book-option-copy .muted{
  color:#647791;
}

:root[data-theme="light"] .member-book-description{
  color:#5f728c;
}

:root[data-theme="light"] .member-book-option-meta .muted{
  color:#7688a1;
}

:root[data-theme="light"] .member-book-option-cover{
  border-color:rgba(35,72,127,0.18);
  box-shadow:0 10px 20px rgba(34,63,112,0.1);
}

:root[data-theme="light"] .member-book-option-cover-placeholder{
  color:#7488a3;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(239,245,253,0.94)),
    rgba(255,255,255,0.96);
}

:root[data-theme="light"] .member-book-option.is-unavailable{
  opacity:1;
  border-color:rgba(35,72,127,0.16);
  background:
    linear-gradient(180deg, rgba(245,248,252,0.98), rgba(236,241,248,0.94)),
    rgba(240,244,249,0.98);
}

:root[data-theme="light"] .member-book-option.is-unavailable:hover{
  border-color:rgba(35,72,127,0.16);
  background:
    linear-gradient(180deg, rgba(245,248,252,0.98), rgba(236,241,248,0.94)),
    rgba(240,244,249,0.98);
  box-shadow:0 8px 16px rgba(34,63,112,0.06);
}

:root[data-theme="light"] .member-book-option.is-unavailable .member-book-option-copy strong{
  color:#294261;
}

:root[data-theme="light"] .member-book-option.is-unavailable .badge,
:root[data-theme="light"] .member-book-option.is-unavailable .chip{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(236,242,250,0.92)),
    rgba(255,255,255,0.94);
  border-color:rgba(35,72,127,0.16);
  color:#516884;
}

@media (min-width: 1024px){
  .member-book-group-grid{
    gap:14px;
  }

  .member-book-option{
    grid-template-columns:88px minmax(0, 1fr);
    gap:18px;
    padding:20px 22px;
    min-height:176px;
    border-radius:22px;
  }

  .member-book-option-cover{
    width:98px;
    height:128px;
    border-radius:16px;
    padding:4px;
  }

  .member-book-option-copy{
    gap:10px;
  }

  .member-book-option-copy strong{
    font-size:1.12rem;
  }

  .member-book-option-copy .muted{
    font-size:0.98rem;
  }
}

.member-book-option-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.member-book-empty{
  margin-top:10px;
}

.member-book-summary{
  display:grid;
  gap:10px;
}

.member-book-clear{
  justify-self:start;
}

.member-borrow-modal-dialog{
  width:min(720px, calc(100vw - 32px));
  border-radius:22px;
  max-height:min(calc(100vh - 32px), 760px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.member-borrow-modal-dialog::after{
  display:none;
}

.member-borrow-modal-layout{
  display:grid;
  grid-template-columns:minmax(200px, 240px) minmax(0, 1fr);
  gap:20px;
  margin-top:18px;
  overflow:auto;
}

.member-borrow-modal-preview{
  display:grid;
  gap:14px;
  align-content:start;
  justify-items:center;
  text-align:center;
  padding:18px 16px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.012)),
    rgba(9, 21, 36, 0.46);
  box-shadow:none;
}

.member-borrow-modal-preview::before{
  display:none;
}

.member-borrow-modal-cover{
  display:grid;
  place-items:center;
}

.member-borrow-modal-preview [data-book-modal-book-title],
.member-borrow-modal-preview [data-book-modal-book-meta],
.member-borrow-modal-preview [data-book-modal-description],
.member-borrow-modal-preview [data-book-modal-available]{
  text-align:center;
}

.member-borrow-modal-description{
  margin:0;
  line-height:1.45;
  max-width:22ch;
}

.member-borrow-modal-cover .member-book-option-cover{
  width:108px;
  height:148px;
}

[data-book-modal-cover][hidden],
[data-book-modal-cover-placeholder][hidden]{
  display:none !important;
}

.member-borrow-agreement{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:12px;
  align-items:center;
  margin:2px 0 0;
  padding:12px;
  border:1px solid rgba(148,163,184,0.24);
  border-radius:14px;
  background:rgba(15,23,42,0.26);
  color:var(--muted);
  font-size:.88rem;
  line-height:1.45;
}

.member-borrow-agreement > div{
  display:grid;
  gap:3px;
  min-width:0;
}

.member-borrow-agreement strong{
  color:var(--text);
  font-size:.9rem;
}

.member-borrow-agreement .is-accepted{
  color:var(--success);
}

.member-terms-link{
  white-space:nowrap;
  padding:.48rem .7rem;
  min-height:34px;
  font-size:.78rem;
}

.member-terms-modal{
  z-index:1400;
}

.member-terms-modal-dialog{
  width:min(760px, calc(100vw - 32px));
}

.member-terms-content{
  display:grid;
  gap:14px;
}

.member-terms-content section{
  display:grid;
  gap:8px;
  padding:14px;
  border:1px solid rgba(148,163,184,0.18);
  border-radius:16px;
  background:rgba(15,23,42,0.22);
}

.member-terms-content h4{
  margin:0;
  font-size:.96rem;
}

.member-terms-content ul{
  margin:0;
  padding-left:1.1rem;
  color:var(--muted);
  line-height:1.5;
}

.member-terms-content li + li{
  margin-top:5px;
}

.member-terms-acceptance{
  position:sticky;
  bottom:0;
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:12px;
  align-items:center;
  padding:14px;
  border:1px solid rgba(148,163,184,0.22);
  border-radius:16px;
  background:
    linear-gradient(180deg, rgba(15,23,42,0.96), rgba(15,23,42,0.9)),
    rgba(15,23,42,0.94);
  box-shadow:0 -10px 24px rgba(0,0,0,0.18);
}

.member-terms-acceptance label{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  gap:10px;
  align-items:start;
  color:var(--muted);
  font-size:.9rem;
  line-height:1.45;
}

.member-terms-acceptance input{
  margin-top:3px;
}

body.modal-open{
  overflow:hidden;
}

@media (max-width: 820px){
  .desk-modal{
    padding:10px;
    align-items:center;
  }

  .desk-modal-dialog{
    width:min(100%, 100%);
    max-height:calc(100dvh - 20px);
  }

  .member-notification-page-dialog{
    width:min(100%, 920px);
  }

  .desk-modal-head{
    gap:12px;
  }

  .member-book-filters{
    grid-template-columns:minmax(0, 1fr);
  }

  .member-borrow-modal-dialog{
    width:min(100%, 420px);
    max-height:calc(100dvh - 20px);
    border-radius:20px;
  }

  .member-borrow-modal-dialog .desk-modal-head{
    position:sticky;
    top:0;
    z-index:2;
    padding-bottom:12px;
    background:inherit;
  }

  .member-borrow-modal-layout{
    grid-template-columns:1fr;
    gap:14px;
    padding-right:2px;
  }

  .member-borrow-modal-preview{
    gap:10px;
  }

  .member-borrow-modal-cover .member-book-option-cover{
    width:92px;
    height:128px;
  }

  .member-borrow-agreement,
  .member-terms-acceptance{
    grid-template-columns:minmax(0, 1fr);
  }

  .member-terms-link,
  .member-terms-acceptance .button{
    justify-self:start;
  }
}

@media (max-width: 540px){
  .desk-modal{
    padding:0;
    align-items:end;
  }

  .desk-modal-dialog.member-borrow-modal-dialog{
    width:100%;
    max-height:min(100dvh, 100vh);
    min-height:min(78dvh, 640px);
    border-radius:18px 18px 0 0;
  }

  .desk-modal-dialog.member-notification-page-dialog{
    width:calc(100% - 16px);
    max-height:calc(min(100dvh, 100vh) - 44px);
    min-height:min(68dvh, 460px);
    border-radius:18px 18px 0 0;
    margin-top:44px;
  }

  .member-notification-page-dialog .desk-modal-head{
    position:sticky;
    top:0;
    z-index:2;
    display:grid;
    grid-template-columns:minmax(0, 1fr);
    gap:10px;
    padding-top:calc(env(safe-area-inset-top, 0px) + 28px);
    padding-bottom:12px;
    background:inherit;
  }

  .member-notification-page-dialog .desk-modal-head > div{
    min-width:0;
    padding-top:8px;
  }

  .member-notification-page-dialog .desk-modal-head > .button.secondary{
    justify-self:end;
  }

  .member-borrow-modal-layout{
    gap:12px;
    margin-top:12px;
    padding:0 2px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .member-borrow-modal-preview{
    padding:14px;
  }

  .member-borrow-modal-cover .member-book-option-cover{
    width:84px;
    height:112px;
  }

  .member-borrow-modal-dialog .member-workspace-actions{
    display:grid;
    gap:10px;
  }

  .member-borrow-modal-dialog .member-workspace-actions > *{
    width:100%;
  }

  .desk-modal-dialog.member-terms-modal-dialog{
    width:100%;
    max-height:min(100dvh, 100vh);
    min-height:min(78dvh, 640px);
    border-radius:18px 18px 0 0;
  }

  .member-terms-modal-dialog .desk-modal-head{
    position:sticky;
    top:0;
    z-index:2;
    display:grid;
    grid-template-columns:minmax(0, 1fr);
    gap:10px;
    padding-bottom:12px;
    background:inherit;
  }

  .member-terms-modal-dialog .desk-modal-head > .button.secondary{
    justify-self:end;
  }

  .member-terms-content{
    padding-bottom:calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .member-terms-content section{
    padding:12px;
  }
}

@media (max-width: 380px){
  .desk-modal{
    padding:0;
  }

  .desk-modal-dialog.member-borrow-modal-dialog{
    max-height:min(100dvh, 100vh);
    min-height:min(82dvh, 640px);
    border-radius:16px 16px 0 0;
  }

  .desk-modal-dialog.member-notification-page-dialog{
    border-radius:16px 16px 0 0;
    width:calc(100% - 14px);
    max-height:calc(min(100dvh, 100vh) - 36px);
    margin-top:36px;
  }

  .member-notification-page-dialog .desk-modal-head{
    padding-top:calc(env(safe-area-inset-top, 0px) + 30px);
  }

  .member-borrow-modal-preview{
    padding:12px;
  }

  .member-borrow-modal-dialog .panel,
  .member-borrow-modal-dialog .empty-state{
    border-radius:16px;
  }
}

@keyframes ebook-reader-stage-settle {
  from {
    opacity: 0.84;
    transform: translateY(10px) scale(0.996);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ebook-reader-content-settle {
  from {
    opacity: 0.26;
    transform: translateY(18px) scale(0.992);
    filter: blur(1.5px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (max-width: 480px){
  .member-notification-card-head,
  .member-notification-card-meta{
    display:grid;
    grid-template-columns:minmax(0, 1fr);
    align-items:start;
  }

  .member-notification-card-title{
    display:grid !important;
    grid-template-columns:auto minmax(0, 1fr);
    align-items:start;
  }

  .member-notification-card-title .status-dot{
    margin-top:4px;
  }

  .member-notification-state-chip{
    margin-left:0;
    justify-self:start;
    grid-column:2;
  }

  .member-notification-card-copy{
    font-size:13px !important;
  }
}

.member-workspace-actions{
  justify-content:flex-start;
}

.member-workspace-actions .button,
.member-workspace-actions button{
  min-width:144px;
}

.admin-view-user-actions{
  gap:16px !important;
  flex-wrap:wrap;
  padding-top:8px;
}

.admin-view-user-actions .button,
.admin-view-user-actions a{
  margin:0 !important;
}

.member-workspace-side .empty-state{
  min-height:60px;
}

.member-workspace-history .table-wrap{
  margin-top:10px;
}

.member-return-batch-card{
  padding:18px;
  border:1px solid rgba(143,211,255,0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
    linear-gradient(135deg, rgba(55,122,191,0.08), rgba(15,30,52,0));
  box-shadow:0 18px 38px rgba(3,12,28,0.16);
}

.member-return-batch-card.is-targeted{
  border-color:rgba(143,211,255,0.42);
  box-shadow:0 22px 44px rgba(3,12,28,0.2), 0 0 0 2px rgba(143,211,255,0.18);
}

.member-return-batch-head,
.member-return-batch-item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.member-return-batch-head{
  padding-bottom:14px;
  margin-bottom:14px;
  border-bottom:1px solid rgba(255,255,255,0.08);
}

.batch-status-row{
  margin-top:8px;
  row-gap:8px;
}

.member-return-batch-list{
  gap:10px;
}

.member-tracking-list,
.member-tracking-items{
  gap:10px;
}

.member-tracking-item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.07);
  background:linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
}

.member-tracking-item .badge{
  flex-shrink:0;
  max-width:48%;
  text-align:right;
}

.member-profile-hero{
  display:grid;
  grid-template-columns:minmax(0, 1.5fr) minmax(260px, 0.85fr);
  gap:18px;
  padding:40px 32px;
  min-height:380px;
  border-radius:24px;
  border:1px solid rgba(143,211,255,0.12);
  background:
    radial-gradient(circle at top right, rgba(108,188,255,0.16), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015)),
    rgba(6,17,31,0.64);
}

.panel.member-profile-hero{
  min-height:460px !important;
  padding-top:52px !important;
  padding-bottom:52px !important;
}

.member-profile-hero-main{
  display:flex;
  align-items:center;
  gap:18px;
  min-width:0;
}

.member-profile-avatar{
  width:156px;
  height:156px;
  border-radius:42px;
  display:grid;
  place-items:center;
  font-size:2.5rem;
  font-weight:800;
  letter-spacing:.08em;
  color:#f4f8ff;
  border:1px solid rgba(143,211,255,0.18);
  background:
    linear-gradient(180deg, rgba(109,189,255,0.26), rgba(109,189,255,0.08)),
    rgba(255,255,255,0.05);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.08);
}

.member-profile-avatar-image{
  width:156px;
  height:156px;
  object-fit:cover;
  padding:0;
  overflow:hidden;
  background:#0d1d30;
}

.member-profile-hero-main > .member-profile-avatar-image{
  width:156px !important;
  height:156px !important;
  border-radius:42px !important;
}

.member-profile-copy{
  min-width:0;
  display:grid;
  gap:8px;
}

.member-profile-name{
  margin:0;
  font-size:clamp(1.65rem, 2.2vw, 2.2rem);
  line-height:1.08;
}

.member-profile-chips{
  row-gap:8px;
}

.member-profile-copyline{
  margin:0;
}

.member-profile-meta{
  display:grid;
  gap:12px;
}

.member-profile-meta-card{
  display:grid;
  gap:6px;
  padding:16px 18px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.08);
  background:linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}

.member-profile-grid{
  grid-template-columns:minmax(0, 1.2fr) minmax(320px, 0.9fr);
  align-items:stretch;
}

.member-profile-panel{
  display:grid;
  align-content:start;
  grid-template-rows:auto auto 1fr;
  gap:16px;
}

.member-profile-form{
  min-height:100%;
  display:grid;
  align-content:start;
  grid-template-rows:auto 1fr auto auto;
  gap:16px;
}

.member-profile-form-grid{
  gap:14px 16px;
}

.member-profile-form-span{
  grid-column:1 / -1;
}

.member-profile-note{
  border-style:dashed;
}

.member-profile-panel .member-workspace-actions{
  margin-top:auto;
  padding-top:4px;
}

.member-return-batch-item{
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.07);
  background:linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
}

.member-return-batch-check{
  padding-top:2px;
}

.member-return-batch-check-label{
  display:inline-flex;
  min-width:38px;
  font-size:.78rem;
  font-weight:700;
}

.member-return-batch-card .member-workspace-actions{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,0.07);
}

@media (max-width: 820px){
  .librarian-batch-head,
  .librarian-batch-item,
  .member-return-batch-head,
  .member-return-batch-item,
  .member-tracking-item{
    flex-direction:column;
    align-items:stretch;
  }

  .member-tracking-item .badge{
    max-width:100%;
    text-align:left;
  }

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

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

  .librarian-batch-meta{
    justify-content:flex-start;
  }

  .librarian-queue-searchbar{
    grid-template-columns:1fr;
  }

  .librarian-queue-searchbar .inline-actions{
    justify-content:flex-start;
  }

  .grid.cards.librarian-borrow-batch-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px){
  .member-tracking-desktop table{
    min-width:560px;
  }

  .member-tracking-desktop th,
  .member-tracking-desktop td{
    padding:10px 8px;
    font-size:0.85rem;
    line-height:1.4;
    vertical-align:top;
  }

  .member-tracking-desktop td .badge{
    display:inline-flex;
    max-width:100%;
    white-space:normal;
    text-align:left;
  }

  .member-tracking-desktop td strong + .muted{
    margin-top:4px;
  }

  .member-profile-hero{
    padding:28px 22px;
    gap:14px;
    min-height:220px;
  }

  .member-profile-hero-main{
    align-items:center;
    flex-direction:column;
    text-align:center;
  }

  .member-profile-avatar{
    width:124px;
    height:124px;
    border-radius:34px;
    font-size:2rem;
  }

  .member-profile-avatar-image,
  .member-profile-hero-main > .member-profile-avatar-image{
    width:124px !important;
    height:124px !important;
    border-radius:34px !important;
  }

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

  .member-profile-copy{
    justify-items:center;
    text-align:center;
  }

  .member-profile-chips{
    justify-content:center;
  }

  .member-profile-copyline{
    text-align:center;
  }

  .member-profile-name{
    font-size:1.5rem;
  }
}

/* Shared select shells */

.ui-select-shell{
  position:relative;
  isolation:isolate;
  width:100%;
  min-width:0;
}

.ui-select{
  width:100%;
  min-height:50px;
  padding:13px 52px 13px 18px;
  border-radius:18px;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  background-image:none !important;
  cursor:pointer;
  font-weight:600;
  position:relative;
  z-index:1;
  transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease, color .2s ease;
}

.ui-select::-ms-expand{
  display:none;
}

.ui-select-caret{
  position:absolute;
  top:50%;
  right:18px;
  width:12px;
  height:12px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:translateY(-65%) rotate(45deg);
  pointer-events:none;
  opacity:0.7;
  transition:opacity .2s ease, transform .2s ease, color .2s ease;
}

.ui-select-shell::after{
  content:none;
}

.toolbar .ui-select-shell,
.manage-users-print-control{
  width:100%;
}

.toolbar .ui-select-shell{
  min-width:190px;
}

.admin-record-filters .ui-select-shell{
  min-width:0;
}

.manage-users-print-control{
  display:grid;
  gap:8px;
  min-width:260px;
}

.manage-users-print-label{
  font-weight:600;
  letter-spacing:0.01em;
}

.manage-users-print-shell{
  position:relative;
  isolation:isolate;
  width:100%;
  min-width:0;
}

.manage-users-print-select{
  width:100%;
  min-height:50px;
  min-width:250px;
  padding:13px 52px 13px 18px;
  border-radius:18px;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  cursor:pointer;
  font-weight:600;
  position:relative;
  z-index:1;
  transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}

.manage-users-printbar{
  align-items:end;
  gap:14px;
}

.manage-users-printbar .button.secondary,
#runPrintAction,
#runBooksPrintAction{
  min-height:50px;
  min-width:124px;
  padding:0 20px;
  border-radius:18px;
  font-weight:700;
  letter-spacing:0.01em;
  justify-content:center;
}

.manage-users-print-caret{
  position:absolute;
  top:50%;
  right:18px;
  width:12px;
  height:12px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:translateY(-65%) rotate(45deg);
  pointer-events:none;
  opacity:0.7;
  transition:opacity .2s ease, transform .2s ease, color .2s ease;
}

.manage-users-print-shell::after{
  content:none;
}

.manage-users-stats .stat-card{
  min-height:164px;
}

.manage-users-stats .code-pill{
  justify-self:start;
}

.manage-users-layout{
  align-items:start;
}

.manage-users-create,
.manage-users-notes{
  min-height:100%;
}

.manage-users-create-chips{
  margin-bottom:2px;
}

.manage-users-provisioning{
  margin-top:18px;
  display:grid;
  gap:18px;
}

.manage-users-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.manage-users-tab{
  min-height:40px;
  padding:0 16px;
  border-radius:999px;
  border:1px solid rgba(143,211,255,0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.015);
  color:#d6e4f8;
  font-size:13px;
  font-weight:700;
  letter-spacing:.01em;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
}

.manage-users-tab:hover,
.manage-users-tab:focus-visible{
  transform:translateY(-1px);
  border-color:rgba(143,211,255,0.22);
  color:#f4f8ff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 18px rgba(0,0,0,0.08);
}

.manage-users-tab.is-active{
  border-color:rgba(143,211,255,0.26);
  background:linear-gradient(135deg, var(--brand), var(--brand-strong));
  color:var(--brand-ink);
  box-shadow:0 14px 24px rgba(71,180,255,0.22);
}

.manage-users-tab-panel[hidden]{
  display:none !important;
}

.manage-users-tab-panel{
  animation:fade-up .28s var(--ease-standard);
}

.manage-users-create-grid{
  display:grid;
  grid-template-columns:minmax(0, 1.4fr) minmax(320px, .95fr);
  gap:22px;
  align-items:start;
}

.manage-users-create-grid-single{
  grid-template-columns:minmax(0, 1fr);
}

.manage-users-create .grid.form{
  gap:16px 18px;
}

.manage-users-create-form{
  grid-template-columns:repeat(3, minmax(0, 1fr));
  align-items:start;
}

.manage-users-create-field{
  min-width:0;
}

.manage-users-create-field-wide{
  grid-column:span 1;
}

.manage-users-create-field.is-disabled{
  opacity:.72;
}

.manage-users-create-field[hidden]{
  display:none !important;
}

.manage-users-create label{
  font-weight:600;
}

.manage-users-create-help{
  margin:8px 2px 0;
  font-size:12px;
  line-height:1.45;
}

.manage-users-create input,
.manage-users-create select,
.manage-users-create textarea{
  min-height:48px;
}

.manage-users-bulk-form{
  min-width:0;
  max-width:100%;
}

.manage-users-bulk-head{
  margin-bottom:4px;
}

.manage-users-bulk-form textarea{
  min-height:220px;
  resize:vertical;
  font-family:Consolas, "Courier New", monospace;
}

.manage-users-inline-note{
  margin:0;
}

.manage-users-bulk-actions{
  justify-content:flex-end;
}

.manage-users-create .ui-select{
  min-height:48px;
  padding-top:12px;
  padding-bottom:12px;
  border-radius:14px;
}

.manage-users-create .ui-select-shell{
  border-radius:14px;
}

.manage-users-create .ui-select-shell::before{
  display:none;
}

.manage-users-create .ui-select-shell::after{
  top:9px;
  bottom:9px;
}

.manage-users-create .ui-select{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04)),
    rgba(255,255,255,0.03);
  border-color:rgba(255,255,255,0.12);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.05);
  color:var(--text);
}

.manage-users-create .ui-select:hover{
  border-color:rgba(143,211,255,0.22);
}

.manage-users-create .ui-select:disabled{
  cursor:not-allowed;
  opacity:.78;
}

.manage-users-create .ui-select:focus{
  border-color:rgba(143,211,255,0.65);
  box-shadow:0 0 0 4px rgba(143,211,255,0.15);
}

.manage-users-create .align-end{
  display:flex;
  align-items:flex-end;
}

.manage-users-create-actions{
  grid-column:1 / -1;
  justify-content:flex-end;
  margin-top:4px;
}

.manage-users-create .align-end .button,
.manage-users-create .align-end button{
  width:min(100%, 240px);
}

@media (max-width: 1120px){
  .manage-users-create-grid{
    grid-template-columns:minmax(0, 1fr);
  }

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

@media (max-width: 720px){
  .manage-users-tabs{
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
  }

  .manage-users-create-form{
    grid-template-columns:minmax(0, 1fr);
  }

  .manage-users-create-actions{
    justify-content:stretch;
  }

  .manage-users-bulk-actions{
    justify-content:stretch;
  }

  .manage-users-create .align-end .button,
  .manage-users-create .align-end button,
  .manage-users-bulk-actions .button,
  .manage-users-bulk-actions button{
    width:100%;
  }
}

.manage-users-toolbar > div,
.manage-users-toolbar > form,
.manage-users-create,
.manage-users-notes,
.manage-users-stats .stat-card,
.manage-users-summary + .table-wrap{
  border-radius:22px;
}

.manage-users-toolbar > form{
  border:0;
  padding:0;
  background:transparent;
  box-shadow:none;
}

.manage-users-printbar .button{
  min-width:110px;
  border-radius:999px;
}

.ui-select:focus{
  outline:none;
  transform:translateY(-1px);
}

.ui-select-shell:hover .ui-select-caret,
.ui-select:focus + .ui-select-caret{
  opacity:1;
  transform:translateY(-55%) rotate(45deg);
}

.ui-select-shell:hover::after{
  opacity:0.2;
}

.ui-select-shell:hover .ui-select{
  transform:translateY(-1px);
}

.manage-users-print-select:focus{
  outline:none;
  transform:translateY(-1px);
}

.manage-users-print-shell:hover .manage-users-print-caret,
.manage-users-print-select:focus + .manage-users-print-caret{
  opacity:1;
  transform:translateY(-55%) rotate(45deg);
}

.manage-users-print-shell:hover::after,
.manage-users-print-shell.is-selected::after{
  opacity:0.2;
}

.manage-users-summary + .table-wrap th{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
    rgba(7,20,35,0.9);
}

.manage-users-directory-table th,
.manage-users-directory-table td{
  padding:10px 14px;
}

.manage-users-directory-table th{
  color:#d7e4f7;
  font-size:11px;
  letter-spacing:0.09em;
  background:
    linear-gradient(180deg, rgba(33,58,92,0.92), rgba(12,26,43,0.96)),
    rgba(7,20,35,0.94);
  border-bottom-color:rgba(120,166,230,0.18);
}

.manage-users-directory-table td{
  border-bottom-color:rgba(255,255,255,0.07);
}

.manage-users-directory-table tbody tr{
  transition:background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.manage-users-directory-table tbody tr:hover{
  background:linear-gradient(90deg, rgba(44,74,116,0.22), rgba(21,39,62,0.08));
  box-shadow:inset 3px 0 0 rgba(120,166,230,0.5), inset 0 1px 0 rgba(255,255,255,0.04), inset 0 -1px 0 rgba(255,255,255,0.03);
  transform:translateX(2px);
}

.manage-users-directory-table tbody tr:nth-child(even){
  background:rgba(255,255,255,0.02);
}

.manage-users-role-badge{
  min-width:84px;
  justify-content:center;
  padding:6px 12px;
  font-size:12px;
  letter-spacing:0;
  background:linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}

/* Premium mobile auth enhancements */
@media (max-width: 560px) {
  .auth-card-shell {
    border-radius:28px;
    background:rgba(6,16,34,0.86);
    backdrop-filter:blur(24px);
    box-shadow:0 24px 70px rgba(0,0,0,0.32);
    border:1px solid rgba(255,255,255,0.08);
  }

  .auth-panel-main,
  .auth-panel-main-otp {
    border-radius:24px;
    background:rgba(8,20,40,0.92);
    border:1px solid rgba(255,255,255,0.08);
    position:relative;
    overflow:hidden;
  }
  .auth-panel-main::before {
    content:"";
    position:absolute;
    inset:0;
    background:
      radial-gradient(circle at top left, rgba(94,172,255,0.16), transparent 28%),
      radial-gradient(circle at bottom right, rgba(114,190,255,0.12), transparent 30%);
    opacity:0.65;
    pointer-events:none;
  }
  .auth-panel-main > *,
  .auth-panel-main-otp > * {
    position:relative;
    z-index:1;
  }

  .auth-panel-side {
    display:block;
    border-left:0;
    border-top:1px solid rgba(255,255,255,0.08);
    margin-top:18px;
    padding-top:22px;
    background:rgba(4,12,24,0.92);
    border-radius:0 0 24px 24px;
  }
  .auth-panel-side .auth-role-item {
    padding:18px 16px;
    border-radius:18px;
    background:rgba(255,255,255,0.04);
    transition:transform .24s ease, box-shadow .24s ease, background .24s ease;
  }
  .auth-panel-side .auth-role-item:hover {
    transform:translateY(-2px);
    background:rgba(255,255,255,0.08);
    box-shadow:0 14px 24px rgba(0,0,0,0.16);
  }

  .auth-form input,
  .auth-form .otp-code-slot {
    background:rgba(255,255,255,0.08);
    border:1px solid rgba(255,255,255,0.12);
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.05);
  }
  .auth-form input:focus,
  .auth-form .otp-code-slot:focus {
    border-color:rgba(94,172,255,0.7);
    box-shadow:0 0 0 5px rgba(94,172,255,0.12);
  }

  .auth-form .inline-actions button,
  .auth-form .inline-actions .button.secondary {
    min-height:52px;
    border-radius:16px;
    font-size:15px;
  }
  .auth-form .inline-actions button {
    background:linear-gradient(135deg, #00d4ff, #0099cc);
    border:1px solid rgba(0,212,255,0.5);
    box-shadow:0 18px 30px rgba(0,180,220,0.28);
  }
  .auth-form .inline-actions .button.secondary {
    background:rgba(255,255,255,0.08);
    border:1px solid rgba(255,255,255,0.14);
    color:#dbe9ff;
  }
  .auth-form .inline-actions .button.secondary:hover {
    background:rgba(255,255,255,0.12);
  }

  .auth-kicker,
  .auth-title,
  .auth-intro {
    color:#eef7ff;
  }
  .auth-title {
    text-shadow:0 6px 18px rgba(0,0,0,0.18);
  }
  .auth-intro {
    max-width:none;
  }

  .otp-code-group {
    justify-content:space-between;
  }
  .otp-code-slot {
    width:calc(16.66% - 4px);
  }

  .auth-back-link {
    width:100%;
    justify-content:center;
    border-radius:16px;
    padding:14px 0;
    border:1px solid rgba(255,255,255,0.14);
    background:rgba(255,255,255,0.03);
  }

  /* Mobile header menu enhancements */
  header button[aria-label="Toggle menu"] {
    transition:all .2s ease;
  }
  header button[aria-label="Toggle menu"]:active {
    transform:scale(.94);
  }

  /* Mobile dropdown menu styling */
  header > div[class*="absolute"] {
    animation:slideInFromRight .28s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  header > div[class*="absolute"].is-closing {
    animation:slideOutToRight .28s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }

  header a[aria-current="page"] {
    transition:all .24s ease;
  }
  header a[aria-current="page"]:active {
    transform:scale(.96);
  }

  /* Enhance mobile menu item spacing and tap targets */
  header a[class*="rounded-2xl"]:not([href*="loginpage"]) {
    min-height:48px;
    display:flex;
    align-items:center;
    padding:12px 16px !important;
    transition:background-color .2s ease, box-shadow .2s ease, transform .2s ease;
  }
  header a[class*="rounded-2xl"]:not([href*="loginpage"]):active {
    transform:scale(.97) translateY(1px);
  }
  header a[class*="rounded-2xl"]:not([href*="loginpage"]):hover {
    box-shadow:inset 0 0 0 2px rgba(0,212,255,0.2);
  }

  /* LOGIN button enhanced mobile tap response */
  header a[href*="loginpage"] {
    min-height:54px;
    transition:all .24s ease;
  }
  header a[href*="loginpage"]:active {
    transform:scale(.95) translateY(2px);
  }

  /* Animation for dropdown menu - slide in from right */
  @keyframes slideInFromRight {
    from {
      opacity:0;
      transform:translateX(100%);
    }
    to {
      opacity:1;
      transform:translateX(0);
    }
  }

  /* Animation for dropdown menu - slide out to right */
  @keyframes slideOutToRight {
    from {
      opacity:1;
      transform:translateX(0);
    }
    to {
      opacity:0;
      transform:translateX(100%);
    }
  }

  /* Mobile sidebar menu enhancements */
  .member-sidebar-link {
    min-height:48px !important;
    padding:14px 16px !important;
    display:flex;
    align-items:center;
    gap:12px;
    border-radius:14px;
    transition:all .2s ease;
    margin-bottom:6px;
  }

  .member-sidebar-link:hover {
    transform:translateX(4px);
    box-shadow:0 4px 12px rgba(0,0,0,0.12);
  }

  .member-sidebar-link:active {
    transform:scale(.96) translateX(2px);
  }

  .member-sidebar-link.is-active {
    background:linear-gradient(135deg, rgba(0,212,255,0.18), rgba(0,212,255,0.08));
    border:1px solid rgba(0,212,255,0.3);
    box-shadow:0 4px 16px rgba(0,212,255,0.12);
  }

  /* Show icons in sidebar links */
  .member-sidebar-link .dashboard-icon {
    width:32px !important;
    height:32px !important;
    min-width:32px !important;
    flex-shrink:0 !important;
    margin-right:4px !important;
    display:inline-flex !important;
  }

  /* Logout button - highlight in cyan */
  a[href*="logout"],
  button[type="button"] {
    min-height:48px !important;
  }

  .topbar-nav.member-sidebar-utilities > .member-sidebar-link:last-child,
  a[href*="logout.php"] {
    background:linear-gradient(135deg, rgba(0,212,255,0.16), rgba(0,180,216,0.08));
    border:1px solid rgba(0,212,255,0.3);
    color:#a8e6ff;
    font-weight:600;
    margin-top:12px;
    padding-top:16px !important;
    padding-bottom:16px !important;
    text-align:center;
  }

  .topbar-nav.member-sidebar-utilities > .member-sidebar-link:last-child:hover,
  a[href*="logout.php"]:hover {
    background:linear-gradient(135deg, rgba(0,212,255,0.24), rgba(0,180,216,0.12));
    box-shadow:0 8px 20px rgba(0,212,255,0.16);
  }
}


.manage-users-directory-table td{
  border-color:rgba(152,178,214,0.16);
  color:#e3ebf7;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.03);
}

.manage-users-status-badge,
.manage-users-access-badge{
  min-width:92px;
  padding:6px 12px;
  border-radius:16px;
  font-size:12px;
  letter-spacing:.015em;
  text-transform:uppercase;
}

.manage-users-status-badge-inactive,
.manage-users-access-badge-pending{
  background:linear-gradient(180deg, rgba(255,191,71,0.28), rgba(255,191,71,0.12));
  border-color:rgba(255,191,71,0.42);
  color:#fff0c2;
}

.manage-users-access-badge-ready{
  background:linear-gradient(180deg, rgba(88,214,141,0.24), rgba(88,214,141,0.1));
  border-color:rgba(88,214,141,0.34);
  color:#e6fff0;
}

.manage-users-directory-table .complaint-status-resolved.manage-users-status-badge{
  background:linear-gradient(180deg, rgba(88,214,141,0.26), rgba(88,214,141,0.1));
  border-color:rgba(88,214,141,0.36);
  color:#e6fff0;
}

.print-users-sheet{
  padding:26px;
}

.print-users-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.print-users-head h1{
  margin:0 0 6px;
}

.print-brand{
  display:flex;
  align-items:center;
  gap:16px;
}

.print-brand-logo{
  width:72px;
  height:72px;
  border-radius:18px;
  object-fit:cover;
  border:1px solid rgba(255,255,255,0.14);
}

.print-users-screen-actions{
  flex-wrap:wrap;
  justify-content:flex-end;
}

.print-user-card{
  border:1px solid var(--line);
  border-radius:24px;
  padding:22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
    rgba(9,21,37,0.56);
}

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

.print-user-card-head h2{
  margin:0;
}

.print-user-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:16px;
}

.print-user-field{
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  display:grid;
  gap:6px;
}

.print-users-table{
  overflow:visible;
}

/* Theme overrides */

:root[data-theme="light"] .manage-users-toolbar > form{
  background:transparent;
  border:0;
  box-shadow:none;
}

:root[data-theme="light"] .manage-users-head,
:root[data-theme="light"] .manage-users-summary{
  color:#4f627d;
}

:root[data-theme="light"] .manage-users-stats .stat-card{
  background:
    radial-gradient(circle at top right, rgba(47,109,255,0.08), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(242,247,255,0.95));
  border-color:rgba(47,109,255,0.1);
  box-shadow:0 12px 22px rgba(34,63,112,0.05);
}

:root[data-theme="light"] .manage-users-create,
:root[data-theme="light"] .manage-users-notes{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(242,247,255,0.96)),
    rgba(255,255,255,0.98);
  border-color:rgba(47,109,255,0.1);
  box-shadow:0 12px 22px rgba(34,63,112,0.05);
}

:root[data-theme="light"] .manage-users-tab{
  border-color:rgba(47,109,255,0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(237,243,252,0.88)),
    rgba(255,255,255,0.86);
  color:#31547c;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.94), 0 8px 18px rgba(34,63,112,0.06);
}

:root[data-theme="light"] .manage-users-tab:hover,
:root[data-theme="light"] .manage-users-tab:focus-visible{
  border-color:rgba(47,109,255,0.2);
  color:#1f426d;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.96), 0 10px 18px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .manage-users-tab.is-active{
  border-color:rgba(47,109,255,0.22);
  background:linear-gradient(135deg, #2f6dff, #5a96ff);
  color:#f8fbff;
  box-shadow:0 14px 24px rgba(47,109,255,0.2);
}

:root[data-theme="light"] .manage-users-summary .chip{
  background:linear-gradient(180deg, rgba(255,255,255,0.99), rgba(241,246,255,0.96));
  border-color:rgba(47,109,255,0.1);
  color:#43607f;
}

:root[data-theme="light"] .manage-users-create .ui-select{
  border-color:rgba(18,39,71,0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,249,255,0.94)),
    rgba(255,255,255,0.96);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 1px 2px rgba(34,63,112,0.04);
  color:var(--text);
}

:root[data-theme="light"] .manage-users-create .ui-select:hover{
  border-color:rgba(47,109,255,0.24);
}

:root[data-theme="light"] .manage-users-create .ui-select:focus{
  border-color:rgba(47,109,255,0.48);
  box-shadow:
    0 0 0 4px rgba(47,109,255,0.12),
    0 6px 16px rgba(47,109,255,0.08);
}

:root[data-theme="light"] .manage-users-actions .button.secondary,
:root[data-theme="light"] .manage-users-printbar .button.secondary{
  background:linear-gradient(180deg, rgba(255,255,255,1), rgba(241,246,255,0.98));
  border-color:rgba(47,109,255,0.12);
}

:root[data-theme="light"] .manage-users-filters .inline-actions button[type="submit"],
:root[data-theme="light"] .manage-books-tablefilters .inline-actions button[type="submit"]{
  background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(238,244,255,0.96));
  border-color:rgba(47,109,255,0.12);
  box-shadow:0 10px 18px rgba(34,63,112,0.05);
}

:root[data-theme="light"] .ui-select-shell::before{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:17px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(242,247,255,0.96)),
    rgba(255,255,255,0.98);
  border:1px solid rgba(47,109,255,0.12);
  box-shadow:0 12px 22px rgba(34,63,112,0.05);
  pointer-events:none;
  transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

:root[data-theme="light"] .ui-select{
  background:transparent;
  border-color:rgba(47,109,255,0.12);
  color:#28405f;
}

:root[data-theme="light"] .ui-select:hover{
  border-color:rgba(47,109,255,0.22);
}

:root[data-theme="light"] .ui-select-shell:hover::before{
  border-color:rgba(47,109,255,0.18);
  box-shadow:0 14px 26px rgba(34,63,112,0.07);
}

:root[data-theme="light"] .ui-select:focus{
  border-color:rgba(47,109,255,0.3);
  box-shadow:0 0 0 4px rgba(47,109,255,0.08);
}

:root[data-theme="light"] .ui-select-caret{
  color:#3b5f96;
}

:root[data-theme="light"] .manage-users-print-shell::before{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:17px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(242,247,255,0.96)),
    rgba(255,255,255,0.98);
  border:1px solid rgba(47,109,255,0.12);
  box-shadow:0 12px 22px rgba(34,63,112,0.05);
  pointer-events:none;
}

:root[data-theme="light"] .manage-users-print-select{
  background:transparent;
  border-color:rgba(47,109,255,0.12);
  color:#6d7f98;
}

:root[data-theme="light"] .manage-users-print-select:hover{
  border-color:rgba(47,109,255,0.22);
}

:root[data-theme="light"] .manage-users-print-select:focus{
  border-color:rgba(47,109,255,0.3);
  box-shadow:0 0 0 4px rgba(47,109,255,0.08);
}

:root[data-theme="light"] .manage-users-print-shell.is-selected .manage-users-print-select{
  color:#21406d;
}

:root[data-theme="light"] .manage-users-print-shell.is-selected::before{
  border-color:rgba(47,109,255,0.22);
  box-shadow:0 14px 26px rgba(34,63,112,0.08);
}

:root[data-theme="light"] .manage-users-print-caret{
  color:#3b5f96;
}

:root[data-theme="light"] .print-brand-logo{
  border-color:rgba(47,109,255,0.1);
}

:root[data-theme="light"] .print-user-card{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(242,247,255,0.96)),
    rgba(255,255,255,0.98);
  border-color:rgba(47,109,255,0.1);
  box-shadow:0 12px 22px rgba(34,63,112,0.05);
}

:root[data-theme="light"] .print-user-field{
  border-color:rgba(47,109,255,0.1);
  background:linear-gradient(180deg, rgba(255,255,255,1), rgba(241,246,255,0.96));
}

:root[data-theme="light"] .manage-users-actions .danger{
  box-shadow:none;
}

:root[data-theme="light"] .manage-users-summary + .table-wrap{
  border-color:rgba(47,109,255,0.1);
  box-shadow:0 12px 22px rgba(34,63,112,0.05);
}

:root[data-theme="light"] .manage-users-summary + .table-wrap th{
  background:
    linear-gradient(180deg, rgba(252,254,255,0.99), rgba(238,244,253,0.95)),
    rgba(255,255,255,0.98);
}

:root[data-theme="light"] .manage-users-summary + .table-wrap tbody tr:hover{
  background:rgba(47,109,255,0.045);
}

:root[data-theme="light"] .manage-users-directory-table tbody tr:nth-child(even){
  background:rgba(47,109,255,0.018);
}

:root[data-theme="light"] .manage-users-directory-table th{
  color:#49617f;
  background:
    linear-gradient(180deg, rgba(236,243,255,0.98), rgba(221,233,251,0.95)),
    rgba(255,255,255,0.98);
  border-bottom-color:rgba(47,109,255,0.14);
}

:root[data-theme="light"] .manage-users-directory-table td{
  border-bottom-color:rgba(47,109,255,0.08);
}

:root[data-theme="light"] .manage-users-directory-table tbody tr:hover{
  background:linear-gradient(90deg, rgba(47,109,255,0.09), rgba(47,109,255,0.025));
  box-shadow:inset 3px 0 0 rgba(47,109,255,0.34), inset 0 1px 0 rgba(255,255,255,0.4);
}

:root[data-theme="light"] .manage-users-role-badge{
  background:linear-gradient(180deg, rgba(244,248,255,0.98), rgba(229,238,251,0.92));
  border-color:rgba(47,109,255,0.14);
  color:#45607f;
}

:root[data-theme="light"] .manage-users-status-badge-inactive,
:root[data-theme="light"] .manage-users-access-badge-pending{
  background:linear-gradient(180deg, rgba(255,229,163,0.98), rgba(255,242,206,0.94));
  border-color:rgba(210,162,58,0.28);
  color:#8c6510;
}

:root[data-theme="light"] .manage-users-access-badge-ready{
  background:linear-gradient(180deg, rgba(224,252,235,0.98), rgba(210,244,223,0.94));
  border-color:rgba(69,170,112,0.22);
  color:#236742;
}

:root[data-theme="light"] .manage-users-directory-table .complaint-status-resolved.manage-users-status-badge{
  background:linear-gradient(180deg, rgba(224,252,235,0.98), rgba(210,244,223,0.94));
  border-color:rgba(69,170,112,0.22);
  color:#236742;
}

:root[data-theme="light"] .librarian-dashboard-overview .stat-card,
:root[data-theme="light"] .librarian-dashboard-grid .panel,
:root[data-theme="light"] .librarian-edit-book-overview,
:root[data-theme="light"] .librarian-edit-book-main,
:root[data-theme="light"] .librarian-edit-book-side,
:root[data-theme="light"] .member-dashboard-overview .stat-card,
:root[data-theme="light"] .member-dashboard-grid .panel,
:root[data-theme="light"] .member-workspace-overview .stat-card,
:root[data-theme="light"] .member-workspace-grid .panel,
:root[data-theme="light"] .member-workspace-history{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(242,247,255,0.96)),
    rgba(255,255,255,0.98);
  border-color:rgba(47,109,255,0.1);
  box-shadow:0 12px 22px rgba(34,63,112,0.05);
}

:root[data-theme="light"] .librarian-dashboard-activity .activity-item{
  background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,247,255,0.95));
  border-color:rgba(47,109,255,0.1);
}

:root[data-theme="light"] .librarian-batch-summary-card{
  border-color:rgba(35,72,127,0.1);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,249,255,0.94)),
    rgba(255,255,255,0.96);
  box-shadow:0 14px 22px rgba(34,63,112,0.06);
}

:root[data-theme="light"] .librarian-batch-summary-card.is-actionable{
  border-color:rgba(38,164,118,0.22);
}

:root[data-theme="light"] .librarian-batch-summary-card.is-return-ready{
  border-color:rgba(210,166,38,0.24);
}

:root[data-theme="light"] .librarian-batch-status-badge{
  border-color:rgba(35,72,127,0.1);
  background:rgba(237,243,252,0.88);
  color:#314766;
}

:root[data-theme="light"] .librarian-batch-status-badge.is-actionable{
  background:rgba(38,164,118,0.1);
  border-color:rgba(38,164,118,0.18);
  color:#166a4a;
}

:root[data-theme="light"] .librarian-batch-status-badge.is-return-ready{
  background:rgba(210,166,38,0.12);
  border-color:rgba(210,166,38,0.2);
  color:#7b5c10;
}

:root[data-theme="light"] .librarian-batch-item{
  border-color:rgba(35,72,127,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,249,255,0.92)),
    rgba(255,255,255,0.95);
}

:root[data-theme="light"] .librarian-batch-item.is-actionable{
  border-color:rgba(38,164,118,0.16);
  background:
    linear-gradient(180deg, rgba(38,164,118,0.06), rgba(255,255,255,0.96)),
    rgba(255,255,255,0.95);
}

:root[data-theme="light"] .librarian-batch-item.is-return-ready{
  border-color:rgba(210,166,38,0.18);
  background:
    linear-gradient(180deg, rgba(210,166,38,0.07), rgba(255,255,255,0.96)),
    rgba(255,255,255,0.95);
}

:root:not([data-theme="light"]) .manage-users-summary .chip{
  background:linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
}

:root:not([data-theme="light"]) .manage-users-toolbar > form{
  background:transparent;
  border:0;
  padding:0;
  box-shadow:none;
}

:root:not([data-theme="light"]) .manage-users-create,
:root:not([data-theme="light"]) .manage-users-notes{
  border-color:rgba(143,211,255,0.08);
  box-shadow:0 12px 22px rgba(0,0,0,0.16);
}

:root:not([data-theme="light"]) .ui-select-shell::before{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:17px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.035)),
    rgba(8,20,34,0.68);
  border:1px solid rgba(143,211,255,0.1);
  box-shadow:0 12px 22px rgba(0,0,0,0.16);
  pointer-events:none;
  transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

:root:not([data-theme="light"]) .ui-select{
  background:transparent;
  border-color:rgba(143,211,255,0.1);
  color:#e8f1ff;
}

:root:not([data-theme="light"]) .ui-select:hover{
  border-color:rgba(143,211,255,0.22);
}

:root:not([data-theme="light"]) .ui-select-shell:hover::before{
  border-color:rgba(143,211,255,0.16);
  box-shadow:0 15px 28px rgba(0,0,0,0.2);
}

:root:not([data-theme="light"]) .ui-select:focus{
  border-color:rgba(143,211,255,0.28);
  box-shadow:0 0 0 4px rgba(71,180,255,0.08);
}

:root:not([data-theme="light"]) .ui-select-caret{
  color:#9dd8ff;
}

:root:not([data-theme="light"]) .manage-users-print-shell::before{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:17px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.035)),
    rgba(8,20,34,0.68);
  border:1px solid rgba(143,211,255,0.1);
  box-shadow:0 12px 22px rgba(0,0,0,0.16);
  pointer-events:none;
}

:root:not([data-theme="light"]) .manage-users-print-select{
  background:transparent;
  border-color:rgba(143,211,255,0.1);
  color:#8ea8c9;
}

:root:not([data-theme="light"]) .manage-users-print-select:hover{
  border-color:rgba(143,211,255,0.22);
}

:root:not([data-theme="light"]) .manage-users-print-select:focus{
  border-color:rgba(143,211,255,0.28);
  box-shadow:0 0 0 4px rgba(71,180,255,0.08);
}

:root:not([data-theme="light"]) .manage-users-print-shell.is-selected .manage-users-print-select{
  color:#e8f1ff;
}

:root:not([data-theme="light"]) .manage-users-print-shell.is-selected::before{
  border-color:rgba(143,211,255,0.2);
  box-shadow:0 14px 26px rgba(0,0,0,0.2);
}

:root:not([data-theme="light"]) .manage-users-print-caret{
  color:#9dd8ff;
}

:root:not([data-theme="light"]) .manage-users-stats .stat-card{
  box-shadow:0 12px 22px rgba(0,0,0,0.16);
}

:root:not([data-theme="light"]) .librarian-dashboard-overview .stat-card,
:root:not([data-theme="light"]) .librarian-dashboard-grid .panel,
:root:not([data-theme="light"]) .librarian-edit-book-overview,
:root:not([data-theme="light"]) .librarian-edit-book-main,
:root:not([data-theme="light"]) .librarian-edit-book-side,
:root:not([data-theme="light"]) .member-dashboard-overview .stat-card,
:root:not([data-theme="light"]) .member-dashboard-grid .panel,
:root:not([data-theme="light"]) .member-workspace-overview .stat-card,
:root:not([data-theme="light"]) .member-workspace-grid .panel,
:root:not([data-theme="light"]) .member-workspace-history{
  border-color:rgba(143,211,255,0.08);
  box-shadow:0 12px 22px rgba(0,0,0,0.16);
}

:root:not([data-theme="light"]) .librarian-dashboard-activity .activity-item{
  border-color:rgba(143,211,255,0.08);
}

@media print{
  .no-print,
  .theme-toggle{
    display:none !important;
  }

  html,
  body{
    background:#fff !important;
    color:#000 !important;
  }

  .site-shell{
    max-width:none;
    padding:0;
  }

  .print-users-sheet{
    padding:0;
    border:none;
    box-shadow:none;
    background:#fff !important;
  }

  .print-users-head{
    margin-bottom:14px;
  }

  .print-brand-logo{
    width:64px;
    height:64px;
    border:1px solid #cfd6e2;
  }

  .print-users-sheet .muted{
    color:#444 !important;
  }

  .print-user-card,
  .print-user-field,
  .print-users-table{
    background:#fff !important;
    color:#000 !important;
    box-shadow:none;
    border-radius:0;
  }

  .print-user-card{
    border:1px solid #cfd6e2;
    padding:18px;
  }

  .print-user-card .badge{
    border:1px solid #cfd6e2;
    color:#000 !important;
    background:#fff !important;
  }

  .print-user-field{
    border:1px solid #cfd6e2;
    border-radius:0;
  }

  .print-users-table{
    border:1px solid #cfd6e2;
  }

  .print-users-table table{
    width:100%;
    border-collapse:collapse;
  }

  .print-users-table th,
  .print-users-table td{
    color:#000 !important;
    border:1px solid #cfd6e2;
    padding:10px 12px;
    background:#fff !important;
  }

  .print-users-table th{
    font-weight:700;
  }
}

@media (max-width: 720px){
  .toolbar .ui-select-shell,
  .manage-users-print-control{
    min-width:100%;
  }

  .manage-users-printbar{
    align-items:stretch;
  }

  .manage-users-printbar .button,
  .manage-users-print-select,
  .ui-select{
    width:100%;
  }
}

.edit-user-shell{
  box-shadow:0 24px 46px rgba(0,0,0,0.2);
}

.edit-user-main,
.edit-user-side{
  min-height:100%;
}

.edit-user-summary{
  row-gap:8px;
}

.edit-user-summary .chip{
  min-height:36px;
}

.edit-user-form .grid.form{
  gap:16px 18px;
}

.edit-user-form label{
  font-weight:600;
}

.edit-user-form input,
.edit-user-form select{
  min-height:48px;
}

:root[data-theme="light"] .edit-user-shell{
  box-shadow:0 24px 46px rgba(34,63,112,0.12);
}

:root[data-theme="light"] .edit-user-main{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(242,247,255,0.96)),
    rgba(255,255,255,0.98);
}

:root[data-theme="light"] .edit-user-summary .chip{
  background:linear-gradient(180deg, rgba(255,255,255,0.99), rgba(241,246,255,0.96));
  border-color:rgba(47,109,255,0.1);
  color:#43607f;
}

:root:not([data-theme="light"]) .edit-user-main{
  background:
    linear-gradient(180deg, rgba(15,33,55,0.95), rgba(8,21,37,0.92)),
    rgba(8,21,38,0.9);
}

@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    animation:none !important;
    transition:none !important;
    scroll-behavior:auto !important;
  }
}

@media print{
  .analytics-print-modal{
    display:none !important;
  }

  .js-member-sidebar .member-sidebar,
  .topbar,
  .analytics-print-actions,
  .member-mobile-header,
  .member-mobile-nav-actions,
  .student-header-notification-shortcut,
  .student-mobile-notification-shortcut,
  .student-notification-panel,
  .student-header-notification-badge,
  body > .theme-toggle,
  .member-sidebar-toggle,
  .member-sidebar-section,
  .member-sidebar-utilities{
    display:none !important;
  }

  body{
    background:#fff !important;
    color:#000 !important;
  }

  .site-shell,
  .member-main,
  .stack{
    display:block !important;
  }

  .analytics-chart-layout{
    display:grid !important;
    grid-template-columns:1.3fr .8fr !important;
    gap:12px !important;
    align-items:start !important;
  }

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

  .analytics-summary-grid,
  .grid.cards{
    display:grid !important;
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    gap:12px !important;
  }

  .panel,
  .card,
  .dashboard-chart,
  .analytics-summary-card,
  .analytics-ranking-item,
  .analytics-leader-item,
  .analytics-breakdown-item,
  .analytics-weekly-chart,
  .analytics-donut-panel,
  .analytics-weekly-summary-item{
    background:#fff !important;
    color:#000 !important;
    box-shadow:none !important;
    border:1px solid #d9d9d9 !important;
    break-inside:avoid;
  }

  .analytics-print-note{
    display:block;
    margin:10px 0 0;
    font-size:12px;
    color:#444 !important;
  }

  .analytics-weekly-chart{
    min-height:420px !important;
    overflow:visible !important;
  }

  .analytics-weekly-plot,
  .analytics-weekly-grid{
    min-height:360px !important;
  }

  .analytics-week-bar{
    opacity:1 !important;
    background:#4eaef1 !important;
    border:1px solid #2f79bb !important;
    box-shadow:none !important;
  }

  .analytics-week-bar.is-empty{
    background:#d7e7f5 !important;
    border:1px dashed #8fa7bf !important;
  }

  .analytics-week-col.is-peak .analytics-week-bar{
    background:#67c6ff !important;
    border-color:#2f79bb !important;
  }

  .analytics-week-bar-value,
  .analytics-donut-label,
  .analytics-week-badge{
    border-color:#c9d8e6 !important;
    box-shadow:none !important;
  }

  .analytics-donut{
    box-shadow:none !important;
    border:1px solid #c9d8e6 !important;
  }

  .analytics-donut-center{
    border-color:#c9d8e6 !important;
    background:#fff !important;
  }

  .analytics-donut-insight,
  .analytics-weekly-insight{
    color:#1d2d3d !important;
    background:#f6f9fc !important;
    border-color:#d9e2ea !important;
  }

  .analytics-donut,
  .analytics-week-bar,
  .analytics-ranking-fill{
    print-color-adjust:exact;
    -webkit-print-color-adjust:exact;
  }

  .dashboard-chart,
  .panel{
    padding:16px !important;
    margin-bottom:14px !important;
  }

  body.is-printing-incident-report > *:not(.member-incident-print-host){
    display:none !important;
  }

  body.is-printing-incident-report .member-incident-print-host{
    display:block !important;
    padding:0 !important;
  }

  body.is-printing-incident-report .member-incident-print-report{
    display:block !important;
    width:100%;
    color:#000 !important;
    background:#fff !important;
  }

  body.is-printing-incident-report .member-incident-print-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  }

  body.is-printing-incident-report .member-incident-print-block,
  body.is-printing-incident-report .member-incident-print-grid > div{
    break-inside:avoid;
  }
}
.ebook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.ebook-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: flex-start;
  min-height: 100%;
  padding: 13px;
}

.ebook-card-cover {
  display: block;
  width: 100%;
  max-width: 148px;
  margin: 0 auto;
  aspect-ratio: 4 / 5.35;
  object-fit: cover;
  border-radius: 15px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(148, 163, 184, 0.18);
}

.ebook-card-cover-fallback {
  display: grid;
  place-items: center;
  color: #0f172a;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ebook-card .button {
  margin-top: auto;
}

.ebook-card-copy {
  width: 100%;
  height: 100%;
  gap: 8px;
}

.ebook-card-copy .label-block {
  font-size: 0.98rem;
  line-height: 1.28;
}

.ebook-card-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.8em;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ebook-card-actions {
  margin-top: auto;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.ebook-card-actions .button {
  min-height: 38px;
  padding: 0.62rem 0.9rem;
  font-size: 0.9rem;
}

.ebook-table-book {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.ebook-table-cover {
  width: 58px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(148, 163, 184, 0.18);
  flex: 0 0 auto;
}

.ebook-table-cover-fallback {
  display: grid;
  place-items: center;
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 700;
}

.ebook-edit-cover {
  display: block;
  width: min(220px, 100%);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.ebook-viewer-shell {
  min-height: 78vh;
  overflow: hidden;
  padding: 0;
}

.ebook-viewer-meta {
  padding: 1.1rem 1.1rem 0;
}

.ebook-viewer-frame {
  display: block;
  width: 100%;
  min-height: 72vh;
  border: 0;
  background: #111827;
}

body.payment-proof-screen{
  background:
    radial-gradient(circle at top left, rgba(95,177,255,0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(56,121,214,0.08), transparent 22%),
    linear-gradient(180deg, #0d1a2a 0%, #0a1422 46%, #09111d 100%);
}

.payment-proof-screen .site-shell.member-shell{
  width:min(100% - 24px, 1440px);
  max-width:none;
  margin:16px auto 12px;
}

.payment-proof-shell{
  max-width:1280px;
  margin:0 auto;
}

.payment-proof-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.payment-proof-title{
  margin:0;
  font-size:2rem;
  line-height:1.08;
}

.payment-proof-subtitle{
  margin:8px 0 0;
}

.payment-proof-overview{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
}

.payment-proof-meta-card{
  display:grid;
  gap:8px;
  min-height:132px;
  padding:18px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.02);
}

.payment-proof-meta-card strong{
  font-size:1.15rem;
  line-height:1.25;
}

.payment-proof-viewer-shell{
  display:grid;
  gap:14px;
}

.payment-proof-viewer-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.payment-proof-frame{
  display:block;
  width:100%;
  min-height:78vh;
  border:0;
  border-radius:24px;
  background:#08101b;
}

.payment-proof-image-stage{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:78vh;
  padding:24px;
  border-radius:24px;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.16), rgba(0,0,0,0.22)),
    #0a1018;
  overflow:auto;
}

.payment-proof-image{
  display:block;
  max-width:100%;
  max-height:72vh;
  width:auto;
  height:auto;
  border-radius:22px;
  box-shadow:0 20px 40px rgba(0,0,0,0.28);
  object-fit:contain;
}

:root[data-theme="light"] body.payment-proof-screen{
  background:
    radial-gradient(circle at top left, rgba(95,177,255,0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(56,121,214,0.06), transparent 22%),
    linear-gradient(180deg, #eef5ff 0%, #e7f0fb 48%, #eef4fb 100%);
}

:root[data-theme="light"] .payment-proof-meta-card{
  border-color:rgba(35,72,127,0.1);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,249,255,0.94)),
    rgba(255,255,255,0.96);
  box-shadow:0 10px 18px rgba(34,63,112,0.06);
}

:root[data-theme="light"] .payment-proof-image-stage,
:root[data-theme="light"] .payment-proof-frame{
  background:#f4f8fd;
  box-shadow:inset 0 0 0 1px rgba(35,72,127,0.08);
}

.ebook-reader-shell {
  display: grid;
  gap: 14px;
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.ebook-reader-screen {
  background:
    radial-gradient(circle at top left, rgba(95,177,255,0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(56,121,214,0.12), transparent 24%),
    linear-gradient(180deg, #0d1a2a 0%, #0a1422 46%, #09111d 100%);
}

.ebook-reader-screen .site-shell.reader-shell {
  width: min(100% - 24px, 1440px);
  max-width: none;
  display: block;
  margin: 16px auto 12px;
}

.ebook-reader-screen .ebook-reader-main {
  width: 100%;
  max-width: none;
}

.ebook-reader-brandbar {
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  border-bottom: 1px solid rgba(143,211,255,0.1);
  background: transparent;
  box-shadow: none;
}

.ebook-reader-brandbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0 auto;
  padding: 14px 24px;
}

.ebook-reader-brandbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ebook-reader-brandbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ebook-reader-brandbar-mark {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.16);
}

.ebook-reader-brandbar-copy {
  display: grid;
  gap: 2px;
}

.ebook-reader-brandbar-copy strong {
  font-size: 1rem;
  line-height: 1.1;
}

.ebook-reader-brandbar-copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

:root[data-theme="light"] body.ebook-reader-screen {
  background:
    radial-gradient(circle at top left, rgba(47,109,255,0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(102,170,255,0.14), transparent 22%),
    linear-gradient(180deg, #f4f8fd 0%, #edf3fb 50%, #e7eff8 100%);
}

:root[data-theme="light"] .ebook-reader-brandbar {
  border-bottom-color: rgba(47,109,255,0.14);
  background: transparent;
  box-shadow: none;
}

:root[data-theme="light"] .ebook-reader-toolbar {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,249,255,0.94)),
    rgba(255,255,255,0.94);
  box-shadow:
    0 18px 30px rgba(34,63,112,0.1),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

:root[data-theme="light"] .ebook-reader-stage-wrap {
  background:
    radial-gradient(circle at top, rgba(47,109,255,0.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,247,255,0.94)),
    rgba(255,255,255,0.94);
  border-color: rgba(47,109,255,0.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 22px 40px rgba(34,63,112,0.1);
}

:root[data-theme="light"] .ebook-reader-page-pill {
  border-color: rgba(47,109,255,0.16);
  background:
    linear-gradient(180deg, rgba(47,109,255,0.12), rgba(47,109,255,0.04)),
    rgba(255,255,255,0.95);
  color: #173251;
}

:root[data-theme="light"] .ebook-reader-page {
  border-color: rgba(47,109,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,255,0.96)),
    rgba(255,255,255,0.96);
  box-shadow: 0 18px 34px rgba(34,63,112,0.08);
}

.ebook-reader-layout {
  max-width: 1360px;
  margin: 0 auto;
}

.ebook-reader-panel {
  padding: 22px;
}

.ebook-reader-header-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ebook-reader-kicker {
  justify-self: flex-start;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ebook-reader-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ebook-reader-meta .chip {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
}

.ebook-reader-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.ebook-reader-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.ebook-reader-title {
  font-size: clamp(1.12rem, 1.2vw + 0.9rem, 1.48rem);
  line-height: 1.2;
}

.ebook-reader-description {
  display: block;
  max-width: 66ch;
  font-size: 0.98rem;
  line-height: 1.6;
}

.ebook-reader-notice {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

.ebook-reader-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
    rgba(5,16,30,0.78);
  box-shadow:
    0 18px 34px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.05);
  position: sticky;
  top: 16px;
  z-index: 6;
  backdrop-filter: blur(18px);
}

.ebook-reader-toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ebook-reader-toolbar-status {
  justify-content: center;
  flex: 1 1 auto;
}

.ebook-reader-toolbar-nav,
.ebook-reader-toolbar-actions {
  flex: 0 0 auto;
}

.ebook-reader-toolbar .button[aria-pressed="true"],
.ebook-reader-toolbar .button.is-active {
  border-color: rgba(143,211,255,0.28);
  background:
    linear-gradient(180deg, rgba(143,211,255,0.18), rgba(143,211,255,0.06)),
    rgba(255,255,255,0.04);
  color: #eef8ff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 12px 24px rgba(71,180,255,0.14);
}

.ebook-reader-status-chip {
  color: var(--text);
}

.ebook-reader-page-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(143,211,255,0.26);
  background:
    linear-gradient(180deg, rgba(143,211,255,0.14), rgba(143,211,255,0.04)),
    rgba(255,255,255,0.02);
  color: #f7fbff;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.015em;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 10px 22px rgba(71,180,255,0.1);
}

.ebook-reader-jump {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ebook-reader-jump input {
  width: 134px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
}

.ebook-reader-stage-wrap {
  position: relative;
  padding: 28px;
  border: 1px solid rgba(143,211,255,0.1);
  border-radius: 28px;
  background:
    radial-gradient(circle at top, rgba(143,211,255,0.08), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)),
    rgba(3,12,24,0.46);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 26px 48px rgba(0,0,0,0.18);
  transition:
    transform 0.28s cubic-bezier(.22,.8,.2,1),
    opacity 0.28s cubic-bezier(.22,.8,.2,1),
    box-shadow 0.28s cubic-bezier(.22,.8,.2,1);
}

.ebook-reader-stage {
  min-height: 72vh;
  max-width: 980px;
  margin: 0;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  gap: 24px;
  transition:
    opacity 0.24s cubic-bezier(.22,.8,.2,1),
    transform 0.24s cubic-bezier(.22,.8,.2,1),
    filter 0.24s cubic-bezier(.22,.8,.2,1);
  will-change: opacity, transform, filter;
}

.ebook-reader-stage-wrap.is-batch-transitioning {
  opacity: 0.76;
  transform: translateY(4px) scale(0.995);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 18px 34px rgba(0,0,0,0.14);
}

.ebook-reader-stage.is-batch-transitioning {
  opacity: 0.22;
  transform: translateY(14px) scale(0.992);
  filter: blur(1.5px);
}

.ebook-reader-stage-wrap.is-batch-entering {
  animation: ebook-reader-stage-settle 0.26s cubic-bezier(.18,.85,.24,1) both;
}

.ebook-reader-stage.is-batch-entering {
  animation: ebook-reader-content-settle 0.28s cubic-bezier(.18,.85,.24,1) both;
}

.ebook-reader-stage-fallback {
  min-height: 78vh;
}

.ebook-reader-browser-frame {
  display: block;
  width: 100%;
  min-height: 78vh;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 18px 34px rgba(0,0,0,0.16);
}

.ebook-reader-panel .ebook-reader-shell {
  max-width: none;
}

.ebook-reader-page-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.ebook-reader-privacy-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 24px;
  border-radius: 28px;
  background: #000;
  color: #fff;
  text-align: center;
}

.ebook-reader-privacy-overlay[hidden],
.ebook-reader-protection-toast[hidden] {
  display: none !important;
}

.ebook-reader-privacy-card {
  display: grid;
  gap: 10px;
  width: min(100%, 440px);
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  background: rgba(10,10,10,0.88);
}

.ebook-reader-privacy-card strong {
  font-size: 1.18rem;
  line-height: 1.25;
}

.ebook-reader-privacy-card span {
  color: rgba(255,255,255,0.76);
  line-height: 1.5;
}

.ebook-reader-privacy-overlay.is-locked {
  position: fixed;
  border-radius: 0;
}

.ebook-reader-shell.is-screenshot-locked .ebook-reader-toolbar,
.ebook-reader-shell.is-screenshot-locked .ebook-reader-stage-wrap,
.ebook-reader-shell.is-screenshot-locked .ebook-reader-page-controls {
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
}

.ebook-reader-protection-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1450;
  width: min(360px, calc(100vw - 32px));
  padding: 13px 15px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  background: rgba(5,16,30,0.94);
  color: #fff;
  box-shadow: 0 18px 40px rgba(0,0,0,0.32);
  font-size: .9rem;
  line-height: 1.45;
}

.ebook-reader-mobile-open {
  display: none;
}

@media (min-width: 1024px) {
  .ebook-reader-screen .site-shell.reader-shell {
    width: min(100% - 12px, 1880px);
  }

  .ebook-reader-brandbar-inner {
    padding: 16px 28px;
  }

  .ebook-reader-panel {
    padding: 28px;
  }

  .ebook-reader-title {
    font-size: clamp(1.34rem, 1vw + 1rem, 1.86rem);
  }

  .ebook-reader-description,
  .ebook-reader-toolbar-status .muted {
    font-size: 1rem;
  }

  .ebook-reader-topbar-actions .button,
  .ebook-reader-brandbar-actions .button {
    min-height: 44px;
    padding: 0.72rem 1rem;
    font-size: 0.96rem;
  }

  .ebook-reader-toolbar {
    padding: 16px 20px;
  }

  .ebook-reader-stage-wrap {
    padding: 34px 42px;
  }

  .ebook-reader-stage {
    min-height: calc(100vh - 210px);
    max-width: 980px;
  }

  .ebook-reader-stage-fallback,
  .ebook-reader-browser-frame {
    min-height: calc(100vh - 210px);
  }
}

.ebook-reader-loading {
  padding: 32px 22px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 18px;
  font-size: 1rem;
}

.ebook-reader-page {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(143,211,255,0.08);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.012)),
    rgba(4,14,27,0.34);
  box-shadow: 0 24px 44px rgba(2, 10, 22, 0.22);
}

.ebook-reader-page-meta {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 4px;
}

.ebook-reader-canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.22);
}

@media (max-width: 720px) {
  .ebook-reader-brandbar {
    margin-bottom: 12px;
  }

  .ebook-reader-brandbar-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 14px;
    gap: 12px;
  }

  .ebook-reader-brandbar-actions {
    justify-content: flex-start;
  }

  .ebook-reader-brandbar-mark {
    width: 38px;
    height: 38px;
  }

  .ebook-reader-brandbar-copy strong {
    font-size: 0.96rem;
  }

  .ebook-reader-brandbar-copy span {
    font-size: 0.84rem;
  }

  .ebook-viewer-shell {
    min-height: 68vh;
  }

  .ebook-viewer-frame {
    min-height: 62vh;
  }

  .ebook-reader-toolbar {
    grid-template-columns: minmax(0, 1fr);
    justify-content: flex-start;
    position: static;
  }

  .ebook-reader-toolbar,
  .ebook-reader-toolbar-group {
    display: grid;
  }

  .ebook-reader-jump {
    grid-template-columns: minmax(0, 1fr) auto;
    display: grid;
  }

  .ebook-reader-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .ebook-reader-topbar-actions {
    justify-content: flex-start;
  }

  .ebook-reader-topbar-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    display: grid;
    gap: 10px;
  }

  .ebook-reader-toolbar-status {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .ebook-reader-panel {
    padding: 16px;
  }

  .ebook-reader-stage-wrap {
    padding: 14px;
    border-radius: 20px;
  }

  .ebook-reader-shell,
  .ebook-reader-stage,
  .ebook-reader-notice {
    max-width: 100%;
  }

  .ebook-reader-browser-frame {
    min-height: 70vh;
    border-radius: 16px;
    pointer-events: none;
  }

  .ebook-reader-mobile-open {
    display: block;
    margin-top: 10px;
  }

  .ebook-reader-mobile-open .button {
    width: 100%;
    justify-content: center;
  }

  .ebook-reader-page-controls {
    justify-content: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ebook-reader-page {
    padding: 12px;
    border-radius: 18px;
  }

  .ebook-reader-stage {
    overflow: visible;
  }

  .ebook-reader-description {
    max-width: none;
    font-size: 0.93rem;
  }
}

@media (max-width: 900px) {
  .member-main {
    gap: 14px;
  }

  .member-dashboard-grid,
  .member-workspace-grid,
  .grid.cards.member-workspace-grid-borrow {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-dashboard-shortcuts-row,
  .member-workspace-actions,
  .member-book-summary,
  .batch-status-row,
  .inline-actions-spread {
    align-items: stretch;
  }

  .member-dashboard-shortcuts-row > *,
  .member-workspace-actions > *,
  .member-book-summary > *,
  .batch-status-row > *,
  .inline-actions-spread > * {
    width: 100%;
  }

  .member-dashboard-shortcuts-row .button,
  .member-workspace-actions .button,
  .member-workspace-actions button,
  .member-workspace-actions input[type="submit"],
  .member-book-summary .button,
  .batch-status-row .button,
  .inline-actions-spread .button {
    justify-content: center;
  }

  .member-workspace-form > div:not(.inline-actions),
  .member-workspace-form > label,
  .member-workspace-form > .notice {
    width: 100%;
  }

  .member-workspace-history .table-wrap,
  .member-workspace-main .member-book-picker {
    border-radius: 18px;
  }
}

@media (max-width: 640px) {
  .member-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .member-sidebar {
    position: static;
    max-height: none;
    padding: 14px;
    overflow: visible;
  }

  .member-shell,
  .member-shell:not(.is-collapsed) {
    --member-sidebar-width: 100%;
  }

  .member-shell .member-sidebar-toggle,
  .member-shell .member-sidebar-link,
  .member-shell .member-sidebar .theme-toggle,
  .member-shell:not(.is-collapsed) .member-sidebar-toggle,
  .member-shell:not(.is-collapsed) .member-sidebar-link,
  .member-shell:not(.is-collapsed) .member-sidebar .theme-toggle {
    justify-content: flex-start;
    padding-left: 12px;
    padding-right: 12px;
    gap: 10px;
  }

  .member-shell .member-sidebar-label,
  .member-shell .member-sidebar-section,
  .member-shell .member-sidebar .theme-toggle-text,
  .member-shell:not(.is-collapsed) .member-sidebar-label,
  .member-shell:not(.is-collapsed) .member-sidebar-section,
  .member-shell:not(.is-collapsed) .member-sidebar .theme-toggle-text {
    width: auto;
    opacity: 1;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .member-shell .member-sidebar-section,
  .member-shell:not(.is-collapsed) .member-sidebar-section {
    height: auto;
    margin: 8px 4px 6px;
  }

  .member-main {
    gap: 12px;
  }

  .topbar {
    padding: 18px;
    border-radius: 20px;
  }

  .topbar h1 {
    font-size: 1.4rem;
    line-height: 1.2;
  }

  .topbar p {
    font-size: 0.95rem;
  }

  .stack {
    gap: 12px;
  }

  .member-dashboard-overview,
  .member-workspace-overview,
  .member-dashboard-grid .panel,
  .member-workspace-grid .panel,
  .member-workspace-history,
  .panel.ebook-card {
    border-radius: 18px;
    padding: 16px;
  }

  .member-dashboard-overview .heading-panel,
  .member-dashboard-grid .stack-copy-md {
    font-size: 1.08rem;
    line-height: 1.28;
  }

  .stat-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .member-dashboard-overview .stat-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .member-dashboard-overview .stat-card,
  .member-workspace-overview .stat-card {
    min-height: 128px;
    padding: 18px 16px;
  }

  .member-dashboard-overview .stat-card strong,
  .member-workspace-overview .stat-card strong {
    font-size: clamp(1.55rem, 6vw, 2rem);
  }

  .member-dashboard-focus .empty-state,
  .member-workspace-side .empty-state,
  .librarian-dashboard-focus .empty-state,
  .librarian-dashboard-queue .empty-state {
    min-height: 0;
    padding: 16px 16px 16px 18px;
    border-radius: 16px;
  }

  .member-dashboard-grid{
    gap:12px;
  }

  .member-dashboard-alert-list{
    gap:8px;
  }

  .member-dashboard-alert-item{
    align-items:flex-start;
    padding:14px 14px 14px 16px;
    border:1px solid rgba(255,255,255,0.06);
    background:linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.025));
    box-shadow:0 10px 20px rgba(0,0,0,0.12);
  }

  .member-dashboard-alert-count{
    margin-left:8px;
  }

  .member-dashboard-shortcuts-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .member-dashboard-shortcuts-row .button,
  .member-dashboard-shortcuts-row a.button {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    border-radius:14px;
  }

  .member-dashboard-shortcuts-row .button.secondary,
  .member-dashboard-shortcuts-row a.button.secondary{
    background:rgba(255,255,255,0.04);
    box-shadow:0 8px 16px rgba(0,0,0,0.08);
  }

  .member-dashboard-shortcut-primary{
    box-shadow:0 14px 26px rgba(71,180,255,0.24);
  }

  .toolbar-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
  }

  .toolbar-top > .grow,
  .toolbar-top > .inline-form {
    width: 100%;
  }

  .toolbar-top .inline-form button,
  .toolbar-top .inline-form .button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .activity-feed {
    gap: 10px;
  }

  .activity-item {
    padding: 14px;
    border-radius: 16px;
  }

  .activity-item strong {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.35;
  }

  .activity-item .meta {
    font-size: .95rem;
  }

  .activity-item .meta-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
  }

  .activity-item .meta-top .inline-form,
  .activity-item .meta-top .inline-form button {
    width: 100%;
  }

  .member-notification-card-head,
  .member-notification-card-meta{
    gap:8px;
  }

  .member-notification-card-title{
    align-items:flex-start;
  }

  .member-notification-state-chip{
    margin-left:20px;
  }

  .member-notification-pill{
    min-height:24px;
    padding:4px 9px;
    font-size:9px;
  }

  .member-notification-time,
  .member-notification-link-cta{
    font-size:11px;
  }

  .member-mobile-hide{
    display:none !important;
  }

  .member-book-filters,
  .manage-books-tablefilters,
  .borrow-records-toolbar,
  .inline-actions {
    gap: 10px;
  }

  .librarian-desk-tabs-head{
    align-items:stretch;
  }

  .librarian-desk-tablist{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    width:100%;
  }

  .librarian-desk-tab{
    width:100%;
    justify-content:center;
  }

  .member-book-search,
  .member-book-category-shell,
  .member-book-category-shell .ui-select,
  .ui-select-shell,
  .ui-select,
  .member-workspace-form input[type="text"],
  .member-workspace-form input[type="number"],
  .member-workspace-form input[type="file"],
  .member-workspace-form input[type="search"],
  .member-workspace-form textarea,
  .member-workspace-form select {
    width: 100%;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ui-select,
  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) select {
    min-height: 52px;
    padding: 14px 54px 14px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.25;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ui-select-shell::before {
    border-radius: 16px;
    box-shadow: 0 10px 18px rgba(0,0,0,0.14);
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ui-select-caret {
    right: 17px;
    width: 13px;
    height: 13px;
    opacity: 0.82;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ui-select-shell::after {
    right: 40px;
    top: 8px;
    bottom: 8px;
    opacity: 0.18;
  }

  :root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ui-select,
  :root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) select {
    border-color: rgba(18,39,71,0.28);
    background:
      linear-gradient(180deg, rgba(255,255,255,1), rgba(241,246,255,0.96)),
      rgba(255,255,255,0.98);
    color: #16304f;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.96),
      0 10px 18px rgba(34,63,112,0.08);
  }

  :root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ui-select-shell::before {
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(255,255,255,1), rgba(241,246,255,0.96)),
      rgba(255,255,255,0.98);
    border-color: rgba(18,39,71,0.18);
    box-shadow: 0 10px 18px rgba(34,63,112,0.08);
  }

  :root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ui-select-caret {
    color: #53708f;
    opacity: 0.95;
  }

  :root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ui-select-shell::after {
    opacity: 0.22;
  }

  .member-book-picker {
    max-height: none;
    padding: 0;
    gap: 14px;
  }

  .member-book-group-title {
    margin: 0;
    padding: 0 2px;
  }

  .member-book-group-grid {
    grid-template-columns: repeat(2, minmax(148px, 1fr));
    gap: 14px;
  }

  .member-book-option {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 13px 15px;
    align-items: start;
    min-height: 0;
    border-radius: 22px;
    border-color: rgba(255,255,255,0.07);
    background:
      linear-gradient(180deg, rgba(255,255,255,0.026), rgba(255,255,255,0.01)),
      rgba(8, 19, 33, 0.84);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.045),
      0 16px 28px rgba(0,0,0,0.18);
  }

  .member-book-option > input[type="checkbox"] {
    justify-self: start;
  }

  .member-book-option-cover {
    width: 94px;
    height: 128px;
    border-radius: 18px;
    justify-self: center;
    padding: 4px;
    box-shadow: 0 14px 26px rgba(0,0,0,0.22);
  }

  .member-book-option-cover-placeholder {
    width: 94px;
    height: 128px;
    padding: 10px;
    font-size: 0.76rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
    border: 1px solid rgba(255,255,255,0.08);
  }

  .member-book-option-copy,
  .member-book-option-meta,
  .member-book-quantity,
  .member-book-summary {
    align-items: center;
    text-align: center;
  }

  .member-book-option-copy {
    gap: 6px;
    justify-items: center;
  }

  .member-book-option-meta,
  .member-book-quantity,
  .member-book-summary {
    gap: 6px;
  }

  .member-book-option-copy strong,
  .ebook-card-copy strong,
  .member-workspace-history td strong {
    font-size: 1.02rem;
  }

  .member-book-option-copy .muted,
  .member-book-description{
    width:min(100%, 22ch);
    text-align:center;
  }

  .member-book-option-copy strong{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
    line-height:1.26;
    color:#f5f8ff;
  }

  .member-book-option-copy .muted{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:1;
    overflow:hidden;
    line-height:1.32;
    font-size:0.84rem;
    color:rgba(211,223,238,0.86);
  }

  .member-book-description{
    -webkit-line-clamp:2;
    font-size:0.82rem;
    line-height:1.38;
    color:rgba(214,226,240,0.78);
  }

  :root[data-theme="light"] .member-book-option {
    background:
      linear-gradient(180deg, rgba(252,254,255,0.99), rgba(241,246,252,0.96)),
      rgba(248,251,255,0.98);
    border-color: rgba(35,72,127,0.12);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.92),
      0 14px 28px rgba(34,63,112,0.09);
  }

  :root[data-theme="light"] .member-book-option-copy strong {
    color: #173455;
  }

  :root[data-theme="light"] .member-book-option-copy .muted,
  :root[data-theme="light"] .member-book-option-meta .muted {
    color: #667b96;
  }

  :root[data-theme="light"] .member-book-option-cover-placeholder {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(239,245,253,0.94));
    border-color: rgba(35,72,127,0.12);
    color: #6d83a0;
  }

  :root[data-theme="light"] .member-book-description{
    color:#70839c;
  }

  .member-workspace-history .card-head,
  .member-workspace-main .card-head,
  .member-workspace-side .card-head,
  .member-dashboard-grid .card-head {
    gap: 10px;
  }

  .table-wrap {
    padding-bottom: 4px;
  }

  .table-wrap table {
    min-width: 640px;
  }

  .table-wrap th,
  .table-wrap td {
    padding: 12px 10px;
    font-size: 0.92rem;
  }

  .ebook-card {
    gap: 0.75rem;
  }

  .ebook-card-cover {
    border-radius: 16px;
  }

  .ebook-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 400px) {
  .grid.cards.member-catalog-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-catalog-card .librarian-catalog-card-link {
    padding: 16px 14px;
  }

  .member-dashboard-overview .stat-grid,
  .member-workspace-overview .stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-dashboard-overview .stat-card,
  .member-workspace-overview .stat-card {
    min-height: 128px;
    height: auto;
  }
}

@media (max-width: 640px) {
  .member-sidebar {
    border-radius: 20px;
    padding: 12px;
    gap: 8px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  }

  .member-sidebar-head {
    margin-bottom: 0;
  }

  .member-sidebar-toggle {
    min-height: 44px;
    border-radius: 14px;
    padding: 0 12px;
  }

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

  .member-sidebar-link,
  .member-sidebar .theme-toggle,
  .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link,
  .member-sidebar .topbar-nav.member-sidebar-utilities > .theme-toggle {
    min-height: 44px;
    border-radius: 14px;
    padding: 0 12px !important;
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  .member-sidebar .dashboard-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }

  .member-sidebar-label {
    font-size: 12px;
  }

  .member-sidebar-section {
    margin: 6px 4px 2px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .member-sidebar-utilities {
    margin-top: 6px;
    padding-top: 8px;
    gap: 8px;
  }

  .member-sidebar .topbar-nav.member-sidebar-utilities {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .topbar {
    gap: 10px;
    padding: 16px 16px 14px;
    margin-bottom: 16px;
    border-radius: 18px;
  }

  .topbar::after {
    width: 150px;
    height: 150px;
    inset: auto -12% -58% auto;
  }

  .topbar h1 {
    font-size: 1.28rem;
  }

  .topbar p {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .topbar-nav {
    gap: 8px;
  }

  .topbar .topbar-nav a,
  .topbar-nav .theme-toggle {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
  }
}

@media (max-width: 420px) {
  .member-sidebar-nav,
  .member-sidebar .topbar-nav.member-sidebar-utilities {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-sidebar-link,
  .member-sidebar .theme-toggle {
    min-height: 42px;
  }

  .topbar {
    padding: 14px;
  }

  .topbar h1 {
    font-size: 1.18rem;
  }
}

@media (max-width: 768px) {
  .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link,
  .member-sidebar .topbar-nav.member-sidebar-utilities > .theme-toggle {
    justify-content: flex-start !important;
    text-align: left !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .member-sidebar .topbar-nav.member-sidebar-utilities .member-sidebar-label,
  .member-sidebar .topbar-nav.member-sidebar-utilities .theme-toggle-text {
    width: auto !important;
    text-align: left !important;
    margin: 0 !important;
  }

  .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link[href*="logout.php"] {
    justify-content: flex-start !important;
  }

  .member-shell.is-mobile-nav-open .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link,
  .member-shell.is-mobile-nav-open .member-sidebar .topbar-nav.member-sidebar-utilities > .theme-toggle,
  .member-shell.is-mobile-nav-open .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link[href*="logout.php"] {
    justify-content: flex-start !important;
    align-items: center !important;
    text-align: left !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    gap: 10px !important;
  }

  .member-shell.is-mobile-nav-open .member-sidebar .topbar-nav.member-sidebar-utilities .member-sidebar-label,
  .member-shell.is-mobile-nav-open .member-sidebar .topbar-nav.member-sidebar-utilities .theme-toggle-text {
    width: auto !important;
    min-width: 0 !important;
    opacity: 1 !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .member-sidebar .topbar-nav.member-sidebar-utilities > .theme-toggle .theme-toggle-icon,
  .member-shell.is-mobile-nav-open .member-sidebar .topbar-nav.member-sidebar-utilities > .theme-toggle .theme-toggle-icon {
    justify-content: center !important;
    align-items: center !important;
    margin-inline: 0 !important;
  }

  .member-sidebar .topbar-nav.member-sidebar-utilities > .theme-toggle,
  .member-shell.is-mobile-nav-open .member-sidebar .topbar-nav.member-sidebar-utilities > .theme-toggle {
    justify-content: center !important;
  }

  .member-sidebar .topbar-nav.member-sidebar-utilities > .theme-toggle .theme-toggle-text,
  .member-shell.is-mobile-nav-open .member-sidebar .topbar-nav.member-sidebar-utilities > .theme-toggle .theme-toggle-text {
    width: 0 !important;
    min-width: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link[href*="logout.php"],
  .member-shell.is-mobile-nav-open .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link[href*="logout.php"] {
    justify-content: center !important;
    text-align: center !important;
    gap: 0 !important;
  }

  .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link[href*="logout.php"] .member-sidebar-label,
  .member-shell.is-mobile-nav-open .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link[href*="logout.php"] .member-sidebar-label {
    text-align: center !important;
  }
}

@media (max-width: 768px) {
  .site-desktop-header,
  .site-footer-bar{
    display:none !important;
  }

  .site-shell {
    width: min(100% - 16px, 1180px);
    padding: 12px 0 22px;
  }

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

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

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

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

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

  .panel,
  .card {
    padding: 16px;
  }

  .card-head {
    gap: 10px;
    margin-bottom: 10px;
  }

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

  .dashboard-icon::before {
    width: 20px;
    height: 20px;
  }

  .button,
  button,
  input[type="submit"] {
    min-height: 42px;
    padding: 10px 14px;
  }

  input,
  select,
  textarea {
    min-height: 44px;
    padding: 12px 14px;
  }

  textarea {
    min-height: 112px;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap table {
    min-width: 620px;
  }

  th,
  td {
    padding: 11px 10px;
    font-size: 0.92rem;
  }
}

@media (max-width: 520px) {
  body {
    overflow-x: hidden;
  }

  .site-shell {
    width: min(100% - 12px, 1180px);
    padding: 10px 0 18px;
  }

  .member-main,
  .stack,
  .grid,
  .grid.form {
    gap: 10px;
  }

  .panel,
  .card {
    padding: 14px;
    border-radius: 16px;
  }

  .notice {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .card-head {
    align-items: center;
  }

  .heading-panel,
  .heading-top-md,
  .stack-copy-md {
    font-size: 1.02rem;
    line-height: 1.25;
  }

  .muted,
  .copy-bottom,
  .meta-top-sm {
    font-size: 0.9rem;
  }

  .chip,
  .badge {
    font-size: 11px;
    padding: 5px 9px;
  }

  .inline-actions {
    gap: 8px;
  }

  .inline-actions .button,
  .inline-actions button,
  .inline-actions input[type="submit"] {
    width: 100%;
  }

  .stat-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .member-book-option {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .member-book-option.member-book-option-button {
    border-color: rgba(255,255,255,0.05) !important;
    background:
      linear-gradient(180deg, rgba(255,255,255,0.014), rgba(255,255,255,0.004)),
      rgba(6,16,29,0.58) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.016) !important;
    color: #eef5ff !important;
  }

  .member-book-option.member-book-option-button:hover {
    border-color: rgba(143,211,255,0.1) !important;
    background:
      linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.008)),
      rgba(8,20,35,0.72) !important;
    box-shadow: 0 10px 18px rgba(0,0,0,0.12) !important;
  }

  .member-book-option.is-unavailable{
    padding:12px;
    opacity:1;
    border-color: rgba(255,255,255,0.05);
    background:
      linear-gradient(180deg, rgba(255,255,255,0.014), rgba(255,255,255,0.004)),
      rgba(6,16,29,0.58);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.016);
  }

  .member-book-option.is-unavailable .member-book-option-meta{
    gap:6px;
  }

  .member-book-option.is-unavailable .member-book-option-meta .badge,
  .member-book-option.is-unavailable .member-book-option-meta .chip{
    max-width:100%;
    justify-content:flex-start;
  }

  .member-book-option.is-unavailable .member-book-quantity{
    width:100%;
    gap:6px;
  }

  .member-book-option.is-unavailable .member-book-quantity-shell{
    width:100%;
    min-width:0;
  }

  .member-book-option.is-unavailable .member-book-option-copy strong,
  .member-book-option.is-unavailable .member-book-option-copy .muted{
    color: inherit;
  }

  :root[data-theme="light"] .member-book-option.member-book-option-button,
  :root[data-theme="light"] .member-book-option.member-book-option-button:hover {
    border-color: rgba(190,208,233,0.78) !important;
    background-color: rgba(248,250,254,0.98) !important;
    background: linear-gradient(180deg, rgba(251,253,255,0.99), rgba(241,246,252,0.96)) !important;
    box-shadow: 0 8px 18px rgba(34,63,112,0.08) !important;
    color: #173455 !important;
  }

  :root[data-theme="light"] .member-book-option.member-book-option-button .member-book-option-copy strong {
    color: #173455 !important;
  }

  :root[data-theme="light"] .member-book-option.member-book-option-button .member-book-option-copy .muted {
    color: #667b96 !important;
  }

  :root[data-theme="light"] .member-book-option.member-book-option-button .member-book-option-cover {
    border-color: rgba(190,208,233,0.82) !important;
    box-shadow: 0 8px 16px rgba(34,63,112,0.08) !important;
  }

  :root[data-theme="light"] .member-book-option.member-book-option-button .member-book-option-cover-placeholder {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(239,245,253,0.94)) !important;
    border-color: rgba(35,72,127,0.12) !important;
    color: #6d83a0 !important;
  }

  :root[data-theme="light"] .member-book-option.member-book-option-static.is-unavailable,
  :root[data-theme="light"] .member-book-option.member-book-option-static.is-unavailable:hover{
    border-color: rgba(190,208,233,0.78) !important;
    background-color: rgba(248,250,254,0.98) !important;
    background: linear-gradient(180deg, rgba(251,253,255,0.99), rgba(241,246,252,0.96)) !important;
    box-shadow: 0 8px 18px rgba(34,63,112,0.08) !important;
    color: #173455 !important;
  }

  :root[data-theme="light"] .member-book-option.member-book-option-static.is-unavailable .member-book-option-copy strong{
    color: #173455 !important;
  }

  :root[data-theme="light"] .member-book-option.member-book-option-static.is-unavailable .member-book-option-copy .muted,
  :root[data-theme="light"] .member-book-option.member-book-option-static.is-unavailable .member-book-option-meta .muted{
    color: #667b96 !important;
  }

  :root[data-theme="light"] .member-book-option.member-book-option-static.is-unavailable .badge,
  :root[data-theme="light"] .member-book-option.member-book-option-static.is-unavailable .chip{
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(240,245,252,0.94)) !important;
    border-color: rgba(189,205,229,0.82) !important;
    color: #5c708a !important;
  }

  :root[data-theme="light"] .member-book-option.member-book-option-static.is-unavailable .member-book-option-cover{
    border-color: rgba(190,208,233,0.82) !important;
    box-shadow: 0 8px 16px rgba(34,63,112,0.08) !important;
  }

  :root[data-theme="light"] .member-book-option.member-book-option-static.is-unavailable .member-book-option-meta{
    gap: 7px;
  }

  .member-book-option.member-book-option-static.is-unavailable,
  .member-book-option.member-book-option-static.is-unavailable .member-book-option-copy,
  .member-book-option.member-book-option-static.is-unavailable .member-book-option-meta{
    align-items: center;
    text-align: center;
    justify-items: center;
  }

  .member-book-option.member-book-option-static.is-unavailable .member-book-option-meta .badge,
  .member-book-option.member-book-option-static.is-unavailable .member-book-option-meta .chip{
    justify-content: center;
  }

  .member-book-option > input[type="checkbox"] {
    margin-top: 2px;
  }

  .member-book-option-cover {
    width: 64px;
    height: 84px;
    padding: 3px;
  }

  .member-book-option-copy {
    gap: 6px;
  }

  .member-book-option-copy strong{
    -webkit-line-clamp:2;
    font-size:0.97rem;
  }

  .member-book-option-copy .muted{
    -webkit-line-clamp:2;
    font-size:0.88rem;
  }

  .ebook-card-cover {
    aspect-ratio: 5 / 6;
  }

  .ebook-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .ebook-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
    padding: 12px;
    gap: 0.65rem;
  }

  .ebook-card-cover {
    aspect-ratio: 4 / 5;
    width: 92px;
    border-radius: 14px;
  }

  .ebook-card-copy {
    gap: 8px;
  }

  .ebook-card-description {
    -webkit-line-clamp: 2;
    min-height: 2.7em;
    font-size: 0.9rem;
  }

  .ebook-card-actions {
    gap: 8px;
  }

  .ebook-card-actions .button,
  .ebook-card-actions .chip {
    width: 100%;
    justify-content: center;
  }

  .topbar {
    padding: 14px;
    margin-bottom: 12px;
  }

  .topbar h1 {
    font-size: 1.14rem;
  }

  .topbar p {
    font-size: 0.88rem;
  }
}

.member-mobile-nav-toggle {
  display: none;
}

.member-mobile-header {
  display: none;
}

@media (max-width: 768px) {
  body.member-mobile-nav-active {
    overflow: hidden;
  }

  :root{
    --member-mobile-header-height: 76px;
  }

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

  .member-main {
    grid-column: 1;
    padding-top: 18px;
  }

  .member-main > .topbar {
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
  }

  .member-main > .topbar > div:first-child {
    width: 100%;
    text-align: left;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar.topbar-member {
    min-height: 0;
    padding: 18px 18px 16px;
    border-radius: 22px;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar.topbar-member::before {
    inset: 12px 12px auto 12px;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar-kicker {
    margin: 0 0 8px;
    padding: 6px 10px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar-kicker::before {
    width: 6px;
    height: 6px;
    box-shadow: 0 0 0 4px rgba(123, 219, 255, 0.1);
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar.topbar-member h1 {
    max-width: none;
    font-size: clamp(1.5rem, 6vw, 1.95rem);
    line-height: 1.08;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar.topbar-member p:last-child {
    font-size: 13px;
    line-height: 1.45;
  }

  .member-mobile-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: var(--member-mobile-header-height);
    box-sizing: border-box;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 12px;
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(143, 211, 255, 0.14);
    border-radius: 0;
    background:
      linear-gradient(180deg, rgba(11, 26, 45, 0.97), rgba(7, 18, 32, 0.96)),
      rgba(7, 18, 32, 0.96);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: transform;
    isolation: isolate;
    pointer-events: auto;
    touch-action: manipulation;
  }

  .member-mobile-brand {
    min-width: 0;
    flex: 1 1 auto;
    max-width: calc(100% - 132px);
    display: flex;
    align-items: center;
    align-self: center;
    gap: 10px;
    color: #eef6ff;
    text-decoration: none;
  }

  .member-mobile-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(143, 211, 255, 0.22);
    object-fit: cover;
    flex: 0 0 auto;
  }

  .member-mobile-brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .member-mobile-brand-copy strong {
    display: block;
    font-size: 13.5px;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #f4f8ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .member-mobile-brand-copy span {
    display: block;
    font-size: 10.5px;
    line-height: 1.2;
    color: rgba(214, 226, 238, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .member-mobile-nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 5px;
    min-width: 110px;
  }

  .member-mobile-nav-toggle {
    display: inline-flex;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    right: auto;
    top: auto;
    z-index: auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    color: #eef6ff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    touch-action: manipulation;
  }

  .member-mobile-nav-toggle::after{
    display: none !important;
  }

  .member-mobile-theme-toggle {
    appearance: none;
    -webkit-appearance: none;
    min-height: 38px;
    width: 38px;
    height: 38px;
    padding: 0 !important;
    border: 0;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    color: #eef6ff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    justify-content: center !important;
    gap: 0 !important;
    touch-action: manipulation;
  }

  .member-mobile-theme-toggle::after{
    display: none !important;
  }

  .member-mobile-theme-toggle .theme-toggle-text {
    display: none !important;
  }

  .member-mobile-theme-toggle .theme-toggle-icon {
    width: 19px;
    height: 19px;
    min-width: 19px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    padding: 0;
  }

  .member-mobile-theme-toggle.theme-toggle[aria-pressed]{
    background: rgba(255,255,255,0.05);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  }

  .member-mobile-theme-toggle.theme-toggle[aria-pressed="true"] .theme-toggle-icon,
  .member-mobile-theme-toggle.theme-toggle[aria-pressed="false"] .theme-toggle-icon{
    background: transparent;
    box-shadow: none;
    color: inherit;
    transform: none;
  }

  .member-mobile-nav-toggle-bars,
  .member-mobile-nav-toggle-bars::before,
  .member-mobile-nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
    transition: transform .18s ease, opacity .18s ease;
  }

  .member-mobile-nav-toggle-bars {
    position: relative;
  }

  .member-mobile-nav-toggle-bars::before {
    position: absolute;
    top: -6px;
    left: 0;
  }

  .member-mobile-nav-toggle-bars::after {
    position: absolute;
    top: 6px;
    left: 0;
  }

  .member-sidebar {
    position: fixed;
    top: 10px;
    left: 10px;
    bottom: 10px;
    z-index: 110;
    width: min(320px, calc(100vw - 72px));
    max-height: none;
    margin: 0;
    transform: translate3d(calc(-100% - 28px), 0, 0) scale(0.985) !important;
    transform-origin: left top;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
    transition:
      transform .28s cubic-bezier(0.22, 1, 0.36, 1),
      opacity .28s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear .28s;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 54px 12px 12px;
    border-radius: 24px;
    background:
      linear-gradient(180deg, rgba(12, 27, 46, 0.98), rgba(7, 18, 33, 0.98)),
      rgba(7, 18, 33, 0.98);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  }

  .member-main > .topbar:first-child {
    padding-right: 24px;
    min-height: 62px;
    display: flex;
    align-items: center;
    margin-top: 0;
  }

  .member-main > .topbar:first-child::after {
    display: none;
  }

  .member-shell.is-mobile-nav-open .member-sidebar {
    transform: translate3d(0, 0, 0) scale(1) !important;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    animation: member-mobile-drawer-in .28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .member-shell.is-mobile-nav-closing .member-sidebar {
    visibility: visible;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 0, 0) scale(1) !important;
    transition:
      opacity .22s ease,
      visibility 0s linear .22s;
  }

  .member-shell.is-mobile-nav-open .member-mobile-nav-toggle {
    right: 14px;
    top: 14px;
  }

  .member-shell.is-mobile-nav-open .member-mobile-nav-toggle-bars {
    background: transparent;
  }

  .member-shell.is-mobile-nav-open .member-mobile-nav-toggle-bars::before {
    transform: translateY(6px) rotate(45deg);
  }

  .member-shell.is-mobile-nav-open .member-mobile-nav-toggle-bars::after {
    transform: translateY(-6px) rotate(-45deg);
  }

  .member-sidebar-head {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: -6px -4px 4px;
    padding: 0 4px 8px;
    background: linear-gradient(180deg, rgba(7, 18, 33, 0.98) 0%, rgba(7, 18, 33, 0.92) 78%, rgba(7, 18, 33, 0) 100%);
    backdrop-filter: blur(8px);
  }

  .member-sidebar-toggle {
    min-height: 36px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .member-sidebar-nav,
  .member-sidebar .topbar-nav.member-sidebar-utilities {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px;
  }

  .member-sidebar-nav {
    margin-bottom: 2px;
  }

  .member-sidebar-nav > *,
  .member-sidebar-utilities > *,
  .member-sidebar-section,
  .member-sidebar-group-label,
  .member-sidebar-head {
    opacity: 0;
    transform: translateY(8px);
    transition:
      opacity .18s ease,
      transform .22s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .member-shell.is-mobile-nav-open .member-sidebar-head,
  .member-shell.is-mobile-nav-open .member-sidebar-section,
  .member-shell.is-mobile-nav-open .member-sidebar-group-label,
  .member-shell.is-mobile-nav-open .member-sidebar-nav > *,
  .member-shell.is-mobile-nav-open .member-sidebar-utilities > * {
    opacity: 1;
    transform: translateY(0);
    animation: member-mobile-item-in .24s ease forwards;
  }

  .member-shell.is-mobile-nav-open .member-sidebar-head { animation-delay: .04s; }
  .member-shell.is-mobile-nav-open .member-sidebar-section { animation-delay: .07s; }
  .member-shell.is-mobile-nav-open .member-sidebar-group-label { animation-delay: .085s; }
  .member-shell.is-mobile-nav-open .member-sidebar-nav > *:nth-child(1) { animation-delay: .1s; }
  .member-shell.is-mobile-nav-open .member-sidebar-nav > *:nth-child(2) { animation-delay: .13s; }
  .member-shell.is-mobile-nav-open .member-sidebar-nav > *:nth-child(3) { animation-delay: .16s; }
  .member-shell.is-mobile-nav-open .member-sidebar-nav > *:nth-child(4) { animation-delay: .19s; }
  .member-shell.is-mobile-nav-open .member-sidebar-nav > *:nth-child(5) { animation-delay: .22s; }
  .member-shell.is-mobile-nav-open .member-sidebar-utilities > *:nth-child(1) { animation-delay: .25s; }
  .member-shell.is-mobile-nav-open .member-sidebar-utilities > *:nth-child(2) { animation-delay: .28s; }
  .member-shell.is-mobile-nav-open .member-sidebar-utilities > *:nth-child(3) { animation-delay: .31s; }

  .member-shell.is-mobile-nav-closing .member-sidebar-head,
  .member-shell.is-mobile-nav-closing .member-sidebar-section,
  .member-shell.is-mobile-nav-closing .member-sidebar-group-label,
  .member-shell.is-mobile-nav-closing .member-sidebar-nav > *,
  .member-shell.is-mobile-nav-closing .member-sidebar-utilities > * {
    opacity: 0;
    transform: translateY(4px);
  }

  .member-sidebar-link,
  .member-sidebar .theme-toggle,
  .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link,
  .member-sidebar .topbar-nav.member-sidebar-utilities > .theme-toggle {
    min-height: 40px;
    padding: 0 12px !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    border-radius: 14px;
    font-size: .96rem;
  }

  .member-sidebar-label,
  .member-shell .member-sidebar-label,
  .member-shell:not(.is-collapsed) .member-sidebar-label {
    width: auto;
    opacity: 1;
    overflow: visible;
    white-space: nowrap;
    font-size: .96rem;
  }

  .member-sidebar-section,
  .member-shell .member-sidebar-section,
  .member-shell:not(.is-collapsed) .member-sidebar-section {
    height: auto;
    margin: 8px 4px 2px;
    overflow: visible;
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(183, 196, 219, 0.82);
  }

  .member-sidebar-group-label {
    margin: 10px 4px 2px;
    font-size: .68rem;
    letter-spacing: .14em;
    color: rgba(183, 196, 219, 0.72);
  }

  .member-sidebar-group-label::before {
    width: 5px;
    height: 5px;
    margin-right: 7px;
  }

  .member-sidebar .dashboard-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    flex: 0 0 24px;
  }

  .member-sidebar-utilities {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link[href*="logout.php"] {
    margin-top: 4px;
    justify-content: center !important;
    border: 1px solid rgba(255, 127, 127, 0.22);
    background: linear-gradient(180deg, rgba(255, 127, 127, 0.14), rgba(255, 127, 127, 0.08));
    color: #ffe4e4;
    font-weight: 700;
  }

  .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link[href*="logout.php"] .member-sidebar-label {
    width: 100%;
    text-align: center;
    letter-spacing: .01em;
  }

  .member-sidebar-link[data-tooltip="Records Tracking"] .member-sidebar-label {
    letter-spacing: -.01em;
  }
}

@media (max-width: 768px) {
  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell)::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 105;
    background: rgba(3, 10, 18, 0.52);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, backdrop-filter .2s ease;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell).is-mobile-nav-open::before {
    opacity: 1;
    pointer-events: auto;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell).is-mobile-nav-closing::before {
    opacity: 1;
    pointer-events: auto;
  }

  .member-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 105;
    background: rgba(3, 10, 18, 0.52);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .24s ease, backdrop-filter .24s ease;
  }

  .member-shell.is-mobile-nav-open::before {
    opacity: 1;
    pointer-events: auto;
  }

  .member-main > .topbar:first-child {
    padding-right: 0;
    min-height: 0;
  }

  .member-shell.is-mobile-nav-open .member-mobile-nav-toggle {
    right: auto;
    top: auto;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar {
    top: calc(var(--member-mobile-header-height) + env(safe-area-inset-top, 0px));
    left: auto;
    right: 0;
    bottom: 0;
    width: min(86vw, 360px);
    max-width: 360px;
    max-height: calc(100dvh - (var(--member-mobile-header-height) + env(safe-area-inset-top, 0px)));
    border-radius: 24px 0 0 24px;
    border: 1px solid rgba(123,219,255,0.1);
    border-right: 0;
    background:
      radial-gradient(circle at top right, rgba(123,219,255,0.12), transparent 24%),
      linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025)),
      linear-gradient(145deg, rgba(12,31,50,0.96), rgba(7,19,34,0.98));
    box-shadow: -20px 24px 42px rgba(0,0,0,0.26);
    padding: 16px 14px 16px;
    transform: translate3d(calc(100% + 14px), 0, 0) !important;
    transform-origin: top right;
    transition: none;
    will-change: transform;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-x: hidden;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell).is-mobile-nav-open .member-sidebar {
    transform: translate3d(0, 0, 0) !important;
    animation: member-mobile-drawer-in .22s cubic-bezier(.22, 1, .36, 1) both;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell).is-mobile-nav-closing .member-sidebar {
    transform: translate3d(calc(100% + 14px), 0, 0) !important;
    animation: member-mobile-drawer-out-right .18s cubic-bezier(.4, 0, .2, 1) both;
  }

  .member-sidebar {
    top: 67px;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    max-height: calc(100dvh - 67px);
    border-radius: 0;
    border: 0;
    border-top: 0;
    background:
      linear-gradient(180deg, rgba(5, 12, 24, 0.985), rgba(3, 9, 19, 0.98)),
      rgba(3, 9, 19, 0.98);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
    padding: 16px 16px 20px;
    transform: translate3d(0, -18px, 0) scale(0.985) !important;
    transform-origin: top center;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .member-shell.is-mobile-nav-open .member-sidebar {
    transform: translate3d(0, 0, 0) scale(1) !important;
  }

  .member-shell.is-mobile-nav-closing .member-sidebar {
    transform: translate3d(0, -10px, 0) scale(0.99) !important;
  }

  .member-sidebar-head {
    display: none;
  }

  .member-sidebar-section,
  .member-shell .member-sidebar-section,
  .member-shell:not(.is-collapsed) .member-sidebar-section {
    display: none;
  }

  .member-sidebar-group-label {
    display: none;
  }

  .member-sidebar-nav,
  .member-sidebar .topbar-nav.member-sidebar-utilities {
    gap: 10px;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-nav {
    display: grid;
    gap: 10px;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar .topbar-nav.member-sidebar-utilities {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(143, 211, 255, 0.08);
    display: grid;
    gap: 8px;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-nav > *,
  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-utilities > * {
    opacity: 1;
    transform: none;
    transition:
      background-color .16s ease,
      box-shadow .16s ease,
      color .16s ease;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell).is-mobile-nav-open .member-sidebar-nav > *,
  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell).is-mobile-nav-open .member-sidebar-utilities > * {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell).is-mobile-nav-closing .member-sidebar-nav > *,
  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell).is-mobile-nav-closing .member-sidebar-utilities > * {
    opacity: 1;
    transform: none;
  }

  .member-sidebar-link,
  .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link,
  .member-sidebar .topbar-nav.member-sidebar-utilities > .theme-toggle {
    min-height: 0;
    padding: 11px 12px !important;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    color: #eef6ff;
    justify-content: flex-start !important;
    gap: 0 !important;
    transition:
      background-color .18s ease,
      transform .18s ease,
      color .18s ease,
      box-shadow .18s ease;
  }

  .member-sidebar-link:hover,
  .member-sidebar-link:focus-visible,
  .member-sidebar .theme-toggle:focus-visible {
    transform: translateX(-2px);
    border-color: transparent;
    background: linear-gradient(180deg, rgba(95, 177, 255, 0.14), rgba(95, 177, 255, 0.08));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  }

  .member-sidebar-link.is-active {
    border: 0;
    position: relative;
    background:
      linear-gradient(180deg, rgba(143,211,255,0.2), rgba(143,211,255,0.07)),
      rgba(8,21,38,0.36);
    box-shadow: 0 14px 28px rgba(10, 28, 49, 0.28), 0 0 0 1px rgba(143,211,255,0.08);
    color: #f2f8ff;
  }

  .member-sidebar-link.is-active::before {
    display: block;
    content: "";
    position: absolute;
    left: -1px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 6px 6px 0;
    background: rgba(143,211,255,0.95);
  }

  .member-sidebar .dashboard-icon {
    display: none;
  }

  .member-sidebar-label,
  .member-shell .member-sidebar-label,
  .member-shell:not(.is-collapsed) .member-sidebar-label,
  .member-shell .member-sidebar .theme-toggle-text,
  .member-shell:not(.is-collapsed) .member-sidebar .theme-toggle-text {
    width: auto !important;
    opacity: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    white-space: nowrap !important;
    font-size: 13px;
    font-weight: 600;
    text-align: left !important;
  }

  .member-sidebar .topbar-nav.member-sidebar-utilities > .theme-toggle {
    display: none !important;
  }

  .member-sidebar-link[href*="logout.php"] {
    color: #ffd7d7;
  }

  .member-sidebar-link[href*="logout.php"]:hover,
  .member-sidebar-link[href*="logout.php"]:focus-visible {
    background: rgba(255, 127, 127, 0.1);
    color: #ffe5e5;
  }

  :root[data-theme="light"] .member-sidebar-link.is-active {
    background: linear-gradient(180deg, rgba(47, 109, 255, 0.18), rgba(47, 109, 255, 0.1));
    color: #15304d;
  }

  :root[data-theme="light"] .member-sidebar-link.is-active::before {
    background: #2f6dff;
  }
}

@media (max-width: 768px) {
  :root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell)::before {
    background: rgba(224, 234, 246, 0.52);
  }

  :root[data-theme="light"] .member-shell::before {
    background: rgba(224, 234, 246, 0.52);
  }

  :root[data-theme="light"] .member-main > .topbar {
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
  }

  :root[data-theme="light"] .member-main > .topbar > div:first-child {
    width: 100%;
    text-align: left;
  }

  :root[data-theme="light"] .member-main > .topbar:first-child {
    padding-right: 70px;
    min-height: 62px;
    display: flex;
    align-items: center;
    margin-top: 0;
  }

  :root[data-theme="light"] .member-main > .topbar:first-child::after {
    display: none;
  }

  :root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar {
    border-color: rgba(188, 204, 228, 0.82);
    border-right: 0;
    background:
      linear-gradient(180deg, rgba(251, 253, 255, 0.995), rgba(243, 247, 252, 0.99)),
      rgba(243, 247, 252, 0.99);
    box-shadow: -18px 22px 38px rgba(62, 92, 138, 0.16);
  }

  :root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar .topbar-nav.member-sidebar-utilities {
    border-top-color: rgba(188, 204, 228, 0.72);
  }

  :root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link,
  :root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link {
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(245,249,255,0.86));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 8px 16px rgba(62, 92, 138, 0.06);
  }

  :root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link:hover,
  :root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link:focus-visible {
    background: linear-gradient(180deg, rgba(236,244,255,0.98), rgba(226,238,255,0.92));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.98), 0 10px 18px rgba(62, 92, 138, 0.08);
  }

  :root[data-theme="light"] .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-sidebar-link.is-active {
    background: linear-gradient(180deg, rgba(102, 160, 255, 0.26), rgba(72, 129, 232, 0.18));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.58), 0 12px 22px rgba(62, 92, 138, 0.12);
  }

  :root[data-theme="light"] .member-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: var(--member-mobile-header-height);
    box-sizing: border-box;
    padding: 11px 14px;
    border-radius: 0;
    border-bottom: 1px solid rgba(47, 109, 255, 0.12);
    background:
      linear-gradient(180deg, rgba(247, 250, 255, 0.98), rgba(238, 244, 252, 0.97)),
      rgba(238, 244, 252, 0.97);
    box-shadow: 0 10px 24px rgba(62, 92, 138, 0.12);
  }

  :root[data-theme="light"] .member-mobile-brand {
    min-width: 0;
    flex: 1 1 auto;
    max-width: calc(100% - 138px);
    display: flex;
    align-items: center;
    gap: 10px;
  }

  :root[data-theme="light"] .member-mobile-brand,
  :root[data-theme="light"] .member-mobile-brand-copy strong {
    color: #173455;
  }

  :root[data-theme="light"] .member-mobile-brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  :root[data-theme="light"] .member-mobile-brand-copy strong {
    display: block;
    font-size: 13.5px;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  :root[data-theme="light"] .member-mobile-brand-copy span {
    display: block;
    font-size: 10.5px;
    line-height: 1.2;
    color: rgba(39, 70, 108, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  :root[data-theme="light"] .member-mobile-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border-color: rgba(47, 109, 255, 0.18);
    flex: 0 0 auto;
  }

  :root[data-theme="light"] .member-mobile-nav-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 5px;
  }

  :root[data-theme="light"] .member-mobile-theme-toggle,
  :root[data-theme="light"] .member-mobile-nav-toggle {
    width: 38px;
    height: 38px;
    min-height: 38px;
    border-radius: 12px;
    border-color: rgba(35, 72, 127, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(241,246,255,0.88));
    color: #224266;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 10px 18px rgba(62, 92, 138, 0.1);
  }

  :root[data-theme="light"] .member-mobile-theme-toggle.theme-toggle[aria-pressed]{
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(237,244,255,0.92));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.94), 0 10px 18px rgba(62, 92, 138, 0.11);
  }

  :root[data-theme="light"] .student-header-notification-shortcut .dashboard-icon{
    border-color: rgba(47, 109, 255, 0.18) !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(234,243,255,0.94)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.96), 0 12px 20px rgba(62, 92, 138, 0.12) !important;
  }

  :root[data-theme="light"] .student-header-notification-shortcut:has(.student-header-notification-badge:not([hidden])) .dashboard-icon{
    border-color: rgba(47, 109, 255, 0.26) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.96), 0 12px 20px rgba(62, 92, 138, 0.12), 0 0 0 2px rgba(47, 109, 255, 0.1) !important;
  }

  :root[data-theme="light"] .member-mobile-header .student-header-notification-badge{
    top: -5px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 18px;
    border-color: rgba(247, 250, 255, 0.96);
    box-shadow: 0 8px 14px rgba(239,68,68,0.24), 0 5px 12px rgba(62, 92, 138, 0.14);
  }

  :root[data-theme="light"] .student-mobile-notification-shortcut {
    min-height: 36px !important;
    width: 36px !important;
    height: 36px !important;
  }

  :root[data-theme="light"] .student-mobile-notification-shortcut .dashboard-icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 11px !important;
  }

  :root[data-theme="light"] .member-mobile-theme-toggle.theme-toggle .theme-toggle-icon{
    background: transparent;
    box-shadow: none;
    color: inherit;
  }

  :root[data-theme="light"] .member-sidebar {
    background:
      linear-gradient(180deg, rgba(251, 253, 255, 0.995), rgba(243, 247, 252, 0.99)),
      rgba(243, 247, 252, 0.99);
    box-shadow: 0 20px 48px rgba(62, 92, 138, 0.16);
  }

  :root[data-theme="light"] .member-sidebar-link,
  :root[data-theme="light"] .member-sidebar .topbar-nav.member-sidebar-utilities > .member-sidebar-link {
    color: #1d3a5d;
  }

  :root[data-theme="light"] .member-sidebar-link:hover,
  :root[data-theme="light"] .member-sidebar-link:focus-visible {
    background: rgba(47, 109, 255, 0.08);
  }

  :root[data-theme="light"] .member-sidebar-link.is-active {
    background: rgba(47, 109, 255, 0.12);
    color: #15304d;
  }

  :root[data-theme="light"] .member-sidebar-link[href*="logout.php"] {
    color: #9f1d1d;
  }

  :root[data-theme="light"] .member-sidebar-link[href*="logout.php"]:hover,
  :root[data-theme="light"] .member-sidebar-link[href*="logout.php"]:focus-visible {
    background: rgba(221, 58, 58, 0.08);
    color: #7f1717;
  }

  :root[data-theme="light"] .member-dashboard-overview .stat-card,
  :root[data-theme="light"] .member-workspace-overview .stat-card {
    min-height: 128px !important;
    height: 128px !important;
    padding: 18px 16px !important;
    border-radius: 18px !important;
  }

  :root[data-theme="light"] .member-mobile-header .member-mobile-nav-actions > .student-mobile-notification-shortcut,
  :root[data-theme="light"] .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle,
  :root[data-theme="light"] .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle {
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border-radius: 10px !important;
  }

  :root[data-theme="light"] .member-mobile-header .member-mobile-nav-actions > .student-mobile-notification-shortcut {
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }
}

.member-book-group [data-book-trigger] .member-book-option-cover,
.member-book-group .member-book-option.member-book-option-button .member-book-option-cover {
  width: 98px !important;
  height: 126px !important;
}

@media (min-width: 1024px) {
  .member-book-group [data-book-trigger] .member-book-option-cover,
  .member-book-group .member-book-option.member-book-option-button .member-book-option-cover {
    width: 116px !important;
    height: 146px !important;
  }
}

@media (max-width: 768px) {
  .member-book-group [data-book-trigger] .member-book-option-cover,
  .member-book-group .member-book-option.member-book-option-button .member-book-option-cover {
    width: 116px !important;
    height: 146px !important;
  }
}


@media (max-width: 768px) {
  .member-mobile-header .member-mobile-nav-actions{
    gap: 6px;
    overflow: visible;
  }

  .student-mobile-notification-shortcut{
    min-height: 36px !important;
    width: 36px !important;
    height: 36px !important;
  }

  .student-mobile-notification-shortcut .dashboard-icon{
    width: 36px !important;
    height: 36px !important;
    border-radius: 11px !important;
    border-color: rgba(120,190,255,0.2) !important;
    box-shadow: 0 12px 22px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.06) !important;
  }

  .member-mobile-header .member-mobile-nav-actions > .student-mobile-notification-shortcut,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle {
    appearance: none !important;
    -webkit-appearance: none !important;
    -webkit-tap-highlight-color: transparent !important;
    tap-highlight-color: transparent !important;
    user-select: none !important;
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,0.05) !important;
    background-image: none !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04) !important;
    outline: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
  }

  .member-mobile-header .member-mobile-nav-actions > .student-mobile-notification-shortcut {
    background: transparent !important;
    box-shadow: none !important;
  }

  .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle::after,
  .member-mobile-header .member-mobile-nav-actions > .student-mobile-notification-shortcut::after,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle::after {
    display: none !important;
    content: none !important;
  }

  .member-mobile-header .member-mobile-nav-actions > .student-mobile-notification-shortcut{
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }

  .member-mobile-header .member-mobile-nav-actions > .student-mobile-notification-shortcut .dashboard-icon{
    width: 36px !important;
    height: 36px !important;
  }

  .member-mobile-header .student-header-notification-badge{
    top: -5px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 18px;
    border: 2px solid rgba(11, 26, 45, 0.96);
    box-shadow: 0 8px 14px rgba(239,68,68,0.3), 0 6px 12px rgba(0,0,0,0.24);
  }

  .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle .theme-toggle-icon {
    min-width: 18px !important;
    width: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: inherit !important;
    transform: none !important;
  }

  .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle .theme-toggle-icon svg{
    width: 18px !important;
    height: 18px !important;
  }

  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle .member-mobile-nav-toggle-bars,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle .member-mobile-nav-toggle-bars::before,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle .member-mobile-nav-toggle-bars::after{
    width: 18px !important;
  }

  .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle:hover,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle:focus-visible,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle:active,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle:focus,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle:hover,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle:focus-visible,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle:active{
    background: rgba(255,255,255,0.09) !important;
    background-image: none !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05) !important;
    border-color: transparent !important;
    transform: none !important;
    outline: none !important;
  }

  :root[data-theme="light"] .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle:hover,
  :root[data-theme="light"] .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle:focus-visible,
  :root[data-theme="light"] .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle:active,
  :root[data-theme="light"] .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle:focus,
  :root[data-theme="light"] .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle:hover,
  :root[data-theme="light"] .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle:focus-visible,
  :root[data-theme="light"] .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle:active {
    background: linear-gradient(180deg, rgba(255,255,255,1), rgba(235,243,255,0.94)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.96), 0 12px 20px rgba(62, 92, 138, 0.12) !important;
    border-color: rgba(47, 109, 255, 0.16) !important;
  }

  .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle:hover .theme-toggle-icon,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle:focus-visible .theme-toggle-icon,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-theme-toggle:active .theme-toggle-icon,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle:hover .member-mobile-nav-toggle-bars,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle:focus-visible .member-mobile-nav-toggle-bars,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle:active .member-mobile-nav-toggle-bars,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle:hover .member-mobile-nav-toggle-bars::before,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle:focus-visible .member-mobile-nav-toggle-bars::before,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle:active .member-mobile-nav-toggle-bars::before,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle:hover .member-mobile-nav-toggle-bars::after,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle:focus-visible .member-mobile-nav-toggle-bars::after,
  .member-mobile-header .member-mobile-nav-actions > .member-mobile-nav-toggle:active .member-mobile-nav-toggle-bars::after{
    box-shadow: none !important;
    filter: none !important;
  }
}

@media (max-width: 480px) {
  .member-book-group-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-book-option {
    padding: 15px 15px 16px;
  }

  .member-book-option-copy .muted,
  .member-book-description{
    width:min(100%, 28ch);
  }

  .member-book-description{
    display:none;
  }

  :root[data-theme="light"] .member-main > .topbar {
    padding: 16px;
  }

  :root[data-theme="light"] .member-main > .topbar h1 {
    font-size: 1.22rem;
  }

  :root[data-theme="light"] .member-main {
    gap: 12px;
  }

  :root[data-theme="light"] .member-main > .topbar,
  :root[data-theme="light"] .member-main > .panel,
  :root[data-theme="light"] .member-main > .card,
  :root[data-theme="light"] .member-dashboard-overview,
  :root[data-theme="light"] .member-workspace-overview,
  :root[data-theme="light"] .member-dashboard-grid .panel,
  :root[data-theme="light"] .member-workspace-grid .panel,
  :root[data-theme="light"] .member-workspace-history {
    border-radius: 18px;
  }

  :root[data-theme="light"] .member-dashboard-overview .stat-grid,
  :root[data-theme="light"] .member-workspace-overview .stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  :root[data-theme="light"] .member-dashboard-overview .stat-card,
  :root[data-theme="light"] .member-workspace-overview .stat-card,
  :root[data-theme="light"] .member-dashboard-grid .panel {
    padding: 15px;
  }

  :root[data-theme="light"] .member-dashboard-overview .stat-card,
  :root[data-theme="light"] .member-workspace-overview .stat-card {
    min-height: 116px !important;
    height: 116px !important;
    padding: 15px !important;
    border-radius: 18px !important;
  }

  .member-main > .topbar {
    padding: 16px;
  }

  .member-main > .topbar h1 {
    font-size: 1.22rem;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar.topbar-member {
    padding: 16px 16px 14px;
    border-radius: 20px;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar-kicker {
    margin-bottom: 7px;
    padding: 5px 9px;
    font-size: 9.5px;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar.topbar-member h1 {
    font-size: clamp(1.34rem, 6.2vw, 1.72rem);
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .topbar.topbar-member p:last-child {
    font-size: 12.5px;
    line-height: 1.4;
  }

  .toolbar-top .grow {
    gap: 4px;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .card-head {
    gap: 10px;
    align-items: flex-start;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .card-head > .dashboard-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .heading-top-md,
  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-dashboard-grid .stack-copy-md {
    font-size: 1rem;
    line-height: 1.24;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .chip,
  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .inline-actions .chip {
    min-height: 28px;
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
  }

  .heading-card {
    font-size: 1.02rem;
    line-height: 1.28;
  }

  .member-dashboard-overview .stat-grid,
  .member-workspace-overview .stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-dashboard-overview .stat-card,
  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-workspace-overview .stat-card,
  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-dashboard-grid .panel,
  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .member-workspace-grid .panel {
    padding: 14px;
  }

  .member-dashboard-overview .stat-card,
  .member-workspace-overview .stat-card {
    min-height: 116px;
    height: auto;
  }

  .activity-item {
    padding: 13px;
  }

  .activity-item .meta {
    font-size: .92rem;
  }

  .member-main {
    gap: 12px;
  }

  .member-main > .topbar,
  .member-main > .panel,
  .member-main > .card {
    border-radius: 18px;
  }

  .member-mobile-header {
    padding-inline: 12px;
    gap: 8px;
  }

  .member-mobile-header .student-header-notification-badge{
    top: -4px;
    right: -5px;
  }

  .member-mobile-brand {
    max-width: calc(100% - 126px);
    gap: 9px;
  }

  .member-mobile-brand-mark {
    width: 30px;
    height: 30px;
  }

  .member-mobile-brand-copy strong {
    font-size: 13px;
  }

  .member-mobile-brand-copy span {
    display: block;
    font-size: 10px;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ebook-grid {
    gap: 8px;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ebook-card {
    grid-template-columns: 82px minmax(0, 1fr);
    padding: 10px;
    gap: 0.6rem;
    border-radius: 16px;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ebook-card-cover {
    width: 82px;
    border-radius: 12px;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ebook-card-copy {
    gap: 6px;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ebook-card-copy .label-block {
    font-size: 0.94rem;
    line-height: 1.22;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ebook-card-copy .muted {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ebook-card-description {
    min-height: 2.5em;
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ebook-card-actions {
    gap: 6px;
    align-items: stretch;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ebook-card-actions .button {
    min-height: 34px;
    padding: 0.55rem 0.75rem;
    font-size: 0.84rem;
  }

  .site-shell.member-shell:not(.admin-shell):not(.librarian-shell) .ebook-card-actions .chip {
    min-height: 30px;
    font-size: 0.68rem;
  }
}

