@import url("https://fonts.googleapis.com/css2?family=Lekton:wght@400;700&family=Oxanium:wght@400;500;600;700&display=swap");

:root {
  --bg: #07111f;
  --panel: #0d1829;
  --panel2: #101d31;
  --text: #f8fafc;
  --muted: #9fb0c8;
  --line: #20324b;
  --primary: #2dd4bf;
  --accent: #f59e0b;
  --danger: #ef4444;
  --ok: #22c55e;
  --shadow: 0 20px 60px rgba(0, 0, 0, .22);
}

body[data-theme="light"] {
  --bg: #f7fafc;
  --panel: #ffffff;
  --panel2: #eef4fb;
  --text: #102033;
  --muted: #53657c;
  --line: #d8e2ef;
  --primary: #0f766e;
  --accent: #d97706;
  --shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
tr[hidden], [data-doc-toc-table] tr[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--primary) 55%, var(--line)) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--primary) 45%, var(--line)); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--primary); }
body {
  --sidebar-width: 300px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Lekton", ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 17px;
  font-weight: 400;
}
body.sidebar-collapsed { --sidebar-width: 92px; }
a { color: inherit; text-decoration: none; }
a, .btn, .icon-btn, .side-link, .dropdown a, .dropdown button, .mobile-bottom a, .mobile-bottom button {
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
a:hover, .btn:hover, .icon-btn:hover { transform: translateY(-1px); }
.btn:hover, .icon-btn:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--line)); box-shadow: 0 10px 28px color-mix(in srgb, var(--primary) 16%, transparent); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, .brand, .btn, .side-title, .stat, strong, b {
  font-family: "Oxanium", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
}

.container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}
.topbar-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.landing-topbar { position: fixed; inset: 0 0 auto 0; z-index: 120; }
.landing-topbar + main { padding-top: 68px; }
.landing-topbar ~ .footer { scroll-margin-top: 88px; }
section[id] { scroll-margin-top: 88px; }
.docs-topbar { position: fixed !important; inset: 0 0 auto 0; z-index: 120; }
.docs-topbar + .landing-mobile-panel { position: fixed; top: 69px; left: 0; right: 0; z-index: 119; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 18px; }
.brand small { display: block; color: var(--muted); font-family: "Lekton", monospace; font-size: 13px; font-weight: 700; }
.logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--primary);
  color: #05201d;
  display: grid;
  place-items: center;
  font-family: "Oxanium", sans-serif;
  font-weight: 700;
}
.logo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.nav { display: flex; gap: 22px; color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--text); }
.actions { display: flex; gap: 10px; align-items: center; }
.btn, .icon-btn, .avatar-btn {
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
}
body:not([data-theme="light"]) .btn:not(.secondary):not(.danger),
body:not([data-theme="light"]) input[type=file]::file-selector-button,
body:not([data-theme="light"]) .table-pagination button.active,
body:not([data-theme="light"]) .usage-tabs button.active,
body:not([data-theme="light"]) .segmented button.active,
body:not([data-theme="light"]) .period-filter button.active {
  color: #05201d !important;
}
html body[data-theme="dark"] .btn:not(.secondary):not(.danger),
html body[data-theme="dark"] input[type=file]::file-selector-button {
  color: #05201d !important;
}
body:not([data-theme="light"]) .btn:not(.secondary):not(.danger) *,
body:not([data-theme="light"]) input[type=file]::file-selector-button * { color: #05201d !important; }
body:not([data-theme="light"]) .btn:not(.secondary):not(.danger) i { color: #05201d !important; }
body[data-theme="light"] .btn:not(.secondary):not(.danger),
body[data-theme="light"] input[type=file]::file-selector-button,
body[data-theme="light"] .table-pagination button.active,
body[data-theme="light"] .usage-tabs button.active,
body[data-theme="light"] .segmented button.active,
body[data-theme="light"] .period-filter button.active {
  color: #fff;
}
.btn.secondary, .icon-btn {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn.danger { background: var(--danger); color: #fff; }
.btn.block { width: 100%; }
.icon-btn { min-width: 44px; padding-inline: 12px; font-size: 13px; }
.avatar-btn { width: 44px; padding: 0; border-radius: 999px; overflow: hidden; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hamburger { display: none; }
.landing-mobile-panel { display: none; }

.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  align-items: center;
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; perspective: 1200px; }
.hero-visual { border-radius: 18px; transform-style: preserve-3d; transition: transform .22s ease, box-shadow .22s ease; will-change: transform; }
.hero-visual img, .hero-img { display: block; width: 100%; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); object-fit: cover; aspect-ratio: 16 / 7; }
.hero-visual:hover { box-shadow: 0 26px 80px color-mix(in srgb, var(--primary) 18%, transparent); }
.eyebrow {
  display: inline-flex;
  border: 1px solid color-mix(in srgb, var(--primary) 38%, transparent);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}
.h1 {
  font-size: clamp(42px, 6.2vw, 76px);
  line-height: 1.03;
  margin: 22px 0 18px;
  letter-spacing: 0;
  font-weight: 600;
}
.highlight { color: var(--accent); }
.lead { font-size: 20px; line-height: 1.75; color: var(--muted); max-width: 720px; }
.hero-actions { margin-top: 26px; }

.card, .hero-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-card { min-height: 170px; transition: transform .18s ease, border-color .18s ease; }
.feature-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 50%, var(--line)); }
.mini-icon {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  color: var(--primary);
  font-family: "Oxanium", sans-serif;
  font-size: 12px;
  margin-bottom: 12px;
}
.mini-icon i { font-size: 15px; }
.section { padding: 76px 0; border-bottom: 1px solid var(--line); }
.docs-public-section { padding-top: 104px; }
.section h2 { font-size: 34px; margin: 0 0 12px; font-weight: 600; }
.muted { color: var(--muted); }
.stat { font-size: 30px; color: var(--accent); font-weight: 600; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq-list { display: grid; gap: 12px; }
.faq-item summary { cursor: pointer; font-family: "Oxanium", sans-serif; font-weight: 600; }
.footer-grid { display: grid; grid-template-columns: minmax(220px, 1.2fr) repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; align-items: start; }
.footer-links { display: grid; gap: 9px; color: var(--muted); }

.auth-wrap { height: 100vh; display: grid; place-items: center; padding: 24px; overflow: hidden; background-image: var(--auth-bg); background-size: cover; background-position: center; }
.auth-wrap:has(.auth-card)::before { content: ""; position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 54%, transparent); backdrop-filter: blur(2px); pointer-events: none; }
.auth-card { position: relative; z-index: 1; }
.auth-card { width: min(460px, 100%); max-height: calc(100vh - 48px); overflow: auto; }
.auth-links { text-align: center; }
.auth-links a:hover, .footer-links a:hover { color: var(--primary); }
.google-login { margin-top: 12px; }
.recaptcha-field { overflow: hidden; }
.recaptcha-scale { width: 304px; max-width: 100%; transform-origin: left top; }
.field { display: grid; gap: 8px; margin-bottom: 15px; }
.field label { font-weight: 700; }
.input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, #000 18%);
  color: var(--text);
  border-radius: 9px;
  padding: 12px 13px;
  outline: none;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(1) brightness(1.8); opacity: .9; cursor: pointer; }
body[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
body[data-theme="light"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
body[data-theme="light"] input[type="time"]::-webkit-calendar-picker-indicator { filter: none; opacity: .72; }
.input:focus, select:focus, textarea:focus { border-color: var(--primary); }
.air-date-input { cursor: pointer; }
.air-datepicker-global-container { z-index: 260; }
.air-datepicker.codipi-air-datepicker {
  --adp-background-color: var(--panel);
  --adp-background-color-hover: color-mix(in srgb, var(--primary) 12%, var(--panel));
  --adp-background-color-active: var(--primary);
  --adp-background-color-selected-other-month: color-mix(in srgb, var(--primary) 25%, transparent);
  --adp-background-color-selected-other-month-focused: var(--primary);
  --adp-background-color-in-range: color-mix(in srgb, var(--primary) 14%, transparent);
  --adp-background-color-in-range-focused: color-mix(in srgb, var(--primary) 22%, transparent);
  --adp-color: var(--text);
  --adp-color-secondary: var(--muted);
  --adp-accent-color: var(--primary);
  --adp-color-current-date: var(--primary);
  --adp-color-other-month: color-mix(in srgb, var(--muted) 72%, transparent);
  --adp-day-name-color: var(--primary);
  --adp-border-color: var(--line);
  --adp-border-color-inner: var(--line);
  --adp-border-radius: 14px;
  --adp-cell-border-radius: 8px;
  --adp-cell-background-color-hover: color-mix(in srgb, var(--primary) 12%, var(--panel));
  --adp-cell-background-color-selected: var(--primary);
  --adp-cell-background-color-selected-hover: color-mix(in srgb, var(--primary) 86%, #fff 14%);
  --adp-cell-background-color-in-range: color-mix(in srgb, var(--primary) 14%, transparent);
  --adp-cell-background-color-in-range-hover: color-mix(in srgb, var(--primary) 22%, transparent);
  --adp-cell-border-color-in-range: var(--primary);
  --adp-btn-color: var(--primary);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-family: inherit;
  color: var(--text);
}
body[data-theme="light"] .air-datepicker.codipi-air-datepicker {
  --adp-background-color: #fff;
  --adp-background-color-hover: #eefdfa;
  --adp-color: #1f2937;
  --adp-color-secondary: #64748b;
  --adp-border-color: #dbe4ef;
  --adp-border-color-inner: #edf2f7;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .12);
}
.password-field { position: relative; width: 100%; min-width: 0; display: block; }
.password-field .input { display: block; padding-right: 54px; }
.password-field button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.password-field button:hover { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
input[type=file]::file-selector-button {
  border: 0;
  border-radius: 7px;
  background: var(--primary);
  font-weight: 600;
  font-size: 12px;
  padding: 6px 9px;
  margin-right: 12px;
}
.error { color: #fecaca; font-size: 13px; }
.alert { border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); background: color-mix(in srgb, var(--primary) 10%, transparent); padding: 12px; border-radius: 9px; margin-bottom: 14px; }

.dash { min-height: 100vh; display: block; }
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  height: 100vh;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, #000 10%);
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-width: 0;
  z-index: 34;
  transition: width .2s ease;
}
.sidebar-top { position: relative; z-index: 12; padding: 18px; background: color-mix(in srgb, var(--bg) 90%, #000 10%); flex: 0 0 auto; }
.sidebar-scroll { overflow-y: auto; overflow-x: hidden; padding: 0 18px 18px; flex: 1 1 auto; min-width: 0; }
.side-toggle {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  z-index: 10000;
}
.sidebar-boundary-toggle {
  position: fixed !important;
  left: calc(var(--sidebar-width) - 18px) !important;
  top: 35px !important;
  z-index: 100 !important;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: left .2s ease;
}
body.sidebar-collapsed .side-toggle i { transform: rotate(180deg); }
body.sidebar-collapsed .sidebar .brand span:not(.logo),
body.sidebar-collapsed .side-title,
body.sidebar-collapsed .nav-label { display: none; }
body.sidebar-collapsed .sidebar-scroll { padding-inline: 14px; }
body.sidebar-collapsed .sidebar-top { padding-inline: 14px; }
body.sidebar-collapsed .side-link { justify-content: center; }
.side-group { margin-top: 28px; }
.side-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; }
.side-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 700;
  border: 0;
  background: transparent;
}
.side-link.active, .side-link:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.side-link.disabled { opacity: .42; filter: grayscale(.6); }
.nav-icon {
  width: 34px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  font-size: 14px;
}
.logout-link { margin-top: 24px; }
.dash-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding-top: 120px;
  transition: margin-left .2s ease;
}
.dash-head {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 70;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 120px;
  transition: left .2s ease;
}
.dash-head h1 { font-size: 30px; font-weight: 600; }
.dash-content { padding: 28px; min-width: 0; }
.dash-main > .dash-content { flex: 1 0 auto; }
.dash-main > footer.dash-content { flex: 0 0 auto; margin-top: auto; }
.profile-menu { position: relative; }
.landing-user-btn { max-width: 180px; }
.landing-user-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 240px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 8px;
  box-shadow: var(--shadow);
  animation: pop .16s ease;
}
.profile-menu.open .dropdown { display: block; }
.dropdown a, .dropdown button, .mobile-other-panel a, .mobile-other-panel button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px;
  border-radius: 8px;
  background: none;
  border: 0;
  color: var(--text);
}
.dropdown a:hover, .dropdown button:hover, .mobile-other-panel a:hover, .mobile-other-panel button:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.dropdown-note {
  margin: 6px;
  padding: 10px 12px 10px 14px;
  border-radius: 10px;
  background: var(--panel2);
}
.dropdown-note-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.dropdown-note-head b { min-width: 0; overflow-wrap: anywhere; }
.dropdown-note-head time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.dropdown-note p {
  margin: 5px 0 8px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dropdown-note .notification-rich p { display: block; -webkit-line-clamp: unset; overflow: visible; margin: 4px 0; }
.shortcuts-dropdown { width: 440px; padding: 0; overflow: hidden; }
.shortcuts-dropdown h4 { padding: 18px 20px; margin: 0; border-bottom: 1px solid var(--line); }
.shortcut-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.shortcut-grid a { min-height: 120px; display: grid; place-items: center; gap: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.shortcut-grid i { width: 58px; height: 58px; border-radius: 50%; background: color-mix(in srgb, var(--text) 8%, transparent); display: grid; place-items: center; font-size: 24px; }
.notification-dropdown { width: min(360px, calc(100vw - 32px)); padding: 8px; }
.profile-summary { display: grid; gap: 6px; padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.profile-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.profile-user-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

.table-tools { display: flex; gap: 10px; margin: 12px 0; flex-wrap: wrap; align-items: center; }
.table-tools .input, .table-tools select { width: auto; min-width: 150px; }
.crud-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.crud-toolbar .table-actionbar { margin: 0; justify-content: flex-end; }
.crud-filter-row { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.crud-filter-row .input, .crud-filter-row select { width: auto; min-width: 150px; }
.settings-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 20px; }
.settings-tabs button { border: 1px solid var(--line); border-radius: 999px; padding: 9px 13px; color: var(--muted); background: var(--panel); }
.settings-tabs button:hover, .settings-tabs button.active { color: var(--primary); border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.settings-panel { display: none; }
.settings-panel.active { display: block; }
.copy-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.settings-panel { scroll-margin-top: 92px; padding: 12px 0 20px; border-top: 1px solid var(--line); }
.drag-handle { color: var(--muted); cursor: grab; }
.sortable-ghost { opacity: .4; }
.table { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
.table td, .table th { text-align: left; padding: 13px; background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: top; }
.table .btn { min-height: 32px; padding: 6px 9px; border-radius: 8px; }
.table td:last-child .btn { margin: 3px; min-width: 38px; }
.compact-label i { pointer-events: none; }
.actions { gap: 8px; flex-wrap: wrap; }
.table td:first-child, .table th:first-child { border-left: 1px solid var(--line); border-radius: 10px 0 0 10px; }
.table td:last-child, .table th:last-child { border-right: 1px solid var(--line); border-radius: 0 10px 10px 0; }
.badge { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; padding: 4px 9px; font-size: 12px; color: var(--muted); }
.badge.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); color: var(--ok); }
.badge.bad { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.code { overflow: auto; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; background: color-mix(in srgb, var(--bg) 92%, #000 8%); border: 1px solid var(--line); border-radius: 10px; padding: 15px; color: var(--text); font-size: 14px; }
.code-wrap { position: relative; }
.code-wrap .code { padding-right: 112px; }
.copy-code { position: absolute; top: 10px; right: 10px; z-index: 2; }
.empty { border: 1px dashed var(--line); border-radius: 10px; padding: 18px; color: var(--muted); }
.hidden { display: none !important; }
.span-full { grid-column: 1 / -1; }
.grid, .card, .field, .endpoint-grid, .usage-main-grid, .playground-layout { min-width: 0; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.endpoint-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.endpoint-summary-card { min-height: 180px; }
.setup-card { text-align: left; color: var(--text); cursor: pointer; min-height: 110px; align-content: center; }
.setup-card i { color: var(--primary); font-size: 24px; margin-right: 8px; }
.quick-action-stack { display: grid; gap: 10px; margin-top: 14px; }
.quick-action-stack .btn { justify-content: flex-start; width: 100%; }
.mini-select { max-width: 220px; }
.quota-bar { height: 9px; border-radius: 999px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.quota-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.api-secret { word-break: break-all; }
.playground-layout { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.playground-history-card { min-height: 680px; display: flex; flex-direction: column; overflow: hidden; }
.chat-panel { display: flex; flex-direction: column; min-height: 680px; }
.chat-window { flex: 0 1 auto; height: clamp(360px, 56vh, 620px); overflow: auto; display: grid; align-content: start; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--bg) 85%, #000 15%); }
.chat-message { max-width: 78%; padding: 12px 14px; border-radius: 14px; background: var(--panel2); animation: pop .18s ease; }
.chat-message.user { justify-self: end; background: color-mix(in srgb, var(--primary) 22%, var(--panel)); }
.chat-message.assistant { justify-self: start; }
.chat-message .markdown-body { display: grid; gap: 8px; }
.chat-message .markdown-body p { margin: 0; }
.chat-message .markdown-body code { background: color-mix(in srgb, var(--bg) 70%, #000 30%); padding: 2px 6px; border-radius: 6px; }
.chat-message .markdown-body pre { overflow: auto; padding: 12px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 78%, #000 22%); border: 1px solid var(--line); }
.chat-message .markdown-body a { color: var(--primary); }
.chat-message-actions { display: flex; gap: 8px; margin-top: 8px; }
.chat-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chat-attachment-chip { border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; color: var(--muted); background: color-mix(in srgb, var(--text) 5%, transparent); display: inline-flex; gap: 8px; align-items: center; }
.chat-attachment-chip img { width: 74px; height: 58px; object-fit: cover; border-radius: 8px; }
.generated-image-card { display: grid; gap: 10px; align-items: start; max-width: min(360px, 78vw); }
.generated-image-card > button { border: 0; background: transparent; padding: 0; cursor: zoom-in; }
.generated-image-card img { width: 100%; height: auto; max-height: 360px; }
.thinking-message p { display: inline-flex; align-items: center; gap: 10px; }
.thinking-dots { display: inline-flex; gap: 4px; }
.thinking-dots i { width: 7px; height: 7px; border-radius: 999px; background: var(--primary); animation: thinkingPulse 1s infinite ease-in-out; }
.thinking-dots i:nth-child(2) { animation-delay: .14s; }
.thinking-dots i:nth-child(3) { animation-delay: .28s; }
@keyframes thinkingPulse { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-4px); opacity: 1; } }
.chat-inline-edit { display: grid; gap: 10px; min-width: min(520px, 72vw); }
.chat-inline-edit textarea { min-height: 110px; resize: vertical; }
.icon-compact { width: 42px; min-width: 42px; padding-inline: 0; overflow: hidden; }
.icon-compact span { display: none; }
.chat-composer { margin-top: 12px; display: grid; gap: 10px; }
.playground-key-row { display: flex; gap: 10px; flex-wrap: wrap; }
.chat-actions { display: flex; justify-content: flex-end; gap: 8px; }
.sr-only { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.attachment-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.attachment-preview img { width: 82px; height: 82px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.history-list { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; gap: 10px; overflow: auto; align-items: stretch; max-height: 560px; padding-right: 4px; overscroll-behavior: contain; }
.history-pill { border: 1px solid var(--line); background: var(--panel2); color: var(--text); border-radius: 999px; padding: 8px 12px; white-space: nowrap; }
.history-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--panel2); flex: 0 0 auto; }
.history-item .history-pill { text-align: left; overflow: hidden; text-overflow: ellipsis; }
.history-item.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--panel)); }
.history-item .history-pill { border: 0; background: transparent; padding: 0; min-height: 0; }
.history-item .icon-btn { width: 30px; height: 30px; border-radius: 50%; }
.key-picker-list { display: grid; gap: 10px; margin-top: 14px; }
.key-picker-card { text-align: left; border: 1px solid var(--line); background: var(--panel2); color: var(--text); border-radius: 12px; padding: 14px; display: grid; gap: 4px; cursor: pointer; }
.key-picker-card:hover, .key-picker-card.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--panel)); }
.key-picker-card span, .key-picker-card small { color: var(--muted); }
.usage-tabs { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.usage-tabs button, .segmented button, .period-filter button { border: 1px solid var(--line); background: var(--panel); color: var(--muted); padding: 10px 14px; border-radius: 9px; }
.usage-tabs button.active, .segmented button.active { background: var(--primary); }
.period-filter { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.usage-main-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); gap: 18px; margin: 18px 0; }
.line-chart { min-height: 260px; display: grid; place-items: center; }
.usage-plot { width: 100%; height: 280px; min-height: 260px; }
.recent-requests-scroll { max-height: 280px; overflow: auto; padding-right: 6px; }
.line-chart > svg { width: 100%; height: 220px; }
.line-chart > svg path { fill: none; stroke: var(--primary); stroke-width: 5; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--primary) 45%, transparent)); }
.usage-table-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }

.playground-fullscreen .sidebar,
.playground-fullscreen .dash-head,
.playground-fullscreen .mobile-bottom { display: none !important; }
.playground-fullscreen .dash-main { margin: 0 !important; padding: 0 !important; width: 100vw !important; max-width: 100vw !important; min-height: 100vh; }
.playground-fullscreen .dash-content { padding: 0 !important; }
.playground-fullscreen .playground-layout { position: fixed; inset: 0; z-index: 190; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); padding: 18px; background: var(--bg); overflow: hidden; }
.playground-fullscreen .playground-history-card,
.playground-fullscreen .chat-panel { min-height: 0; height: calc(100vh - 36px); }
.playground-fullscreen .chat-window { height: calc(100vh - 260px); max-height: none; }
.playground-fullscreen .history-list { max-height: none; flex: 1 1 auto; }
.segmented button { border: 0; border-radius: 0; }
.usage-tabs button.active, .segmented button.active, .period-filter button.active { background: var(--primary); }
.payment-preview, .upload-preview { max-width: 240px; border-radius: 12px; border: 1px solid var(--line); margin-top: 10px; cursor: zoom-in; }
.link-btn { border: 0; background: transparent; color: var(--primary); padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.notif-trigger { position: relative; }
.notif-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; border: 2px solid var(--panel); }
.dropdown-note.type-general { border-left: 3px solid var(--primary); }
.dropdown-note.type-scheduled { border-left: 3px solid #f59e0b; }
.dropdown-note.type-updated { border-left: 3px solid #60a5fa; }
.dropdown-more { display: block; text-align: center; padding: 10px; border-top: 1px solid var(--line); color: var(--primary); }
.notification-pill { border: 1px solid var(--line); border-left-width: 5px; border-radius: 10px; padding: 10px 12px; background: var(--panel2); }
.notification-pill p { margin: 4px 0 0; color: var(--muted); }
.notification-rich { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.notification-rich p { margin: 4px 0; }
.notification-rich a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.notification-rich h1, .notification-rich h2, .notification-rich h3 { margin: 6px 0 4px; color: var(--text); font-size: 1.05em; }
.notification-rich ul, .notification-rich ol { margin: 5px 0; padding-left: 20px; }
.login-notification-popup { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 18px; background: color-mix(in srgb, var(--bg) 68%, transparent); backdrop-filter: blur(10px); }
.login-notification-card { width: min(620px, 100%); border: 1px solid color-mix(in srgb, var(--primary) 38%, var(--line)); border-radius: 18px; padding: 24px; background: radial-gradient(circle at top left, color-mix(in srgb, var(--primary) 18%, transparent), transparent 42%), var(--panel); box-shadow: var(--shadow); display: grid; gap: 14px; animation: pop .2s ease; }
.login-notification-card h2 { margin: 0; }
.login-notification-card .notification-rich { max-height: 42vh; overflow: auto; }
.login-notification-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); }
.rich-content .ql-align-center { text-align: center; }
.rich-content .ql-align-right { text-align: right; }
.rich-content .ql-align-justify { text-align: justify; }
.dropdown-note .notification-rich { max-height: 132px; overflow: auto; padding-right: 4px; }
.notification-pill.type-general { border-left-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--panel)); }
.notification-pill.type-scheduled { border-left-color: #f59e0b; background: color-mix(in srgb, #f59e0b 12%, var(--panel)); }
.notification-pill.type-updated { border-left-color: #60a5fa; background: color-mix(in srgb, #60a5fa 12%, var(--panel)); }
.plan-thumb { width: 100%; aspect-ratio: 16/7; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 14px; background: var(--panel2); }
.plan-user-card, .plan-manage-card { display: flex; flex-direction: column; }
.plan-manage-card .stat small, .plan-user-card .stat small { color: var(--muted); font-size: 45%; white-space: nowrap; }
.plan-user-card .stat, .plan-manage-card .stat, .plan-card .stat { margin-bottom: 2px; }
.plan-choose-btn { margin-top: 18px; width: fit-content; }
.plan-quota-line { margin-top: 0; color: var(--muted); }
.plan-quota-stack { display: grid; gap: 4px; }
.plan-quota-stack b { display: block; color: var(--text); }
.plan-actions { margin-top: auto; padding-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.plan-manage-card.is-draft { opacity: .72; }
.payment-choice-preview { margin: 14px 0; }
.payment-info { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--panel2); }
.bank-account-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 12px; }
.bank-account-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 4px; background: var(--panel); }
.bank-account-card code { word-break: break-all; color: var(--primary); }
.nested-lite { box-shadow: none; background: color-mix(in srgb, var(--panel2) 78%, transparent); margin-bottom: 12px; }
.bank-account-editor { margin-bottom: 8px; }
.check-row { display: inline-flex; gap: 8px; align-items: center; margin: 8px 0 16px; color: var(--muted); }
.terminal-output { min-height: 280px; max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #020812; color: #b8f7d4; padding: 16px; white-space: pre-wrap; line-height: 1.55; }
.term-ok { color: #b8f7d4; }
.term-bad { color: #fecaca; }
.term-warn { color: #fde68a; }
.troubleshooting-stack { display: grid; gap: 20px; }
.resource-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.resource-card {
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 8px;
  min-width: 0;
}
.resource-card span { color: var(--muted); overflow-wrap: anywhere; }
.resource-card b { font-size: 24px; overflow-wrap: anywhere; }
.system-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.system-info-grid div { border: 1px solid var(--line); background: var(--panel2); border-radius: 10px; padding: 12px; display: grid; gap: 5px; }
.system-info-grid span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.cpu-bar { height: 9px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--text) 8%, transparent); }
.cpu-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .3s ease; }
.maintenance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.maintenance-card { display: grid; gap: 8px; align-content: start; }
.maintenance-card > i { font-size: 28px; color: var(--primary); }
.crop-meta { margin: 6px 0 0; }
.profile-grid { grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); align-items: start; }
.profile-upload-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: center; margin-bottom: 16px; }
.profile-upload-row .field { margin-bottom: 0; min-width: 0; }
.profile-grid .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-grid .grid-2 .field:nth-child(3) { grid-column: 1 / -1; }
.avatar-preview { width: 98px; height: 98px; border-radius: 999px; object-fit: cover; border: 2px solid var(--line); }
.muted-input { opacity: .65; }
.account-info-box { border: 1px solid var(--line); background: var(--panel2); border-radius: 12px; padding: 14px; margin-bottom: 18px; }
.password-rules { display: none; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; color: var(--muted); }
.password-rules.visible { display: grid; }
.password-rules li { display: flex; align-items: center; gap: 7px; }
.password-rules li:before { content: "\f00d"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--danger); }
.password-rules li.ok { color: var(--ok); }
.password-rules li.ok:before { content: "\f00c"; color: var(--ok); }
[data-password-match].ok { color: var(--ok); }
.crop-modal { position: fixed; inset: 0; display: none; place-items: center; background: color-mix(in srgb, var(--bg) 76%, transparent); z-index: 320; backdrop-filter: blur(6px); padding: 18px; }
.crop-modal.open { display: grid; }
.crop-dialog { width: min(920px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.crop-stage { height: min(58vh, 560px); background: color-mix(in srgb, var(--bg) 90%, #000 10%); border-radius: 12px; overflow: hidden; margin: 14px 0; }
.crop-stage img { max-width: 100%; display: block; }
.crop-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.swal2-popup.codipi-swal {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 16px;
}
.swal2-popup.codipi-swal .swal2-title,
.swal2-popup.codipi-swal .swal2-html-container { color: var(--text); }
.swal2-popup.codipi-swal .swal2-input,
.swal2-popup.codipi-swal .swal2-textarea {
  background: color-mix(in srgb, var(--bg) 86%, #000 14%);
  color: var(--text);
  border-color: var(--line);
}
.swal2-popup.codipi-swal .swal2-confirm.codipi-confirm-button { color: #061313 !important; font-weight: 800; }
body[data-theme="light"] .swal2-popup.codipi-swal .swal2-confirm.codipi-confirm-button { color: #fff !important; }
.image-zoom-wrap { max-height: 78vh; overflow: auto; display: grid; gap: 14px; justify-items: center; padding: 16px 16px 92px; }
.image-zoom-wrap img { max-width: 100%; max-height: 68vh; transform-origin: center top; transition: transform .12s ease; border-radius: 12px; border: 1px solid var(--line); }
.image-zoom-wrap input {
  width: min(360px, calc(100vw - 72px));
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 10050;
  accent-color: var(--primary);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  padding: 12px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.copy-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.timezone-picker { display: grid; gap: 14px; text-align: left; }
.timezone-preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.timezone-preset-grid .btn { min-height: 72px; flex-direction: column; gap: 4px; align-items: flex-start; justify-content: center; }
.timezone-preset-grid .btn small { color: var(--muted); font-size: 12px; }
.timezone-preset-grid .btn.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--panel)); color: var(--text); }
.timezone-picker .field { display: grid; gap: 8px; }
.setup-modal { width: min(760px, calc(100vw - 32px)); }
.setup-textarea {
  width: 100%;
  min-height: 360px;
  resize: vertical;
  white-space: pre;
  overflow: auto;
  font-family: "Lekton", ui-monospace, Consolas, monospace;
  font-size: 15px;
  line-height: 1.55;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 16px;
  background: color-mix(in srgb, var(--bg) 90%, #000 10%);
  color: var(--text);
}

.docs-shell { display: grid; grid-template-columns: minmax(260px, 280px) minmax(0, 1fr); gap: 28px; align-items: start; overflow: visible !important; transform: none !important; isolation: isolate; }
.docs-shell.docs-shell-pinned { grid-template-columns: minmax(260px, 280px) minmax(0, 1fr); }
.docs-shell.docs-shell-pinned > .docs-content { grid-column: 2; }
.docs-shell > * { min-width: 0; }
.docs-content { min-width: 0; position: relative; z-index: 1; }
.docs-shell > .docs-sidebar { position: -webkit-sticky !important; position: sticky !important; top: 88px !important; align-self: start; height: max-content; max-height: calc(100vh - 108px); overflow: auto; z-index: 4; overscroll-behavior: contain; }
.docs-sidebar { position: -webkit-sticky !important; position: sticky !important; top: 88px !important; align-self: start; height: max-content; max-height: calc(100vh - 108px); overflow: auto; z-index: 4; overscroll-behavior: contain; }
.section .docs-shell > .docs-sidebar { top: 92px !important; }
.dash .docs-sidebar { top: 144px !important; max-height: calc(100vh - 164px); }
.docs-link { display: block; border-left: 2px solid transparent; padding: 8px 10px; color: var(--muted); border-radius: 7px; }
.docs-link:hover, .docs-link.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
.docs-group { margin-bottom: 18px; }
.docs-section { scroll-margin-top: 90px; margin-bottom: 24px; }
.docs-media { margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--panel2) 72%, transparent); }
.docs-media img { display: block; width: 100%; max-height: 520px; object-fit: contain; cursor: zoom-in; }
.docs-video { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #000; }
.docs-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.doc-content-editor [hidden] { display: none !important; }
.doc-content-editor .card-title-row { justify-content: flex-start; }
.doc-content-editor .card-title-row h4 { margin-right: auto; }
.doc-content-editor.is-collapsed .doc-content-editor-body { display: none; }
.doc-content-editor.is-collapsed { padding-bottom: 14px; }
.doc-meta { display: grid; text-align: right; gap: 2px; }
.admin-section-full { margin-bottom: 18px; }
.admin-feature-list .feature-editor { box-shadow: none; }
.feature-editor .actions { margin-top: 10px; }
.extra-feature { display: none; }
.extra-feature.visible { display: block; }
.admin-preview-grid { align-items: stretch; }
.doc-admin-preview { max-height: 720px; overflow: auto; display: flex; flex-direction: column; min-height: 100%; }
.doc-admin-preview .docs-shell { display: block; }
.doc-admin-preview .docs-sidebar { position: static !important; top: auto !important; max-height: none; margin-bottom: 0; }
.doc-admin-preview .docs-section { margin-bottom: 12px; }
.rich-content p { margin: 0 0 10px; }
.rich-content ul, .rich-content ol { padding-left: 22px; }

.ql-toolbar.ql-snow, .ql-container.ql-snow { border-color: var(--line); }
.ql-toolbar.ql-snow { border-radius: 9px 9px 0 0; background: var(--panel2); }
.ql-container.ql-snow { border-radius: 0 0 9px 9px; background: color-mix(in srgb, var(--bg) 82%, #000 18%); color: var(--text); min-height: 120px; }
.ql-editor { min-height: 120px; font-family: "Lekton", ui-monospace, Consolas, monospace; font-size: 16px; }
.mini-richtext + .ql-toolbar + .ql-container,
.mini-richtext ~ .ql-container { min-height: 96px; }

.table-actionbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.compact-actions { justify-content: flex-end; margin: 0; }
.table-pagination { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.table-pagination button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 8px;
  min-width: 36px;
  min-height: 34px;
}
.table-pagination button.active { background: var(--primary); border-color: var(--primary); }
.list-pagination-tools { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin: 12px 0; flex-wrap: wrap; }
.paginated-list [data-paginated-item][hidden] { display: none !important; }
.grid.doc-toc-admin-grid { grid-template-columns: minmax(560px, 1fr) minmax(210px, 240px) !important; align-items: stretch; }
.doc-toc-admin-grid > *, .doc-content-admin-grid > * { min-width: 0; }
.doc-content-admin-grid { grid-template-columns: minmax(0, 1.22fr) minmax(320px, .58fr); align-items: stretch; }
.doc-content-preview,
.doc-toc-preview { height: 100%; max-height: none; overflow: auto; flex: 1 1 auto; min-height: 0; }
.doc-admin-preview { min-height: 100%; }
.doc-toc-crud-panel { min-width: 0; overflow: visible; }
.doc-toc-preview-panel { min-width: 220px; }
.doc-toc-preview-panel .doc-preview-toc,
.doc-content-preview { min-height: 420px; height: var(--doc-preview-height, auto); max-height: var(--doc-preview-height, 720px); }
[data-doc-toc-table] select,
[data-doc-toc-table] .input { min-width: 160px; }

.modal-panel {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 260;
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  backdrop-filter: blur(7px);
  padding: 18px;
}
.modal-panel.open { display: grid; animation: pop .16s ease; }
.modal-card {
  width: min(920px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.modal-card .grid-2 { align-items: start; }
.modal-card .field { min-width: 0; }
.modal-card .input,
.modal-card select { min-height: 56px; }
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position:
    calc(100% - 24px) 52%,
    calc(100% - 17px) 52%;
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
  padding-right: 52px;
}
.field > select,
.table-tools select,
.crud-filter-row select { padding-right: 58px; }
.modal-card select { padding-right: 56px; background-position: calc(100% - 24px) 52%, calc(100% - 17px) 52%; }
.modal-card .password-field { position: relative; display: block; width: 100%; }
.modal-card .password-field .input { display: block; width: 100%; min-height: 56px; padding-right: 58px !important; }
.modal-card .password-field button { position: absolute !important; right: 10px !important; left: auto !important; top: 50% !important; width: 34px; height: 34px; transform: translateY(-50%) !important; margin: 0 !important; }
.provider-model-board,
.plan-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.provider-model-card, .plan-manage-card { box-shadow: none; }
.model-chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.model-chip-list .badge { align-items: center; gap: 6px; }
.model-chip-list .badge.disabled { opacity: .45; }
.model-choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  background: var(--panel2);
  cursor: pointer;
}
.model-choice input { position: absolute; opacity: 0; pointer-events: none; }
.model-choice.selected { color: var(--primary); border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); }
.model-choice.disabled { opacity: .4; cursor: not-allowed; }
.model-picker-card { width: min(760px, 100%); }
.model-provider-group { border-bottom: 1px solid var(--line); padding: 12px 0; }
.tiny-toggle { gap: 8px; margin: 0; }
.tiny-toggle b { font-size: 13px; }
.inline-delete-form { margin-top: 7px; }
.btn.tiny { min-height: 30px; padding: 5px 8px; font-size: 12px; border-radius: 7px; }
.order-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 16px; }
@media (min-width: 1180px) { .order-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.order-review-card { box-shadow: none; display: grid; gap: 14px; }
.order-meta-grid { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px 12px; align-items: start; }
.order-meta-grid span { color: var(--muted); }
.order-meta-grid b { min-width: 0; overflow-wrap: anywhere; }
.order-note { border: 1px solid var(--line); border-radius: 9px; padding: 10px; color: var(--muted); background: color-mix(in srgb, var(--text) 5%, transparent); }
.order-note.bad { border-color: color-mix(in srgb, var(--danger) 42%, transparent); color: #fecaca; }
.order-filter-row { justify-content: flex-start; }
.provider-model-board { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.provider-model-card .model-chip-list { max-height: 360px; overflow: auto; align-content: start; }
.grid.grid-2:has(.provider-model-board) { grid-template-columns: 1fr; }
.icon-picker-card { width: min(760px, 100%); }
.icon-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 16px; }
.icon-picker-grid button {
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  border-radius: 11px;
  min-height: 92px;
  display: grid;
  place-items: center;
  gap: 8px;
}
.icon-picker-grid i { color: var(--primary); font-size: 24px; }
.icon-picker-grid span { color: var(--muted); font-size: 13px; text-transform: capitalize; }
.doc-content-editor { margin-bottom: 14px; box-shadow: none; }
.doc-preview-toc { position: static !important; max-height: none; }

.switch-toggle {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  cursor: pointer;
}
.switch-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch-toggle span {
  grid-row: 1 / span 2;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 30%, transparent);
  border: 1px solid var(--line);
  position: relative;
  transition: background .15s ease, border-color .15s ease;
}
.switch-toggle span:before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  left: 3px;
  top: 2px;
  background: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,.24);
  transition: transform .15s ease, background .15s ease;
}
.switch-toggle input:checked + span { background: var(--primary); border-color: var(--primary); }
.switch-toggle input:checked + span:before { transform: translateX(20px); background: #001413; }
.switch-toggle b { color: var(--text); }
.switch-toggle small { color: var(--muted); line-height: 1.45; }
.inline-toggle { display: inline-grid; grid-template-columns: 48px auto; margin-bottom: 16px; }
.toggle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.maintenance-settings { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: color-mix(in srgb, var(--warning, #f59e0b) 8%, transparent); display: grid; gap: 16px; }
.footer-link-editor { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 14px 0 18px; display: grid; gap: 10px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.notification-pill.is-read, .dropdown-note.is-read { opacity: .62; filter: grayscale(.35); background: color-mix(in srgb, var(--muted) 10%, transparent); border-color: color-mix(in srgb, var(--muted) 20%, transparent); }
.dropdown-note { padding-left: 14px; }
.dropdown-note .muted { font-size: 12px; }
.subscription-line, .admin-key-chip {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  margin-top: 8px;
}
.subscription-line b, .admin-key-chip b { color: var(--text); }
.quota-mini-bar, .storage-mini-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--text) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.quota-mini-bar i, .storage-mini-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #f59e0b); }
.attachment-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; margin: 6px 6px 0 0; border: 1px solid var(--line); border-radius: 10px; padding: 7px 28px 7px 8px; background: var(--panel); max-width: 220px; }
.attachment-chip img { width: 72px; height: 54px; object-fit: cover; border-radius: 7px; }
.attachment-chip button {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--danger);
  color: white;
  display: grid;
  place-items: center;
}
.badge-copy { border: 1px solid color-mix(in srgb, var(--primary) 38%, var(--line)); cursor: grab; font: inherit; background: color-mix(in srgb, var(--primary) 14%, var(--panel)); color: var(--primary); }
.badge-copy:hover { background: color-mix(in srgb, var(--primary) 24%, var(--panel)); }
.badge-copy:active { cursor: grabbing; }
.active-package-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.package-timer-card { display: grid; gap: 8px; align-content: start; }
.package-timer { font-size: clamp(20px, 3vw, 30px); color: var(--primary); }
.form-spaced { margin: 16px 0; }
.admin-key-modal-list { display: grid; gap: 10px; max-height: 62vh; overflow: auto; }
.recipient-mode-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.recipient-mode-row .active { background: var(--primary); color: #05201d; border-color: var(--primary); }
.recipient-filter-tools { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 10px; }
.recipient-select-all { margin-top: 14px; }
.recipient-user-list { display: grid; gap: 10px; max-height: 54vh; overflow: auto; margin-top: 12px; padding-right: 4px; }
.recipient-user-card {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  padding: 10px;
}
.recipient-user-card.hidden { display: none; }
.recipient-user-card span { display: grid; gap: 2px; min-width: 0; }
.recipient-user-card small { color: var(--muted); overflow-wrap: anywhere; }
.recipient-user-card em { color: var(--primary); font-style: normal; font-size: 12px; }
.smtp-test-box { display: grid; gap: 9px; text-align: left; }
.smtp-test-box label { font-weight: 700; color: var(--text); }
.smtp-test-box .input { margin: 0; width: 100%; }
.smtp-test-editor { min-height: 160px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); }
.switch-toggle.form-spaced, .form-spaced.switch-toggle { margin: 18px 0; }
.plan-actions { margin-top: 18px; }
.plan-manage-card .check-row, [data-plan-form] .check-row { margin: 18px 0; }
.payment-method-panel + .field, [data-payment-form] .switch-toggle { margin-top: 16px; }
[data-payment-form] .switch-toggle { margin-bottom: 22px; }
.recipient-actions { margin-top: 18px; }
.recipient-detail-list { display: grid; gap: 10px; text-align: left; }
.recipient-detail-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--panel2); }
.recipient-detail-list small { color: var(--muted); }
.recipient-detail-list em { color: var(--primary); font-style: normal; grid-row: span 2; align-self: center; }
.maintenance-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(300px, .95fr);
  gap: 30px;
  align-items: stretch;
  padding: clamp(24px, 5vw, 64px);
  background: radial-gradient(circle at 22% 12%, color-mix(in srgb, var(--primary) 30%, transparent), transparent 30%), linear-gradient(135deg, var(--bg), color-mix(in srgb, var(--panel) 86%, #000 14%));
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.maintenance-page:before {
  content: "";
  position: absolute;
  inset: -30%;
  background: repeating-linear-gradient(115deg, transparent 0 44px, color-mix(in srgb, var(--primary) 10%, transparent) 45px 46px);
  animation: maintenanceDrift 18s linear infinite;
  pointer-events: none;
  opacity: .55;
}
.maintenance-hero-panel, .maintenance-side-panel {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 24px;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  box-shadow: 0 20px 70px rgba(0,0,0,.28);
  padding: clamp(24px, 4vw, 48px);
  position: relative;
  z-index: 1;
}
.maintenance-hero-panel { display: grid; gap: 22px; align-content: center; }
.maintenance-brand .logo { background: rgba(255,255,255,.18); }
.maintenance-chip {
  justify-self: start;
  display: inline-flex;
  gap: 9px;
  align-items: center;
  border: 1px solid rgba(251,191,36,.55);
  color: #fde68a;
  background: rgba(120,53,15,.45);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
}
.maintenance-hero-panel h1 { font-size: clamp(42px, 7vw, 82px); line-height: .94; margin: 0; letter-spacing: 0; }
.maintenance-dev-copy { font-size: 18px; color: var(--muted); }
.maintenance-pill-row { display: flex; gap: 12px; flex-wrap: wrap; }
.maintenance-pill-row span { color: var(--bg); background: var(--text); border-radius: 999px; padding: 10px 16px; font-weight: 800; }
.maintenance-side-panel { display: grid; gap: 20px; }
.maintenance-card-soft {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  background: rgba(255,255,255,.10);
  padding: 24px;
}
.maintenance-countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.maintenance-countdown span { display: grid; place-items: center; background: color-mix(in srgb, var(--text) 92%, transparent); color: var(--bg); border-radius: 14px; padding: 18px 6px; }
.maintenance-countdown b { font-size: 32px; }
.maintenance-countdown small { color: #6b6472; }
.maintenance-dev-note { border-left: 4px solid var(--primary); padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--primary) 9%, transparent); }
.crop-radius-control { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.crop-radius-control .input { width: 84px; height: 38px; padding: 8px; }
.crop-dialog { --crop-radius: 0px; }
.crop-dialog .cropper-view-box,
.crop-dialog .cropper-face,
.crop-dialog .cropper-crop-box { border-radius: var(--crop-radius); }
@keyframes maintenanceDrift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(90px, 90px, 0); } }

.mobile-bottom, .mobile-other-panel { display: none; }
.loader {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  z-index: 500;
  backdrop-filter: blur(4px);
}
body.is-loading .loader { display: grid; }
.loader-mark {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
}
.loader-mark:before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 24px;
  border: 3px solid transparent;
  border-top-color: var(--primary);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 980px) {
  .landing-nav, .desktop-action { display: none; }
  .hamburger { display: inline-flex; min-width: 64px; }
  .topbar-inner { gap: 8px; }
  .topbar-inner > .brand { flex: 1 1 auto; min-width: 0; }
  .topbar-inner > .actions { flex: 0 0 auto; flex-wrap: nowrap; gap: 6px; justify-content: flex-end; }
  .topbar-inner > .actions .icon-btn { min-width: 48px; width: 48px; padding-inline: 0; }
  .topbar-inner > .actions .profile-menu { order: -1; max-width: clamp(86px, 25vw, 132px); }
  .landing-user-btn { width: 100%; max-width: 132px; min-width: 0; padding: 11px 10px; gap: 7px; }
  .landing-user-btn span { max-width: 86px; }
  .landing-mobile-panel {
    display: none;
    width: min(360px, calc(100% - 24px));
    margin: 0 auto 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    padding: 10px;
    box-shadow: var(--shadow);
  }
  .landing-mobile-panel.open { display: grid; gap: 6px; animation: pop .16s ease; }
  .landing-mobile-panel a { padding: 11px; border-radius: 9px; color: var(--muted); }
  .landing-mobile-panel a:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
  .hero-grid, .grid-2, .grid-3, .feature-matrix, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0; min-height: auto; }
  .h1 { font-size: clamp(38px, 11vw, 54px); }
  .lead { font-size: 18px; }
}

@media (max-width: 900px) {
  body { --sidebar-width: 0px; }
  .dash { display: block; }
  .dash-main { width: 100%; max-width: 100vw; overflow-x: clip; }
  .sidebar { display: none; }
  body.sidebar-collapsed .dash-main, .dash-main { margin-left: 0; padding-top: 150px; }
  .sidebar-boundary-toggle { display: none; }
  .dash-head { left: 0; padding: 10px 16px 8px; align-items: flex-start; flex-wrap: wrap; width: 100%; max-width: 100vw; min-height: 132px; gap: 7px; }
  .dash-head > div:first-child { width: 100%; }
  .dash-head h1 { font-size: 23px; line-height: 1.1; }
  .dash-head .muted { font-size: 13px; line-height: 1.45; }
  .dash-actions { width: 100%; justify-content: flex-start; position: relative; z-index: 35; margin-top: -8px; }
  .dash-content { padding: 24px 16px 104px; }
  .card { max-width: 100%; overflow: hidden; }
  .table { display: block; overflow-x: auto; white-space: nowrap; }
  .table td, .table th { white-space: normal; min-width: 92px; }
  .card-title-row { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .card-title-row .btn { width: auto; }
  .dropdown { position: fixed; left: 16px; right: 16px; top: 172px; width: auto; max-width: calc(100vw - 32px); }
  .shortcuts-dropdown, .notification-dropdown { top: 172px; }
  .shortcut-grid { grid-template-columns: repeat(2, 1fr); }
  .shortcut-grid a { min-height: 92px; }
  .mobile-bottom {
    position: fixed;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    left: 0;
    right: 0;
    bottom: 0;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    border-top: 1px solid var(--line);
    z-index: 50;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-bottom a, .mobile-bottom button {
    display: grid;
    gap: 3px;
    justify-items: center;
    padding: 9px 4px;
    color: var(--muted);
    background: transparent;
    border: 0;
    font-size: 11px;
  }
  .mobile-bottom .active { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
  .mobile-other-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 68px;
    z-index: 60;
    max-height: 70vh;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: var(--shadow);
    padding: 12px;
  }
  .mobile-other-panel.open { display: block; animation: pop .16s ease; }
  .table { display: block; width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
  .table tbody { min-width: 680px; display: table; width: 100%; }
  .table-tools { width: 100%; }
  .table-tools .input, .table-tools select, .mini-select { width: 100%; max-width: none; }
  .crud-toolbar { align-items: flex-start; }
  .crud-toolbar .table-actionbar { margin-left: auto; }
  .crud-filter-row { justify-content: stretch; }
  .crud-filter-row .input, .crud-filter-row select { width: 100%; }
  .table-actionbar { justify-content: flex-start; }
  .compact-label span { display: none; }
  .compact-label { width: 42px; min-width: 42px; padding-inline: 0; }
  .grid-4, .endpoint-grid, .playground-layout, .usage-main-grid { grid-template-columns: 1fr; }
  .playground-layout { grid-template-columns: 1fr; }
  .playground-history-card { min-height: auto; }
  .history-list { flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; }
  .history-item { min-width: min(280px, 82vw); }
  .playground-fullscreen .playground-layout { grid-template-columns: 1fr; overflow: auto; padding: 12px; }
  .playground-fullscreen .playground-history-card,
  .playground-fullscreen .chat-panel { height: auto; min-height: auto; }
  .playground-fullscreen .chat-window { height: clamp(360px, 55vh, 620px); }
  .playground-fullscreen .history-list { flex-direction: row; max-height: none; }
  .profile-grid { grid-template-columns: 1fr; }
  .endpoint-summary-card { min-height: auto; }
  .section h2, .card h2 { font-size: 22px; }
  .card h3 { font-size: 18px; }
  .stat { font-size: 24px; }
  .period-filter { margin-left: 0; }
  .chat-panel { min-height: 560px; }
  .chat-window { height: clamp(340px, 52vh, 560px); }
  .docs-shell { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; overflow: visible !important; }
  .docs-shell > .docs-sidebar:not(.doc-preview-toc),
  .docs-sidebar:not(.doc-preview-toc) { position: sticky !important; top: 132px !important; height: max-content; max-height: 40vh; margin-bottom: 18px; z-index: 8; }
  .section .docs-shell > .docs-sidebar { top: 84px !important; }
  .dash .docs-shell > .docs-sidebar:not(.doc-preview-toc),
  .dash .docs-sidebar:not(.doc-preview-toc) { top: 132px !important; }
  .docs-sidebar .docs-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
  .docs-section h1 { font-size: 34px !important; }
  .doc-meta { display: none; }
  .code-wrap .code { padding-right: 15px; }
  .copy-code { position: static; align-self: flex-end; margin-bottom: 8px; padding: 8px 11px; min-height: 36px; }
  .code-wrap { display: flex; flex-direction: column; }
  .setup-modal { width: calc(100vw - 28px); }
  .setup-textarea { min-height: 320px; font-size: 13px; }
  .doc-toc-admin-grid, .grid.doc-toc-admin-grid, .doc-content-admin-grid, .grid.doc-content-admin-grid { grid-template-columns: 1fr !important; }
  .doc-toc-admin-grid { display: grid !important; gap: 16px; }
  .doc-toc-admin-grid > div:first-child,
  .doc-content-admin-grid > div:first-child { overflow-x: auto; max-width: 100%; }
  [data-doc-toc-table] { min-width: 0 !important; width: 100% !important; max-width: 100% !important; display: block !important; overflow: visible !important; white-space: normal !important; }
  [data-doc-toc-table] tbody { min-width: 0 !important; width: 100% !important; max-width: 100% !important; display: grid !important; gap: 10px; }
  [data-doc-toc-table] tr:first-child { display: none; }
  [data-doc-toc-table] tr[hidden] { display: none !important; }
  [data-doc-toc-table] tr {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    background: var(--panel);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  [data-doc-toc-table] tr[hidden],
  [data-doc-toc-table] tr[style*="display: none"] { display: none !important; }
  [data-doc-toc-table] td {
    display: block;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0;
    background: transparent;
    min-width: 0 !important;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  [data-doc-toc-table] td:nth-child(n+3) { grid-column: 1 / -1; }
  [data-doc-toc-table] td:nth-child(2) { align-self: center; }
  [data-doc-toc-table] select,
  [data-doc-toc-table] .input { min-width: 0 !important; width: 100% !important; max-width: 100% !important; }
  [data-doc-toc-table] .actions { justify-content: flex-start; }
  .doc-toc-crud-panel { padding-bottom: 8px; }
  .doc-toc-crud-panel,
  .doc-toc-admin-grid > div:first-child { overflow-x: visible !important; }
  .doc-toc-crud-panel .table { white-space: normal; overflow: visible; }
  .doc-toc-preview-panel { min-width: 0; }
  .doc-toc-preview-panel,
  .doc-admin-preview,
  .doc-toc-preview-panel .docs-sidebar { width: 100%; max-width: 100%; }
  .admin-preview-grid, .doc-toc-admin-grid, .doc-content-admin-grid { width: 100%; max-width: 100%; overflow: visible !important; }
  .doc-toc-preview-panel .doc-preview-toc { display: block; max-height: 44vh; overflow: auto; }
  .doc-content-preview { height: 72vh; max-height: 72vh; overflow: auto; }
  .modal-card .grid-2 { grid-template-columns: 1fr; }
  .modal-card { width: calc(100vw - 28px); max-height: calc(100vh - 28px); padding: 16px; }
  .order-card-grid, .plan-board, .provider-model-board, .maintenance-grid, .resource-card-grid { grid-template-columns: 1fr; }
  .active-package-grid { grid-template-columns: 1fr; }
  .toggle-grid { grid-template-columns: 1fr; }
  .maintenance-page { grid-template-columns: 1fr; padding: 18px; }
  .maintenance-countdown { grid-template-columns: repeat(2, 1fr); }
  .recipient-user-card { grid-template-columns: 22px minmax(0, 1fr); }
  .recipient-user-card em { grid-column: 2; }
  .order-meta-grid { grid-template-columns: 82px minmax(0, 1fr); }
  .doc-content-admin-grid > div:first-child { overflow-x: visible; }
}

@media (max-width: 560px) {
  .auth-wrap { padding: 16px; align-items: start; overflow: auto; }
  .auth-card { width: 100%; max-height: none; padding: 18px; }
  .auth-card .brand { align-items: flex-start; }
  .auth-card .brand span:last-child { min-width: 0; overflow-wrap: anywhere; }
  .recaptcha-scale {
    --recaptcha-scale: min(1, calc((100vw - 68px) / 304));
    transform: scale(var(--recaptcha-scale));
    height: calc(78px * var(--recaptcha-scale));
  }
}
