/* ==========================================================================
   Oris Developer Portal -- Shared CSS
   BEM methodology | CSS Custom Properties | GPU-accelerated animations
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens
   -------------------------------------------------------------------------- */
:root {
  --color-bg: #f8f8f6;
  --color-card: #fff;
  --color-border: #ebebea;
  --color-border-light: #f3f3f1;
  --color-border-input: #e5e5e0;
  --color-surface: #f5f5f3;
  --color-surface-hover: #f0f0ee;
  --color-text-primary: #1a1a17;
  --color-text-secondary: #7a7a75;
  --color-text-muted: #a0a09a;
  --color-text-faint: #c0c0ba;
  --color-accent: #00E5FF;
  --color-accent-bg: rgba(0, 229, 255, 0.08);
  --color-accent-border: rgba(0, 229, 255, 0.3);
  --color-success: #4ade80;
  --color-success-bg: rgba(74, 222, 128, 0.08);
  --color-warning: #fbbf24;
  --color-warning-bg: rgba(251, 191, 36, 0.08);
  --color-error: #ef4444;
  --color-error-bg: rgba(239, 68, 68, 0.08);
  --color-info: #60a5fa;
  --color-info-bg: rgba(96, 165, 250, 0.08);
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-code: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-headline: 'Space Grotesk', 'Inter', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --radius-lg: 16px;
  --sidebar-width: 240px;
  --topbar-height: 56px;
  --transition-fast: 0.12s ease;
  --transition-base: 0.2s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

.layout__sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
}

.layout__main {
  grid-column: 2;
  padding-top: var(--topbar-height);
  min-width: 0;
}

.layout__content {
  padding: 32px;
  max-width: 1280px;
}

/* --------------------------------------------------------------------------
   Auth Layout (signup/login -- no sidebar)
   -------------------------------------------------------------------------- */
.auth-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-layout__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 24px 48px;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-card);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-smooth);
  will-change: transform;
}

.sidebar__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar__logo {
  height: 24px;
  width: auto;
  max-height: 24px;
  object-fit: contain;
}

.sidebar__title {
  border-left: 1px solid var(--color-border);
  padding-left: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.sidebar__nav {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

.sidebar__section {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0 28px;
  margin-bottom: 8px;
}

.sidebar__section:not(:first-child) {
  margin-top: 24px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  margin: 2px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.sidebar__link:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-hover);
}

.sidebar__link--active {
  color: var(--color-text-primary);
  background: #eaeae6;
  font-weight: 600;
}

.sidebar__link .material-symbols-outlined {
  font-size: 18px;
}

.sidebar__link--external::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0a09a' stroke-width='2'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   Topbar
   -------------------------------------------------------------------------- */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 30;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
}

.topbar__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.topbar__breadcrumb-parent {
  color: var(--color-text-muted);
}

.topbar__breadcrumb-sep {
  color: #d0d0cc;
}

.topbar__breadcrumb-current {
  font-weight: 600;
  color: var(--color-text-primary);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar__plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
}

.topbar__plan-badge--free {
  background: var(--color-surface);
  color: var(--color-text-secondary);
}

.topbar__plan-badge--growth {
  background: var(--color-accent-bg);
  color: #00b8d4;
}

.topbar__plan-badge--scale {
  background: #f5f0ff;
  color: #7c3aed;
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  position: relative;
}

.topbar__user:hover {
  background: var(--color-surface);
}

.topbar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.topbar__user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.topbar__dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  width: 192px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--transition-base);
  z-index: 50;
}

.topbar__user:hover .topbar__dropdown,
.topbar__dropdown--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.topbar__dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--color-text-secondary);
  text-align: left;
  transition: all var(--transition-fast);
}

.topbar__dropdown-item:hover {
  color: var(--color-text-primary);
  background: var(--color-bg);
}

.topbar__dropdown-item--danger {
  color: var(--color-error);
}

.topbar__dropdown-item--danger:hover {
  background: var(--color-error-bg);
}

.topbar__dropdown-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: 4px 0;
}

/* --------------------------------------------------------------------------
   Nav Header (auth pages)
   -------------------------------------------------------------------------- */
.nav-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  background: var(--color-card);
  border-bottom: 1px solid #e5e7eb;
}

.nav-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 48px;
}

.nav-header__logo {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-header__logo img {
  height: 28px;
  width: auto;
  max-height: 28px;
  object-fit: contain;
}

.nav-header__links {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-header__link {
  font-family: var(--font-headline);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: #4b5563;
  transition: color var(--transition-base);
  font-weight: 500;
}

.nav-header__link:hover {
  color: #111827;
}

.nav-header__cta {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  background: var(--color-accent);
  color: #000;
  font-family: var(--font-headline);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-header__cta:hover {
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.4);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Footer (auth pages)
   -------------------------------------------------------------------------- */
.footer {
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 64px 48px;
  max-width: 1440px;
  margin: 0 auto;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer__brand-logo {
  height: 28px;
  width: auto;
  max-height: 28px;
  object-fit: contain;
}

.footer__brand-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  max-width: 360px;
}

.footer__brand-sub {
  font-size: 12px;
  color: #9ca3af;
}

.footer__col-title {
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: #1f2937;
  margin-bottom: 24px;
}

.footer__col-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer__col-link {
  font-size: 14px;
  color: #6b7280;
  transition: color var(--transition-base);
}

.footer__col-link:hover {
  color: #1f2937;
}

.footer__bottom {
  padding: 24px 48px;
  border-top: 1px solid #e5e7eb;
  max-width: 1440px;
  margin: 0 auto;
}

.footer__disclaimer {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer__disclaimer strong {
  color: #6b7280;
}

.footer__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__copyright {
  font-size: 12px;
  color: #9ca3af;
}

.footer__copyright a {
  transition: color var(--transition-base);
}

.footer__copyright a:hover {
  color: #4b5563;
}

.footer__tagline {
  font-size: 12px;
  color: #d1d5db;
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-sm);
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.card__subtitle {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.card__body {
  /* container for card content */
}

.card__footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-light);
}

.card--metric {
  position: relative;
  overflow: hidden;
  padding: 20px 24px;
}

.card--metric::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--metric-accent, var(--color-text-primary));
}

.card--danger {
  border-color: rgba(239, 68, 68, 0.3);
}

.card--auth {
  max-width: 640px;
  width: 100%;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.card--auth-narrow {
  max-width: 420px;
}

/* --------------------------------------------------------------------------
   Section Label
   -------------------------------------------------------------------------- */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Metric Values
   -------------------------------------------------------------------------- */
.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.metric-sub {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}

.metric-sub--success {
  color: var(--color-success);
}

.metric-sub--warning {
  color: var(--color-warning);
}

.metric-sub--error {
  color: var(--color-error);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-text-primary);
  color: #fff;
}

.btn--primary:hover {
  background: #333;
}

.btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--secondary {
  background: var(--color-card);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.btn--danger {
  background: var(--color-error);
  color: #fff;
}

.btn--danger:hover {
  background: #dc2626;
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
  padding: 8px 12px;
}

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

.btn--accent {
  background: var(--color-accent);
  color: #000;
  font-weight: 800;
}

.btn--accent:hover {
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.3);
}

.btn--full {
  width: 100%;
}

.btn--sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn--lg {
  padding: 14px 28px;
  font-size: 14px;
}

.btn .material-symbols-outlined {
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form__group {
  margin-bottom: 16px;
}

.form__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.form__input {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--color-text-primary);
  font-size: 14px;
  transition: border-color var(--transition-fast);
}

.form__input:focus {
  border-color: var(--color-text-primary);
  box-shadow: 0 0 0 3px rgba(26, 26, 23, 0.06);
}

.form__input::placeholder {
  color: var(--color-text-faint);
}

.form__input--code {
  font-family: var(--font-code);
  font-size: 13px;
}

.form__error {
  font-size: 12px;
  color: var(--color-error);
  margin-top: 4px;
  display: none;
}

.form__error--visible {
  display: block;
}

.form__hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.form__select {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--color-text-primary);
  font-size: 14px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7a75' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.form__select:focus {
  border-color: var(--color-text-primary);
}

.form__divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

.form__divider::before,
.form__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* --------------------------------------------------------------------------
   Password Strength Meter
   -------------------------------------------------------------------------- */
.pw-meter {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.pw-meter__bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--color-border);
  transition: background var(--transition-base);
}

.pw-meter__bar--filled-1 { background: var(--color-error); }
.pw-meter__bar--filled-2 { background: var(--color-warning); }
.pw-meter__bar--filled-3 { background: #a3e635; }
.pw-meter__bar--filled-4 { background: var(--color-success); }

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.badge--success {
  background: var(--color-success-bg);
  color: #16a34a;
}

.badge--warning {
  background: var(--color-warning-bg);
  color: #d97706;
}

.badge--error {
  background: var(--color-error-bg);
  color: #dc2626;
}

.badge--info {
  background: var(--color-info-bg);
  color: #2563eb;
}

.badge--neutral {
  background: var(--color-surface);
  color: var(--color-text-secondary);
}

.badge--plan {
  background: var(--color-accent-bg);
  color: #00b8d4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge--method {
  font-family: var(--font-code);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge--method-get { background: #dbeafe; color: #1d4ed8; }
.badge--method-post { background: #dcfce7; color: #15803d; }
.badge--method-put { background: #fef9c3; color: #a16207; }
.badge--method-delete { background: #fee2e2; color: #b91c1c; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table {
  width: 100%;
}

.table__head th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0 0 12px 0;
  text-align: left;
  white-space: nowrap;
}

.table__head th:last-child {
  text-align: right;
}

.table__row td {
  padding: 14px 0;
  border-top: 1px solid var(--color-border-light);
  font-size: 14px;
  vertical-align: middle;
}

.table__row:first-child td {
  border-top: none;
}

.table__row:hover {
  background: #fafaf8;
}

.table__row td:last-child {
  text-align: right;
}

.table__cell--mono {
  font-family: var(--font-code);
  font-size: 13px;
}

.table__cell--muted {
  color: var(--color-text-secondary);
}

.table__empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--color-text-muted);
}

.table__empty-icon {
  font-size: 48px;
  color: var(--color-border);
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal--open {
  display: flex;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__box {
  position: relative;
  background: var(--color-card);
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 480px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  transform: scale(0.95);
  opacity: 0;
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.modal--open .modal__box {
  transform: scale(1);
  opacity: 1;
}

.modal__header {
  margin-bottom: 20px;
}

.modal__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.modal__desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

.modal__body {
  margin-bottom: 24px;
}

.modal__footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.modal__close:hover {
  background: var(--color-surface);
  color: var(--color-text-primary);
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 500;
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.toast--visible {
  transform: translateX(0);
  opacity: 1;
}

.toast--success {
  border-left: 3px solid var(--color-success);
}

.toast--error {
  border-left: 3px solid var(--color-error);
}

.toast--info {
  border-left: 3px solid var(--color-info);
}

.toast--warning {
  border-left: 3px solid var(--color-warning);
}

.toast .material-symbols-outlined {
  font-size: 18px;
}

/* --------------------------------------------------------------------------
   Progress Bar
   -------------------------------------------------------------------------- */
.progress {
  width: 100%;
  height: 6px;
  background: var(--color-surface);
  border-radius: 3px;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.progress__bar--success {
  background: var(--color-success);
}

.progress__bar--warning {
  background: var(--color-warning);
}

.progress__bar--error {
  background: var(--color-error);
}

.progress__bar--accent {
  background: var(--color-accent);
}

/* --------------------------------------------------------------------------
   Step Progress (signup)
   -------------------------------------------------------------------------- */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
}

.steps__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.steps__item--active {
  color: var(--color-text-primary);
  font-weight: 600;
}

.steps__item--done {
  color: var(--color-success);
}

.steps__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--color-border);
  background: var(--color-card);
}

.steps__item--active .steps__num {
  border-color: var(--color-text-primary);
  background: var(--color-text-primary);
  color: #fff;
}

.steps__item--done .steps__num {
  border-color: var(--color-success);
  background: var(--color-success);
  color: #fff;
}

.steps__connector {
  width: 48px;
  height: 2px;
  background: var(--color-border);
  margin: 0 12px;
}

.steps__connector--done {
  background: var(--color-success);
}

/* --------------------------------------------------------------------------
   Skeleton Loaders
   -------------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, var(--color-surface) 25%, var(--color-surface-hover) 50%, var(--color-surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton--text {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton--text:last-child {
  width: 60%;
}

.skeleton--card {
  height: 120px;
}

.skeleton--chart {
  height: 300px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --------------------------------------------------------------------------
   Checklist (onboarding)
   -------------------------------------------------------------------------- */
.checklist {
  list-style: none;
}

.checklist__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 14px;
}

.checklist__item:last-child {
  border-bottom: none;
}

.checklist__check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.checklist__item--done .checklist__check {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.checklist__item--done .checklist__check .material-symbols-outlined {
  font-size: 14px;
}

.checklist__item--done .checklist__text {
  color: var(--color-text-muted);
  text-decoration: line-through;
}

/* --------------------------------------------------------------------------
   Quick Actions Grid
   -------------------------------------------------------------------------- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
}

.quick-action:hover {
  border-color: var(--color-accent-border);
  background: var(--color-accent-bg);
  color: var(--color-text-primary);
}

.quick-action .material-symbols-outlined {
  font-size: 24px;
  color: var(--color-text-muted);
}

.quick-action:hover .material-symbols-outlined {
  color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   Plan Cards (billing)
   -------------------------------------------------------------------------- */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.plan-card {
  background: var(--color-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition-base);
}

.plan-card--current {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-bg);
}

.plan-card__name {
  font-family: var(--font-headline);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.plan-card__price {
  font-size: 36px;
  font-weight: 800;
  color: var(--color-text-primary);
  margin: 16px 0 4px;
}

.plan-card__price-sub {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.plan-card__features {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}

.plan-card__feature {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.plan-card__feature .material-symbols-outlined {
  font-size: 16px;
  color: var(--color-success);
}

/* --------------------------------------------------------------------------
   OAuth Buttons
   -------------------------------------------------------------------------- */
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  transition: all var(--transition-base);
}

.oauth-btn:hover {
  background: var(--color-surface);
  border-color: var(--color-text-faint);
}

.oauth-btn svg {
  width: 20px;
  height: 20px;
}

/* --------------------------------------------------------------------------
   Key Display
   -------------------------------------------------------------------------- */
.key-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.key-display__value {
  flex: 1;
  font-family: var(--font-code);
  font-size: 14px;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-display__copy {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.key-display__copy:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

/* --------------------------------------------------------------------------
   Secret Reveal (one-time display)
   -------------------------------------------------------------------------- */
.secret-reveal {
  padding: 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  margin-top: 16px;
}

.secret-reveal__warning {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 12px;
}

.secret-reveal__value {
  font-family: var(--font-code);
  font-size: 13px;
  color: var(--color-text-primary);
  word-break: break-all;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #fde68a;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Toggle Switch
   -------------------------------------------------------------------------- */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition-base);
}

.toggle__slider::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-base);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle__input:checked + .toggle__slider {
  background: var(--color-text-primary);
}

.toggle__input:checked + .toggle__slider::after {
  transform: translateX(20px);
}

/* --------------------------------------------------------------------------
   Notification Row
   -------------------------------------------------------------------------- */
.notification-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.notification-row:last-child {
  border-bottom: none;
}

.notification-row__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notification-row__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.notification-row__desc {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Danger Zone
   -------------------------------------------------------------------------- */
.danger-zone {
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--color-error-bg);
}

.danger-zone__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-error);
  margin-bottom: 8px;
}

.danger-zone__desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Chart Container
   -------------------------------------------------------------------------- */
.chart-container {
  position: relative;
  height: 320px;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Quota Row
   -------------------------------------------------------------------------- */
.quota-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.quota-row:last-child {
  margin-bottom: 0;
}

.quota-row__label {
  width: 160px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.quota-row__bar {
  flex: 1;
}

.quota-row__value {
  width: 100px;
  text-align: right;
  font-family: var(--font-code);
  font-size: 12px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Period Selector
   -------------------------------------------------------------------------- */
.period-selector {
  display: flex;
  gap: 4px;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.period-selector__btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.period-selector__btn--active {
  background: var(--color-card);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}

.period-selector__btn:hover:not(.period-selector__btn--active) {
  color: var(--color-text-primary);
}

/* --------------------------------------------------------------------------
   Mobile Hamburger
   -------------------------------------------------------------------------- */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 50;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .layout__main {
    grid-column: 1;
  }

  .sidebar {
    transform: translateX(-100%);
    z-index: 50;
  }

  .sidebar--open {
    transform: translateX(0);
  }

  .topbar {
    left: 0;
    padding: 0 16px 0 56px;
  }

  .layout__content {
    padding: 20px 16px;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-header__links {
    display: none;
  }

  .nav-header__inner {
    padding: 12px 16px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    padding: 32px 16px;
  }

  .footer__bottom {
    padding: 16px;
  }

  .footer__bar {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .card--auth {
    padding: 24px;
    margin: 0 12px;
  }

  .quick-actions {
    grid-template-columns: 1fr 1fr;
  }

  .metric-value {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .steps__connector {
    width: 24px;
    margin: 0 6px;
  }

  .steps__item span:not(.steps__num) {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Utility: Hidden
   -------------------------------------------------------------------------- */
.u-hidden {
  display: none;
}

.u-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Sidebar overlay (mobile)
   -------------------------------------------------------------------------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0, 0, 0, 0.3);
}

.sidebar-overlay--visible {
  display: block;
}

/* --------------------------------------------------------------------------
   Webhook delivery log
   -------------------------------------------------------------------------- */
.delivery-log {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 12px;
}

.delivery-log__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 12px;
}

.delivery-log__item:last-child {
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
  .sidebar, .topbar, .mobile-toggle, .toast-container {
    display: none;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .layout__main {
    padding-top: 0;
  }
}
