:root {
  --navy-950: #071426;
  --navy-900: #0d1d33;
  --navy-850: #102744;
  --navy-800: #153252;
  --navy-700: #22496d;
  --teal-700: #087f75;
  --teal-600: #07988a;
  --emerald-600: #05a978;
  --emerald-500: #10bd87;
  --emerald-100: #dff8ef;
  --emerald-50: #f0fdf9;
  --blue-100: #eaf2ff;
  --amber-600: #c27a08;
  --amber-100: #fff4d7;
  --red-600: #d14949;
  --red-100: #feeaea;
  --purple-600: #7957c5;
  --purple-100: #f0eaff;
  --ink: #172133;
  --muted: #718096;
  --muted-light: #95a4bb;
  --line: #e1e8f0;
  --surface: #ffffff;
  --background: #f5f8fb;
  --shadow-sm: 0 4px 14px rgba(15, 39, 70, 0.06);
  --shadow-md: 0 14px 36px rgba(15, 39, 70, 0.12);
  --shadow-hover: 0 8px 28px rgba(15, 39, 70, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --sidebar-width: 270px;
  --transition-fast: .18s cubic-bezier(.4, 0, .2, 1);
  --transition-med: .3s cubic-bezier(.4, 0, .2, 1);
}

.employee-mobile-view {
  display: none;
}

* {
  box-sizing: border-box;
}

html {
  font-family: "Inter", "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
  scroll-behavior: smooth;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background-image: radial-gradient(ellipse 80% 50% at 95% 5%, rgba(16, 189, 135, .04), transparent);
}

/* Lock the installed PWA layout on touch devices while preserving page scrolling. */
@media (max-width: 1180px), (pointer: coarse) {
  html,
  body {
    touch-action: pan-x pan-y;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  button,
  a,
  [role="button"],
  .nav-item,
  .card {
    touch-action: manipulation;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }
}

::selection {
  background: #b3eadb;
  color: #0d1d33;
}

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

button {
  cursor: pointer;
}

svg {
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.is-hidden {
  display: none !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #c8d5e0;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a0b0c0;
}

/* Login */
.login-screen { display: grid; grid-template-columns: minmax(520px, 1.9fr) minmax(430px, 1fr); min-height: 100vh; background: #fff; }
.login-brand-panel { position: relative; overflow: hidden; display: grid; place-items: center; padding: 50px; color: white; background: linear-gradient(135deg, var(--navy-900) 4%, #174668 48%, #07b57f 120%); }
.login-brand-panel::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 50% 50%, transparent 0 35%, rgba(3,18,35,.2) 100%), linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px); background-size: auto, 44px 44px, 44px 44px; }
.brand-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35; }
.brand-orb-one { width: 500px; height: 500px; top: -280px; right: -110px; background: #0be6af; animation: orb-float 8s ease-in-out infinite; }
.brand-orb-two { width: 380px; height: 380px; bottom: -190px; left: 22%; background: #10cbaa; animation: orb-float 10s ease-in-out infinite reverse; }
@keyframes orb-float { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-30px) scale(1.05); } }
.login-brand-content { position: relative; z-index: 1; max-width: 620px; text-align: center; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(145deg, var(--teal-600), var(--emerald-500)); color: white; font-weight: 900; font-size: 23px; box-shadow: 0 8px 20px rgba(4,160,121,.25); }
.brand-mark-light { margin: 0 auto; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); box-shadow: none; }
.eyebrow-light { margin: 18px 0 6px; color: #8ce7d3; font-size: 14px; letter-spacing: 2px; font-weight: 800; }
.login-brand-content h1 { margin: 0; font-size: clamp(46px, 5vw, 72px); letter-spacing: -2.5px; line-height: 1.05; }
.login-brand-copy { max-width: 520px; margin: 22px auto 32px; color: #c6d6e2; font-size: 22px; line-height: 1.7; }
.login-feature-list { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.login-feature-list span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 999px; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.09); color: #d9ede9; font-size: 15px; backdrop-filter: blur(8px); animation: pill-appear .6s cubic-bezier(.16,1,.3,1) backwards; }
.login-feature-list span:nth-child(1) { animation-delay: .1s; }
.login-feature-list span:nth-child(2) { animation-delay: .2s; }
.login-feature-list span:nth-child(3) { animation-delay: .3s; }
.login-feature-list span:nth-child(4) { animation-delay: .4s; }
@keyframes pill-appear { from { opacity: 0; transform: translateY(12px) scale(.95); } }
.login-feature-list svg { color: #2ce3ad; }
.login-brand-footer { position: absolute; z-index: 1; left: 50px; bottom: 30px; color: rgba(255,255,255,.55); font-size: 14px; }
.login-form-panel { display: grid; place-items: center; padding: 52px clamp(38px, 5vw, 88px); animation: slide-in-right .5s cubic-bezier(.16,1,.3,1); }
@keyframes slide-in-right { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
.login-card { width: min(100%, 500px); }
.login-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 36px; }
.section-kicker { display: block; margin-bottom: 8px; color: var(--emerald-600); font-size: 13px; font-weight: 900; letter-spacing: 1.8px; }
.login-card h2 { margin: 0; color: var(--ink); font-size: 40px; letter-spacing: -.8px; }
.login-card > p { margin: 10px 0 34px; color: var(--muted-light); font-size: 18px; }
.login-mobile-header { display: none; }
.login-desktop-header { display: block; }
.login-company-note-wrapper { margin-top: 32px; display: none; }
.login-company-note { text-align: center; font-size: 14px !important; margin: 28px 0 0 !important; }

.field-label { display: block; margin: 20px 0 8px; font-size: 16px; font-weight: 750; }
.input-with-icon { position: relative; }
.input-with-icon > span { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: #9bacbf; }
.input-with-icon input, .input-with-icon select { width: 100%; height: 58px; padding: 0 52px; border: 1px solid #d7e0eb; border-radius: 13px; outline: none; background: #f8fafc; color: var(--ink); transition: .2s; }
.input-with-icon input:focus { background: white; border-color: var(--emerald-500); box-shadow: 0 0 0 4px rgba(16,189,135,.11); }
.input-icon-button { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 38px; height: 38px; color: var(--muted-light); background: transparent; border: 0; }
.login-options { display: flex; justify-content: space-between; align-items: center; margin: 17px 0 24px; color: var(--muted); font-size: 15px; }
.login-options label { display: flex; align-items: center; gap: 7px; }
.login-options input { accent-color: var(--emerald-600); }
.text-button { border: 0; padding: 0; background: transparent; color: var(--teal-600); font-weight: 700; }
.primary-button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: white; background: linear-gradient(135deg, var(--teal-600), var(--emerald-500)); font-weight: 800; box-shadow: 0 8px 20px rgba(8,152,138,.18); transition: transform .18s, box-shadow .18s; white-space: nowrap; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(8,152,138,.3); }
.primary-button:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(8,152,138,.2); }
.login-button { width: 100%; min-height: 58px; font-size: 18px; position: relative; overflow: hidden; }
.login-button::after { content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent); transition: none; }
.login-button:hover::after { left: 100%; transition: left .6s ease; }

/* Shell */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--navy-900) 0%, #0c2741 55%, #0e3350 85%, #0f3a55 100%);
  color: white;
  box-shadow: 7px 0 25px rgba(9, 28, 47, .08);
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .12);
  border-radius: 999px;
}

.sidebar-brand {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.sidebar-brand .brand-mark {
  flex: 0 0 auto;
  margin: 0;
  width: 40px;
  height: 40px;
}

.sidebar-brand div:nth-child(2) {
  min-width: 0;
}

.sidebar-brand strong,
.sidebar-brand span {
  display: block;
}

.sidebar-brand strong {
  font-size: 18px;
}

.sidebar-brand span {
  margin-top: 2px;
  color: #88a1b8;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.icon-button {
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  color: inherit;
}

.sidebar-close {
  display: none;
  margin-left: auto;
}

.sidebar-nav {
  padding: 8px 12px 18px;
  flex: 1;
  overflow-y: auto;
}

.nav-label {
  margin: 18px 11px 7px;
  color: #65849d;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.nav-item {
  position: relative;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: #aebfce;
  text-align: left;
  font-size: 15px;
  transition: var(--transition-fast);
  text-decoration: none !important;
  margin-bottom: 4px;
}

.nav-item svg {
  width: 18px;
  height: 18px;
}

.nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, .07);
  text-decoration: none !important;
}

.nav-item.is-active {
  color: white;
  background: rgba(255, 255, 255, .12);
  font-weight: 600;
  text-decoration: none !important;
}

.nav-item.is-active svg {
  color: #2dd6aa;
}

.nav-item em {
  margin-left: auto;
  min-width: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(40, 207, 165, .16);
  color: #6fe6c4;
  font-size: 11px;
  font-style: normal;
  text-align: center;
  line-height: 1;
}

.sidebar-support {
  margin: 0 12px 13px;
  padding: 14px;
  border: 1px solid rgba(76, 224, 188, .2);
  border-radius: 13px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 9px;
  background: rgba(25, 129, 118, .14);
  position: relative;
  overflow: hidden;
}

.sidebar-support::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(76, 224, 188, .25), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.support-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(33, 211, 164, .14);
  color: #3ddbb0;
}

.sidebar-support strong,
.sidebar-support span {
  display: block;
}

.sidebar-support strong {
  font-size: 13px;
}

.sidebar-support span {
  margin-top: 2px;
  color: #82a5b4;
  font-size: 11px;
}

.sidebar-support .support-btn {
  grid-column: 1 / -1;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .12);
  color: white;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background var(--transition-fast);
  margin-top: 4px;
}

.sidebar-support .support-btn:hover {
  background: rgba(255, 255, 255, .2);
}

.sidebar-user {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 16px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-user>div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.sidebar-user strong,
.sidebar-user span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user strong {
  font-size: 13px;
}

.sidebar-user span {
  margin-top: 3px;
  color: #7390a5;
  font-size: 11px;
}

.sidebar-user .icon-button {
  color: #7f99ac;
}

.avatar {
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #d8e5ef;
  color: #44617b;
  font-size: 13px;
  font-weight: 900;
}

.avatar-admin {
  color: #075e58;
  background: linear-gradient(145deg, #d9fbf2, #a8eadb);
  position: relative;
}

.avatar-admin::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10bd87;
  border: 2px solid var(--navy-900);
  box-shadow: 0 0 0 1px rgba(16, 189, 135, .3);
}

.avatar-image {
  overflow: hidden;
}

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

.sidebar-overlay {
  display: none;
}

.workspace {
  min-width: 0;
  grid-column: 2;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: 76px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 13px;
}

.topbar-left h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -.3px;
}

.topbar-left p {
  margin: 3px 0 0;
  color: var(--muted-light);
  font-size: 12px;
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--ink);
  background: #f2f6f9;
}

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

.global-search {
  position: relative;
  width: min(25vw, 310px);
}

.global-search>span {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-light);
}

.global-search input {
  width: 100%;
  height: 40px;
  padding: 0 51px 0 39px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: #f7f9fb;
  font-size: 13px;
}

.global-search input:focus {
  border-color: #8bdac7;
  background: white;
  box-shadow: 0 0 0 3px rgba(16, 189, 135, .09);
}

.global-search kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 5px;
  border: 1px solid #dce5ec;
  border-radius: 5px;
  color: #899aab;
  background: white;
  font-size: 11px;
}

.topbar-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  color: #667b90;
  background: #f7f9fb;
  border: 1px solid var(--line);
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-500);
  border: 2px solid white;
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(16, 189, 135, .4);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(16, 189, 135, 0);
  }
}

.profile-button {
  border: 0;
  padding: 4px 2px 4px 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  text-align: left;
}

.profile-button strong,
.profile-button span {
  display: block;
}

.profile-button strong {
  font-size: 12px;
}

.profile-button span {
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 11px;
}

.profile-button i {
  width: 6px;
  height: 6px;
  margin: 0 5px;
  border-right: 1.5px solid #8294a7;
  border-bottom: 1.5px solid #8294a7;
  transform: rotate(45deg);
}

.notification-popover {
  display: none;
  position: fixed;
  z-index: 50;
  top: 68px;
  right: 105px;
  width: min(380px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow-md);
}

.notification-popover.is-open {
  display: block;
}

.notification-popover h4 {
  margin: 8px 10px;
  font-size: 15px;
}

.notification-entry {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 9px;
}

.notification-entry:hover {
  background: #f6faf9;
}

.notification-entry .notification-icon {
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--teal-600);
  background: var(--emerald-100);
}

.notification-entry strong {
  display: block;
  font-size: 12px;
}

.notification-entry p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.push-setup-card{margin:0 0 18px;padding:14px 16px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:13px;border:1px solid #cfe8e3;border-radius:15px;background:linear-gradient(110deg,#effbf8,#fff);box-shadow:0 5px 18px rgba(11,85,78,.05)}
.push-setup-card__icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;color:#078a79;background:#daf6ee}.push-setup-card__copy strong{display:block;color:#18364d;font-size:13px}.push-setup-card__copy p{margin:2px 0 0;color:#71869a;font-size:10.5px}.push-toggle-button{min-height:40px;gap:8px}.push-live-dot{width:8px;height:8px;border-radius:50%;background:#a2afba}.push-toggle-button.is-enabled{color:#067b6c;border-color:#9ddfcf;background:#e5f9f3}.push-toggle-button.is-enabled .push-live-dot{background:#0fbd89;box-shadow:0 0 0 4px rgba(15,189,137,.13)}
@media(max-width:620px){.push-setup-card{grid-template-columns:38px 1fr;padding:12px}.push-setup-card__icon{width:38px;height:38px}.push-toggle-button{grid-column:1/-1;width:100%}}
.push-permission-recovery{position:fixed;z-index:120;right:18px;bottom:18px;width:min(430px,calc(100vw - 28px));padding:16px;display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:12px;border:1px solid #f0d7a6;border-radius:16px;background:#fffdf8;box-shadow:0 18px 45px rgba(30,46,65,.2);animation:modal-in .25s ease}.push-permission-recovery__icon{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:#fff2d4;font-size:18px}.push-permission-recovery strong{display:block;color:#25394e;font-size:12px}.push-permission-recovery p{margin:3px 0 0;color:#718096;font-size:10px;line-height:1.5}.push-permission-recovery>a{padding:8px 10px;border-radius:9px;color:#087f75;background:#e3f7f1;font-size:10px;font-weight:800;white-space:nowrap}.push-permission-recovery__close{position:absolute;top:4px;right:7px;border:0;color:#98a5b2;background:transparent;font-size:18px}@media(max-width:540px){.push-permission-recovery{right:14px;bottom:82px;grid-template-columns:38px 1fr}.push-permission-recovery>a{grid-column:1/-1;text-align:center}}

.page-content {
  padding: 28px 32px 44px;
  animation: content-fade-in .4s cubic-bezier(.16, 1, .3, 1);
}

@keyframes content-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reusable content */
.page-head {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.page-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: 27px;
  letter-spacing: -.5px;
}

.page-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.secondary-button,
.ghost-button,
.danger-button {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.secondary-button {
  border: 1px solid var(--line);
  color: #405269;
  background: white;
}

.secondary-button:hover {
  border-color: #a8dbce;
  color: var(--teal-700);
}

.ghost-button {
  border: 0;
  color: var(--teal-700);
  background: var(--emerald-100);
}

.danger-button {
  border: 1px solid #ffd0d0;
  color: var(--red-600);
  background: #fff7f7;
}

.button-sm {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 11px;
}

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

.stat-card {
  position: relative;
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.stat-card::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  top: -50px;
  right: -45px;
  border-radius: 50%;
  background: var(--card-tint, #effaf7);
}

.stat-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--card-color, var(--teal-600));
  background: var(--card-tint, var(--emerald-100));
}

.stat-trend {
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--emerald-600);
  background: var(--emerald-100);
  font-size: 10px;
  font-weight: 800;
}

.stat-trend.down {
  color: var(--red-600);
  background: var(--red-100);
}

.stat-card strong.stat-value {
  display: block;
  margin-top: 13px;
  font-size: 25px;
  line-height: 1;
}

.stat-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card-header {
  min-height: 56px;
  padding: 14px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #ebf0f4;
  background: linear-gradient(180deg, #fafcfd, white);
}

.card-header h3 {
  margin: 0;
  font-size: 17px;
}

.card-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.card-header button:not(.primary-button):not(.secondary-button) {
  border: 0;
  background: transparent;
  color: var(--teal-600);
  font-size: 13px;
  font-weight: 750;
  transition: color var(--transition-fast);
}

.card-header button:not(.primary-button):not(.secondary-button):hover {
  color: var(--teal-700);
}

.card-body {
  padding: 17px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr);
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr 1fr;
  gap: 16px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 17px;
}

.quick-action {
  min-height: 74px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: white;
  color: #42576c;
  font-size: 12px;
  font-weight: 700;
  transition: var(--transition-fast);
}

.quick-action:hover {
  border-color: #92d9c8;
  background: #f7fffc;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(8, 152, 138, .1);
}

.quick-action span {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--teal-600);
  background: var(--emerald-100);
  transition: transform var(--transition-fast);
}

.quick-action:hover span {
  transform: scale(1.1);
}

.alert-list,
.upcoming-list,
.activity-list {
  display: grid;
  gap: 6px;
}

.alert-row {
  padding: 11px;
  border-radius: 11px;
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: #f8fafb;
}

.alert-row.is-urgent {
  background: #fff8f8;
}

.list-icon {
  width: 37px;
  height: 37px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--teal-600);
  background: var(--emerald-100);
}

.list-icon.red {
  color: var(--red-600);
  background: var(--red-100);
}

.list-icon.amber {
  color: var(--amber-600);
  background: var(--amber-100);
}

.list-icon.purple {
  color: var(--purple-600);
  background: var(--purple-100);
}

.alert-row strong,
.upcoming-item strong {
  display: block;
  font-size: 13px;
}

.alert-row p,
.upcoming-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.date-badge {
  min-width: 48px;
  text-align: right;
  color: var(--muted-light);
  font-size: 11px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--teal-700);
  background: var(--emerald-100);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.blue {
  color: #3974b8;
  background: var(--blue-100);
}

.status-badge.amber {
  color: var(--amber-600);
  background: var(--amber-100);
}

.status-badge.red {
  color: var(--red-600);
  background: var(--red-100);
}

.status-badge.purple {
  color: var(--purple-600);
  background: var(--purple-100);
}

.status-badge.gray {
  color: #718096;
  background: #edf1f4;
}

.status-badge.nodot::before {
  display: none;
}

.upcoming-item {
  padding: 10px 0;
  display: flex;
  gap: 10px;
  border-bottom: 1px solid #edf1f4;
}

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

.date-square {
  flex: 0 0 auto;
  width: 38px;
  height: 42px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--teal-700);
  background: var(--emerald-100);
  line-height: 1;
}

.date-square strong {
  font-size: 16px;
}

.date-square span {
  font-size: 9px;
  text-transform: uppercase;
}

.mini-progress-row {
  margin: 12px 0;
}

.mini-progress-row>div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
}

.mini-progress-row>div:first-child span:last-child {
  color: var(--muted);
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: #edf2f5;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-600), var(--emerald-500));
  animation: progress-grow .8s cubic-bezier(.16, 1, .3, 1);
}

@keyframes progress-grow {
  from {
    width: 0 !important;
  }
}

.asset-summary {
  display: flex;
  align-items: center;
  gap: 18px;
}

.donut-chart {
  position: relative;
  flex: 0 0 auto;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(var(--emerald-500) 0 var(--available), #4c8ad4 var(--available) var(--borrowed), #f2b84b var(--borrowed) var(--repair), #e3e9ef var(--repair) 100%);
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 17px;
  border-radius: 50%;
  background: white;
}

.donut-label {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
}

.donut-label strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.legend {
  display: grid;
  gap: 8px;
  width: 100%;
}

.legend-row {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-row strong {
  color: var(--ink);
}

/* Toolbars and tables */
.toolbar {
  margin-bottom: 14px;
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 190px;
}

.search-box span {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-light);
}

.search-box input,
.filter-select {
  width: 100%;
  height: 38px;
  border: 1px solid #dde5ec;
  border-radius: 9px;
  outline: none;
  color: #45586b;
  background: #fafcfd;
  font-size: 12px;
}

.search-box input {
  padding: 0 12px 0 37px;
}

.filter-select {
  width: auto;
  min-width: 130px;
  padding: 0 30px 0 11px;
}

.search-box input:focus,
.filter-select:focus {
  border-color: #8ad9c6;
  background: white;
}

.view-toggle {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f5f8fa;
}

.view-toggle button {
  width: 31px;
  height: 29px;
  border: 0;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--muted-light);
  background: transparent;
}

.view-toggle button.is-active {
  color: var(--teal-700);
  background: white;
  box-shadow: 0 2px 7px rgba(15, 39, 70, .08);
}

.table-card {
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  height: 42px;
  padding: 0 13px;
  color: #7a8b9c;
  background: #f7f9fb;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .35px;
  white-space: nowrap;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table td {
  height: 56px;
  padding: 8px 13px;
  border-bottom: 1px solid #edf1f4;
  color: #45576a;
  font-size: 13px;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: var(--transition-fast);
}

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

.data-table tbody tr:hover {
  background: #f0faf7;
}

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

.identity-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 150px;
}

.identity-cell .avatar {
  width: 33px;
  height: 33px;
  border-radius: 10px;
}

.identity-cell strong,
.identity-cell span {
  display: block;
}

.identity-cell strong {
  color: var(--ink);
  font-size: 13px;
}

.identity-cell span {
  margin-top: 3px;
  color: var(--muted-light);
  font-size: 11px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.table-icon-button {
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #708396;
  background: transparent;
  transition: all var(--transition-fast);
}

.table-icon-button:hover {
  color: var(--teal-700);
  background: var(--emerald-100);
  transform: scale(1.1);
}

.table-icon-button.danger:hover {
  color: var(--red-600);
  background: var(--red-100);
}

.table-footer {
  min-height: 48px;
  padding: 8px 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #edf1f4;
  color: var(--muted);
  font-size: 11px;
}

.pagination {
  display: flex;
  gap: 4px;
}

.pagination button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #6a7c8d;
  background: white;
  font-size: 11px;
}

.pagination button.is-active {
  border-color: var(--teal-600);
  color: white;
  background: var(--teal-600);
}

.empty-state {
  padding: 50px 20px;
  text-align: center;
}

.empty-state span {
  width: 50px;
  height: 50px;
  margin: 0 auto 13px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--teal-600);
  background: var(--emerald-100);
}

.empty-state h3 {
  margin: 0;
  font-size: 16px;
}

.empty-state p {
  margin: 6px 0 15px;
  color: var(--muted);
  font-size: 12px;
}

.asset-code {
  color: var(--teal-700);
  font-weight: 850;
}

.asset-name strong,
.asset-name span {
  display: block;
}

.asset-name strong {
  color: var(--ink);
  font-size: 12px;
}

.asset-name span {
  margin-top: 3px;
  color: var(--muted-light);
  font-size: 10px;
}

.money-value {
  color: var(--ink);
  font-weight: 800;
}

/* Requests, alerts, cards */
.tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
}

.tab-button {
  min-height: 33px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.tab-button.is-active {
  color: var(--teal-700);
  background: var(--emerald-100);
}

.tab-button em {
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  font-style: normal;
  font-size: 10px;
}

.request-type {
  display: flex;
  align-items: center;
  gap: 8px;
}

.request-type>span {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--teal-600);
  background: var(--emerald-100);
}

.request-type strong,
.request-type small {
  display: block;
}

.request-type strong {
  color: var(--ink);
  font-size: 13px;
}

.request-type small {
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 11px;
}

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

.alert-card {
  position: relative;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.alert-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--alert-color, var(--emerald-500));
}

.alert-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.alert-priority {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--alert-color, var(--teal-600));
  font-size: 10px;
  font-weight: 850;
}

.alert-priority::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.alert-card h3 {
  margin: 12px 0 5px;
  font-size: 15px;
}

.alert-card>p {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.alert-meta {
  margin: 13px 0;
  padding: 10px 0;
  display: grid;
  gap: 7px;
  border-top: 1px solid #edf1f4;
  border-bottom: 1px solid #edf1f4;
  color: #687c90;
  font-size: 10px;
}

.alert-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.alert-meta svg {
  color: #95a5b5;
}

.alert-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.read-progress {
  flex: 1;
  max-width: 120px;
}

.read-progress span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
}

.alert-card-menu {
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f5f8fa;
}

/* Calendar */
.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 16px;
}

.calendar-card {
  overflow: hidden;
}

.calendar-toolbar {
  min-height: 62px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.calendar-toolbar h3 {
  margin: 0;
  font-size: 17px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.calendar-nav button {
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: white;
  color: var(--muted);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-weekdays {
  border-bottom: 1px solid var(--line);
}

.calendar-weekdays span {
  padding: 10px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
  font-weight: 800;
}

.calendar-day {
  position: relative;
  min-height: 108px;
  padding: 8px;
  border-right: 1px solid #edf1f4;
  border-bottom: 1px solid #edf1f4;
  background: white;
  overflow: hidden;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day.is-outside {
  background: #fafbfc;
  color: #b8c2cc;
}

.calendar-day.is-today .day-number {
  color: white;
  background: var(--emerald-500);
}

.day-number {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}

.calendar-event {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 4px 5px;
  border: 0;
  border-left: 2px solid var(--event-color, var(--teal-600));
  border-radius: 4px;
  color: var(--event-text, var(--teal-700));
  background: var(--event-bg, var(--emerald-100));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-size: 9px;
}

.calendar-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.mini-calendar-legend {
  display: grid;
  gap: 10px;
}

.legend-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #617589;
  font-size: 11px;
}

.legend-chip span {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.today-event {
  padding: 11px 0;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  border-bottom: 1px solid #edf1f4;
}

.today-event:last-child {
  border-bottom: 0;
}

.today-event time {
  color: var(--teal-700);
  font-size: 10px;
  font-weight: 800;
}

.today-event strong {
  display: block;
  font-size: 11px;
}

.today-event p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

/* Documents, reports, settings */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 17px;
}

.folder-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  text-align: left;
  transition: all var(--transition-fast);
}

.folder-card:hover {
  border-color: #9edecf;
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.folder-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--folder-color, var(--teal-600));
  background: var(--folder-bg, var(--emerald-100));
  transition: transform var(--transition-fast);
}

.folder-card:hover .folder-icon {
  transform: scale(1.08);
}

.folder-card strong,
.folder-card span {
  display: block;
}

.folder-card strong {
  margin-top: 12px;
  font-size: 13px;
}

.folder-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.document-icon {
  width: 31px;
  height: 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #3974b8;
  background: var(--blue-100);
}

.ticket-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ticket-kpi {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: white;
}

.ticket-kpi>span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--kpi-color);
  background: var(--kpi-bg);
}

.ticket-kpi strong,
.ticket-kpi small {
  display: block;
}

.ticket-kpi strong {
  font-size: 20px;
}

.ticket-kpi small {
  color: var(--muted);
  font-size: 10px;
}

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

.report-wide {
  grid-column: 1 / -1;
}

.report-download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.report-download-card {
  padding: 20px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.report-download-card h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.report-download-card p {
  margin: 0 0 7px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.report-download-card div>span {
  font-size: 12px;
  color: var(--teal-700);
}

.report-download-card>button {
  grid-column: 1 / -1;
  justify-self: start;
}

.export-preview {
  margin-top: 20px;
  display: grid;
  gap: 16px;
}

.export-preview-section {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fcfb;
}

.export-preview-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}

.export-preview-heading span {
  color: var(--teal-700);
}

.export-preview-section p,
.export-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.export-preview-table {
  max-width: 100%;
  overflow-x: auto;
  margin-top: 10px;
  border-radius: 8px;
  background: white;
}

.export-preview-table .data-table {
  min-width: 440px;
}

.export-preview-section .export-empty {
  color: #996311;
}

.export-error {
  color: #b33f42;
  font-size: 14px;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

@media (max-width: 700px) {
  .report-download-grid {
    grid-template-columns: 1fr;
  }
}

.bar-chart {
  min-height: 230px;
  padding: 20px 8px 8px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background-image: linear-gradient(#edf1f4 1px, transparent 1px);
  background-size: 100% 25%;
}

.bar-group {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
}

.bar {
  width: min(42px, 60%);
  min-height: 4px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--emerald-500), var(--teal-600));
  position: relative;
}

.bar::before {
  content: attr(data-value);
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.bar-group span {
  color: var(--muted);
  font-size: 10px;
}

.horizontal-bars {
  display: grid;
  gap: 15px;
}

.horizontal-bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 35px;
  gap: 10px;
  align-items: center;
  font-size: 10px;
}

.horizontal-bar-row>span:last-child {
  text-align: right;
  font-weight: 800;
}

.settings-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
}

.settings-menu {
  padding: 7px;
  align-self: start;
}

.settings-menu button {
  width: 100%;
  min-height: 39px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-size: 11px;
}

.settings-menu button.is-active {
  color: var(--teal-700);
  background: var(--emerald-100);
  font-weight: 800;
}

.settings-panel {
  padding: 20px;
}

.settings-panel h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.settings-panel>p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 11px;
}

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

.form-group {
  display: grid;
  gap: 8px;
}

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

.form-group label {
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.form-control {
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: #f8fafc;
  font-size: 14px;
  transition: all 0.2s ease;
  font-family: inherit;
}

textarea.form-control {
  min-height: 100px;
  padding-top: 12px;
  resize: vertical;
}

.form-control:hover {
  border-color: #94a3b8;
}

.form-control:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px rgba(16, 189, 135, .15);
  background: white;
}

.settings-form-footer {
  margin-top: 18px;
  padding-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.toggle-row {
  padding: 13px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid #edf1f4;
}

.toggle-row strong,
.toggle-row span {
  display: block;
}

.toggle-row strong {
  font-size: 12px;
}

.toggle-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.toggle {
  position: relative;
  width: 38px;
  height: 21px;
  border-radius: 999px;
  background: #ccd7e0;
  transition: .2s;
}

.toggle::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .16);
  transition: .2s;
}

.toggle.is-on {
  background: var(--emerald-500);
}

.toggle.is-on::after {
  left: 20px;
}

.info-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #b9eadf;
  border-radius: 11px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #306d64;
  background: #effbf8;
  font-size: 11px;
  line-height: 1.55;
}

/* Modal and toast */
.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
}

.modal {
  width: min(650px, 100%);
  max-height: calc(100vh - 40px);
  border-radius: 20px;
  background: white;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: auto;
  animation: modal-in .3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.modal.modal-lg {
  width: min(820px, 100%);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
}

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

.modal-header {
  position: sticky;
  z-index: 1;
  top: 0;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.modal-header p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #64748b;
  background: #f1f5f9;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

/* Asset registration modal */
.modal.asset-form-modal {
  width: min(960px, calc(100vw - 40px));
  max-height: calc(100vh - 32px);
  border: 1px solid #dce8ee;
  border-radius: 24px;
  background: #f5f9fa;
  box-shadow: 0 30px 80px rgba(8, 36, 59, .25);
}

.asset-form-modal .modal-header {
  padding: 24px 30px;
  color: white;
  border: 0;
  background:
    radial-gradient(circle at 82% 20%, rgba(81, 226, 197, .28), transparent 25%),
    linear-gradient(120deg, #0c2844, #075f69 66%, #008d7d);
}

.asset-form-modal .modal-header::after {
  content: "ASSET REGISTRATION";
  position: absolute;
  right: 82px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, .55);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .24em;
}

.asset-form-modal .modal-header h3 {
  color: white;
  font-size: 24px;
  font-weight: 850;
}

.asset-form-modal .modal-header p {
  color: rgba(226, 250, 246, .78);
  font-size: 13px;
}

.asset-form-modal .modal-close {
  flex: 0 0 auto;
  margin-left: auto;
  color: white;
  background: rgba(255, 255, 255, .14);
}

.asset-form-modal .modal-close:hover {
  color: white;
  background: rgba(255, 255, 255, .24);
}

.asset-form-modal .modal-body {
  padding: 22px;
}

.asset-register-form {
  display: grid;
  gap: 16px;
}

.asset-form-section {
  padding: 20px;
  border: 1px solid #e0e9ee;
  border-radius: 18px;
  background: white;
  box-shadow: 0 7px 22px rgba(17, 58, 77, .045);
}

.asset-form-section--primary {
  border-color: #d7ebe7;
  box-shadow: 0 9px 25px rgba(0, 140, 119, .06);
}

.asset-form-section__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
  padding-bottom: 13px;
  border-bottom: 1px solid #edf2f4;
}

.asset-form-section__head > span {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #007c70;
  border-radius: 12px;
  background: #e2f8f2;
  font-size: 12px;
  font-weight: 900;
}

.asset-form-section__head h4,
.asset-form-section__head p {
  margin: 0;
}

.asset-form-section__head h4 {
  color: #10253e;
  font-size: 16px;
  font-weight: 850;
}

.asset-form-section__head p {
  margin-top: 2px;
  color: #7a8ca0;
  font-size: 11px;
}

.asset-form-grid {
  display: grid;
  gap: 15px;
}

.asset-form-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.asset-name-field,
.asset-owner-field {
  grid-column: span 2;
}

.asset-form-modal .form-group {
  align-content: start;
  gap: 7px;
}

.asset-form-modal .form-group label {
  color: #2e465d;
  font-size: 12px;
  font-weight: 750;
}

.asset-form-modal .form-group input,
.asset-form-modal .form-group select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  color: #142a40;
  border: 1px solid #d8e3e9;
  border-radius: 11px;
  outline: none;
  background: #f9fbfc;
  font: inherit;
  font-size: 13px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.asset-form-modal .form-group input:focus,
.asset-form-modal .form-group select:focus {
  border-color: #09a68f;
  background: white;
  box-shadow: 0 0 0 3px rgba(9, 166, 143, .12);
}

.asset-form-modal .form-group input::placeholder {
  color: #9aa9b7;
}

.asset-code-field input,
.asset-form-modal #ast-serial {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  letter-spacing: .02em;
}

.asset-code-field small {
  color: #73879a;
  font-size: 10px;
  line-height: 1.35;
}

.asset-form-actions {
  position: sticky;
  z-index: 2;
  bottom: -22px;
  margin: 0 -22px -22px;
  padding: 15px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #dce7ec;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

.asset-form-actions p,
.asset-form-actions strong,
.asset-form-actions span {
  display: block;
  margin: 0;
}

.asset-form-actions strong {
  color: #263f56;
  font-size: 12px;
}

.asset-form-actions span {
  margin-top: 2px;
  color: #8495a6;
  font-size: 10px;
}

.asset-form-actions > div {
  display: flex;
  gap: 10px;
}

.asset-form-actions button {
  min-height: 44px;
  padding: 0 22px;
  border-radius: 11px;
}

.asset-form-actions .primary-button {
  min-width: 170px;
  border: 0;
  background: linear-gradient(115deg, #008f84, #08bc8c);
  box-shadow: 0 9px 22px rgba(0, 159, 126, .22);
}

@media (max-width: 760px) {
  .modal.asset-form-modal {
    width: 100%;
    max-height: 95vh;
    border-radius: 22px 22px 0 0;
  }

  .asset-form-modal .modal-header {
    padding: 20px 18px;
  }

  .asset-form-modal .modal-header::after {
    display: none;
  }

  .asset-form-modal .modal-header h3 {
    font-size: 20px;
  }

  .asset-form-modal .modal-body {
    padding: 13px;
  }

  .asset-form-section {
    padding: 15px;
    border-radius: 15px;
  }

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

  .asset-name-field,
  .asset-owner-field {
    grid-column: auto;
  }

  .asset-form-actions {
    bottom: -13px;
    margin: 0 -13px -13px;
    padding: 12px 13px calc(12px + env(safe-area-inset-bottom));
  }

  .asset-form-actions p {
    display: none;
  }

  .asset-form-actions > div,
  .asset-form-actions button {
    flex: 1;
  }

  .asset-form-actions button {
    min-width: 0;
    padding: 0 12px;
  }
}

.profile-detail-head {
  padding: 21px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, var(--navy-850), #126c70);
}

.profile-detail-head .avatar {
  width: 64px;
  height: 64px;
  border: 3px solid rgba(255, 255, 255, .22);
  color: white;
  background: rgba(255, 255, 255, .15);
  font-size: 20px;
}

.profile-detail-head h2 {
  margin: 0;
  font-size: 20px;
}

.profile-detail-head p {
  margin: 4px 0 0;
  color: #b6d4d7;
  font-size: 11px;
}

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

.detail-item {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafcfd;
}

.detail-item span,
.detail-item strong {
  display: block;
}

.detail-item span {
  color: var(--muted);
  font-size: 7.5px;
}

.detail-item strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 11px;
}

.detail-section-title {
  margin: 19px 0 9px;
  font-size: 13px;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid #bce8dc;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #225e55;
  background: white;
  box-shadow: var(--shadow-md);
  font-size: 12px;
  animation: toast-in .24s ease-out;
}

.toast.is-error {
  border-color: #f5c5c5;
  color: #a74343;
}

.toast span {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--teal-600);
  background: var(--emerald-100);
}

.toast.is-error span {
  color: var(--red-600);
  background: var(--red-100);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
}

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

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

  .dashboard-bottom-grid> :last-child {
    grid-column: 1 / -1;
  }

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

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

  .global-search {
    width: 220px;
  }
}

@media (max-width: 960px) {
  /* Mobile/Tablet Login Screen */
  .login-screen { display: flex; align-items: center; justify-content: center; background: #ffffff; padding: 20px; min-height: 100vh; }
  .login-brand-panel { display: none; }
  .login-form-panel { display: block; width: 100%; max-width: 480px; min-height: auto; padding: 45px 35px; border-radius: 24px; background: white; box-shadow: 0 20px 60px rgba(0,0,0,0.08); animation: slide-in-bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
  @keyframes slide-in-bottom { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
  .login-desktop-header { display: none; }
  .login-mobile-header { display: block; text-align: center; margin-bottom: 32px; }
  .login-mobile-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; justify-content: center; }
  .login-mobile-brand .brand-mark { margin: 0; width: 44px; height: 44px; border-radius: 12px; background: #05a978; color: white; font-size: 22px; font-weight: 900; box-shadow: 0 4px 14px rgba(5, 169, 120, 0.3); display: grid; place-items: center; }
  .login-mobile-brand strong { font-size: 20px; color: #0f172a; }
  .login-card { width: 100%; }
  .login-mobile-header .section-kicker { display: inline-block; position: relative; color: #05a978; font-size: 13px; font-weight: 800; letter-spacing: 1.5px; margin-bottom: 12px; }
  .login-mobile-header .kicker-line { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 28px; height: 2px; background: #05a978; border-radius: 2px; }
  .login-mobile-header h2 { font-size: 38px; font-weight: 800; color: #0f2746; margin: 0 0 8px; letter-spacing: -1px; }
  .login-mobile-header p { font-size: 16px; color: #64748b; margin: 0; line-height: 1.5; }
  .field-label { font-size: 15px; font-weight: 750; color: #0f172a; margin-bottom: 10px; margin-top: 20px; }
  .input-with-icon > span { color: #94a3b8; left: 16px; }
  .input-with-icon > span svg { stroke-width: 1.7; width: 20px; height: 20px; }
  .input-with-icon input { height: 56px; padding: 0 52px; border: 1px solid #e2e8f0; border-radius: 14px; background: #f8fafc; font-size: 15px; color: #334155; }
  .input-with-icon input:focus { border-color: #05a978; background: white; box-shadow: 0 0 0 4px rgba(5, 169, 120, 0.1); }
  .input-icon-button { right: 12px; color: #94a3b8; }
  .input-icon-button svg { stroke-width: 1.7; width: 20px; height: 20px; }
  .login-options { margin: 24px 0 32px; font-size: 14px; }
  .login-options label { color: #64748b; font-weight: 500; }
  .login-options input { accent-color: #05a978; width: 16px; height: 16px; border-radius: 4px; margin-right: 8px; border: 1px solid #cbd5e1; }
  .text-button { color: #059669; font-weight: 700; font-size: 14px; }
  .primary-button.login-button { background: #05a978; border-radius: 14px; min-height: 56px; font-size: 17px; font-weight: 700; box-shadow: 0 8px 20px rgba(5, 169, 120, 0.2); justify-content: center; }
  .primary-button.login-button:hover { background: #048c63; }
  .login-company-note-wrapper { margin-top: 32px; display: flex; align-items: center; gap: 16px; }
  .login-company-note-wrapper span { flex: 1; height: 1px; background: #e2e8f0; }
  .login-company-note { margin: 0 !important; color: #94a3b8 !important; font-size: 13px !important; white-space: nowrap; }

  .app-shell {
    display: block;
  }

  .sidebar {
    transform: translateX(-102%);
    transition: transform .25s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    z-index: 35;
    inset: 0;
    background: rgba(6, 19, 35, .46);
  }

  .sidebar-overlay.is-open {
    display: block;
  }

  .sidebar-close,
  .menu-button {
    display: grid;
  }

  .workspace {
    width: 100%;
  }

  .topbar {
    padding: 0 20px;
  }

  .global-search {
    display: none;
  }

  .dashboard-grid,
  .calendar-layout {
    grid-template-columns: 1fr;
  }

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

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

  .report-wide {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .login-form-panel { padding: 35px 25px; }
  .login-mobile-header h2 { font-size: 32px; }

  .topbar {
    min-height: 67px;
    padding: 0 13px;
  }

  .topbar-left p,
  .profile-button>div:nth-child(2),
  .profile-button i {
    display: none;
  }

  .stats-grid,
  .ticket-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .stat-card {
    min-height: 115px;
    padding: 14px;
  }

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

  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-bottom-grid> :last-child {
    grid-column: auto;
  }

  .toolbar {
    flex-wrap: wrap;
  }

  .search-box {
    flex-basis: 100%;
  }

  .filter-select {
    flex: 1;
  }

  .table-card {
    overflow-x: auto;
  }

  .data-table {
    min-width: 750px;
  }

  .table-footer {
    min-width: 750px;
  }

  .alert-grid,
  .folder-grid {
    grid-template-columns: 1fr;
  }

  .calendar-day {
    min-height: 76px;
    padding: 4px;
  }

  .calendar-event {
    padding: 3px;
    font-size: 0;
    min-height: 6px;
    border-radius: 999px;
    border-left: 0;
  }

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

  .calendar-weekdays span {
    padding: 8px 2px;
  }

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

  .settings-menu {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .settings-menu::-webkit-scrollbar {
    display: none;
  }

  .settings-menu button {
    width: auto;
    white-space: nowrap;
  }

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

  .form-group.full {
    grid-column: auto;
  }

  .modal-backdrop {
    padding: 0;
    align-items: end;
  }

  .modal {
    width: 100% !important;
    max-height: 94vh;
    border-radius: 20px 20px 0 0;
  }

  .notification-popover {
    top: 62px;
    right: 12px;
  }

  .toast-region {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .toast {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}

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

  .profile-button {
    display: none;
  }

  .ticket-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .asset-summary {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Employee Profile Modal & Management Styles */
.emp-profile-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.emp-hero-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #07988a 0%, #0f3654 100%);
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(7, 152, 138, 0.25);
}

.asset-hero-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e293b 0%, #0f766e 100%);
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(15, 118, 110, 0.25);
  margin-bottom: 16px;
}

.asset-hero-card::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.asset-icon-big {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  font-size: 28px;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.emp-hero-card::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.emp-avatar-big {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.emp-hero-info {
  flex: 1;
  min-width: 0;
}

.emp-hero-info .emp-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.emp-hero-info h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.emp-nickname-pill {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.emp-hero-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}

.emp-id-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 11px;
}

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

.emp-tile {
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 12px 14px;
  transition: all 0.2s ease;
}

.emp-tile:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.emp-tile-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
}

.emp-tile-value {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  word-break: break-word;
}

.emp-tile-link {
  color: var(--teal-700);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}

.emp-tile-link:hover {
  color: var(--teal-800);
  text-decoration: underline;
}

.emp-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  margin-bottom: 8px;
}

.emp-section-heading h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.emp-assets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.emp-assets-table th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.emp-assets-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

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

.emp-assets-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
}

.emp-assets-empty span {
  font-size: 24px;
  margin-bottom: 6px;
}

/* Executive Dashboard 2.0 */
.dashboard-head-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.system-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(16, 189, 135, 0.08);
  border: 1px solid rgba(16, 189, 135, 0.25);
  color: var(--emerald-600);
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 6px;
}

.system-status-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(16, 189, 135, 0.2);
  animation: dot-pulse 2s infinite;
}

.stats-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stats-grid-5 .stat-card {
  padding: 14px 16px;
  min-height: 114px;
}

.stats-grid-5 .stat-card strong.stat-value {
  margin-top: 10px;
  font-size: 22px;
}

.stats-grid-5 .stat-card p {
  margin: 5px 0 0;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1280px) {
  .stats-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-grid-5 {
    grid-template-columns: 1fr;
  }
}

.quick-ribbon {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

@media (max-width: 900px) {
  .quick-ribbon {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 580px) {
  .quick-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }
}

.quick-ribbon-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
  text-align: left;
}

.quick-ribbon-btn:hover {
  transform: translateY(-2px);
  border-color: #8bdac7;
  box-shadow: 0 6px 18px rgba(7, 152, 138, 0.12);
  background: #fbfdfd;
}

.quick-ribbon-btn .ribbon-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.dashboard-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

@media (max-width: 960px) {
  .dashboard-two-col {
    grid-template-columns: 1fr;
  }
}

.dashboard-three-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 1180px) {
  .dashboard-three-col {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-three-col> :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .dashboard-three-col {
    grid-template-columns: 1fr;
  }

  .dashboard-three-col> :last-child {
    grid-column: auto;
  }
}

.item-list-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
  color: inherit;
}

.preview-row:hover {
  background: white;
  border-color: #cbd5e1;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.preview-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.preview-avatar-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.preview-texts {
  min-width: 0;
}

.preview-texts strong {
  display: block;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1e293b;
}

.preview-texts small {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: 0 0 auto;
  margin-left: 10px;
}

.alert-progress-wrapper {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-progress-bar {
  flex: 1;
  height: 5px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.alert-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal-600), var(--emerald-500));
}

.alert-progress-text {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--teal-700);
}

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

.category-tag-card {
  padding: 8px 10px;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.category-tag-card strong {
  font-size: 12.5px;
  color: var(--teal-700);
}

/* Supplies Catalog & Requisition Styles */
  .catalog-header-actions { display:flex; align-items:center; gap:9px; }
  .catalog-header-actions .supply-admin-add { min-height:36px; padding:0 13px; color:#087e72; border-color:#afe2d6; background:#edfbf7; font-size:11px; }

  .modal.supply-form-modal { width:min(850px,calc(100vw - 40px)); max-height:calc(100vh - 32px); border:1px solid #dce8ee; border-radius:24px; background:#f5f9fa; }
  .supply-form-modal .modal-header { padding:24px 30px; color:#fff; border:0; background:radial-gradient(circle at 82% 20%,rgba(81,226,197,.28),transparent 25%),linear-gradient(120deg,#0c2844,#075f69 66%,#008d7d); }
  .supply-form-modal .modal-header::after { content:"INVENTORY MANAGEMENT"; position:absolute; right:82px; top:50%; transform:translateY(-50%); color:rgba(255,255,255,.55); font-size:10px; font-weight:800; letter-spacing:.2em; }
  .supply-form-modal .modal-header h3 { color:#fff; font-size:23px; }
  .supply-form-modal .modal-header p { color:rgba(226,250,246,.78); }
  .supply-form-modal .modal-close { margin-left:auto; color:#fff; background:rgba(255,255,255,.14); }
  .supply-form-modal .modal-body { padding:20px; }
  .supply-register-form { display:grid; gap:15px; }
  .supply-form-section { padding:19px; border:1px solid #dce9eb; border-radius:17px; background:#fff; box-shadow:0 7px 22px rgba(17,58,77,.045); }
  .supply-form-section__head { display:flex; align-items:center; gap:12px; margin-bottom:17px; padding-bottom:13px; border-bottom:1px solid #edf2f4; }
  .supply-form-section__head>span { width:38px; height:38px; display:grid; place-items:center; flex:0 0 auto; border-radius:12px; color:#007c70; background:#e2f8f2; font-size:12px; font-weight:900; }
  .supply-form-section__head h4 { margin:0; color:#10253e; font-size:16px; }
  .supply-form-section__head p { margin:2px 0 0; color:#7a8ca0; font-size:11px; }
  .supply-form-grid { display:grid; gap:15px; }
  .supply-form-grid--three { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .supply-form-grid--two { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .supply-name-input { grid-column:span 2; }
  .supply-form-modal .form-group label { color:#2e465d; font-size:12px; font-weight:750; }
  .supply-form-modal .form-group input,.supply-form-modal .form-group select,.supply-form-modal .form-group textarea { width:100%; min-height:46px; padding:0 13px; outline:none; border:1px solid #d8e3e9; border-radius:11px; color:#142a40; background:#f9fbfc; font:inherit; font-size:13px; }
  .supply-form-modal .form-group textarea { min-height:82px; padding:12px 13px; resize:vertical; }
  .supply-form-modal .form-group input:focus,.supply-form-modal .form-group select:focus,.supply-form-modal .form-group textarea:focus { border-color:#09a68f; background:#fff; box-shadow:0 0 0 3px rgba(9,166,143,.12); }
  .supply-form-modal .modal-footer { justify-content:space-between; }
  .supply-form-modal .modal-footer>div:last-child { display:flex; gap:9px; }
  .supply-form-footer-note strong,.supply-form-footer-note span { display:block; }
  .supply-form-footer-note strong { color:#263f56; font-size:11px; }
  .supply-form-footer-note span { margin-top:2px; color:#8495a6; font-size:9.5px; }
  .supply-delete-button { width:30px; height:30px; padding:0; display:grid; place-items:center; flex:0 0 auto; border:1px solid #f1d7d7; border-radius:9px; color:#c55353; background:#fff7f7; opacity:.72; transition:.18s; }
  .supply-delete-button:hover { opacity:1; color:#b83e3e; border-color:#eabbbb; background:#fff0f0; transform:translateY(-1px); }
  .supply-edit-button { margin-left:auto; color:#087e72; border-color:#b9e6dc; background:#effbf8; font-size:16px; font-weight:800; }
  .supply-edit-button:hover { color:#066d63; border-color:#8bd8c9; background:#def7ef; }
  .supply-upload-row { display:grid; grid-template-columns:96px minmax(0,1fr); align-items:center; gap:15px; }
  .supply-upload-preview { width:96px; height:96px; display:grid; place-items:center; overflow:hidden; border:1px dashed #a9dcd2; border-radius:15px; color:#087e72; background:#effbf8; font-size:30px; }
  .supply-upload-preview__image { width:100%; height:100%; object-fit:cover; }
  .supply-form-modal .form-group input[type="file"] { min-height:42px; padding:8px; font-size:11px; }
  .supply-form-modal .form-group small { display:block; margin-top:6px; color:#7a8ca0; font-size:10px; line-height:1.4; }
  .repair-image-field > label span { color:#7a8ca0; font-weight:500; }
  .repair-image-upload { display:grid; grid-template-columns:82px minmax(0,1fr); align-items:center; gap:13px; margin-top:7px; }
  .repair-image-preview { width:82px; height:82px; display:grid; place-items:center; overflow:hidden; border:1px dashed #9edbd0; border-radius:14px; background:#effbf8; color:#087e72; font-size:28px; }
  .repair-image-preview img { width:100%; height:100%; object-fit:cover; }
  .repair-image-upload input[type="file"] { width:100%; padding:8px; border:1px solid #d8e3e9; border-radius:10px; background:#f9fbfc; font:inherit; font-size:11px; box-sizing:border-box; }
  .repair-image-upload small { display:block; margin-top:6px; color:#74879a; font-size:10px; line-height:1.45; }
  .repair-detail-image { padding:12px; border:1px solid #dce9e7; border-radius:12px; background:#f6fcfb; color:#1c4f4a; font-size:12px; }
  .repair-detail-image strong { display:block; margin-bottom:9px; }
  .repair-detail-image img { display:block; width:100%; max-height:300px; object-fit:contain; border-radius:9px; background:#fff; }
  .supply-delete-confirm { padding:8px 4px 4px; text-align:center; }
  .supply-delete-confirm>span { width:54px; height:54px; margin:0 auto 12px; display:grid; place-items:center; border-radius:16px; background:#fff0f0; font-size:24px; }
  .supply-delete-confirm h4 { margin:0; color:#172b42; font-size:17px; }
  .supply-delete-confirm p { max-width:440px; margin:8px auto; color:#63758a; font-size:12px; line-height:1.6; }
  .supply-delete-confirm p strong { color:#293f56; }
  .supply-delete-confirm small { color:#8b99a8; font-size:10px; }

  @media(max-width:760px) {
    .catalog-header-actions { width:100%; justify-content:space-between; }
    .modal.supply-form-modal { width:100%; max-height:95dvh; border-radius:22px 22px 0 0; }
    .supply-form-modal .modal-header { padding:20px 18px; }
    .supply-form-modal .modal-header::after { display:none; }
    .supply-form-modal .modal-body { padding:13px; }
    .supply-form-section { padding:15px; }
    .supply-form-grid--three,.supply-form-grid--two { grid-template-columns:1fr; }
    .supply-name-input { grid-column:auto; }
    .supply-upload-row { grid-template-columns:72px minmax(0,1fr); gap:12px; }
    .supply-upload-preview { width:72px; height:72px; border-radius:13px; }
    .repair-image-upload { grid-template-columns:68px minmax(0,1fr); gap:11px; }
    .repair-image-preview { width:68px; height:68px; border-radius:12px; }
    .supply-form-footer-note { display:none; }
    .supply-form-modal .modal-footer>div:last-child { width:100%; display:grid; grid-template-columns:.8fr 1.2fr; }
  }
  .catalog-section {
    margin-bottom: 20px;
  }

  .catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
  }

  .catalog-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .supplies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
  }

  .supply-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  .supply-card:hover {
    transform: translateY(-2px);
    border-color: var(--teal-600);
    box-shadow: 0 8px 20px -4px rgba(7, 152, 138, 0.15);
  }

  .supply-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
  }

  .supply-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f0fdfa;
    border: 1px solid #ccfbf1;
    color: var(--teal-700);
    display: grid;
    place-items: center;
    font-size: 20px;
    flex-shrink: 0;
  }

  .supply-meta {
    flex: 1;
    min-width: 0;
  }

  .supply-name {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
    line-height: 1.35;
    word-break: break-word;
  }

  .supply-category {
    font-size: 11px;
    color: #64748b;
    display: block;
  }

  .supply-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px dashed #f1f5f9;
  }

  .supply-stock {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .supply-stock strong {
    color: var(--teal-700);
    font-weight: 800;
  }

  .quick-req-btn {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    color: var(--teal-700);
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
  }

  .quick-req-btn:hover {
    background: var(--teal-600);
    color: #ffffff;
    border-color: var(--teal-600);
  }

  .urgency-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
  }

  .urgency-badge.normal {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
  }

  .urgency-badge.urgent {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
  }

  .urgency-badge.critical {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    animation: pulse-border 2s infinite;
  }

  @keyframes pulse-border {
    0% {
      box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
      box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
    }

    100% {
      box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
  }

  .voucher-hero-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(30, 58, 138, 0.25);
    margin-bottom: 16px;
  }

  .voucher-hero-card::after {
    content: "";
    position: absolute;
    top: -30px;
    right: -30px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
  }

  .voucher-icon-big {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    font-size: 28px;
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  }

  /* Print styles */
  @media print {

    .sidebar,
    .topbar,
    .sidebar-overlay,
    .modal-backdrop,
    .toast-region,
    .page-actions,
    .toolbar,
    .table-actions,
    .pagination {
      display: none !important;
    }

    .app-shell {
      display: block;
    }

    .workspace {
      grid-column: 1;
    }

    .page-content {
      padding: 0;
      animation: none;
    }

    .card {
      box-shadow: none;
      border: 1px solid #ddd;
      break-inside: avoid;
    }

    .stat-card {
      box-shadow: none;
    }

    body {
      background: white;
    }

    * {
      animation: none !important;
      transition: none !important;
    }
  }

  /* ==========================================================================
   Stationery Requisition Paper Styles (ใบเบิกเครื่องเขียน Earth Lab)
   ========================================================================== */
  .modal.modal-paper {
    width: min(920px, 98vw) !important;
    max-height: 94vh;
  }

  .paper-sheet {
    background-color: #dcdcdc;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    color: #333;
    font-family: 'Sarabun', 'Noto Sans Thai', sans-serif;
    margin: 0 auto;
  }

  .paper-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
  }

  .paper-logo {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: 2px;
    color: #111;
  }

  .paper-title-box {
    background-color: #a8a8a8;
    padding: 8px 36px;
    text-align: center;
    border-radius: 4px;
  }

  .paper-title-th {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: #111;
  }

  .paper-title-en {
    font-size: 13.5px;
    margin: 0;
    color: #222;
  }

  .paper-section-box {
    border: 2px solid #333;
    border-radius: 8px;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.2);
  }

  .paper-flex-row {
    display: flex;
    align-items: flex-end;
    padding: 10px 14px;
  }

  .paper-label {
    font-weight: 700;
    white-space: nowrap;
    color: #222;
    font-size: 14px;
  }

  .paper-dotted-line {
    border-bottom: 1px dashed #333;
    margin: 0 8px;
    min-height: 22px;
    padding: 0 6px;
    font-weight: 600;
    color: #000080;
    /* Pen blue */
    display: flex;
    align-items: flex-end;
    font-size: 14px;
  }

  .paper-main-form {
    padding: 0;
    overflow: hidden;
  }

  .paper-info-rows {
    padding: 12px 14px;
  }

  .paper-info-rows .paper-flex-row {
    padding: 0;
    margin-bottom: 10px;
  }

  .paper-info-rows .paper-flex-row:last-child {
    margin-bottom: 2px;
  }

  .paper-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 2px solid #333;
    font-size: 13.5px;
  }

  .paper-table th,
  .paper-table td {
    border: 1px solid #333;
    padding: 7px 8px;
    text-align: center;
  }

  .paper-table th {
    font-weight: 700;
    border-top: none;
    background: rgba(0, 0, 0, 0.04);
  }

  .paper-table th:first-child,
  .paper-table td:first-child {
    border-left: none;
    width: 12%;
  }

  .paper-table th:last-child,
  .paper-table td:last-child {
    border-right: none;
    width: 22%;
  }

  .paper-table tr:last-child td {
    border-bottom: none;
  }

  .paper-empty-row td {
    height: 32px;
  }

  .paper-signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    margin-bottom: 24px;
    padding: 0 5px;
    gap: 14px;
  }

  .paper-sig-block {
    display: flex;
    align-items: flex-end;
    flex: 1;
  }

  .paper-signature-area {
    position: relative;
    flex-grow: 1;
    margin-left: 8px;
    border-bottom: 1px dashed #333;
    height: 60px;
  }

  .paper-sig-controls {
    position: absolute;
    top: -24px;
    right: 0;
    display: flex;
    gap: 8px;
    font-size: 11px;
    align-items: center;
  }

  .paper-sig-controls label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 2px;
    font-weight: 500;
  }

  .paper-canvas {
    display: block;
    width: 100%;
    height: 60px;
    cursor: crosshair;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
  }

  .paper-text-input {
    width: 100%;
    height: 60px;
    border: none;
    background: transparent;
    text-align: center;
    font-family: 'Sarabun', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #000080;
    outline: none;
    padding: 0;
  }

  .paper-footer {
    background-color: #3b3b3b;
    color: #dcdcdc;
    padding: 12px 18px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 4px;
  }

  .paper-footer p {
    margin: 3px 0;
    display: flex;
    align-items: center;
  }

/* Settings - Role Accordion */
.role-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
  margin-bottom: 24px;
}
.role-accordion {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  transition: var(--transition-fast);
}
.role-accordion:hover {
  border-color: #cbd5e1;
}
.role-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background var(--transition-fast);
}
.role-accordion-header:hover {
  background: var(--background);
}
.role-accordion-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.role-accordion-info strong {
  font-size: 14.5px;
  color: var(--navy-900);
}
.role-accordion-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.role-accordion-meta svg {
  color: var(--muted-light);
}
.role-accordion-arrow {
  flex-shrink: 0;
  color: var(--muted-light);
  transition: transform var(--transition-fast);
  display: flex;
}
.role-accordion[aria-expanded="true"] .role-accordion-arrow {
  transform: rotate(90deg);
}
.role-accordion-body {
  padding: 0 16px 16px;
}
.role-accordion-desc {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.role-menu-list {
  display: flex;
  flex-direction: column;
}
.role-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}
.role-menu-row:last-child {
  border-bottom: 0;
}
.role-menu-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink);
}
.role-menu-label svg {
  color: var(--muted-light);
  flex-shrink: 0;
}
.role-accordion-actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--background);
  display: flex;
  justify-content: flex-end;
}

