/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --primary:        #e30613;
  --primary-hover:  #c10510;
  --primary-soft:   #ff2a36;
  --primary-tint:   #fff1f1;
  --ring:           rgba(227, 6, 19, .16);

  --sk-green:       #2d9b3f;
  --sk-blue:        #1e6bb8;
  --sk-orange:      #f5a623;
  --sk-purple:      #4b4ebb;
  --sk-cyan:        #00aeef;
  --sk-yellow:      #f7d117;

  --bg:             #f7f6f4;
  --surface:        #ffffff;
  --surface-2:      #fafbfc;
  --sidebar-bg:     #ffffff;
  --sidebar-border: #f0e4e4;

  --border:         #e8eaee;
  --border-strong:  #d9dde4;

  --text:           #131a24;
  --text-2:         #5a6474;
  --text-3:         #8d96a5;

  --success:        #16a34a;
  --success-tint:   #e8f8ee;
  --warn:           #d97706;
  --warn-tint:      #fdf3e2;
  --danger:         #dc2626;
  --danger-tint:    #fdeaea;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 26px -14px rgba(16, 24, 40, .18);
  --shadow-lg: 0 18px 48px -20px rgba(16, 24, 40, .28);

  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 14px;

  --sidebar-w: 268px;
  --topbar-h: 58px;
  --foot-h: 42px;
  --ease: cubic-bezier(.4, 0, .2, 1);

  color-scheme: light;
}

html[data-theme="dark"] {
  --primary:        #ff3b47;
  --primary-hover:  #ff5a64;
  --primary-soft:   #e30613;
  --primary-tint:   rgba(227, 6, 19, .16);
  --ring:           rgba(255, 59, 71, .22);

  --bg:             #0c0e13;
  --surface:        #141821;
  --surface-2:      #191e28;
  --sidebar-bg:     #161014;
  --sidebar-border: #2c1a1d;

  --border:         #232935;
  --border-strong:  #303845;

  --text:           #eef1f6;
  --text-2:         #a2abbb;
  --text-3:         #6e7788;

  --success:        #4ade80;
  --success-tint:   rgba(74, 222, 128, .13);
  --warn:           #fbbf24;
  --warn-tint:      rgba(251, 191, 36, .13);
  --danger:         #f87171;
  --danger-tint:    rgba(248, 113, 113, .13);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 26px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 18px 48px -20px rgba(0, 0, 0, .8);

  color-scheme: dark;
}

/* ============================================================
   BASE
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1.55;
  letter-spacing: .01em;
  word-spacing: .04em;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .25s var(--ease), color .25s var(--ease);
}

h1, h2, h3, h4 { font-weight: 800; letter-spacing: 0; line-height: 1.25; }

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

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 20px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ============================================================
   LAYOUT
   ============================================================ */
.layout { display: flex; min-height: 100vh; }

/* ---------- SIDEBAR ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  padding: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  transition: background .25s var(--ease), border-color .25s var(--ease), width .28s var(--ease), padding .28s var(--ease), opacity .2s var(--ease);
}

.layout.sidebar-closed .sidebar {
  width: 0;
  min-width: 0;
  padding: 0;
  border-right: none;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.sidebar-backdrop {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  padding: 0 14px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand-img {
  height: calc(var(--topbar-h) - 14px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  display: block;
}
html[data-theme="dark"] .brand-img {
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
}

.nav-group { display: flex; flex-direction: column; gap: 3px; }

.nav-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  transition: all .18s var(--ease);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }

.nav-item:hover { background: var(--primary-tint); color: var(--primary); }

.nav-item.active {
  background: linear-gradient(135deg, var(--primary-soft), var(--primary));
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(227, 6, 19, .75);
}

.nav-tree > .nav-item.active {
  background: var(--primary-tint);
  color: var(--primary);
  box-shadow: none;
}

.sidebar-foot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: var(--foot-h);
  min-height: var(--foot-h);
  padding: 0 14px;
  background: var(--sidebar-bg);
  border-top: 1px solid var(--sidebar-border);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all .18s var(--ease);
}
.btn-logout-ico {
  width: 24px; height: 24px;
  border-radius: 7px;
  background: rgba(220, 38, 38, .1);
  color: #dc2626;
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: all .18s var(--ease);
}
.btn-logout-ico svg { width: 13px; height: 13px; }
.btn-logout:hover { color: #dc2626; }
.btn-logout:hover .btn-logout-ico { color: #b91c1c; }

.avatar {
  width: 36px; height: 36px;
  border-radius: 6px;
  background: linear-gradient(140deg, #ff8a90, #e30613);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 13px;
  flex-shrink: 0;
}

.user-meta { min-width: 0; }
.user-meta strong { display: block; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: 11.5px; color: var(--text-3); font-weight: 600; }

/* ---------- MAIN ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  transition: background .25s var(--ease), border-color .25s var(--ease);
}

.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title h1 { font-size: 15px; font-weight: 800; }

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

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: grid; place-items: center;
  cursor: pointer;
  transition: all .18s var(--ease);
  position: relative;
}

.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-tint); }
.icon-btn svg { width: 17px; height: 17px; pointer-events: none; }
.theme-toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-2);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--primary); }
.theme-toggle svg { width: 18px; height: 18px; pointer-events: none; }
.ico-sun { display: block; }
.ico-moon { display: none; }
html[data-theme="dark"] .ico-sun { display: none; }
html[data-theme="dark"] .ico-moon { display: block; }

.icon-btn .dot {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--surface);
}

.user-menu { position: relative; }
.avatar-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-menu .avatar-btn:hover { border-color: var(--primary); }

.user-dd {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 228px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: all .18s var(--ease);
}
.user-menu.open .user-dd { opacity: 1; transform: translateY(0); pointer-events: auto; }

.user-dd-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 12px;
}
.user-dd-head .avatar { width: 36px; height: 36px; font-size: 12px; }
.user-dd-head strong { display: block; font-size: 13px; font-weight: 800; }
.user-dd-head span { font-size: 11.5px; color: var(--text-3); font-weight: 600; }

.user-dd a,
.user-dd button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: all .13s var(--ease);
}
.user-dd a svg,
.user-dd button svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-2); }
.user-dd a:hover,
.user-dd button:hover { background: var(--primary-tint); color: var(--primary); }
.user-dd a:hover svg,
.user-dd button:hover svg { color: var(--primary); }
.user-dd button.danger {
  color: #dc2626;
  background: rgba(220, 38, 38, .07);
  margin-top: 2px;
  padding: 7px 10px;
  font-size: 13px;
}
.user-dd button.danger svg { color: #dc2626; }
.user-dd button.danger:hover { background: transparent; color: #b91c1c; }
.user-dd button.danger:hover svg { color: #b91c1c; }
.user-dd-sep { height: 1px; background: var(--border); margin: 4px 4px 6px; }

.content { padding: 20px 28px 24px; flex: 1; display: flex; flex-direction: column; gap: 16px; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.card-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.card-head .btn { height: 34px; padding: 0 12px; gap: 4px; }
.card-head .btn-icon {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
}
.card-head .btn-icon svg { width: 18px; height: 18px; }
.export-menu { position: relative; }
.export-menu-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 148px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
}
.export-menu-pop a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.export-menu-pop a:hover { background: var(--primary-tint); color: var(--primary); }
.export-menu-pop svg { width: 16px; height: 16px; flex-shrink: 0; }
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 40;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 6px;
  background: #131a24;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
[data-tip]:hover::after,
[data-tip]:focus-visible::after { opacity: 1; visibility: visible; }
.export-menu > [data-tip]::after { left: auto; right: 0; transform: none; }
.act-btn[data-tip]::after {
  left: auto;
  right: calc(100% + 6px);
  bottom: auto;
  top: 50%;
  transform: translateY(-50%);
}
.card-head h2 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 12px 0;
}

.page-foot {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--foot-h);
  min-height: var(--foot-h);
  padding: 0 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}
.page-foot b { color: var(--text-2); font-weight: 700; }
.page-foot-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.foot-menu { display: none; }
.foot-menu-panel { display: none; }

/* ---------- PAGES ---------- */
.page { display: none; }
.page.active { display: block; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s var(--ease);
  white-space: nowrap;
  letter-spacing: -.01em;
}

.btn svg { width: 17px; height: 17px; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary-soft), var(--primary));
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(227, 6, 19, .9);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(227, 6, 19, .95); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-2);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-tint); }

.btn-soft {
  background: var(--primary-tint);
  color: var(--primary);
}
.btn-soft:hover { background: var(--primary); color: #fff; }

.btn-sm { padding: 8px 14px; font-size: 12.5px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
}
.btn-icon svg { width: 16px; height: 16px; }
.btn:disabled, .btn.is-loading { opacity: .75; pointer-events: none; transform: none !important; filter: none; }
.btn-spin {
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .55s linear infinite;
  flex-shrink: 0;
}
.btn-icon .btn-reload {
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   CARDS & GRID
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: background .25s var(--ease), border-color .25s var(--ease);
}

.card-pad { padding: 22px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 0;
}
#page-dashboard .dash-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-height: 0;
}
a.stat:hover { border-color: var(--border); color: inherit; }

.stat-ico {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--primary-tint);
  color: var(--primary);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.stat-ico svg { width: 18px; height: 18px; }
.stat-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }

.stat:nth-child(1) .stat-ico { background: #fff1f1; color: var(--primary); }
.stat:nth-child(2) .stat-ico { background: #e8f6ec; color: var(--sk-green); }
.stat:nth-child(3) .stat-ico { background: #e8f1fb; color: var(--sk-blue); }
.stat:nth-child(4) .stat-ico { background: #fff6e8; color: var(--sk-orange); }

html[data-theme="dark"] .stat:nth-child(1) .stat-ico { background: rgba(227, 6, 19, .16); color: #ff5a64; }
html[data-theme="dark"] .stat:nth-child(2) .stat-ico { background: rgba(45, 155, 63, .16); color: #4ade80; }
html[data-theme="dark"] .stat:nth-child(3) .stat-ico { background: rgba(30, 107, 184, .16); color: #60a5fa; }
html[data-theme="dark"] .stat:nth-child(4) .stat-ico { background: rgba(245, 166, 35, .16); color: #fbbf24; }

.stat-label { font-size: 12px; font-weight: 700; color: var(--text-3); letter-spacing: .01em; line-height: 1.2; }
.stat-value { font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.stat-hint { font-size: 11px; font-weight: 700; color: var(--success); line-height: 1.3; }
.stat-hint.is-warn { color: var(--warn); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  position: relative; z-index: 1;
}
.pill svg { width: 12px; height: 12px; }
.pill-up { background: var(--success-tint); color: var(--success); }
.pill-warn { background: var(--warn-tint); color: var(--warn); }

.two-col {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  align-items: start;
}

/* ---------- CHART ---------- */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 210px;
  padding-top: 12px;
}

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

.bar-track { width: 100%; flex: 1; display: flex; align-items: flex-end; }

.bar {
  width: 100%;
  border-radius: 9px 9px 5px 5px;
  background: linear-gradient(180deg, var(--primary-soft), var(--primary));
  opacity: .9;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
  animation: grow .7s var(--ease) backwards;
  min-height: 6px;
}

.bar-col:hover .bar { opacity: 1; transform: scaleY(1.02); }

.bar-col:nth-child(1) .bar { background: linear-gradient(180deg, #3cb54a, var(--sk-green)); }
.bar-col:nth-child(2) .bar { background: linear-gradient(180deg, #3d8bd4, var(--sk-blue)); }
.bar-col:nth-child(3) .bar { background: linear-gradient(180deg, #ffb84d, var(--sk-orange)); }
.bar-col:nth-child(4) .bar { background: linear-gradient(180deg, #6b6fd4, var(--sk-purple)); }
.bar-col:nth-child(5) .bar { background: linear-gradient(180deg, #ff4d4d, var(--primary)); }
.bar-col:nth-child(6) .bar { background: linear-gradient(180deg, #5ec8ef, var(--sk-cyan)); }
.bar-col:nth-child(7) .bar { background: linear-gradient(180deg, #ffe14d, var(--sk-yellow)); }

@keyframes grow { from { height: 0 !important; } }

.bar-col span { font-size: 11px; font-weight: 700; color: var(--text-3); }

/* ---------- ACTIVITY ---------- */
.act-list { display: flex; flex-direction: column; }

.act {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--border);
}
.act:last-child { border-bottom: none; padding-bottom: 0; }
.act:first-child { padding-top: 4px; }

.act-dot {
  width: 34px; height: 34px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--primary-tint);
  color: var(--primary);
  flex-shrink: 0;
}
.act-dot svg { width: 16px; height: 16px; }
.act:nth-child(1) .act-dot { background: #fff1f1; color: var(--primary); }
.act:nth-child(2) .act-dot { background: #e8f6ec; color: var(--sk-green); }
.act:nth-child(3) .act-dot { background: #e8f1fb; color: var(--sk-blue); }
.act:nth-child(4) .act-dot { background: #fff6e8; color: var(--sk-orange); }
html[data-theme="dark"] .act:nth-child(1) .act-dot { background: rgba(227, 6, 19, .16); color: #ff5a64; }
html[data-theme="dark"] .act:nth-child(2) .act-dot { background: rgba(45, 155, 63, .16); color: #4ade80; }
html[data-theme="dark"] .act:nth-child(3) .act-dot { background: rgba(30, 107, 184, .16); color: #60a5fa; }
html[data-theme="dark"] .act:nth-child(4) .act-dot { background: rgba(245, 166, 35, .16); color: #fbbf24; }

.act-body { min-width: 0; }
.act-body strong { display: block; font-size: 13.5px; font-weight: 700; }
.act-body span { font-size: 12px; color: var(--text-3); font-weight: 600; }

/* ============================================================
   TABLE
   ============================================================ */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.tt-left, .tt-right { display: flex; align-items: center; gap: 10px; }

.search-box { position: relative; }

.search-box svg {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-3);
  pointer-events: none;
}

.search-box input {
  width: 360px;
  max-width: 100%;
  height: 34px;
  padding: 0 14px 0 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.search-box input::placeholder { color: var(--text-3); font-weight: 500; }
.search-box input:focus { border-color: var(--primary); box-shadow: none; background: var(--surface); }

.mini-select {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  outline: none;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.mini-select:focus { border-color: var(--primary); box-shadow: none; }

.table-toolbar .btn {
  height: 34px;
  padding: 0 12px;
  gap: 4px;
  box-shadow: none;
}
.table-toolbar .btn-soft {
  background: color-mix(in srgb, var(--primary) 72%, var(--surface));
  color: #fff;
  border-color: transparent;
}
.table-toolbar .btn-soft:hover {
  background: color-mix(in srgb, var(--primary) 86%, var(--surface));
  color: #fff;
  transform: none;
  filter: none;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
  font-family: 'IBM Plex Sans', 'Segoe UI', Roboto, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  word-spacing: .06em;
  font-feature-settings: "liga" 0, "calt" 0, "tnum" 1;
  font-variant-numeric: tabular-nums;
}

.data-table thead th {
  background: var(--surface-2);
  text-align: left;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.data-table th.sortable { cursor: pointer; transition: color .15s var(--ease); }
.data-table th.sortable:hover { color: var(--primary); }

.th-inner { display: inline-flex; align-items: center; gap: 6px; }
.sort-ico { width: 13px; height: 13px; opacity: .35; transition: opacity .15s var(--ease), transform .15s var(--ease); }
th.sorted .sort-ico { opacity: 1; color: var(--primary); }
th.sorted.desc .sort-ico { transform: rotate(180deg); }

.data-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0;
  word-spacing: .06em;
  vertical-align: middle;
}

.data-table tbody tr { transition: background .15s var(--ease); }
.data-table tbody tr:nth-child(even) { background: var(--surface-2); }
.data-table tbody tr:hover { background: var(--primary-tint); }
.data-table tbody tr:last-child td { border-bottom: none; }

.col-check { width: 40px; text-align: center !important; padding-left: 14px !important; padding-right: 0 !important; }
.col-check input[type=checkbox] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  vertical-align: middle;
}
.col-no { width: 62px; text-align: center !important; }
.col-no.cell { text-align: center; color: var(--text); font-weight: 700; }
.col-aksi { width: 1%; white-space: nowrap; text-align: right !important; }

.cell-name { display: flex; align-items: center; gap: 9px; }
.cell-name .avatar { width: 30px; height: 30px; border-radius: 6px; font-size: 11px; }
.cell-name strong { color: var(--text); font-weight: 600; font-size: 13.5px; display: block; letter-spacing: 0; word-spacing: .06em; }
.cell-name small { color: var(--text-3); font-size: 12px; font-weight: 500; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-aktif   { background: var(--success-tint); color: var(--success); }
.badge-pending { background: var(--warn-tint); color: var(--warn); }
.badge-nonaktif{ background: var(--danger-tint); color: var(--danger); }

.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.act-btn {
  width: 30px; height: 30px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .16s var(--ease);
  overflow: visible;
  flex-shrink: 0;
  font-size: 0;
  line-height: 0;
}
.act-btn svg { width: 15px; height: 15px; }
.act-btn.view { color: #2563eb; background: rgba(37, 99, 235, .1); border-color: rgba(37, 99, 235, .18); }
.act-btn.view:hover { color: #fff; background: #3b82f6; border-color: #3b82f6; }
.act-btn.edit { color: #ca8a04; background: rgba(234, 179, 8, .14); border-color: rgba(202, 138, 4, .22); }
.act-btn.edit:hover { color: #fff; background: #eab308; border-color: #eab308; }
.act-btn.del { color: #dc2626; background: rgba(220, 38, 38, .1); border-color: rgba(220, 38, 38, .2); }
.act-btn.del:hover { color: #fff; background: #ef4444; border-color: #ef4444; }
.act-btn.approve { color: #16a34a; background: rgba(22, 163, 74, .1); border-color: rgba(22, 163, 74, .2); }
.act-btn.approve:hover { color: #fff; background: #22c55e; border-color: #22c55e; }
.act-btn.reject { color: #dc2626; background: rgba(220, 38, 38, .1); border-color: rgba(220, 38, 38, .2); }
.act-btn.reject:hover { color: #fff; background: #ef4444; border-color: #ef4444; }
.act-btn.history { color: #2563eb; background: rgba(37, 99, 235, .1); border-color: rgba(37, 99, 235, .18); }
.act-btn.history:hover { color: #fff; background: #3b82f6; border-color: #3b82f6; }
.act-btn.preview { color: #2563eb; background: rgba(37, 99, 235, .1); border-color: rgba(37, 99, 235, .18); }
.act-btn.preview:hover { color: #fff; background: #3b82f6; border-color: #3b82f6; }
.table-bulk { display: inline-flex; margin: 0; padding: 0; }

/* ---------- TABLE FOOTER ---------- */
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  flex-wrap: wrap;
}

.dt-info { font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.dt-info b { color: var(--text); font-weight: 800; }

.pagination { display: flex; align-items: center; gap: 5px; }

.page-btn {
  min-width: 30px; height: 30px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: grid; place-items: center;
  transition: all .16s var(--ease);
}
.page-btn:hover:not(:disabled):not(.active) { border-color: var(--primary); color: var(--primary); background: var(--primary-tint); }
.page-btn.active {
  background: linear-gradient(135deg, var(--primary-soft), var(--primary));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px -9px rgba(227, 6, 19, .9);
}
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-btn svg { width: 15px; height: 15px; }
.page-dots { padding: 0 3px; color: var(--text-3); font-weight: 800; }

/* ---------- SKELETON ---------- */
.sk {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--border) 25%, var(--surface-2) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.empty-state { text-align: center; padding: 56px 20px; }
.empty-state svg { width: 46px; height: 46px; color: var(--text-3); margin-bottom: 12px; opacity: .6; }
.empty-state p { font-weight: 700; color: var(--text-2); }
.empty-state span { font-size: 13px; color: var(--text-3); font-weight: 600; }

/* ============================================================
   FORM
   ============================================================ */
.form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.form-head h3 { font-size: 16px; }
.form-head p { font-size: 12.5px; color: var(--text-3); font-weight: 600; margin-top: 2px; }

.form-body { padding: 24px; }

.form-section + .form-section { margin-top: 28px; padding-top: 26px; border-top: 1px dashed var(--border); }

.form-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 18px;
}
.form-section-title::before {
  content: '';
  width: 4px; height: 15px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary-soft), var(--primary));
}

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

.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 14px 2px;
  align-items: end;
}
.filter-bar > .field { flex: 0 1 180px; max-width: 200px; min-width: 140px; }
.filter-bar .filter-actions { flex: 0 0 auto; width: auto; }
.filter-bar .filter-actions .row-actions { justify-content: flex-start; }
.filter-bar .field label { margin-bottom: 0; }
.filter-bar .ns-trigger {
  height: 34px;
  min-height: 34px;
  padding: 0 32px 0 12px;
  font-size: 13px;
  border-radius: 10px;
  box-shadow: none;
}
.filter-bar .filter-actions .btn {
  height: 34px;
  min-height: 34px;
  width: 34px;
  padding: 0;
  border-radius: 10px;
  box-shadow: none;
}
.filter-bar .input:not(textarea) {
  height: 34px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 10px;
  box-shadow: none;
}
.filter-bar .ns.open .ns-trigger {
  box-shadow: none;
}
.filter-bar .ns-search input {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
}
.filter-bar .ns-search input:focus {
  box-shadow: none;
}
.nip-row { display: flex; gap: 8px; align-items: center; }
.nip-row input { flex: 1; min-width: 0; }
.nice-select.is-multi {
  min-height: 110px;
  padding: 8px 13px;
  width: 100%;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
}
.field .pick-box { background: var(--surface); }
.field .pick-list { max-height: 196px; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.check-grid { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.check-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.pick-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pick-box {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.pick-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pick-head label { margin: 0; }
.pick-count {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-tint);
  padding: 3px 8px;
  border-radius: 99px;
}
.pick-box .search-box,
.pick-box .search-box input { width: 100%; }
.pick-list { max-height: 220px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.pick-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-2);
}
.pick-item.is-hide,
.pick-item[hidden] { display: none !important; }
.pick-item:hover { background: var(--surface); color: var(--primary); }
.pick-item:has(input:checked) { background: var(--primary-tint); color: var(--primary); }
.pick-item input { margin-top: 2px; accent-color: var(--primary); }
.pick-item span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pick-item b { font-size: 13px; font-weight: 700; line-height: 1.3; }
.pick-item small { font-size: 11px; font-weight: 600; color: var(--text-3); }
.pick-empty { padding: 16px 8px; text-align: center; font-size: 12.5px; color: var(--text-3); font-weight: 600; }
@media (max-width: 720px) { .pick-row { grid-template-columns: 1fr; } }
.form-actions { display: flex; justify-content: center; align-items: center; gap: 10px; }
.form-actions .btn { height: 34px; padding: 0 12px; gap: 4px; }

.field label { font-size: 12.5px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.field label .req { color: var(--primary); margin-left: 2px; }
.field .hint, .hint { font-size: 11.5px; color: var(--text-3); font-weight: 600; }

.input, .textarea {
  width: 100%;
  padding: 9px 13px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: all .18s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); font-weight: 500; }
.input:focus, .textarea:focus,
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: none;
}
.textarea { resize: vertical; min-height: 96px; line-height: 1.6; }

.input-group { position: relative; display: flex; align-items: center; }
.input-group .ig-ico {
  position: absolute; left: 14px;
  width: 17px; height: 17px;
  color: var(--text-3);
  pointer-events: none;
}
.input-group .input { padding-left: 42px; }
.input-group .ig-prefix {
  position: absolute; left: 14px;
  font-size: 13.5px; font-weight: 800; color: var(--text-3);
  pointer-events: none;
}
.input-group .ig-prefix ~ .input { padding-left: 44px; }

/* ---------- RADIO PILLS ---------- */
.pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-group input { position: absolute; opacity: 0; pointer-events: none; }
.pill-group label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.pill-group label:hover { border-color: var(--primary); color: var(--primary); }
.pill-group input:checked + label {
  background: var(--primary-tint);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: none;
}

/* ---------- SWITCH ---------- */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.switch-row strong { display: block; font-size: 13.5px; font-weight: 700; }
.switch-row small { font-size: 11.5px; color: var(--text-3); font-weight: 600; }

.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0;
  background: var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: .22s var(--ease);
}
.switch .slider::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  left: 3px; top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: .22s var(--ease);
  box-shadow: 0 2px 5px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: linear-gradient(135deg, var(--primary-soft), var(--primary)); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ---------- FILE DROP ---------- */
.file-drop {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.file-drop:hover { border-color: var(--primary); background: var(--primary-tint); }
.file-drop input { display: none; }
.file-ico {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--primary-tint);
  color: var(--primary);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.file-ico svg { width: 20px; height: 20px; }
.file-drop strong { display: block; font-size: 13.5px; font-weight: 700; }
.file-drop small { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.file-drop.has-file { border-color: var(--primary); background: var(--primary-tint); }

/* ---------- FORM ACTIONS ---------- */
.form-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  flex-wrap: wrap;
  margin: 18px -18px -18px;
}
.form-actions .btn { height: 34px; padding: 0 12px; gap: 4px; }

/* ============================================================
   CUSTOM SELECT (select2 style)
   ============================================================ */
.ns { position: relative; width: 100%; }
.ns-native { display: none !important; }

.ns-trigger {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 13px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  text-align: left;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.ns-trigger::placeholder { color: var(--text-3); font-weight: 500; }
.ns-trigger:hover { border-color: var(--border-strong); }
.ns.open .ns-trigger,
.ns-trigger:focus { border-color: var(--primary); background: var(--surface); box-shadow: none; }
.ns-caret {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px; height: 16px;
  color: var(--text-3);
  transform: translateY(-50%);
  pointer-events: auto;
  cursor: pointer;
  transition: transform .22s var(--ease);
}
.ns.open .ns-caret { transform: translateY(-50%) rotate(180deg); color: var(--primary); }

.ns-panel {
  position: absolute;
  top: calc(100% + 7px);
  left: 0; right: 0;
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(.985);
  pointer-events: none;
  transition: all .18s var(--ease);
}
.ns.open .ns-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.ns-search { display: none; }
.ns-search input {
  width: 100%;
  padding: 9px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  transition: all .18s var(--ease);
}
.ns-search input:focus { border-color: var(--primary); box-shadow: none; }

.ns-list { list-style: none; max-height: 224px; overflow-y: auto; padding: 6px; }

.ns-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all .13s var(--ease);
}
.ns-opt:hover { background: var(--primary-tint); color: var(--primary); }
.ns-opt.selected { background: var(--primary-tint); color: var(--primary); font-weight: 800; }
.ns-opt.selected::after { content: '✓'; font-weight: 800; font-size: 13px; }
.ns-empty { padding: 18px; text-align: center; font-size: 13px; color: var(--text-3); font-weight: 600; }

/* ============================================================
   BOTTOM NAV (MOBILE)
   ============================================================ */
.bottom-nav {
  display: none;
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 90;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.bottom-nav-inner { display: flex; align-items: center; justify-content: space-around; gap: 4px; }

.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 15px;
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.bnav-item svg { width: 20px; height: 20px; }
.bnav-item.active { color: var(--primary); background: var(--primary-tint); }

/* ============================================================
   MODAL & TOAST
   ============================================================ */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(12, 14, 19, .55);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--ease);
}
.backdrop.show { opacity: 1; pointer-events: auto; }

.modal {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 26px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: scale(.94);
  transition: transform .22s var(--ease);
}
.backdrop.show .modal { transform: scale(1); }

.modal-ico {
  width: 54px; height: 54px;
  border-radius: 17px;
  display: grid; place-items: center;
  background: var(--danger-tint);
  color: var(--danger);
  margin: 0 auto 16px;
}
.modal-ico svg { width: 25px; height: 25px; }
.modal h3 { font-size: 17px; margin-bottom: 6px; }
.modal p { font-size: 13.5px; color: var(--text-3); font-weight: 600; margin-bottom: 22px; }
.modal p strong { color: var(--text); font-weight: 800; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

.toast-wrap {
  position: fixed;
  top: 18px; right: 18px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 700;
  min-width: 240px;
  animation: toastIn .3s var(--ease);
}
.toast.out { animation: toastOut .25s var(--ease) forwards; }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.ok { background: var(--success-tint); border-color: var(--success); color: var(--success); }
.toast.ok svg { color: var(--success); }
.toast.info { background: var(--primary-tint); border-color: var(--primary); color: var(--primary); }
.toast.info svg { color: var(--primary); }
.toast.warn { background: var(--warn-tint); border-color: var(--warn); color: var(--warn); }
.toast.warn svg { color: var(--warn); }

@keyframes toastIn  { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 80;
    transform: translateX(-100%);
    opacity: 1;
    width: var(--sidebar-w);
    padding: 0;
    border-right: 1px solid var(--sidebar-border);
    box-shadow: var(--shadow-lg);
    transition: transform .28s var(--ease);
    pointer-events: auto;
  }
  .layout.sidebar-closed .sidebar {
    width: var(--sidebar-w);
    padding: 0;
    border-right: 1px solid var(--sidebar-border);
    overflow: hidden;
    opacity: 1;
    transform: translateX(-100%);
  }
  .layout.sidebar-open .sidebar {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(12, 14, 19, .45);
    backdrop-filter: blur(3px);
  }
  .layout.sidebar-open .sidebar-backdrop { display: block; }
  .bottom-nav { display: block; }

  .content { padding: 12px 0 20px; }
  #page-dashboard,
  #page-form { padding-left: 16px; padding-right: 16px; }
  #page-data .card {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  #page-data .card-head { border-radius: 0; }
  .page-foot-meta { display: none; }
  .page-foot {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    min-height: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    z-index: 90;
    overflow: visible;
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 28px -18px rgba(16, 24, 40, .4);
  }
  .foot-menu {
    display: flex;
    width: 100%;
    overflow-x: auto;
    gap: 2px;
    scrollbar-width: none;
  }
  .foot-menu::-webkit-scrollbar { display: none; }
  .foot-menu .bnav-item { flex: 1 0 68px; min-width: 68px; text-decoration: none; }
  .foot-menu-panel {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: calc(100% + 8px);
    max-height: min(52vh, 360px);
    overflow: auto;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
  }
  .foot-menu-panel.is-open { display: flex; flex-direction: column; }
  .foot-menu-panel a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 700;
  }
  .foot-menu-panel a svg { width: 16px; height: 16px; flex-shrink: 0; }
  .foot-menu-panel a.active,
  .foot-menu-panel a:hover { background: var(--primary-tint); color: var(--primary); }
  .foot-menu-group {
    padding: 8px 12px 2px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-3);
  }
  .content { padding-bottom: 88px; }
  .topbar { padding: 0 14px; }
  .topbar-title h1 { font-size: 15px; }

  .form-grid { grid-template-columns: 1fr; }
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }
  .tt-left,
  .tt-right { width: 100%; }
  .search-box,
  .search-box input { width: 100%; }
  .table-footer { padding: 12px 14px; justify-content: center; }
  .dt-info { width: 100%; text-align: center; }
  .form-body { padding: 18px 16px; }
  .form-head { padding: 16px; }
  .form-actions { padding: 16px; }
  .form-actions .btn { flex: 1; }
  .toast-wrap { left: 16px; right: 16px; top: 12px; }
  .toast { min-width: 0; }
}

@media (max-width: 1100px) {
  #page-dashboard .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .stats-grid,
  #page-dashboard .dash-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat { padding: 10px 12px; gap: 10px; }
  .stat-value { font-size: 20px; }
  .stat-ico { width: 36px; height: 36px; }
  #page-dashboard .stat { min-height: 108px; padding: 14px; }
  #page-dashboard .stat-value { font-size: 24px; }
  #page-dashboard .stat-ico { width: 40px; height: 40px; }
  .dash-name { font-size: 18px; }
  .dash-hero { align-items: flex-start; flex-direction: column; gap: 4px; }
  .card-pad { padding: 16px; }
  .table-toolbar .btn span { display: none; }
  .table-toolbar .btn { padding: 0 12px; }
  .chart { height: 170px; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

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


/* ============================================================
   AUTH / LOGIN
   ============================================================ */
.auth-body { min-height: 100vh; display:flex; align-items:center; justify-content:center; padding:24px; background: var(--bg); }
.auth-card { width:100%; max-width:460px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-xl); box-shadow:var(--shadow-lg); padding:32px; }
.auth-brand { display:flex; flex-direction:column; align-items:center; gap:10px; margin-bottom:24px; }
.auth-brand img { height:42px; }
.auth-brand h1 { font-size:20px; }
.auth-brand .mod-badge { font-size:11px; font-weight:700; letter-spacing:.06em; color:var(--primary); background:var(--primary-tint); padding:4px 10px; border-radius:99px; }
.auth-error { background:var(--danger-tint); color:var(--danger); padding:10px 12px; border-radius:var(--r-sm); margin-bottom:14px; font-size:13px; }
.auth-submit { width:100%; justify-content:center; }
.captcha-row { display:flex; align-items:center; justify-content:flex-start; flex-wrap:nowrap; gap:8px; min-width:0; }
.captcha-code {
  display:flex; align-items:center; justify-content:flex-start; gap:6px;
  flex:0 0 auto; min-height:40px; padding:0 10px; margin-right:0;
  background: repeating-linear-gradient(-45deg, var(--surface-2), var(--surface-2) 6px, #e8edf3 6px, #e8edf3 7px);
  border:1px solid var(--border); border-radius:var(--r-sm);
  user-select:none; letter-spacing:2px;
}
.captcha-code span {
  display:inline-block; min-width:22px; text-align:center;
  font-size:20px; font-weight:800; color:var(--text);
}
.captcha-code span:nth-child(1) { transform: rotate(-8deg); }
.captcha-code span:nth-child(2) { transform: rotate(6deg); }
.captcha-code span:nth-child(3) { transform: rotate(-4deg); }
.captcha-refresh {
  width:40px; height:40px; flex:0 0 40px;
  display:grid; place-items:center;
  border:1px solid var(--border); background:var(--surface);
  border-radius:var(--r-sm); color:var(--text-2); cursor:pointer;
}
.captcha-refresh svg { width:16px; height:16px; }
.captcha-refresh:hover { color:var(--primary); border-color:var(--primary); }
.input.captcha-input { flex:1 1 auto; min-width:0; width:auto; max-width:none; font-weight:700; }
html[data-theme="dark"] .captcha-code { background: repeating-linear-gradient(-45deg, rgba(255,255,255,.04), rgba(255,255,255,.04) 6px, rgba(255,255,255,.07) 6px, rgba(255,255,255,.07) 7px); }

.login-demo { margin-top:16px; text-align:center; }
.login-demo-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.login-demo-link:hover { color: var(--primary-strong, var(--primary)); }
.modal.modal-demo { max-width: 440px; text-align: left; }
.modal.modal-demo h3 { text-align: center; }
.modal.modal-demo p { text-align: center; margin-bottom: 14px; }
.modal.modal-demo .login-hints-list { margin-bottom: 16px; }
.login-hints-list { display:flex; flex-direction:column; gap:6px; max-height:280px; overflow:auto; padding-right:2px; }
.hint-acc { width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; text-align:left; border:1px solid var(--border); background:var(--surface); border-radius:8px; padding:8px 10px; cursor:pointer; font:inherit; color:inherit; }
.hint-acc:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); background: var(--primary-tint); }
.hint-acc.is-active { border-color: var(--primary); background: var(--primary-tint); }
.hint-acc .role { display:block; font-size:10.5px; font-weight:800; letter-spacing:.03em; text-transform:uppercase; color:var(--primary); }
.hint-acc .user { display:block; font-size:12.5px; font-weight:700; }
.hint-acc .name { font-size:11px; color:var(--text-3); text-align:right; flex:0 1 42%; }


/* tabs */
.wk-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  margin-bottom: 16px;
  background: #eef1f5;
  border: none;
  border-radius: 8px;
  flex-wrap: nowrap;
}
.wk-tab {
  border: 0;
  background: transparent;
  padding: 4px 12px;
  color: var(--text-2);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  text-decoration: none;
  transition: background .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease);
}
.wk-tab:hover { color: var(--primary); }
.wk-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px -6px rgba(16, 24, 40, .18);
}
.wk-tab-panel { display:none; }
.wk-tab-panel.active { display:block; }
.tab-count {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 99px;
  background: #e4e7ee;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.wk-tab.active .tab-count { background: var(--primary-tint); color: var(--primary); }
.card-head .wk-tabs { margin: 0 0 0 auto; }
.card-head .wk-tab { min-height: 0; padding: 4px 12px; }
.card.admin-tabs .card-head {
  flex-wrap: wrap;
  row-gap: 8px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.card.admin-tabs .wk-tabs {
  flex-wrap: wrap;
  max-width: 100%;
}
.page-subnav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 12px;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.page-subnav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: all .18s var(--ease);
}
.page-subnav-item:hover {
  color: var(--primary);
  background: var(--primary-tint);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}
.page-subnav-item.active {
  background: linear-gradient(135deg, var(--primary-soft), var(--primary));
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 8px 16px -10px rgba(227, 6, 19, .7);
}
.page-subnav-item .tab-count {
  margin-left: 2px;
}
.page-subnav-item.active .tab-count {
  background: rgba(255,255,255,.22);
  color: #fff;
}
.page-subnav-ico {
  display: inline-flex;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}
.page-subnav-ico svg {
  width: 15px;
  height: 15px;
  display: block;
}
html[data-theme="dark"] .page-subnav-item {
  background: var(--surface-2);
  border-color: var(--border);
}
html[data-theme="dark"] .page-subnav-item:hover {
  background: var(--primary-tint);
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}
html[data-theme="dark"] .page-subnav-item.active {
  background: linear-gradient(135deg, var(--primary-soft), var(--primary));
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 8px 16px -10px rgba(227, 6, 19, .7);
}
.gps-cell { display: flex; align-items: center; gap: 10px; }
.gps-meta { font-size: 12px; line-height: 1.35; color: var(--text-2); }
.btn-loc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--danger);
  color: var(--danger);
  background: transparent;
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.dt-check input { pointer-events: none; }
.card-head > div:has(.wk-tabs) {
  margin-left: auto;
  display: flex;
  align-items: center;
}
html[data-theme="dark"] .wk-tabs { background: rgba(255,255,255,.06); }
html[data-theme="dark"] .wk-tab.active { background: var(--surface); }
html[data-theme="dark"] .tab-count { background: rgba(255,255,255,.08); }

.page-title { font-size: 15px; font-weight: 800; letter-spacing: 0; }
.card-body { padding: 16px 18px 18px; }
.card.card-head-only .card-body { display: none; padding: 0; }

.brand-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.brand-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mod-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-tint);
  padding: 3px 8px;
  border-radius: 99px;
  width: fit-content;
  margin-left: 0;
}

.nav-tree { display: flex; flex-direction: column; }
.nav-tree > .nav-item .nav-caret { margin-left: auto; width: 14px; height: 14px; transition: transform .18s var(--ease); }
.nav-tree.open > .nav-item .nav-caret { transform: rotate(180deg); }
.nav-children { display: none; padding: 2px 0 4px 16px; flex-direction: column; gap: 2px; }
.nav-tree.open > .nav-children { display: flex; }
.nav-children .nav-item { padding: 8px 12px; font-size: 13px; font-weight: 600; gap: 10px; }
.nav-children .nav-item svg { width: 16px; height: 16px; }

.dt-toolbar { display:flex; justify-content:space-between; gap:10px; padding:12px 16px; align-items:center; flex-wrap:wrap; border-bottom: 1px solid var(--border); }
.dt-toolbar .input { max-width: 240px; }
.dt-foot { display:flex; justify-content:space-between; align-items:center; padding:12px 16px; gap:10px; flex-wrap:wrap; }
.dt-pager { display:flex; gap:4px; align-items:center; }
.user-dd a svg, .user-dd form button svg { width: 16px; height: 16px; flex-shrink: 0; }
.pills { display:flex; gap:8px; flex-wrap:wrap; }
.pills label { display:flex; align-items:center; gap:6px; padding:6px 10px; border:1px solid var(--border); border-radius:99px; cursor:pointer; }
.branch-switch { min-width: 180px; height: 36px; }
.branch-switch .ns { width: 100%; height: 36px; }
.topbar-actions .branch-switch .ns-trigger {
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1;
  background: var(--surface);
}
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.form-grid .span-2 { grid-column:span 2; }
@media (max-width:720px) { .form-grid { grid-template-columns:1fr; } .form-grid .span-2 { grid-column:span 1; } .filter-bar { flex-wrap: wrap; } }
.field { display:flex; flex-direction:column; gap:6px; }
.field label { font-size:12px; font-weight:700; color:var(--text-2); }
.field .req { color:var(--primary); }
.field-error { color:var(--danger); font-size:12px; }
.cal-weekdays { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; margin: 8px 0 6px; }
.cal-weekdays span { text-align:center; font-size:11px; font-weight:800; color:var(--text-3); }
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.cal-day { border:1px solid var(--border); border-radius:8px; padding:8px 4px; text-align:center; font-size:12px; background:var(--surface); min-height:52px; }
.cal-day b { display:block; font-size:13px; }
.cal-day small { color:var(--text-3); font-weight:700; }
.cal-day.empty { border-color:transparent; background:transparent; }
.cal-day.present { background:var(--success-tint); }
.cal-day.late { background:var(--warn-tint); }
.cal-day.absent { background:var(--danger-tint); }
.cal-day.holiday { background:var(--primary-tint); }
.filter-checks { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:8px 14px 12px; }
.att-legend { display:flex; flex-wrap:wrap; gap:8px 14px; padding:0 16px 12px; font-size:12px; color:var(--text-2); }
.att-legend b { color:var(--primary); margin-right:4px; }
.approval-cell { display:flex; flex-direction:column; gap:2px; }
.approval-cell small { color:var(--text-3); font-weight:600; }
.link-photo { font-weight:700; color:var(--primary); }
.emp-head { padding: 0 16px 12px; }
.sub-tabs { margin: 0 16px 8px; }
#modalComment { margin-top: 10px; }
.progress-steps { display:flex; gap:10px; flex-wrap:wrap; margin:16px 0 0; }
.progress-step { flex:1; min-width:120px; padding:12px 14px; border:1px solid var(--border); border-radius:10px; background:var(--surface-2); font-size:13px; font-weight:700; color:var(--text-2); }
.progress-step.done { border-color:var(--success); background:var(--success-tint); color:var(--success); }
.result-box { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.kv-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kv-item { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.kv-item span { display:block; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--text-3); }
.kv-item b { font-size:14px; font-weight:800; }
.cal-grid { margin-top: 16px; }
.check-item {
  height: 34px;
  min-height: 34px;
  padding: 0 12px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.check-item input[type=checkbox] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--primary);
}
.check-item .mini-select { height: 28px; padding: 0 8px; }
@media (max-width:720px) { .kv-list { grid-template-columns: 1fr; } }
.nested-table { width:100%; border-collapse:collapse; font-size:13.5px; font-family: 'IBM Plex Sans', 'Segoe UI', Roboto, sans-serif; letter-spacing: 0; word-spacing: .06em; font-feature-settings: "liga" 0, "calt" 0, "tnum" 1; }
.nested-table th, .nested-table td { border:1px solid var(--border); padding:6px 8px; }
.chart-wrap { height:220px; }

#page-dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#page-dashboard .card {
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 28px -18px rgba(16, 24, 40, .2);
}
.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 0;
}
.dash-greet { margin: 0; font-size: 13px; font-weight: 700; color: var(--text-3); }
.dash-name { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.dash-date { margin: 0; font-size: 13px; color: var(--text-2); font-weight: 700; white-space: nowrap; }
.dash-hero-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#page-dashboard .dash-stats { gap: 14px; }
#page-dashboard .stat {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 18px 18px 16px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 122px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 24px -16px rgba(16, 24, 40, .28);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
#page-dashboard .stat::before {
  content: "";
  position: absolute;
  right: -24px;
  top: -32px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: .45;
}
#page-dashboard .stat > * { position: relative; z-index: 1; }
#page-dashboard a.stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -16px rgba(16, 24, 40, .3);
  color: inherit;
  border-color: transparent;
}
#page-dashboard .stat:nth-child(1) { background: linear-gradient(145deg, #fff 0%, #fff1f1 78%); }
#page-dashboard .stat:nth-child(1)::before { background: #ffc9cd; }
#page-dashboard .stat:nth-child(2) { background: linear-gradient(145deg, #fff 0%, #e8f8ee 78%); }
#page-dashboard .stat:nth-child(2)::before { background: #b6e4c2; }
#page-dashboard .stat:nth-child(3) { background: linear-gradient(145deg, #fff 0%, #e8f1fb 78%); }
#page-dashboard .stat:nth-child(3)::before { background: #b7d4f3; }
#page-dashboard .stat:nth-child(4) { background: linear-gradient(145deg, #fff 0%, #fff6e8 78%); }
#page-dashboard .stat:nth-child(4)::before { background: #ffd9a3; }
#page-dashboard .stat-ico {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 18px -10px rgba(16, 24, 40, .4);
}
#page-dashboard .stat-ico svg { width: 20px; height: 20px; }
#page-dashboard .stat-label {
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
}
#page-dashboard .stat-value {
  font-size: 30px;
  margin: 6px 0 8px;
  letter-spacing: -.04em;
}
#page-dashboard .stat-hint { font-size: 12px; }
.dash-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.dash-charts-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.dash-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  border: 0;
}
.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.dash-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-2);
  background: var(--surface-2);
  border: 0;
  border-radius: 99px;
  padding: 4px 10px;
  white-space: nowrap;
}
.dash-level-scroll { flex: 1; min-height: 0; max-height: 240px; overflow: auto; margin-top: 2px; padding-right: 4px; }
.donut-wrap-col { flex: 1; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-height: 240px; }
.dash-gender-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  width: 100%;
}
.dash-gender-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-2);
}
.dash-gender-legend i { width: 8px; height: 8px; border-radius: 99px; display: inline-block; flex-shrink: 0; }
.dash-gender-legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.dash-gender-legend em { margin-left: auto; font-style: normal; color: var(--text-3); font-variant-numeric: tabular-nums; }
.dash-service { flex: 1; height: auto; min-height: 220px; gap: 8px; padding-top: 4px; }
.dash-service .bar-col em {
  font-size: 12px;
  font-weight: 800;
  font-style: normal;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
#page-dashboard .dash-service .bar-track {
  width: 34px;
  margin: 0 auto;
  padding: 5px 5px 0;
  border-radius: 14px 14px 8px 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--border) 35%, transparent), transparent 70%);
}
#page-dashboard .dash-service .bar {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 10px 10px 6px 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}
#page-dashboard .dash-service .bar-col:nth-child(1) .bar { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 12px 16px -10px #2d9b3f; }
#page-dashboard .dash-service .bar-col:nth-child(2) .bar { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 12px 16px -10px #1e6bb8; }
#page-dashboard .dash-service .bar-col:nth-child(3) .bar { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 12px 16px -10px #f5a623; }
#page-dashboard .dash-service .bar-col:nth-child(4) .bar { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 12px 16px -10px #4b4ebb; }
#page-dashboard .dash-service .bar-col:nth-child(5) .bar { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 12px 16px -10px #e30613; }
#page-dashboard .dash-service .bar-col span { font-size: 10.5px; text-align: center; line-height: 1.25; }
.dash-quick { display: flex; flex-direction: column; border: 0; }
.quick-absensi {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  padding: 16px;
  border-radius: 14px;
  box-shadow: 0 12px 24px -12px rgba(37, 99, 235, .7);
  transition: transform .18s var(--ease), filter .18s var(--ease);
}
.quick-absensi svg { width: 18px; height: 18px; }
.quick-absensi:hover { color: #fff; filter: brightness(1.06); transform: translateY(-1px); }
.dash-ann { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.ann-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-2);
}
.ann-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #fff1f1;
  color: var(--primary);
}
.ann-ico svg { width: 16px; height: 16px; }
.ann-item:nth-child(2) .ann-ico { background: #e8f6ec; color: var(--sk-green); }
.ann-item:nth-child(3) .ann-ico { background: #e8f1fb; color: var(--sk-blue); }
.ann-body { min-width: 0; flex: 1; }
.ann-body h4 { margin: 0 0 4px; font-size: 13.5px; font-weight: 800; line-height: 1.35; }
.ann-meta { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; font-size: 11.5px; font-weight: 700; color: var(--text-3); }
.ann-dot { font-style: normal; opacity: .45; }
.ann-excerpt {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-2);
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dash-info { min-height: 340px; display: flex; flex-direction: column; border: 0; overflow: hidden; }
.dash-info .wk-tab-panel.active { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ann-full { display: none; margin: 8px 0 0; font-size: 12.5px; line-height: 1.65; color: var(--text-2); font-weight: 600; }
.ann-item.is-open .ann-excerpt { display: none; }
.ann-item.is-open .ann-full { display: block; }
.ann-more {
  margin-top: 8px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
html[data-theme="dark"] .ann-ico { background: rgba(227, 6, 19, .16); color: #ff5a64; }
html[data-theme="dark"] .ann-item:nth-child(2) .ann-ico { background: rgba(45, 155, 63, .16); color: #4ade80; }
.dash-h { font-size: 15px; margin: 0; letter-spacing: -.01em; }
.dash-sub { font-size: 12.5px; color: var(--text-3); font-weight: 600; margin: 4px 0 14px; }
.stack-bar {
  display: flex;
  gap: 4px;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
  margin-bottom: 4px;
}
.stack-seg { display: block; height: 100%; min-width: 4px; border-radius: 99px; }
#page-dashboard .stack-bar {
  height: 18px;
  padding: 3px;
  gap: 3px;
  background: var(--surface-2);
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, .06);
  margin-bottom: 8px;
}
#page-dashboard .stack-seg {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}
.dash-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.dash-table td {
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px dashed var(--border);
  vertical-align: middle;
}
.dash-table tr:last-child td { border-bottom: none; }
.dash-table td:first-child { color: var(--text-2); }
.dash-table td:first-child i {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}
.dash-table td:nth-child(2),
.dash-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dash-table td:last-child { color: var(--text-3); width: 64px; }
.dash-table .dash-total td { font-weight: 800; color: var(--text); }
.dash-meters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 240px;
  overflow: auto;
  padding-right: 4px;
}
.dash-meter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
}
.dash-meter-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-meter-row em {
  color: var(--text-3);
  font-style: normal;
  min-width: 48px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dash-meter-track {
  height: 6px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 5px;
}
.dash-meter-track i { display: block; height: 100%; border-radius: 99px; }
.dash-bottom {
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(0, 1.5fr) minmax(200px, .7fr);
  gap: 16px;
  align-items: stretch;
}
.dash-ot {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 340px;
  height: 100%;
  box-sizing: border-box;
  text-decoration: none;
  color: #fff;
  border: 0;
  background: linear-gradient(160deg, #ff5a64 0%, #e30613 58%, #b8040f 100%);
  box-shadow: 0 18px 36px -16px rgba(227, 6, 19, .55);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
#page-dashboard .table-scroll { max-height: 360px; overflow: auto; }
.dash-ot:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 22px 40px -16px rgba(227, 6, 19, .65); }
.dash-ot .dash-h,
.dash-ot .dash-sub,
.dash-ot-val,
.dash-ot-link { color: #fff; }
.dash-ot .dash-sub { opacity: .85; }
.dash-ot-ico {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  margin-bottom: 8px;
}
.dash-ot-ico svg { width: 22px; height: 22px; }
.dash-ot-val { font-size: 46px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.dash-ot-link {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 800;
  opacity: .92;
}
.dash-info .card-head {
  background: transparent;
  border-bottom: 0;
  padding: 16px 16px 8px;
  min-height: 0;
}
#page-dashboard .donut {
  width: 164px;
  height: 164px;
  box-shadow: 0 18px 32px -18px rgba(236, 72, 153, .5);
}
#page-dashboard .donut-hole {
  width: 96px;
  height: 96px;
  box-shadow: 0 0 0 5px var(--surface);
}
#page-dashboard .donut-hole b { font-size: 26px; letter-spacing: -.03em; }
#page-dashboard .dash-table td:first-child i,
#page-dashboard .dash-gender-legend i {
  width: 9px;
  height: 9px;
}
html[data-theme="dark"] #page-dashboard .stat:nth-child(1) { background: linear-gradient(145deg, #1a1416, rgba(227, 6, 19, .22)); }
html[data-theme="dark"] #page-dashboard .stat:nth-child(1)::before { background: rgba(255, 90, 100, .35); }
html[data-theme="dark"] #page-dashboard .stat:nth-child(2) { background: linear-gradient(145deg, #121814, rgba(45, 155, 63, .22)); }
html[data-theme="dark"] #page-dashboard .stat:nth-child(2)::before { background: rgba(74, 222, 128, .28); }
html[data-theme="dark"] #page-dashboard .stat:nth-child(3) { background: linear-gradient(145deg, #12161c, rgba(30, 107, 184, .24)); }
html[data-theme="dark"] #page-dashboard .stat:nth-child(3)::before { background: rgba(96, 165, 250, .28); }
html[data-theme="dark"] #page-dashboard .stat:nth-child(4) { background: linear-gradient(145deg, #1a1610, rgba(245, 166, 35, .22)); }
html[data-theme="dark"] #page-dashboard .stat:nth-child(4)::before { background: rgba(251, 191, 36, .28); }
html[data-theme="dark"] #page-dashboard .stat-ico { background: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .dash-ot {
  background: linear-gradient(160deg, #ff5a64 0%, #c10510 100%);
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
}
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
}
.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  display: inline-block;
}
.donut-wrap { display: flex; align-items: center; gap: 18px; min-height: 180px; }
.donut {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.donut-hole {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  text-align: center;
}
.donut-hole b { font-size: 22px; line-height: 1; }
.donut-hole small { font-size: 11px; font-weight: 700; color: var(--text-3); }
.donut-legend { flex-direction: column; margin-top: 0; }
.quick-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.quick-link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
}
.quick-link:hover { border-color: var(--primary); background: var(--primary-tint); }
.quick-link strong { font-size: 14px; }
.quick-link span { font-size: 12px; color: var(--text-3); font-weight: 600; }
.ql-dot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; }
.sched-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 2px 0 14px;
}
.sched-toolbar .filter-bar {
  padding: 0;
  flex-wrap: wrap;
  gap: 12px 14px;
}
.sched-toolbar .filter-bar > .field { flex: 1 1 190px; }
.sched-toolbar .filter-bar > .filter-actions { flex: 0 0 auto; }
.sched-palette {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 10px 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.sched-palette-head { display: flex; flex-direction: column; gap: 2px; min-width: 150px; }
.sched-help { margin: -6px 2px 0; }
.sched-palette-head b { font-size: 12.5px; font-weight: 800; }
.sched-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 320px; }
.sched-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}
.sched-chip i { width: 9px; height: 9px; border-radius: 99px; background: var(--chip, var(--text-3)); }
.sched-chip:hover { border-color: var(--chip, var(--primary)); }
.sched-chip[aria-pressed="true"] {
  border-color: var(--chip, var(--primary));
  background: color-mix(in srgb, var(--chip, var(--primary)) 14%, var(--surface));
  color: var(--text);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--chip, var(--primary)) 25%, transparent);
}
.sched-clear { margin-left: auto; gap: 6px; color: var(--danger); }
.sched-clear svg { width: 14px; height: 14px; }
.sched-meta { display: flex; justify-content: flex-end; margin: 0 0 8px; font-size: 12px; font-weight: 700; color: var(--text-3); }
.sh-c0 { --chip: #2d9b3f; }
.sh-c1 { --chip: #2563eb; }
.sh-c2 { --chip: #d97706; }
.sh-c3 { --chip: #9333ea; }
.sh-c4 { --chip: #0891b2; }
.sh-c5 { --chip: #db2777; }
.sched-wrap {
  overflow: auto;
  max-height: 68vh;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.sched-grid { margin: 0; border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.sched-grid th, .sched-grid td { border-bottom: 1px solid var(--border); border-right: 1px solid color-mix(in srgb, var(--border) 55%, transparent); }
.sched-grid .sched-name {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  padding: 0 14px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-right: 1px solid var(--border);
  box-shadow: 6px 0 8px -8px rgba(16, 24, 40, .25);
}
.sched-grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface-2);
  padding: 8px 4px;
  text-align: center;
  font-size: 11px;
  text-transform: none;
}
.sched-grid thead th.sched-name { z-index: 4; background: var(--surface-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.sched-day { min-width: 58px; }
.sched-day small { display: block; font-size: 10.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; }
.sched-day b { display: block; font-size: 14px; font-weight: 800; line-height: 1.3; }
.sched-day.is-weekend { background: #fdf0f0; }
.sched-day.is-weekend small, .sched-day.is-weekend b { color: var(--danger); }
.sched-day.is-today b {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 99px;
  background: var(--primary);
  color: #fff;
}
.sched-grid tbody tr { height: 40px; }
.sched-grid tbody tr:hover .sched-name { background: var(--primary-tint); }
.sched-cell {
  min-width: 58px;
  padding: 3px !important;
  text-align: center;
  cursor: pointer;
  user-select: none;
}
.sched-cell.is-weekend { background: #fff7f7; }
.sched-cell:hover { background: var(--primary-tint); }
.sched-empty { font-size: 13px; font-weight: 700; color: transparent; }
.sched-cell:hover .sched-empty { color: var(--primary); }
.sched-pill {
  display: block;
  max-width: 54px;
  margin: 0 auto;
  padding: 4px 6px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--chip, var(--sk-green)) 14%, var(--surface));
  color: var(--chip, var(--sk-green));
  border: 1px solid color-mix(in srgb, var(--chip, var(--sk-green)) 35%, transparent);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html[data-theme="dark"] .sched-day.is-weekend { background: rgba(239, 68, 68, .12); }
html[data-theme="dark"] .sched-cell.is-weekend { background: rgba(239, 68, 68, .06); }
html[data-theme="dark"] .sched-grid .sched-name { background: var(--surface); }
@media (max-width: 1280px) {
  .dash-charts-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .dash-bottom { grid-template-columns: 1fr 1fr; }
  .dash-ot { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; gap: 16px; }
  .dash-ot-ico { margin-bottom: 0; }
}
@media (max-width: 900px) {
  .dash-charts,
  .dash-charts-4 { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: column; align-items: flex-start; }
  .dash-hero { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 760px) {
  .dash-bottom { grid-template-columns: 1fr; }
  .dash-ot { grid-column: auto; }
}

.payroll-calc {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}
.payroll-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.payroll-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.progress-bars { margin: 14px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.progress-row { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; }
.progress-row span { font-size: 12px; font-weight: 700; color: var(--text-2); }
.progress-row .bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.progress-row .bar i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .25s ease; }
.ot-matrix { margin: 16px 0 8px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.ot-matrix h3 { margin: 0 0 10px; font-size: 14px; }
.ot-day { margin: 8px 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 8px 12px; }
.ot-day summary { cursor: pointer; font-weight: 800; font-size: 13px; }
.ot-tiers { margin-top: 8px; }
@media (max-width: 980px) {
  .payroll-calc, .payroll-side { grid-template-columns: 1fr; }
}
.setup-split {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 400px);
  gap: 18px;
  align-items: start;
}
.setup-split-wide {
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 1fr);
}
.setup-fields { grid-template-columns: 1fr; }
.setup-form .card-head { padding-right: 16px; }
.password-card { max-width: 460px; margin: 24px auto; padding: 28px 28px 22px; }
.password-hero { text-align: center; margin-bottom: 22px; }
.password-ico {
  width: 56px; height: 56px; margin: 0 auto 12px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-tint); color: var(--primary);
}
.password-ico svg { width: 26px; height: 26px; }
.password-hero h3 { margin: 0 0 4px; font-size: 18px; }
.password-hero p { margin: 0; color: var(--text-3); font-size: 13px; }
@media (max-width: 980px) {
  .setup-split { grid-template-columns: 1fr; }
}

.hidden { display: none !important; }
.btn-danger {
  background: #fff;
  border-color: #c62828;
  color: #c62828;
}
.btn-danger:hover { background: #c62828; color: #fff; border-color: #c62828; }
.mig-notes {
  margin-top: 16px;
  color: #c62828;
  font-size: 13px;
  line-height: 1.55;
}
.mig-notes p { margin: 0 0 4px; }
.mig-legend { color: var(--text-2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mig-legend .dot {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}
.dot-purple { background: #7e57c2; }
.dot-blue { background: #1e88e5; }
.mig-page .form-actions { margin-top: 12px; }

.pph-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
  margin: 4px auto 8px;
}
.pph-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px 20px;
  align-items: start;
}
.pph-label {
  padding-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  line-height: 1.35;
}
.pph-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  min-width: 0;
}
.pph-fields > .field {
  flex: 1 1 200px;
  min-width: 180px;
}
.pph-fields-grow > .field { flex: 1 1 100%; }
.pph-checks {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.pph-form .check-item {
  height: auto;
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-weight: 500;
  white-space: normal;
  line-height: 1.45;
  max-width: 100%;
}
.pph-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-top: 6px;
}
.form-actions .btn-icon,
.pph-actions .btn-icon,
.filter-checks .btn-icon {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
}
.form-actions .row-actions,
.pph-actions .row-actions,
.filter-checks .row-actions {
  justify-content: center;
}
.btn-icon.is-on {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-tint);
}
.pph-table-wrap { margin-top: 4px; }
.pph-table { min-width: 1680px; }
.pph-table th,
.pph-table td { white-space: nowrap; }
.pph-table td.num { text-align: right; }
@media (max-width: 720px) {
  .pph-row { grid-template-columns: 1fr; gap: 6px; }
  .pph-label { padding-top: 0; }
}
.umk-rates { margin-top: 8px; }
.umk-rates-head {
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 8px 8px 0 0;
}
.umk-rates-table { width: 100%; }
.umk-rates-table th { font-size: 12px; }
.umk-rates-table .input { width: 100%; }
.umk-rates .btn { margin-top: 8px; }

