:root {
  --va-primary: #2563eb;
  --va-sidebar-bg: #0f172a;
  --va-sidebar-text: #f8fafc;
  --va-accent: #10b981;
  --va-bg: #f4f6fb;
  --va-max-w: 1440px;
  --va-surface: #ffffff;
  --va-border: #e2e8f0;
  --va-text: #0f172a;
  --va-muted: #64748b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--va-bg);
  color: var(--va-text);
  font: 14px/1.55 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

.va-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.2s ease;
}
.va-shell.is-collapsed { grid-template-columns: 72px minmax(0, 1fr); }
.va-sidebar {
  background: var(--va-sidebar-bg);
  color: var(--va-sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.va-sidebar-head {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  overflow: hidden;
}
.brandmark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  background: var(--va-primary);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
.brand-text small { font-size: 11px; opacity: 0.65; font-weight: 500; }
.va-sidebar-scroll { flex: 1; overflow-y: auto; padding: 14px 10px; }
.va-nav-group { margin-bottom: 16px; }
.va-nav-group-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  opacity: 0.5;
  font-weight: 700;
}
.va-nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--va-sidebar-text);
  opacity: 0.82;
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  margin: 2px 0;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
}
.va-nav-link:hover { opacity: 1; background: rgba(255,255,255,0.08); }
.va-nav-link.active {
  opacity: 1;
  background: var(--va-primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.va-nav-icon { width: 20px; text-align: center; flex: 0 0 20px; font-size: 15px; }
.va-nav-badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
}
.va-shell.is-collapsed .brand-text,
.va-shell.is-collapsed .va-nav-group-title,
.va-shell.is-collapsed .va-nav-label,
.va-shell.is-collapsed .va-nav-badge { display: none; }
.va-shell.is-collapsed .va-nav-link { justify-content: center; padding: 11px 0; }

.va-main-wrap { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.topbar {
  height: 64px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--va-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
  gap: 16px;
}
.topbar-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.va-icon-btn {
  background: #f8fafc;
  border: 1px solid var(--va-border);
  color: var(--va-text);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
}
.va-quick-search { max-width: 380px; width: 100%; }
.va-quick-search input {
  width: 100%;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--va-border);
  background: #f8fafc;
  font-size: 13px;
}
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.va-header-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 99px;
  background: #f8fafc;
  border: 1px solid var(--va-border);
  color: var(--va-text);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.va-header-chip:hover { border-color: var(--va-primary); color: var(--va-primary); background: #fff; }
.chip-alert {
  background: #ef4444;
  color: #fff;
  border-radius: 99px;
  padding: 1px 6px;
  font-size: 10px;
}
.va-user-pill { font-size: 12.5px; color: var(--va-muted); font-weight: 500; padding: 0 6px; }

.container {
  width: 100%;
  max-width: var(--va-max-w);
  margin: 0 auto;
  padding: 26px 28px;
  flex: 1;
}
.va-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 14.5px; font-weight: 700; margin: 0 0 8px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  background: var(--va-surface);
  border: 1px solid var(--va-border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  margin-bottom: 18px;
}
.stat { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; color: var(--va-text); margin-top: 4px; }
.biglabel, .muted, .hint { color: var(--va-muted); font-size: 12.5px; }

.btn, button {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--va-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.btn:hover, button:hover { filter: brightness(0.95); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-light { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-success { background: #059669; color: #fff; }

.form { max-width: 860px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 6px; color: #334155; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--va-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.field small { display: block; color: var(--va-muted); margin-top: 5px; font-size: 12px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inlineform { display: inline; }

.tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--va-border); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; min-width: 720px; }
th, td { text-align: left; padding: 12px 15px; border-bottom: 1px solid #f1f5f9; font-size: 13px; vertical-align: middle; }
th { background: #f8fafc; color: #475569; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #f8fafc; }
.empty { padding: 28px; text-align: center; color: var(--va-muted); }

.badge { padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; display: inline-block; }
.badge.success { background: #dcfce7; color: #166534; }
.badge.warning { background: #fef3c7; color: #92400e; }
.badge.danger { background: #fee2e2; color: #991b1b; }
.badge.muted { background: #f1f5f9; color: #475569; }

.notice { padding: 12px 16px; border-radius: 10px; margin: 12px 0 16px; background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.notice.success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.notice.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.notice.warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }

.va-section-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--va-border);
}
.va-app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}
.va-app-card {
  background: #fff;
  border: 1px solid var(--va-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  position: relative;
  overflow: hidden;
}
.va-app-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  border-color: var(--va-primary);
}
.va-app-card.is-active-app {
  border-top: 4px solid var(--va-accent);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.va-app-card.is-inactive-app { border-top: 4px solid #cbd5e1; cursor: pointer; }
.va-app-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.va-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--va-primary);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
}
.va-app-company {
  font-size: 12px;
  font-weight: 700;
  color: var(--va-primary);
  margin-top: 2px;
}

.va-module-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--va-border);
  border-radius: 14px;
  margin-bottom: 20px;
}
.va-module-pill {
  padding: 9px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: #475569;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.va-module-pill.active { background: var(--va-primary); color: #fff; }

.va-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 20px;
  align-items: stretch;
  margin-bottom: 30px;
}
.va-pricing-card {
  background: #fff;
  border: 1px solid var(--va-border);
  border-radius: 18px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.va-pricing-card.is-popular {
  border: 2px solid var(--va-primary);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.11);
}
.va-popular-ribbon {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--va-primary);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 99px;
}
.va-price-amount { font-size: 34px; font-weight: 800; color: var(--va-text); margin: 12px 0 4px; letter-spacing: -0.03em; }
.va-price-cycle { font-size: 12px; color: var(--va-muted); margin-bottom: 18px; }
.va-limits-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin: 14px 0;
  display: grid;
  gap: 7px;
}
.va-limit-row { display: flex; justify-content: space-between; font-size: 12.5px; }
.va-feature-list { list-style: none; padding: 0; margin: 12px 0 20px; flex: 1; display: grid; gap: 9px; }
.va-feature-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #334155; }
.va-feature-list li.is-disabled { color: #94a3b8; text-decoration: line-through; }
.va-check { color: var(--va-accent); font-weight: 800; }
.va-cross { color: #cbd5e1; font-weight: 700; }

.footer { text-align: center; color: var(--va-muted); font-size: 12px; padding: 24px; border-top: 1px solid var(--va-border); background: #fff; }
.authwrap { max-width: 460px; margin: 60px auto; padding: 0 16px; }

@media (max-width: 900px) {
  .va-shell { grid-template-columns: 1fr; }
  .va-sidebar { position: fixed; left: -270px; width: 260px; transition: left 0.2s ease; }
  .va-shell.is-collapsed .va-sidebar { left: 0; width: 260px; }
  .va-shell.is-collapsed .brand-text,
  .va-shell.is-collapsed .va-nav-group-title,
  .va-shell.is-collapsed .va-nav-label { display: block; }
  .va-shell.is-collapsed .va-nav-link { justify-content: flex-start; padding: 9px 12px; }
  .row, .grid.two { grid-template-columns: 1fr; }
}