@import url("../vendor/bootstrap/bootstrap-grid.min.css");
@import url("../vendor/bootstrap/bootstrap-utilities.min.css");
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700&family=Quicksand:wght@300;400;500;700&display=swap");

:root {
  --font: "Open Sans", "Segoe UI", system-ui, sans-serif;
  --font-head: "Quicksand", "Open Sans", sans-serif;
  --bg: #f4f5f7;
  --bg-elevated: #ffffff;
  --bg-muted: #eef0f3;
  --bg-sidebar: #1a2f4a;
  --bg-sidebar-2: #243b58;
  --text: #1c2430;
  --text-2: #3d4a5c;
  --text-3: #6b778c;
  --text-inv: #f3f6f9;
  --text-inv-2: #c5d0de;
  --border: #e2e6ec;
  --border-2: #cfd6e0;
  --accent: #1e4d8c;
  --accent-2: #163a6b;
  --accent-soft: #e8eef6;
  --gold: #9a7b32;
  --gold-soft: #f4eee0;
  --success: #1f6b57;
  --success-soft: #e7f3ef;
  --warning: #9a5b12;
  --warning-soft: #f7efe4;
  --danger: #a11d38;
  --danger-soft: #f8e8ec;
  --info: #1b5f86;
  --info-soft: #e7f1f6;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --shadow: none;
  --shadow-lg: 0 8px 24px rgba(28, 36, 48, 0.1);
  --sidebar: 292px;
  --sidebar-min: 88px;
  --topbar: 64px;
  --ease: ease;
}

[data-theme="dark"] {
  --bg: #080c14;
  --bg-elevated: #111827;
  --bg-muted: #1a2333;
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --border: #243044;
  --border-2: #334155;
  --accent-soft: #172554;
  --gold-soft: #2a2316;
  --success-soft: #102422;
  --warning-soft: #2a1c10;
  --danger-soft: #2a1218;
  --info-soft: #102433;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.28);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); }
ul { margin: 0; padding: 0; list-style: none; }

.app {
  display: flex;
  min-height: 100%;
}

.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  color: var(--text-inv);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  transition: width 0.2s ease;
  border-right: 1px solid #13233a;
}

body.sidebar-collapsed .sidebar { width: var(--sidebar-min); }
body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-section-title,
body.sidebar-collapsed .nav-badge,
body.sidebar-collapsed .nav-caret,
body.sidebar-collapsed .nav-sub,
body.sidebar-collapsed .nav-tag,
body.sidebar-collapsed .sidebar-foot-label { display: none; }
body.sidebar-collapsed .brand { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .brand-logo {
  width: 36px;
  height: 36px;
  max-width: 36px;
  object-fit: cover;
  object-position: 6% center;
}
body.sidebar-collapsed .nav-link { justify-content: center; padding-inline: 0; }

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: var(--topbar);
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: #12263d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

.brand-mark svg,
.brand-mark i { width: 18px; height: 18px; font-size: 18px; line-height: 1; }
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 3px;
}

.brand-text { line-height: 1.2; min-width: 0; }
.brand-text strong { display: block; font-size: 16px; font-weight: 700; font-family: var(--font-head); }
.brand-text span { font-size: 11px; color: #c4b07a; font-weight: 500; letter-spacing: 0.04em; }

.brand-logo {
  display: block;
  height: 28px;
  width: auto;
  max-width: 248px;
  object-fit: contain;
}

.nav {
  padding: 18px 14px;
  overflow: auto;
  flex: 1;
}

.nav::-webkit-scrollbar { width: 0; }

.nav-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c5d2e6;
  padding: 16px 12px 10px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  color: var(--text-inv-2);
  font-size: 14.5px;
  font-weight: 550;
  margin-bottom: 1px;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link svg,
.nav-link i { width: 20px; height: 20px; font-size: 20px; line-height: 1; flex-shrink: 0; opacity: 0.92; }

.nav-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav-link.is-active {
  background: #2c4a76;
  color: #fff;
  font-weight: 650;
  box-shadow: none;
}

.nav-link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 0;
  background: var(--gold);
}

.nav-toggle {
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.nav-toggle.is-parent { color: #fff; font-weight: 650; }
.nav-caret {
  margin-left: auto;
  display: grid;
  place-items: center;
  opacity: 0.55;
  transition: transform 0.18s var(--ease);
}
.nav-caret svg,
.nav-caret i { width: 16px; height: 16px; font-size: 16px; line-height: 1; }
.nav-group.is-open > .nav-toggle .nav-caret { transform: rotate(180deg); }
.nav-sub { display: none; padding: 2px 0 8px 36px; }
.nav-group.is-open > .nav-sub { display: block; }
.nav-child {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  color: #b7c4d8;
}
.nav-child:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.nav-child.is-active,
.nav-link.nav-child.is-active {
  background: #2c4a76;
  box-shadow: none;
  color: #fff;
  font-weight: 650;
}
.nav-child.is-active::before {
  display: block;
  top: 7px;
  bottom: 7px;
}
.nav-dot {
  display: none;
}
.nav-tag {
  margin-left: auto;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a1408;
  background: var(--gold);
  border-radius: 3px;
  padding: 2px 6px;
  font-weight: 600;
}

.nav-badge {
  margin-left: auto;
  background: #be123c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 5px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #1e4d8c;
  flex-shrink: 0;
}

.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.gold { background: #8a6f2e; }
.avatar.teal { background: #1f6b57; }
.avatar.rose { background: #a11d38; }
.avatar.slate { background: #4a5568; }

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 6px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-2);
  position: relative;
}

.icon-btn:hover { border-color: var(--border-2); color: var(--text); }
.icon-btn svg,
.icon-btn i { width: 18px; height: 18px; font-size: 18px; line-height: 1; }

.topbar .icon-btn {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  border-radius: 50%;
}
.topbar .icon-btn:hover {
  background: var(--bg-muted);
  border-color: transparent;
  color: var(--text);
}

.icon-btn .note {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  background: var(--danger);
  color: #fff;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.search {
  flex: 1;
  max-width: 460px;
  position: relative;
}

.search svg,
.search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 1;
  color: var(--text-3);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  border-radius: 6px;
  padding: 0 14px 0 38px;
  outline: none;
}

.search input:focus {
  background: var(--bg-elevated);
  border-color: var(--accent);
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.topbar-split {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px 0 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
  height: 34px;
}

.user-chip:hover { color: var(--accent); }
.user-chip span { font-size: 13px; font-weight: 600; }
.user-chip svg,
.user-chip i { width: 14px; height: 14px; font-size: 14px; line-height: 1; color: var(--text-3); }

.app-footer {
  padding: 12px 28px 22px;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}

.page {
  padding: 26px 28px 24px;
  flex: 1;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 6px;
}

.breadcrumb a:hover { color: var(--accent); }

.page-head h1 {
  font-size: 22px;
  font-weight: 600;
}

.page-head p { color: var(--text-3); font-size: 13.5px; margin-top: 4px; }

.page-head-dashboard {
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
}

.dash-news-stats {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.dash-news-stat {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px 12px;
  min-width: 108px;
  flex: 0 1 140px;
}

.dash-news-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dash-news-stat-label {
  font-size: 11px;
  font-weight: 650;
  color: var(--text-3);
}

.dash-news-stat .kpi-icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
}

.dash-news-stat .kpi-icon svg {
  width: 12px;
  height: 12px;
}

.dash-news-stat-value {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.2;
  margin: 4px 0 2px;
}

.dash-news-stat .delta,
.dash-news-stat .muted {
  font-size: 11px;
}

.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: var(--border-2); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-gold {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.btn-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-1-2 { grid-template-columns: 1.4fr 1fr; }
.grid-2-1 { grid-template-columns: 1.6fr 1fr; }
.span-2 { grid-column: span 2; }

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-pad { padding: 18px 18px 16px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-head h3 { font-size: 15px; font-weight: 600; }
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 15px; font-weight: 600; margin: 0; }
.card-body { padding: 18px; }
.img-fluid { max-width: 100%; height: auto; display: block; }
.muted { font-size: 13px; color: var(--text-3); }
.card-head .muted { font-size: 12px; }

.kpi {
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.kpi-label {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: grid;
  place-items: center;
}

.kpi-icon svg { width: 16px; height: 16px; }
.kpi-icon.blue { background: var(--accent-soft); color: var(--accent); }
.kpi-icon.teal { background: var(--success-soft); color: var(--success); }
.kpi-icon.gold { background: var(--gold-soft); color: var(--gold); }
.kpi-icon.rose { background: var(--danger-soft); color: var(--danger); }

.kpi-value {
  font-size: 24px;
  font-weight: 600;
  margin: 10px 0 8px;
}

.delta {
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }
.delta.warn { color: var(--warning); }
.delta + .hint { font-size: 12px; color: var(--text-3); margin-left: 8px; }

.spark { height: 42px; margin-top: 10px; }

.stat-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(28, 36, 48, 0.06);
}
a.stat-tile { color: inherit; }
[data-theme="dark"] .stat-tile { box-shadow: var(--shadow); }
.stat-tile .stat-val {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}
.stat-tile .stat-lbl {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}
.stat-tile svg,
.stat-tile i {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  stroke-width: 1.6;
}
.stat-tile i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  line-height: 1;
}
.stat-tile.green .stat-val,
.stat-tile.green svg,
.stat-tile.green i { color: var(--success); }
.stat-tile.blue .stat-val,
.stat-tile.blue svg,
.stat-tile.blue i { color: var(--info); }
.stat-tile.rose .stat-val,
.stat-tile.rose svg,
.stat-tile.rose i { color: #c45b78; }
.stat-tile.orange .stat-val,
.stat-tile.orange svg,
.stat-tile.orange i { color: var(--warning); }
.gchart { width: 100%; height: 340px; }
.gchart.short { height: 300px; }

.table-wrap { overflow: auto; -webkit-overflow-scrolling: touch; }
table.data {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.data th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 800;
  padding: 13px 16px;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.data td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--accent-soft); }
table.data td a { color: var(--accent); font-weight: 650; }
table.data td a:hover { text-decoration: underline; }
table.data th:has(> input),
table.data td:has(> input[type="checkbox"]) {
  width: 42px;
  padding-inline: 14px;
}

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

.person strong { display: block; font-size: 13px; }
.person span { font-size: 12px; color: var(--text-3); }

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warning-soft); color: var(--warning); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.neutral { background: var(--bg-muted); color: var(--text-2); }
.badge.gold { background: var(--gold-soft); color: #8a6a2a; }

.progress {
  height: 6px;
  background: var(--bg-muted);
  border-radius: 2px;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row strong { display: block; font-size: 13px; }
.list-row span { font-size: 12px; color: var(--text-3); }

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.topbar-pop { position: relative; }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, calc(100vw - 24px));
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: none;
  overflow: hidden;
  z-index: 50;
  box-shadow: var(--shadow-lg);
}

.dropdown.user-menu { width: 196px; }
.user-menu .dropdown-item { align-items: center; }
.user-menu .dropdown-item svg,
.user-menu .dropdown-item i { margin-top: 0; }

.dropdown form { display: block; }

button.dropdown-item {
  width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.dropdown.open { display: block; }
.dropdown-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
  font-size: 13px;
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--border);
}

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

.dropdown-item svg,
.dropdown-item i {
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-2);
  margin-top: 2px;
}

.dropdown-item .avatar { margin-top: 1px; }

.dropdown-item > div:last-child {
  min-width: 0;
  flex: 1;
}

.dropdown-item:hover { background: var(--bg-muted); }
.dropdown-item p {
  color: var(--text-3);
  font-size: 11px;
  margin-top: 1px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.dropdown-item strong {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.45);
  z-index: 35;
}

.overlay.show { display: block; }

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.field, .select,
.form-control, .form-select {
  height: 40px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 6px;
  padding: 0 12px;
  outline: none;
}

.form-control, .form-select { width: 100%; }

.field:focus, .select:focus, textarea.field:focus,
.form-control:focus, .form-select:focus, textarea.form-control:focus {
  border-color: var(--accent);
}

textarea.field,
textarea.form-control {
  height: auto;
  padding: 12px;
  width: 100%;
  resize: vertical;
  min-height: 110px;
}

.form-group { margin-bottom: 14px; }

.label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-2);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .field,
.form-grid .select { width: 100%; }

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-stack .field,
.form-stack .select,
.form-stack textarea.field { width: 100%; }

.thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  margin-bottom: 8px;
}
.thumb-empty {
  display: grid;
  place-items: center;
  color: var(--text-3);
  font-size: 12px;
}
.form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); gap: 12px; }
.form-grid.cols-4 + .form-grid.cols-4 { margin-top: 12px; }

.filter-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}
.filter-actions .btn { width: 100%; justify-content: center; }

.search-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.search-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-2);
  cursor: pointer;
}
.search-options input { accent-color: var(--accent); }

.field:disabled, .select:disabled {
  opacity: 0.55;
  background: var(--bg-muted);
  cursor: not-allowed;
}

.field.sm, .select.sm { height: 34px; font-size: 12.5px; }
.field.lg, .select.lg { height: 48px; font-size: 15px; padding: 0 14px; }

.field.solid, .select.solid,
.form-skin.solid .field,
.form-skin.solid .select {
  background: var(--bg-muted);
  border-color: transparent;
}
.field.solid:focus, .select.solid:focus,
.form-skin.solid .field:focus,
.form-skin.solid .select:focus {
  background: var(--bg-elevated);
  border-color: var(--accent);
}

.field.line, .select.line,
.form-skin.line .field,
.form-skin.line .select {
  border: 0;
  border-bottom: 1px solid var(--border-2);
  border-radius: 0;
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}
.field.line:focus, .select.line:focus,
.form-skin.line .field:focus,
.form-skin.line .select:focus { border-bottom-color: var(--accent); }

.form-skin.sm .field, .form-skin.sm .select { height: 34px; font-size: 12.5px; }
.form-skin.lg .field, .form-skin.lg .select { height: 48px; font-size: 15px; padding: 0 14px; }

.input-wrap { position: relative; }
.input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-3);
  pointer-events: none;
}
.input-wrap .field { width: 100%; padding-left: 38px; }
.input-wrap.suffix svg { left: auto; right: 12px; }
.input-wrap.suffix .field { padding-left: 12px; padding-right: 38px; }

.input-group { display: flex; width: 100%; }
.input-group .addon {
  display: grid;
  place-items: center;
  padding: 0 12px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 650;
  color: var(--text-2);
  white-space: nowrap;
}
.input-group .addon:first-child {
  border-right: 0;
  border-radius: 6px 0 0 6px;
}
.input-group .field {
  flex: 1;
  min-width: 0;
  width: auto;
  border-radius: 0 6px 6px 0;
}
.input-group.suffix .field { border-radius: 6px 0 0 6px; }
.input-group.suffix .addon:last-child {
  border-left: 0;
  border-radius: 0 6px 6px 0;
}
.input-group button.addon {
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.input-group button.addon:hover { background: var(--bg-elevated); }
.input-group button.addon svg { width: 14px; height: 14px; }
.input-group { position: relative; }
.input-group .dropdown { left: 0; right: auto; width: 180px; }

.date-range { position: relative; }
.date-range-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--text);
}
.date-range-trigger svg { width: 16px; height: 16px; color: var(--text-3); flex-shrink: 0; }
.date-range-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-range-panel {
  width: min(460px, calc(100vw - 24px));
  padding: 0;
}
.date-range-panel.open { display: flex; }
.date-range-presets {
  display: flex;
  flex-direction: column;
  width: 150px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 6px;
}
.date-range-presets .dropdown-item {
  border-bottom: 0;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  width: 100%;
  text-align: left;
}
.date-range-presets .dropdown-item:hover { background: var(--bg-muted); }
.date-range-calendar { flex: 1; min-width: 0; padding: 12px; }
.date-range-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 650;
}
.date-range-cal-head button {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--text-2);
  font-size: 16px;
  width: 24px;
  height: 24px;
}
.date-range-cal-head button:hover { color: var(--text); }
.date-range-cal-weekdays,
.date-range-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}
.date-range-cal-weekdays span {
  font-size: 11px;
  color: var(--text-3);
  padding-bottom: 6px;
}
.date-range-cal-day {
  border: 0;
  background: transparent;
  cursor: pointer;
  height: 30px;
  font-size: 12.5px;
  color: var(--text);
  border-radius: 6px;
}
.date-range-cal-day:hover { background: var(--bg-muted); }
.date-range-cal-day.is-muted { color: var(--text-3); }
.date-range-cal-day.is-today { font-weight: 700; color: var(--accent); }
.date-range-cal-day.is-in-range,
.date-range-cal-day.is-hover-range { background: var(--accent-soft); border-radius: 0; }
.date-range-cal-day.is-start,
.date-range-cal-day.is-end {
  background: var(--accent);
  color: #fff;
  font-weight: 650;
}
.date-range-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.field.is-ok, .select.is-ok { border-color: var(--success); }
.field.is-warn, .select.is-warn { border-color: var(--warning); }
.field.is-danger, .select.is-danger { border-color: var(--danger); }
.help { display: block; font-size: 12px; margin-top: 6px; color: var(--text-3); }
.help.ok { color: var(--success); }
.help.warn { color: var(--warning); }
.help.danger { color: var(--danger); }

.float-field { position: relative; }
.float-field .field {
  width: 100%;
  height: 50px;
  padding: 20px 12px 8px;
}
.float-field .label {
  position: absolute;
  left: 12px;
  top: 15px;
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-3);
  pointer-events: none;
  transition: 0.15s ease;
}
.float-field .field:focus ~ .label,
.float-field .field:not(:placeholder-shown) ~ .label {
  top: 5px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.form-inline {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px 16px;
  align-items: center;
}
.form-inline .label { margin: 0; }
.form-inline .full { grid-column: 1 / -1; }

.choice-list { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elevated);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.choice input { accent-color: var(--accent); }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}
.check-row input { margin-top: 3px; accent-color: var(--accent); }
.check-row span { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }

.file-drop {
  border: 1px dashed var(--border-2);
  border-radius: 8px;
  padding: 22px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  background: var(--bg-muted);
}
.file-drop strong { display: block; color: var(--text); margin-bottom: 4px; font-size: 14px; }
.file-drop input { margin-top: 10px; }

.range-row { display: grid; gap: 8px; }
.range-row input[type="range"] { width: 100%; accent-color: var(--accent); }

.tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-muted);
  padding: 4px;
  border-radius: 12px;
  width: fit-content;
}

.tab {
  border: 0;
  background: transparent;
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-3);
  cursor: pointer;
}

.tab.is-active { background: var(--bg-elevated); color: var(--text); box-shadow: var(--shadow); }

.tab-pane { display: none; }
.tab-pane.is-on { display: block; }

.profile-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.profile-hero .who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.profile-hero h1 { font-size: 22px; letter-spacing: -0.03em; }
.profile-hero .muted { margin-top: 2px; }

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--warning-soft);
  border: 1px solid color-mix(in srgb, var(--warning) 18%, var(--border));
  border-radius: 12px;
}
.status-bar p { font-size: 13px; font-weight: 650; }

table.info { width: 100%; border-collapse: collapse; font-size: 13px; }
table.info th {
  text-align: left;
  color: var(--text-3);
  font-weight: 650;
  width: 42%;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
table.info td { padding: 10px 0; border-bottom: 1px solid var(--border); }
table.info tr:last-child th, table.info tr:last-child td { border-bottom: 0; }

.view-only { display: flex; }
.edit-only { display: none; }
.app-view { display: block; }
.app-edit { display: none; }
body.app-editing .view-only { display: none !important; }
body.app-editing .edit-only { display: flex; }
body.app-editing .app-view { display: none; }
body.app-editing .app-edit { display: block; }
body.app-editing .edit-only.actions { display: flex; }

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-3);
}

.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal .dow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  padding: 6px 0;
}

.cal .day {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  padding: 6px;
  font-size: 12px;
  min-height: 72px;
}

.cal .day.mute { color: var(--text-3); background: var(--bg-muted); }
.cal .day.today { border-color: var(--accent); background: var(--accent-soft); }
.cal .ev {
  margin-top: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.msg:hover, .msg.is-active { background: var(--bg-muted); }
.msg.unread strong { font-weight: 800; }
.msg time { font-size: 11px; color: var(--text-3); margin-left: auto; white-space: nowrap; }

.login-wrap {
  min-height: 100%;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.login-wrap.login-only {
  grid-template-columns: 1fr;
}

.login-wrap.login-only .login-panel {
  min-height: 100%;
}

.login-brand {
  height: auto;
  padding: 0 0 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  justify-content: center;
}

.login-brand .brand-logo {
  height: 32px;
  max-width: 220px;
  filter: brightness(0);
}
.login-hero .brand-logo {
  height: 32px;
  max-width: 220px;
}
.login-card h2 {
  font-size: 24px;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.login-lead {
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: 22px;
}
.login-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 18px;
  color: var(--text-3);
}
.login-foot {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 16px;
  text-align: center;
}

.login-hero {
  background: var(--bg-sidebar);
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-hero h1 {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  max-width: 520px;
}

.login-hero p { color: #93a0b5; max-width: 420px; margin-top: 14px; }

.login-panel {
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--bg);
}

.login-card {
  width: min(420px, 100%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
}

.stat-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  border-radius: 12px;
  min-width: 120px;
}
.pill b { display: block; font-size: 18px; }
.pill span { font-size: 11px; color: #93a0b5; }

.mobile-nav {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 45;
  grid-template-columns: repeat(5, 1fr);
}

.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  padding: 8px 0;
  border-radius: 12px;
}

.mobile-nav a svg,
.mobile-nav a i { width: 18px; height: 18px; font-size: 18px; line-height: 1; }
.mobile-nav a.is-active { color: var(--accent); background: var(--accent-soft); }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #0b1220;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: 0.28s var(--ease);
  z-index: 80;
}

.toast.show { transform: none; opacity: 1; }

.menu-btn { display: none; }
.search-btn { display: none; }

.kbd {
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--text-3);
}

.welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  margin-bottom: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.welcome h2 { font-size: 16px; font-weight: 600; }
.welcome p { color: var(--text-3); font-size: 13px; margin-top: 4px; }
.welcome-time { text-align: right; }
.welcome-time b { display: block; font-size: 18px; font-weight: 600; }
.welcome-time span { font-size: 12px; color: var(--text-3); }

.switch {
  width: 42px;
  height: 24px;
  border: 0;
  border-radius: 99px;
  background: var(--border-2);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: 0.2s var(--ease);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch.on { background: var(--accent); }
.switch.on::after { left: 21px; }

.cmdk {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: start center;
  padding-top: 12vh;
  background: rgba(8, 12, 20, 0.45);
}
.cmdk.open { display: grid; }
.cmdk-box {
  width: min(560px, 92vw);
  background: var(--bg-elevated);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.cmdk-box input {
  width: 100%;
  height: 54px;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
}
.cmdk-list { max-height: 320px; overflow: auto; padding: 8px; }
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}
.cmdk-item svg { width: 16px; height: 16px; color: var(--text-3); }
.cmdk-item:hover, .cmdk-item.active { background: var(--accent-soft); color: var(--accent); }
.cmdk-foot {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 11px;
  color: var(--text-3);
  border-top: 1px solid var(--border);
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: none;
  place-items: center;
  background: rgba(8, 12, 20, 0.5);
  padding: 16px;
}
.modal-root.open { display: grid; }
.modal {
  width: min(480px, 100%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
}
.modal h3 { margin-bottom: 4px; }
.modal .muted { margin-bottom: 16px; display: block; }

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.kanban-col {
  background: var(--bg-muted);
  border-radius: 8px;
  min-height: 440px;
  border: 1px dashed transparent;
}
.kanban-col.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.kanban-col h4 {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}
.kanban-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: grab;
  box-shadow: var(--shadow);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card strong { display: block; font-size: 13px; margin-bottom: 6px; }
.kanban-card p { font-size: 12px; color: var(--text-3); }

.file-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
}
.file-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}
.file-ico.pdf { background: var(--danger-soft); color: var(--danger); }
.file-ico.xls { background: var(--success-soft); color: var(--success); }
.file-ico.doc { background: var(--info-soft); color: var(--info); }

.alert {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 12px;
  display: none;
}
.alert.show { display: block; }
.alert.danger { background: var(--danger-soft); color: var(--danger); }

table.data tbody tr[hidden] { display: none; }

table.data.fit { min-width: 0; }
table.data.striped tbody tr:nth-child(even) { background: var(--bg-muted); }
table.data.striped tbody tr:hover { background: var(--accent-soft); }
table.data.compact th, table.data.compact td { padding: 8px 14px; font-size: 12.5px; }
table.data.comfortable th, table.data.comfortable td { padding: 16px 18px; }
table.data.sticky thead th {
  position: sticky;
  top: 0;
  background: var(--bg-muted);
  z-index: 1;
  box-shadow: 0 1px 0 var(--border);
}
table.data.bordered { border: 1px solid var(--border); }
table.data.bordered th,
table.data.bordered td { border: 1px solid var(--border); }
table.data.bordered tbody tr:last-child td { border-bottom: 1px solid var(--border); }
table.data.borderless th,
table.data.borderless td { border: 0; }
table.data.head-navy thead th {
  background: var(--bg-sidebar);
  color: var(--text-inv-2);
  border-bottom: 0;
}
table.data.head-navy.sticky thead th { background: var(--bg-sidebar); box-shadow: none; }
table.data.head-accent thead th {
  background: var(--accent);
  color: #fff;
  border-bottom: 0;
}
table.data.head-accent.sticky thead th { background: var(--accent); box-shadow: none; }
table.data.head-navy th[data-sort]::after,
table.data.head-accent th[data-sort]::after { color: inherit; opacity: 0.65; }
table.data tbody tr.row-ok { background: var(--success-soft); }
table.data tbody tr.row-info { background: var(--info-soft); }
table.data tbody tr.row-warn { background: var(--warning-soft); }
table.data tbody tr.row-danger,
table.data tbody tr.low { background: var(--danger-soft); }
table.data.money td.num, table.data td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
table.data th[data-sort] { cursor: pointer; user-select: none; }
table.data th[data-sort]::after { content: " ↕"; color: var(--text-3); font-size: 10px; }
table.data th.sort-asc::after { content: " ↑"; color: var(--accent); }
table.data th.sort-desc::after { content: " ↓"; color: var(--accent); }
table.data tbody tr.selected { background: var(--accent-soft); }
table.data.log { font-variant-numeric: tabular-nums; }
table.data.log td { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.bulk-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
}
.bulk-bar.show { display: flex; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  height: 32px;
  padding: 0 12px;
  border-radius: 4px;
  background: var(--bg-elevated);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.chip.is-active { background: var(--accent); color: #fff; border-color: transparent; }

.expand-toggle {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  cursor: pointer;
}
.expand-child td {
  background: var(--bg-muted);
  padding-top: 8px;
  padding-bottom: 8px;
}

.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.dot-ok { color: var(--success); font-weight: 800; }
.dot-no { color: var(--border-2); }

.view-grid { display: none; }
body.view-cards .view-table { display: none; }
body.view-cards .view-grid { display: grid; }

.filter-side {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
}
.filter-card { padding: 16px; height: fit-content; position: sticky; top: 84px; }
.filter-card .label { margin-top: 12px; }

.pager-pages { display: flex; gap: 6px; }
.pager-pages .btn { min-width: 36px; padding: 0 8px; justify-content: center; }
.pager-pages .btn.is-active { background: var(--accent); color: #fff; border-color: transparent; }

.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
}
.row-actions .icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.row-actions .icon-btn.danger { color: var(--danger); }
.row-actions .icon-btn.danger:hover { background: var(--danger-soft); border-color: transparent; }

.icon-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 10px;
}
.icon-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 12px;
  cursor: pointer;
  min-width: 0;
  color: var(--text-2);
}
.icon-tile:hover, .icon-tile:focus {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}
.icon-tile svg { width: 22px; height: 22px; flex-shrink: 0; }
.icon-tile span {
  font-size: 11px;
  font-weight: 650;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icon-tile[hidden] { display: none; }

.create-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.create-steps span {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-3);
}
.create-steps span.is-on { background: var(--accent-soft); color: var(--accent); }

@media (max-width: 980px) {
  .filter-side { grid-template-columns: 1fr; }
  .filter-card { position: static; }
  .grid-2 { grid-template-columns: 1fr; }
  .page-head-dashboard {
    align-items: flex-start;
  }
  .dash-news-stats {
    order: 3;
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .form-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-1-2, .grid-2-1, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .sidebar {
    position: fixed;
    transform: translateX(-105%);
    width: min(86vw, 300px);
    box-shadow: var(--shadow-lg);
  }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-collapsed .sidebar { width: min(86vw, 300px); }
  body.sidebar-collapsed .brand-text,
  body.sidebar-collapsed .nav-label,
  body.sidebar-collapsed .nav-section-title,
  body.sidebar-collapsed .nav-badge,
  body.sidebar-collapsed .nav-caret,
  body.sidebar-collapsed .nav-tag { display: block; }
  body.sidebar-collapsed .nav-sub { display: none; }
  body.sidebar-open .nav-group.is-open .nav-sub { display: block; }
  body.sidebar-collapsed .nav-link { justify-content: flex-start; padding-inline: 12px; }
  body.sidebar-collapsed .brand { justify-content: center; padding-inline: 20px; }
  body.sidebar-collapsed .brand-logo {
    width: auto;
    height: 28px;
    max-width: 248px;
    object-fit: contain;
    object-position: center;
  }
  .menu-btn { display: grid; }
  #collapseBtn { display: none; }
  .user-chip span, .search { display: none; }
  .topbar { padding: 0 12px; }
  body:has(.dropdown.open) .topbar { z-index: 55; }
  .topbar-split { display: none; }
  .notify-menu,
  .user-menu {
    position: fixed;
    top: calc(var(--topbar) + 6px);
    max-height: calc(100vh - var(--topbar) - 88px);
    max-height: calc(100dvh - var(--topbar) - 88px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .notify-menu {
    left: 12px;
    right: 12px;
    width: auto;
  }
  .user-menu {
    left: auto;
    right: 12px;
    width: min(196px, calc(100vw - 24px));
  }
  .page { padding: 18px 14px 16px; }
  .app-footer { padding: 8px 14px 88px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { min-height: 220px; padding: 28px 22px; }
  .login-hero h1 { font-size: 28px; }
  .mobile-nav { display: grid; }
  .form-grid { grid-template-columns: 1fr; }
  .form-inline { grid-template-columns: 1fr; }
  .cal-wrap { overflow-x: auto; }
  .cal { min-width: 560px; }
  .search-btn { display: grid; }
  .welcome { flex-direction: column; align-items: flex-start; }
  .welcome-time { text-align: left; }
  .toast { bottom: 88px; left: 16px; right: 16px; }
  .kanban { grid-template-columns: repeat(4, minmax(240px, 1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
}

.alert-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}
.alert-box.ok { background: var(--success-soft); color: var(--success); }
.alert-box.warn { background: var(--warning-soft); color: var(--warning); }
.alert-box.danger { background: var(--danger-soft); color: var(--danger); }
.alert-box.info { background: var(--info-soft); color: var(--info); }
.alert-box.gold { background: var(--gold-soft); color: #8a6a2a; }
.alert-box span { font-weight: 500; color: inherit; opacity: 0.85; }

.ui-swatch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ribbon {
  position: relative;
  overflow: hidden;
}
.ribbon::after {
  content: attr(data-ribbon);
  position: absolute;
  top: 12px;
  right: -28px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 36px;
  transform: rotate(35deg);
}

.price-card {
  padding: 28px 22px;
  text-align: center;
  position: relative;
}
.price-card.is-featured {
  border-color: var(--accent);
}
.price-card .kpi-value { margin: 8px 0 4px; }
.price-list { text-align: left; margin: 18px 0; display: grid; gap: 8px; }
.price-list li { font-size: 13px; color: var(--text-2); }

.acc-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  overflow: hidden;
}
.acc-item + .acc-item { margin-top: 8px; }
.acc-item button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 14px 16px;
  font-weight: 700;
  cursor: pointer;
}
.acc-item .acc-body {
  display: none;
  padding: 0 16px 14px;
  font-size: 13px;
  color: var(--text-3);
}
.acc-item.is-open .acc-body { display: block; }

.otp-row { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }
.otp-row input {
  width: 48px;
  height: 52px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-muted);
}
.otp-row input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.error-page {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  text-align: center;
  background: var(--bg);
}
.error-page .error-code {
  font-size: 64px;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
}
.error-page h1 { margin: 12px 0 8px; font-size: 22px; font-weight: 600; }
.error-page p { color: var(--text-3); max-width: 420px; margin: 0 auto 22px; }

.chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - var(--topbar) - 120px);
  overflow: hidden;
}
.chat-list { border-right: 1px solid var(--border); overflow: auto; }
.chat-thread { display: flex; flex-direction: column; min-width: 0; }
.chat-thread .chat-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-msgs {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  background: var(--bg-muted);
}
.bubble {
  max-width: 72%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.bubble.me {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.chat-compose {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.integ-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
}
.invoice-sheet {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px;
}
.invoice-sheet table { width: 100%; border-collapse: collapse; }
.invoice-sheet th, .invoice-sheet td { padding: 10px 0; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; }
.invoice-sheet td.num, .invoice-sheet th.num { text-align: right; }
.map-panel {
  height: 280px;
  border-radius: 8px;
  background: #1a2f4a;
  position: relative;
  overflow: hidden;
}
.map-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c4b07a;
}
.demo-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-3);
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.detail-head .who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.detail-head h1 { font-size: 22px; }
.detail-head .handle { color: var(--text-3); font-size: 13px; font-weight: 500; }
.detail-head .karar {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.btn-wa { color: var(--success); border-color: var(--success); background: var(--bg-elevated); }
.btn-wa:hover { background: var(--success-soft); }
.btn-doc { color: var(--accent); border-color: var(--accent); background: var(--bg-elevated); }
.btn-doc:hover { background: var(--accent-soft); }

.detail-layout {
  display: grid;
  grid-template-columns: 268px 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}
.detail-status {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.detail-status .status-pill {
  flex: 1;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  background: var(--warning);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 6px;
  text-align: center;
  line-height: 1.25;
}
.detail-status .status-pill.ok { background: var(--success); }
.detail-status .status-pill.info { background: var(--info); }
.detail-status .status-pill.danger { background: var(--danger); }
.detail-status .select { width: 44px; padding: 0 6px; height: 36px; }

.detail-menu { display: grid; gap: 2px; }
.detail-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 9px 10px;
  border-radius: 6px;
  text-align: left;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-2);
  cursor: pointer;
}
.detail-menu button svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.detail-menu button .count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 700;
}
.detail-menu button.is-active {
  background: var(--accent);
  color: #fff;
}
.detail-menu button.is-active svg { color: #fff; }
.detail-menu button.is-active .count { color: rgba(255,255,255,0.8); }
.detail-nav-foot { margin-top: 12px; }

.sheet { width: 100%; border-collapse: collapse; }
.sheet th {
  text-align: left;
  width: 220px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 700;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  vertical-align: top;
}
.sheet .colon {
  width: 14px;
  color: var(--text-3);
  padding: 12px 8px 12px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.sheet td {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  vertical-align: top;
}
.sheet tr:last-child th,
.sheet tr:last-child .colon,
.sheet tr:last-child td { border-bottom: 0; }

.dossier.is-editing .app-view { display: none; }
.dossier.is-editing .app-edit { display: block; }
.dossier.is-editing .view-only { display: none !important; }
.dossier.is-editing .edit-only { display: flex; }
.dossier .app-edit { display: none; }
.dossier .edit-only { display: none; }

.empty-note {
  padding: 28px 8px;
  color: var(--text-3);
  font-size: 13px;
}

@media (max-width: 980px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-list { display: none; }
}

@media (max-width: 640px) {
  .grid-4 { grid-template-columns: 1fr; }
  .form-grid.cols-4 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 22px; }
  .cal .day { min-height: 54px; }
  .otp-row input { width: 40px; height: 44px; }
}
