/* ==========================================================================
   Panel Hosting — White-label client area
   Design tokens are intentionally brand-neutral: every colour below can be
   remapped per deployment without touching component rules.
   ========================================================================== */

:root {
  --bg: #f5f7fc;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f9;
  --ink: #0b1220;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e6ebf5;
  --line-2: #d7deea;
  --brand: #1b2f6e;
  --brand-dark: #122350;
  --brand-soft: #eef2fb;
  --accent: #f4770a;
  --accent-dark: #b45309;
  --accent-soft: #fff4e8;
  --teal: #0ea5a4;
  --success: #12b76a;
  --success-soft: #e8f8ef;
  --warning: #f79009;
  --warning-soft: #fff4e5;
  --danger: #f04438;
  --danger-soft: #feecec;
  --nav: #0a1836;
  --nav-2: #071129;
  --nav-ink: #b9c7dc;
  --nav-muted: #7d90b0;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 14px 36px -22px rgba(16, 24, 40, .18);
  --shadow-lg: 0 24px 54px -24px rgba(16, 24, 40, .32);
  --sidebar-w: 268px;
  --topbar-h: 72px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p {
  margin-top: 0;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

img, svg {
  display: block;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  line-height: 1;
  flex: none;
}

[data-icon] > .icon {
  width: 100%;
  height: 100%;
}

[data-icon].icon-lg {
  width: 20px;
  height: 20px;
}

[data-icon].icon-sm {
  width: 14px;
  height: 14px;
}

.stat-icon [data-icon],
.quick-icon [data-icon] {
  width: 19px;
  height: 19px;
}

.alert > [data-icon] {
  width: 18px;
  height: 18px;
}

.card-title [data-icon] {
  width: 17px;
  height: 17px;
  color: var(--brand);
}

.meta-item [data-icon] {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}

.file-icon [data-icon] {
  width: 15px;
  height: 15px;
}

.file-breadcrumb [data-icon] {
  width: 13px;
  height: 13px;
  color: var(--muted-2);
}

.activity-icon [data-icon] {
  width: 15px;
  height: 15px;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: rgba(244, 119, 10, .2);
}

:focus-visible {
  outline: 3px solid rgba(244, 119, 10, .26);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.app {
  min-height: 100vh;
}

.app-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: var(--sidebar-w);
}

.content {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px;
  flex: 1;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.footer a {
  color: var(--muted);
}

.footer a:hover {
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  padding: 18px 14px 16px;
  overflow-y: auto;
  color: var(--nav-ink);
  background:
    radial-gradient(560px 260px at 15% -8%, rgba(244, 119, 10, .20), transparent 68%),
    radial-gradient(520px 300px at 100% 0%, rgba(46, 91, 214, .22), transparent 62%),
    linear-gradient(180deg, var(--nav), var(--nav-2));
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .14) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .14);
  border-radius: 999px;
}

/* --------------------------------------------------------------------------
   Brand (white-label: the uploaded image is the brand, no text label)
   -------------------------------------------------------------------------- */

.brand {
  display: block;
  margin: 0 0 8px;
  padding: 4px 8px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 198px;
  height: auto;
  object-fit: contain;
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.brand-fallback {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
}

/* Legacy brand hooks kept so older deployments do not lose styling. */
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.04em;
  box-shadow: 0 8px 20px -8px rgba(244, 119, 10, .7);
}

.brand-name {
  display: block;
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.25;
}

.brand-sub {
  display: block;
  margin: 2px 0 0;
  color: var(--nav-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nav-section {
  margin: 18px 0 6px;
  padding: 0 11px;
  color: #8195b8;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 2px 0;
  padding: 9px 11px;
  border-radius: 11px;
  color: var(--nav-ink);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
  transform: translateX(2px);
}

.nav-item .icon {
  width: 18px;
  height: 18px;
  color: #8aa0c4;
  transition: color .16s ease;
}

.nav-item:hover .icon {
  color: #d5e2f6;
}

.nav-item.active .icon {
  color: #ffb066;
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(244, 119, 10, .24), rgba(244, 119, 10, .07) 58%, rgba(244, 119, 10, 0));
  box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px rgba(244, 119, 10, .16);
}

.nav-badge {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #cfe2ff;
  font-size: 10px;
  font-weight: 700;
}

.sidebar-spacer {
  flex: 1;
  min-height: 18px;
}

.sidebar-card {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: rgba(255, 255, 255, .045);
}

.sidebar-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: #c9d6e8;
}

.sidebar-card .progress {
  height: 6px;
  margin: 9px 0 8px;
  background: rgba(255, 255, 255, .1);
}

.sidebar-card a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8fc4ff;
  font-size: 11.5px;
  font-weight: 600;
}

.sidebar-card a:hover {
  color: #fff;
}

.sidebar-card a .icon {
  width: 12px;
  height: 12px;
}

.sidebar-overlay {
  display: none;
}

.anchor-flash {
  animation: anchorFlash 1.1s ease;
  border-radius: var(--radius);
}

@keyframes anchorFlash {
  0% {
    box-shadow: 0 0 0 0 rgba(31, 111, 235, .38);
  }
  100% {
    box-shadow: 0 0 0 14px rgba(31, 111, 235, 0);
  }
}

/* --------------------------------------------------------------------------
   Topbar
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--topbar-h);
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.menu-toggle {
  display: none;
}

.topbar .menu-toggle {
  display: none;
}

.search {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 390px;
}

.search > .icon {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.search > [data-icon] {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 1;
  width: 17px;
  height: 17px;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 13px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.search input::placeholder {
  color: var(--muted-2);
}

.search input:focus {
  border-color: #b9c8e6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(27, 47, 110, .08);
  outline: none;
}

.search kbd {
  position: absolute;
  top: 50%;
  right: 9px;
  padding: 2px 6px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: #fff;
  color: var(--muted-2);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  transform: translateY(-50%);
}

.search-results {
  position: absolute;
  top: 46px;
  right: 0;
  left: 0;
  z-index: 60;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.search-results.show {
  display: block;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 12.5px;
}

.search-result:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.search-result .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.search-result small {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 10.5px;
}

.search-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #d6f5e3;
  border-radius: 999px;
  background: #f1fdf7;
  color: #087443;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(18, 183, 106, .14);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.icon-btn:hover {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

.icon-btn .icon {
  width: 19px;
  height: 19px;
}

.icon-btn.has-dot {
  position: relative;
}

.icon-btn.has-dot::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--danger);
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  display: none;
  min-width: 230px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-head {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 5px;
}

.dropdown-head strong {
  display: block;
  font-size: 12.5px;
}

.dropdown-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 12.5px;
}

.dropdown-item:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.dropdown-item .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-divider {
  height: 1px;
  margin: 5px 5px;
  background: var(--line);
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 7px 4px 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
}

.user-btn:hover {
  border-color: var(--line);
  background: var(--surface-2);
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 40%, var(--accent));
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .02em;
  box-shadow: 0 0 0 3px rgba(27, 47, 110, .08);
  flex: none;
}

.user-meta {
  display: none;
  text-align: left;
  line-height: 1.25;
}

.user-meta strong {
  display: block;
  font-size: 12px;
}

.user-meta span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.user-btn > .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Page head
   -------------------------------------------------------------------------- */

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 760;
  letter-spacing: -.03em;
  line-height: 1.14;
}

.page-sub {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--brand);
}

.breadcrumbs .icon {
  width: 13px;
  height: 13px;
  color: var(--muted-2);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.btn:hover {
  border-color: #c2cfe2;
  background: var(--surface-2);
  color: var(--ink);
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn-primary {
  border-color: #16265c;
  background: linear-gradient(180deg, #243c82, #16265c);
  color: #fff;
  box-shadow: 0 8px 18px -12px rgba(22, 38, 92, .9);
}

.btn-primary:hover {
  border-color: #0f1c48;
  background: linear-gradient(180deg, #1c326f, #0f1c48);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  border-color: transparent;
  background: var(--surface-3);
  color: var(--ink);
}

.btn-success {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  border-color: #0e9f5c;
  background: #0e9f5c;
  color: #fff;
}

.btn-danger {
  border-color: #f7c6c2;
  background: #fff;
  color: #b42318;
}

.btn-danger:hover {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: #912018;
}

.btn-sm {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}

.btn-sm .icon {
  width: 14px;
  height: 14px;
}

.btn-icon {
  width: 32px;
  padding: 0;
}

.btn[disabled],
.btn.disabled {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Cards & grids
   -------------------------------------------------------------------------- */

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.card-title .icon {
  width: 17px;
  height: 17px;
  color: var(--brand);
}

.card-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.card-body {
  padding: 20px;
}

.card-body.tight {
  padding: 0;
}

.card-body.flush {
  padding: 0;
  overflow: hidden;
  border-radius: 0 0 var(--radius) var(--radius);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
}

.grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.grid:last-child {
  margin-bottom: 0;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.span-2 {
  grid-column: span 2;
}

.layout-content-aside {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.layout-aside-content {
  grid-template-columns: 340px minmax(0, 1fr);
}

.stat-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* --------------------------------------------------------------------------
   Stat cards
   -------------------------------------------------------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat {
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
}

.stat-icon .icon {
  width: 19px;
  height: 19px;
}

.stat-icon.teal {
  background: #e6fbfa;
  color: #0f8f8e;
}

.stat-icon.green {
  background: var(--success-soft);
  color: #0b8a52;
}

.stat-icon.orange {
  background: var(--warning-soft);
  color: #b86200;
}

.stat-icon.purple {
  background: #f1eafe;
  color: #6b21a8;
}

.stat-value {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -.025em;
  line-height: 1.15;
}

.stat-label {
  color: var(--muted);
  font-size: 11.5px;
}

.stat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10.5px;
}

.stat-meta a {
  font-weight: 650;
}

/* --------------------------------------------------------------------------
   Progress
   -------------------------------------------------------------------------- */

.progress {
  height: 7px;
  margin: 8px 0;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.progress > span {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ffb066);
  transition: width .4s ease;
}

.progress.green > span {
  background: linear-gradient(90deg, #12b76a, #34d399);
}

.progress.orange > span {
  background: linear-gradient(90deg, #f79009, #fdb022);
}

.progress.danger > span {
  background: linear-gradient(90deg, #f04438, #fb7185);
}

.progress.purple > span {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

.progress.thin {
  height: 5px;
}

/* --------------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------------- */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid;
  border-radius: 12px;
  font-size: 12.5px;
}

.alert > .icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.alert p {
  margin: 0;
}

.alert strong {
  font-weight: 700;
}

.alert a {
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.alert-info {
  border-color: #cfe0ff;
  background: #f0f6ff;
  color: #1e3a8a;
}

.alert-info > .icon {
  color: #2563eb;
}

.alert-warn {
  border-color: #fde3b0;
  background: #fff9ec;
  color: #7a4a00;
}

.alert-warn > .icon {
  color: #d97706;
}

.alert-success {
  border-color: #bfeed4;
  background: #f1fdf7;
  color: #05603a;
}

.alert-success > .icon {
  color: #0e9f5c;
}

.alert-danger {
  border-color: #f7c6c2;
  background: #fff5f4;
  color: #912018;
}

.alert-danger > .icon {
  color: #d92d20;
}

/* --------------------------------------------------------------------------
   Badges & pills
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.55;
  white-space: nowrap;
}

.badge .icon {
  width: 12px;
  height: 12px;
}

.badge-success {
  background: var(--success-soft);
  color: #087443;
}

.badge-warn {
  background: var(--warning-soft);
  color: #a15c00;
}

.badge-danger {
  background: var(--danger-soft);
  color: #b42318;
}

.badge-info {
  background: var(--brand-soft);
  color: #1d4ed8;
}

.badge-neutral {
  background: #eef2f7;
  color: #475569;
}

.badge-lock {
  background: #f1eafe;
  color: #6b21a8;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

table.data th {
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .07em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

table.data td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.data tbody tr:last-child td {
  border-bottom: 0;
}

table.data tbody tr:hover {
  background: #fafcff;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.cell-main {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink);
}

.cell-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.mono {
  font-family: var(--mono);
  font-size: 11.5px;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 700;
}

.label .optional {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 500;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: #fff;
  font-size: 12.5px;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-2);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #b3c2e0;
  box-shadow: 0 0 0 3px rgba(27, 47, 110, .09);
  outline: none;
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

.hint {
  color: var(--muted);
  font-size: 10.5px;
}

.hint strong {
  color: var(--ink-2);
}

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .prefix {
  display: flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-right: 0;
  border-radius: 9px 0 0 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  white-space: nowrap;
}

.input-group .input {
  border-radius: 0 9px 9px 0;
}

.input-group .suffix-btn {
  display: grid;
  place-items: center;
  width: 40px;
  border: 1px solid var(--line-2);
  border-left: 0;
  border-radius: 0 9px 9px 0;
  background: var(--surface-2);
  color: var(--muted);
}

.input-group .suffix-btn:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.input-group .suffix-btn .icon {
  width: 16px;
  height: 16px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.check input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--brand);
  flex: none;
}

.check strong {
  color: var(--ink-2);
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .18s ease;
  flex: none;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .25);
  transition: transform .18s ease;
}

.switch input:checked + .switch-track {
  background: var(--success);
}

.switch input:checked + .switch-track::after {
  transform: translateX(17px);
}

.switch-label {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
}

.form-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
}

.form-note code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #e8eef8;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10.5px;
}

/* --------------------------------------------------------------------------
   Quick actions (cPanel style)
   -------------------------------------------------------------------------- */

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.quick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  min-height: 103px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.quick:hover {
  border-color: #bfd4fb;
  color: var(--ink);
  box-shadow: 0 12px 26px -18px rgba(31, 111, 235, .5);
  transform: translateY(-1px);
}

.quick-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}

.quick-icon.green {
  background: var(--success-soft);
  color: #0b8a52;
}

.quick-icon.orange {
  background: var(--warning-soft);
  color: #b86200;
}

.quick-icon.purple {
  background: #f1eafe;
  color: #6b21a8;
}

.quick-icon.teal {
  background: #e6fbfa;
  color: #0f8f8e;
}

.quick-icon .icon {
  width: 19px;
  height: 19px;
}

.quick-title {
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.3;
}

.quick-sub {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   Domain hero
   -------------------------------------------------------------------------- */

.domain-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.domain-name {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.domain-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11.5px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item .icon {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}

.domain-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.docroot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10.5px;
}

/* --------------------------------------------------------------------------
   Checklist
   -------------------------------------------------------------------------- */

.checklist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.checklist li .icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--success);
}

.checklist li strong {
  color: var(--ink-2);
  font-weight: 650;
}

.checklist li.lock .icon {
  color: #9333ea;
}

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  padding: 12px 11px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
}

.tab.active {
  color: var(--accent-dark);
}

.tab.active::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* --------------------------------------------------------------------------
   Activity / timeline
   -------------------------------------------------------------------------- */

.activity {
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity li {
  display: flex;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.activity li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.activity-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  flex: none;
}

.activity-icon .icon {
  width: 15px;
  height: 15px;
}

.activity-body {
  min-width: 0;
}

.activity-body strong {
  display: block;
  font-size: 12px;
  font-weight: 650;
}

.activity-body span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
}

.activity-time {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 10px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Accordion (FAQ)
   -------------------------------------------------------------------------- */

.faq {
  display: grid;
  gap: 9px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.faq details[open] {
  border-color: #cfe0ff;
  background: #fbfdff;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 650;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "−";
}

.faq .faq-body {
  padding: 0 14px 13px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Misc
   -------------------------------------------------------------------------- */

.empty-state {
  padding: 40px 20px;
  text-align: center;
}

.empty-state .icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
}

.empty-state h3 {
  margin: 0 0 5px;
  font-size: 14px;
}

.empty-state p {
  margin: 0 auto 14px;
  max-width: 340px;
  color: var(--muted);
  font-size: 12px;
}

.kv {
  display: grid;
  gap: 10px;
  margin: 0;
}

.kv div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
}

.kv div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-weight: 650;
  text-align: right;
  word-break: break-word;
}

.divider {
  height: 1px;
  margin: 16px 0;
  background: var(--line);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.file-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 11.5px;
}

.file-breadcrumb .icon {
  width: 13px;
  height: 13px;
  color: var(--muted-2);
}

.file-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  flex: none;
}

.file-icon.folder {
  background: #fff6e6;
  color: #c47a00;
}

.file-icon .icon {
  width: 15px;
  height: 15px;
}

.file-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.usage-list {
  display: grid;
  gap: 12px;
}

.usage-row .usage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.usage-row .usage-top strong {
  color: var(--ink-2);
  font-weight: 650;
}

.usage-row .progress {
  margin: 5px 0 0;
}

.icon-lg {
  width: 20px;
  height: 20px;
}

.icon-sm {
  width: 14px;
  height: 14px;
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: grid;
  gap: 9px;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  color: var(--ink-2);
  font-size: 12px;
  animation: toastIn .22s ease both;
}

.toast .icon {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--success);
}

.toast.warn .icon {
  color: var(--warning);
}

.toast.error .icon {
  color: var(--danger);
}

.toast strong {
  display: block;
  font-size: 12px;
}

.toast span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10.5px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Auth / login
   -------------------------------------------------------------------------- */

.auth {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  min-height: 100vh;
  background: #fff;
}

.auth-side {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 48px;
  background:
    radial-gradient(800px 400px at 85% 10%, rgba(34, 211, 238, .28), transparent 60%),
    radial-gradient(600px 500px at 10% 90%, rgba(47, 129, 247, .3), transparent 60%),
    linear-gradient(145deg, #071325, #0d2547 55%, #0a1c36);
  color: #fff;
}

.auth-side::after {
  content: "";
  position: absolute;
  right: -140px;
  bottom: -170px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(255, 255, 255, .03), 0 0 0 120px rgba(255, 255, 255, .025);
  pointer-events: none;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.auth-brand .brand-mark {
  width: 44px;
  height: 44px;
  font-size: 20px;
}

.auth-brand .brand-name {
  font-size: 17px;
}

.auth-hero {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 48px 0;
}

.auth-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.1;
}

.auth-hero p {
  margin: 0;
  color: #9fb4d1;
  font-size: 14px;
  line-height: 1.65;
}

.auth-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 11px;
  background: rgba(255, 255, 255, .045);
  color: #d7e4f5;
  font-size: 11.5px;
}

.auth-feature .icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: #6bd6ff;
}

.auth-foot {
  position: relative;
  z-index: 1;
  color: #7d95b6;
  font-size: 10.5px;
}

.auth-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.auth-form {
  width: 100%;
  max-width: 400px;
}

.auth-form h2 {
  margin: 0 0 6px;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -.025em;
}

.auth-form > p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 12.5px;
}

.auth-form .field {
  margin-bottom: 14px;
}

.auth-form .btn {
  width: 100%;
  height: 43px;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 18px;
}

.auth-row a {
  font-size: 11.5px;
  font-weight: 650;
}

.auth-note {
  margin-top: 22px;
  padding: 11px 12px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.auth-note strong {
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (min-width: 1200px) {
  .user-meta {
    display: block;
  }
}

@media (max-width: 1180px) {
  .grid-4,
  .stat-grid,
  .stat-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .layout-content-aside,
  .layout-aside-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-w: 264px;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform .24s ease;
    box-shadow: 20px 0 50px -20px rgba(2, 8, 23, .6);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    background: rgba(2, 8, 23, .45);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .24s ease, visibility .24s ease;
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }

  .app-main {
    margin-left: 0;
  }

  .menu-toggle {
    display: grid;
  }

  .topbar .menu-toggle {
    display: grid;
  }

  .topbar {
    padding: 0 16px;
  }

  .content {
    padding: 18px;
  }

  .footer {
    padding: 16px 18px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .status-pill {
    display: none;
  }

  .auth {
    grid-template-columns: 1fr;
  }

  .auth-side {
    display: none;
  }

  .auth-card {
    min-height: 100vh;
    padding: 24px;
    background:
      radial-gradient(600px 300px at 90% 0%, rgba(34, 211, 238, .12), transparent 60%),
      #fff;
  }
}

@media (max-width: 620px) {
  .stat-grid,
  .stat-grid.three {
    grid-template-columns: 1fr;
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-head h1 {
    font-size: 23px;
  }

  .search {
    max-width: none;
  }

  .search kbd {
    display: none;
  }

  .content {
    padding: 14px;
  }

  .card-head,
  .card-body {
    padding: 15px;
  }

  .footer {
    padding: 14px;
  }
}

@media (max-width: 460px) {
  .topbar-right .icon-btn:not(.menu-toggle):not(.has-dot),
  .user-meta,
  .user-btn > .icon {
    display: none;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .quick-grid.two {
    grid-template-columns: 1fr;
  }

  .auth-features {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* bPanel additions */
.topbar-site-switch{display:flex;align-items:center;gap:6px;margin-left:10px;padding:4px 8px;border:1px solid var(--border,#e3e9f2);border-radius:10px;background:#fff}
.topbar-site-switch .icon{width:14px;height:14px;color:var(--muted,#6b7a90)}
.topbar-site-switch select{border:0;background:transparent;font:inherit;font-size:12px;font-weight:600;color:var(--text,#152033);max-width:220px;outline:none;cursor:pointer}
@media (max-width:900px){.topbar-site-switch{display:none}}

/* ==========================================================================
   White-label brand + UI refresh
   Appended so the component rules above stay intact and deployments can
   override a small, predictable surface.
   ========================================================================== */

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  transform: translateY(-160%);
  transition: transform .18s ease;
}

.skip-link:focus {
  color: #fff;
  transform: translateY(0);
}

.topbar-brand {
  display: none;
}

/* --- Dashboard hero ------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 28px 30px;
  border-radius: 22px;
  background:
    radial-gradient(760px 320px at 88% 8%, rgba(244, 119, 10, .34), transparent 62%),
    radial-gradient(620px 420px at 6% 112%, rgba(46, 91, 214, .38), transparent 62%),
    linear-gradient(120deg, #0a1836, #152a63 58%, #1b3378);
  color: #fff;
  box-shadow: 0 28px 60px -34px rgba(10, 24, 54, .95);
}

.hero::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -170px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 56px rgba(255, 255, 255, .03), 0 0 0 112px rgba(255, 255, 255, .02);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 660px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: #ffc08a;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(244, 119, 10, .22);
}

.hero h1 {
  margin: 0 0 9px;
  color: #fff;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 780;
  letter-spacing: -.035em;
  line-height: 1.12;
}

.hero-sub {
  max-width: 560px;
  margin: 0;
  color: #b9c8e4;
  font-size: 13.5px;
  line-height: 1.6;
}

.hero-sub strong {
  color: #fff;
  font-weight: 650;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #dce6f7;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
}

.dot-success {
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, .16);
}

.dot-danger {
  background: #fb7185;
  box-shadow: 0 0 0 3px rgba(251, 113, 133, .16);
}

.dot-warn {
  background: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, .18);
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 9px;
}

.btn-light {
  border-color: #fff;
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .9);
}

.btn-light:hover {
  border-color: #fff;
  background: #fff;
  color: var(--brand-dark);
  transform: translateY(-1px);
}

.btn-ghost-light {
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .07);
  color: #fff;
}

.btn-ghost-light:hover {
  border-color: rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .13);
  color: #fff;
}

/* --- Stat cards ---------------------------------------------------------- */

.stat {
  position: relative;
  padding: 18px 18px 16px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.stat:hover {
  border-color: #d8e1f0;
  box-shadow: 0 20px 40px -30px rgba(16, 24, 40, .45);
  transform: translateY(-2px);
}

.stat-value-sm {
  font-size: 15px;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}

.stat-trend {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--success-soft);
  color: #087443;
  font-size: 10.5px;
  font-weight: 700;
}

.stat-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.stat-foot a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.stat-foot a:hover {
  color: var(--accent-dark);
}

.stat-foot .icon {
  width: 12px;
  height: 12px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: start;
}

.dashboard-sites {
  margin-top: 0;
}

/* --- Small utility + legacy fixes --------------------------------------- */

.small {
  font-size: 11.5px;
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-end {
  align-items: flex-end;
}

.gap-8 {
  gap: 8px;
}

.btn-secondary {
  border-color: #d9e2f2;
  background: var(--brand-soft);
  color: var(--brand);
}

.btn-secondary:hover {
  border-color: #c3d2ea;
  background: #e6ecf9;
  color: var(--brand-dark);
}

.text-center {
  text-align: center;
}

.inline-form {
  display: inline;
}

.badge-primary {
  background: var(--brand-soft);
  color: var(--brand);
}

.alert-warning {
  border-color: #fde3b0;
  background: #fff9ec;
  color: #7a4a00;
}

.alert-warning > .icon {
  color: #d97706;
}

.quick:hover {
  border-color: #f6c9a6;
  box-shadow: 0 16px 32px -24px rgba(244, 119, 10, .55);
}

.quick-title {
  font-size: 13px;
}

.topbar-site-switch {
  border-color: var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}

.topbar-site-switch .icon {
  color: var(--muted);
}

.topbar-site-switch select {
  color: var(--ink);
}

/* --- Auth / login refresh ------------------------------------------------ */

.auth-body {
  background: #fff;
}

.auth-side {
  padding: 44px 52px;
  background:
    radial-gradient(760px 380px at 88% 6%, rgba(244, 119, 10, .30), transparent 60%),
    radial-gradient(680px 520px at 4% 96%, rgba(46, 91, 214, .34), transparent 62%),
    linear-gradient(145deg, #071129, #0e2352 55%, #142b66);
}

.auth-side-top {
  position: relative;
  z-index: 1;
}

.auth-logo {
  display: block;
  width: min(224px, 72%);
  height: auto;
}

.auth-hero {
  max-width: 540px;
  margin: 38px 0;
}

.auth-hero .eyebrow {
  color: #ffb066;
}

.auth-hero h1 {
  margin: 0 0 13px;
  color: #fff;
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 780;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.auth-hero > p {
  color: #a9bbd6;
  font-size: 13.5px;
  line-height: 1.65;
}

.auth-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 12px;
  background: rgba(255, 255, 255, .045);
  color: #c7d5ea;
  font-size: 11.5px;
  line-height: 1.45;
}

.auth-points li [data-icon] {
  margin-top: 1px;
  color: #ffb066;
}

.auth-points strong {
  color: #fff;
  font-weight: 650;
}

.auth-preview {
  max-width: 470px;
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .035));
  box-shadow: 0 28px 60px -38px rgba(0, 0, 0, .9);
  backdrop-filter: blur(8px);
}

.auth-preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cdd9ec;
  font-size: 11px;
  font-weight: 600;
}

.auth-preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, .16);
}

.auth-preview-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(52, 211, 153, .16);
  color: #6ee7b7;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.auth-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.auth-preview-grid div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-preview-grid span {
  color: #8fa3c2;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-preview-grid strong {
  color: #fff;
  font-size: 12px;
  font-weight: 650;
}

.auth-preview-bar {
  height: 5px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
}

.auth-preview-bar span {
  display: block;
  width: 24%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ffb066);
}

.auth-card {
  background:
    radial-gradient(560px 260px at 100% 0%, rgba(244, 119, 10, .05), transparent 55%),
    #fff;
}

.auth-form {
  width: 100%;
  max-width: 396px;
}

.auth-form h2 {
  font-size: 28px;
  font-weight: 780;
}

.auth-lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.auth-form .field {
  margin-bottom: 14px;
}

.auth-submit {
  width: 100%;
  height: 45px;
  margin-top: 4px;
}

.auth-alt {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}

.auth-alt a {
  font-weight: 650;
}

.auth-note {
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.auth-note strong {
  color: var(--ink-2);
}

.auth-mobile-brand {
  display: none;
}

/* --- Responsive refresh -------------------------------------------------- */

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .topbar-brand {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
  }

  .topbar-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .brand-logo {
    max-width: 184px;
  }

  .auth-mobile-brand {
    display: block;
    margin-bottom: 24px;
  }

  .auth-mobile-brand img {
    width: 184px;
    max-width: 72%;
    height: auto;
  }

  .auth-card {
    align-items: flex-start;
    padding-top: 40px;
  }
}

@media (max-width: 760px) {
  .hero {
    padding: 22px;
    border-radius: 18px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1;
  }

  .auth-points {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .auth-preview {
    display: none;
  }

  .auth-form h2 {
    font-size: 25px;
  }

  .auth-card {
    padding: 28px 20px 36px;
  }

  .stat-grid,
  .stat-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat {
    padding: 14px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-foot a {
    font-size: 10.5px;
  }

  .topbar-help {
    display: none;
  }
}

@media (max-width: 430px) {
  .stat-grid,
  .stat-grid.three {
    grid-template-columns: 1fr;
  }
}
