:root {
  --ink: #24365f;
  --muted: #657391;
  --line: rgba(45, 68, 112, .13);
  --cyan: #68c8d4;
  --violet: #7565d4;
  --coral: #f2877f;
  --paper: #fff;
  --wash: #f2f7fd;
  --shadow: 0 24px 64px rgba(44, 57, 94, .14);
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; color: var(--ink); font-family: "Trebuchet MS", Verdana, sans-serif; }
a { color: inherit; text-decoration: none; }
.portal-bg { min-height: 100vh; background: radial-gradient(circle at 92% 10%, rgba(104,200,212,.28), transparent 27%), radial-gradient(circle at 2% 0%, rgba(117,101,212,.20), transparent 28%), linear-gradient(145deg, #f9fbff, #edf5fb); }
.brand img { width: 174px; max-height: 72px; object-fit: contain; }
.pill { display: inline-flex; padding: 8px 13px; border-radius: 99px; color: #344f87; background: rgba(104,200,212,.17); font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.brand-btn { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; padding: 0 22px; border: 0; border-radius: 15px; cursor: pointer; color: white; background: linear-gradient(120deg, #536ac8, #7565d4); box-shadow: 0 12px 24px rgba(91,86,188,.22); font-weight: 800; }
.brand-btn--ghost { color: var(--ink); border: 1px solid var(--line); background: white; box-shadow: none; }
.setup-shell { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.setup-card { width: min(100%, 620px); padding: 40px; border: 1px solid var(--line); border-radius: 30px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.setup-card .brand { display: block; margin-bottom: 24px; }
h1 { margin: 14px 0 12px; font-size: clamp(32px, 5vw, 52px); line-height: 1; letter-spacing: -.06em; }
p { color: var(--muted); line-height: 1.7; }
.form-grid { display: grid; gap: 16px; margin-top: 22px; }
.form-grid label { color: var(--ink); font-size: 14px; font-weight: 800; }
.form-grid input, .form-grid select, .form-grid textarea { display: block; width: 100%; min-height: 54px; margin-top: 8px; padding: 0 15px; border: 1px solid var(--line); border-radius: 14px; outline: 0; color: var(--ink); background: white; }
.form-grid input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(104,200,212,.14); }
.form-grid input[type="checkbox"] { display: inline-block; width: 18px; min-height: 18px; margin: 0 8px 0 0; vertical-align: middle; }
.notice { margin: 18px 0; padding: 14px 16px; border-radius: 14px; font-size: 14px; font-weight: 700; }
.notice--error { color: #a84040; background: #fff0ef; }
.notice--success { color: #19704f; background: #e9faf2; }
.auth-shell { display: grid; grid-template-columns: minmax(0,1fr) minmax(420px,560px); min-height: 100vh; }
.auth-art { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; overflow: hidden; padding: 44px clamp(28px,6vw,86px); color: white; background: linear-gradient(145deg, #2e477b, #7063ce 65%, #d679a0); }
.auth-art::after { position: absolute; right: -90px; bottom: -90px; width: 340px; height: 340px; border: 46px solid rgba(255,255,255,.12); border-radius: 50%; content: ""; }
.auth-art .brand img { filter: drop-shadow(0 7px 12px rgba(20,30,70,.22)); }
.auth-art__copy { position: relative; z-index: 1; max-width: 680px; }
.auth-art__copy h1 { max-width: 700px; font-size: clamp(44px,6vw,88px); }
.auth-art__copy p { max-width: 600px; color: rgba(255,255,255,.78); font-size: 18px; }
.auth-points { display: grid; gap: 11px; margin-top: 24px; }
.auth-points span { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.auth-points i { color: #b7f2eb; }
.auth-panel { display: grid; align-items: center; padding: 46px clamp(24px,5vw,68px); background: rgba(255,255,255,.88); }
.auth-panel__inner { width: 100%; max-width: 440px; margin: auto; }
.auth-panel h2 { margin: 12px 0 6px; font-size: 44px; letter-spacing: -.06em; }
.auth-panel p { margin: 0; }
.auth-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 14px; }
.auth-meta a, .auth-switch a { color: #5b63c8; font-weight: 800; }
.auth-switch { margin-top: 20px; text-align: center; font-size: 14px; }
.social-btn { display: flex; min-height: 52px; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); font-weight: 800; }
.social-btn img { width: 20px; height: 20px; }
.divider { display: flex; align-items: center; gap: 10px; margin: 19px 0 2px; color: #8a95aa; font-size: 13px; }
.divider::before,.divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.portal-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px clamp(20px,5vw,72px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.84); backdrop-filter: blur(16px); }
.portal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 14px; font-weight: 800; }
.portal-nav-toggle { display: none; min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; font-weight: 800; }
.portal-main { padding: 34px clamp(20px,5vw,72px) 70px; }
.portal-hero { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.portal-hero h1 { margin-bottom: 7px; font-size: clamp(36px,5vw,62px); }
.portal-hero p { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.stat,.card { padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.9); box-shadow: 0 16px 34px rgba(44,57,94,.07); }
.stat span { color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.stat strong { display: block; margin-top: 8px; font-size: 30px; }
.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; margin-top: 18px; }
.card h3 { margin: 0 0 14px; font-size: 20px; }
.empty { padding: 25px 10px; color: var(--muted); text-align: center; }
.list { display: grid; gap: 12px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border: 0; }
.status { padding: 6px 9px; border-radius: 99px; color: #277159; background: #e5f9ef; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.plan-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.plan-tab { padding: 11px 16px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; color: var(--ink); background: white; font-weight: 800; }
.plan-tab--active { color: white; border-color: transparent; background: linear-gradient(120deg, #536ac8, #7565d4); }
.plan-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.plan-card { display: flex; min-width: 0; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: 0 18px 42px rgba(44,57,94,.08); }
.plan-card--featured { border-color: rgba(117,101,212,.45); box-shadow: 0 20px 46px rgba(91,86,188,.16); }
.plan-card h3 { margin: 14px 0 6px; font-size: 28px; }
.plan-card p { margin: 0; }
.plan-price { display: flex; align-items: end; gap: 7px; margin: 17px 0 4px; }
.plan-price strong { font-size: 38px; letter-spacing: -.07em; }
.plan-price span { padding-bottom: 6px; color: var(--muted); font-size: 13px; }
.plan-yearly { color: #26715b; font-size: 13px; font-weight: 800; }
.plan-features { display: grid; gap: 10px; margin: 22px 0; padding: 0; list-style: none; }
.plan-features li { display: flex; gap: 8px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.plan-features i { margin-top: 4px; color: #36aa87; }
.plan-card .brand-btn { width: 100%; margin-top: auto; }
.checkout-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(300px,.7fr); gap: 20px; }
.summary-line { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.summary-line:last-child { border: 0; }
.summary-total { font-size: 21px; font-weight: 900; }
.admin-price-grid { display: grid; grid-template-columns: 1fr 130px 140px auto; gap: 10px; align-items: end; padding: 14px 0; border-bottom: 1px solid var(--line); }
.admin-price-grid:last-child { border-bottom: 0; }
.admin-price-grid input { width: 100%; min-height: 44px; margin-top: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; }
.content-shell { max-width: 920px; margin: 0 auto; }
.content-shell .card + .card { margin-top: 18px; }
.content-shell h2 { margin: 0 0 9px; font-size: 24px; }
.content-shell ul { display: grid; gap: 9px; color: var(--muted); line-height: 1.6; }
.ticket-form textarea { min-height: 130px; padding-top: 14px; resize: vertical; }
.stack { display: grid; gap: 18px; }
.compact-form { display: flex; flex-wrap: wrap; gap: 9px; align-items: end; margin-top: 12px; }
.compact-form input,.compact-form select { min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; }
.compact-form .brand-btn { min-height: 42px; padding: 0 14px; }
.brand-btn--danger { background: linear-gradient(120deg, #d86565, #ef877c); }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { min-height: 360px; padding: 28px 24px; }
  .auth-art__copy h1 { font-size: 48px; }
  .auth-panel { padding: 36px 24px 48px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .portal-hero { align-items: flex-start; flex-direction: column; }
  .plan-grid { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .brand img { width: 142px; }
  .setup-card { padding: 26px 20px; }
  .auth-art { min-height: 300px; }
  .auth-art__copy h1 { font-size: 38px; }
  .auth-art__copy p { font-size: 15px; }
  .auth-points { display: none; }
  .auth-panel h2 { font-size: 36px; }
  .portal-header { align-items: flex-start; flex-direction: column; }
  .portal-nav { width: 100%; align-items: flex-start; flex-direction: column; }
  .portal-header[x-data] .portal-nav { display: none; }
  .portal-header[x-data] .portal-nav--open { display: flex; }
  .portal-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .stats { grid-template-columns: 1fr; }
  .list-row { align-items: flex-start; flex-direction: column; }
  .portal-hero .brand-btn { width: 100%; }
  .admin-price-grid { grid-template-columns: 1fr; }
}
