


:root {
  --bg:        #0d0f14;
  --bg-card:   #13161e;
  --bg-raised: #1a1d28;
  --bg-input:  #0a0c11;
  --bg-hover:  #1f2330;

  --border:    rgba(255,255,255,.08);
  --border-md: rgba(255,255,255,.13);
  --border-hi: rgba(255,255,255,.22);

  --t1: #eef1f6;
  --t2: #8b95a8;
  --t3: #52596a;
  --t4: #2e3340;

  --amber:  #f59e0b;
  --amber2: #fbbf24;
  --green:  #22c55e;
  --red:    #ef4444;
  --blue:   #3b82f6;
  --purple: #a855f7;
  --cyan:   #06b6d4;
  --ts:     #818cf8;   

  --sidebar-w: 232px;
  --topbar-h:  54px;
  --r:    8px;
  --r-sm: 6px;
  --r-lg: 12px;
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16.5px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'tnum' 1, 'ss01' 1, 'cv05' 1;
  font-variant-numeric: tabular-nums;
  background:
    radial-gradient(1100px 700px at -5% -10%, rgba(245,158,11,.05), transparent 55%),
    radial-gradient(900px 600px at 105% 0%, rgba(168,85,247,.045), transparent 55%),
    radial-gradient(1000px 800px at 50% 115%, rgba(59,130,246,.04), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--t1);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }
@media (max-width: 780px), (hover: none) {
  body { background-attachment: scroll; }
}


html {
  scrollbar-width: thin;
  scrollbar-color: var(--border-md) transparent;
}
*::-webkit-scrollbar { width: 3px; height: 3px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--border-md);
  border-radius: 99px;
  transition: background .2s;
}
*::-webkit-scrollbar-thumb:hover { background: var(--border-hi); }
*::-webkit-scrollbar-corner { background: transparent; }


.page-wrap {
  display: flex;
  min-height: 100vh;
}
.content {
  margin-left: var(--sidebar-w);
  padding: calc(var(--topbar-h) + 24px) 24px 40px;
  flex: 1;
  min-width: 0;
}


.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  z-index: 200;
  overflow: hidden;
}
.sidebar::-webkit-scrollbar { display: none; }

.sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sb-brand-logo {
  font-family: 'Orbitron', monospace;
  font-size: .98rem;
  font-weight: 900;
  letter-spacing: .06em;
  background: linear-gradient(120deg, var(--amber2), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sb-brand-sub {
  font-size: .62rem;
  color: var(--t3);
  letter-spacing: .02em;
}

.sb-section {
  padding: 16px 12px 4px;
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--t4);
}
.sb-nav { padding: 6px 8px; flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--border-md) transparent; }
.sb-nav::-webkit-scrollbar { width: 3px; }
.sb-nav::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 99px; }
.sb-nav::-webkit-scrollbar-thumb:hover { background: var(--border-hi); }
.sb-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: .8rem;
  font-weight: 450;
  color: var(--t3);
  transition: background .12s, color .12s;
  margin-bottom: 1px;
}
.sb-link i { width: 14px; text-align: center; font-size: .76rem; flex-shrink: 0; }
.sb-link:hover { background: var(--bg-hover); color: var(--t1); }
.sb-link.active {
  background: rgba(245,158,11,.1);
  color: var(--amber);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--amber);
}
.sb-badge {
  margin-left: auto;
  background: var(--amber);
  color: #000;
  font-size: .55rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 99px;
}
.sb-footer {
  padding: 8px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.sb-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .12s;
}
.sb-user:hover { background: var(--bg-hover); }
.sb-user-name { font-size: .8rem; font-weight: 600; color: var(--t1); }
.sb-user-role { font-size: .64rem; color: var(--t3); }


.sb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 199;
}


.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  background: rgba(13,15,20,.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.topbar-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: none;
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  color: var(--t2);
  cursor: pointer;
  font-size: .8rem;
  flex-shrink: 0;
}
.topbar-title {
  flex: 1;
  font-size: .84rem;
  font-weight: 600;
  color: var(--t2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: none;
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  color: var(--t2);
  cursor: pointer;
  font-size: .84rem;
  transition: all .12s;
}
.topbar-bell:hover { background: var(--bg-raised); color: var(--t1); }
.bell-badge {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 17px; height: 17px;
  background: var(--red);
  color: #fff;
  font-size: .52rem;
  font-weight: 900;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
  line-height: 1;
}
.n5-pop { animation: n5BadgePop .3s cubic-bezier(.34,1.56,.64,1); }
@keyframes n5BadgePop { 0%{transform:scale(1)} 40%{transform:scale(1.7)} 100%{transform:scale(1)} }
.topbar-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color .12s;
}
.topbar-avatar-btn:hover { border-color: var(--amber); }
.topbar-uname { font-size: .76rem; font-weight: 600; color: var(--t1); }


.av {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-weight: 900;
  font-size: .68rem;
  flex-shrink: 0;
  color: #fff;
  user-select: none;
}
.av-28 { width: 28px; height: 28px; border-radius: 6px; }
.av-32 { width: 32px; height: 32px; border-radius: 7px; }
.av-40 { width: 40px; height: 40px; border-radius: 9px; font-size: .84rem; }
.av-56 { width: 56px; height: 56px; border-radius: 12px; font-size: 1.1rem; }


.avatar { display:flex; align-items:center; justify-content:center; border-radius:7px; font-weight:900; font-size:.68rem; flex-shrink:0; color:#fff; user-select:none; }
.avatar-sm { width:26px; height:26px; border-radius:5px; font-size:.6rem; }
.avatar-lg { width:40px; height:40px; border-radius:9px; font-size:.84rem; }
.avatar-xl { width:56px; height:56px; border-radius:12px; font-size:1.1rem; }


.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-header-left { flex: 1; min-width: 0; }
.page-header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.page-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--t1);
  letter-spacing: -.01em;
}
.page-title i { color: var(--amber); font-size: 1rem; }
.page-subtitle { font-size: .78rem; color: var(--t3); margin-top: 3px; }


.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--t1);
}
.card-body { padding: 18px; }
.mb-4 { margin-bottom: 16px; }


.stats-grid {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 0;
}


.stat-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.stat-hero-item {
  flex: 1 1 150px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 12px;
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
  background: color-mix(in srgb, var(--sh-c, var(--amber)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--sh-c, var(--amber)) 30%, transparent);
}
.stat-hero-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.stat-hero-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .8rem;
  background: color-mix(in srgb, var(--sh-c, var(--amber)) 20%, transparent);
  color: var(--sh-c, var(--amber));
}
.stat-hero-body { min-width: 0; }
.stat-hero-v {
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--t1);
  line-height: 1;
}
.stat-hero-l {
  font-size: .62rem;
  color: var(--t3);
  margin-top: 2px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
@media(max-width: 700px) {
  .stat-hero-item { flex: 1 1 42%; }
}

.stat-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 10px;
  border-right: 1px solid var(--border);
  background: transparent;
  transition: background .13s;
  cursor: default;
  position: relative;
  overflow: hidden;
  min-width: 0;
}
.stat-card:last-child { border-right: none; }
.stat-card:hover { background: var(--bg-hover); }
.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: .86rem;
  flex-shrink: 0;
}
.stat-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  width: 100%;
}
.stat-value {
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--stat-color, var(--amber));
  line-height: 1;
  text-align: center;
  word-break: break-all;
}
.stat-label {
  font-size: .56rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--t3);
  text-align: center;
  white-space: nowrap;
}


.btn {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  padding: 0;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  background: var(--bg-raised);
  color: var(--t2);
  transition: filter .13s, transform .1s;
  vertical-align: middle;
}

.btn > i:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: rgba(0,0,0,.22);
  font-size: .8rem;
  color: inherit;
}

.btn > span {
  padding: 0 13px;
  color: inherit;
  line-height: 32px;
}

.btn:hover { filter: brightness(1.15); text-decoration: none; }
.btn:active { transform: scale(.96); }
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.btn:disabled, .btn.disabled { opacity: .38; cursor: not-allowed; pointer-events: none; }


.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}
.btn-icon > i:first-child {
  width: 100%; height: 100%;
  background: transparent;
  font-size: .78rem;
}


.btn-primary  { background: #3b7dd8; color: #fff; }
.btn-primary > i:first-child { background: rgba(0,0,0,.2); color: #fff; }

.btn-secondary { background: var(--bg-raised); color: #c4c9d4; border: 1px solid var(--border-md); }
.btn-secondary > i:first-child { background: rgba(255,255,255,.06); color: inherit; }
.btn-secondary:hover { filter: none; background: var(--bg-hover); color: var(--t1); border-color: var(--border-hi); }

.btn-ghost  { background: transparent; color: #9ca3af; border: 1px solid rgba(255,255,255,.18); }
.btn-ghost > i:first-child { background: transparent; color: inherit; }
.btn-ghost:hover { filter: none; background: var(--bg-hover); color: var(--t1); border-color: rgba(255,255,255,.28); }

.btn-brand  { background: rgba(245,158,11,.16); color: var(--amber); border: 1px solid rgba(245,158,11,.28); }
.btn-brand > i:first-child { background: rgba(0,0,0,.15); color: inherit; }

.btn-success { background: #14532d; color: #86efac; border: 1px solid rgba(34,197,94,.35); font-weight: 700; }
.btn-success > i:first-child { background: rgba(0,0,0,.2); color: inherit; }
.btn-success:hover { filter: none; background: #166534; border-color: rgba(34,197,94,.5); color: #a7f3d0; }

.btn-danger { background: #450a0a; color: #fca5a5; border: 1px solid rgba(239,68,68,.35); font-weight: 700; }
.btn-danger > i:first-child { background: rgba(0,0,0,.2); color: inherit; }
.btn-danger:hover { filter: none; background: #7f1d1d; border-color: rgba(239,68,68,.5); color: #fecaca; }

.btn-warning { background: rgba(251,191,36,.12); color: #fcd34d; border: 1px solid rgba(251,191,36,.3); }
.btn-warning > i:first-child { background: rgba(0,0,0,.12); color: inherit; }
.btn-warning:hover { filter: none; background: rgba(251,191,36,.2); }

.btn-info   { background: #172554; color: #93c5fd; border: 1px solid rgba(59,130,246,.35); }
.btn-info > i:first-child { background: rgba(0,0,0,.2); color: inherit; }
.btn-info:hover { filter: none; background: #1e3a5f; border-color: rgba(59,130,246,.5); color: #bfdbfe; }


.btn-sm { font-size: .7rem; border-radius: 6px; }
.btn-sm > i:first-child { width: 26px; height: 26px; font-size: .72rem; }
.btn-sm > span { padding: 0 10px; line-height: 26px; }
.btn-sm.btn-icon { width: 26px; height: 26px; border-radius: 6px; }

.btn-lg { font-size: .86rem; border-radius: 9px; }
.btn-lg > i:first-child { width: 40px; height: 40px; font-size: .9rem; }
.btn-lg > span { padding: 0 16px; line-height: 40px; }
.btn-lg.btn-icon { width: 40px; height: 40px; border-radius: 9px; }

.btn-block { width: 100%; }
.btn-block > span { flex: 1; text-align: center; }


.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--t3);
}
.form-label .req { color: var(--red); margin-left: 2px; }
.form-control, .form-select {
  display: block;
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-md);
  border-radius: var(--r);
  color: var(--t1);
  font-size: .84rem;
  font-family: inherit;
  transition: border-color .14s, box-shadow .14s;
  appearance: none;
  -webkit-appearance: none;
}
.form-select option {
  background: var(--bg-card);
  color: var(--t1);
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245,158,11,.12);
}
.form-control::placeholder { color: var(--t4); }
.form-control:read-only { opacity: .5; cursor: not-allowed; }
.form-control:disabled { opacity: .5; cursor: not-allowed; background: var(--bg-raised); }
textarea.form-control { resize: vertical; min-height: 80px; }


.search-box { position: relative; }
.search-box > i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--t3);
  font-size: .74rem;
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: 8px 10px 8px 30px;
  background: var(--bg-input);
  border: 1px solid var(--border-md);
  border-radius: var(--r);
  color: var(--t1);
  font-size: .8rem;
  transition: border-color .14s, box-shadow .14s;
}
.search-box input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245,158,11,.1);
}
.search-box input::placeholder { color: var(--t4); }


.input-group { display: flex; }
.input-group .form-control { border-radius: var(--r) 0 0 var(--r); border-right: none; }
.input-group .btn { border-radius: 0 var(--r) var(--r) 0; }


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


.scroll-list {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-md) transparent;
}
.scroll-list::-webkit-scrollbar { width: 3px; }
.scroll-list::-webkit-scrollbar-track { background: transparent; }
.scroll-list::-webkit-scrollbar-thumb {
  background: var(--border-md);
  border-radius: 99px;
  transition: background .2s;
}
.scroll-list::-webkit-scrollbar-thumb:hover { background: var(--border-hi); }
table { width: 100%; border-collapse: collapse; }
thead { background: rgba(255,255,255,.03); }
th {
  padding: 10px 14px;
  font-size: .64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--t3);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 11px 14px;
  font-size: .8rem;
  color: var(--t2);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-hover); }
.td-mono { font-family: 'Orbitron', monospace; font-size: .68rem; font-weight: 700; color: var(--amber); letter-spacing: .03em; }
.cell-user { display: flex; align-items: center; gap: 9px; }
.cell-user-name { font-weight: 600; color: var(--t1); font-size: .82rem; }
.cell-user-sub  { font-size: .68rem; color: var(--t3); margin-top: 1px; }
.timestamp { font-size: .72rem; color: var(--ts); white-space: nowrap; }

.ts      { color: var(--ts); font-size: .72rem; white-space: nowrap; }
.ts-sm   { color: var(--ts); font-size: .64rem; white-space: nowrap; }
.ts-xs   { color: var(--ts); font-size: .60rem; white-space: nowrap; }
.ts-pill { display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:99px;background:rgba(129,140,248,.1);border:1px solid rgba(129,140,248,.22);color:var(--ts);font-size:.62rem;font-weight:600;white-space:nowrap; }


.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge-amber   { background: rgba(245,158,11,.15); color: var(--amber2); }
.badge-green   { background: rgba(34,197,94,.15);  color: #4ade80; }
.badge-red     { background: rgba(239,68,68,.15);  color: #fca5a5; }
.badge-blue    { background: rgba(59,130,246,.15); color: #93c5fd; }
.badge-purple  { background: rgba(168,85,247,.15); color: #d8b4fe; }
.badge-cyan    { background: rgba(6,182,212,.15);  color: #67e8f9; }
.badge-gray    { background: rgba(255,255,255,.07);color: var(--t2); }
.badge-success { background: rgba(34,197,94,.15);  color: #4ade80; }
.badge-danger  { background: rgba(239,68,68,.15);  color: #fca5a5; }
.badge-warning { background: rgba(245,158,11,.15); color: var(--amber2); }
.badge-brown   { background: #78350f; color: #fef3c7; border: 1px solid rgba(0,0,0,.25); box-shadow: 0 1px 4px rgba(0,0,0,.35); }


.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: .63rem;
  font-weight: 700;
}


.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: var(--r);
  font-size: .82rem;
  margin-bottom: 14px;
}
.alert i { flex-shrink: 0; margin-top: 1px; }
.alert-success { background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.25); color: #4ade80; }
.alert-danger  { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.25); color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.25); color: var(--amber2); }
.alert-info    { background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.25); color: #93c5fd; }


.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(5px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.7);
  position: relative;
}
.modal-box::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 3px;
  background: var(--modal-accent, var(--amber));
  border-radius: 3px 0 0 3px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  font-weight: 800;
  color: var(--t1);
}
.modal-close {
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--t3);
  cursor: pointer;
  font-size: .84rem;
  transition: background .12s, color .12s;
}
.modal-close:hover { background: var(--bg-hover); color: var(--t1); }
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
}
.modal-body::-webkit-scrollbar { width: 3px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 99px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: var(--border-hi); }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}


.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 16px;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--t2);
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
  text-decoration: none;
}
.page-btn:hover { border-color: var(--amber); color: var(--amber); }
.page-btn.active { background: var(--amber); color: #000; border-color: var(--amber); font-weight: 800; }
.page-btn.disabled { opacity: .35; pointer-events: none; }


.empty-state {
  text-align: center;
  padding: 52px 24px;
  color: var(--t3);
}
.empty-state i { font-size: 2.4rem; opacity: .12; display: block; margin-bottom: 12px; }
.empty-state p { font-size: .84rem; }


.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
.gap-4 { gap: 16px; }


.text-brand  { color: var(--amber); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-blue   { color: var(--blue); }
.text-purple { color: var(--purple); }
.text-muted  { color: var(--t3); }


.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.font-mono { font-family: 'Orbitron', monospace; }
.font-bold { font-weight: 700; }
.text-sm { font-size: .78rem; }
.text-xs { font-size: .68rem; }
.req { color: var(--red); }


.flash { padding: 12px 16px; border-radius: var(--r); margin-bottom: 16px; font-size: .82rem; display: flex; align-items: center; gap: 8px; }
.flash-success { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.25); color: #4ade80; }
.flash-danger  { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.25); color: #fca5a5; }
.flash-warning { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.25); color: var(--amber2); }


.dt-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 10px; }
.dt-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; transition: transform .15s, border-color .15s; }
.dt-card:hover { transform: translateY(-2px); border-color: var(--border-md); }
.dt-custody { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.dt-custody-ico { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: .74rem; flex-shrink: 0; }
.dt-custody-label { font-size: .76rem; font-weight: 700; color: var(--t1); }
.dt-custody-sub { font-size: .64rem; color: var(--t3); }
.dt-transit { display: inline-flex; align-items: center; gap: 4px; font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 99px; background: rgba(245,158,11,.12); color: var(--amber2); border: 1px solid rgba(245,158,11,.25); margin-left: auto; flex-shrink: 0; }
.dt-body { padding: 10px 14px; }
.dt-ticket { font-size: .68rem; font-family: 'Orbitron', monospace; font-weight: 900; color: var(--amber); margin-bottom: 3px; letter-spacing: .04em; }
.dt-device { font-size: .84rem; font-weight: 700; color: var(--t1); margin-bottom: 2px; }
.dt-cust { font-size: .72rem; color: var(--t3); display: flex; align-items: center; gap: 5px; }
.dt-fault { font-size: .7rem; color: var(--t3); margin-top: 5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dt-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--border); background: rgba(255,255,255,.01); }
.dt-age { font-size: .64rem; color: var(--t4); }
.dt-tiles { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin-bottom: 14px; }
.dt-tile { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; text-decoration: none; transition: all .14s; }
.dt-tile:hover { border-color: var(--border-md); transform: translateY(-1px); }
.dt-tile.active { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.dt-tile-ico { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .8rem; flex-shrink: 0; }
.dt-tile-n { font-size: 1.1rem; font-weight: 900; color: var(--t1); font-family: 'Orbitron', monospace; line-height: 1; }
.dt-tile-l { font-size: .6rem; text-transform: uppercase; letter-spacing: .05em; color: var(--t3); margin-top: 1px; }
.dt-empty { padding: 48px 20px; text-align: center; color: var(--t3); grid-column: 1/-1; }
.dt-empty i { font-size: 2rem; opacity: .08; display: block; margin-bottom: 10px; }
@media(max-width:900px){ .dt-tiles{grid-template-columns:repeat(3,1fr)} }
@media(max-width:600px){ .dt-tiles{grid-template-columns:repeat(2,1fr)} }
@keyframes dtPulse{0%,100%{opacity:1}50%{opacity:.35}}
.dt-pulse { animation: dtPulse 1.2s infinite; }


.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.toolbar .search-box { flex: 1; min-width: 160px; max-width: 280px; }


.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tl-item:last-child { border-bottom: none; }
.tl-dot { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.tl-dot-green { background: rgba(34,197,94,.18); border: 2px solid var(--green); }
.tl-dot-amber { background: rgba(245,158,11,.18); border: 2px solid var(--amber); }
.tl-dot-blue  { background: rgba(59,130,246,.18); border: 2px solid var(--blue); }
.tl-dot i { font-size: .44rem; }


.pay-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 12px; }
.pay-cell { text-align: center; padding: 10px 8px; background: var(--bg-raised); border-radius: var(--r); border: 1px solid var(--border); }
.pay-val { font-size: .9rem; font-weight: 800; }
.pay-lbl { font-size: .58rem; text-transform: uppercase; letter-spacing: .06em; color: var(--t3); margin-top: 3px; }


.cust-steps { display: flex; align-items: center; padding: 10px 16px; background: var(--bg-raised); border-bottom: 1px solid var(--border); overflow-x: auto; gap: 0; }
.cust-step { display: flex; align-items: center; }
.cs-node { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cs-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-md); background: var(--bg-card); display: flex; align-items: center; justify-content: center; font-size: .6rem; color: var(--t3); }
.cs-dot.done { border-color: var(--green); background: rgba(34,197,94,.12); color: var(--green); }
.cs-dot.active { border-color: var(--amber); background: rgba(245,158,11,.12); color: var(--amber); }
.cs-lbl { font-size: .54rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--t3); text-align: center; }
.cs-line { flex: 1; height: 2px; background: var(--border); margin: 0 4px; min-width: 20px; border-radius: 99px; }
.cs-line.done { background: var(--green); }


.js-layout { display: grid; grid-template-columns: 200px 1fr 240px; gap: 10px; align-items: start; }
@media(max-width:1024px){ .js-layout{grid-template-columns:180px 1fr} }
@media(max-width:760px){ .js-layout{grid-template-columns:1fr} }
.js-job-list { overflow-y: auto; max-height: calc(100vh - 150px); }
.js-job-item { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; text-decoration: none; color: inherit; transition: background .12s; }
.js-job-item:hover { background: var(--bg-hover); }
.js-job-item.active { background: rgba(245,158,11,.08); border-left: 3px solid var(--amber); }
.js-job-item:last-child { border-bottom: none; }
.js-preset { display: flex; flex-wrap: wrap; gap: 4px; }
.js-preset-btn { padding: 3px 9px; border-radius: 99px; border: 1px solid var(--border-md); background: var(--bg-raised); font-size: .67rem; font-weight: 600; color: var(--t3); cursor: pointer; transition: all .13s; font-family: inherit; }
.js-preset-btn:hover { border-color: var(--amber); color: var(--amber); background: rgba(245,158,11,.08); }


.rj-steps { display: flex; align-items: center; margin-bottom: 20px; }
.rj-step { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 76px; cursor: pointer; }
.rj-step-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border-md); background: var(--bg-card); color: var(--t3); display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 800; transition: all .18s; }
.rj-step-lbl { font-size: .58rem; text-transform: uppercase; letter-spacing: .06em; color: var(--t3); text-align: center; }
.rj-step.active .rj-step-dot { border-color: var(--amber); background: rgba(245,158,11,.14); color: var(--amber); box-shadow: 0 0 0 4px rgba(245,158,11,.12); }
.rj-step.active .rj-step-lbl { color: var(--amber); font-weight: 700; }
.rj-step.done .rj-step-dot { border-color: var(--green); background: rgba(34,197,94,.14); color: var(--green); }
.rj-step.done .rj-step-lbl { color: var(--green); }
.rj-step-line { flex: 1; height: 2px; background: var(--border); margin: 0 6px; margin-bottom: 18px; border-radius: 99px; transition: background .18s; }
.rj-step-line.done { background: var(--green); }
.rj-panel { display: none; }
.rj-panel.rj-active { display: block; }
.rj-next { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0; background: var(--amber); color: #000; border: none; border-radius: 7px; font-size: .86rem; font-weight: 900; cursor: pointer; font-family: inherit; overflow: hidden; }
.rj-next > i:first-child { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: rgba(0,0,0,.2); flex-shrink: 0; }
.rj-next > span { padding: 0 14px; }
.rj-next:hover { filter: brightness(1.1); }
.rj-back { display: flex; align-items: center; gap: 7px; padding: 10px 16px; background: transparent; border: 1px solid var(--border-md); border-radius: 7px; color: var(--t2); cursor: pointer; font-size: .82rem; font-weight: 600; font-family: inherit; transition: background .13s; }
.rj-back:hover { background: var(--bg-hover); }
.rj-nav { display: flex; gap: 10px; margin-top: 16px; }
.rj-submit { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0; background: var(--green); color: #fff; border: none; border-radius: 7px; font-size: .88rem; font-weight: 900; cursor: pointer; font-family: inherit; overflow: hidden; }
.rj-submit > i:first-child { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: rgba(0,0,0,.2); flex-shrink: 0; }
.rj-submit > span { padding: 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border: 1px solid var(--border-md); border-radius: 99px; font-size: .7rem; font-weight: 600; color: var(--t3); cursor: pointer; background: var(--bg-raised); user-select: none; transition: all .13s; }
.chip input { display: none; }
.chip.on { background: rgba(245,158,11,.12); border-color: var(--amber); color: var(--amber); }
.cond-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.cond-opt { border: 2px solid var(--border); border-radius: var(--r-lg); padding: 14px 10px; cursor: pointer; text-align: center; background: var(--bg-input); transition: all .15s; }
.cond-opt:hover { border-color: var(--border-md); }
.cond-opt.on { border-color: var(--cc,var(--amber)); background: rgba(0,0,0,.18); }
.cond-opt input { display: none; }


.sett-grid { display: grid; grid-template-columns: 196px 1fr; }
.sett-nav { border-right: 1px solid var(--border); padding: 10px 0; }
.sett-nav-item { display: flex; align-items: center; gap: 9px; padding: 9px 16px; font-size: .8rem; font-weight: 600; color: var(--t3); cursor: pointer; transition: all .13s; text-decoration: none; border-left: 3px solid transparent; }
.sett-nav-item:hover { background: var(--bg-hover); color: var(--t1); }
.sett-nav-item.active { color: var(--amber); background: rgba(245,158,11,.07); border-left-color: var(--amber); }
.sett-panel { display: none; padding: 24px; }
.sett-panel.active { display: block; }
.sett-section { margin-bottom: 28px; }
.sett-section-title { font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--t3); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px; }
.sett-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media(max-width:700px){ .sett-row{grid-template-columns:1fr} }


.jd-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); z-index: 2000; opacity: 0; pointer-events: none; transition: opacity .22s; }
.jd-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.jd-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(660px,100vw); background: var(--bg-card); border-left: 1px solid var(--border-md); z-index: 2001; display: flex; flex-direction: column; transform: translateX(110%); transition: transform .26s cubic-bezier(.4,0,.2,1); box-shadow: -8px 0 48px rgba(0,0,0,.7); }
.jd-drawer-overlay.open .jd-drawer { transform: translateX(0); }
.jd-dhead { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; gap: 12px; }
.jd-dbody { flex: 1; overflow-y: auto; scrollbar-width: thin; }
.jd-dbody::-webkit-scrollbar { width: 3px; }
.jd-dbody::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 99px; }
.jd-dbody::-webkit-scrollbar-thumb:hover { background: var(--border-hi); }
.jd-dfoot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-shrink: 0; }
.jd-section { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.jd-section:last-child { border-bottom: none; }
.jd-sec-lbl { font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--t3); margin-bottom: 9px; display: flex; align-items: center; gap: 5px; }
.jd-ticket { font-family: 'Orbitron', monospace; font-size: .8rem; font-weight: 900; color: var(--amber); letter-spacing: .05em; }
.jd-fin-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-bottom: 10px; }
.jd-fin-cell { text-align: center; padding: 9px 7px; background: var(--bg-raised); border-radius: var(--r); }
.jd-stage { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.jd-stage:last-child { border-bottom: none; }
.jd-log-row { display: flex; align-items: flex-start; gap: 9px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.jd-log-row:last-child { border-bottom: none; }


.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.login-box { width: 100%; max-width: 400px; }
.login-logo { font-family: 'Orbitron', monospace; font-size: 1.3rem; font-weight: 900; background: linear-gradient(120deg, var(--amber2), var(--amber)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 4px; }
.login-sub { font-size: .8rem; color: var(--t3); margin-bottom: 28px; }
.login-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; }


.portal-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.portal-logo { font-family: 'Orbitron', monospace; font-size: 1.5rem; font-weight: 900; background: linear-gradient(120deg, var(--amber2), var(--amber)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-align: center; margin-bottom: 6px; }
.portal-sub { text-align: center; font-size: .84rem; color: var(--t3); margin-bottom: 36px; }
.portal-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; max-width: 480px; }
.portal-btn { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); cursor: pointer; text-decoration: none; color: inherit; transition: border-color .14s, transform .14s, box-shadow .14s; }
.portal-btn:hover { border-color: var(--amber); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.portal-ico { width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.portal-name { font-size: .9rem; font-weight: 800; color: var(--t1); }
.portal-desc { font-size: .72rem; color: var(--t3); margin-top: 2px; }


@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.4} }


@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); width: 232px; }
  .sidebar.open { transform: translateX(0); }
  .sb-overlay.open { display: block; }
  .topbar { left: 0; }
  .topbar-hamburger { display: flex; }
  .content { margin-left: 0; padding-top: calc(var(--topbar-h) + 16px); padding-left: 16px; padding-right: 16px; }
  .stats-grid { flex-wrap: wrap; }
  .stats-grid .stat-card { flex: 1 1 45%; border-bottom: 1px solid var(--border); }
  .dt-tiles { grid-template-columns: repeat(2,1fr); }
  .sett-grid { grid-template-columns: 1fr; }
  .sett-nav { border-right: none; border-bottom: 1px solid var(--border); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .js-layout { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats-grid .stat-card { flex: 1 1 100%; }
  .portal-grid { grid-template-columns: 1fr; }
  .dt-tiles { grid-template-columns: repeat(2,1fr); }
}


@media print {
  .sidebar, .topbar, .btn, .pagination, .no-print { display: none !important; }
  .content { margin-left: 0; padding: 0; }
}




.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media(max-width:640px){ .form-row-2,.form-row-3 { grid-template-columns: 1fr; } }


.card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.015);
}


.card-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding: 0 4px;
  margin-bottom: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.card-tabs::-webkit-scrollbar { display: none; }
.card-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--t3);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: color .13s, border-color .13s;
  cursor: pointer;
}
.card-tab:hover { color: var(--t1); }
.card-tab.active { color: var(--amber); border-bottom-color: var(--amber); }


.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.7);
  animation: fadeIn .18s ease;
}
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.015);
}


.photo-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--t2);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}


.cam-widget {
  border: 2px dashed var(--border-md);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .2s;
  background: var(--bg);
}
.cam-widget:has(img[style*="block"]),
.cam-widget.has-photo {
  border-color: var(--amber);
  border-style: solid;
}


.cam-preview-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cam-preview-wrap video,
.cam-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cam-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--t4);
  user-select: none;
  width: 100%;
  height: 100%;
  padding: 20px;
  text-align: center;
}
.cam-placeholder i {
  font-size: 1.8rem;
  color: var(--t4);
}
.cam-placeholder span {
  font-size: .72rem;
  color: var(--t4);
  line-height: 1.4;
}


.cam-btns {
  display: flex;
  gap: 6px;
  padding: 8px;
  background: rgba(0,0,0,.25);
  border-top: 1px solid var(--border);
}
.cam-btns .btn,
.cam-capture-btns .btn {
  font-size: .72rem;
  padding: 6px 10px;
}


.cam-capture-btns {
  display: flex;
  gap: 6px;
  padding: 8px;
  background: rgba(0,0,0,.35);
  border-top: 1px solid var(--border);
}


.photo-field {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .18s;
}
.photo-field:focus-within,
.photo-field.active {
  border-color: rgba(245,158,11,.4);
  box-shadow: 0 0 0 3px rgba(245,158,11,.08);
}
.photo-field-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.photo-field-title {
  font-size: .78rem;
  font-weight: 700;
  color: var(--t2);
  flex: 1;
}
.photo-field-badge {
  font-size: .6rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(239,68,68,.12);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,.2);
}
.photo-field-badge.opt {
  background: rgba(255,255,255,.06);
  color: var(--t4);
  border-color: var(--border);
}
.photo-field-body {
  padding: 0;
}
.photo-field-body .cam-widget {
  border: none;
  border-radius: 0;
}
.photo-field-note {
  padding: 6px 14px 10px;
  font-size: .66rem;
  color: var(--t4);
  line-height: 1.5;
}
