/* modern aurora theme + error overlay */
:root{
  --bg:#f6f7ff;
  --page-bg:radial-gradient(circle at 20% 20%,rgba(124,175,255,.25),transparent 45%),radial-gradient(circle at 80% 0%,rgba(255,184,212,.28),transparent 55%),linear-gradient(135deg,#fefefe,#f6f7ff);
  --elev:#0e1022;
  --card:#ffffff;
  --muted:#6a6f8f;
  --text:#14162b;
  --pri:#5f6bff;
  --pri-dark:#3840b4;
  --accent:#25cdda;
  --border:rgba(17,23,64,.12);
  --ring:0 0 0 3px rgba(95,107,255,.25);
  --shadow:0 25px 60px rgba(20,24,70,.08),0 10px 25px rgba(14,16,40,.08);
  --nav-grad:linear-gradient(135deg,#1b1e3d,#14172c);
  --nav-active:linear-gradient(120deg,#7a5bff,#5cf4ff);
  --nav-chip-shadow:0 15px 25px rgba(8,10,22,.6);
  --acc-font-scale:1;
  --acc-line-height:1;
}
html{font-size:calc(16px * var(--acc-font-scale,1));line-height:calc(1.5 * var(--acc-line-height,1))}
body.theme-dark{
  --bg:#0c0e19;
  --page-bg:radial-gradient(circle at 20% 20%,rgba(90,120,200,.2),transparent 45%),radial-gradient(circle at 80% 0%,rgba(255,120,180,.18),transparent 55%),linear-gradient(135deg,#0f1227,#0b0e1b);
  --elev:#050714;
  --card:#0f1224;
  --muted:#a3abc7;
  --text:#e8ecff;
  --pri:#7f9dff;
  --pri-dark:#4a5bc2;
  --accent:#3dd2ff;
  --border:rgba(255,255,255,.08);
  --ring:0 0 0 3px rgba(127,157,255,.25);
  --shadow:0 25px 60px rgba(0,0,0,.4),0 10px 25px rgba(0,0,0,.35);
  --nav-grad:linear-gradient(135deg,#0d1023,#0a0c1a);
  --nav-active:linear-gradient(120deg,#6e7aff,#3fd8ff);
  --nav-chip-shadow:0 12px 22px rgba(0,0,0,.6);
  color:var(--text);
}
body.theme-dark .card,
body.theme-dark .table,
body.theme-dark .status-card,
body.theme-dark .dashboard-hero,
body.theme-dark .dash-welcome,
body.theme-dark .orders-head,
body.theme-dark .orders-table,
body.theme-dark .clients-card,
body.theme-dark .fees-card,
body.theme-dark .teams-card{
  background:rgba(10,14,30,.9);
  color:var(--text);
}
body.theme-dark .dash-welcome::before{opacity:.25}
body.theme-dark .topbar,
body.theme-dark .main{color:var(--text)}
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark .muted,
body.theme-dark label,
body.theme-dark .topbar-left h1,
body.theme-dark .kpi-label,
body.theme-dark .status-card h2,
body.theme-dark .status-card .muted{color:var(--text)}
body.theme-dark .muted{opacity:.85}
*{box-sizing:border-box}
html,body,#app{height:100%}
body{
  margin:0;
  background:var(--page-bg);
  color:var(--text);
  font:14px/1.45 "Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  min-height:100%;
  /* scroll-behavior: smooth; */
}
.glass{backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.hidden{display:none!important} .muted{color:var(--muted)} .w-full{width:100%}
.row{display:flex;gap:.5rem;align-items:center} .gap{gap:.75rem} .spacer{flex:1}
.scroll-y{overflow-y:auto;max-height:65vh} .scroll-x{overflow-x:auto}

.btn{
  background:linear-gradient(135deg,#ffffff,#f0f2ff);
  border:1px solid rgba(87,93,133,.15);
  color:#14162b;
  padding:.6rem 1rem;
  border-radius:.9rem;
  cursor:pointer;
  transition:transform .2s ease,box-shadow .2s ease,background .2s ease;
  box-shadow:0 10px 22px rgba(19,23,55,.12),inset 0 0 0 1px rgba(255,255,255,.4);
}
.btn:hover{transform:translateY(-1px);box-shadow:0 18px 30px rgba(15,18,52,.18),inset 0 0 0 1px rgba(255,255,255,.7)}
.btn.primary{background:linear-gradient(130deg,var(--pri),var(--accent));border-color:transparent;color:#fff;box-shadow:0 20px 35px rgba(95,107,255,.35)}
.btn.warn{background:linear-gradient(130deg,#f45c43,#eb3349);border:0;color:#fff;box-shadow:0 15px 32px rgba(244,92,67,.35)}
.btn.text{background:transparent;border-color:transparent;color:var(--muted);box-shadow:none}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:1.25rem;
  box-shadow:var(--shadow);
  padding:1.2rem;
  backdrop-filter:blur(12px);
}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.75rem;flex-wrap:wrap}
.order-actions{
  background:linear-gradient(135deg,rgba(255,255,255,.78),rgba(238,242,255,.95));
  padding:.45rem .65rem;
  border-radius:14px;
  box-shadow:0 12px 26px rgba(15,17,48,.15),inset 0 0 0 1px rgba(255,255,255,.4);
}
.order-actions .pill-select{
  appearance:none;
  border:1px solid rgba(94,102,160,.22);
  background:linear-gradient(135deg,#eef1ff,#e6ebff);
  border-radius:12px;
  padding:.55rem 2.6rem .55rem .9rem;
  font-weight:700;
  color:#0f132d;
  box-shadow:0 12px 24px rgba(17,21,54,.18),inset 0 0 0 1px rgba(255,255,255,.6);
  min-width:240px;
  cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23414a72' d='M5 6 0 0h10z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right .75rem center;
}
.order-actions .pill-select:focus{outline:none;box-shadow:0 0 0 3px rgba(95,107,255,.35)}
.order-actions .action-btn{
  min-height:44px;
  padding:0 1.15rem;
  font-weight:700;
  letter-spacing:.01em;
  box-shadow:0 14px 30px rgba(18,22,60,.22),inset 0 0 0 1px rgba(255,255,255,.45);
}
.order-actions .action-btn.warn{box-shadow:0 14px 30px rgba(235,51,73,.28),inset 0 0 0 1px rgba(255,255,255,.3)}
.kpi-value{font-size:2rem;font-weight:700;letter-spacing:.5px}

.brand-link{text-decoration:none;color:inherit}
.brand{display:flex;flex-direction:column;align-items:center;gap:.4rem;font-weight:700;text-align:center}
.brand-logo{width:260px;height:auto;filter:drop-shadow(0 6px 14px rgba(0,0,0,.25))}
.brand-text{display:flex;flex-direction:column;line-height:1.1;align-items:center}
.brand-title{text-transform:uppercase;letter-spacing:.15em;font-size:1.1rem;color:var(--text)}
.brand-tagline{font-size:.68rem;letter-spacing:.25em;text-transform:uppercase;color:var(--muted);font-weight:500}
.sidebar-top .brand-side{margin:0;width:100%}
.brand-side{background:linear-gradient(135deg,#d8ecff,#c1deff);margin:.85rem;border-radius:1rem;padding:.9rem 1rem;box-shadow:0 15px 35px rgba(7,11,32,.35);align-items:center}
.brand-side .brand-title{color:#0b1a3d}
.brand-side .brand-tagline{color:#39517d}
.brand-side .brand-logo{width:220px;filter:none;object-fit:contain;max-width:100%}
.auth-wrap{display:grid;place-items:center;height:100%} .card-auth{width:min(420px,92vw)}
.card-auth .brand{margin-bottom:.75rem}
.card-auth .brand-logo{max-width:100%;width:240px;height:auto;display:block;margin:0 auto}
.card-auth .brand-text{display:flex;flex-direction:column;align-items:center}
.password-wrap{position:relative;display:flex;align-items:center;width:100%}
.password-wrap input{padding-right:2.75rem;width:100%;flex:1}
.eye-toggle{
  position:absolute;
  right:.35rem;top:50%;transform:translateY(-50%);
  border:none;
  background:#e8ecf9;
  border-radius:.5rem;
  cursor:pointer;
  padding:.25rem .35rem;
  font-size:1rem;
  color:#53607d;
  line-height:1;
  display:flex;gap:.15rem;align-items:center;
  box-shadow:inset 0 0 0 1px rgba(17,23,64,.08);
}
.eye-toggle .eye-closed{display:none}
.eye-toggle.is-visible .eye-open{display:none}
.eye-toggle.is-visible .eye-closed{display:inline}
/* Minimal animate.css subset for login transition */
.animate__animated{animation-duration:.45s;animation-fill-mode:both}
@keyframes animate__zoomOutDown{
  40%{opacity:1;transform:scale(1) translateY(0)}
  100%{opacity:0;transform:scale(.1) translateY(120%);transform-origin:center bottom}
}
.animate__zoomOutDown{animation-name:animate__zoomOutDown}
@media (max-width:540px){
  .card-auth{width:min(380px,95vw)}
  .card-auth .brand{margin-bottom:1rem}
  .card-auth .brand-logo{width:200px}
  .eye-toggle{padding:.2rem .3rem;font-size:.95rem}
}
.field{display:flex;flex-direction:column;gap:.3rem;margin:.65rem 0}
.field input,.field textarea,.field select{background:#f2f4ff;border:1px solid var(--border);border-radius:.6rem;color:var(--text);padding:.6rem .7rem}
.field input:focus,.field textarea:focus,.field select:focus{outline:none;box-shadow:var(--ring)}
.field.full{grid-column:1/-1}
.section{grid-column:1/-1;margin:1rem 0 .25rem 0;color:#cfd6ee}
body.theme-dark .field input,
body.theme-dark .field textarea,
body.theme-dark .field select{
  background:#10162b;
  border:1px solid rgba(255,255,255,.12);
  color:var(--text);
}
body.theme-dark .field input::placeholder,
body.theme-dark .field textarea::placeholder{color:#9aa5c7}
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea{color:var(--text)}
body.theme-dark input::placeholder,
body.theme-dark select::placeholder,
body.theme-dark textarea::placeholder{color:#9aa5c7}

.shell{display:grid;grid-template-columns:260px 1fr;min-height:100vh;height:100%}
.sidebar{display:flex;flex-direction:column;border-right:1px solid var(--border);background:var(--elev);backdrop-filter:blur(22px);box-shadow:0 0 40px rgba(0,0,0,.35);position:sticky;top:0;z-index:3;min-height:100vh;max-height:100vh;overflow-y:auto}
.sidebar-top{position:relative;display:block;padding:.85rem .9rem .35rem}
.sidebar-toggle{
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(135deg,#24284c,#171a32);
  box-shadow:0 10px 24px rgba(0,0,0,.35),inset 0 0 0 1px rgba(255,255,255,.05);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:10px;
  cursor:pointer;
  transition:transform .2s ease,box-shadow .2s ease,background .2s ease,border-color .2s ease,filter .2s ease;
}
.sidebar-toggle span{
  display:block;
  width:100%;
  height:3px;
  background:#f5f7ff;
  border-radius:999px;
}
.sidebar-toggle span:nth-child(2){opacity:.8}
.sidebar-toggle span:nth-child(3){opacity:.65}
.sidebar-toggle:hover{transform:translateY(-1px);box-shadow:0 14px 28px rgba(0,0,0,.45);background:linear-gradient(135deg,#2c3158,#1a1d38)}
.sidebar-toggle[aria-pressed="true"]{
  background:linear-gradient(135deg,#8a6bff,#4dddfc);
  border-color:rgba(255,255,255,.15);
  box-shadow:0 16px 32px rgba(77,221,252,.35),inset 0 0 0 1px rgba(255,255,255,.3);
  transform:translateY(-1px);
}
.sidebar-toggle[aria-pressed="true"] span{background:#0b1229}
.topbar-left{display:flex;align-items:center;gap:.75rem}
.topbar-left h1{margin:0}
.topbar-toggle{
  position:relative;
  width:36px;
  height:36px;
  padding:6px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.35);
  background:linear-gradient(140deg,#a77cff,#68d2ff);
  box-shadow:0 18px 36px rgba(31,62,122,.35),inset 0 0 0 1px rgba(255,255,255,.6);
  display:flex;
  align-items:center;
  justify-content:center;
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}
.topbar-toggle span{
  position:absolute;
  width:70%;
  height:3px;
  background:#0f233f;
  opacity:1;
  border-radius:999px;
  transition:transform .18s ease,opacity .18s ease;
}
.topbar-toggle span:nth-child(1){transform:translate(-50%,-8px);left:50%;top:50%}
.topbar-toggle span:nth-child(2){transform:translate(-50%,-50%);left:50%;top:50%;opacity:.9}
.topbar-toggle span:nth-child(3){transform:translate(-50%,8px);left:50%;top:50%;opacity:.75}
.topbar-toggle:hover{
  transform:translateY(-1px);
  box-shadow:0 22px 40px rgba(31,62,122,.4),inset 0 0 0 1px rgba(255,255,255,.7);
  background:linear-gradient(140deg,#b489ff,#6fe1ff);
}
.topbar-toggle[aria-pressed="true"]{
  background:linear-gradient(140deg,#7d6bff,#4bc7ff);
  box-shadow:0 18px 36px rgba(75,199,255,.35),inset 0 0 0 1px rgba(255,255,255,.7);
}
.topbar-toggle[aria-pressed="true"] span:nth-child(1){
  transform:translate(-50%,-50%) rotate(45deg);
}
.topbar-toggle[aria-pressed="true"] span:nth-child(2){
  opacity:0;
}
.topbar-toggle[aria-pressed="true"] span:nth-child(3){
  transform:translate(-50%,-50%) rotate(-45deg);
}
.topbar-toggle::after{
  content:'';
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:radial-gradient(circle at 40% 30%,rgba(255,255,255,.28),transparent 58%);
  pointer-events:none;
  opacity:.75;
}
.sidebar nav{padding:.75rem .45rem;display:flex;flex-direction:column;gap:.2rem}
.sidebar .nav-item{display:flex;align-items:center;gap:.25rem;text-align:left;padding:.35rem .55rem;border-radius:.6rem;margin:0 .45rem;font-weight:600;letter-spacing:.01em;font-size:10px;line-height:1.2;min-height:32px;background:var(--nav-grad);border:1px solid rgba(255,255,255,.08);color:#f5f7ff;opacity:1;box-shadow:var(--nav-chip-shadow),inset 0 0 0 1px rgba(255,255,255,.04);transition:background .2s ease,border-color .2s ease,transform .18s ease,color .18s ease,box-shadow .2s ease}
.sidebar .nav-item:hover{background:linear-gradient(135deg,#24284c,#171a32);border-color:rgba(124,139,255,.45);transform:translateY(-1px)}
.sidebar .nav-item.active{
  background:linear-gradient(120deg,#a17bff,#5cf4ff);
  border-color:transparent;
  color:#050915;
  box-shadow:0 20px 45px rgba(92,244,255,.35),inset 0 0 0 1px rgba(255,255,255,.35);
  transform:translateY(-2px) scale(1.02);
}
.nav-icon{display:none}
body.sidebar-collapsed .shell{grid-template-columns:92px 1fr}
body.sidebar-collapsed .sidebar{width:92px}
body.sidebar-collapsed .sidebar-top{padding:.75rem .45rem}
body.sidebar-collapsed .brand-side{padding:.6rem .65rem;margin:.55rem .3rem}
body.sidebar-collapsed .brand-side .brand-text{display:none}
body.sidebar-collapsed .brand-side .brand-logo{width:72px;object-fit:contain}
body.sidebar-collapsed .sidebar nav{padding:.6rem .35rem}
body.sidebar-collapsed .sidebar .nav-item{justify-content:center;padding:.5rem .45rem;margin:0 .35rem;font-size:11px;white-space:nowrap}
body.sidebar-collapsed .sidebar .nav-item span:not(.nav-icon){display:inline}
body.sidebar-collapsed .queues-head{display:none}
body.sidebar-collapsed .queue-item{justify-content:center;padding:.5rem .5rem;font-size:11px;white-space:nowrap}
body.sidebar-collapsed .queue-item .queue-label{display:inline}
body.sidebar-collapsed .me{align-items:center}
body.sidebar-collapsed .sidebar .btn.text{width:100%;justify-content:center}
.me{
  padding:1rem;
  border-top:1px solid var(--border);
  color:#cdd3ff;
  display:flex;
  flex-direction:column;
  gap:.4rem;
}
.sidebar #whoami{
  font-weight:600;
  color:#f5f7ff;
  margin-bottom:.1rem;
  display:flex;
  align-items:center;
  gap:.4rem;
}
.sidebar #whoami::before{
  content:attr(data-icon);
  width:28px;
  height:28px;
  border-radius:10px;
  background:rgba(255,255,255,.08);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1rem;
  box-shadow:0 6px 12px rgba(3,6,18,.45);
}
.sidebar .btn.text{
  color:#0b1a3d;
  background:#f0f4ff;
  border-radius:.8rem;
  padding:.5rem .9rem;
  align-self:flex-start;
  font-weight:600;
  box-shadow:0 12px 25px rgba(3,6,18,.35);
  transition:transform .15s ease,box-shadow .15s ease;
}
.sidebar .btn.text:hover{
  transform:translateY(-1px);
  box-shadow:0 15px 30px rgba(3,6,18,.45);
}
.topbar{display:flex;align-items:center;justify-content:space-between;margin:1rem 0 1rem}
.topbar .right{display:flex;align-items:center;justify-content:flex-end;gap:.65rem;min-height:64px}
.bulk-actions{display:flex;gap:.6rem}
.modal-bulk-actions{gap:.35rem}
.bulk-actions .chip{
  border:none;
  background:linear-gradient(135deg,#eef1ff,#dbe7ff);
  color:#0b1433;
  padding:.55rem 1rem;
  border-radius:999px;
  font-weight:600;
  font-size:.85rem;
  box-shadow:0 8px 20px rgba(10,17,43,.18);
  cursor:pointer;
  transition:transform .15s ease,box-shadow .15s ease;
}
.bulk-actions .chip:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(10,17,43,.22)}
.main{padding:0 1.25rem 1.25rem;overflow:auto}
.site-footer{
  margin:1.25rem 0 0;
  padding:.75rem 0 0;
  border-top:1px solid var(--border);
  color:#2c3158;
  font-size:.9rem;
  text-align:right;
  letter-spacing:.01em;
  font-weight:600;
  text-shadow:0 1px 0 rgba(255,255,255,.35);
}
body.theme-dark .site-footer{color:#e8edff;text-shadow:none}

.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;margin-bottom:1rem}
.dashboard-hero{display:flex;flex-direction:column;gap:1.15rem;margin-bottom:1.25rem}
.dash-welcome{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1.2rem;
  padding:.9rem 1.1rem;
  border-radius:1rem;
  background:linear-gradient(135deg,rgba(95,107,255,.18),rgba(92,244,255,.16)),linear-gradient(120deg,#eef1ff,#fde9ff);
  box-shadow:0 28px 65px rgba(122,91,255,.2);
  border:1px solid rgba(99,73,255,.25);
  position:relative;
  overflow:hidden;
}
.dash-welcome::before{
  content:'';
  position:absolute;
  inset:-30% -10% auto auto;
  height:180px;
  width:280px;
  background:radial-gradient(circle at 20% 20%,rgba(92,244,255,.35),transparent 60%);
  filter:blur(25px);
  opacity:.6;
}
.dash-welcome h2{margin:0;font-size:1.25rem;letter-spacing:.01em}
.dash-welcome p{margin:.1rem 0 0}
.dash-date{font-size:.9rem;font-weight:600;color:#5a3d91;padding:.6rem 1rem;border-radius:999px;background:rgba(255,255,255,.65);box-shadow:0 10px 25px rgba(91,57,180,.2)}
.dash-welcome-right{display:flex;flex-direction:column;gap:.5rem;align-items:flex-end}
.dash-brand{
  display:flex;
  align-items:center;
  gap:.65rem;
  padding:.55rem .85rem;
  background:rgba(255,255,255,.75);
  border:1px solid rgba(91,57,180,.15);
  border-radius:1rem;
  box-shadow:0 16px 32px rgba(17,23,64,.18);
  backdrop-filter:blur(8px);
}
.dash-brand-logo{
  height:46px;
  width:auto;
  border-radius:.75rem;
  object-fit:contain;
  box-shadow:0 8px 18px rgba(17,23,64,.12);
}
.dash-brand-text{display:flex;flex-direction:column;line-height:1.2}
.dash-brand-text strong{color:#2b1b55;letter-spacing:.03em}
.floating-brand{
  position:static;
  display:flex;
  align-items:center;
  gap:.65rem;
  margin-left:auto;
  padding:0;
  background:transparent;
  border:none;
  border-radius:0;
  box-shadow:none;
  backdrop-filter:none;
}
.floating-brand-inline{position:static}
.queue-view .floating-brand{display:none!important}
.floating-brand-logo{
  height:100px;
  width:auto;
  border-radius:1rem;
  object-fit:contain;
  box-shadow:none;
}
.floating-brand-text{display:none}
.floating-brand-label{display:none}
.dash-actions{display:flex;gap:.35rem}
.pill{border:none;border-radius:999px;padding:.45rem 1.1rem;font-weight:600;cursor:pointer;color:#4b4f72;background:rgba(255,255,255,.55);box-shadow:0 8px 18px rgba(17,23,64,.12);transition:transform .15s ease,box-shadow .15s ease,background .15s ease}
.pill:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(17,23,64,.2)}
.pill.active{background:linear-gradient(120deg,#a67dff,#5cf4ff);color:#04122a;box-shadow:0 18px 30px rgba(92,244,255,.35)}
.theme-dark .pill{color:var(--text);background:rgba(255,255,255,.12);box-shadow:none}
.theme-dark .pill.active{color:#04122a}
.dash-kpi-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:1rem;
  margin:0 0 2rem;
  padding:.5rem;
  border-radius:22px;
  background:linear-gradient(135deg,#0e1125,#191f3d);
  box-shadow:0 18px 36px rgba(10,12,28,.35),inset 0 0 0 1px rgba(255,255,255,.04);
}
.kpi{
  position:relative;
  overflow:hidden;
  border:none;
  border-radius:18px;
  padding:1rem 1.1rem;
  color:#fdfdff;
  background:linear-gradient(135deg,#1f2648,#11162f);
  box-shadow:0 22px 38px rgba(18,22,66,.26),0 10px 16px rgba(18,22,66,.12);
  transition:transform .16s ease,box-shadow .16s ease;
}
.kpi::before,
.kpi::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;
  opacity:.8;
  pointer-events:none;
}
.kpi::before{
  background:radial-gradient(circle at 24% 20%,rgba(255,255,255,.08),transparent 40%),radial-gradient(circle at 80% 10%,rgba(255,255,255,.07),transparent 38%);
}
.kpi::after{
  background-image:repeating-linear-gradient(45deg,rgba(255,255,255,.08) 0,rgba(255,255,255,.08) 2px,transparent 2px,transparent 6px);
  opacity:.35;
}
.kpi:hover{transform:translateY(-4px);box-shadow:0 28px 48px rgba(18,22,66,.26),0 12px 18px rgba(18,22,66,.14)}
.kpi .kpi-top{display:flex;gap:.75rem;align-items:center;margin-bottom:.5rem}
.kpi .kpi-label{display:block;font-weight:800;font-size:1.05rem;letter-spacing:-.01em}
.kpi .kpi-sub{color:rgba(255,255,255,.9);font-weight:700;font-size:.85rem}
.kpi .kpi-icon{
  width:46px;
  height:46px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:1.5rem;
  background:rgba(255,255,255,.22);
  box-shadow:0 8px 18px rgba(0,0,0,.18);
}
.kpi-value{font-size:2rem;font-weight:800;letter-spacing:-.02em;margin-bottom:.4rem}
.kpi-bar{
  position:relative;
  width:100%;
  height:18px;
  border-radius:12px;
  background:rgba(0,0,0,.15);
  box-shadow:inset 0 1px 3px rgba(0,0,0,.25);
  overflow:hidden;
}
.kpi-fill{
  position:absolute;
  left:0;top:0;bottom:0;
  width:0%;
  border-radius:12px;
  transition:width .35s ease;
}
.kpi[data-tone=\"primary\"]{
  background:linear-gradient(140deg,#4f6bff,#22d1ff);
  box-shadow:0 20px 36px rgba(79,107,255,.35);
}
.kpi[data-tone=\"accent\"]{
  background:linear-gradient(140deg,#ff8a5c,#ff4181);
  box-shadow:0 20px 36px rgba(255,130,120,.35);
}
.kpi[data-tone=\"success\"]{
  background:linear-gradient(140deg,#1fc8a1,#6ff29f);
  box-shadow:0 20px 36px rgba(31,200,161,.35);
}
.kpi[data-tone=\"sunset\"]{
  background:linear-gradient(140deg,#ffcf66,#ff7cbf);
  box-shadow:0 20px 36px rgba(255,140,120,.32);
}
.kpi[data-tone=\"primary\"] .kpi-fill{background:linear-gradient(90deg,#5cf4ff,#5f6bff)}
.kpi[data-tone=\"accent\"] .kpi-fill{background:linear-gradient(90deg,#ffb86c,#ff7b5f)}
.kpi[data-tone=\"success\"] .kpi-fill{background:linear-gradient(90deg,#6cf0d3,#18c29c)}
.kpi[data-tone=\"sunset\"] .kpi-fill{background:linear-gradient(90deg,#ffd36b,#f77ab7)}
.status-card{
  margin:2rem 0;
  border:1px solid rgba(95,107,255,.16);
  box-shadow:0 24px 56px rgba(20,25,60,.14);
  background:radial-gradient(circle at 12% 18%,rgba(120,167,255,.18),transparent 32%),
             radial-gradient(circle at 88% 8%,rgba(255,172,214,.18),transparent 34%),
             linear-gradient(135deg,#f8fbff,#eef2ff);
  backdrop-filter:blur(6px);
}
.status-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:.75rem}
.status-pill{border-radius:1.25rem;padding:1.05rem;background:rgba(243,244,255,.92);display:flex;flex-direction:column;gap:.45rem;box-shadow:inset 0 0 0 1px rgba(255,255,255,.6),0 12px 26px rgba(15,18,52,.12);border:1px solid rgba(95,107,255,.18);min-height:115px;backdrop-filter:blur(6px)}
.status-pill .status-head{display:flex;align-items:center;justify-content:space-between}
.status-pill strong{font-size:1.8rem}
.status-pill span{font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;color:#545b82;font-weight:600}
.theme-dark .status-card{background:#0f1428;border-color:rgba(255,255,255,.08);box-shadow:0 18px 38px rgba(0,0,0,.35)}
.theme-dark .status-pill{background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.08);color:var(--text)}
.theme-dark .status-pill span{color:#cfd6ff}
body.theme-dark .table .thead,
body.theme-dark .orders-table .thead{border-bottom:1px solid rgba(255,255,255,.08)}
.status-progress{position:relative;height:12px;border-radius:999px;background:rgba(255,255,255,.65);overflow:hidden;box-shadow:inset 0 1px 3px rgba(0,0,0,.08)}
.status-progress div{height:100%;background:linear-gradient(120deg,#7a5bff,#5cf4ff)}
.status-progress small{position:absolute;top:14px;right:0;font-size:.7rem;color:#5a5f82}
.status-pill.status-pending{background:linear-gradient(135deg,#f4f4ff,#e1e7ff)}
.status-pill.status-work-in-progress{background:linear-gradient(135deg,#f8f1ff,#e0c6ff)}
.status-pill.status-internal-clarification{background:linear-gradient(135deg,#fff4ec,#ffe0c2)}
.status-pill.status-external-clarification{background:linear-gradient(135deg,#ecfbff,#c4f2ff)}
.status-pill.status-on-hold{background:linear-gradient(135deg,#fff0f0,#ffd4d4)}
.status-pill.status-cancelled{background:linear-gradient(135deg,#f9f9f9,#e1e6ee)}
.status-pill.status-completed{background:linear-gradient(135deg,#e9fff7,#b4f3d9)}
.status-bars-wrap{margin-top:1rem;padding:1rem;border-radius:1.25rem;border:1px solid rgba(17,23,64,.06);background:radial-gradient(circle at 10% 0%,rgba(124,175,255,.18),transparent 45%),radial-gradient(circle at 90% 20%,rgba(255,184,212,.22),transparent 40%),linear-gradient(160deg,#0f1227,#0d0f1f);color:#f5f7ff;box-shadow:0 20px 45px rgba(10,12,30,.25)}
.status-bars-head{display:flex;align-items:baseline;gap:.6rem;justify-content:space-between;margin-bottom:.6rem}
.status-bars-head h3{margin:0;font-size:1rem;font-weight:700;letter-spacing:.02em;color:#fefefe}
.status-bars-head .muted{color:#c8cde8}
.status-bars{display:flex;gap:1.1rem;align-items:flex-end;min-height:220px;position:relative;padding:1rem .5rem;overflow:hidden}
.status-bars::before{content:'';position:absolute;inset:12px;pointer-events:none;background:repeating-linear-gradient(180deg,rgba(255,255,255,.06) 0,rgba(255,255,255,.06) 1px,transparent 1px,transparent 32px)}
.hex-bar{flex:1;min-width:120px;display:flex;flex-direction:column;align-items:center;gap:.45rem;position:relative;z-index:1}
.hex-bar .bar-3d{width:95px;height:220px;position:relative;transform:skewY(-5deg);filter:drop-shadow(0 12px 18px rgba(0,0,0,.35))}
.hex-bar .bar-core{
  position:absolute;left:0;right:0;bottom:0;
  height:calc(var(--h,60) * 1%);
  background:linear-gradient(180deg,var(--c1),var(--c2));
  border-radius:14px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 18px 35px rgba(0,0,0,.25);
  transform:skewY(5deg);
}
.hex-bar .bar-core::before{
  content:'';
  position:absolute;left:0;right:0;top:-12px;height:16px;
  background:linear-gradient(180deg,rgba(255,255,255,.9),rgba(255,255,255,.35));
  border-radius:12px;
  opacity:.85;
}
.hex-bar .bar-core::after{
  content:attr(data-pct) '%';
  position:absolute;left:8px;top:8px;
  font-weight:700;
  font-size:.85rem;
  color:#fff;
  transform:skewY(-5deg);
}
.hex-bar .bar-label{font-weight:700;font-size:.9rem;letter-spacing:.02em;text-transform:uppercase;color:#e6e8ff;text-align:center}
.hex-bar .bar-count{font-size:.85rem;color:#c9cfea}
.status-bars .hex-bar:nth-child(1){--c1:#3fc0ff;--c2:#1c5bff}
.status-bars .hex-bar:nth-child(2){--c1:#ffb347;--c2:#e26a00}
.status-bars .hex-bar:nth-child(3){--c1:#59e0a6;--c2:#128f62}
.status-bars .hex-bar:nth-child(4){--c1:#d04eff;--c2:#7000a9}
.status-bars .hex-bar:nth-child(5){--c1:#6ee0ff;--c2:#1190b8}
.status-bars .hex-bar:nth-child(6){--c1:#ffc371;--c2:#ff5f6d}
.status-bars .hex-bar:nth-child(7){--c1:#7df7c5;--c2:#20c6a8}
.hex-bar .bar-core[data-pct='0']{height:12%}
.dash-insights{margin:1.2rem 0 1.6rem}
.insight-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}
.insight-card{padding:1rem 1.15rem;border-radius:18px;border:1px solid rgba(17,23,64,.08);box-shadow:0 18px 36px rgba(20,25,60,.12);background:linear-gradient(135deg,#f7f9ff,#eef2ff);color:#1a1e35}
.insight-card[data-tone=\"lavender\"]{background:linear-gradient(135deg,#f4f6ff,#dde6ff)}
.insight-card[data-tone=\"peach\"]{background:linear-gradient(135deg,#fff7ef,#ffe4c8)}
.insight-card[data-tone=\"mint\"]{background:linear-gradient(135deg,#f2fff8,#d8f6e8)}
.insight-label{margin:0;color:#55608c;font-weight:700;letter-spacing:.06em;font-size:.8rem;text-transform:uppercase}
.insight-value{font-size:2rem;font-weight:800;margin:.15rem 0 .25rem}
.insight-sub{color:#6d7591;font-weight:600}
body.theme-dark .insight-card{border-color:rgba(255,255,255,.08);background:linear-gradient(135deg,#13172c,#0f1324);color:var(--text)}
.dash-status-shell{margin:0 0 2rem;padding:.75rem;border-radius:22px;border:1px solid rgba(17,23,64,.08);background:radial-gradient(circle at 18% 10%,rgba(124,175,255,.16),transparent 45%),radial-gradient(circle at 82% 8%,rgba(255,184,212,.18),transparent 48%),linear-gradient(135deg,#f8fbff,#eef2ff);box-shadow:0 26px 50px rgba(20,25,60,.12)}
.status-board{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}
.status-column{padding:1rem 1.1rem;border-radius:18px;border:1px solid rgba(17,23,64,.08);background:linear-gradient(135deg,#fefeff,#f1f3ff);box-shadow:0 16px 32px rgba(15,18,52,.14);min-height:170px;display:flex;flex-direction:column;gap:.65rem}
.status-column-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.status-title-wrap{display:flex;align-items:center;gap:.45rem;text-transform:uppercase;font-weight:800;letter-spacing:.04em;color:#3b4465;font-size:.9rem}
.status-dot{width:10px;height:10px;border-radius:50%;background:#4f6bff;box-shadow:0 0 0 6px rgba(79,107,255,.12)}
.status-count{font-size:1.9rem;font-weight:800;color:#1b1f3a}
.status-body{flex:1;display:flex;flex-direction:column;gap:.4rem;color:#4b4f66}
.status-empty{color:#7a7f99;font-weight:600}
.pending-list{display:flex;flex-direction:column;gap:.6rem}
.pending-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:.5rem}
.pending-name{font-weight:700;color:#1f2545;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pending-meter{display:none}
.pending-meter-fill{display:none}
.pending-count{min-width:28px;height:26px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:rgba(79,107,255,.12);color:#2a3570;font-weight:800;font-size:.9rem;box-shadow:inset 0 1px 0 rgba(255,255,255,.85)}
.pending-footer{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-top:.25rem}
.pending-show-all{border:none;background:transparent;color:#2a4ae0;font-weight:700;cursor:pointer;text-decoration:underline}
.pending-show-all:hover{color:#182fb4}
.status-top-client{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.status-subtext{margin-top:-.1rem}
.status-column.tone-pending{--tone:#4f7cff;--tone-soft:rgba(79,107,255,.15);background:linear-gradient(135deg,#f5f6ff,#dfe7ff)}
.status-column.tone-progress{--tone:#25cdda;--tone-soft:rgba(37,205,218,.14);background:linear-gradient(135deg,#f1fbff,#d0f5ff)}
.status-column.tone-internal{--tone:#ff9a5c;--tone-soft:rgba(255,154,92,.16);background:linear-gradient(135deg,#fff6ed,#ffe3cc)}
.status-column.tone-external{--tone:#b388ff;--tone-soft:rgba(179,136,255,.16);background:linear-gradient(135deg,#f7f0ff,#e5d9ff)}
.status-column.tone-onhold{--tone:#f2b042;--tone-soft:rgba(242,176,66,.16);background:linear-gradient(135deg,#fff8ec,#ffe7c6)}
.status-column.tone-cancelled{--tone:#ff6f71;--tone-soft:rgba(255,111,113,.16);background:linear-gradient(135deg,#fff0f1,#ffe2e3)}
.status-column.tone-completed{--tone:#52d39f;--tone-soft:rgba(82,211,159,.16);background:linear-gradient(135deg,#edfff7,#d6f7e9)}
.status-column.tone-neutral{--tone:#7c89a5;--tone-soft:rgba(124,137,165,.16);background:linear-gradient(135deg,#f5f7fa,#e6ebf3)}
.status-column .status-dot{background:var(--tone,#4f6bff);box-shadow:0 0 0 6px var(--tone-soft,rgba(79,107,255,.12))}
.status-column .pending-count{background:var(--tone-soft,rgba(79,107,255,.12));color:var(--tone,#2a3570)}
.status-column .pending-meter{background:var(--tone-soft,rgba(79,107,255,.12))}
.status-column .pending-meter-fill{background:linear-gradient(90deg,var(--tone,#5f6bff),#5cf4ff)}
.status-column .status-count{color:#1a1d33}
.status-column .pending-name{color:#1d2244}
body.theme-dark .status-column{border-color:rgba(255,255,255,.08);background:linear-gradient(135deg,#11152c,#0c1023);color:var(--text)}
body.theme-dark .status-column .status-title-wrap{color:var(--text)}
body.theme-dark .status-column .status-count{color:var(--text)}
body.theme-dark .pending-meter{background:rgba(255,255,255,.12)}
body.theme-dark .pending-meter-fill{background:linear-gradient(90deg,var(--tone,#7f9dff),var(--accent))}
body.theme-dark .pending-count{background:rgba(255,255,255,.12);color:var(--text)}
body.theme-dark .pending-show-all{color:var(--text)}
.pending-modal .swal2-popup{background:linear-gradient(135deg,#f8fbff,#eef2ff);border-radius:18px;border:1px solid rgba(17,23,64,.08);box-shadow:0 24px 50px rgba(20,25,60,.18)}
.pending-modal .swal2-close{top:12px;right:12px;background:rgba(255,255,255,.85);border-radius:50%;color:#5c637f}
.pending-modal-meta{font-weight:700;color:#3c4265;margin-bottom:.4rem}
.pending-modal-list{max-height:60vh;overflow:auto;padding:.35rem .1rem .75rem;display:flex;flex-direction:column;gap:.5rem}
.pending-modal-row{display:grid;grid-template-columns:1.4fr 1fr auto;gap:.65rem;align-items:center;padding:.7rem .6rem;border-radius:12px;background:linear-gradient(135deg,#f8f9ff,#eef1ff);border:1px solid rgba(17,23,64,.06);box-shadow:0 10px 22px rgba(20,25,60,.12)}
.pending-modal-name-block{display:flex;flex-direction:column;gap:.1rem;min-width:0}
.pending-modal-name{font-weight:800;color:#1d2244;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pending-modal-sub{color:#6a6f8f;font-weight:600}
.pending-modal-meter{position:relative;height:8px;border-radius:999px;background:rgba(79,107,255,.15);overflow:hidden}
.pending-modal-meter span{position:absolute;left:0;top:0;bottom:0;border-radius:999px;background:linear-gradient(90deg,#6c7cff,#5cf4ff)}
.pending-modal-row:last-child{border-bottom:none}
.pending-modal-count{min-width:42px;height:32px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;background:rgba(79,107,255,.12);color:#2a3570;font-weight:800;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.pending-modal-empty{padding:1rem 0;color:#6a6f8f;font-weight:700;text-align:center}
body.theme-dark .pending-modal .swal2-popup{background:linear-gradient(135deg,#0f1227,#0b0e1f);border-color:rgba(255,255,255,.08)}
body.theme-dark .pending-modal-row{color:var(--text);border-color:rgba(255,255,255,.08);background:linear-gradient(135deg,#11172f,#0d1124)}
body.theme-dark .pending-modal-meter{background:rgba(255,255,255,.12)}
body.theme-dark .pending-modal-meter span{background:linear-gradient(90deg,var(--tone,#7f9dff),var(--accent))}
body.theme-dark .pending-modal-count{background:rgba(255,255,255,.12);color:var(--text)}
.dash-wip{
  margin:1.6rem 0 2rem;
  border:1px solid rgba(95,107,255,.16);
  box-shadow:0 24px 56px rgba(20,25,60,.14);
  background:radial-gradient(circle at 12% 20%,rgba(120,167,255,.18),transparent 30%),
             radial-gradient(circle at 88% 10%,rgba(255,172,214,.2),transparent 32%),
             linear-gradient(135deg,#f8fbff,#eef2ff);
  padding:1.8rem;
  backdrop-filter:blur(6px);
}
.dash-tabs{display:flex;flex-wrap:wrap;gap:.5rem}
.dash-tabs button{
  border:1px solid rgba(95,107,255,.2);
  border-radius:999px;
  padding:.5rem 1.05rem;
  font-weight:700;
  letter-spacing:.01em;
  background:linear-gradient(135deg,rgba(255,255,255,.9),rgba(240,244,255,.95));
  color:#1e244a;
  box-shadow:0 12px 26px rgba(17,23,64,.18);
  cursor:pointer;
  transition:transform .15s ease,box-shadow .15s ease,background .15s ease;
}
.dash-tabs button:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 32px rgba(17,23,64,.26);
}
.dash-tabs button.active{
  background:linear-gradient(120deg,#7a5bff 0%,#5cf4ff 50%,#4ed0ff 100%);
  color:#04122a;
  box-shadow:0 20px 36px rgba(92,244,255,.32);
  border-color:rgba(92,244,255,.5);
}

@media (max-width: 768px){
  .status-card{padding:1.1rem}
  .status-bars-head{flex-direction:column;align-items:flex-start;gap:.25rem}
  .status-bars{gap:.7rem;min-height:200px;padding:.8rem .4rem;overflow-x:auto}
  .hex-bar{min-width:90px}
  .hex-bar .bar-3d{width:75px;height:180px}
  .hex-bar .bar-label{font-size:.8rem}
  .hex-bar .bar-count{font-size:.75rem}
}

@media (max-width: 900px){
  .shell{grid-template-columns:185px 1fr}
  .sidebar{
    width:185px;
    padding:.7rem .65rem 1.1rem;
    overflow-y:auto;
    overflow-x:hidden;
    flex-shrink:0;
  }
  .sidebar-top{display:block}
  .sidebar-footer{display:none}
  .sidebar .nav-item{
    justify-content:flex-start;
    gap:.5rem;
    padding:.62rem .65rem;
    white-space:nowrap;
    width:100%;
    font-size:.97rem;
  }
  .sidebar .nav-item span:not(.nav-icon){display:inline}
  .sidebar .nav-icon{margin:0;font-size:1.08rem}
  .sidebar nav{display:flex;flex-direction:column;gap:.55rem}
  .main{min-width:0}
  .me{padding:.85rem .6rem;gap:.35rem;align-items:stretch}
  .sidebar .btn.text{
    width:100%;
    min-width:0;
    text-align:center;
    white-space:normal;
    font-size:.9rem;
    padding:.55rem .85rem;
    display:flex;
    justify-content:center;
  }
}

@media (max-width: 900px) and (orientation: landscape){
  .sidebar{
    max-height:100vh;
    position:sticky;
    top:0;
  }
  .status-card{overflow-x:auto}
  .status-bars-wrap{overflow-x:auto}
  .status-bars{min-width:820px}
}
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:.75rem}

.search{flex:1}
.search input{
  width:100%;
  min-width:320px;
  padding:.65rem .85rem;
  border-radius:1rem;
  border:1px solid rgba(17,23,64,.12);
  background:#f6f7ff;
  font-size:.95rem;
  box-shadow:0 10px 30px rgba(12,18,54,.08) inset;
}
.tabs{display:flex;gap:.4rem;flex-wrap:wrap;justify-content:flex-end}
.tab{background:#edf0ff;border:1px solid var(--border);color:var(--text);padding:.45rem .85rem;border-radius:.85rem;cursor:pointer;box-shadow:0 8px 18px rgba(12,18,54,.08);transition:transform .15s ease,box-shadow .15s ease}
.tab:hover{transform:translateY(-1px);box-shadow:0 12px 22px rgba(12,18,54,.12)}
.tab.active{background:#dfe3ff;border-color:#8b95ff}
.tabs-line .tab{border-radius:0;border:0;border-bottom:2px solid transparent;background:transparent;padding:.5rem .75rem}
.tabs-line .tab.active{border-color:var(--pri)}

.table{width:100%;margin-top:.6rem}
.table.scroll-x{overflow-x:auto}
.table.scroll-x .thead,
.table.scroll-x .tbody>div{min-width:1200px}
.thead,.tbody>div{display:grid;grid-template-columns:140px 140px 200px 170px 150px 100px 110px 130px 130px 150px 130px 120px 150px 150px 130px;gap:.4rem;align-items:center;font-size:.75rem}
.thead{font-weight:600;color:#6f7595;border-bottom:1px solid rgba(17,23,64,.08);padding:.5rem;text-transform:uppercase;font-size:.78rem;letter-spacing:.08em}
.ticket-table .thead{grid-template-columns:repeat(4, minmax(140px,1fr));align-items:start}
.ticket-table.is-admin .thead{grid-template-columns:120px 200px 160px 180px minmax(240px,1.3fr) 140px 140px minmax(160px,1fr)}
.ticket-table .tbody{display:flex;flex-direction:column;gap:.6rem;padding:.35rem 0}
.ticket-table .tbody .tr{display:grid;grid-template-columns:repeat(4, minmax(140px,1fr));gap:.6rem;align-items:start;padding:.75rem;border-radius:1rem;background:#f6f7ff;box-shadow:0 10px 24px rgba(8,12,36,.08);border:1px solid rgba(17,23,64,.06)}
.ticket-table.is-admin .tbody .tr{grid-template-columns:120px 200px 160px 180px minmax(240px,1.3fr) 140px 140px minmax(160px,1fr)}
.ticket-table.ticket-done.is-admin .thead{grid-template-columns:120px 200px 160px 180px minmax(240px,1.3fr) 140px minmax(160px,1fr)}
.ticket-table.ticket-done.is-admin .tbody .tr{grid-template-columns:120px 200px 160px 180px minmax(240px,1.3fr) 140px minmax(160px,1fr)}
.ticket-table.ticket-done .thead{grid-template-columns:repeat(3,minmax(160px,1fr))}
.ticket-table.ticket-done .tbody .tr{grid-template-columns:repeat(3,minmax(160px,1fr))}
.ticket-thread{display:flex;flex-direction:column;gap:.45rem}
.ticket-thread .thread-header{display:flex;align-items:center;justify-content:space-between;gap:.4rem}
.ticket-table.is-admin .ticket-thread .thread-header{justify-content:flex-end}
.ticket-thread .thread-body{display:flex;flex-direction:column;gap:.4rem;max-height:240px;overflow:auto;padding:.4rem;border-radius:.65rem;background:rgba(16,22,45,.04)}
.ticket-thread .comment{background:#fff;border-radius:.65rem;padding:.45rem .6rem;box-shadow:0 6px 14px rgba(8,12,32,.08)}
.ticket-thread .comment-meta{font-size:.78rem;color:#6f7595;font-weight:700;margin-bottom:.25rem}
.ticket-thread .comment-body{font-size:.9rem;color:#1c2440}
.ticket-thread .thread-input{display:flex;flex-direction:column;gap:.35rem}
.ticket-thread textarea{width:100%;border-radius:.65rem;border:1px solid var(--border);padding:.5rem .65rem;background:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.6)}
.ticket-thread .row.gap{display:flex;gap:.4rem;flex-wrap:wrap}
.ticket-table .pad{padding:.4rem 0}
.ticket-eta{width:100%;padding:.55rem .75rem;border:1px solid #cdd3eb;border-radius:10px;background:linear-gradient(145deg,#fff,#f3f5ff);color:#1e2a4a;font-weight:600;box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 4px 12px rgba(13,27,61,.08);-webkit-appearance:none;appearance:none}
.ticket-eta:focus{outline:none;border-color:#7b8dff;box-shadow:0 0 0 3px rgba(123,141,255,.25),inset 0 1px 0 rgba(255,255,255,.7)}
.productivity-card{gap:0.25rem}
.productivity-card .prod-filters{display:flex;align-items:flex-end;justify-content:flex-end;flex-wrap:wrap;gap:.65rem}
.productivity-card .prod-filter-field{display:flex;flex-direction:column;gap:.25rem;min-width:150px}
.productivity-card .prod-filter-field label{font-size:.75rem;color:#6f7595;font-weight:600;letter-spacing:.04em;text-transform:uppercase}
.productivity-card .prod-filter-field input,
.productivity-card .prod-filter-field select{min-height:38px;border-radius:.65rem;border:1px solid var(--border);padding:.35rem .6rem;background:#fff;box-shadow:0 6px 16px rgba(12,18,54,.06) inset}
.productivity-card .prod-employee-meta{margin-top:.4rem}
.productivity-card .prod-employee-meta .field{flex:1;min-width:180px}
.productivity-card .prod-employee-meta input{min-height:40px}
.tbody>div{
  padding:.8rem .4rem;
  border-bottom:1px solid rgba(17,23,64,.05);
  position:relative;
  transition:background .2s ease,transform .2s ease;
}
.tbody>div::after{
  content:'';
  position:absolute;inset:0;
  border-radius:.8rem;
  border:1px solid transparent;
  transition:border-color .2s ease;
  pointer-events:none;
}
.tbody>div:hover{
  background:rgba(95,107,255,.05);
  transform:translateY(-1px);
}
.acc-toggle{position:fixed;left:16px;bottom:16px;width:40px;height:40px;border-radius:50%;background:#2c7be5 url("assets/accessibility_1512806.png") center/cover no-repeat;color:#fff;border:none;box-shadow:0 10px 18px rgba(0,0,0,.18);cursor:pointer;z-index:1100;display:flex;align-items:center;justify-content:center;font-size:18px}
.acc-panel{position:fixed;left:16px;bottom:72px;width:320px;background:#0f1824;color:#e8ecf5;border-radius:12px;box-shadow:0 18px 32px rgba(0,0,0,.2);z-index:1100;overflow:hidden;display:none}
.acc-panel.show{display:block}
.acc-panel .acc-head{background:linear-gradient(135deg,#1d70f7,#0c4fbb);padding:12px 14px;display:flex;justify-content:space-between;align-items:center;font-weight:700;font-size:16px;color:#fff}
.acc-panel .acc-body{padding:12px;background:#0f1824}
.acc-panel .acc-row{display:flex;justify-content:space-between;align-items:center;margin:10px 0;padding:10px;border-radius:10px;background:#121f30}
.acc-panel .acc-row .label{font-size:14px;font-weight:600;color:#dce4f7}
.acc-panel .acc-controls{display:flex;align-items:center;gap:8px}
.acc-pill{padding:8px 12px;border-radius:999px;border:1px solid #1f65c9;background:#0f1824;color:#dce4f7;cursor:pointer}
.acc-pill.active{background:#fff;color:#0f1824;border-color:#fff;font-weight:700}
.acc-ghost{border:1px solid #2c7be5;color:#e8ecf5;background:transparent;border-radius:999px;padding:7px 12px;cursor:pointer}
.acc-ghost:hover{background:rgba(44,123,229,.15)}
.acc-reset-bar{display:flex;justify-content:space-between;gap:8px;margin-bottom:10px}
.acc-btn-round{width:34px;height:34px;border-radius:50%;border:1px solid #2c7be5;background:transparent;color:#e8ecf5;font-weight:700;cursor:pointer}
.acc-btn-round:hover{background:rgba(44,123,229,.2)}
.acc-default-chip{padding:6px 10px;border-radius:10px;border:1px dashed #3c5b8a;color:#aec5f6;font-size:12px}
.acc-panel.dragging,.acc-toggle.dragging{cursor:grabbing}

.theme-dark .orders-table .thead>div{color:#e8ecff !important;opacity:0.95}
.theme-dark .orders-table .thead{background:rgba(255,255,255,.06)}
.tbody>div:hover::after{border-color:rgba(124,139,255,.4)}
.tbody>div.clickable{cursor:pointer}
.tbody>div.selected::after{border-color:rgba(122,131,255,.5)}
.team-details-table .thead,
.team-details-table .tbody>div{
  grid-template-columns:160px 1fr 1fr 1fr 1fr 1fr 1fr 110px 1fr 60px;
}
.detail-row input,.detail-row select{
  border-radius:.9rem;
  border:1px solid rgba(17,23,64,.1);
  background:#f6f7ff;
  padding:.65rem .95rem;
  box-shadow:inset 0 2px 6px rgba(12,18,54,.06);
  min-width:180px;
}
.detail-row{flex-wrap:wrap}
.detail-row select{min-width:140px}
.detail-row input:not(:first-child){margin-left:.25rem}
.detail-row+.detail-row{margin-top:.6rem}
.stage-list{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:.5rem}
.stage-row{display:flex;align-items:center;gap:.35rem;background:#eef0ff;padding:.2rem;border-radius:1rem;border:1px solid rgba(17,23,64,.08);box-shadow:0 8px 16px rgba(15,18,52,.08)}
.stage-pill{
  flex:1;
  border:none;
  background:transparent;
  font-weight:600;
  color:#1a1f3d;
  text-align:left;
  padding:.4rem .8rem;
  border-radius:.9rem;
  cursor:pointer;
}
.stage-add{margin-top:.9rem}
.stage-add input{
  flex:1;
  border-radius:999px;
  border:1px solid rgba(17,23,64,.12);
  padding:.55rem .9rem;
  background:#f6f7ff;
  box-shadow:inset 0 2px 8px rgba(12,18,54,.07);
}
.stage-add .btn{
  border-radius:999px;
  padding:.55rem 1.3rem;
}

.board{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem;padding:.75rem 0}
.board.summary-board{display:block;padding:.35rem 0}
.card.order{padding:1.1rem;border:1px solid rgba(95,107,255,.15);background:linear-gradient(145deg,#ffffff,#f0f4ff);box-shadow:0 25px 45px rgba(15,18,52,.15);border-radius:1.35rem}
.order-head{display:flex;justify-content:space-between;align-items:flex-start;gap:.75rem}
.order-head strong{font-size:1.1rem}
.order-head .chip{background:rgba(122,91,255,.15);color:#4b3b87;padding:.25rem .65rem;border-radius:999px;font-size:.75rem;font-weight:600}
.order-meta{display:flex;flex-direction:column;gap:.35rem;margin:.6rem 0;color:#5d627e;font-size:.85rem}
.order-progress{height:10px;border-radius:999px;background:rgba(255,255,255,.7);overflow:hidden;box-shadow:inset 0 1px 4px rgba(0,0,0,.1);margin-bottom:.6rem}
.order-progress div{height:100%;background:linear-gradient(120deg,#7f80ff,#5cf4ff)}
.order-tags{display:flex;flex-wrap:wrap;gap:.4rem;margin-bottom:.65rem}
.order-tags .badge{background:rgba(94,101,255,.12);color:#3c3f63;border:none;padding:.25rem .55rem;font-size:.7rem;font-weight:600}
.order-due{font-size:.8rem;color:#7a1f40;font-weight:600}
.badge{display:inline-flex;align-items:center;gap:.35rem;padding:.2rem .5rem;border-radius:999px;border:1px solid var(--border);background:#edf0ff;color:#5a5f7d;font-size:.75rem}
.empty-board{grid-column:1/-1;text-align:center;padding:1.5rem;border-radius:1rem;border:1px dashed rgba(17,23,64,.2);background:rgba(255,255,255,.7);color:var(--muted);font-weight:600}
.wip-summary{display:flex;flex-direction:column;gap:.55rem}
.wip-row{display:grid;gap:.55rem;align-items:center;padding:.65rem .8rem;border-radius:1rem;border:1px solid rgba(17,23,64,.12);background:#f6f7ff;box-shadow:0 12px 24px rgba(15,18,52,.08)}
.wip-row.head{background:linear-gradient(120deg,#eef2ff,#f9fbff);border-style:dashed;border-color:rgba(17,23,64,.14);font-weight:700;color:#394066;font-size:.92rem}
.wip-row.head .cell{white-space:normal;text-align:center;line-height:1.3;overflow:visible}
.wip-row .cell.client{text-align:left;font-weight:700;color:#1a1f3d;font-size:.95rem}
.wip-row .cell.count{text-align:center;font-variant-numeric:tabular-nums;color:#3b4260;white-space:nowrap;font-size:.86rem;overflow:visible}
.wip-row:not(.head) .cell{overflow:hidden;text-overflow:ellipsis}
.wip-modal .swal2-html-container{margin:0;padding:0}
.wip-modal .swal2-popup{background:linear-gradient(135deg,#f9fbff,#eef3ff);box-shadow:0 25px 55px rgba(15,18,52,.18);border-radius:18px;border:1px solid rgba(70,82,150,.12)}
.wip-modal-shell{padding:.75rem 1rem 1rem}
.wip-modal-summary{max-height:60vh;overflow:auto;padding:.5rem;background:#f7f8ff;border:1px solid rgba(40,40,94,.08);border-radius:14px;box-shadow:inset 0 1px 0 rgba(255,255,255,.7);overflow-x:auto}
.wip-modal-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;padding:.15rem .25rem;padding-right:3rem}
.wip-modal-title{font-size:1.15rem;font-weight:800;color:#1b1f3b}
.wip-modal-sub{padding:.3rem .25rem .6rem;color:#4b4f66;opacity:.85}
.wip-modal-pills{display:flex;gap:.4rem;flex-wrap:wrap;align-items:center}
.wip-modal .pill{background:rgba(122,131,255,.16);color:#353b7a;border:none;padding:.35rem .65rem;border-radius:12px;font-weight:700;font-size:.82rem;box-shadow:0 6px 12px rgba(35,48,120,.15)}
.wip-modal .pill.tone-primary{background:rgba(73,204,242,.16);color:#0f4d6b}
.wip-modal .swal2-close{top:12px;right:12px;background:rgba(255,255,255,.85);border-radius:50%;width:32px;height:32px;color:#6a6f89;box-shadow:0 6px 14px rgba(20,24,50,.18)}

.pipe{display:none!important}
.stage{background:#f4f6ff;border:1px dashed #b8c0ff;border-radius:1rem;padding:.6rem;box-shadow:inset 0 0 0 1px rgba(255,255,255,.4)}
.stage.done{border-style:solid;border-color:#6abf97;background:rgba(106,191,151,.18)}
.stage.active{border-style:solid;border-color:#7a83ff;background:rgba(122,131,255,.18)}

.notes{display:flex;flex-direction:column;gap:.5rem}
.note{background:#f4f6ff;border:1px solid var(--border);border-radius:.6rem;padding:.5rem}
.files{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:.5rem;margin-top:.75rem}
.file{background:#f4f6ff;border:1px solid var(--border);border-radius:.6rem;padding:.5rem;display:flex;justify-content:space-between;align-items:center}

.inline-alert{
  margin-top:.5rem;
  padding:.7rem .9rem;
  background:#fff4f4;
  border:1px solid #f6c1c1;
  color:#9b1b1b;
  border-radius:.75rem;
  font-weight:700;
  display:flex;
  align-items:center;
  gap:.5rem;
  box-shadow:0 10px 20px rgba(244,92,67,.08);
}
.inline-alert::before{
  content:"!";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  border-radius:50%;
  background:#f45c43;
  color:#fff;
  font-size:.8rem;
  box-shadow:0 6px 12px rgba(244,92,67,.22);
}

.history{list-style:none;padding-left:1rem}
.history li{margin:.35rem 0;position:relative}
.history li::before{content:'';position:absolute;left:-.85rem;top:.5rem;width:6px;height:6px;border-radius:50%;background:#7ea2ff}

.modal{position:fixed;inset:0;background:rgba(8,10,25,.45);display:grid;place-items:center;padding:1rem;z-index:50}
.modal-card{max-height:90vh;max-width:1000px;width:min(1000px,95vw);display:flex;flex-direction:column;border-radius:18px;overflow:hidden;box-shadow:0 30px 60px rgba(6,10,30,.45)}
.sticky-actions{position:sticky;bottom:0;background:rgba(248,249,255,.9);backdrop-filter:blur(6px);padding:.5rem;border-top:1px solid var(--border);border-radius:0 0 1rem 1rem}

.queues{border-top:1px solid var(--border); margin:.5rem 0; padding:.5rem 0}
.queues-head{font-size:.68rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); padding:.35rem .85rem}
.queues-list{display:flex; flex-direction:column; gap:.26rem; padding:0 .55rem 1rem}
.queue-item{
  background:rgba(14,18,40,.65);
  border:1px solid rgba(255,255,255,.12);
  color:#f5f7ff;
  text-align:left;
  padding:.4rem .65rem;
  border-radius:.55rem;
  cursor:pointer;
  font-weight:600;
  letter-spacing:.005em;
  font-size:11px;
  display:flex;
  align-items:center;
  gap:.38rem;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03),0 12px 25px rgba(3,6,18,.45);
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease,background .15s ease;
}
.quick-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:.5rem;
  margin-top:auto;
  padding:.75rem .9rem 1rem;
  border-top:1px solid rgba(255,255,255,.08);
  position:sticky;
  bottom:0;
  z-index:2;
  background:var(--elev);
  box-shadow:0 -6px 18px rgba(0,0,0,.18);
}
.quick-actions .nav-item{width:100%;margin:0}
.nav-item-ghost{
  background:transparent;
  border:none;
  box-shadow:none;
  color:#8bd3ff;
  justify-content:flex-start;
  padding:.35rem 0;
  border-radius:0;
  position:relative;
  overflow:hidden;
  font-weight:800;
  letter-spacing:.01em;
  transition:color .15s ease,transform .15s ease;
}
.nav-item-ghost .nav-icon{display:none}
.nav-item-ghost::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-2px;
  width:0;
  height:3px;
  background:linear-gradient(90deg,#7f9dff,#3fd8ff);
  transition:width .18s ease;
}
.nav-item-ghost:hover{color:#fff;transform:translateX(2px) scale(1.02)}
.nav-item-ghost:hover::after{width:100%}
.theme-dark .table,
.theme-dark .orders-table{
  background:#0b0f1d;
  color:var(--text);
}
.theme-dark .table .thead>div,
.theme-dark .orders-table .thead>div{
  background:rgba(255,255,255,.06);
  color:var(--text);
}
.theme-dark .orders-table .thead>div{
  background:rgba(255,255,255,.05);
  color:var(--text);
}
.theme-dark .orders-table .tbody>div{
  background:rgba(255,255,255,.02);
  color:var(--text);
}
.theme-dark .orders-table .tbody>div .badge{color:var(--text);background:rgba(255,255,255,.08)}
.theme-dark .orders-table .tbody>div:nth-child(odd){
  background:rgba(255,255,255,.04);
}
.theme-dark .orders-table .tbody .order-link{color:var(--text)}
.theme-dark .table .tbody>div,
.theme-dark .table tr{color:var(--text)}
.theme-dark .pill,
.theme-dark .dash-tabs button,
.theme-dark .tabs-line .tab{
  color:var(--text);
  background:rgba(255,255,255,.08);
}
.theme-dark .tabs-line .tab.active{background:linear-gradient(120deg,#6e7aff,#3fd8ff);color:#051021}
.theme-dark .btn{color:#0f132d}
.theme-dark .btn.text{color:var(--text)}
.theme-dark .btn.primary,
.theme-dark .btn.warn{color:#fff}
.queue-icon{
  display:none;
}
.queue-label{white-space:normal;overflow:hidden;text-overflow:clip;line-height:1.2;font-size:11px}
.queue-item:hover{
  background:rgba(20,26,58,.85);
  border-color:rgba(124,139,255,.45);
  transform:translateY(-1px);
}
.queue-item.active{
  background:linear-gradient(120deg,#8a6bff,#4dddfc);
  color:#071229;
  border-color:transparent;
  box-shadow:0 16px 32px rgba(77,221,252,.4), inset 0 1px 0 rgba(255,255,255,.6);
}

.bulk-modal{padding:1.4rem 1.6rem 1.6rem;background:linear-gradient(135deg,#f9fbff 0%,#eef3ff 100%);border:1px solid rgba(90,110,180,.18)}
.bulk-modal .card-head{margin-bottom:.75rem}
.bulk-modal .card-head h2{margin:0;font-size:1.25rem;color:#1c2340}
.drop{
  margin-top:.2rem;
  border:2px dashed rgba(84,102,180,.35);
  background:rgba(255,255,255,.85);
  padding:1.2rem;
  border-radius:14px;
  text-align:center;
  color:#48506c;
  font-weight:700;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 16px 30px rgba(18,20,54,.12);
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.drop:hover{
  transform:translateY(-1px);
  border-color:rgba(86,214,255,.6);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 18px 36px rgba(18,20,54,.16);
  background:linear-gradient(135deg,rgba(124,232,255,.12),rgba(255,255,255,.95));
}
.bulk-modal .bulk-actions{display:flex;gap:.5rem;margin-top:.75rem}
.bulk-modal .bulk-actions .btn.text{color:#42506a}
.bulk-modal .muted{margin-top:.45rem}

.sweet-overlay{
  position:fixed;
  inset:0;
  background:rgba(4,6,18,.65);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:999;
  padding:1rem;
}
.sweet-card{
  background:#ffffff;
  color:#0b1433;
  border-radius:1rem;
  padding:1.5rem;
  width:min(360px,90vw);
  box-shadow:0 30px 80px rgba(8,12,34,.25);
  text-align:center;
}
.sweet-card h3{margin:.2rem 0 .5rem;font-size:1.25rem}
.sweet-card p{margin:0 0 1rem;color:#4b5274}
.sweet-actions{display:flex;justify-content:center;gap:.5rem}
.sweet-card.wide{width:min(600px,95vw)}
.stage-modal-form{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.6rem;
  margin:1rem 0;
}
.stage-modal-form textarea{grid-column:1/-1;border-radius:.8rem;border:1px solid rgba(17,23,64,.12);padding:.65rem}
.icon-btn{
  background:transparent;
  border:none;
  color:#b23a3a;
  font-size:1.1rem;
  cursor:pointer;
}
.icon-btn:hover{color:#f45c43}

/* Error overlay */
.err{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.8);color:#fff;z-index:1000;font-weight:700;font-size:16px;padding:1rem;text-align:center;white-space:pre-wrap}

/* Legacy mobile fallback */
@media (max-width: 960px){
  .grid-3{grid-template-columns:1fr}
  .grid-2{grid-template-columns:1fr}
  .thead,.tbody>div{grid-template-columns:1fr 1fr}
}
.stage-modal-form input{
  border-radius:.8rem;
  border:1px solid rgba(17,23,64,.12);
  padding:.65rem .85rem;
  background:#f6f7ff;
}
.orders-table{font-size:.7rem; border-radius:12px; background:#ffffff; box-shadow:0 6px 18px rgba(15,18,52,.08);border:1px solid var(--border);}
.orders-table .thead,
.orders-table .tbody>div{
  display:grid;
  grid-template-columns:70px 200px 230px 125px 80px 105px 145px 135px 125px 125px 140px 140px;
  gap:.35rem;
  align-items:center;
}
.orders-table.assignable .thead,
.orders-table.assignable .tbody>div{
  grid-template-columns:70px 200px 230px 125px 80px 105px 145px 135px 125px 125px 140px 140px;
}
.orders-table:not(.assignable) .thead,
.orders-table:not(.assignable) .tbody>div{
  grid-template-columns:200px 230px 125px 80px 105px 145px 135px 125px 125px 140px 140px;
}
body.role-user .orders-table .thead,
body.role-user .orders-table .tbody>div{
  grid-template-columns:90px 200px 235px 125px 80px 105px 145px 135px 125px 125px 140px 140px;
}
body.role-user .orders-table:not(.assignable) .thead,
body.role-user .orders-table:not(.assignable) .tbody>div{
  grid-template-columns:200px 235px 125px 80px 105px 145px 135px 125px 125px 140px 140px;
}
.orders-table .thead div,
.orders-table .tbody>div div{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  padding:.18rem .14rem;
  text-align:left;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}
.orders-table .order-link{
  overflow:visible;
  gap:.25rem;
}
.priority-cell{display:flex;align-items:center;gap:.35rem;font-weight:600;color:#1f2555}
.priority-cell input{width:16px;height:16px;accent-color:var(--pri);}
.priority-icon{
  color:#f5a524;
  margin-left:.2rem;
  font-size:1rem;
  vertical-align:middle;
  display:inline-block;
  flex-shrink:0;
  line-height:1;
}
.priority-toggle{display:inline-flex;align-items:center;gap:.4rem;font-weight:600;color:#1f2555}
.priority-toggle input{width:16px;height:16px;accent-color:var(--pri);}
.orders-table .thead .sortable{
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:.2rem;
  font-weight:700;
  letter-spacing:.02em;
  min-width:0;
  padding:.40rem .20rem;
  border-radius:.30rem;
  transition:background .12s ease, color .12s ease;
  flex:0 0 auto;
}
.orders-table .thead .sortable.compact{
  gap:.08rem;
  padding:.2rem .12rem;
  font-size:.76rem;
}
.orders-table .thead .sort-indicator{
  font-size:.7rem;
  opacity:.55;
  flex-shrink:0;
}
.orders-table .thead .sortable span:first-child{
  flex:0 1 auto;
  white-space:nowrap;
}
.orders-table .thead .sortable:hover{
  background:rgba(124,139,255,.12);
}
.orders-table .thead .sortable.active-sort .sort-indicator{
  opacity:1;
}
.orders-table .thead{
  background:#f5f6fb;
  border-radius:10px 10px 0 0;
  box-shadow:inset 0 -1px 0 rgba(17,23,64,.08);
  padding:.4rem .3rem;
  position:sticky;
  top:var(--orders-head-offset, 120px);
  z-index:9;
}
.orders-table .thead div{
  font-weight:700;
  letter-spacing:.05em;
  color:#4b4f72;
  text-transform:uppercase;
  font-size:.74rem;
}
/* Treat last three columns like the rest */
.orders-table .thead div:nth-last-child(-n+3){
  background:transparent;
  border-radius:0;
  padding:.18rem .14rem;
  box-shadow:none;
  text-align:left;
  justify-content:flex-start;
}
.orders-table .tbody>div{
  border-radius:0;
  transition:none;
  position:relative;
  min-height:48px;
  background:#fff;
  border-bottom:1px solid rgba(17,23,64,.08);
  box-shadow:none;
  margin:0;
}
.orders-table .tbody>div div:nth-last-child(-n+3){
  background:transparent!important;
  border-radius:0!important;
  padding:.18rem .14rem!important;
  box-shadow:none!important;
  font-weight:600;
  text-align:left;
  justify-content:flex-start;
}
.orders-table .tbody>div.selected{
  background:#f0f2fa;
  box-shadow:none;
}
.orders-table .tbody>div::before{display:none;}
.orders-table .tbody>div:hover{
  background:#f7f8fd;
  box-shadow:none;
}
.orders-table .tbody>div:hover > div{
  background:transparent;
  border-radius:0;
}
.orders-table .tbody>div>div{
  position:relative;
  z-index:1;
}
.orders-table .tbody>div div:nth-last-child(-n+3){
  background:rgba(95,107,255,.08);
  border-radius:.65rem;
  padding:.32rem .55rem;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18);
  text-align:center;
  justify-content:center;
  font-weight:600;
  color:#1f2555;
}

.orders-table:not(.assignable) .col-select{display:none}
.orders-table.assignable .col-select{display:flex;align-items:center;justify-content:center}
.orders-table .col-select input{width:16px;height:16px}
.orders-head{flex-direction:column;align-items:flex-start;gap:.75rem}
.orders-controls{width:100%;display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}
.orders-controls .search input{min-width:240px}
.assign-bar{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:0}
.assign-bar select{border-radius:.9rem;border:1px solid rgba(79,109,240,.25);padding:.55rem .85rem;background:rgba(255,255,255,.85);min-width:160px;font-weight:500;color:#1c1f3f}
.assign-bar button{border-radius:.9rem}
.orders-filter-bar{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:0}
.orders-filter-bar select{border-radius:.9rem;border:1px solid rgba(79,109,240,.25);padding:.55rem .85rem;background:rgba(255,255,255,.85);min-width:170px;font-weight:600;color:#1c1f3f}
.orders-head.sticky-head{position:static;top:auto;z-index:1;background:inherit;padding-top:0;border-bottom:none}
.orders-table .thead.sticky-header{position:static;top:auto;z-index:1}
#status-tabs.tab-pills .tab{background:rgba(255,255,255,.7);border:1px solid rgba(79,109,240,.12);box-shadow:0 8px 18px rgba(12,18,54,.1);border-radius:12px;min-width:105px;text-align:center}
#status-tabs.tab-pills .tab.active{background:linear-gradient(120deg,#dfe3ff,#eef4ff);border-color:rgba(124,139,255,.4);color:#1c1f3f}
#assign-btn:disabled{opacity:.45;cursor:not-allowed}
#toggle-mywork{background:rgba(255,255,255,.4);color:#4b4f72}
#toggle-mywork.active{color:#04122a}
#assign-btn{
  background:#ffffff;
  color:#0f1230;
  border:1px solid rgba(17,23,64,.12);
  box-shadow:0 6px 12px rgba(15,18,52,.08);
}
#assign-btn:hover{transform:translateY(-1px);box-shadow:0 10px 18px rgba(15,18,52,.12)}
.pill-assignee{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:0;
  border-radius:0;
  background:transparent;
  color:inherit;
  font-weight:600;
  box-shadow:none;
}
.pill-assignee::before{
  content:'';
  display:none;
}
.pill-assignee.unassigned{background:transparent;color:inherit;box-shadow:none}
.pill-assignee.unassigned::before{display:none}
.status-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.28rem .6rem;
  border-radius:.75rem;
  font-weight:700;
  font-size:.75rem;
  letter-spacing:.01em;
  background:rgba(17,23,64,.06);
  color:#1a1f37;
}
.status-chip.status-completed{background:rgba(76,201,154,.18);color:#0f4d39}
.status-chip.status-work-in-progress{background:rgba(122,91,255,.16);color:#3a2f80}
.status-chip.status-pending{background:rgba(255,195,113,.2);color:#8a5316}
.status-chip.status-cancelled{background:rgba(239,83,80,.15);color:#832121}
.status-chip.status-on-hold{background:rgba(255,170,0,.16);color:#7a4600}

.notes-panel .actions{display:flex;gap:.6rem;margin-bottom:1rem}
.notes-panel input,
.notes-panel textarea{
  flex:1;
  padding:.65rem .75rem;
  border-radius:.9rem;
  border:1px solid rgba(79,109,240,.25);
  min-height:44px;
  resize:vertical;
}
.notes-panel button{border:none;border-radius:.9rem;padding:.55rem 1.2rem;background:rgba(79,109,240,.16);color:#1f2555;font-weight:600;cursor:pointer}
.note-item{border-radius:1.1rem;border:1px solid rgba(79,109,240,.12);padding:1rem;margin-bottom:.9rem;background:rgba(255,255,255,.94)}
.note-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.35rem}
.note-meta{font-size:.72rem;color:rgba(31,37,85,.65);letter-spacing:.08em;text-transform:uppercase}
.note-delete{border:none;background:transparent;font-size:1.2rem;color:rgba(239,83,80,.8);cursor:pointer}
.note-text{white-space:pre-line;}

.att-header{display:flex;justify-content:flex-end;margin-bottom:.75rem}
.att-header .att-actions{display:flex;gap:10px;align-items:center}
.att-header #att-selection-info{font-weight:600;color:#1f2555;font-size:.82rem}
.att-sort-wrap{padding:4px 2px}
.att-sort-list{list-style:none;margin:0;padding:0;max-height:320px;overflow:auto}
.att-sort-item{display:flex;align-items:center;gap:10px;padding:10px 12px;margin-bottom:8px;border:1px solid rgba(79,109,240,.2);border-radius:10px;background:rgba(255,255,255,.9);cursor:grab;box-shadow:0 8px 18px rgba(15,32,80,.08)}
.att-sort-item.dragging{opacity:.7}
.att-sort-name{flex:1;font-weight:600;color:#1f2555}
.att-move{border:none;background:rgba(79,109,240,.12);color:#4f6df0;font-weight:700;padding:8px 10px;border-radius:10px;cursor:pointer;line-height:1;min-width:32px;box-shadow:0 6px 16px rgba(79,109,240,.15)}
.att-move:hover{background:rgba(79,109,240,.2)}
.att-move-left{order:0}
.att-sort-name{order:1}
.att-move-right{order:2}
.att-sort-item{gap:12px}
.table-wrap{border:1px solid rgba(79,109,240,.12);border-radius:1.1rem;overflow:hidden}
.table-wrap table{width:100%;border-collapse:collapse}
.table-wrap th,.table-wrap td{padding:.55rem .6rem;border-bottom:1px solid rgba(79,109,240,.06);font-size:.85rem;text-align:left}
.table-wrap thead{background:rgba(79,109,240,.08)}
button.secondary{border-radius:999px;padding:.55rem 1.1rem;border:none;background:rgba(79,109,240,.15);color:#1f2555;font-weight:600;cursor:pointer}

.sw-attach-popup{border-radius:26px!important;padding:36px 44px!important;max-width:840px!important;width:90vw!important}
.sw-attach-popup .swal2-title{font-size:1.6rem;font-weight:700;color:#1f2555;margin-bottom:.3rem}
.sw-attach-popup .swal2-html-container{margin:0;padding:0;width:100%}

.settings-card{box-shadow:0 16px 32px rgba(18,22,66,.1);border-radius:18px}
.settings-form{margin-bottom:1rem}
.settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.75rem;align-items:end}
.settings-grid .field{display:flex;flex-direction:column;gap:.35rem}
.settings-grid label{font-weight:700;color:#1f2555;font-size:.9rem}
.settings-select,.settings-input{border-radius:.9rem;border:1px solid rgba(79,109,240,.25);padding:.6rem .75rem;background:rgba(255,255,255,.95)}
.settings-grid .field.actions{display:flex;align-items:center}
.settings-grid .field.actions .btn{height:40px;padding:0 16px}
.settings-table .thead div{font-weight:700;text-transform:uppercase;font-size:.78rem;color:#1f2555;letter-spacing:.05em}
.settings-table .tbody>div div:last-child{text-align:right}
.settings-table .btn.text.danger{color:#c0392b}

/* Users */
.users-card .user-form{display:grid;grid-template-columns:repeat(5, minmax(160px,1fr));grid-auto-rows:auto;gap:.75rem;margin-top:1rem;align-items:end}
.users-card .user-form .field{display:flex;flex-direction:column;gap:.35rem}
.users-card .user-form .field.full{grid-column:1/-1}
.users-card .user-form label{font-weight:700;color:#1f2555;font-size:.85rem}
.users-card input,.users-card select{border-radius:.9rem;border:1px solid rgba(79,109,240,.2);padding:.65rem .85rem;background:rgba(255,255,255,.92)}
.users-card .user-form .actions{display:flex;gap:.5rem;align-items:center}
.users-card .btn.accent{background:linear-gradient(135deg,#5d7bff,#8bb2ff);color:#fff}
.users-card .user-actions{margin-top:1rem;display:flex;justify-content:flex-start}
.users-card .users-actions{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center;justify-content:flex-end}
.users-card .users-actions .pill-input{min-width:260px;border-radius:999px;border:1px solid rgba(79,109,240,.25);padding:.55rem 1rem;background:rgba(255,255,255,.95);box-shadow:0 10px 24px rgba(20,43,111,.08)}
.users-card .users-actions .btn.primary{order:2;box-shadow:0 10px 24px rgba(79,109,240,.25)}
.users-card .users-actions .muted{order:3;margin-left:.35rem}
.users-card{box-shadow:0 18px 38px rgba(15,32,80,.08);border-radius:18px}
.user-popup .user-modal-form{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:12px;margin-top:8px;overflow:visible}
.user-popup .user-modal-form .field{display:flex;flex-direction:column;gap:6px;position:relative;overflow:visible}
.user-popup .user-modal-form input,.user-popup .user-modal-form select{border-radius:.75rem;border:1px solid rgba(79,109,240,.25);padding:.6rem .8rem}
.user-popup .team-dropdown{position:relative}
.user-popup .team-trigger{
  width:100%;
  text-align:left;
  border-radius:.9rem;
  border:1px solid rgba(79,109,240,.25);
  padding:.65rem .85rem;
  background:rgba(255,255,255,.94);
  font-weight:700;
  color:#1f2555;
  cursor:pointer;
}
.user-popup .team-menu{
  position:absolute;
  left:0; right:0;
  background:#fff;
  border:1px solid rgba(79,109,240,.2);
  border-radius:14px;
  box-shadow:0 12px 28px rgba(18,22,66,.12);
  padding:.5rem;
  margin-top:.35rem;
  max-height:320px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:.45rem;
  z-index:50;
}
.user-popup .team-menu.hidden{display:none}
.user-popup .team-menu .stage-option{
  display:flex;
  align-items:center;
  gap:.5rem;
  background:rgba(79,109,240,.08);
  padding:.55rem .75rem;
  border-radius:14px;
  border:1px solid rgba(79,109,240,.16);
  box-shadow:0 8px 18px rgba(18,22,66,.08);
}
.user-popup .team-menu .stage-option input{
  width:18px;
  height:18px;
}
.user-popup .team-menu .stage-option label{
  font-weight:700;
  color:#1f2555;
  line-height:1.25;
}
.client-popup .team-dropdown{position:relative}
.client-popup .team-trigger{
  width:100%;
  text-align:left;
  border-radius:.9rem;
  border:1px solid rgba(79,109,240,.25);
  padding:.65rem .85rem;
  background:rgba(255,255,255,.94);
  font-weight:700;
  color:#1f2555;
  cursor:pointer;
}
.client-popup .team-menu{
  position:absolute;
  left:0; right:0;
  background:#fff;
  border:1px solid rgba(79,109,240,.2);
  border-radius:14px;
  box-shadow:0 12px 28px rgba(18,22,66,.12);
  padding:.5rem;
  margin-top:.35rem;
  max-height:320px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:.45rem;
  z-index:50;
}
.client-popup .team-menu.hidden{display:none}
.client-popup .team-menu .stage-option{
  display:flex;
  align-items:center;
  gap:.5rem;
  background:rgba(79,109,240,.08);
  padding:.55rem .75rem;
  border-radius:14px;
  border:1px solid rgba(79,109,240,.16);
  box-shadow:0 8px 18px rgba(18,22,66,.08);
}
.client-popup .team-menu .stage-option input{
  width:18px;
  height:18px;
}
.client-popup .team-menu .stage-option label{
  font-weight:700;
  color:#1f2555;
  line-height:1.25;
}
.priority-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.28rem .85rem;
  border-radius:12px;
  font-weight:800;
  font-size:.72rem;
  letter-spacing:.04em;
  text-transform:uppercase;
  min-width:80px;
  box-shadow:0 8px 18px rgba(8,10,30,.35);
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, filter .18s ease;
  position:relative;
  overflow:hidden;
}
.priority-pill::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(120deg,rgba(255,255,255,.22),rgba(255,255,255,0));
  opacity:.7;
  transform:translateX(-110%);
  transition:transform .5s ease;
}
.priority-pill:hover{
  transform:translateY(-1px) scale(1.01);
  box-shadow:0 12px 26px rgba(6,8,20,.45);
  filter:saturate(1.08);
}
.priority-pill:hover::after{transform:translateX(110%);}
.priority-pill.priority-low{
  background:linear-gradient(135deg,#0c3b2b,#0f5f44);
  color:#d6ffe9;
  border:1px solid rgba(64,196,140,.5);
}
.priority-pill.priority-normal{
  background:linear-gradient(135deg,#0d1c44,#142c6a);
  color:#dbe5ff;
  border:1px solid rgba(96,132,255,.55);
}
.priority-pill.priority-high{
  background:linear-gradient(135deg,#4a2607,#7b3f0c);
  color:#ffe8c8;
  border:1px solid rgba(255,186,97,.6);
  animation:priorityPulseDark 1.8s infinite ease-in-out;
}
.priority-pill.priority-urgent{
  background:linear-gradient(135deg,#470b0b,#7f1212);
  color:#ffd8d4;
  border:1px solid rgba(255,118,118,.65);
  animation:priorityPulseDark 1.2s infinite ease-in-out;
}
@keyframes priorityPulseDark{
  0%{box-shadow:0 8px 18px rgba(8,10,30,.35),0 0 0 0 rgba(255,118,118,.25);}
  50%{box-shadow:0 12px 26px rgba(8,10,30,.45),0 0 0 10px rgba(255,118,118,.1);}
  100%{box-shadow:0 8px 18px rgba(8,10,30,.35),0 0 0 0 rgba(255,118,118,.0);}
}
.users-table .thead div:last-child{text-align:right}
.users-table .tbody>div div:last-child{text-align:right}
.users-table .btn.text.danger{color:#c0392b}
.users-table .thead,
.users-table .tbody>div{
  grid-template-columns:1.2fr 1.1fr 1.2fr .9fr 1fr 1.8fr .6fr;
  align-items:flex-start;
  gap:.75rem;
}
.users-table .tbody>div{
  padding:1rem .6rem;
}
.users-table .tbody>div div{
  word-break:break-word;
  line-height:1.35;
  color:#1b1f3a;
}
.users-table .tbody>div .muted{color:var(--muted)}
.stage-badges{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
}
.stage-chip{
  background:linear-gradient(135deg,#eef2ff,#f9fbff);
  color:#1d2455;
  padding:.35rem .55rem;
  border-radius:.7rem;
  font-size:.78rem;
  border:1px solid rgba(99,117,255,.2);
  box-shadow:0 6px 12px rgba(15,18,55,.08);
}
.sw-att-form{font-family:"Inter",system-ui,sans-serif;margin-top:8px;display:flex;flex-direction:column;gap:18px;width:100%}
.sw-att-form .sw-grid{display:grid;gap:16px;width:100%}
.sw-att-form .sw-grid.two{grid-template-columns:repeat(2, minmax(0,1fr))}
.sw-att-form .sw-grid.full{grid-template-columns:1fr}
.sw-att-form .sw-grid.two .sw-field:nth-child(odd){padding-right:8px}
.sw-att-form .sw-grid.two .sw-field:nth-child(even){padding-left:8px}
.sw-att-form .sw-grid.two .sw-field.sw-full{grid-column:1/-1;padding:0}
.sw-field{display:flex;flex-direction:column;gap:6px}
.sw-label{font-size:.78rem;font-weight:600;color:#1f2555;text-transform:uppercase;letter-spacing:.08em}
.sw-required{color:#e84c3d;margin-left:4px}
.sw-input{padding:.7rem .9rem;border-radius:.9rem;border:1px solid rgba(95,108,255,.25);font-size:.92rem;width:100%;box-sizing:border-box;background:rgba(255,255,255,.92);transition:border-color .2s,box-shadow .2s}
.sw-input:focus{outline:none;border-color:rgba(79,109,240,.65);box-shadow:0 0 0 3px rgba(79,109,240,.18)}
.sw-field.hidden{display:none!important}
.sw-hint{font-size:.75rem;color:rgba(31,37,85,.55)}
.sw-file .sw-input{border-style:dashed;background:#fafaff}
.sw-field .choices{font-size:.92rem;width:100%}
.sw-field .choices__inner{border-radius:.9rem;border:1px solid rgba(95,108,255,.25);min-height:50px;padding:.4rem .65rem;background:rgba(255,255,255,.95);display:flex;align-items:center}
.sw-field .choices.is-focused .choices__inner{border-color:rgba(79,109,240,.65);box-shadow:0 0 0 3px rgba(79,109,240,.18)}
.sw-field .choices__list--dropdown{border-radius:.9rem;border:1px solid rgba(79,109,240,.2);box-shadow:0 20px 40px rgba(15,32,80,.12);max-height:360px;width:100%;overflow:auto}
.sw-field .choices__item--choice{font-size:.9rem;white-space:normal;line-height:1.35}
.sw-field .choices__list--dropdown .choices__item{padding:.55rem .75rem}
.sw-field .choices__input{background:transparent}
.sw-field .choices__list--dropdown .choices__item--selectable.is-highlighted{background:rgba(79,109,240,.12);color:#1f2555}
.sw-field .choices__list--dropdown .choices__item{display:flex;align-items:center;justify-content:flex-start;text-align:left}

.prop-section{margin-bottom:1.5rem;border-radius:1.3rem;padding:1.3rem;border:1px solid rgba(79,109,240,.12);background:rgba(255,255,255,.92);box-shadow:0 18px 38px rgba(15,32,80,.08)}
.prop-section h3{margin:0 0 .75rem;color:#1f2555}
.prop-inline-actions{display:flex;align-items:center;gap:10px;margin-top:6px}
.prop-inline-actions .prop-add{min-width:110px;border-radius:12px;padding:.6rem 1.2rem;font-weight:700;box-shadow:0 10px 22px rgba(79,109,240,.2)}
.grid.two,.grid.four,.grid.three{display:grid;gap:14px}
.grid.two{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.grid.three{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.grid.four{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.grid.two label,.grid.three label,.grid.four label{display:flex;flex-direction:column;gap:4px;font-size:.85rem;color:#1f2555}
.grid.two input,.grid.three input,.grid.four input,.grid.two textarea,.grid.three textarea,.grid.four textarea,.grid.two select,.grid.three select,.grid.four select{border-radius:.85rem;border:1px solid rgba(79,109,240,.2);padding:.55rem .7rem;background:rgba(255,255,255,.95)}
.grid .span-12{grid-column:1/-1}
.prop-actions{display:flex;gap:.75rem;flex-wrap:wrap;justify-content:flex-end;margin-top:1rem}
.prop-actions button{border-radius:999px;border:none;padding:.6rem 1.2rem;font-weight:600;background:rgba(79,109,240,.15);color:#1f2555}
.prop-preview{border:1px solid rgba(79,109,240,.25);border-radius:1.1rem;padding:1.2rem;min-height:120px;background:rgba(255,255,255,.95)}
.prop-label-text{font-size:.78rem;font-weight:600;color:#1f2555;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.2rem;display:inline-flex;align-items:center;gap:.2rem}
.prop-label-text.required::after{content:'*';color:#d93025;font-weight:700;font-size:.9rem}
.prop-pill-input{border:1px solid #2f3640;border-radius:14px;padding:.75rem 1rem;font-size:.95rem;min-height:44px;box-shadow:0 2px 6px rgba(0,0,0,.06) inset,0 1px 2px rgba(0,0,0,.08);background:#fff;width:100%;resize:vertical;line-height:1.4}
.prop-pill-input:focus{outline:none;box-shadow:0 0 0 3px rgba(79,109,240,.22),0 2px 6px rgba(0,0,0,.06) inset}
.prop-cancel{margin-left:.45rem}
.prop-preview .preview-block{margin-bottom:1.4rem}
.prop-preview .preview-block:last-child{margin-bottom:0}
.prop-preview h4{margin:0 0 .65rem;color:#1f2555;font-size:1rem;text-transform:uppercase;letter-spacing:.05em}
.prop-preview .preview-table{width:100%;border-collapse:collapse;font-size:.88rem;box-shadow:0 4px 18px rgba(14,24,79,.08);border-radius:.8rem;overflow:hidden}
.prop-preview .preview-table thead{background:rgba(79,109,240,.12)}
.prop-preview .preview-table th,
.prop-preview .preview-table td{border:1px solid rgba(79,109,240,.25);padding:.55rem .65rem;text-align:left;background:#fff}
.prop-preview .preview-table thead th{text-align:center;font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;background:rgba(79,109,240,.18)}
.prop-preview .kv-table th{background:rgba(79,109,240,.08);width:35%;font-weight:600}
.prop-preview .kv-table td span{color:#1f2555}
.prop-section table tbody tr{cursor:pointer;transition:background .2s}
.prop-section table tbody tr.active-row td{background:rgba(79,109,240,.15)}
body.role-user .prop-section table thead th:last-child{width:32px}
body.role-user .prop-section table tbody td:last-child{
  pointer-events:none;
  text-align:center;
}
body.role-user .prop-section table tbody td:last-child::before{
  content:'—';
  color:#7a7f99;
}
body.role-user .prop-section table tbody td:last-child button{
  display:none;
}
.preview-textbox{border:1px solid rgba(79,109,240,.25);border-radius:.8rem;padding:.75rem;background:#fff;min-height:80px;box-shadow:0 6px 18px rgba(15,32,80,.07)}
.prop-preview .muted{color:rgba(31,37,85,.65)}

.prop-certificate-frame{
  width:100%;
  border:0;
  min-height:1200px;
}

.tax-cert{display:flex;flex-direction:column;gap:20px}
.tax-cert-card{border-radius:1.75rem;padding:24px;background:linear-gradient(160deg,rgba(255,255,255,.98) 0%,rgba(223,233,255,.75) 100%);border:1px solid rgba(79,109,240,.18);box-shadow:0 24px 48px rgba(20,43,111,.08)}
.tax-cert-card h2,.tax-cert-card h3{margin:12px 0 10px;color:#1f2555}
.tax-cert-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.tax-cert-grid label{display:flex;flex-direction:column;gap:6px;font-size:.75rem;font-weight:600;text-transform:uppercase;color:rgba(31,51,110,.85)}
.tax-cert-grid input,.tax-cert-grid textarea,.tax-cert-grid select{border-radius:.85rem;border:1px solid rgba(126,146,200,.35);padding:.65rem;background:rgba(255,255,255,.9);font-size:.9rem;color:#1f2555}
.tax-cert-grid textarea{min-height:80px;resize:vertical}
.tax-cert-chips{display:flex;flex-wrap:wrap;gap:10px}
.tax-cert-chip{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:999px;background:rgba(79,109,240,.12);color:#1f2555;font-size:.85rem;font-weight:600}
.tax-cert-table{border-radius:20px;border:1px solid rgba(79,109,240,.16);overflow:hidden;margin:14px 0}
.tax-cert-table table{width:100%;border-collapse:collapse}
.tax-cert-table th,.tax-cert-table td{border-bottom:1px solid rgba(79,109,240,.08);padding:10px 12px;text-align:left;font-size:.82rem}
.tax-cert-table thead{background:rgba(79,109,240,.08);font-weight:600;text-transform:uppercase;font-size:.72rem;color:#1f2555}
.tax-cert-table tbody tr:last-child td{border-bottom:none}
.tax-cert-table input,.tax-cert-table textarea,.tax-cert-table select{width:100%;border-radius:.75rem;border:1px solid rgba(79,109,240,.25);padding:.5rem;background:rgba(255,255,255,.96);font-size:.82rem;color:#1f2555}
.tax-cert-table input[type=date]{min-height:36px}
.tax-cert-table button.btn-xs{border-radius:999px;border:none;background:rgba(244,79,105,.12);color:#c73650;padding:.35rem .9rem;font-weight:600;cursor:pointer}
.tax-cert-table table.required-missing,.tax-cert-table.required-missing{box-shadow:0 0 0 2px rgba(244,79,105,.45) inset}
.tax-cert-inline-actions{display:flex;justify-content:flex-end;gap:10px;margin:10px 0}
.tax-authority-actions{align-items:center}
.tax-authority-actions .btn-cta{background:linear-gradient(120deg,#4f6df0,#65c4ff);color:#fff;border:none;border-radius:12px;padding:.65rem 1.4rem;font-weight:700;box-shadow:0 12px 24px rgba(79,109,240,.28);cursor:pointer;transition:transform .12s ease,box-shadow .12s ease}
.tax-authority-actions .btn-cta:hover{transform:translateY(-1px);box-shadow:0 16px 30px rgba(79,109,240,.32)}
.tax-authority-actions .btn-ghost{border-radius:12px;border:1px solid rgba(79,109,240,.35);padding:.6rem 1.2rem;background:rgba(255,255,255,.9);color:#1f2555;font-weight:700;cursor:pointer;transition:background .12s ease,border-color .12s ease}
.tax-authority-actions .btn-ghost:hover{background:rgba(79,109,240,.08);border-color:rgba(79,109,240,.6)}
.tax-cert-table tr.editing td{background:rgba(79,109,240,.12)}
.tax-cert-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-end;margin-top:18px}
.tax-cert-actions button{border-radius:999px;border:none;padding:.6rem 1.2rem;font-weight:600;cursor:pointer;background:rgba(79,109,240,.18);color:#1f2555}
.tax-cert-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin:10px 0 20px}
.tax-total-card{display:flex;flex-direction:column;gap:6px;font-size:.75rem;text-transform:uppercase;color:rgba(31,51,110,.85);padding:0;border-radius:0;box-shadow:none;border:none}
.tax-total-card span{font-weight:600;letter-spacing:.08em}
.tax-total-card input{border-radius:.85rem;border:1px solid rgba(126,146,200,.35);padding:.65rem;background:rgba(255,255,255,.9);font-size:.9rem;color:#1f2555;font-weight:600;box-shadow:none}
.tax-total-card.due,.tax-total-card.paid,.tax-total-card.balance{background:none;color:inherit}
.tax-cert-preview{border:1px solid rgba(79,109,240,.25);border-radius:1.1rem;padding:1.25rem;min-height:140px;background:rgba(255,255,255,.95);box-shadow:0 18px 48px rgba(21,29,90,.08)}
.tax-cert-preview .taxcert-preview-doc{display:flex;flex-direction:column;gap:1.5rem}
.taxcert-preview-doc section{display:flex;flex-direction:column}
.taxcert-preview-doc h4{margin:0 0 .7rem;color:#1f2555;font-size:1rem;text-transform:uppercase;letter-spacing:.05em}
.taxcert-preview-doc table{width:100%;border-collapse:collapse;font-size:.88rem;border-radius:.9rem;overflow:hidden;box-shadow:0 6px 20px rgba(14,24,79,.08)}
.taxcert-preview-doc th,.taxcert-preview-doc td{border:1px solid rgba(79,109,240,.25);padding:.55rem .65rem;text-align:left;background:#fff}
.taxcert-preview-doc thead th{background:rgba(79,109,240,.16);font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;text-align:center}
.taxcert-preview-doc p{margin:0;color:#4b4f73;font-size:.86rem;border:1px solid rgba(79,109,240,.25);border-radius:.85rem;padding:.65rem;background:#fff;min-height:60px}
.taxcert-preview-doc .muted{color:rgba(31,37,85,.65)}
.taxcert-internal-notes{background:rgba(79,109,240,.06);padding:18px;border-radius:1.25rem;border:1px solid rgba(79,109,240,.15)}
.tax-cert-card label.required-missing{position:relative}
.tax-cert-card label.required-missing::after{content:'* Required';color:#d62839;font-size:.68rem;font-weight:700;letter-spacing:.04em;margin-top:2px}
.tax-cert-table td.required-missing{position:relative}
.tax-cert-table td.required-missing input,.tax-cert-table td.required-missing textarea{border-color:#d62839;background:rgba(214,40,57,.08)}
.tax-cert-table td.required-missing::after{content:'*';color:#d62839;font-weight:700;position:absolute;top:6px;right:12px}
.tax-cert-table textarea{min-height:36px};
#tab-prop .tax-cert-card{background:#fff;border:1px solid rgba(79,109,240,.12);box-shadow:none}
#tab-prop .tax-cert-grid,#tab-prop .tax-summary-table-wrap,#tab-prop .tax-summary-totals{background:#fff}
#tab-prop .tax-summary-totals .tax-total-card{background:#fff;border:1px solid rgba(79,109,240,.12)}
.tax-summary-followup{display:grid;grid-template-columns:1fr;gap:10px;margin-top:12px}
.tax-summary-followup label{display:flex;flex-direction:column;gap:4px;font-size:.85rem;color:#1f2555}
.tax-summary-followup textarea{border-radius:.85rem;border:1px solid rgba(79,109,240,.2);padding:.55rem .7rem;background:#fff}
.taxcert-preview-hidden{opacity:.9;}
.tax-summary-sections{display:flex;flex-direction:column;gap:16px;margin-top:10px}
.tax-summary-section{border:1px solid rgba(79,109,240,.16);border-radius:16px;padding:12px 14px;background:rgba(255,255,255,.95);box-shadow:0 10px 24px rgba(15,32,80,.08)}
.tax-summary-section h4{margin:0 0 10px;color:#1f2555;font-size:1rem}
.tax-summary-section .tax-summary-table{width:100%;border-collapse:separate;border-spacing:10px 12px}
.tax-summary-section .tax-summary-table th{font-size:.82rem;text-transform:uppercase;color:#1f2555;font-weight:700;text-align:left;opacity:.9}
.tax-summary-section .tax-summary-table td{padding:0;vertical-align:middle}
.tax-summary-section .tax-summary-table input,
.tax-summary-section .tax-summary-table textarea{width:100%;border:1px solid rgba(79,109,240,.25);border-radius:10px;padding:.55rem .65rem;background:#fff;box-shadow:0 5px 12px rgba(14,24,79,.06)}
.tax-summary-section .tax-summary-table textarea{min-height:38px}
.tax-summary-section .tax-cert-inline-actions{justify-content:flex-end;padding:0;margin-top:6px}
.tax-summary-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:8px 0}
.tax-summary-totals .tax-total-card{background:rgba(79,109,240,.06);border-radius:12px;padding:10px 12px;border:1px solid rgba(79,109,240,.15);box-shadow:none;display:flex;flex-direction:column;gap:6px}
.tax-summary-totals .tax-total-card span{font-size:.75rem;letter-spacing:.05em;color:#1f2555;text-transform:uppercase}
.tax-summary-totals .tax-total-card input{border:1px solid rgba(79,109,240,.25);border-radius:10px;padding:.55rem .65rem;background:#fff;font-weight:700;color:#1f2555;text-align:left}
.co-report{display:block;width:100%}
.co-card{width:100%;background:rgba(255,255,255,.98);border-radius:24px;border:1px solid rgba(18,23,72,.08);box-shadow:0 26px 60px rgba(15,22,63,.12);padding:28px}
.co-header h2{margin:0;font-size:1.8rem;font-weight:700;color:#1d1f47}
.co-header p{margin:.2rem 0 0;color:var(--muted)}
.co-section{margin-top:26px}
.co-section h3{margin:0 0 .9rem;color:#1f2555;text-transform:uppercase;font-size:.9rem;letter-spacing:.08em}
.co-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:14px}
.co-grid label{display:flex;flex-direction:column;font-size:.74rem;font-weight:600;text-transform:uppercase;color:rgba(25,30,68,.78);letter-spacing:.04em}
.co-grid input,.co-grid textarea{border-radius:14px;border:1px solid rgba(32,45,99,.15);padding:.65rem .85rem;background:rgba(255,255,255,.96);font-size:.92rem;color:#1f2341;box-shadow:0 12px 26px rgba(16,28,62,.08);transition:border-color .2s ease,box-shadow .2s ease}
.co-grid input:focus,.co-grid textarea:focus{outline:none;border-color:rgba(84,106,255,.6);box-shadow:0 16px 32px rgba(70,92,210,.18)}
.co-grid textarea{min-height:84px;resize:vertical}
.co-col-3{grid-column:span 3}
.co-col-4{grid-column:span 4}
.co-col-6{grid-column:span 6}
.co-col-12{grid-column:span 12}
.co-chips{display:flex;flex-wrap:wrap;gap:12px}
.co-chip{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:999px;border:1px solid rgba(31,51,110,.2);background:rgba(250,250,255,.8);font-size:.82rem;font-weight:600;color:#1f2555;box-shadow:0 8px 18px rgba(12,16,42,.08)}
.co-chip input{margin:0}
.co-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:28px;justify-content:flex-end}
.co-actions button{border-radius:12px;border:1px solid rgba(31,37,85,.14);padding:.75rem 1.4rem;font-weight:600;cursor:pointer;background:linear-gradient(130deg,#5562ff,#5de0ff);color:#fff;box-shadow:0 18px 35px rgba(85,98,255,.35)}
.co-actions button.secondary{background:#fff;color:#1d1f47;box-shadow:0 12px 25px rgba(20,26,60,.12)}
.co-preview{margin-top:24px;border-radius:18px;border:1px solid rgba(27,35,89,.15);background:#fff;box-shadow:0 18px 40px rgba(12,20,55,.08);padding:20px;min-height:140px}
.co-preview-block{margin-bottom:22px}
.co-preview-block:last-child{margin-bottom:0}
.co-preview-block h4{margin:0 0 10px;font-size:.95rem;text-transform:uppercase;letter-spacing:.08em;color:#19203f}
.co-preview-table{width:100%;border-collapse:collapse;font-size:.9rem}
.co-preview-table th,.co-preview-table td{border:1px solid rgba(46,58,120,.2);padding:8px 10px;text-align:left}
.co-preview-table th{width:35%;background:rgba(86,103,201,.12);font-weight:600;color:#1e2552}
.co-preview-text{border:1px solid rgba(46,58,120,.2);border-radius:10px;padding:10px;min-height:60px;background:rgba(250,251,255,.8);font-size:.9rem;color:#1f2341}
.co-preview-chips{display:flex;flex-wrap:wrap;gap:8px}
.co-preview-chip{border:1px solid rgba(46,58,120,.25);padding:6px 12px;border-radius:999px;font-size:.82rem;color:#1e2552;background:#f5f6ff}
.co-preview-empty{color:var(--muted);font-size:.9rem}
.co-form textarea[name=\"notes\"]{min-height:110px}
@media (max-width:900px){
  .co-col-3,.co-col-4,.co-col-6{grid-column:span 12}
}
@media (max-width:600px){
  .co-card{padding:20px}
  .co-grid{gap:10px}
}
.hoa-card{width:100%;background:rgba(255,255,255,.98);border-radius:24px;border:1px solid rgba(16,23,70,.08);box-shadow:0 26px 60px rgba(12,22,63,.12);padding:28px;display:flex;flex-direction:column;gap:24px}
.hoa-header h2{margin:0;font-size:1.75rem;color:#121637}
.hoa-header p{margin:.3rem 0;color:var(--muted)}
.hoa-brand{font-size:.85rem;color:rgba(27,31,68,.65)}
.hoa-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:14px}
.hoa-grid label{display:flex;flex-direction:column;font-size:.74rem;font-weight:600;text-transform:uppercase;color:rgba(25,30,68,.78);letter-spacing:.05em}
.hoa-grid input,.hoa-grid textarea{border-radius:14px;border:1px solid rgba(32,45,99,.15);padding:.65rem .85rem;background:rgba(255,255,255,.98);font-size:.92rem;color:#1f2341;box-shadow:0 10px 22px rgba(16,28,62,.06);transition:border-color .2s ease,box-shadow .2s ease}
.hoa-grid input:focus,.hoa-grid textarea:focus{outline:none;border-color:rgba(84,106,255,.6);box-shadow:0 16px 32px rgba(70,92,210,.18)}
.hoa-grid textarea{min-height:90px;resize:vertical}
.hoa-col-3{grid-column:span 3}
.hoa-col-4{grid-column:span 4}
.hoa-col-6{grid-column:span 6}
.hoa-col-12{grid-column:span 12}
.hoa-table-wrap{overflow-x:auto}
.hoa-table{width:100%;border-collapse:collapse;min-width:640px}
.hoa-table th,.hoa-table td{border:1px solid rgba(30,40,90,.15);padding:10px;text-align:left;font-size:.88rem}
.hoa-table th{background:rgba(86,103,201,.1);text-transform:uppercase;font-size:.75rem;color:#1f2555;letter-spacing:.08em}
.hoa-table input{width:100%;border-radius:10px;border:1px solid rgba(32,45,99,.18);padding:.5rem .6rem;background:#fff;font-size:.88rem}
.hoa-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-end}
.hoa-actions button{border-radius:12px;border:1px solid rgba(31,37,85,.14);padding:.75rem 1.35rem;font-weight:600;cursor:pointer;background:linear-gradient(130deg,#5562ff,#5de0ff);color:#fff;box-shadow:0 16px 33px rgba(85,98,255,.35)}
.hoa-actions button.secondary{background:#fff;color:#1d1f47;box-shadow:0 12px 25px rgba(20,26,60,.12)}
.hoa-preview{border-radius:18px;border:1px solid rgba(27,35,89,.15);background:#fff;box-shadow:0 18px 38px rgba(12,20,55,.08);padding:22px;min-height:150px}
.hoa-preview-block{margin-bottom:22px}
.hoa-preview-block:last-child{margin-bottom:0}
.hoa-preview-block h4{margin:0 0 10px;font-size:1rem;text-transform:uppercase;color:#181c3d;letter-spacing:.06em}
.hoa-preview-table{width:100%;border-collapse:collapse;font-size:.9rem}
.hoa-preview-table th,.hoa-preview-table td{border:1px solid rgba(46,58,120,.2);padding:8px 10px;text-align:left}
.hoa-preview-table th{width:35%;background:rgba(86,103,201,.12);font-weight:600;color:#1e2552}
.hoa-preview-text{border:1px solid rgba(46,58,120,.2);border-radius:10px;padding:10px;min-height:60px;background:rgba(250,251,255,.8);font-size:.9rem;color:#1f2341}
.hoa-preview-table.financial thead th{text-align:center}
.hoa-preview-table.financial th{width:auto}
.hoa-preview-table.financial td{text-align:left}
.hoa-preview-table.financial td.amount{text-align:right;font-variant-numeric:tabular-nums}
.hoa-preview-empty{color:var(--muted)}
@media (max-width:900px){
  .hoa-col-3,.hoa-col-4,.hoa-col-6{grid-column:span 12}
  .hoa-card{padding:20px}
}
.mls-card{width:100%;background:rgba(255,255,255,.98);border-radius:24px;border:1px solid rgba(16,23,70,.08);box-shadow:0 26px 60px rgba(12,22,63,.12);padding:28px;display:flex;flex-direction:column;gap:24px}
.mls-header h2{margin:0;font-size:1.75rem;color:#121637}
.mls-header p{margin:.3rem 0;color:var(--muted)}
.mls-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:14px}
.mls-grid label{display:flex;flex-direction:column;font-size:.74rem;font-weight:600;text-transform:uppercase;color:rgba(25,30,68,.78);letter-spacing:.05em}
.mls-grid input,.mls-grid textarea{border-radius:14px;border:1px solid rgba(32,45,99,.15);padding:.65rem .85rem;background:rgba(255,255,255,.98);font-size:.92rem;color:#1f2341;box-shadow:0 10px 22px rgba(16,28,62,.06)}
.mls-grid textarea{min-height:90px;resize:vertical}
.mls-col-3{grid-column:span 3}
.mls-col-4{grid-column:span 4}
.mls-col-6{grid-column:span 6}
.mls-col-12{grid-column:span 12}
.mls-chips{display:flex;flex-wrap:wrap;gap:10px}
.mls-chip{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border:1px solid rgba(31,51,110,.2);border-radius:999px;background:rgba(250,250,255,.85);font-size:.82rem;font-weight:600;color:#1f2555}
.mls-chip input{margin:0}
.mls-table-wrap{overflow-x:auto}
.mls-table{width:100%;border-collapse:collapse;min-width:680px}
.mls-table th,.mls-table td{border:1px solid rgba(30,40,90,.12);padding:10px;text-align:left;font-size:.88rem}
.mls-table thead th{background:rgba(86,103,201,.1);text-transform:uppercase;font-size:.75rem;color:#1f2555;letter-spacing:.08em}
.mls-table input,.mls-table textarea{width:100%;border-radius:10px;border:1px solid rgba(32,45,99,.18);padding:.5rem .6rem;background:#fff;font-size:.88rem}
.mls-inline-actions{display:flex;justify-content:flex-end;margin-top:10px}
.mls-inline-actions button{border-radius:999px;padding:.45rem 1.2rem;font-weight:600}
.mls-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-end}
.mls-actions button{border-radius:12px;border:1px solid rgba(31,37,85,.14);padding:.75rem 1.35rem;font-weight:600;cursor:pointer;background:linear-gradient(130deg,#5562ff,#5de0ff);color:#fff;box-shadow:0 16px 33px rgba(85,98,255,.35)}
.mls-actions button.secondary{background:#fff;color:#1d1f47;box-shadow:0 12px 25px rgba(20,26,60,.12)}
.mls-preview{border-radius:18px;border:1px solid rgba(27,35,89,.15);background:#fff;box-shadow:0 18px 38px rgba(12,20,55,.08);padding:22px;min-height:150px}
.mls-preview-block{margin-bottom:22px}
.mls-preview-block:last-child{margin-bottom:0}
.mls-preview-block h4{margin:0 0 10px;font-size:1rem;text-transform:uppercase;color:#181c3d;letter-spacing:.06em}
.mls-preview-card{border-radius:16px;border:1px solid rgba(46,58,120,.15);overflow:hidden}
.mls-preview-title{padding:10px 12px;background:rgba(158,169,224,.25);font-weight:600;letter-spacing:.06em;color:#1c2148;text-transform:uppercase;font-size:.85rem}
.mls-preview-table{width:100%;border-collapse:collapse;font-size:.9rem}
.mls-preview-table th,.mls-preview-table td{border:1px solid rgba(46,58,120,.2);padding:8px 10px;text-align:left}
.mls-preview-table th{background:rgba(86,103,201,.12);font-weight:600;color:#1e2552;letter-spacing:.04em}
.mls-preview-table.light th{width:38%;background:rgba(86,103,201,.08);font-weight:600}
.mls-preview-text{border:1px solid rgba(46,58,120,.2);border-radius:10px;padding:10px;min-height:60px;background:rgba(250,251,255,.8);font-size:.9rem;color:#1f2341}
.mls-preview-chips{display:flex;flex-wrap:wrap;gap:8px}
.mls-preview-chip{border:1px solid rgba(46,58,120,.25);padding:6px 12px;border-radius:999px;background:#f5f6ff;color:#1d2250;font-size:.82rem;font-weight:600}
.mls-preview-empty{color:var(--muted)}
@media (max-width:900px){
  .mls-col-3,.mls-col-4,.mls-col-6{grid-column:span 12}
  .mls-card{padding:20px}
}
@media print{
  .taxcert-preview-hidden{display:none!important}
  .tax-cert-table button{display:none!important}
  .co-actions{display:none!important}
  .hoa-actions{display:none!important}
  .mls-actions{display:none!important}
}

.settlement-card{border-radius:26px;border:1px solid rgba(79,109,240,.14);padding:30px;background:rgba(255,255,255,.96);box-shadow:0 24px 48px rgba(15,32,80,.08);display:flex;flex-direction:column;gap:28px}
.settlement-section{margin:0;border-radius:22px;padding:18px 20px;background:rgba(79,109,240,.03);border:1px solid rgba(79,109,240,.08)}
.settlement-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}
.settlement-field{display:flex;flex-direction:column;gap:6px;font-size:.75rem;font-weight:600;text-transform:uppercase;color:rgba(31,37,85,.75)}
.settlement-field input{border-radius:1rem;padding:.7rem .95rem;border:1px solid rgba(79,109,240,.24);background:rgba(255,255,255,.95);box-shadow:0 6px 15px rgba(7,15,45,.04);transition:border-color .2s,box-shadow .2s}
.settlement-field input:focus{border-color:rgba(79,109,240,.65);box-shadow:0 8px 22px rgba(15,32,80,.12)}
.settlement-other-head{display:flex;align-items:center;justify-content:space-between;gap:14px;font-weight:700;font-size:.9rem;color:#1f2555}
.settlement-other-head button{border-radius:999px;padding:.55rem 1.3rem;font-weight:600;border:none;background:rgba(79,109,240,.15);color:#1f2555}
.settlement-other-list{display:flex;flex-direction:column;gap:14px;margin-top:18px}
.other-fee-row{display:grid;grid-template-columns:1fr 160px auto;gap:12px}
.other-fee-row input{border-radius:.9rem;border:1px solid rgba(79,109,240,.2);padding:.6rem .8rem;background:#fff}
.other-fee-remove{border:none;border-radius:999px;background:rgba(239,83,80,.15);color:#b83232;font-weight:600;padding:.45rem 1.2rem;cursor:pointer}
.settlement-pages{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px;align-items:end}
.settlement-pages-total{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;border-radius:18px;padding:14px 18px;border:1px dashed rgba(79,109,240,.35);background:rgba(255,255,255,.92);min-height:100px}
.settlement-pages-total strong{font-size:1.35rem;color:#1f2555}
.settlement-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;padding:0 4px}
.settlement-actions button{border-radius:16px;border:none;padding:.85rem 2.4rem;font-weight:700;background:#4f6df0;color:#fff;cursor:pointer;box-shadow:0 14px 30px rgba(79,109,240,.35);transition:transform .2s,box-shadow .2s}
.settlement-actions button:active{transform:translateY(1px);box-shadow:0 8px 18px rgba(79,109,240,.35)}
.settlement-overall{display:flex;flex-direction:column;gap:4px;text-transform:uppercase;font-size:.78rem;color:rgba(31,37,85,.7)}
.settlement-overall strong{font-size:1.6rem;color:#1f2555}
.settlement-summary{margin-top:8px;border-radius:24px;border:1px solid rgba(79,109,240,.22);padding:22px;background:rgba(255,255,255,.98);box-shadow:0 18px 38px rgba(15,32,80,.08);overflow:hidden}
.settlement-summary table{border:1px solid rgba(79,109,240,.18);border-radius:14px;overflow:hidden}
.settlement-summary table thead{display:none}
.settlement-summary table thead tr{background:rgba(79,109,240,.05)}
.settlement-summary table td,.settlement-summary table th{border-bottom:1px solid rgba(79,109,240,.12)}
.settlement-summary table tr:last-child td{border-bottom:none}
.settlement-summary-content.hidden{display:none}
.settlement-summary-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:32px;align-items:start}
.settlement-summary-grid h4{margin:.1rem 0;font-size:1rem;color:#1f2555}
.settlement-summary-other h4{margin:.2rem 0;font-size:1rem;color:#1f2555}
.settlement-summary-meta{display:flex;flex-direction:column;gap:8px;margin-top:18px;color:#1f2555;font-size:.92rem}
.settlement-summary-empty{padding:18px;border-radius:18px;background:rgba(79,109,240,.06);text-align:center;font-weight:600;color:rgba(31,37,85,.7)}
.settlement-summary table{width:100%;border-collapse:separate;border-spacing:0 6px}
.settlement-summary table td{padding:4px 6px;color:#1f2555;vertical-align:top}
.settlement-summary table td.fee-number{text-align:right;white-space:nowrap;width:30%;padding-right:18px}
.settlement-summary table td:first-child{font-weight:700;width:40%}
.settlement-summary table tr.summary-head td{background:rgba(79,109,240,.08);font-weight:700;color:#1f2555;border-bottom:1px solid rgba(79,109,240,.14)}
.settlement-summary-other table td:first-child{width:70%}
.settlement-summary-other table td.fee-number{width:30%}

.clients-screen{display:flex;flex-direction:column;gap:1.25rem;padding-bottom:2rem}
.clients-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.clients-panels{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:1.25rem}
.clients-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1rem}
.clients-list{display:flex;flex-direction:column;gap:.6rem;margin-bottom:1rem}
.clients-row{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;padding:.85rem;border:1px solid rgba(17,23,64,.08);border-radius:1rem;background:linear-gradient(135deg,rgba(255,255,255,.95),rgba(233,238,255,.88));box-shadow:0 8px 20px rgba(20,24,70,.08)}
.clients-row strong{display:block;margin-bottom:.15rem;font-size:1rem}
.clients-row .muted{font-size:.85rem}
.clients-row .row{flex-shrink:0}
.clients-row .btn{padding:.4rem .8rem;border-radius:.7rem;font-size:.78rem}
.clients-form{display:grid;gap:.75rem;margin-bottom:.75rem}
.clients-form.grid-3{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.clients-form-actions{margin-bottom:1rem;flex-wrap:wrap}
.clients-doc-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;flex-wrap:wrap;margin-bottom:.75rem}
.clients-doc-controls select,.clients-doc-controls input[type=file]{border-radius:.75rem;border:1px solid var(--border);padding:.45rem .65rem;background:#f2f4ff;color:var(--text)}
.clients-docs{display:flex;flex-direction:column;gap:.6rem}
.clients-doc-row{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;padding:.75rem;border:1px solid rgba(21,28,74,.08);border-radius:.95rem;background:rgba(95,107,255,.06)}
.clients-doc-row strong{display:block;margin-bottom:.15rem}
.clients-doc-row .row{flex-shrink:0;gap:.4rem}
.clients-doc-row .btn{padding:.35rem .75rem;font-size:.75rem;border-radius:.65rem}
.clients-doc-row a.btn{display:inline-flex;align-items:center;text-decoration:none}
.clients-uw-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:.85rem;margin-bottom:.85rem}
.clients-logo-preview{border:1px dashed rgba(17,23,64,.15);border-radius:1rem;min-height:120px;display:flex;align-items:center;justify-content:center;background:rgba(247,248,255,.6);font-weight:600;color:var(--muted);text-align:center;padding:.5rem}
.clients-logo-preview img{max-width:100%;max-height:100%;object-fit:contain}
.clients-logo-chip{width:52px;height:52px;border:1px solid rgba(17,23,64,.12);border-radius:.95rem;background:#f2f4ff;display:flex;align-items:center;justify-content:center;font-size:.75rem;color:var(--muted);overflow:hidden}
.clients-logo-chip img{max-width:100%;max-height:100%;object-fit:contain}
.clients-color-dot{display:inline-flex;width:16px;height:16px;border-radius:999px;margin-right:.35rem;border:2px solid rgba(255,255,255,.85);box-shadow:0 0 0 1px rgba(17,23,64,.25)}
.fees-screen{display:flex;flex-direction:column;gap:1.1rem;padding-bottom:2rem}
.fees-hero{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
  flex-wrap:wrap;
  padding:1rem 1.2rem;
  background:linear-gradient(135deg,rgba(95,107,255,.14),rgba(92,244,255,.12)),linear-gradient(120deg,#eef1ff,#fde9ff);
  border:1px solid rgba(99,73,255,.22);
  box-shadow:0 22px 55px rgba(122,91,255,.2);
  position:relative;
  overflow:hidden;
}
.fees-hero::before{
  content:'';
  position:absolute;
  inset:-35% -15% auto auto;
  height:160px;
  width:240px;
  background:radial-gradient(circle at 20% 20%,rgba(92,244,255,.32),transparent 60%);
  filter:blur(22px);
  opacity:.65;
}
.fees-hero h2{margin:0 0 .15rem;font-size:1.25rem;letter-spacing:.01em}
.fees-hero .muted{margin:0;color:#4d5174}
.fees-hero .row{gap:.55rem}
.fees-card{display:flex;flex-direction:column;gap:.75rem}
.fees-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.75rem;margin-bottom:.2rem}
.fees-form .btn{width:100%}
.fees-toolbar{align-items:center;gap:.75rem;flex-wrap:wrap}
.fee-filter{min-width:240px;max-width:420px;width:100%;border:1px solid var(--border);border-radius:.9rem;padding:.6rem .75rem;background:#f2f4ff;color:var(--text)}
.fees-table{width:100%;border:1px solid rgba(79,109,240,.1);border-radius:1rem;overflow:hidden;background:linear-gradient(135deg,rgba(255,255,255,.92),rgba(233,238,255,.88));box-shadow:var(--shadow)}
.fees-table .thead,.fees-table .fee-row{display:grid;grid-template-columns:1.2fr 1fr .8fr .5fr;gap:.5rem;align-items:center}
.fees-table .thead{padding:.65rem .6rem;font-weight:700;color:var(--muted);border-bottom:1px solid var(--border)}
.fees-table .fee-row{padding:.65rem .6rem;border-bottom:1px solid rgba(17,23,64,.06)}
.fees-table .fee-row:nth-child(odd){background:rgba(95,107,255,.04)}
.fees-table .fee-row:last-child{border-bottom:none}
.fees-table .fee-actions .btn{padding:.35rem .75rem;font-size:.8rem;border-radius:.65rem}
.fees-table .muted{font-size:.85rem}
.fee-modal{display:flex;flex-direction:column;gap:.75rem}
.fee-modal-rows{display:flex;flex-direction:column;gap:.65rem;margin:0}
.fee-modal-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.5rem;align-items:flex-end;padding:.65rem;border:1px solid var(--border);border-radius:.75rem;background:linear-gradient(135deg,#f7f8ff,#eef2ff)}
.fee-modal-field{display:flex;flex-direction:column;gap:.3rem}
.fee-modal-field input,.fee-modal-field select{width:100%;padding:.55rem .65rem;border-radius:.55rem;border:1px solid var(--border);background:#f2f4ff}
.fee-modal-row .fee-row-remove{justify-self:flex-start;padding:.45rem .8rem}
body.theme-dark .fee-modal-row{background:#0f1224;border-color:rgba(255,255,255,.12)}
body.theme-dark .fee-modal-field input,body.theme-dark .fee-modal-field select{background:#10162b;border-color:rgba(255,255,255,.12);color:var(--text)}
.fee-view-modal{display:flex;flex-direction:column;gap:.75rem}
.fee-view-summary{display:flex;flex-wrap:wrap;gap:1rem;font-size:.95rem}
.fee-view-summary strong{margin-right:.25rem}
.fee-view-table{width:100%;border-collapse:collapse;table-layout:auto}
.fee-view-table th,.fee-view-table td{padding:.6rem .75rem;text-align:left;white-space:nowrap}
.fee-view-table th:nth-child(3){min-width:180px}
.fee-view-table th:nth-child(4){min-width:150px}
.fee-view-table th:nth-child(5){min-width:110px;text-align:right}
.fee-view-table td:nth-child(5){text-align:right}
.fee-view-table tbody tr:nth-child(odd){background:rgba(95,107,255,.06)}
.fee-view-table .fee-number{text-align:right;white-space:nowrap}
@media (max-width:900px){
  .fees-table .thead,.fees-table .fee-row{grid-template-columns:1.1fr 1fr .7fr .7fr}
  .fees-table .thead div:nth-child(2),
  .fees-table .thead div:nth-child(3),
  .fees-table .thead div:nth-child(6),
  .fees-table .fee-row div:nth-child(2),
  .fees-table .fee-row div:nth-child(3),
  .fees-table .fee-row div:nth-child(6){display:none}
}
@media (max-width:720px){
  .fees-hero{align-items:flex-start;padding:.9rem 1rem}
  .fees-hero .row{width:100%;justify-content:flex-start}
}
.docs-modal .swal2-popup{background:linear-gradient(135deg,#f9fbff,#eef3ff);border-radius:18px;box-shadow:0 20px 48px rgba(12,18,54,.22);padding:1.2rem}
.docs-modal .doc-row{display:flex;justify-content:space-between;align-items:center;padding:.65rem .85rem;border:1px solid rgba(17,23,64,.08);border-radius:.9rem;background:rgba(255,255,255,.9);margin-top:.45rem;gap:.75rem}
.docs-modal .doc-meta{display:flex;flex-direction:column;gap:.15rem}
.docs-modal .doc-meta strong{font-size:.95rem}
.docs-modal .doc-meta small{color:var(--muted)}
.docs-modal .doc-actions{display:flex;gap:.4rem;align-items:center}
.docs-modal .doc-actions button{border-radius:.8rem;padding:.45rem .85rem;font-weight:600}

input.invalid,textarea.invalid,select.invalid{border-color:#e84c3d!important;box-shadow:0 0 0 2px rgba(232,76,61,.18)}
.btn-xs{border:none;background:rgba(79,109,240,.15);color:#1f2555;padding:.3rem .7rem;border-radius:.7rem;font-size:.75rem;cursor:pointer}

.swal-client{padding:1.2rem 1.4rem}
.swal-client .card-head{margin-bottom:1rem}
.docs-list{display:flex;flex-direction:column;gap:.45rem;max-height:180px;overflow:auto}
.docs-list .doc-row{display:flex;justify-content:space-between;align-items:center;padding:.65rem .85rem;border-radius:.85rem;border:1px solid rgba(17,23,64,.08);background:linear-gradient(135deg,rgba(247,248,255,.95),rgba(237,242,255,.95));gap:.75rem;box-shadow:0 12px 28px rgba(8,10,40,.06)}
.docs-list .doc-meta strong{font-size:.95rem}
.docs-list .doc-actions{display:flex;gap:.35rem}
.docs-inline{display:flex;flex-direction:column;gap:.55rem;margin-top:.35rem}
.docs-inline .controls{
  display:flex;
  gap:.85rem;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
}
.docs-select{
  border-radius:.85rem;
  border:1px solid rgba(17,23,64,.12);
  padding:.6rem .7rem;
  background:#fff;
  min-width:0;
  width:240px;
  box-shadow:inset 0 1px 3px rgba(0,0,0,.04);
  font-size:.96rem;
  color:#0f152f;
}
.simple-docs .file-drop{justify-self:center;align-self:center;width:auto}
.file-drop{
  position:relative;
  cursor:pointer;
  overflow:hidden;
  background:transparent;
  border:none;
  border-radius:.6rem;
  box-shadow:none;
  padding:0;
}
.file-drop .drop-inner{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  border:1px dashed rgba(74,90,255,.18);
  background:linear-gradient(135deg,#f9fbff,#eef7ff);
  border-radius:.55rem;
  padding:.4rem .8rem;
  transition:all .15s ease;
}
.file-drop:hover .drop-inner{border-color:rgba(74,90,255,.35);box-shadow:0 12px 28px rgba(13,18,60,.08);transform:translateY(-1px)}
.file-chip{
  background:transparent;
  border:1px solid rgba(74,90,255,.3);
  color:#1f2a4d;
  padding:.48rem .9rem;
  border-radius:.7rem;
  font-weight:700;
  box-shadow:none;
  flex-shrink:0;
}
.file-copy{display:flex;flex-direction:column;gap:.25rem;min-width:0}
.file-name{font-weight:700;color:#0f152f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file-hint{font-size:.82rem}
.file-name-display{
  font-weight:600;
  color:#1f2a4d;
  max-width:220px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.file-control{position:absolute;inset:0;opacity:0;cursor:pointer}
.docs-actions{display:flex;align-items:center;justify-content:flex-end;height:auto}
.docs-inline .docs-upload{
  border:none;
  border-radius:.9rem;
  padding:.6rem 1rem;
  background:linear-gradient(120deg,#7a5bff,#4dddfc);
  color:#fff;
  box-shadow:0 10px 20px rgba(77,221,252,.22);
  font-weight:700;
  min-width:90px;
  height:auto;
}
.docs-inline .docs-upload:hover{transform:translateY(-1px)}

@media (max-width:640px){
  .docs-inline .controls{grid-template-columns:1fr;gap:.55rem}
  .docs-inline .docs-upload{width:100%}
}

/* Responsive layout */
@media (max-width:1200px){
  .shell{grid-template-columns:230px 1fr}
  .dash-kpi-grid{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
  .status-grid{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
}
@media (max-width:992px){
  .shell{grid-template-columns:200px 1fr}
  .sidebar nav{gap:.35rem}
  .dash-welcome{flex-direction:column;align-items:flex-start}
  .dash-welcome-right{align-items:flex-start;width:100%}
  .floating-brand{margin-left:auto}
  .dash-date{width:100%;text-align:center}
  .dash-kpi-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
  .status-pill strong{font-size:1.6rem}
  .dash-tabs button{padding:.35rem .8rem}
}
@media (max-width:768px){
  .shell{grid-template-columns:1fr}
  body.sidebar-collapsed .shell{grid-template-columns:1fr}
  body.sidebar-collapsed .sidebar{width:auto}
  .sidebar{position:sticky;top:0;z-index:20;border-right:none;border-bottom:1px solid var(--border);flex-direction:row;align-items:center;overflow-x:auto}
  .sidebar nav{display:flex;flex-direction:row;flex-wrap:nowrap;gap:.35rem;padding:.65rem}
  .sidebar .nav-item{flex:0 0 auto;margin:0;border-radius:.65rem;padding:.45rem .65rem}
  body.sidebar-collapsed .sidebar .nav-item span:not(.nav-icon){display:inline}
  body.sidebar-collapsed .queue-item .queue-label{display:inline}
  .brand,.me{display:none}
  .queues{width:100%}
  .queues-list{flex-direction:row;flex-wrap:nowrap;overflow-x:auto;padding:0 .65rem .65rem}
  .queue-item{flex:0 0 auto;min-width:170px}
  .main{padding:.75rem}
  .dash-kpi-grid{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}
  .status-grid{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
  .search input{min-width:unset}
  .floating-brand-logo{height:104px}
  .tabs{justify-content:flex-start}
  .table{overflow-x:auto}
}
@media (max-width:540px){
  body{font-size:13px}
  .card{padding:1rem}
  .kpi-value{font-size:1.6rem}
  .status-pill{min-height:100px;padding:.85rem}
  .status-pill strong{font-size:1.4rem}
  .dash-tabs button{font-size:.9rem}
  .table{min-width:640px}
  .floating-brand-logo{height:88px}
  .modal-card{width:95vw}
}
.client-popup .products-dropdown{position:relative}
.client-popup .products-trigger{
  width:100%;
  text-align:left;
  border-radius:.9rem;
  border:1px solid rgba(79,109,240,.25);
  padding:.65rem .85rem;
  background:rgba(255,255,255,.94);
  font-weight:700;
  color:#1f2555;
  cursor:pointer;
}
.client-popup .products-menu{
  position:absolute;
  left:0; right:0;
  background:#fff;
  border:1px solid rgba(79,109,240,.2);
  border-radius:14px;
  box-shadow:0 12px 28px rgba(18,22,66,.12);
  padding:.5rem;
  margin-top:.35rem;
  max-height:320px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:.45rem;
  z-index:50;
}
.client-popup .products-menu.hidden{display:none}
.client-popup .products-menu .stage-option{
  display:flex;
  align-items:center;
  gap:.5rem;
  background:rgba(79,109,240,.08);
  padding:.55rem .75rem;
  border-radius:14px;
  border:1px solid rgba(79,109,240,.16);
  box-shadow:0 8px 18px rgba(18,22,66,.08);
}
.client-popup .products-menu .stage-option input{
  width:18px;
  height:18px;
}
.client-popup .products-menu .stage-option label{
  font-weight:700;
  color:#1f2555;
  line-height:1.25;
}
.client-popup .client-teams{margin-top:.65rem}

/* Tickets view */
.ticket-shell{
  width:100%;
  background:linear-gradient(120deg,rgba(79,109,240,.08),rgba(255,255,255,.9));
  border-radius:22px;
  padding:1.2rem 1.4rem 1.6rem;
  box-shadow:0 20px 60px rgba(18,22,66,.12);
}
.ticket-card{
  width:100%;
  border:1px solid rgba(79,109,240,.2);
  border-radius:18px;
  padding:1.2rem 1.3rem 1.35rem;
  background:#fff;
  box-shadow:0 14px 36px rgba(18,22,66,.12);
}
.ticket-card .card-head.spread{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.ticket-card h3{margin:.1rem 0;font-size:1.35rem}
.ticket-card .muted{color:var(--muted)}
.hint-block{background:rgba(79,109,240,.08);border:1px solid rgba(79,109,240,.2);border-radius:12px;padding:.6rem .8rem;max-width:280px;color:#1f2555;font-weight:600}
.form-grid{display:grid;gap:1rem;margin-top:.5rem}
.form-grid .row.two{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:.9rem}
.form-grid .field{display:flex;flex-direction:column;gap:.35rem;background:rgba(79,109,240,.04);border:1px solid rgba(79,109,240,.08);padding:.75rem .85rem;border-radius:14px}
.form-grid .field.checklist{background:rgba(18,22,66,.03)}
.form-grid .field ul{margin:.1rem 0 0 1rem;padding-left:1rem;color:#1f2555;line-height:1.45}
.form-grid label{font-weight:800;color:#0f172a;letter-spacing:-.01em;display:flex;align-items:center;gap:.25rem;flex-wrap:wrap}
.form-grid label .req{color:#d62828;font-weight:900}
.form-grid input,
.form-grid select,
.form-grid textarea{
  width:100%;
  border:1px solid rgba(18,22,66,.12);
  background:#fff;
  border-radius:12px;
  padding:.8rem .95rem;
  font-size:14px;
  color:#0f172a;
  transition:border-color .18s,box-shadow .18s,transform .12s;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.7);
}
body.theme-dark .form-grid input,
body.theme-dark .form-grid select,
body.theme-dark .form-grid textarea{
  background:rgba(12,14,29,.9);
  color:var(--text);
}
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus{
  outline:none;
  border-color:var(--pri);
  box-shadow:0 0 0 3px rgba(79,109,240,.18);
  transform:translateY(-1px);
}
.form-grid textarea{min-height:140px;resize:vertical}
.status{
  display:none;
  padding:.95rem 1rem;
  border-radius:12px;
  margin-bottom:.5rem;
  font-weight:700;
  border:1px solid transparent;
}
.status.show{display:block}
.status.success{background:rgba(52,211,153,.12);color:#0f5132;border-color:rgba(52,211,153,.35)}
.status.error{background:rgba(248,113,113,.12);color:#7f1d1d;border-color:rgba(248,113,113,.35)}
.actions{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}
.actions .btn{padding:.85rem 1.2rem;font-size:15px;font-weight:800;border-radius:12px}
.small{font-size:13px}

/* Printer / Multi PDF Preview */
.printer-view .card { gap: 12px; }
.printer-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pdf-processing { font-weight: 600; color: #4b5563; }
.printer-layout { display: grid; grid-template-columns: minmax(320px, 460px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 960px) { .printer-layout { grid-template-columns: 1fr; } }
.pdf-left-panel { display: flex; flex-direction: column; gap: 8px; }
.pdf-panel-tabs { display: flex; gap: 8px; }
.pdf-tab { border: 1px solid #d6dfeb; background: #f8fafc; color: #334155; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.pdf-tab.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.pdf-panel-body { display: flex; flex-direction: column; gap: 8px; }
.pdf-page-counter { display: flex; align-items: center; gap: 6px; margin-top: 6px; border-top: 1px solid #e2e8f0; padding-top: 6px; }
.pdf-page-btn { width: 22px; height: 22px; border: 1px solid #cfd7e3; background: #fff; border-radius: 3px; color: #475569; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.pdf-page-btn:hover { border-color: #9aa3b2; background: #f6f8fb; }
.pdf-page-input-wrap { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; border: 1px solid #cfd7e3; border-radius: 4px; height: 22px; background: #fff; }
.pdf-page-input { width: 46px; border: none; outline: none; font-size: 12px; text-align: center; background: transparent; padding: 0; }
.pdf-page-total { font-size: 12px; color: #6b7280; white-space: nowrap; }
.pdf-page-input::-webkit-outer-spin-button,
.pdf-page-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdf-page-input { -moz-appearance: textfield; }
.pdf-bookmarks { background: #fff; border: 1px solid #d7e0ec; border-radius: 10px; padding: 8px; max-height: 70vh; overflow: hidden; scroll-behavior: smooth; --pdf-bookmark-font: 12px; --bm-head-height: 26px; display: flex; flex-direction: column; }
.pdf-bookmarks-toolbar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; position: sticky; top: 0; background: #fff; z-index: 2; padding-bottom: 4px; }
.pdf-bookmark-tool { width: 20px; height: 20px; border: 1px solid #cfd7e3; background: #fff; color: #6b7280; border-radius: 3px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 0; padding: 0; }
.pdf-bookmark-tool::before { content: ""; width: 12px; height: 12px; background-repeat: no-repeat; background-position: center; background-size: 12px 12px; display: block; }
.pdf-bookmark-tool:hover { border-color: #9aa3b2; background: #f6f8fb; }
.pdf-bookmark-tool[data-bm-action="new"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M7 2v10M2 7h10' stroke='%236b7280' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.pdf-bookmark-tool[data-bm-action="delete"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 4h8M5 4V3h4v1M5 5v5M7 5v5M9 5v5M4 4l.6 7h4.8l.6-7' fill='none' stroke='%236b7280' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.pdf-bookmark-tool[data-bm-action="find"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='6' cy='6' r='3.5' fill='none' stroke='%236b7280' stroke-width='1.1'/%3E%3Cpath d='M9 9l2.6 2.6' stroke='%236b7280' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E"); }
.pdf-bookmark-tool[data-bm-action="zoom-in"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 10.5l2-7h1.6l2 7M4.7 8h2.6' fill='none' stroke='%236b7280' stroke-width='1.1' stroke-linecap='round'/%3E%3Cpath d='M9.5 6.5h3M11 5v3' stroke='%236b7280' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E"); }
.pdf-bookmark-tool[data-bm-action="zoom-out"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 10.5l2-7h1.6l2 7M4.7 8h2.6' fill='none' stroke='%236b7280' stroke-width='1.1' stroke-linecap='round'/%3E%3Cpath d='M9.5 6.5h3' stroke='%236b7280' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E"); }
.pdf-bookmark-tool[data-bm-action="level-up"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M7 3l3 3H8v5H6V6H4z' fill='none' stroke='%236b7280' stroke-width='1.1' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.pdf-bookmark-tool[data-bm-action="level-down"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M7 11l-3-3h2V3h2v5h2z' fill='none' stroke='%236b7280' stroke-width='1.1' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.pdf-bookmark-tool[data-bm-action="save"] { display: none; }
.pdf-bookmarks-search { margin-bottom: 6px; position: sticky; top: var(--bm-head-height); background: #fff; z-index: 2; padding-bottom: 6px; }
.pdf-bookmarks-search input { width: 100%; padding: 6px 10px; border: 1px solid #d6dfeb; border-radius: 8px; font-size: 12px; background: #fff; }
.pdf-bookmarks-body { font-size: 13px; color: #1f2937; overflow: auto; flex: 1; }
.pdf-bookmarks-empty { font-size: 12px; color: #64748b; padding: 6px 4px; }
.pdf-bookmarks-tree { list-style: none; margin: 0; padding: 0 0 0 10px; border-left: 1px dotted #b9c2d2; }
.pdf-bookmark-item { position: relative; display: flex; align-items: center; gap: 6px; padding: 0 6px; min-height: 24px; border-radius: 4px; }
.pdf-bookmark-item::before { content: ""; position: absolute; left: -10px; width: 10px; border-top: 1px dotted #b9c2d2; top: 12px; }
.pdf-bookmark-item:hover { background: #f4f6ff; }
.pdf-bookmark-item.selected { background: #f3f0ff; box-shadow: inset 2px 0 0 #7c3aed; }
.pdf-bookmark-toggle { border: 1px solid #c9ced8; background: #fff; color: #6b7280; width: 14px; height: 14px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 2px; transform: rotate(90deg); transition: transform 0.15s ease; padding: 0; }
.pdf-bookmark-toggle svg { width: 6px; height: 8px; }
.pdf-bookmark-item:hover .pdf-bookmark-toggle { border-color: #94a3b8; }
.pdf-bookmark-item.collapsed > .pdf-bookmark-toggle { transform: rotate(0deg); }
.pdf-bookmark-item.no-children > .pdf-bookmark-toggle { visibility: hidden; }
.pdf-bookmark-link { border: none; background: transparent; padding: 0; text-align: left; color: #1f2937; cursor: pointer; font-size: var(--pdf-bookmark-font); flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.pdf-bookmark-icon { width: 12px; height: 14px; display: inline-flex; align-items: center; justify-content: center; color: #6b7280; flex-shrink: 0; }
.pdf-bookmark-icon svg { width: 10px; height: 14px; }
.pdf-bookmark-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-bookmark-item.selected > .pdf-bookmark-link { color: #4c1d95; font-weight: 600; }
.pdf-bookmark-item.selected .pdf-bookmark-icon { color: #4c1d95; }
.pdf-bookmark-children { list-style: none; margin: 2px 0 2px 12px; padding: 0 0 0 12px; border-left: 1px dotted #b9c2d2; }
.pdf-bookmark-item.hidden { display: none; }
.pdf-files { display: flex; flex-direction: column; gap: 16px; max-height: 70vh; overflow: auto; padding-right: 4px; }
.pdf-file-group { background: #f7f9fd; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; }
.pdf-file-title { font-weight: 600; margin-bottom: 8px; color: #1f2937; word-break: break-all; }
.pdf-thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.pdf-thumb { border: 1px solid #d9e2ec; border-radius: 10px; background: #fff; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.12s ease; }
.pdf-thumb:hover { border-color: #94a3b8; box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-1px); }
.pdf-thumb.selected { border-color: #4f46e5; box-shadow: 0 6px 20px rgba(79,70,229,0.18); }
.pdf-thumb.dragging { opacity: .8; }
.pdf-thumb { position: relative; }
.pdf-thumb-remove { position: absolute; top: 6px; right: 6px; border: none; background: rgba(0,0,0,0.55); color: #fff; width: 22px; height: 22px; border-radius: 50%; font-weight: 700; line-height: 1; cursor: pointer; }
.pdf-thumb-remove:hover { background: rgba(220,53,69,0.8); }
.pdf-thumb canvas { width: 100%; max-width: 180px; height: auto; border: 1px solid #e5e7eb; border-radius: 6px; }
.pdf-thumb .page-label { font-size: 12px; color: #475467; }
.pdf-preview-pane { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; min-height: 360px; overflow: auto; }
.pdf-preview-canvas-wrap { display: grid; align-items: start; justify-items: center; position: relative; }
#pdfPreviewCanvas { width: auto; height: auto; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; }
#pdfPreviewEmpty { text-align: center; padding: 40px 12px; }
.pdf-text-layer,
.pdf-highlight-overlay { position: absolute; inset: 0; margin: auto; pointer-events: none; }
.pdf-text-layer { color: transparent; opacity: 0; pointer-events: none; }
.pdf-text-layer.edit-mode { opacity: 1; pointer-events: auto; }
.pdf-text-layer div,
.pdf-text-layer span { color: transparent; position: absolute; white-space: pre; transform-origin: 0 0; pointer-events: auto; }
.pdf-ocr-layer { position: absolute; inset: 0; }
.pdf-ocr-word { position: absolute; color: transparent; white-space: pre; pointer-events: auto; }
.pdf-highlight-overlay { z-index: 2; }
.pdf-highlight-overlay.active { pointer-events: auto; cursor: crosshair; }
.pdf-text-edit-layer { position: absolute; inset: 0; pointer-events: auto; z-index: 3; }
.pdf-text-edit-mask { position: absolute; background: #fff; border: none; border-radius: 2px; box-shadow: none; }
.pdf-text-edit { position: absolute; max-width: 80%; white-space: pre-wrap; color: #000; font-weight: normal; pointer-events: auto; text-rendering: geometricPrecision; -webkit-font-smoothing: antialiased; }
.pdf-text-edit.single-line { white-space: pre; overflow: hidden; }
.pdf-text-edit.replace { background: transparent; box-shadow: none; }
.pdf-text-edit.replace.editing { background: rgba(255,255,255,0.9); }
.pdf-text-edit.editing { pointer-events: auto; min-width: 60px; background: rgba(255,255,255,0.9); border: 1px dashed #94a3b8; border-radius: 4px; padding: 2px 4px; }
.pdf-highlight { position: absolute; background: rgba(255,230,0,.35); border-radius: 4px; box-shadow: 0 0 0 1px rgba(255,200,0,.35); }
.pdf-highlight-temp { position: absolute; border: 1px dashed rgba(79,107,255,.6); background: rgba(95,107,255,.12); border-radius: 6px; pointer-events: none; }
.pdf-error { color: #b91c1c; font-weight: 600; }
.pdf-error .pdf-error-row { margin-top: 4px; font-weight: 500; }

/* Examination tab */
#tab-examination .exam-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
#tab-examination .exam-status-saving { color: #1d4ed8; font-weight: 600; }
#tab-examination .exam-status-error { color: #b91c1c; font-weight: 600; }
#tab-examination .exam-frame-wrap { border: 1px solid #dfe3ec; border-radius: 12px; overflow: visible; background: #f8f9fb; min-height: 100vh; }
#tab-examination iframe { width: 100%; border: 0; background: #fff; display: block; min-height: 100vh; }
.exam-report-mode { display: inline-flex; align-items: center; gap: 8px; }
.exam-report-mode label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: #4b5563; text-transform: uppercase; }
.exam-report-mode select {
  min-width: 200px;
  border: 1px solid #d0d5e2;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
  color: #1f2937;
  background: linear-gradient(135deg, #f8fbff, #eef3ff);
  box-shadow: 0 8px 18px rgba(39, 66, 118, 0.12);
  transition: border-color .15s ease, box-shadow .2s ease, transform .08s ease;
}
.exam-report-mode select:focus {
  outline: none;
  border-color: #4f6df0;
  box-shadow: 0 10px 24px rgba(79,109,240,.24);
  transform: translateY(-1px);
}
.exam-only-card .exam-frame-wrap { min-height: 100vh; }
.exam-only-card iframe { min-height: 100vh; }

/* Examination full-page layout */
.exam-only-card {
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}
.exam-only-card .card-head,
.exam-only-card .tabs { display: none; }
.exam-only-card .pad { padding: 0; }
.exam-only-card .exam-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.exam-only-card .exam-controls .pill-select{
  min-width: 260px;
  font-weight: 600;
}
.exam-only-card .exam-controls .btn{
  height: 40px;
  display: inline-flex;
  align-items: center;
}
.exam-only-card .exam-controls .btn.text{
  color:#4b5563;
  text-decoration: underline;
  padding: 0 .6rem;
}
.exam-only-card .exam-frame-wrap {
  width: 100%;
  min-height: 100vh;
  border: 1px solid #dfe3ec;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15,17,48,.12);
}
.exam-only-card iframe {
  width: 100%;
  min-height: 100vh;
  border: 0;
  display: block;
}
