/* Copied 1:1 from api.docs/src/css/ds/components.css on 2026-10-18. Do not edit here; re-copy from api.docs to fix drift. */

/* =========================================================
   api.co.id — component stylesheet (prefix: ac-)
   Semua nilai diambil dari tokens.css (var(--…)).
   ========================================================= */

/* ---------- base ---------- */
.ac-root, .ac-root *, .ac-root *::before, .ac-root *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-sans); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; font-size: 16px; line-height: 24px; }
*, *::before, *::after { box-sizing: border-box; }
.ac-mono { font-family: var(--font-mono); }
.ac-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ac-stage { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.ac-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.ac-col { display: flex; flex-direction: column; gap: var(--space-3); }
.ac-grid { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.ac-label-sm { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.ac-icon { width: var(--icon-md); height: var(--icon-md); flex: none; stroke-width: var(--icon-stroke); }
.ac-icon--sm { width: var(--icon-sm); height: var(--icon-sm); }
.ac-icon--lg { width: var(--icon-lg); height: var(--icon-lg); }
a.ac-link, .ac-link { color: var(--primary-text); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color var(--motion-fast) var(--ease-standard); font-weight: 600; }
.ac-link:hover { text-decoration-color: currentColor; }
.ac-link:focus-visible { outline: 2px solid var(--focus-border); outline-offset: 2px; border-radius: 4px; }
code.ac-inline-code { font-family: var(--font-mono); font-size: .875em; padding: 1px 6px; border-radius: var(--radius-sm); background: var(--bg-muted); color: var(--text); }

/* ---------- logo ---------- */
.ac-logo { display: inline-flex; align-items: center; }
.ac-logo img { display: block; height: 100%; width: auto; }
.ac-logo .ac-logo-dark { display: none; }
[data-theme="dark"] .ac-logo:not(.ac-logo--on-brand) .ac-logo-light { display: none; }
[data-theme="dark"] .ac-logo:not(.ac-logo--on-brand) .ac-logo-dark { display: block; }
.ac-logo--on-brand .ac-logo-light { display: none; }
.ac-logo--on-brand .ac-logo-dark { display: block; }

/* ---------- button ---------- */
.ac-btn { --_h: 44px; --_px: 20px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--_h); padding: 0 var(--_px); font: inherit; font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: 0; border-radius: var(--radius-md); border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none; transition: background-color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard); }
.ac-btn:active:not(:disabled):not([aria-disabled="true"]) { transform: scale(.98); }
.ac-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-border); }
.ac-btn--sm { --_h: 36px; --_px: 14px; font-size: 14px; gap: 6px; }
.ac-btn--lg { --_h: 52px; --_px: 28px; font-size: 16px; }
.ac-btn--pill { border-radius: var(--radius-full); }
.ac-btn--block { width: 100%; }
.ac-btn--primary { background: var(--primary); color: var(--on-primary); }
.ac-btn--primary:hover { background: var(--primary-hover); }
.ac-btn--primary:active { background: var(--primary-active); }
.ac-btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-1); }
.ac-btn--secondary:hover { background: var(--bg-subtle); border-color: var(--border-control); }
.ac-btn--secondary:active { background: var(--bg-muted); }
.ac-btn--ghost { color: var(--text-secondary); }
.ac-btn--ghost:hover { background: var(--bg-muted); color: var(--text); }
.ac-btn--ghost:active { background: var(--border); }
.ac-btn--brand-ghost { color: var(--primary-text); }
.ac-btn--brand-ghost:hover { background: var(--primary-subtle); }
.ac-btn--destructive { background: var(--danger-solid); color: var(--on-danger); }
.ac-btn--destructive:hover { background: var(--danger-solid-hover); }
.ac-btn--link { --_px: 4px; min-height: 44px; color: var(--primary-text); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; }
.ac-btn--link:hover { text-decoration-color: currentColor; }
.ac-btn--inverse { background: #FFFFFF; color: var(--primary-600); }
.ac-btn--inverse:hover { background: var(--primary-50); }
.ac-btn--icon { --_px: 0; width: var(--_h); }
.ac-btn:disabled, .ac-btn[aria-disabled="true"] { cursor: not-allowed; background: var(--bg-muted); color: var(--text-disabled); border-color: transparent; box-shadow: none; }
.ac-btn--link:disabled, .ac-btn--ghost:disabled { background: transparent; }
.ac-btn[data-loading="true"] { cursor: progress; }
.ac-btn[data-loading="true"] .ac-btn-label { visibility: hidden; }
.ac-btn .ac-btn-spinner { position: absolute; inset: 0; display: grid; place-items: center; }
.ac-btn--primary[data-loading="true"] { background: var(--primary); color: var(--on-primary); }
.ac-btn-label { display: inline-flex; align-items: center; gap: inherit; }

/* ---------- spinner / progress ---------- */
.ac-spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; opacity: .9; animation: ac-spin 700ms linear infinite; display: inline-block; flex: none; }
.ac-spinner--sm { width: 16px; height: 16px; }
.ac-spinner--lg { width: 32px; height: 32px; border-width: 3px; }
@keyframes ac-spin { to { transform: rotate(360deg); } }
.ac-progress { position: relative; height: 8px; border-radius: var(--radius-full); background: var(--bg-muted); overflow: hidden; }
.ac-progress--sm { height: 4px; }
.ac-progress-bar { height: 100%; border-radius: inherit; background: var(--primary); transition: width var(--motion-slow) var(--ease-standard); }
.ac-progress--success .ac-progress-bar { background: var(--success-solid); }
.ac-progress--warning .ac-progress-bar { background: var(--warning-solid); }
.ac-progress--danger .ac-progress-bar { background: var(--danger-solid); }
.ac-progress--indeterminate .ac-progress-bar { width: 40% !important; position: absolute; animation: ac-indet 1400ms var(--ease-standard) infinite; }
@keyframes ac-indet { 0% { left: -40%; } 100% { left: 100%; } }
.ac-topbar-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: var(--z-toast); }

/* ---------- skeleton ---------- */
.ac-skel { display: block; border-radius: var(--radius-sm); background-color: var(--skeleton-base); background-image: linear-gradient(90deg, rgba(255,255,255,0) 0, var(--skeleton-shine) 50%, rgba(255,255,255,0) 100%); background-size: 200% 100%; background-repeat: no-repeat; animation: ac-shimmer var(--motion-shimmer) ease-in-out infinite; }
@keyframes ac-shimmer { 0% { background-position: 150% 0; } 100% { background-position: -50% 0; } }
.ac-skel--text { height: 12px; margin: 6px 0; }
.ac-skel--title { height: 20px; width: 60%; }
.ac-skel--circle { border-radius: 50%; }
.ac-skel--pill { border-radius: var(--radius-full); }
.ac-skel-group { display: flex; flex-direction: column; gap: var(--space-2); }
.ac-fade-in { animation: ac-fade-in var(--motion-slow) var(--ease-enter) both; }
@keyframes ac-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ac-code .ac-skel { background-color: rgba(255,255,255,.08); background-image: linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,.12) 50%, rgba(255,255,255,0) 100%); }

/* ---------- form fields ---------- */
.ac-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ac-field-label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); display: flex; justify-content: space-between; gap: var(--space-2); }
.ac-field-label .ac-req { color: var(--danger-text); margin-left: 2px; }
.ac-field-hint { font-size: 13px; line-height: 18px; color: var(--text-muted); }
.ac-field-error { font-size: 13px; line-height: 18px; color: var(--danger-text); display: flex; gap: 6px; align-items: center; }
.ac-input, .ac-textarea, .ac-select { width: 100%; min-height: 44px; padding: 0 14px; font: inherit; font-size: 15px; line-height: 22px; color: var(--text); background: var(--surface); border: 1px solid var(--border-control); border-radius: var(--radius-md); outline: none; transition: border-color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard), background-color var(--motion-fast); }
.ac-input::placeholder, .ac-textarea::placeholder { color: var(--text-muted); }
.ac-input:hover, .ac-textarea:hover, .ac-select:hover { border-color: var(--text-muted); }
.ac-input:focus, .ac-textarea:focus, .ac-select:focus, .ac-input-wrap:focus-within { border-color: var(--focus-border); box-shadow: var(--shadow-focus); }
.ac-input[aria-invalid="true"], .ac-textarea[aria-invalid="true"], .ac-select[aria-invalid="true"], .ac-input-wrap[data-invalid="true"] { border-color: var(--danger-text); }
.ac-input[aria-invalid="true"]:focus, .ac-input-wrap[data-invalid="true"]:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger-solid) 14%, transparent); }
.ac-input:disabled, .ac-textarea:disabled, .ac-select:disabled, .ac-input-wrap[data-disabled="true"] { background: var(--bg-muted); color: var(--text-disabled); border-color: var(--border); cursor: not-allowed; }
.ac-textarea { min-height: 104px; padding: 10px 14px; resize: vertical; }
.ac-select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B6B82' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.ac-input-wrap { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 4px 0 12px; background: var(--surface); border: 1px solid var(--border-control); border-radius: var(--radius-md); transition: border-color var(--motion-fast), box-shadow var(--motion-fast); color: var(--text-muted); }
.ac-input-wrap:hover { border-color: var(--text-muted); }
.ac-input-wrap > input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--text); height: 42px; padding: 0; }
.ac-input-wrap > input::placeholder { color: var(--text-muted); }
.ac-input-wrap .ac-kbd { margin-right: 8px; }
.ac-kbd { font-family: var(--font-mono); font-size: 11px; line-height: 16px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border-strong); color: var(--text-muted); background: var(--bg-subtle); }
.ac-counter { font-size: 12px; color: var(--text-muted); text-align: right; }

/* api key */
.ac-apikey { font-family: var(--font-mono); }
.ac-apikey > input { font-family: var(--font-mono); font-size: 14px; letter-spacing: .02em; }
.ac-apikey-actions { display: flex; gap: 2px; }
.ac-iconbtn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text-secondary); border-radius: 8px; cursor: pointer; transition: background-color var(--motion-fast), color var(--motion-fast); position: relative; }
.ac-iconbtn:hover { background: var(--bg-muted); color: var(--text); }
.ac-iconbtn:focus-visible { outline: 2px solid var(--focus-border); outline-offset: -2px; }
.ac-iconbtn[data-copied="true"] { color: var(--success-text); }

/* copy icon swap */
.ac-swap { position: relative; display: inline-grid; width: 18px; height: 18px; }
.ac-swap > * { grid-area: 1 / 1; transition: opacity var(--motion-fast) var(--ease-standard), transform var(--motion-base) var(--ease-enter); }
.ac-swap[data-on="false"] .ac-swap-on { opacity: 0; transform: scale(.5); }
.ac-swap[data-on="true"] .ac-swap-off { opacity: 0; transform: scale(.5); }

/* checkbox / radio */
.ac-check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 15px; line-height: 22px; color: var(--text); min-height: 44px; padding: 11px 0; }
.ac-check input { appearance: none; margin: 1px 0 0; width: 20px; height: 20px; flex: none; border: 1.5px solid var(--border-control); border-radius: var(--radius-sm); background: var(--surface) no-repeat center / 14px; cursor: pointer; transition: background-color var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast); }
.ac-check input[type="radio"] { border-radius: 50%; }
.ac-check input:hover { border-color: var(--primary); }
.ac-check input:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-border); }
.ac-check input:checked { background-color: var(--primary); border-color: var(--primary); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
[data-theme="dark"] .ac-check input:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23100F33' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.ac-check input:indeterminate { background-color: var(--primary); border-color: var(--primary); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E"); }
.ac-check input[type="radio"]:checked { background-image: none; box-shadow: inset 0 0 0 4px var(--surface); }
.ac-check input[type="radio"]:checked:focus-visible { box-shadow: inset 0 0 0 4px var(--surface), 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-border); }
.ac-check input:disabled { background-color: var(--bg-muted); border-color: var(--border); cursor: not-allowed; }
.ac-check:has(input:disabled) { color: var(--text-disabled); cursor: not-allowed; }
.ac-check input[aria-invalid="true"] { border-color: var(--danger-text); }
.ac-check-text { display: flex; flex-direction: column; }
.ac-check-desc { font-size: 13px; line-height: 18px; color: var(--text-muted); }

/* switch */
.ac-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; min-height: 44px; font-size: 15px; color: var(--text); }
.ac-switch button { position: relative; width: 44px; height: 24px; flex: none; border-radius: var(--radius-full); border: 0; background: var(--border-control); cursor: pointer; padding: 0; transition: background-color var(--motion-base) var(--ease-standard); }
.ac-switch button::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform var(--motion-base) var(--ease-standard); }
.ac-switch button[aria-checked="true"] { background: var(--primary); }
.ac-switch button[aria-checked="true"]::after { transform: translateX(20px); }
[data-theme="dark"] .ac-switch button[aria-checked="true"]::after { background: var(--on-primary); }
.ac-switch button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-border); }
.ac-switch button:disabled { opacity: .45; cursor: not-allowed; }

/* otp */
.ac-otp { display: flex; gap: var(--space-2); }
.ac-otp input { width: 48px; height: 56px; text-align: center; font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--border-control); border-radius: var(--radius-md); outline: none; transition: border-color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast); padding: 0; }
.ac-otp input:focus { border-color: var(--focus-border); box-shadow: var(--shadow-focus); }
.ac-otp input[data-filled="true"] { border-color: var(--primary-border); background: var(--primary-subtle); }
.ac-otp[data-invalid="true"] input { border-color: var(--danger-text); }
.ac-otp[data-invalid="true"] { animation: ac-shake 320ms var(--ease-standard); }
.ac-otp input:disabled { background: var(--bg-muted); color: var(--text-disabled); }
@keyframes ac-shake { 0%,100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* combobox */
.ac-combo { position: relative; }
.ac-listbox { position: absolute; z-index: var(--z-dropdown); left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-2); max-height: 288px; overflow: auto; animation: ac-pop-in var(--motion-base) var(--ease-enter); transform-origin: top center; }
.ac-option { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text); }
.ac-option[aria-selected="true"], .ac-option:hover { background: var(--primary-subtle); }
.ac-option-desc { color: var(--text-muted); font-size: 12px; margin-left: auto; }
.ac-option mark { background: none; color: var(--primary-text); font-weight: 700; }
.ac-listbox-empty { padding: 16px 10px; font-size: 14px; color: var(--text-muted); text-align: center; }
@keyframes ac-pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- badge / tag ---------- */
.ac-badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; font-size: 12px; line-height: 16px; font-weight: 600; border-radius: var(--radius-sm); background: var(--bg-muted); color: var(--text-secondary); border: 1px solid transparent; white-space: nowrap; }
.ac-badge--pill { border-radius: var(--radius-full); padding: 0 10px; }
.ac-badge--lg { height: 28px; font-size: 13px; padding: 0 10px; }
.ac-badge--brand { background: var(--primary-subtle); color: var(--primary-text); border-color: var(--primary-border); }
.ac-badge--success { background: var(--success-bg); color: var(--success-text); border-color: var(--success-border); }
.ac-badge--warning { background: var(--warning-bg); color: var(--warning-text); border-color: var(--warning-border); }
.ac-badge--danger { background: var(--danger-bg); color: var(--danger-text); border-color: var(--danger-border); }
.ac-badge--info { background: var(--info-bg); color: var(--info-text); border-color: var(--info-border); }
.ac-badge--new { background: var(--primary); color: var(--on-primary); text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; height: 20px; padding: 0 7px; font-weight: 700; }
.ac-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.ac-badge--success .ac-dot { background: var(--success-solid); }
.ac-badge--warning .ac-dot { background: var(--warning-solid); }
.ac-badge--danger .ac-dot { background: var(--danger-solid); }
.ac-badge--info .ac-dot { background: var(--info-solid); }
.ac-tag { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 10px; border-radius: var(--radius-full); font-size: 13px; background: var(--bg-muted); color: var(--text); }
.ac-tag button { width: 22px; height: 22px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 50%; color: var(--text-muted); cursor: pointer; }
.ac-tag button:hover { background: var(--border); color: var(--text); }

/* status code */
.ac-status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; height: 24px; padding: 0 8px; border-radius: var(--radius-sm); }
.ac-status--2 { background: var(--success-bg); color: var(--success-text); }
.ac-status--3 { background: var(--info-bg); color: var(--info-text); }
.ac-status--4 { background: var(--warning-bg); color: var(--warning-text); }
.ac-status--5 { background: var(--danger-bg); color: var(--danger-text); }
.ac-status-text { font-family: var(--font-sans); font-weight: 500; }

/* method pill */
.ac-method { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; height: 24px; padding: 0 8px; border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.ac-method--get { background: var(--method-get-bg); color: var(--method-get-text); }
.ac-method--post { background: var(--method-post-bg); color: var(--method-post-text); }
.ac-method--put { background: var(--method-put-bg); color: var(--method-put-text); }
.ac-method--patch { background: var(--method-patch-bg); color: var(--method-patch-text); }
.ac-method--delete { background: var(--method-delete-bg); color: var(--method-delete-text); }
.ac-endpoint { display: inline-flex; align-items: center; gap: 10px; padding: 6px 6px 6px 6px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); max-width: 100%; }
.ac-endpoint-path { font-family: var(--font-mono); font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-endpoint-path b { color: var(--primary-text); font-weight: 600; }

/* ---------- avatar ---------- */
.ac-avatar { --_s: 36px; width: var(--_s); height: var(--_s); border-radius: 50%; display: inline-grid; place-items: center; flex: none; overflow: hidden; background: var(--primary-subtle); color: var(--primary-text); font-weight: 700; font-size: calc(var(--_s) * .38); position: relative; }
.ac-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ac-avatar--sm { --_s: 28px; } .ac-avatar--lg { --_s: 48px; } .ac-avatar--xl { --_s: 72px; }
.ac-avatar-status { position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; border-radius: 50%; background: var(--success-solid); box-shadow: 0 0 0 2px var(--surface); }
.ac-avatar-group { display: flex; }
.ac-avatar-group .ac-avatar { box-shadow: 0 0 0 2px var(--surface); margin-left: -8px; }
.ac-avatar-group .ac-avatar:first-child { margin-left: 0; }

/* ---------- tooltip / popover ---------- */
.ac-tip-wrap { position: relative; display: inline-flex; }
.ac-tooltip { position: absolute; z-index: var(--z-dropdown); bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); padding: 6px 10px; border-radius: var(--radius-sm); background: var(--surface-inverse); color: var(--text-inverse); font-size: 12.5px; line-height: 18px; font-weight: 500; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-2); animation: ac-tip-in var(--motion-fast) var(--ease-enter); }
.ac-tooltip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--surface-inverse); }
.ac-tooltip--bottom { bottom: auto; top: calc(100% + 8px); }
.ac-tooltip--bottom::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--surface-inverse); }
@keyframes ac-tip-in { from { opacity: 0; transform: translate(-50%, 4px); } to { opacity: 1; transform: translate(-50%, 0); } }
.ac-popover { position: absolute; z-index: var(--z-dropdown); top: calc(100% + 8px); left: 0; width: 320px; max-width: calc(100vw - 32px); padding: var(--space-4); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-3); animation: ac-pop-in var(--motion-base) var(--ease-enter); transform-origin: top left; }
.ac-popover-title { font-weight: 700; font-size: 15px; margin: 0 0 4px; }
.ac-popover-body { font-size: 14px; line-height: 20px; color: var(--text-secondary); }
.ac-menu { position: absolute; z-index: var(--z-dropdown); top: calc(100% + 6px); right: 0; min-width: 220px; padding: 6px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-2); animation: ac-pop-in var(--motion-base) var(--ease-enter); transform-origin: top right; }
.ac-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; background: transparent; border-radius: 8px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; text-align: left; text-decoration: none; }
.ac-menu-item:hover, .ac-menu-item:focus-visible { background: var(--bg-muted); outline: none; }
.ac-menu-item--danger { color: var(--danger-text); }
.ac-menu-item--danger:hover { background: var(--danger-bg); }
.ac-menu-sep { height: 1px; background: var(--border); margin: 6px 0; }

/* ---------- card ---------- */
.ac-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-1); }
.ac-card--interactive { transition: border-color var(--motion-base) var(--ease-standard), box-shadow var(--motion-base) var(--ease-standard), transform var(--motion-base) var(--ease-standard); cursor: pointer; text-decoration: none; color: inherit; display: block; }
.ac-card--interactive:hover { border-color: var(--primary-border); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.ac-card--interactive:focus-visible { outline: none; border-color: var(--focus-border); box-shadow: var(--shadow-focus); }
.ac-product { display: flex; flex-direction: column; gap: var(--space-4); height: 100%; }
.ac-product-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.ac-product-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--primary-subtle); color: var(--primary-text); display: grid; place-items: center; flex: none; transition: background-color var(--motion-base), color var(--motion-base); }
.ac-card--interactive:hover .ac-product-icon { background: var(--primary); color: var(--on-primary); }
.ac-product-title { margin: 0; font-size: 18px; line-height: 26px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.ac-product-desc { margin: 0; font-size: 14px; line-height: 22px; color: var(--text-secondary); flex: 1; }
.ac-product-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.ac-product-price b { color: var(--text); font-size: 15px; }
.ac-product-cta { color: var(--primary-text); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.ac-product-cta svg { transition: transform var(--motion-base) var(--ease-standard); }
.ac-card--interactive:hover .ac-product-cta svg { transform: translateX(3px); }

.ac-plan { display: flex; flex-direction: column; gap: var(--space-6); position: relative; }
.ac-plan--featured { border: 2px solid var(--primary); box-shadow: var(--shadow-3); }
.ac-plan-flag { position: absolute; top: -13px; left: var(--space-6); }
.ac-plan-name { font-size: 16px; font-weight: 700; margin: 0; }
.ac-plan-desc { font-size: 14px; color: var(--text-secondary); margin: 4px 0 0; line-height: 20px; }
.ac-plan-price { display: flex; align-items: baseline; gap: 6px; }
.ac-plan-price b { font-size: 36px; line-height: 44px; font-weight: 800; letter-spacing: -.02em; }
.ac-plan-price span { font-size: 14px; color: var(--text-muted); }
.ac-plan-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 20px; color: var(--text-secondary); }
.ac-plan-features li { display: flex; gap: 10px; align-items: flex-start; }
.ac-plan-features svg { color: var(--success-text); flex: none; margin-top: 1px; }

.ac-stat { display: flex; flex-direction: column; gap: var(--space-2); }
.ac-stat-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.ac-stat-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-subtle); color: var(--primary-text); }
.ac-stat-value { font-size: 30px; line-height: 38px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.ac-stat-foot { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.ac-delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: 13px; }
.ac-delta--up { color: var(--success-text); } .ac-delta--down { color: var(--danger-text); }

/* ---------- header & mega menu ---------- */
.ac-header { position: relative; z-index: var(--z-sticky); background: var(--surface); border-bottom: 1px solid var(--border); }
.ac-header-inner { max-width: var(--container-max); margin: 0 auto; min-height: var(--header-height); padding: 0 var(--space-6); display: flex; align-items: center; gap: var(--space-6); }
.ac-header-nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.ac-nav-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 500; color: var(--text-secondary); border-radius: 8px; cursor: pointer; text-decoration: none; transition: color var(--motion-fast), background-color var(--motion-fast); }
.ac-nav-link:hover, .ac-nav-link[aria-expanded="true"], .ac-nav-link[aria-current="page"] { color: var(--primary-text); }
.ac-nav-link:focus-visible { outline: 2px solid var(--focus-border); outline-offset: -2px; }
.ac-nav-link .ac-chev { transition: transform var(--motion-base) var(--ease-standard); }
.ac-nav-link[aria-expanded="true"] .ac-chev { transform: rotate(180deg); }
.ac-header-actions { display: flex; align-items: center; gap: var(--space-2); }
.ac-mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface-raised); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-3); animation: ac-mega-in var(--motion-slow) var(--ease-enter); transform-origin: top; }
@keyframes ac-mega-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.ac-mega-inner { max-width: var(--container-max); margin: 0 auto; padding: var(--space-6); display: grid; grid-template-columns: 1fr 300px; gap: var(--space-6); }
.ac-mega-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.ac-mega-item { display: flex; gap: 14px; padding: 14px; border-radius: var(--radius-md); color: var(--text); text-decoration: none; transition: background-color var(--motion-fast); }
.ac-mega-item:hover, .ac-mega-item:focus-visible { background: var(--primary-subtle); outline: none; }
.ac-mega-item:focus-visible { box-shadow: inset 0 0 0 2px var(--focus-border); }
.ac-mega-item .ac-product-icon { width: 44px; height: 44px; }
.ac-mega-item:hover .ac-product-icon { background: var(--primary); color: var(--on-primary); }
.ac-mega-title { font-weight: 700; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.ac-mega-desc { font-size: 13.5px; line-height: 20px; color: var(--text-secondary); margin-top: 2px; }
.ac-mega-promo { border-radius: var(--radius-lg); padding: var(--space-6); background: var(--brand-panel); color: var(--on-brand-panel); display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4); }
.ac-mega-promo p { margin: 0; color: var(--on-brand-panel-muted); font-size: 14px; line-height: 22px; }
.ac-burger { display: none; }
@media (max-width: 860px) {
  .ac-header-nav, .ac-header-actions .ac-hide-mobile { display: none; }
  .ac-burger { display: grid; margin-left: auto; }
  .ac-mega-inner { grid-template-columns: 1fr; }
  .ac-mega-grid { grid-template-columns: 1fr; }
}

/* footer */
.ac-footer { background: var(--bg-subtle); border-top: 1px solid var(--border); color: var(--text-secondary); }
.ac-footer-inner { max-width: var(--container-max); margin: 0 auto; padding: var(--space-12) var(--space-6); display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--space-8); }
.ac-footer h4 { margin: 0 0 12px; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.ac-footer a { display: block; padding: 5px 0; font-size: 14px; color: var(--text-secondary); text-decoration: none; }
.ac-footer a:hover { color: var(--primary-text); }
.ac-footer-bottom { border-top: 1px solid var(--border); }
.ac-footer-bottom > div { max-width: var(--container-max); margin: 0 auto; padding: var(--space-4) var(--space-6); display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
@media (max-width: 860px) { .ac-footer-inner { grid-template-columns: 1fr 1fr; } .ac-footer-inner > :first-child { grid-column: 1 / -1; } }

/* sidebar */
.ac-sidebar { width: var(--sidebar-width); flex: none; height: 100%; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; transition: width var(--motion-slow) var(--ease-standard); overflow: hidden; }
.ac-sidebar[data-collapsed="true"] { width: var(--sidebar-collapsed); }
.ac-sidebar-head { height: var(--header-height); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--border); gap: 8px; }
.ac-sidebar-nav { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.ac-sidebar-section { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); padding: 16px 12px 6px; white-space: nowrap; }
.ac-sidebar[data-collapsed="true"] .ac-sidebar-section { visibility: hidden; height: 16px; padding: 8px 0 0; }
.ac-side-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-md); color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; border: 0; background: transparent; font-family: inherit; cursor: pointer; width: 100%; text-align: left; transition: background-color var(--motion-fast), color var(--motion-fast); position: relative; }
.ac-side-link:hover { background: var(--bg-muted); color: var(--text); }
.ac-side-link[aria-current="page"] { background: var(--primary-subtle); color: var(--primary-text); font-weight: 600; }
.ac-side-link[aria-current="page"] .ac-icon { color: var(--primary-text); }
.ac-side-link:focus-visible { outline: 2px solid var(--focus-border); outline-offset: -2px; }
.ac-side-link .ac-side-badge { margin-left: auto; }
.ac-sidebar[data-collapsed="true"] .ac-side-label, .ac-sidebar[data-collapsed="true"] .ac-side-badge { display: none; }
.ac-sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }

/* tabs */
.ac-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); position: relative; overflow-x: auto; scrollbar-width: none; }
.ac-tab { position: relative; min-height: 44px; padding: 0 14px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; transition: color var(--motion-fast); }
.ac-tab:hover { color: var(--text); }
.ac-tab[aria-selected="true"] { color: var(--primary-text); }
.ac-tab:focus-visible { outline: 2px solid var(--focus-border); outline-offset: -4px; border-radius: 8px; }
.ac-tab:disabled { color: var(--text-disabled); cursor: not-allowed; }
.ac-tabs-ink { position: absolute; bottom: 0; height: 2px; background: var(--primary); border-radius: 2px 2px 0 0; transition: left var(--motion-base) var(--ease-standard), width var(--motion-base) var(--ease-standard); }
.ac-tabs--pill { border: 0; background: var(--bg-muted); padding: 4px; border-radius: var(--radius-md); display: inline-flex; }
.ac-tabs--pill .ac-tab { min-height: 36px; border-radius: 8px; color: var(--text-secondary); }
.ac-tabs--pill .ac-tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.ac-tabpanel { padding-top: var(--space-4); animation: ac-fade-in var(--motion-base) var(--ease-enter); }

/* breadcrumb */
.ac-breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.ac-breadcrumb a { color: var(--text-muted); text-decoration: none; padding: 2px 0; }
.ac-breadcrumb a:hover { color: var(--primary-text); text-decoration: underline; }
.ac-breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }
.ac-breadcrumb .ac-sep { color: var(--text-disabled); }

/* pagination */
.ac-pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; font-size: 14px; color: var(--text-muted); }
.ac-pages { display: flex; gap: 4px; align-items: center; }
.ac-page { min-width: 40px; height: 40px; padding: 0 8px; border-radius: var(--radius-md); border: 1px solid transparent; background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-secondary); cursor: pointer; display: grid; place-items: center; }
.ac-page:hover { background: var(--bg-muted); color: var(--text); }
.ac-page[aria-current="page"] { background: var(--primary-subtle); color: var(--primary-text); border-color: var(--primary-border); }
.ac-page:disabled { color: var(--text-disabled); cursor: not-allowed; background: none; }
.ac-page:focus-visible { outline: 2px solid var(--focus-border); outline-offset: 1px; }

/* stepper */
.ac-stepper { display: flex; list-style: none; margin: 0; padding: 0; gap: 0; }
.ac-step { flex: 1; display: flex; flex-direction: column; gap: 8px; position: relative; min-width: 0; }
.ac-step-top { display: flex; align-items: center; }
.ac-step-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 14px; font-weight: 700; border: 2px solid var(--border-strong); color: var(--text-muted); background: var(--surface); transition: background-color var(--motion-base), border-color var(--motion-base), color var(--motion-base); }
.ac-step-line { flex: 1; height: 2px; background: var(--border); margin: 0 8px; border-radius: 2px; overflow: hidden; }
.ac-step-line > i { display: block; height: 100%; width: 0; background: var(--primary); transition: width var(--motion-slow) var(--ease-standard); }
.ac-step[data-state="done"] .ac-step-dot { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.ac-step[data-state="done"] .ac-step-line > i { width: 100%; }
.ac-step[data-state="current"] .ac-step-dot { border-color: var(--primary); color: var(--primary-text); box-shadow: var(--shadow-focus); }
.ac-step[data-state="error"] .ac-step-dot { border-color: var(--danger-text); color: var(--danger-text); background: var(--danger-bg); }
.ac-step-label { font-size: 14px; font-weight: 600; color: var(--text); padding-right: 8px; }
.ac-step-desc { font-size: 12.5px; color: var(--text-muted); }
.ac-step[data-state="upcoming"] .ac-step-label { color: var(--text-muted); }

/* ---------- alert / banner ---------- */
.ac-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-subtle); color: var(--text); font-size: 14px; line-height: 20px; }
.ac-alert-icon { flex: none; margin-top: 0; }
.ac-alert-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ac-alert-title { font-weight: 700; }
.ac-alert-desc { color: var(--text-secondary); }
.ac-alert-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ac-alert--success { background: var(--success-bg); border-color: var(--success-border); } .ac-alert--success .ac-alert-icon, .ac-alert--success .ac-alert-title { color: var(--success-text); }
.ac-alert--warning { background: var(--warning-bg); border-color: var(--warning-border); } .ac-alert--warning .ac-alert-icon, .ac-alert--warning .ac-alert-title { color: var(--warning-text); }
.ac-alert--danger { background: var(--danger-bg); border-color: var(--danger-border); } .ac-alert--danger .ac-alert-icon, .ac-alert--danger .ac-alert-title { color: var(--danger-text); }
.ac-alert--info { background: var(--info-bg); border-color: var(--info-border); } .ac-alert--info .ac-alert-icon, .ac-alert--info .ac-alert-title { color: var(--info-text); }
.ac-alert .ac-alert-close { margin: -8px -8px -8px 0; }
.ac-banner { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 16px; min-height: 44px; background: var(--brand-panel); color: var(--on-brand-panel); font-size: 14px; line-height: 20px; flex-wrap: wrap; text-align: center; position: relative; }
.ac-banner a { color: var(--on-brand-panel); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ac-banner .ac-iconbtn { color: var(--on-brand-panel-muted); position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.ac-banner .ac-iconbtn:hover { background: rgba(255,255,255,.1); color: #FFFFFF; }
.ac-banner--subtle { background: var(--primary-subtle); color: var(--text); border-bottom: 1px solid var(--primary-border); }
.ac-banner--subtle a { color: var(--primary-text); }
.ac-banner--subtle .ac-iconbtn { color: var(--text-muted); }

/* ---------- toast ---------- */
.ac-toaster { position: fixed; z-index: var(--z-toast); right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; width: 380px; max-width: calc(100vw - 32px); pointer-events: none; }
.ac-toaster--inline { position: relative; right: auto; bottom: auto; }
.ac-toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 14px 8px 14px 16px; border-radius: var(--radius-md); background: var(--surface-raised); border: 1px solid var(--border); box-shadow: var(--shadow-3); font-size: 14px; line-height: 20px; animation: ac-toast-in var(--motion-slow) var(--ease-enter) both; position: relative; overflow: hidden; }
.ac-toast[data-leaving="true"] { animation: ac-toast-out var(--motion-base) var(--ease-exit) both; }
@keyframes ac-toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes ac-toast-out { to { opacity: 0; transform: translateX(24px); } }
.ac-toast-icon { flex: none; }
.ac-toast--success .ac-toast-icon { color: var(--success-text); } .ac-toast--danger .ac-toast-icon { color: var(--danger-text); } .ac-toast--info .ac-toast-icon { color: var(--info-text); } .ac-toast--warning .ac-toast-icon { color: var(--warning-text); }
.ac-toast-body { flex: 1; min-width: 0; padding-top: 0; }
.ac-toast-title { font-weight: 700; color: var(--text); }
.ac-toast-desc { color: var(--text-secondary); }
.ac-toast .ac-iconbtn { margin-top: -10px; margin-bottom: -10px; }
.ac-toast-timer { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--primary); animation: ac-timer linear forwards; }
@keyframes ac-timer { from { width: 100%; } to { width: 0; } }

/* ---------- modal / drawer ---------- */
.ac-overlay { position: fixed; inset: 0; z-index: var(--z-overlay); background: var(--overlay); animation: ac-fade var(--motion-slow) var(--ease-enter) both; display: grid; place-items: center; padding: var(--space-4); }
.ac-overlay[data-leaving="true"] { animation: ac-fade-out var(--motion-base) var(--ease-exit) both; }
.ac-overlay--contained { position: absolute; }
@keyframes ac-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ac-fade-out { to { opacity: 0; } }
.ac-modal { position: relative; z-index: var(--z-modal); width: 100%; max-width: 520px; max-height: calc(100% - 32px); overflow: auto; background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-4); animation: ac-modal-in var(--motion-slow) var(--ease-enter) both; display: flex; flex-direction: column; }
.ac-overlay[data-leaving="true"] .ac-modal { animation: ac-modal-out var(--motion-base) var(--ease-exit) both; }
@keyframes ac-modal-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ac-modal-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
.ac-modal--sm { max-width: 420px; } .ac-modal--lg { max-width: 720px; }
.ac-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: var(--space-6) var(--space-6) 0; }
.ac-modal-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -.01em; }
.ac-modal-desc { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--text-secondary); }
.ac-modal-body { padding: var(--space-6); font-size: 15px; line-height: 24px; color: var(--text-secondary); }
.ac-modal-foot { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border); background: var(--bg-subtle); border-radius: 0 0 var(--radius-lg) var(--radius-lg); flex-wrap: wrap; }
.ac-confirm-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--danger-bg); color: var(--danger-text); margin-bottom: var(--space-4); }
.ac-drawer-overlay { place-items: stretch end; padding: 0; }
.ac-drawer { position: relative; z-index: var(--z-modal); width: 440px; max-width: 100%; height: 100%; background: var(--surface-raised); box-shadow: var(--shadow-4); display: flex; flex-direction: column; animation: ac-drawer-in var(--motion-slow) var(--ease-enter) both; }
.ac-overlay[data-leaving="true"] .ac-drawer { animation: ac-drawer-out var(--motion-base) var(--ease-exit) both; }
@keyframes ac-drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes ac-drawer-out { to { transform: translateX(100%); } }
.ac-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--space-6); min-height: var(--header-height); border-bottom: 1px solid var(--border); }
.ac-drawer-body { flex: 1; overflow: auto; padding: var(--space-6); }
.ac-drawer-foot { display: flex; justify-content: flex-end; gap: 8px; padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border); }

/* ---------- table ---------- */
.ac-table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.ac-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ac-table-scroll { overflow-x: auto; }
.ac-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.ac-table th { text-align: left; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); background: var(--bg-subtle); padding: 0 16px; height: 44px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ac-table th button { all: unset; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; border-radius: 4px; }
.ac-table th button:hover { color: var(--text); }
.ac-table th button:focus-visible { outline: 2px solid var(--focus-border); outline-offset: 2px; }
.ac-table th[aria-sort="ascending"], .ac-table th[aria-sort="descending"] { color: var(--primary-text); }
.ac-table td { padding: 0 16px; height: 56px; border-bottom: 1px solid var(--border); color: var(--text); }
.ac-table tbody tr { transition: background-color var(--motion-fast); }
.ac-table tbody tr:hover { background: var(--bg-subtle); }
.ac-table tbody tr[aria-selected="true"] { background: var(--primary-subtle); }
.ac-table tbody tr:last-child td { border-bottom: 0; }
.ac-table .ac-num { text-align: right; font-variant-numeric: tabular-nums; }
.ac-table-sub { color: var(--text-muted); font-size: 13px; }
.ac-table-foot { padding: 12px 16px; border-top: 1px solid var(--border); }
.ac-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.ac-list-item { display: flex; align-items: center; gap: var(--space-3); padding: 14px var(--space-4); border-bottom: 1px solid var(--border); min-height: 64px; }
.ac-list-item:last-child { border-bottom: 0; }
.ac-list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-list-title { font-size: 15px; font-weight: 600; color: var(--text); }
.ac-list-sub { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* chart */
.ac-chart { display: flex; flex-direction: column; gap: var(--space-4); }
.ac-chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.ac-chart-legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary); flex-wrap: wrap; }
.ac-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ac-chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ac-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.ac-chart .ac-grid-line { stroke: var(--chart-grid); stroke-width: 1; }
.ac-chart .ac-axis { fill: var(--text-muted); font-size: 11px; font-family: var(--font-sans); }
.ac-chart .ac-bar { fill: var(--chart-1); transition: opacity var(--motion-fast); transform-box: fill-box; transform-origin: bottom; animation: ac-grow var(--motion-slow) var(--ease-enter) both; }
.ac-chart .ac-bar--2 { fill: var(--chart-3); }
.ac-chart .ac-bar:hover { opacity: .8; }
.ac-chart .ac-line { fill: none; stroke: var(--chart-1); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ac-chart .ac-area { fill: var(--chart-1); opacity: .1; }
.ac-chart .ac-pt { fill: var(--surface); stroke: var(--chart-1); stroke-width: 2; }
@keyframes ac-grow { from { transform: scaleY(0); } to { transform: none; } }
.ac-chart-tip { font-size: 12px; fill: var(--text); font-weight: 700; }

/* quota meter */
.ac-quota { display: flex; flex-direction: column; gap: 8px; }
.ac-quota-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.ac-quota-name { font-weight: 600; color: var(--text); }
.ac-quota-num { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.ac-quota-num b { color: var(--text); }
.ac-quota-foot { font-size: 12.5px; color: var(--text-muted); display: flex; gap: 6px; align-items: center; }
.ac-quota[data-level="warning"] .ac-quota-foot { color: var(--warning-text); }
.ac-quota[data-level="danger"] .ac-quota-foot { color: var(--danger-text); }

/* ---------- code ---------- */
.ac-code { background: var(--code-bg); border: 1px solid var(--code-border); border-radius: var(--radius-md); overflow: hidden; color: var(--code-text); font-family: var(--font-mono); }
.ac-code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--code-header); border-bottom: 1px solid var(--code-border); padding: 0 6px 0 4px; min-height: 44px; }
.ac-code-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.ac-code-tab { min-height: 44px; padding: 0 12px; border: 0; background: none; font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--code-comment); cursor: pointer; position: relative; white-space: nowrap; }
.ac-code-tab:hover { color: var(--code-text); }
.ac-code-tab[aria-selected="true"] { color: #FFFFFF; }
.ac-code-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--code-keyword); border-radius: 2px; }
.ac-code-tab:focus-visible { outline: 2px solid var(--code-keyword); outline-offset: -4px; border-radius: 6px; }
.ac-code-title { font-family: var(--font-sans); font-size: 13px; color: var(--code-comment); padding-left: 10px; display: inline-flex; align-items: center; gap: 8px; }
.ac-code-copy { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--code-border); background: transparent; color: var(--code-text); font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background-color var(--motion-fast), color var(--motion-fast), border-color var(--motion-fast); min-width: 88px; justify-content: center; }
.ac-code-copy:hover { background: rgba(255,255,255,.06); }
.ac-code-copy:focus-visible { outline: 2px solid var(--code-keyword); outline-offset: 2px; }
.ac-code-copy[data-copied="true"] { color: var(--code-string); border-color: var(--code-string); }
.ac-code pre { margin: 0; padding: 16px 20px; overflow: auto; font-size: 13.5px; line-height: 22px; tab-size: 2; }
.ac-code pre code { font-family: inherit; }
.ac-code .ln { display: inline-block; width: 2ch; margin-right: 16px; color: var(--code-comment); opacity: .6; text-align: right; user-select: none; }
.tk-k { color: var(--code-keyword); } .tk-s { color: var(--code-string); } .tk-n { color: var(--code-number); } .tk-c { color: var(--code-comment); font-style: italic; } .tk-p { color: var(--code-property); } .tk-f { color: var(--code-function); }
.ac-json-row { display: block; }
.ac-json-toggle { all: unset; cursor: pointer; color: var(--code-comment); width: 14px; display: inline-block; text-align: center; border-radius: 3px; }
.ac-json-toggle:hover { color: var(--code-text); }
.ac-json-toggle:focus-visible { outline: 1px solid var(--code-keyword); }
.ac-json-ellipsis { color: var(--code-comment); background: rgba(255,255,255,.06); border-radius: 4px; padding: 0 4px; }
.ac-response-meta { display: flex; gap: 12px; align-items: center; font-family: var(--font-sans); font-size: 12.5px; color: var(--code-comment); }

/* ---------- empty / error ---------- */
.ac-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); padding: var(--space-12) var(--space-6); max-width: 440px; margin: 0 auto; }
.ac-empty-art { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; background: var(--primary-subtle); color: var(--primary-text); margin-bottom: var(--space-2); position: relative; }
.ac-empty-title { margin: 0; font-size: 18px; line-height: 26px; font-weight: 700; color: var(--text); }
.ac-empty-desc { margin: 0; font-size: 14px; line-height: 22px; color: var(--text-secondary); }
.ac-empty-actions { display: flex; gap: var(--space-2); margin-top: var(--space-2); flex-wrap: wrap; justify-content: center; }
.ac-errorpage { min-height: 480px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--space-4); padding: var(--space-12) var(--space-6); }
.ac-errorpage-code { font-size: 96px; line-height: 1; font-weight: 800; letter-spacing: -.04em; color: var(--primary-text); font-variant-numeric: tabular-nums; }
.ac-errorpage-title { margin: 0; font-size: 28px; line-height: 36px; font-weight: 800; letter-spacing: -.02em; }
.ac-errorpage-desc { margin: 0; max-width: 480px; font-size: 16px; line-height: 26px; color: var(--text-secondary); }
.ac-errorpage-meta { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); background: var(--bg-muted); padding: 4px 10px; border-radius: var(--radius-sm); }

/* ---------- onboarding ---------- */
.ac-beacon { position: relative; display: inline-block; width: 12px; height: 12px; flex: none; }
.ac-beacon::before, .ac-beacon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--primary); }
.ac-beacon::after { animation: ac-ping 1800ms var(--ease-standard) infinite; }
@keyframes ac-ping { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
.ac-beacon-btn { all: unset; cursor: pointer; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.ac-beacon-btn:focus-visible { outline: 2px solid var(--focus-border); }
.ac-tour-layer { position: absolute; inset: 0; z-index: var(--z-tour); pointer-events: none; }
.ac-tour-layer--fixed { position: fixed; }
.ac-spotlight { position: absolute; border-radius: var(--radius-md); box-shadow: 0 0 0 9999px var(--overlay); pointer-events: none; transition: top var(--motion-slow) var(--ease-standard), left var(--motion-slow) var(--ease-standard), width var(--motion-slow) var(--ease-standard), height var(--motion-slow) var(--ease-standard); }
.ac-spotlight::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid var(--primary-300); }
.ac-coach { position: absolute; width: 340px; max-width: calc(100% - 32px); pointer-events: auto; background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-4); padding: var(--space-6); display: flex; flex-direction: column; gap: 12px; transition: top var(--motion-slow) var(--ease-standard), left var(--motion-slow) var(--ease-standard); animation: ac-pop-in var(--motion-slow) var(--ease-enter); }
.ac-coach-step { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary-text); }
.ac-coach-title { margin: 0; font-size: 17px; line-height: 24px; font-weight: 700; color: var(--text); }
.ac-coach-body { margin: 0; font-size: 14px; line-height: 22px; color: var(--text-secondary); }
.ac-coach-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.ac-coach-dots { display: flex; gap: 6px; }
.ac-coach-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--border-strong); transition: width var(--motion-base) var(--ease-standard), background-color var(--motion-base); }
.ac-coach-dots i[data-on="true"] { width: 18px; background: var(--primary); }
.ac-checklist { display: flex; flex-direction: column; gap: var(--space-4); }
.ac-checklist-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.ac-checklist ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ac-check-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-md); border: 1px solid transparent; transition: background-color var(--motion-fast), border-color var(--motion-fast); }
.ac-check-item[data-state="current"] { background: var(--primary-subtle); border-color: var(--primary-border); }
.ac-check-mark { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 2px dashed var(--border-control); color: var(--text-muted); font-size: 13px; font-weight: 700; transition: background-color var(--motion-base), border-color var(--motion-base); }
.ac-check-item[data-state="done"] .ac-check-mark { background: var(--success-solid); border: 2px solid var(--success-solid); color: #FFFFFF; animation: ac-pop var(--motion-slow) var(--ease-enter); }
[data-theme="dark"] .ac-check-item[data-state="done"] .ac-check-mark { color: #0C0C1A; }
.ac-check-item[data-state="current"] .ac-check-mark { border: 2px solid var(--primary); color: var(--primary-text); }
.ac-check-item-main { flex: 1; min-width: 0; }
.ac-check-item-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.ac-check-item[data-state="done"] .ac-check-item-title { color: var(--text-muted); text-decoration: line-through; }
.ac-check-item-desc { font-size: 13px; color: var(--text-muted); }
@keyframes ac-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } 100% { transform: none; } }

/* ---------- motion helpers ---------- */
.ac-reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--motion-slow) var(--ease-enter), transform var(--motion-slow) var(--ease-enter); }
.ac-reveal[data-shown="true"] { opacity: 1; transform: none; }
.ac-stagger > * { animation: ac-fade-in var(--motion-slow) var(--ease-enter) both; }
.ac-stagger > *:nth-child(2) { animation-delay: 80ms; } .ac-stagger > *:nth-child(3) { animation-delay: 160ms; } .ac-stagger > *:nth-child(4) { animation-delay: 240ms; } .ac-stagger > *:nth-child(5) { animation-delay: 320ms; } .ac-stagger > *:nth-child(6) { animation-delay: 400ms; }
.ac-accordion { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.ac-acc-item + .ac-acc-item { border-top: 1px solid var(--border); }
.ac-acc-trigger { all: unset; box-sizing: border-box; width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 0 var(--space-4); font-weight: 600; font-size: 15px; cursor: pointer; color: var(--text); }
.ac-acc-trigger:focus-visible { outline: 2px solid var(--focus-border); outline-offset: -2px; border-radius: var(--radius-md); }
.ac-acc-trigger svg { transition: transform var(--motion-base) var(--ease-standard); color: var(--text-muted); }
.ac-acc-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.ac-acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--motion-base) var(--ease-standard); }
.ac-acc-panel[data-open="true"] { grid-template-rows: 1fr; }
.ac-acc-panel > div { overflow: hidden; }
.ac-acc-panel p { margin: 0; padding: 0 var(--space-4) var(--space-4); font-size: 14px; line-height: 22px; color: var(--text-secondary); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .ac-skel { animation: none !important; background-image: none; }
  .ac-beacon::after { display: none; }
  .ac-spinner { animation: ac-spin 1400ms linear infinite !important; animation-iteration-count: infinite !important; animation-duration: 1400ms !important; }
  .ac-progress--indeterminate .ac-progress-bar { animation: none !important; left: 0; width: 100% !important; opacity: .5; }
  .ac-reveal { opacity: 1; transform: none; }
}
[data-reduced-motion="true"] *, [data-reduced-motion="true"] *::before, [data-reduced-motion="true"] *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
[data-reduced-motion="true"] .ac-skel { animation: none !important; background-image: none; }
[data-reduced-motion="true"] .ac-reveal { opacity: 1; transform: none; }
