:root {
  --primary: #1FB6FF;
  --primary-strong: #0077FF;
  --secondary: #172033;
  --accent: #22C55E;
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --surface-soft: #F8FAFC;
  --surface-subtle: #F1F5F9;
  --surface-glass: rgba(255, 255, 255, .94);
  --sidebar-bg: rgba(255, 255, 255, .96);
  --sidebar-link: #334155;
  --sidebar-preview-bg: #08213C;
  --sidebar-preview-link: #DCEBFF;
  --input-bg: #FFFFFF;
  --hover-bg: #F1F5F9;
  --text: #172033;
  --text-soft: #334155;
  --text-subtle: #475569;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --muted: #64748B;
  --danger: #EF4444;
  --warning: #F59E0B;
  --success: #22C55E;
  --on-primary: #FFFFFF;
  --on-dark: #FFFFFF;
  --google: #4285F4;
  --primary-tint: rgba(31, 182, 255, .10);
  --primary-border: rgba(31, 182, 255, .28);
  --primary-border-strong: rgba(31, 182, 255, .45);
  --primary-ring: rgba(31, 182, 255, .16);
  --primary-ring-soft: rgba(31, 182, 255, .12);
  --primary-shadow: rgba(0, 119, 255, .20);
  --primary-soft: #E0F2FE;
  --primary-soft-text: #0369A1;
  --primary-ink: #0068D9;
  --success-soft: #ECFDF5;
  --success-soft-strong: #DCFCE7;
  --success-border: #BBF7D0;
  --success-text: #047857;
  --success-strong: #16A34A;
  --warning-soft: #FFFBEB;
  --warning-soft-strong: #FEF3C7;
  --warning-border: #FED7AA;
  --warning-text: #B45309;
  --warning-strong: #92400E;
  --danger-soft: #FEF2F2;
  --danger-soft-strong: #FEE2E2;
  --danger-border: #FECACA;
  --danger-text: #DC2626;
  --danger-strong: #B91C1C;
  --unsaved-soft: #FFF7ED;
  --unsaved-text: #C2410C;
  --selection-bg: #EFF6FF;
  --code-card-bg: #13213B;
  --code-card-text: #67E8F9;
  --modal-backdrop: rgba(15, 23, 42, .42);
  --dropdown-shadow: 0 12px 32px rgba(0, 0, 0, .12);
  --dialog-shadow: 0 24px 60px rgba(15, 23, 42, .22);
  --panel-shadow: 0 8px 24px rgba(15, 23, 42, .04);
  --code-card-shadow: 0 24px 42px rgba(19, 33, 59, .22);
  --toggle-bg: #CBD5E1;
  --toggle-knob: #FFFFFF;
  --shadow: 0 16px 42px rgba(23, 32, 51, .09);
  --radius: 8px;
}

/* Webtravel Trip Suite ---------------------------------------------------- */
.wt-public-body, .wt-trip-body, .wt-auth-body, .wt-app-body {
  --primary: #C96545;
  --primary-strong: #B85538;
  --secondary: #071111;
  --accent: #6F8A69;
  --bg: #F7F3EA;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --surface-soft: #F3EEE4;
  --surface-subtle: #EAE3D7;
  --surface-glass: rgba(255, 255, 255, .94);
  --input-bg: #FFFFFF;
  --hover-bg: #F0EADF;
  --text: #18231F;
  --text-soft: #3D4A45;
  --text-subtle: #5F6B66;
  --line: #DED6C9;
  --line-strong: #CFC5B6;
  --muted: #68706F;
  --primary-shadow: rgba(201, 101, 69, .2);
  --primary-ring: rgba(201, 101, 69, .18);
  --primary-tint: rgba(201, 101, 69, .1);
  --shadow: 0 18px 48px rgba(36, 47, 42, .1);
  color: var(--text);
}
.wt-public-body .button.primary, .wt-trip-body .button.primary, .wt-auth-body .button.primary, .wt-app-body .button.primary {
  background: var(--primary);
  box-shadow: 0 10px 24px var(--primary-shadow);
}
.wt-public-body .button.primary:hover, .wt-trip-body .button.primary:hover, .wt-auth-body .button.primary:hover, .wt-app-body .button.primary:hover { background: var(--primary-strong); }
.wt-eyebrow { display: inline-flex; align-items: center; gap: 7px; color: var(--primary); font-size: 12px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.wt-eyebrow svg { width: 15px; height: 15px; }
.wt-back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 24px; color: var(--text-soft); font-weight: 750; }
.wt-form-grid { display: grid; gap: 16px; }
.wt-form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wt-form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wt-form-grid .full { grid-column: 1 / -1; }
.muted { color: var(--muted); }

/* Site public */
.wt-public-body { background: #F7F3EA; }
.wt-public-topbar { width: min(1280px, calc(100% - 48px)); height: 78px; margin: 0 auto; padding: 0; border: 0; background: transparent; }
.wt-public-topbar .public-brand img { width: 178px; height: 62px; object-fit: contain; }
.wt-public-topbar nav { gap: 24px; }
.wt-public-topbar nav > a:not(.button) { color: var(--text); font-weight: 700; }
.wt-public-main { width: 100%; max-width: none; padding: 0; }
.wt-hero { width: min(1280px, calc(100% - 48px)); min-height: 670px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, .86fr) minmax(520px, 1.14fr); gap: 58px; align-items: center; padding: 74px 0 92px; }
.wt-hero-copy h1 { margin: 18px 0 24px; max-width: 650px; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(48px, 5.4vw, 78px); line-height: .98; letter-spacing: -.045em; }
.wt-hero-copy h1 em { color: var(--primary); font-weight: 500; }
.wt-hero-copy > p { max-width: 590px; margin: 0; color: var(--text-subtle); font-size: 19px; line-height: 1.65; }
.wt-hero-actions { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.wt-hero-actions .button { min-height: 50px; padding: 0 21px; }
.wt-trust-row { display: flex; gap: 22px; margin-top: 30px; color: var(--text-subtle); font-size: 13px; flex-wrap: wrap; }
.wt-trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.wt-trust-row svg { width: 16px; color: var(--accent); }
.wt-product-preview { min-height: 450px; position: relative; border: 1px solid rgba(255,255,255,.08); border-radius: 22px; background: #0D1B17; box-shadow: 0 32px 80px rgba(7,17,17,.25); overflow: visible; transform: rotate(1deg); }
.wt-preview-bar { height: 58px; display: flex; align-items: center; gap: 8px; padding: 0 20px; color: white; border-bottom: 1px solid rgba(255,255,255,.1); }
.wt-preview-bar > span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.3); }
.wt-preview-bar strong { margin-left: 10px; font-size: 13px; }
.wt-preview-grid { height: 392px; display: grid; grid-template-columns: 42% 58%; }
.wt-preview-days { display: grid; align-content: start; gap: 9px; padding: 24px 20px; background: #FAF8F2; }
.wt-preview-days b { margin-top: 7px; color: var(--primary); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.wt-preview-days span { padding: 11px 12px; border: 1px solid #E6DFD3; border-radius: 8px; color: #35423D; background: white; font-size: 12px; }
.wt-preview-map { position: relative; overflow: hidden; background-color: #DDE3D8; background-image: linear-gradient(35deg, transparent 48%, rgba(255,255,255,.48) 49%, rgba(255,255,255,.48) 51%, transparent 52%), linear-gradient(120deg, transparent 48%, rgba(96,125,105,.16) 49%, rgba(96,125,105,.16) 51%, transparent 52%); background-size: 86px 70px, 110px 90px; }
.wt-route-line { width: 250px; height: 250px; position: absolute; left: 19%; top: 18%; border: 6px solid var(--primary); border-left-color: transparent; border-bottom-color: transparent; border-radius: 47% 58% 45% 54%; transform: rotate(23deg); }
.wt-pin { width: 28px; height: 28px; position: absolute; color: var(--primary); fill: white; filter: drop-shadow(0 6px 6px rgba(0,0,0,.22)); }
.wt-pin.one { left: 18%; top: 67%; }.wt-pin.two { left: 52%; top: 31%; }.wt-pin.three { right: 15%; top: 59%; }
.wt-floating-budget { min-width: 285px; position: absolute; right: -28px; bottom: -35px; display: grid; grid-template-columns: 46px 1fr; gap: 3px 12px; align-items: center; padding: 18px; border-radius: 14px; background: white; box-shadow: 0 18px 50px rgba(7,17,17,.2); transform: rotate(-1deg); }
.wt-floating-budget > svg { grid-row: span 2; width: 46px; height: 46px; padding: 12px; border-radius: 50%; color: var(--primary); background: var(--primary-tint); }
.wt-floating-budget div { display: flex; justify-content: space-between; gap: 14px; }.wt-floating-budget span, .wt-floating-budget small { color: var(--muted); }.wt-floating-budget strong { font-size: 19px; }
.wt-logo-strip { padding: 24px max(24px, calc((100% - 1280px)/2)); display: flex; justify-content: space-between; gap: 25px; color: #D7DFDA; background: #071111; text-transform: uppercase; letter-spacing: .08em; flex-wrap: wrap; }
.wt-logo-strip span { color: #90A099; font-size: 11px; }.wt-logo-strip strong { font-family: Georgia, serif; font-size: 16px; }
.wt-section { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 110px 0; }
.wt-section-head { max-width: 700px; margin: 0 auto 46px; text-align: center; }
.wt-section-head.split { max-width: none; display: flex; align-items: end; justify-content: space-between; text-align: left; }
.wt-section-head h2, .wt-final-cta h2, .wt-template-itinerary h2 { margin: 12px 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(38px, 4.5vw, 57px); line-height: 1.05; letter-spacing: -.03em; }
.wt-section-head p { margin: 0; color: var(--text-subtle); font-size: 17px; }
.wt-section-head > a { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-weight: 750; }
.wt-feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.wt-feature-grid article { min-height: 245px; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.55); }
.wt-feature-grid article > svg { width: 47px; height: 47px; padding: 12px; border-radius: 50%; color: var(--primary); background: white; box-shadow: 0 8px 24px rgba(25,35,31,.08); }
.wt-feature-grid h3 { margin: 36px 0 10px; font-family: Georgia, serif; font-size: 23px; }.wt-feature-grid p { margin: 0; color: var(--text-subtle); line-height: 1.6; }
.wt-guides-section { border-top: 1px solid var(--line); }
.wt-guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.wt-guide-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 14px 40px rgba(36,47,42,.07); }
.wt-guide-cover, .wt-trip-card-cover, .wt-trip-list-cover, .wt-upcoming-visual { display: grid; place-items: center; position: relative; color: white; background: linear-gradient(145deg, #70866F, #1E3A31); }
.wt-guide-cover { height: 205px; }.wt-guide-cover.variant-2, .wt-trip-card-cover.variant-2, .wt-trip-list-cover.variant-2 { background: linear-gradient(145deg, #6D8B91, #1F3D48); }.wt-guide-cover.variant-3, .wt-trip-card-cover.variant-3, .wt-trip-list-cover.variant-3 { background: linear-gradient(145deg, #C9855E, #6C3B2D); }
.wt-guide-cover > svg { width: 76px; height: 76px; opacity: .86; }.wt-guide-cover > span { position: absolute; right: 14px; top: 14px; padding: 6px 9px; border-radius: 20px; background: rgba(7,17,17,.72); font-size: 12px; font-weight: 800; }
.wt-guide-card > div:last-child { padding: 23px; }.wt-guide-card > div > span { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.wt-guide-card h3 { margin: 9px 0; font-family: Georgia, serif; font-size: 24px; }.wt-guide-card p { min-height: 48px; color: var(--text-subtle); line-height: 1.55; }.wt-guide-card a { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-weight: 800; }
.wt-final-cta { width: min(1180px, calc(100% - 48px)); margin: 0 auto 100px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 56px; border-radius: 18px; color: white; background: #071111; }
.wt-final-cta h2 { max-width: 750px; margin-bottom: 16px; }.wt-final-cta p { margin: 0; color: #ABBAB3; font-size: 16px; }.wt-final-cta .button { flex: 0 0 auto; }
.wt-public-footer { min-height: 130px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 25px max(24px, calc((100% - 1180px)/2)); color: #AAB9B2; background: #071111; }.wt-public-footer img { width: 150px; filter: brightness(0) invert(1); }.wt-public-footer a { color: white; }

/* Auth */
.wt-auth-body { background: radial-gradient(circle at 18% 14%, rgba(111,138,105,.22), transparent 32%), #F7F3EA; }
.wt-auth-body .auth-logo { width: 320px; }
.wt-auth-body .auth-points svg { color: var(--primary); border-color: rgba(201,101,69,.35); }
.wt-auth-body .auth-card { border-radius: 14px; }
.wt-magic-link { margin-top: 18px; color: var(--text-soft); }.wt-magic-link summary { cursor: pointer; font-weight: 750; text-align: center; }.wt-magic-link form { margin-top: 14px; }

/* Dashboard et listes */
.wt-sidebar { background: #0A1713; border-right: 0; }.wt-sidebar .nav-list a { color: #C6D1CC; }.wt-sidebar .nav-list a:hover, .wt-sidebar .nav-list a.active { color: white; background: rgba(255,255,255,.09); }.wt-sidebar .nav-label { color: #6F8179; }.wt-sidebar .sidebar-user { color: white; border-color: rgba(255,255,255,.09); }.wt-sidebar .sidebar-user small { color: #91A198; }.wt-sidebar-logo img { width: 165px; filter: brightness(0) invert(1); }
.wt-topbar { background: rgba(247,243,234,.92); backdrop-filter: blur(14px); }.wt-main-content { width: min(1300px, 100%); margin: 0 auto; padding: 38px 42px 60px; }
.wt-dashboard-welcome, .wt-page-head, .wt-journal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; margin-bottom: 30px; }.wt-dashboard-welcome h1, .wt-page-head h1 { margin: 8px 0; font-family: Georgia, serif; font-size: 42px; letter-spacing: -.03em; }.wt-dashboard-welcome p, .wt-page-head p { margin: 0; color: var(--text-subtle); font-size: 16px; }
.wt-trip-metrics { grid-template-columns: repeat(4, 1fr); margin-bottom: 26px; }.wt-trip-metrics .metric { background: rgba(255,255,255,.72); }.wt-trip-metrics .metric > svg { color: var(--primary); }.wt-trip-metrics .metric strong { font-family: Georgia, serif; }.wt-next-departure { border-color: rgba(201,101,69,.35) !important; }
.wt-upcoming-trip { min-height: 330px; display: grid; grid-template-columns: 43% 57%; margin-bottom: 38px; overflow: hidden; border-radius: 16px; background: #0B1814; box-shadow: 0 22px 52px rgba(7,17,17,.15); }.wt-upcoming-visual { background: linear-gradient(160deg, #789173, #1B352C); }.wt-upcoming-visual > svg { width: 120px; height: 120px; opacity: .8; }.wt-upcoming-visual > span { position: absolute; left: 24px; bottom: 22px; font-weight: 800; }.wt-upcoming-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 42px 50px; color: white; }.wt-upcoming-copy h2 { margin: 10px 0; font-family: Georgia, serif; font-size: 42px; }.wt-upcoming-copy > p { color: #B6C3BD; line-height: 1.6; }.wt-upcoming-copy .wt-template-meta { margin: 8px 0 25px; color: #CED7D2; }
.wt-dashboard-section { margin-top: 32px; }.wt-dashboard-section .panel-title h2 { margin: 5px 0 0; font-family: Georgia, serif; font-size: 32px; }
.wt-trip-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }.wt-trip-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: white; transition: transform .2s ease, box-shadow .2s ease; }.wt-trip-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }.wt-trip-card-cover { height: 145px; }.wt-trip-card-cover > svg { width: 56px; height: 56px; }.wt-trip-card-cover .pill, .wt-trip-list-cover .pill { position: absolute; right: 12px; top: 12px; color: white; background: rgba(7,17,17,.7); }.wt-trip-card > div:last-child { padding: 18px; }.wt-trip-card > div > span, .wt-trip-list-body > span { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.wt-trip-card h3 { margin: 7px 0; font-family: Georgia, serif; font-size: 22px; }.wt-trip-card p { margin: 0 0 14px; color: var(--text-subtle); }.wt-trip-card > div > div { display: flex; gap: 14px; color: var(--muted); }.wt-trip-card small { display: inline-flex; gap: 5px; align-items: center; }.wt-trip-card small svg { width: 14px; }
.wt-empty-trip { min-height: 350px; border: 1px dashed var(--line-strong); border-radius: 16px; background: rgba(255,255,255,.45); }.wt-empty-trip > svg { width: 58px; height: 58px; color: var(--primary); }.wt-empty-trip > div { display: flex; gap: 10px; margin-top: 12px; }
.wt-trip-list-grid { display: grid; gap: 18px; }.wt-trip-list-card { display: grid; grid-template-columns: 210px 1fr auto; min-height: 185px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; }.wt-trip-list-cover { min-height: 185px; }.wt-trip-list-cover > svg { width: 64px; height: 64px; }.wt-trip-list-body { padding: 25px 28px; }.wt-trip-list-body h2 { margin: 7px 0; font-family: Georgia, serif; font-size: 27px; }.wt-trip-list-body h2 a { color: var(--text); }.wt-trip-list-body p { max-width: 680px; margin: 0; color: var(--text-subtle); line-height: 1.5; }.wt-trip-list-meta { display: flex; gap: 18px; margin-top: 20px; color: var(--muted); flex-wrap: wrap; }.wt-trip-list-meta span { display: inline-flex; align-items: center; gap: 6px; }.wt-trip-list-meta svg { width: 15px; }.wt-trip-list-actions { display: flex; align-items: center; gap: 6px; padding: 22px; }
.wt-create-trip-form { max-width: 980px; display: grid; gap: 18px; }.wt-form-section { padding: 28px; }.wt-form-step { display: grid; grid-template-columns: 44px 1fr; gap: 15px; margin-bottom: 24px; }.wt-form-step > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--primary); font-weight: 850; }.wt-form-step h2 { margin: 0; font-family: Georgia, serif; font-size: 26px; }.wt-form-step p { margin: 5px 0 0; color: var(--muted); }.wt-form-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Espace voyage */
.wt-trip-body { min-height: 100vh; background: #F7F3EA; }.wt-trip-topbar { height: 66px; display: grid; grid-template-columns: 220px 1fr auto; align-items: center; gap: 20px; padding: 0 28px; color: white; background: #071111; }.wt-trip-brand img { width: 155px; height: 58px; object-fit: contain; filter: brightness(0) invert(1); }.wt-trip-topbar nav a { display: inline-flex; align-items: center; gap: 7px; color: #C8D4CE; font-weight: 700; }.wt-trip-user { display: flex; align-items: center; gap: 10px; }.wt-trip-heading { min-height: 126px; display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 22px max(26px, calc((100% - 1440px)/2)); background: #0D1B17; color: white; }.wt-trip-heading h1 { margin: 5px 0; font-family: Georgia, serif; font-size: 33px; }.wt-trip-heading p { margin: 0; color: #AAB8B2; }.wt-trip-heading-actions { display: flex; gap: 9px; }.wt-trip-heading .button.secondary { color: white; border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.06); }
.wt-trip-tabs { min-height: 58px; display: flex; gap: 6px; padding: 0 max(26px, calc((100% - 1440px)/2)); border-bottom: 1px solid var(--line); background: white; overflow-x: auto; }.wt-trip-tabs a { min-width: max-content; display: inline-flex; align-items: center; gap: 7px; padding: 0 17px; color: var(--text-soft); border-bottom: 3px solid transparent; font-weight: 750; }.wt-trip-tabs a.active { color: var(--primary); border-color: var(--primary); }.wt-trip-tabs svg { width: 16px; }
.wt-trip-main { width: min(1440px, 100%); margin: 0 auto; padding: 24px 26px 60px; }.wt-planner-summary { min-height: 72px; display: flex; align-items: center; gap: 34px; padding: 14px 19px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.74); }.wt-planner-summary > div { display: grid; padding-right: 30px; border-right: 1px solid var(--line); }.wt-planner-summary strong { font-family: Georgia, serif; font-size: 21px; }.wt-planner-summary span { color: var(--muted); font-size: 11px; }.wt-planner-summary form { margin-left: auto; }
.wt-day-tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: thin; }.wt-day-tabs a { min-width: 112px; display: grid; gap: 3px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: white; }.wt-day-tabs a > span { color: var(--primary); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }.wt-day-tabs small { color: var(--muted); }.wt-day-tabs a.active { color: white; border-color: #071111; background: #071111; }.wt-day-tabs a.active > span, .wt-day-tabs a.active small { color: #BECBC5; }
.wt-planner-grid { display: grid; grid-template-columns: minmax(390px, 44%) minmax(420px, 56%); min-height: 650px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 15px 44px rgba(36,47,42,.08); }.wt-itinerary-panel { max-height: calc(100vh - 245px); overflow-y: auto; padding: 22px; }.wt-itinerary-panel .panel-title h2 { margin: 5px 0; font-family: Georgia, serif; font-size: 28px; }.wt-add-step { position: relative; }.wt-add-step > summary { list-style: none; }.wt-add-step > summary::-webkit-details-marker { display: none; }.wt-step-form { width: min(430px, calc(100vw - 44px)); position: absolute; right: 0; z-index: 600; display: grid; gap: 12px; padding: 20px; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }.wt-step-form textarea { min-height: 70px; }
.wt-step-list { display: grid; gap: 0; }.wt-step-card { min-height: 92px; display: grid; grid-template-columns: 24px 30px 42px 1fr auto; gap: 10px; align-items: center; padding: 13px 8px; border: 1px solid var(--line); border-radius: 11px; background: white; }.wt-step-card.is-dragging { opacity: .4; border-color: var(--primary); }.wt-drag-handle { padding: 0; border: 0; color: var(--muted); background: transparent; cursor: grab; }.wt-step-index { font-family: Georgia, serif; color: var(--muted); font-size: 17px; }.wt-step-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: var(--primary-tint); }.wt-step-copy { min-width: 0; }.wt-step-copy > span { color: var(--primary); font-size: 10px; font-weight: 850; text-transform: uppercase; }.wt-step-copy h3 { margin: 3px 0; font-size: 16px; }.wt-step-copy p { margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.wt-route-segment { min-height: 31px; display: flex; align-items: center; gap: 9px; margin-left: 70px; color: var(--muted); font-size: 10px; text-transform: uppercase; }.wt-route-segment svg { width: 14px; }
.wt-map-panel { min-width: 0; position: relative; border-left: 1px solid var(--line); }.wt-map { width: 100%; height: 100%; min-height: 650px; background: #DDE3D8; }.wt-map-legend { position: absolute; z-index: 500; left: 16px; bottom: 16px; padding: 9px 12px; border-radius: 8px; color: var(--text-soft); background: rgba(255,255,255,.94); box-shadow: 0 5px 18px rgba(0,0,0,.12); }.wt-map-legend span { display: flex; align-items: center; gap: 6px; font-size: 11px; }.wt-map-marker { border: 0; background: transparent; }.wt-map-marker span { width: 34px; height: 34px; display: grid; place-items: center; border: 3px solid white; border-radius: 50% 50% 50% 0; color: white; background: var(--primary); box-shadow: 0 5px 12px rgba(0,0,0,.28); font-weight: 850; transform: rotate(-45deg); }.wt-map-marker span::first-letter { transform: rotate(45deg); }.leaflet-popup-content { display: grid; gap: 4px; }.leaflet-popup-content span { color: #64706B; }
.wt-empty-day { min-height: 300px; }

/* Budget, carnet, partage, réglages */
.wt-budget-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }.wt-budget-overview article { display: grid; gap: 6px; padding: 23px; border: 1px solid var(--line); border-radius: 12px; background: white; }.wt-budget-overview span, .wt-budget-overview small { color: var(--muted); }.wt-budget-overview strong { font-family: Georgia, serif; font-size: 33px; }.wt-progress { height: 7px; margin: 5px 0; border-radius: 10px; background: var(--surface-subtle); overflow: hidden; }.wt-progress span { height: 100%; display: block; background: var(--primary); }
.wt-budget-grid { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }.wt-expense-list { display: grid; }.wt-expense-list article { display: grid; grid-template-columns: 42px 1fr 90px 100px 38px; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }.wt-expense-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: var(--primary-tint); }.wt-expense-list article > div:nth-child(2) { display: grid; gap: 3px; }.wt-expense-list span, .wt-expense-list time { color: var(--muted); font-size: 12px; }.wt-expense-list b { text-align: right; }.wt-expense-form { position: sticky; top: 18px; }
.wt-journal-head h2, .wt-share-intro h2 { margin: 6px 0; font-family: Georgia, serif; font-size: 34px; }.wt-journal-head p, .wt-share-intro p { margin: 0; color: var(--muted); }.wt-journal-grid { display: grid; grid-template-columns: 1fr 390px; gap: 24px; align-items: start; }.wt-journal-timeline { display: grid; gap: 18px; }.wt-journal-entry { display: grid; grid-template-columns: 78px 1fr; gap: 16px; }.wt-journal-date { display: grid; align-content: start; padding-top: 13px; text-align: center; }.wt-journal-date strong { font-family: Georgia, serif; font-size: 31px; }.wt-journal-date span { color: var(--muted); font-size: 11px; }.wt-journal-entry-card { padding: 25px; border: 1px solid var(--line); border-radius: 14px; background: white; }.wt-journal-entry-card h2 { margin: 9px 0; font-family: Georgia, serif; font-size: 28px; }.wt-journal-entry-card > p { color: var(--text-soft); font-size: 15px; line-height: 1.7; }.wt-journal-entry-card footer { display: flex; justify-content: space-between; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); }.wt-journal-entry-card footer span { display: inline-flex; align-items: center; gap: 6px; }.wt-journal-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }.wt-journal-photos img { width: 100%; height: 210px; border-radius: 10px; object-fit: cover; }.wt-journal-form { position: sticky; top: 18px; }
.wt-share-intro { display: flex; justify-content: space-between; align-items: center; padding: 25px 30px; margin-bottom: 18px; border-radius: 14px; color: white; background: #0A1713; }.wt-share-intro > svg { width: 64px; height: 64px; color: var(--accent); }.wt-share-result { justify-content: space-between; margin-bottom: 18px; }.wt-share-result > div { display: grid; gap: 4px; }.wt-share-result code { word-break: break-all; }.wt-share-grid, .wt-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr); gap: 18px; align-items: start; }.wt-share-list { display: grid; }.wt-share-list article { display: flex; justify-content: space-between; gap: 18px; padding: 15px 0; border-top: 1px solid var(--line); }.wt-share-list article > div { display: grid; gap: 4px; }.wt-share-list span, .wt-share-list small { color: var(--muted); }.wt-settings-grid > aside { display: grid; gap: 18px; }.wt-settings-actions { display: grid; gap: 10px; margin-top: 16px; }.wt-danger-zone { border-color: var(--danger-border); }.wt-danger-zone p { color: var(--muted); }

/* Templates et partage public */
.wt-template-hero { width: min(1180px, calc(100% - 48px)); margin: 70px auto 0; display: grid; grid-template-columns: 1fr 380px; gap: 70px; align-items: center; }.wt-template-hero h1, .wt-shared-hero h1 { margin: 13px 0; font-family: Georgia, serif; font-size: clamp(46px, 6vw, 72px); line-height: 1; letter-spacing: -.04em; }.wt-template-hero > div > p { max-width: 680px; color: var(--text-subtle); font-size: 18px; line-height: 1.65; }.wt-template-meta { display: flex; gap: 20px; color: var(--text-soft); flex-wrap: wrap; }.wt-template-meta span { display: inline-flex; align-items: center; gap: 7px; }.wt-template-meta svg { width: 17px; color: var(--primary); }.wt-import-card { display: grid; gap: 15px; padding: 30px; border-radius: 16px; color: white; background: #0A1713; box-shadow: 0 25px 60px rgba(7,17,17,.2); }.wt-import-card > svg { width: 47px; height: 47px; color: var(--primary); }.wt-import-card h2 { margin: 0; font-family: Georgia, serif; font-size: 29px; }.wt-import-card p { margin: 0; color: #ABB9B2; line-height: 1.55; }.wt-import-card .field input { color: #18231F; background: white; }.wt-template-itinerary { width: min(900px, calc(100% - 48px)); margin: 110px auto; }.wt-template-days { display: grid; gap: 0; }.wt-template-days article, .wt-shared-days article { display: grid; grid-template-columns: 60px 1fr; gap: 22px; padding-bottom: 34px; }.wt-day-number { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--primary); font-family: Georgia, serif; font-size: 19px; }.wt-template-days article > div:last-child, .wt-shared-days article > div:last-child { padding: 5px 0 28px; border-bottom: 1px solid var(--line); }.wt-template-days h3, .wt-shared-days h3 { margin: 0 0 15px; font-family: Georgia, serif; font-size: 25px; }.wt-template-days p { display: grid; grid-template-columns: 20px 1fr; gap: 2px 9px; }.wt-template-days p svg { grid-row: span 2; width: 17px; color: var(--primary); }.wt-template-days p span { color: var(--muted); font-size: 12px; }
.wt-public-state { width: min(550px, calc(100% - 48px)); min-height: 620px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }.wt-public-state > svg { width: 66px; height: 66px; color: var(--primary); }.wt-public-state h1 { margin: 18px 0 8px; font-family: Georgia, serif; font-size: 43px; }.wt-public-state p { color: var(--muted); }.wt-password-form { width: 100%; max-width: 340px; margin-top: 18px; }
.wt-shared-hero { min-height: 390px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 70px 24px; text-align: center; color: white; background: linear-gradient(145deg, rgba(7,17,17,.75), rgba(7,17,17,.94)), linear-gradient(145deg, #758D70, #C96545); }.wt-shared-hero > p { max-width: 700px; color: #CAD4CF; font-size: 18px; }.wt-shared-hero > div { display: flex; gap: 22px; margin-top: 15px; color: #D8E0DC; }.wt-shared-hero > div span { display: inline-flex; gap: 7px; align-items: center; }.wt-shared-grid { width: min(1100px, calc(100% - 48px)); display: grid; grid-template-columns: 1fr 380px; gap: 45px; margin: 70px auto 110px; }.wt-shared-days > h2, .wt-shared-journal > h2 { margin: 0 0 28px; font-family: Georgia, serif; font-size: 34px; }.wt-shared-step { display: flex; gap: 10px; }.wt-shared-step > svg { width: 17px; color: var(--primary); }.wt-shared-step > span { display: grid; }.wt-shared-step small { color: var(--muted); }.wt-shared-journal article { padding: 20px; margin-bottom: 13px; border: 1px solid var(--line); border-radius: 12px; background: white; }.wt-shared-journal time { color: var(--primary); font-size: 11px; font-weight: 800; }.wt-shared-journal h3 { margin: 6px 0; font-family: Georgia, serif; }.wt-shared-journal p { color: var(--text-soft); line-height: 1.55; }

/* Impression */
.wt-print-body { color: #17211D; background: #E7E3DC; }.wt-print-toolbar { width: 210mm; display: flex; justify-content: flex-end; gap: 8px; margin: 20px auto; }.wt-print-document { width: 210mm; min-height: 297mm; margin: 0 auto 30px; padding: 18mm; background: white; box-shadow: 0 10px 36px rgba(0,0,0,.12); }.wt-print-cover { min-height: 210px; padding: 25px; color: white; background: #0B1814; }.wt-print-cover img { width: 150px; filter: brightness(0) invert(1); }.wt-print-cover > span { display: block; margin-top: 30px; color: #C96545; font-size: 12px; font-weight: 800; text-transform: uppercase; }.wt-print-cover h1 { margin: 7px 0; font-family: Georgia, serif; font-size: 42px; }.wt-print-cover p { color: #BCC8C2; }.wt-print-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin: 22px 0; border: 1px solid #DDD7CE; }.wt-print-summary div { display: grid; padding: 16px; border-right: 1px solid #DDD7CE; }.wt-print-summary div:last-child { border: 0; }.wt-print-summary strong { font-family: Georgia, serif; font-size: 24px; }.wt-print-summary span { color: #68736E; }.wt-print-day { break-inside: avoid; margin: 28px 0; }.wt-print-day header { display: grid; grid-template-columns: 1fr auto; padding-bottom: 10px; border-bottom: 2px solid #C96545; }.wt-print-day header span { grid-column: 1 / -1; color: #C96545; font-size: 11px; font-weight: 800; text-transform: uppercase; }.wt-print-day h2 { margin: 4px 0; font-family: Georgia, serif; }.wt-print-day ol { padding-left: 20px; }.wt-print-day li { display: flex; justify-content: space-between; gap: 18px; margin: 12px 0; }.wt-print-day li div { display: grid; }.wt-print-day li span { color: #65716C; }.wt-print-entry { break-inside: avoid; margin: 34px 0; padding-bottom: 24px; border-bottom: 1px solid #DDD7CE; }.wt-print-entry time { color: #C96545; font-weight: 800; }.wt-print-entry h2 { font-family: Georgia, serif; font-size: 30px; }.wt-print-entry p { line-height: 1.7; }.wt-print-entry img { max-width: 100%; max-height: 430px; object-fit: contain; }

@media print {
  .wt-print-toolbar { display: none; }
  .wt-print-body { background: white; }
  .wt-print-document { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
}

@media (max-width: 1100px) {
  .wt-hero { grid-template-columns: 1fr; }.wt-product-preview { max-width: 740px; width: 100%; margin: 0 auto; }.wt-feature-grid { grid-template-columns: repeat(2, 1fr); }.wt-guide-grid { grid-template-columns: repeat(2, 1fr); }.wt-trip-metrics { grid-template-columns: repeat(2, 1fr); }.wt-trip-card-grid { grid-template-columns: repeat(2, 1fr); }.wt-planner-grid { grid-template-columns: 1fr; }.wt-itinerary-panel { max-height: none; }.wt-map-panel { border-left: 0; border-top: 1px solid var(--line); }.wt-map { height: 520px; min-height: 520px; }.wt-budget-grid, .wt-journal-grid { grid-template-columns: 1fr; }.wt-expense-form, .wt-journal-form { position: static; }.wt-template-hero { grid-template-columns: 1fr; }.wt-import-card { max-width: 480px; }.wt-shared-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .wt-public-topbar { width: calc(100% - 28px); height: auto; min-height: 68px; }.wt-public-topbar nav > a:not(.button) { display: none; }.wt-public-topbar .public-brand img { width: 145px; }.wt-hero { width: calc(100% - 30px); min-height: 0; padding: 55px 0 75px; }.wt-hero-copy h1 { font-size: 47px; }.wt-hero-copy > p { font-size: 16px; }.wt-product-preview { min-height: 350px; transform: none; }.wt-preview-grid { height: 300px; grid-template-columns: 47% 53%; }.wt-preview-days { padding: 13px 10px; }.wt-preview-days span { padding: 7px; }.wt-floating-budget { right: 8px; bottom: -47px; }.wt-logo-strip { justify-content: flex-start; }.wt-section { width: calc(100% - 30px); padding: 75px 0; }.wt-section-head.split { display: grid; gap: 15px; }.wt-feature-grid, .wt-guide-grid { grid-template-columns: 1fr; }.wt-final-cta { width: calc(100% - 30px); display: grid; padding: 35px 25px; }.wt-public-footer { align-items: flex-start; flex-direction: column; }
  .wt-main-content { padding: 28px 16px 45px; }.wt-dashboard-welcome, .wt-page-head, .wt-journal-head { align-items: flex-start; flex-direction: column; }.wt-dashboard-welcome h1, .wt-page-head h1 { font-size: 35px; }.wt-trip-metrics { grid-template-columns: 1fr 1fr; }.wt-upcoming-trip { grid-template-columns: 1fr; }.wt-upcoming-visual { min-height: 170px; }.wt-upcoming-copy { padding: 28px 24px; }.wt-upcoming-copy h2 { font-size: 34px; }.wt-trip-card-grid { grid-template-columns: 1fr; }.wt-trip-list-card { grid-template-columns: 1fr; }.wt-trip-list-cover { min-height: 160px; }.wt-trip-list-actions { justify-content: flex-end; }.wt-form-grid.two, .wt-form-grid.three { grid-template-columns: 1fr; }.wt-form-actions { flex-direction: column-reverse; }.wt-form-actions .button { width: 100%; }
  .wt-trip-topbar { grid-template-columns: 145px 1fr; padding: 0 14px; }.wt-trip-topbar nav { display: none; }.wt-trip-user > span:first-child { display: none; }.wt-trip-heading { align-items: flex-start; flex-direction: column; padding: 22px 16px; }.wt-trip-heading-actions { width: 100%; }.wt-trip-heading-actions .button { flex: 1; }.wt-trip-tabs { padding: 0 10px; }.wt-trip-main { padding: 16px 12px 40px; }.wt-planner-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }.wt-planner-summary > div { padding: 0; border: 0; }.wt-planner-summary form { grid-column: 1 / -1; margin: 4px 0 0; }.wt-planner-summary form .button { width: 100%; }.wt-planner-grid { grid-template-columns: minmax(0, 1fr); }.wt-itinerary-panel { padding: 14px; }.wt-step-card { grid-template-columns: 18px 25px 34px 1fr auto; gap: 6px; }.wt-map, .wt-map-panel { min-height: 430px; height: 430px; }
  .wt-budget-overview { grid-template-columns: 1fr; }.wt-budget-grid, .wt-journal-grid, .wt-share-grid, .wt-settings-grid { grid-template-columns: 1fr; }.wt-expense-list article { grid-template-columns: 40px 1fr auto; }.wt-expense-list time { display: none; }.wt-expense-list b { grid-column: 3; grid-row: 1; }.wt-expense-list form { grid-column: 3; }.wt-journal-entry { grid-template-columns: 1fr; }.wt-journal-date { display: flex; gap: 7px; align-items: baseline; text-align: left; }.wt-share-intro > svg { display: none; }.wt-share-result { align-items: flex-start; flex-direction: column; }
  .wt-template-hero { width: calc(100% - 30px); margin-top: 45px; gap: 35px; }.wt-template-hero h1, .wt-shared-hero h1 { font-size: 46px; }.wt-template-itinerary { width: calc(100% - 30px); margin: 75px auto; }.wt-shared-grid { width: calc(100% - 30px); }.wt-shared-hero > div { align-items: center; flex-direction: column; }.wt-print-document, .wt-print-toolbar { width: 100%; }
}

[data-theme="dark"] {
  --bg: #0F172A;
  --surface: #1E293B;
  --surface-raised: #243449;
  --surface-soft: #111827;
  --surface-subtle: #334155;
  --surface-glass: rgba(30, 41, 59, .94);
  --sidebar-bg: rgba(15, 23, 42, .96);
  --sidebar-link: #CBD5E1;
  --sidebar-preview-bg: #06172B;
  --sidebar-preview-link: #DCEBFF;
  --input-bg: #0F172A;
  --hover-bg: #334155;
  --text: #E2E8F0;
  --text-soft: #CBD5E1;
  --text-subtle: #94A3B8;
  --line: #334155;
  --line-strong: #475569;
  --muted: #94A3B8;
  --primary-tint: rgba(56, 189, 248, .14);
  --primary-border: rgba(56, 189, 248, .26);
  --primary-border-strong: rgba(56, 189, 248, .42);
  --primary-ring: rgba(56, 189, 248, .20);
  --primary-ring-soft: rgba(56, 189, 248, .16);
  --primary-soft: rgba(14, 165, 233, .18);
  --primary-soft-text: #BAE6FD;
  --primary-ink: #7DD3FC;
  --success-soft: rgba(34, 197, 94, .14);
  --success-soft-strong: rgba(34, 197, 94, .20);
  --success-border: rgba(74, 222, 128, .34);
  --success-text: #86EFAC;
  --success-strong: #4ADE80;
  --warning-soft: rgba(245, 158, 11, .14);
  --warning-soft-strong: rgba(245, 158, 11, .20);
  --warning-border: rgba(251, 191, 36, .34);
  --warning-text: #FCD34D;
  --warning-strong: #FBBF24;
  --danger-soft: rgba(239, 68, 68, .14);
  --danger-soft-strong: rgba(239, 68, 68, .20);
  --danger-border: rgba(248, 113, 113, .34);
  --danger-text: #FCA5A5;
  --danger-strong: #F87171;
  --unsaved-soft: rgba(245, 158, 11, .14);
  --unsaved-text: #FDBA74;
  --selection-bg: rgba(59, 130, 246, .18);
  --modal-backdrop: rgba(2, 6, 23, .68);
  --dropdown-shadow: 0 12px 32px rgba(0, 0, 0, .34);
  --dialog-shadow: 0 24px 60px rgba(0, 0, 0, .42);
  --panel-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  --toggle-bg: #475569;
  --shadow: 0 16px 42px rgba(0, 0, 0, .30);
}

* { box-sizing: border-box; }
html { min-height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: 0; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; color: var(--text); background: var(--bg); font-size: 14px; }
a { color: var(--primary-strong); text-decoration: none; }
button, input, select, textarea { color: inherit; font: inherit; }
::placeholder { color: var(--muted); opacity: 1; }
*:focus-visible { outline: 2px solid var(--primary-strong); outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
::selection { background: var(--primary-tint); color: var(--text); }
/* Icon dimensions must never override Leaflet's SVG route viewport. */
svg.lucide { width: 18px; height: 18px; stroke-width: 1.9; flex: 0 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
}
.button.primary { color: var(--on-primary); background: linear-gradient(180deg, var(--primary), var(--primary-strong)); box-shadow: 0 10px 24px var(--primary-shadow); }
.button.secondary { color: var(--text); background: var(--surface); border-color: var(--line-strong); }
.button.danger { color: var(--danger-text); background: var(--surface); border-color: var(--danger-border); }
.button.ghost { min-height: 34px; color: var(--text); background: var(--surface); border-color: var(--line); }
.button.wide { width: 100%; }
.button[disabled] { opacity: .65; cursor: wait; }

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
  position: relative;
}
.icon-button:hover { background: var(--hover-bg); border-color: var(--line); }
.icon-button [data-theme-icon-sun]:not([hidden]), .icon-button [data-theme-icon-moon]:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; }
.danger-icon { color: var(--danger); }

.auth-body {
  background: radial-gradient(circle at 52% 12%, var(--primary-tint), transparent 32%), var(--bg);
}
.auth-shell {
  width: min(1040px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 330px minmax(420px, 590px);
  gap: 70px;
  align-items: center;
}
.auth-brand { align-self: center; display: grid; gap: 34px; }
.auth-logo { width: 260px; max-width: 100%; display: block; margin: 0; }
.auth-info { display: grid; gap: 34px; }
.auth-lead { margin: 0; color: var(--text); font-size: 22px; line-height: 1.35; }
.auth-points { display: grid; gap: 28px; }
.auth-points div { display: grid; grid-template-columns: 58px 1fr; column-gap: 18px; align-items: center; }
.auth-points svg { grid-row: span 2; width: 58px; height: 58px; padding: 15px; border: 1px solid var(--primary-border-strong); border-radius: 999px; color: var(--primary-strong); background: var(--surface); }
.auth-points strong { font-size: 16px; }
.auth-points span { color: var(--text-subtle); line-height: 1.45; }
.auth-main { display: grid; gap: 18px; justify-items: center; }
.auth-card {
  width: 100%;
  padding: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-glass);
  box-shadow: var(--shadow);
}
.auth-card.compact { max-width: 430px; padding: 28px; }
.auth-title { display: flex; gap: 18px; align-items: center; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.auth-title > svg { width: 48px; height: 48px; color: var(--primary-strong); }
.auth-title h1 { margin: 0 0 6px; font-size: 30px; line-height: 1.1; }
.auth-title p { margin: 0; color: var(--text-subtle); font-size: 17px; }
.auth-switch, .mini-link { margin: 0; display: inline-flex; gap: 12px; align-items: center; justify-content: center; color: var(--text-soft); flex-wrap: wrap; }
.mini-link { width: 100%; justify-content: center; margin-top: 16px; font-size: 13px; }
.divider { width: 100%; display: flex; align-items: center; gap: 16px; margin: 22px 0; color: var(--muted); }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.google-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; color: var(--google); font-weight: 800; font-size: 19px; }
.security-note { display: flex; gap: 14px; margin-top: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
.security-note p { margin: 0; line-height: 1.45; }
.security-note small { color: var(--muted); }

.form-grid { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; position: relative; }
.field span { font-weight: 700; }
.field > svg { position: absolute; left: 16px; bottom: 14px; color: var(--muted); }
.field input, .field select, .field textarea, .search-field input, .toolbar select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
  outline: none;
}
.field input, .field select, .search-field input, .toolbar select { height: 44px; }
.field textarea { min-height: 118px; padding: 12px; resize: vertical; line-height: 1.45; }
.field input { padding: 0 48px; }
.field select, .field.plain input, .field.plain select { padding: 0 12px; }
.field.plain > svg { display: none; }
.field input:focus, .field select:focus, .field textarea:focus, .search-field input:focus, .toolbar select:focus { border-color: var(--primary-strong); box-shadow: 0 0 0 3px var(--primary-ring); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field small, .field-error { color: var(--danger); }
.field em { color: var(--muted); font-style: normal; font-size: 12px; }
.field-action { position: absolute; right: 8px; bottom: 5px; width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.form-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.checkbox { display: inline-flex; align-items: center; gap: 9px; color: var(--text-soft); }
.checkbox input { width: 18px; height: 18px; accent-color: var(--primary-strong); }
.alert, .toast { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }
.alert.success, .toast.success { color: var(--success-text); background: var(--success-soft); border-color: var(--success-border); }
.alert.danger, .toast.danger { color: var(--danger-text); background: var(--danger-soft); border-color: var(--danger-border); }
.toast.warning, .alert.warning { color: var(--warning-text); background: var(--warning-soft); border-color: var(--warning-border); }
.app-toast { position: fixed; top: 78px; left: 50%; z-index: 30; transform: translateX(-50%); min-width: 320px; box-shadow: var(--shadow); }

.confirm-modal[hidden] { display: none; }
.confirm-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 22px; }
.confirm-backdrop { position: absolute; inset: 0; background: var(--modal-backdrop); }
.confirm-dialog {
  width: min(420px, 100%);
  position: relative;
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--dialog-shadow);
}
.confirm-dialog > svg { width: 42px; height: 42px; padding: 10px; color: var(--danger-text); background: var(--danger-soft); border-radius: 999px; }
.confirm-dialog h2 { margin: 0; font-size: 20px; }
.confirm-dialog p { margin: 0; color: var(--muted); line-height: 1.45; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.app-body { display: grid; grid-template-columns: 248px 1fr; background: radial-gradient(circle at 54% -18%, var(--primary-ring-soft), transparent 34%), var(--bg); }
.sidebar-backdrop { display: none; }
.sidebar {
  min-height: 100vh;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, var(--sidebar-bg), var(--surface-glass)),
    radial-gradient(circle at 50% 0, var(--primary-ring-soft), transparent 42%);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-strong));
  background-size: 180% 100%;
  animation: shimmer 5s linear infinite;
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: 90px 14px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-border), transparent);
}
.sidebar-logo {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 1;
}
.sidebar-logo img {
  display: block;
  width: 96px;
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px var(--primary-ring-soft));
  transition: transform .22s ease, filter .22s ease;
}
.sidebar-logo:hover img { transform: translateY(-1px) scale(1.03); filter: drop-shadow(0 12px 22px var(--primary-shadow)); }
.nav-list { display: grid; gap: 4px; padding: 18px 12px; position: relative; z-index: 1; }
.nav-list a {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--sidebar-link);
  font-weight: 600;
  position: relative;
  overflow: hidden;
}
.nav-list a::before {
  content: "";
  width: 3px;
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0;
  transform: scaleY(.4);
  transition: opacity .16s ease, transform .16s ease;
}
.nav-list a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent);
  transform: translateX(-120%);
  opacity: 0;
}
.nav-list a:hover {
  color: var(--primary-ink);
  border-color: var(--primary-border);
  background: var(--primary-tint);
  transform: translateX(2px);
}
.nav-list a.active {
  color: var(--on-primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 12px 22px var(--primary-shadow);
}
.nav-list a.active::before, .nav-list a:hover::before { opacity: 1; transform: scaleY(1); }
.nav-list a.active::after { animation: shineSweep 3.8s ease-in-out infinite; opacity: 1; }
.nav-list a svg { transition: transform .18s ease; }
.nav-list a:hover svg, .nav-list a.active svg { transform: translateY(-1px) scale(1.05); }
.nav-pro-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 7px; border-radius: 6px; color: var(--warning-text); background: var(--warning-soft-strong); font-size: 11px; font-weight: 800; }
.nav-pro-badge svg { width: 13px; height: 13px; }
.nav-list a.active .nav-pro-badge, .nav-list a:hover .nav-pro-badge { color: var(--on-primary); background: var(--primary-border-strong); }
.nav-label { margin: 14px 10px 6px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.sidebar-user {
  margin: auto 16px 18px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface-glass), var(--surface-soft));
  box-shadow: var(--panel-shadow);
  position: relative;
  z-index: 1;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.sidebar-user:hover { transform: translateY(-2px); border-color: var(--primary-border); box-shadow: var(--shadow); }
.sidebar-user div { min-width: 0; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: var(--muted); }
.avatar { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 999px; color: var(--on-dark); background: var(--secondary); font-weight: 800; }
.avatar-img { display: block; object-fit: cover; background: var(--surface); }
.avatar.small { width: 30px; height: 30px; font-size: 12px; }
.app-shell { min-width: 0; position: relative; }
.sidebar-close, .mobile-top-logo { display: none; }
.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.menu-toggle { display: none; }
.top-search { width: min(420px, 45vw); height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--input-bg); position: relative; transition: width .22s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.top-search:focus-within { width: min(520px, 54vw); border-color: var(--primary-strong); box-shadow: 0 0 0 4px var(--primary-ring-soft), var(--panel-shadow); transform: translateY(-1px); }
.top-search input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; }
.search-dropdown[hidden] { display: none; }
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--dropdown-shadow);
  max-height: 420px;
  overflow-y: auto;
  z-index: 1000;
}
.search-group-label {
  padding: 8px 14px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .12s;
  text-decoration: none;
  color: inherit;
}
.search-result:hover, .search-result.active { background: var(--hover-bg); }
.search-result svg { width: 18px; height: 18px; color: var(--primary-strong); flex-shrink: 0; }
.search-result-body { flex: 1; min-width: 0; }
.search-result-title { overflow: hidden; font-weight: 600; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.search-result-subtitle { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-score { font-size: 10px; color: var(--muted); flex-shrink: 0; }
.search-result-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.search-result-type-badge.page { background: var(--primary-soft); color: var(--primary-soft-text); }
.search-result-type-badge.bookmark { background: var(--warning-soft-strong); color: var(--warning-strong); }
.search-empty { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.main-content { padding: 28px 32px 36px; }
.page-head, .settings-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head h1, .settings-head h1 { margin: 0 0 6px; font-size: 30px; line-height: 1.15; }
.page-head p, .settings-head p, .panel > p { margin: 0; color: var(--muted); }
.breadcrumb { color: var(--muted); font-size: 13px; }
.panel, .welcome-panel, .metric, .drawer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .95fr); gap: 22px; }
.welcome-panel { min-height: 240px; padding: 34px; display: flex; align-items: center; justify-content: space-between; gap: 26px; background: linear-gradient(135deg, var(--primary-ring-soft), var(--surface) 62%); border-color: var(--primary-border); }
.welcome-panel h2 { margin: 0 0 16px; font-size: 28px; }
.welcome-panel p { margin: 0 0 26px; color: var(--text-soft); font-size: 16px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; }
.badge, .pill { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--surface-subtle); color: var(--text-subtle); }
.badge.info, .pill.info { color: var(--primary-ink); background: var(--primary-soft); }
.badge.success, .pill.success { color: var(--success-text); background: var(--success-soft-strong); }
.pill.warning { color: var(--warning-text); background: var(--warning-soft-strong); }
.pill.danger { color: var(--danger-strong); background: var(--danger-soft-strong); }
.code-card { width: 250px; min-height: 140px; padding: 26px 22px 18px; border-radius: 8px; color: var(--code-card-text); background: var(--code-card-bg); box-shadow: var(--code-card-shadow); position: relative; transform: rotate(-3deg); }
.code-card span { width: 8px; height: 8px; display: inline-block; margin-right: 5px; border-radius: 999px; background: var(--danger); }
.code-card span:nth-child(2) { background: var(--warning); }
.code-card span:nth-child(3) { background: var(--success); }
.code-card code { display: block; margin-top: 20px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; line-height: 1.8; }
.panel { padding: 22px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.panel-title h2, .panel h2, .drawer h2 { margin: 0; font-size: 18px; }
.check-row { display: flex; gap: 13px; padding: 10px 0; }
.check-row svg { color: var(--success); }
.check-row.todo svg { color: var(--warning); }
.check-row strong, .check-row span { display: block; }
.check-row span { color: var(--muted); font-size: 13px; margin-top: 3px; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; margin: 22px 0; }
.metric { min-height: 118px; padding: 20px; display: grid; gap: 4px; align-content: center; position: relative; overflow: hidden; }
.metric::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-ring-soft), transparent 46%);
  opacity: 0;
  transition: opacity .2s ease;
}
.metric::after {
  content: "";
  height: 3px;
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(.2);
  transform-origin: left;
  opacity: 0;
  transition: transform .24s ease, opacity .2s ease;
}
.metric:hover::before { opacity: 1; }
.metric:hover::after { transform: scaleX(1); opacity: 1; }
.metric > * { position: relative; z-index: 1; }
.metric svg { width: 38px; height: 38px; padding: 9px; border-radius: 8px; color: var(--primary-strong); background: var(--primary-soft); }
.metric span { color: var(--text-subtle); font-weight: 700; }
.metric strong { font-size: 24px; }
.metric small { color: var(--success-strong); }
.dashboard-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.admin-dashboard-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pro-status { position: relative; overflow: hidden; }
.pro-status.premium { border-color: var(--warning-border); background: linear-gradient(135deg, var(--warning-soft), var(--surface) 66%); }
.pro-status.premium svg { color: var(--warning-text); background: var(--warning-soft-strong); }
.pro-status.premium small { color: var(--warning-strong); line-height: 1.35; }
.pro-status.premium .button { width: fit-content; min-height: 34px; margin-top: 8px; }
.pro-status.active { border-color: var(--success-border); background: linear-gradient(135deg, var(--success-soft), var(--surface) 68%); }
.pro-status.active svg { color: var(--success-text); background: var(--success-soft-strong); }
.pro-status.support { border-color: var(--line); background: linear-gradient(135deg, var(--surface-soft), var(--surface) 70%); }
.pro-status.support svg { color: var(--text-subtle); background: var(--surface-subtle); }
.pro-dashboard-panel { margin-top: 22px; border-color: var(--success-border); background: linear-gradient(135deg, var(--success-soft), var(--surface) 76%); position: relative; overflow: hidden; }
.pro-dashboard-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--success), var(--primary));
  background-size: 180% 100%;
  animation: shimmer 4.8s linear infinite;
}
.pro-insight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 14px; align-items: stretch; }
.pro-insight { min-height: 116px; padding: 16px; display: grid; gap: 4px; align-content: center; border: 1px solid var(--success-border); border-radius: 8px; background: var(--surface); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.pro-insight:hover { transform: translateY(-2px); border-color: var(--primary-border); box-shadow: var(--panel-shadow); }
.pro-insight svg, .locked-feature-list svg { width: 34px; height: 34px; padding: 8px; border-radius: 8px; color: var(--success-text); background: var(--success-soft-strong); }
.pro-insight span { color: var(--text-subtle); font-weight: 700; }
.pro-insight strong { min-width: 0; overflow-wrap: anywhere; font-size: 21px; }
.pro-insight small { color: var(--success-strong); }
.pro-actions { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-width: 190px; }
.pro-actions .button { justify-content: center; }
.locked-dashboard { border-color: var(--warning-border); background: linear-gradient(135deg, var(--warning-soft), var(--surface) 74%); }
.locked-feature-list { display: grid; gap: 14px; margin-bottom: 18px; }
.locked-feature-list div { display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; align-items: center; }
.locked-feature-list strong, .locked-feature-list span { display: block; }
.locked-feature-list span { color: var(--muted); font-size: 13px; margin-top: 2px; }
.locked-dashboard .button { width: fit-content; }
.two-col { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 22px; }
.dashboard-chart-row { margin-top: 22px; }
.chart-box { width: 100%; position: relative; overflow: hidden; border-radius: 8px; }
.chart-box::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: .22;
  mask-image: linear-gradient(180deg, transparent, #000 20%, #000 82%, transparent);
}
.chart-box::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--primary-ring-soft));
  opacity: .75;
  transform: translateY(16px);
}
.chart-box.large { height: 280px; }
.chart-box.small { height: 220px; }
.chart-box canvas { display: block; max-width: 100%; position: relative; z-index: 1; }
.activity-list { display: grid; gap: 14px; }
.activity-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 14px; align-items: center; padding: 8px; margin: -8px; border-radius: 8px; transition: transform .18s ease, background .18s ease; }
.activity-row:hover { transform: translateX(3px); background: var(--hover-bg); }
.activity-row > svg { width: 38px; height: 38px; padding: 9px; border-radius: 999px; color: var(--on-primary); background: var(--primary-strong); }
.activity-row strong, .activity-row span { display: block; }
.activity-row span, .activity-row time { color: var(--muted); font-size: 13px; }
.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.integration { padding: 18px; border: 1px solid var(--line); border-radius: 8px; position: relative; overflow: hidden; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.integration::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-ring-soft), transparent 56%);
  opacity: 0;
  transition: opacity .2s ease;
}
.integration:hover { transform: translateY(-2px); border-color: var(--primary-border); box-shadow: var(--panel-shadow); }
.integration:hover::before { opacity: 1; }
.integration > * { position: relative; z-index: 1; }
.integration strong { display: block; margin-bottom: 8px; }
.integration p { margin: 10px 0 0; color: var(--muted); }
.dashboard-integrations { grid-template-columns: 1fr; }
.dashboard-integrations .integration strong { display: flex; align-items: center; gap: 8px; }
.admin-bottom-panel { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; margin-top: 22px; }
.empty-state { min-height: 160px; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; color: var(--muted); }
.empty-state svg { width: 34px; height: 34px; }

.admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.table-panel { padding: 0; overflow: hidden; }
.toolbar { display: flex; gap: 10px; padding: 18px; border-bottom: 1px solid var(--line); }
.search-field { flex: 1; min-width: 220px; position: relative; }
.search-field input { padding: 0 42px 0 14px; }
.search-field svg { position: absolute; right: 13px; top: 12px; color: var(--muted); }
.toolbar select { width: 130px; padding: 0 10px; }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 880px; }
th, td { height: 58px; padding: 0 16px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { height: 44px; background: var(--surface-soft); color: var(--text-soft); font-size: 12px; }
tr.selected td { background: var(--selection-bg); }
.user-cell { display: flex; align-items: center; gap: 10px; }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.sort-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); }
.sort-link svg { width: 14px; height: 14px; }
.sort-link.active { color: var(--primary-strong); }
.icon-status, .provider-cell { display: inline-flex; align-items: center; gap: 7px; }
.icon-status.success { color: var(--success); }
.icon-status.warning { color: var(--warning); }
.icon-status span { color: var(--text-subtle); }
.row-actions { display: inline-flex; align-items: center; gap: 6px; }
.row-actions form { margin: 0; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; color: var(--muted); }
.pagination div { display: flex; gap: 6px; }
.pagination a { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--surface); }
.pagination a.active { color: var(--on-primary); background: var(--primary-strong); border-color: var(--primary-strong); }
.pagination a.disabled { opacity: .45; pointer-events: none; }
.loading-state { display: none; gap: 10px; padding: 18px; border-bottom: 1px solid var(--line); }
.loading-state span { height: 42px; flex: 1; border-radius: 6px; background: linear-gradient(90deg, var(--surface-subtle), var(--line), var(--surface-subtle)); background-size: 200% 100%; animation: skeleton 1.1s linear infinite; }
.is-loading .loading-state { display: flex; }
.is-loading .responsive-table, .is-loading .user-card-list { opacity: .45; pointer-events: none; }
.table-empty { min-height: 330px; }
.user-card-list { display: none; padding: 14px; gap: 12px; }
.user-card { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.user-card-head { display: flex; gap: 12px; align-items: center; }
.user-card-head strong, .user-card-head span { display: block; }
.user-card-head span { color: var(--muted); word-break: break-word; }
.user-card-meta { display: flex; flex-wrap: wrap; gap: 8px; }
@keyframes skeleton { to { background-position: -200% 0; } }
.drawer { padding: 0; overflow: hidden; position: sticky; top: 94px; }
.drawer-head { min-height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); }
.drawer .form-grid, .drawer > form, .drawer-section { padding: 18px; }
.profile-row { display: flex; align-items: center; gap: 14px; padding-bottom: 8px; }
.profile-row strong, .profile-row small { display: block; }
.profile-row small { color: var(--muted); }
.drawer-section { border-top: 1px solid var(--line); }
.drawer-section h3 { margin: 0 0 14px; font-size: 15px; }
.danger-zone p { margin: 0 0 14px; color: var(--muted); line-height: 1.45; }

.settings-head { margin-bottom: 12px; }
.settings-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; }
.unsaved-badge {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--warning-border);
  border-radius: 6px;
  color: var(--unsaved-text);
  background: var(--unsaved-soft);
  font-weight: 700;
}
.tabs { display: flex; gap: 18px; padding: 0 0 14px; margin-bottom: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { min-height: 42px; display: inline-flex; align-items: center; gap: 9px; padding: 0 10px; color: var(--text-subtle); border-bottom: 2px solid transparent; font-weight: 700; white-space: nowrap; }
.tabs a.active { color: var(--primary-strong); border-color: var(--primary-strong); }
.settings-grid { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: 22px; }
.settings-form-grid { margin-top: 18px; }
.field-label { display: block; margin-bottom: 8px; font-weight: 700; }
.logo-upload { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.logo-preview-box {
  min-height: 86px;
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.logo-preview-box img { max-width: 230px; max-height: 62px; object-fit: contain; }
.logo-upload small { display: block; margin-top: 8px; color: var(--muted); }
.logo-upload-actions { display: grid; gap: 10px; justify-items: stretch; }
.swatch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.color-field { grid-template-columns: 1fr; }
.color-control { display: grid; grid-template-columns: 42px 1fr; align-items: center; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; background: var(--input-bg); }
.color-control input[type="color"] { width: 42px; height: 42px; padding: 6px; border: 0; cursor: pointer; }
.color-control input[type="text"] { height: 42px; padding: 0 10px; border: 0; border-left: 1px solid var(--line); border-radius: 0; }
.segmented-field { display: flex; flex-wrap: wrap; gap: 0; padding: 0; margin: 0; border: 0; }
.segmented-field legend { width: 100%; margin-bottom: 8px; font-weight: 700; }
.segmented-field label { position: relative; }
.segmented-field input { position: absolute; opacity: 0; }
.segmented-field span { min-width: 58px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line-strong); margin-left: -1px; background: var(--surface); cursor: pointer; }
.segmented-field label:first-of-type span { margin-left: 0; border-radius: 6px 0 0 6px; }
.segmented-field label:last-of-type span { border-radius: 0 6px 6px 0; }
.segmented-field input:checked + span { position: relative; z-index: 1; color: var(--primary-strong); border-color: var(--primary-strong); box-shadow: 0 0 0 3px var(--primary-ring-soft); }
.toggle-row { display: grid; grid-template-columns: auto 34px 1fr; gap: 9px 10px; align-items: center; color: var(--muted); }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-row > span { width: 34px; height: 20px; border-radius: 999px; background: var(--toggle-bg); position: relative; }
.toggle-row > span::after { content: ""; width: 16px; height: 16px; position: absolute; top: 2px; left: 2px; border-radius: 999px; background: var(--toggle-knob); box-shadow: 0 1px 3px var(--modal-backdrop); }
.toggle-row input:checked + span { background: var(--primary-strong); }
.toggle-row input:checked + span::after { transform: translateX(14px); }
.toggle-row.locked { opacity: .86; cursor: not-allowed; }
.toggle-row strong { color: var(--text); }
.toggle-row small { grid-column: 3; }
.reset-theme-button { justify-self: start; }

.account-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.account-panel { display: grid; gap: 18px; }
.account-panel .panel-title { margin-bottom: 0; }
.account-panel .panel-title p, .subscription-table-title p { margin: 4px 0 0; color: var(--muted); }
.account-profile-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.account-avatar-preview {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--on-dark);
  background: var(--secondary);
  font-size: 24px;
  font-weight: 800;
}
.account-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.account-avatar-form { display: grid; gap: 8px; }
.account-avatar-form small { color: var(--muted); }
.account-form { align-content: start; }
.account-field-pair { align-items: start; }
.account-field-pair .field { grid-template-rows: auto 44px minmax(15px, auto); }
.account-field-pair .field small, .account-field-pair .field em { line-height: 1.25; }
.account-field-spacer { visibility: hidden; }
.account-submit { justify-self: start; }
.account-notifications { grid-column: 1 / -1; }
.account-notification-form { display: grid; gap: 18px; align-content: start; }
.account-notification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  max-width: 980px;
}
.account-toggle {
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 2px 0;
  color: var(--muted);
  cursor: pointer;
}
.account-toggle input[type="checkbox"] { position: absolute; opacity: 0; }
.account-toggle-switch {
  width: 38px;
  height: 22px;
  margin-top: 2px;
  border-radius: 999px;
  background: var(--toggle-bg);
  position: relative;
}
.account-toggle-switch::after {
  content: "";
  width: 18px;
  height: 18px;
  position: absolute;
  top: 2px;
  left: 2px;
  border-radius: 999px;
  background: var(--toggle-knob);
  box-shadow: 0 1px 3px var(--modal-backdrop);
  transition: transform .16s ease;
}
.account-toggle input[type="checkbox"]:checked + .account-toggle-switch { background: var(--primary-strong); }
.account-toggle input[type="checkbox"]:checked + .account-toggle-switch::after { transform: translateX(16px); }
.account-toggle input[type="checkbox"]:focus-visible + .account-toggle-switch { box-shadow: 0 0 0 3px var(--primary-ring); }
.account-toggle.locked { opacity: .86; cursor: not-allowed; }
.account-toggle-copy { display: grid; gap: 5px; min-width: 0; }
.account-toggle-copy strong { color: var(--text); line-height: 1.25; }
.account-toggle-copy small { color: var(--muted); line-height: 1.35; }

.subscription-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) 360px;
  gap: 28px;
  align-items: center;
  margin-bottom: 22px;
  padding: 30px;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--primary-ring-soft), transparent 42%),
    linear-gradient(180deg, var(--surface), var(--surface-soft));
  box-shadow: var(--panel-shadow);
  overflow: hidden;
  position: relative;
}
.subscription-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-strong));
  background-size: 180% 100%;
  animation: shimmer 4.5s linear infinite;
}
.subscription-hero-copy { display: grid; gap: 14px; position: relative; z-index: 1; }
.subscription-hero-copy > .pill { justify-self: start; }
.subscription-hero-copy h2 { max-width: 780px; margin: 0; font-size: 32px; line-height: 1.12; }
.subscription-hero-copy p { max-width: 760px; margin: 0; color: var(--text-soft); font-size: 16px; line-height: 1.55; }
.subscription-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.subscription-hero-visual {
  min-height: 220px;
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-glass);
  position: relative;
  z-index: 1;
}
.subscription-hero-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--on-primary);
  background: linear-gradient(180deg, var(--primary), var(--primary-strong));
  box-shadow: 0 16px 30px var(--primary-shadow);
  animation: floatY 4s ease-in-out infinite;
}
.subscription-hero-icon svg { width: 34px; height: 34px; }
.subscription-signal-list { display: grid; gap: 10px; }
.subscription-signal-list span {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-soft);
  background: var(--surface);
  font-weight: 700;
}
.subscription-signal-list svg { color: var(--primary-strong); }
.subscription-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 22px; }
.subscription-status-panel { display: grid; gap: 18px; align-content: start; }
.subscription-status-panel > p { max-width: 720px; line-height: 1.5; }
.subscription-status-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.subscription-status-head h2 { margin: 10px 0 0; font-size: 24px; }
.subscription-status-head > svg { width: 48px; height: 48px; padding: 12px; border-radius: 10px; color: var(--primary-strong); background: var(--primary-soft); }
.subscription-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.subscription-facts div { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.subscription-facts span, .subscription-facts strong { display: block; }
.subscription-facts span { margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.subscription-facts strong { word-break: break-word; }
.subscription-value-panel { align-content: start; }
.subscription-value-list { display: grid; gap: 12px; }
.subscription-value-list > div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 4px 13px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}
.subscription-value-list svg {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 8px;
  color: var(--primary-strong);
  background: var(--primary-soft);
}
.subscription-value-list strong { font-size: 15px; }
.subscription-value-list span { color: var(--muted); line-height: 1.4; }
.subscription-invoices { grid-column: 1 / -1; }
.subscription-table-title { padding: 18px; margin: 0; border-bottom: 1px solid var(--line); }
.subscription-invoices table { min-width: 620px; }
.preview-frame { display: grid; grid-template-columns: 190px 1fr; margin-top: 20px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; min-height: 360px; }
.preview-frame aside { padding: 18px 12px; background: var(--sidebar-preview-bg); }
.preview-frame aside img { width: 148px; margin-bottom: 22px; }
.preview-frame aside a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 6px; color: var(--sidebar-preview-link); }
.preview-frame aside a.active { color: var(--on-primary); background: var(--primary-strong); }
.preview-frame > div { padding: 22px; }
.preview-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.preview-top input { width: min(320px, 100%); height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 0 12px; color: var(--text); background: var(--input-bg); }
.preview-toast { display: grid; grid-template-columns: 22px 1fr; gap: 2px 9px; margin-top: 18px; padding: 12px; border: 1px solid var(--success-border); border-radius: 6px; color: var(--success-text); background: var(--success-soft); }
.preview-toast svg { grid-row: span 2; }
.preview-toast span { color: var(--text-subtle); font-size: 12px; }
.mini-chart { height: 96px; margin-top: 24px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(180deg, var(--surface), var(--surface-soft)); position: relative; overflow: hidden; }
.mini-chart span { position: absolute; left: 22px; right: 22px; bottom: 26px; height: 38px; border-bottom: 3px solid var(--primary-strong); border-radius: 50%; transform: rotate(-2deg); }
.integration-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.integration-row > div { padding: 18px; border: 1px solid var(--line); border-radius: 8px; }

.public-body { background: var(--bg); }
.public-topbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 max(24px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.public-brand img { max-width: 190px; max-height: 52px; }
.public-topbar nav { display: flex; align-items: center; gap: 14px; }
.public-main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 60px; }
.pricing-hero { max-width: 720px; display: grid; gap: 14px; margin-bottom: 28px; }
.pricing-hero h1 { margin: 0; font-size: 34px; line-height: 1.12; }
.pricing-hero p { margin: 0; color: var(--muted); font-size: 16px; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.pricing-card {
  min-height: 430px;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}
.pricing-card.highlighted { border-color: var(--primary-border-strong); box-shadow: var(--shadow); }
.pricing-card h2 { margin: 0; font-size: 22px; }
.pricing-card strong { font-size: 34px; line-height: 1; }
.pricing-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.pricing-card ul { display: grid; gap: 10px; padding: 0; margin: 4px 0 10px; list-style: none; }
.pricing-card li { display: flex; align-items: center; gap: 9px; }
.pricing-card li svg { color: var(--success); }
.billing-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 22px; align-items: start; }
.billing-form { margin-top: 18px; }
.choice-cards, .feature-checks { display: grid; gap: 12px; padding: 0; margin: 0; border: 0; }
.choice-cards legend, .feature-checks legend { font-weight: 800; margin-bottom: 2px; }
.choice-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-cards label, .feature-checks label {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}
.choice-cards input, .feature-checks input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary-strong); }
.choice-cards span, .feature-checks span { display: grid; gap: 3px; }
.choice-cards small, .feature-checks small, .api-key-row span { color: var(--muted); line-height: 1.4; }
.feature-checks label > span { grid-template-columns: 24px 1fr; align-items: start; }
.feature-checks svg { grid-row: span 2; color: var(--primary-strong); }
.two-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.api-key-reveal { display: grid; gap: 8px; margin: 16px 0; padding: 14px; border: 1px solid var(--success-border); border-radius: var(--radius); background: var(--success-soft); }
.api-key-reveal code { padding: 10px; border-radius: 6px; background: var(--surface); overflow-x: auto; }
.api-key-list { display: grid; gap: 10px; margin-top: 18px; }
.api-key-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.api-key-row strong, .api-key-row span { display: block; }
.upgrade-page { display: grid; gap: 22px; align-items: start; }
.upgrade-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 350px;
  gap: 28px;
  align-items: stretch;
  padding: 30px;
  border: 1px solid var(--primary-border-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--primary-ring-soft), transparent 44%),
    linear-gradient(180deg, var(--surface), var(--surface-soft));
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.upgrade-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--primary-ring-soft) 1px, transparent 1px), linear-gradient(90deg, var(--primary-ring-soft) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 72%, transparent);
  opacity: .5;
}
.upgrade-hero-copy { display: grid; align-content: center; gap: 16px; position: relative; z-index: 1; }
.upgrade-hero-copy > .pill { justify-self: start; }
.upgrade-hero-copy h1 { max-width: 780px; margin: 0; font-size: 38px; line-height: 1.08; }
.upgrade-hero-copy p { max-width: 720px; margin: 0; color: var(--text-soft); font-size: 16px; line-height: 1.58; }
.upgrade-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.upgrade-offer {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 250px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-glass);
  box-shadow: var(--panel-shadow);
  position: relative;
  z-index: 1;
}
.upgrade-offer span { color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: 12px; }
.upgrade-offer strong { font-size: 36px; line-height: 1; }
.upgrade-offer small { color: var(--text-subtle); line-height: 1.45; }
.upgrade-offer-bars {
  height: 78px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 8px;
}
.upgrade-offer-bars i {
  display: block;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--accent), var(--primary-strong));
  transform-origin: bottom;
  animation: growBar .7s cubic-bezier(.22, 1, .36, 1) both;
}
.upgrade-offer-bars i:nth-child(1) { height: 42%; animation-delay: .08s; }
.upgrade-offer-bars i:nth-child(2) { height: 68%; animation-delay: .16s; }
.upgrade-offer-bars i:nth-child(3) { height: 100%; animation-delay: .24s; }
.upgrade-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.upgrade-proof-grid > div {
  display: grid;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}
.upgrade-proof-grid svg { width: 34px; height: 34px; padding: 8px; border-radius: 8px; color: var(--primary-strong); background: var(--primary-soft); }
.upgrade-proof-grid strong { font-size: 15px; }
.upgrade-proof-grid span { color: var(--muted); line-height: 1.45; }
.upgrade-panel { display: grid; gap: 0; }
.upgrade-panel h1 { margin: 0; font-size: 30px; }
.upgrade-panel p { margin: 0; color: var(--muted); line-height: 1.5; }
.upgrade-price { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.upgrade-price strong { font-size: 28px; }
.upgrade-price span { color: var(--muted); }
.feature-list { display: grid; gap: 12px; margin-top: 16px; }
.feature-list > div {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 2px 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.feature-list svg { grid-row: span 2; width: 38px; height: 38px; padding: 9px; border-radius: 8px; color: var(--primary-strong); background: var(--primary-soft); }
.feature-list span { color: var(--muted); }
.feature-list .feature-tier { grid-column: 2; justify-self: start; min-height: 22px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.feature-list .feature-tier.pro { color: var(--warning-text); background: var(--warning-soft-strong); }
.feature-list .feature-tier.free { color: var(--success-text); background: var(--success-soft-strong); }
.upgrade-feature-list { margin-top: 0; }
.upgrade-feature-list > div { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.upgrade-feature-list > div:hover { transform: translateY(-2px); border-color: var(--primary-border); box-shadow: var(--panel-shadow); }
.upgrade-story-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-color: var(--primary-border);
  background: linear-gradient(135deg, var(--primary-ring-soft), var(--surface) 64%);
}
.upgrade-story-panel > div { display: grid; gap: 10px; max-width: 760px; }
.upgrade-story-panel .pill { justify-self: start; }
.upgrade-story-panel h2 { font-size: 22px; line-height: 1.25; }
.upgrade-story-panel p { margin: 0; color: var(--text-soft); line-height: 1.55; }
.feature-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.theme-swatch {
  min-height: 86px;
  display: grid;
  align-content: end;
  padding: 12px;
  border-radius: 8px;
  color: var(--on-dark);
  background: var(--swatch);
  font-weight: 800;
}

.bookmark-actions { display: flex; justify-content: flex-end; gap: 10px; margin: -10px 0 18px; flex-wrap: wrap; }
.bookmark-toolbar select { width: 160px; }
.advanced-filter-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-raised);
}
.advanced-filter-bar.locked { background: var(--surface-soft); }
.advanced-filter-bar.locked input { background: var(--surface-subtle); color: var(--muted); }
.muted-link { color: var(--text-soft); font-weight: 700; }
.bookmark-tags { max-width: 260px; display: inline-block; overflow: hidden; color: var(--muted); text-overflow: ellipsis; vertical-align: middle; }
.bookmark-clicks { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; color: var(--muted); font-weight: 700; }
.bookmark-clicks svg { width: 15px; height: 15px; }
.sort-link.locked { color: var(--muted); }
.bookmark-card-list { display: none; padding: 14px; gap: 12px; }
.bookmark-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.bookmark-card strong, .bookmark-card a { display: block; word-break: break-word; }
.bookmark-card a { margin-top: 4px; color: var(--muted); }
.bookmark-form-grid { align-items: start; }
.bookmark-form { margin-top: 18px; }
.favorite-check, .public-check { justify-content: flex-start; }
.bookmark-visibility-checks { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.public-check span { display: grid; gap: 2px; }
.public-check small { color: var(--muted); line-height: 1.35; }
.bookmark-preview {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  transition: all .2s ease;
}
.bookmark-form-grid:focus-within .bookmark-preview { border-color: var(--primary-strong); box-shadow: 0 0 0 3px var(--primary-ring); transform: translateY(-1px); }
.bookmark-preview > svg { width: 42px; height: 42px; padding: 10px; color: var(--primary-strong); background: var(--primary-soft); border-radius: 8px; }
.bookmark-preview strong { font-size: 20px; }
.bookmark-preview span, .bookmark-preview p { color: var(--muted); word-break: break-word; }
.bookmark-preview p { margin: 0; line-height: 1.5; }
.bookmark-preview div { display: flex; gap: 8px; flex-wrap: wrap; }

.explore-hero {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 34px 0 22px;
  text-align: center;
}
.explore-hero h1 { margin: 0; font-size: 42px; line-height: 1.08; }
.explore-hero p { max-width: 600px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.explore-search {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 8px;
}
.explore-search label { position: relative; }
.explore-search input { height: 52px; padding: 0 48px 0 16px; font-size: 15px; }
.explore-search svg { position: absolute; right: 16px; top: 17px; color: var(--muted); }
.public-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 10px 0 22px;
}
.public-stats div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 2px 12px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}
.public-stats svg { grid-row: span 2; width: 42px; height: 42px; padding: 10px; border-radius: 8px; color: var(--primary-strong); background: var(--primary-soft); }
.public-stats span { font-size: 25px; line-height: 1; font-weight: 800; }
.public-stats strong { color: var(--muted); font-size: 13px; }
.explore-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, .35fr) auto auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 22px;
}
.explore-sort { align-self: end; }
.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.link-card {
  min-height: 260px;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.link-card:hover { transform: translateY(-2px); border-color: var(--primary-border); box-shadow: var(--shadow); }
.link-card-head { display: grid; gap: 6px; }
.link-card-title { color: var(--text); font-size: 17px; font-weight: 800; line-height: 1.25; word-break: break-word; }
.link-card-title:hover { color: var(--primary-strong); }
.link-domain { color: var(--muted); font-size: 13px; word-break: break-word; }
.link-card p { min-height: 42px; margin: 0; color: var(--text-soft); line-height: 1.5; }
.link-meta, .link-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.link-meta a, .link-meta span, .link-card-foot span, .link-card-foot a { display: inline-flex; align-items: center; gap: 6px; }
.link-meta svg, .link-card-foot svg { width: 15px; height: 15px; }
.link-author { color: var(--text-soft); font-weight: 700; }
.link-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.link-card-foot { align-self: end; padding-top: 12px; border-top: 1px solid var(--line); }
.link-card-foot a { color: var(--primary-strong); font-weight: 800; }
.explore-empty { min-height: 260px; }
.explore-pagination { margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.profile-public-head {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}
.profile-public-avatar {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--on-dark);
  background: var(--secondary);
  font-size: 28px;
  font-weight: 800;
}
.profile-public-head h1 { margin: 14px 0 4px; font-size: 30px; }
.profile-public-head p { margin: 0; color: var(--muted); }
.profile-public-stats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.profile-public-stats span { min-height: 48px; display: grid; align-content: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface-soft); }
.profile-public-stats strong { color: var(--text); font-size: 18px; }
.profile-link-grid { margin-top: 8px; }
.bar-chart {
  height: 260px;
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}
.bar-chart.compact { height: 230px; }
.bar-chart > div {
  min-width: 48px;
  flex: 1;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 6px;
  align-items: end;
  text-align: center;
}
.bar-chart span { width: 100%; min-height: 12px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--primary), var(--primary-strong)); }
.bar-chart strong { font-size: 13px; }
.bar-chart small { color: var(--muted); font-size: 11px; }
.stat-list { display: grid; gap: 14px; }
.stat-list > div { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.stat-list span { font-weight: 700; }
.stat-list strong { color: var(--primary-strong); }
.stat-list em { grid-column: 1 / -1; height: 8px; display: block; border-radius: 999px; background: var(--primary-strong); }
.bookmark-tags-panel { margin-top: 22px; }
.tag-cloud { display: flex; gap: 10px; flex-wrap: wrap; }
.tag-cloud > span { min-height: 34px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-soft); font-weight: 700; }
.tag-cloud strong { color: var(--primary-strong); }

.error-page { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; }
.error-page > svg { width: 54px; height: 54px; color: var(--primary-strong); }
.error-page h1 { margin: 0; font-size: 32px; }
.error-page p { margin: 0 0 12px; color: var(--muted); }

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes growBar {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
@keyframes growWidth {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes shineSweep {
  0% { transform: translateX(-120%); }
  42%, 100% { transform: translateX(120%); }
}
@keyframes softPulseRing {
  0%, 100% { box-shadow: 0 0 0 0 var(--primary-ring); }
  50% { box-shadow: 0 0 0 6px transparent; }
}
@keyframes breathePanel {
  0%, 100% { border-color: var(--line); }
  50% { border-color: var(--primary-border); }
}

.animate-fade-in-up { animation: fadeInUp .42s cubic-bezier(.22, 1, .36, 1) both; }
.animate-fade-in { animation: fadeIn .35s ease both; }
.animate-scale-in { animation: scaleIn .28s cubic-bezier(.22, 1, .36, 1) both; }

.stagger > * { animation: fadeInUp .42s cubic-bezier(.22, 1, .36, 1) both; }
.stagger > *:nth-child(1) { animation-delay: .04s; }
.stagger > *:nth-child(2) { animation-delay: .08s; }
.stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .16s; }
.stagger > *:nth-child(5) { animation-delay: .20s; }
.stagger > *:nth-child(6) { animation-delay: .24s; }
.stagger > *:nth-child(7) { animation-delay: .28s; }
.stagger > *:nth-child(8) { animation-delay: .32s; }
.stagger > *:nth-child(9) { animation-delay: .36s; }
.stagger > *:nth-child(10) { animation-delay: .40s; }

.panel { animation: fadeInUp .42s cubic-bezier(.22, 1, .36, 1) both; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: var(--hover-bg); }
.bookmark-card, .user-card, .metric, .panel { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.bookmark-card:hover, .user-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.metric:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-border); }
.metric:hover > svg, .pro-insight:hover svg, .integration:hover svg, .activity-row:hover > svg { animation: softPulseRing .9s ease-out; }
.dashboard-chart-row .panel:hover, .admin-bottom-panel:hover, .pro-dashboard-panel:hover { transform: translateY(-2px); border-color: var(--primary-border); box-shadow: var(--shadow); }
.button { transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; }
.button:hover:not([disabled]) { transform: translateY(-1px); }
.button:active:not([disabled]) { transform: translateY(1px) scale(.98); }
.icon-button { transition: background .15s ease, border-color .15s ease, transform .12s ease; }
.icon-button:hover { transform: scale(1.06); }
.icon-button:active { transform: scale(.94); }
.app-toast { translate: -50% 0; animation: slideInRight .35s cubic-bezier(.22, 1, .36, 1) both; }
.confirm-modal:not([hidden]) .confirm-dialog { animation: scaleIn .25s cubic-bezier(.22, 1, .36, 1) both; }
.pill { transition: transform .12s ease; }
.pill:active { transform: scale(.95); }
input, select, textarea { transition: border-color .2s ease, box-shadow .2s ease; }
.nav-list a { transition: background .15s ease, color .15s ease; position: relative; }
.nav-list a:hover { background: var(--hover-bg); }
.nav-list a:not(.active):hover { color: var(--sidebar-link); }
.nav-list a.active:hover { color: var(--on-primary); background: linear-gradient(180deg, var(--primary), var(--primary-strong)); }
.search-dropdown:not([hidden]) { animation: scaleIn .18s cubic-bezier(.22, 1, .36, 1) both; transform-origin: top; }
.loading-state span { background: linear-gradient(90deg, var(--surface-subtle) 25%, var(--line) 50%, var(--surface-subtle) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.icon-status.warning i, .icon-status.warning svg { transition: transform .2s ease; }
.icon-status.warning:active i, .icon-status.warning:active svg { transform: scale(1.3); }
.page-head { animation: fadeInUp .35s cubic-bezier(.22, 1, .36, 1) both; }
.breadcrumb { animation: fadeIn .4s ease both; animation-delay: .05s; }
.metric-grid > .metric { animation: fadeInUp .42s cubic-bezier(.22, 1, .36, 1) both; }
.metric-grid > .metric:nth-child(1) { animation-delay: .04s; }
.metric-grid > .metric:nth-child(2) { animation-delay: .08s; }
.metric-grid > .metric:nth-child(3) { animation-delay: .12s; }
.metric-grid > .metric:nth-child(4) { animation-delay: .16s; }
.metric-grid > .metric:nth-child(5) { animation-delay: .20s; }
.metric-grid > .metric:nth-child(6) { animation-delay: .24s; }
.nav-list > * { animation: fadeInUp .34s cubic-bezier(.22, 1, .36, 1) both; }
.nav-list > *:nth-child(1) { animation-delay: .03s; }
.nav-list > *:nth-child(2) { animation-delay: .05s; }
.nav-list > *:nth-child(3) { animation-delay: .07s; }
.nav-list > *:nth-child(4) { animation-delay: .09s; }
.nav-list > *:nth-child(5) { animation-delay: .11s; }
.nav-list > *:nth-child(6) { animation-delay: .13s; }
.nav-list > *:nth-child(7) { animation-delay: .15s; }
.nav-list > *:nth-child(8) { animation-delay: .17s; }
.nav-list > *:nth-child(9) { animation-delay: .19s; }
.nav-list > *:nth-child(10) { animation-delay: .21s; }
.nav-list > *:nth-child(11) { animation-delay: .23s; }
.nav-list > *:nth-child(12) { animation-delay: .25s; }
.nav-list > *:nth-child(13) { animation-delay: .27s; }
.nav-list > *:nth-child(14) { animation-delay: .29s; }
.activity-list > .activity-row { animation: fadeInUp .36s cubic-bezier(.22, 1, .36, 1) both; }
.activity-list > .activity-row:nth-child(1) { animation-delay: .04s; }
.activity-list > .activity-row:nth-child(2) { animation-delay: .08s; }
.activity-list > .activity-row:nth-child(3) { animation-delay: .12s; }
.activity-list > .activity-row:nth-child(4) { animation-delay: .16s; }
.activity-list > .activity-row:nth-child(5) { animation-delay: .20s; }
.dashboard-integrations > .integration { animation: fadeInUp .38s cubic-bezier(.22, 1, .36, 1) both; }
.dashboard-integrations > .integration:nth-child(1) { animation-delay: .06s; }
.dashboard-integrations > .integration:nth-child(2) { animation-delay: .12s; }
.dashboard-integrations > .integration:nth-child(3) { animation-delay: .18s; }
.bar-chart > div > span { transform-origin: bottom; animation: growBar .6s cubic-bezier(.22, 1, .36, 1) both; }
.bar-chart > div:nth-child(1) > span { animation-delay: .05s; }
.bar-chart > div:nth-child(2) > span { animation-delay: .10s; }
.bar-chart > div:nth-child(3) > span { animation-delay: .15s; }
.bar-chart > div:nth-child(4) > span { animation-delay: .20s; }
.bar-chart > div:nth-child(5) > span { animation-delay: .25s; }
.bar-chart > div:nth-child(6) > span { animation-delay: .30s; }
.bar-chart > div:nth-child(7) > span { animation-delay: .35s; }
.bar-chart > div:nth-child(8) > span { animation-delay: .40s; }
.bar-chart > div:nth-child(9) > span { animation-delay: .45s; }
.bar-chart > div:nth-child(10) > span { animation-delay: .50s; }
.bar-chart > div:nth-child(11) > span { animation-delay: .55s; }
.bar-chart > div:nth-child(12) > span { animation-delay: .60s; }
.stat-list em { animation: growBar .5s cubic-bezier(.22, 1, .36, 1) both; transform-origin: left; transform: scaleY(1); }
.stat-list em { animation-name: growWidth; }
.empty-state > svg { animation: pulse 3s ease-in-out infinite; }
.pagination-count strong { display: inline-block; transition: color .2s ease, transform .2s ease; }
.pagination-count:hover strong { color: var(--primary-strong); transform: translateY(-1px); }
.export-actions .button[href*="format"] svg { transition: transform .18s ease; }
.export-actions .button[href*="format"]:hover svg { transform: translateY(2px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  html { scroll-behavior: auto; }
}

@media (max-width: 1180px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); padding: 32px 0; gap: 24px; align-content: center; }
  .auth-brand { display: contents; }
  .auth-logo { order: 1; width: 220px; justify-self: center; margin: 0; }
  .auth-main { order: 2; }
  .auth-info { order: 3; width: min(590px, 100%); justify-self: center; margin-top: 8px; }
  .auth-lead { margin: 0; text-align: center; }
  .auth-points { gap: 18px; }
  .auth-card { max-width: 590px; }
  .dashboard-grid, .two-col, .settings-grid, .admin-layout, .advanced-filter-bar, .admin-bottom-panel, .account-layout, .explore-filters { grid-template-columns: 1fr; }
  .subscription-hero, .subscription-layout, .upgrade-hero { grid-template-columns: 1fr; }
  .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pro-insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pro-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; }
  .drawer { position: static; }
}

@media (max-width: 760px) {
  .app-body { display: block; min-height: 100vh; }
  .app-body.sidebar-open { overflow: hidden; }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    border: 0;
    background: var(--modal-backdrop);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }
  .app-body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(86vw, 320px);
    min-height: 100dvh;
    transform: translateX(-104%);
    transition: transform .28s cubic-bezier(.22, 1, .36, 1);
    box-shadow: 18px 0 44px rgba(15, 23, 42, .2);
    overflow-y: auto;
  }
  .app-body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-logo { height: 98px; justify-content: flex-start; padding: 16px 22px; }
  .sidebar-logo img { width: 132px; max-height: 78px; }
  .sidebar-close {
    position: absolute;
    top: 26px;
    right: 16px;
    z-index: 2;
    display: inline-flex;
    background: var(--surface);
    box-shadow: var(--panel-shadow);
  }
  .nav-list { grid-template-columns: 1fr; padding: 16px 12px; }
  .sidebar-user { display: flex; }
  .topbar { height: auto; min-height: 82px; flex-wrap: wrap; gap: 10px 12px; padding: 14px 16px 12px; }
  .mobile-top-logo {
    position: absolute;
    top: 12px;
    left: 50%;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(118px, 30vw, 158px);
    height: 50px;
    transform: translateX(-50%);
  }
  .mobile-top-logo img { display: block; width: 100%; max-height: 48px; object-fit: contain; }
  .menu-toggle { display: inline-flex; order: 0; margin-right: auto; }
  .top-actions { order: 0; margin-left: auto; }
  .top-search { order: 2; flex-basis: 100%; width: 100%; margin-right: 0; }
  .main-content { padding: 20px 16px 28px; }
  .welcome-panel { flex-direction: column; align-items: stretch; padding: 22px; }
  .code-card { width: 100%; transform: none; }
  .metric-grid, .integration-grid, .swatch-grid, .integration-row, .pro-insight-grid { grid-template-columns: 1fr; }
  .pro-actions { flex-direction: column; min-width: 0; }
  .pro-actions .button, .locked-dashboard .button { width: 100%; }
  .chart-box.large, .chart-box.small { height: 260px; }
  .pricing-grid, .billing-layout, .choice-cards, .two-inputs, .upgrade-page, .feature-metrics, .subscription-facts, .upgrade-proof-grid { grid-template-columns: 1fr; }
  .subscription-hero, .upgrade-hero { padding: 22px; }
  .subscription-hero-copy h2, .upgrade-hero-copy h1 { font-size: 28px; }
  .subscription-hero-actions .button, .upgrade-actions .button, .upgrade-story-panel .button { width: 100%; }
  .subscription-hero-visual, .upgrade-offer { min-height: auto; }
  .upgrade-story-panel { align-items: stretch; flex-direction: column; }
  .public-topbar { height: auto; align-items: stretch; flex-direction: column; padding: 14px 20px; }
  .public-topbar nav { flex-wrap: wrap; }
  .public-main { width: min(100% - 28px, 1120px); padding-top: 28px; }
  .explore-hero h1 { font-size: 34px; }
  .explore-search, .public-stats, .link-grid, .profile-public-head { grid-template-columns: 1fr; }
  .profile-public-stats { justify-content: stretch; }
  .profile-public-stats span { flex: 1 1 150px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar select, .toolbar .button { flex: 1 1 140px; }
  .responsive-table { display: none; }
  .user-card-list { display: grid; }
  .bookmark-card-list { display: grid; }
  .user-card .row-actions { display: grid; grid-template-columns: 1fr; }
  .user-card .button { width: 100%; }
  .pagination { align-items: flex-start; flex-direction: column; }
  .pagination div { flex-wrap: wrap; }
  .drawer { border-radius: var(--radius); }
  .drawer-head { min-height: 58px; }
  .page-head, .settings-head { align-items: stretch; flex-direction: column; }
  .page-head > .button, .settings-actions, .settings-actions .button { width: 100%; }
  .settings-actions { justify-content: stretch; }
  .unsaved-badge { justify-content: center; width: 100%; }
  .logo-upload { grid-template-columns: 1fr; }
  .logo-upload-actions { justify-items: stretch; }
  .logo-upload-actions .button { width: 100%; }
  .account-profile-card { grid-template-columns: 1fr; justify-items: start; }
  .account-submit, .account-avatar-form, .account-avatar-form .button { width: 100%; }
  .account-notification-grid { grid-template-columns: 1fr; max-width: none; }
  .subscription-status-head { align-items: stretch; flex-direction: column; }
  .subscription-invoices .responsive-table { display: block; }
  .color-control { grid-template-columns: 46px 1fr; }
  .auth-shell { width: min(100% - 24px, 590px); }
  .auth-card { padding: 24px; }
  .auth-title { align-items: flex-start; }
  .auth-title h1 { font-size: 26px; }
  .auth-switch { flex-direction: column; width: 100%; }
  .auth-switch .button { width: 100%; }
  .form-row { align-items: flex-start; flex-direction: column; }
  .preview-frame { grid-template-columns: 1fr; }
}

/* Surcharges finales : le thème source est conservé avant ce bloc. */
.wt-public-body { background: #F7F3EA; }
.wt-public-topbar { width: min(1280px, calc(100% - 48px)); height: 78px; min-height: 78px; position: relative; top: auto; z-index: auto; margin: 0 auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
.wt-public-main { width: 100%; max-width: none; margin: 0; padding: 0; }
.wt-app-body { background: #F7F3EA; }
.wt-sidebar { background: #0A1713; border-right: 0; }
.wt-topbar { background: rgba(247,243,234,.92); backdrop-filter: blur(14px); }
.wt-main-content { width: min(1300px, 100%); margin: 0 auto; padding: 38px 42px 60px; }
.search-result-type-badge.trip { color: #A64D33; background: #F6E2DA; }

/* Création de voyage : parcours volontairement minimal. */
.wt-create-page { width: min(820px, 100%); margin: 0 auto; }
.wt-create-head { margin-bottom: 28px; }
.wt-create-head .wt-back-link { width: fit-content; display: flex; margin-bottom: 18px; }
.wt-create-head h1 { margin: 9px 0 8px; font-family: Georgia, 'Times New Roman', serif; font-size: 44px; line-height: 1.05; letter-spacing: -.035em; }
.wt-create-head > p { max-width: 620px; margin: 0; color: var(--text-subtle); font-size: 17px; line-height: 1.5; }
.wt-create-trip-form { max-width: none; gap: 14px; }
.wt-create-trip-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); }
.wt-create-section { display: grid; gap: 22px; padding: 30px 32px; }
.wt-create-section + .wt-create-section { border-top: 1px solid var(--line); }
.wt-create-section-title { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; }
.wt-create-section-title h2 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 24px; line-height: 1.1; }
.wt-create-section-title p { margin: 5px 0 0; color: var(--text-subtle); }
.wt-create-icon, .wt-disclosure-icon { display: inline-grid; place-items: center; color: var(--primary); background: var(--primary-tint); }
.wt-create-icon { width: 44px; height: 44px; border-radius: 50%; }
.wt-create-icon svg, .wt-disclosure-icon svg { width: 20px; height: 20px; }
.wt-create-trip-card .field > span:first-child, .wt-disclosure-content .field > span:first-child { color: var(--text); font-size: 13px; }
.wt-input-wrap { position: relative; display: block; }
.wt-input-wrap > svg { position: absolute; left: 15px; top: 50%; z-index: 1; width: 19px; height: 19px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.wt-input-wrap input { height: 54px; padding: 0 16px 0 46px; color: var(--text); background: var(--input-bg); font-size: 16px; }
.wt-date-grid input { height: 50px; padding: 0 14px; }
.wt-field-help { display: flex; align-items: center; gap: 6px; color: var(--text-subtle) !important; font-size: 12px; font-weight: 500; }
.wt-field-help svg { width: 14px; height: 14px; color: var(--accent); }
.wt-field-help a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.wt-trip-duration { min-height: 20px; margin: -5px 0 0; color: var(--accent); font-size: 13px; font-weight: 750; }
.wt-form-disclosure { border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--surface); }
.wt-form-disclosure > summary { min-height: 76px; display: grid; grid-template-columns: 40px 1fr 22px; gap: 13px; align-items: center; padding: 12px 20px; list-style: none; cursor: pointer; }
.wt-form-disclosure > summary::-webkit-details-marker { display: none; }
.wt-form-disclosure > summary:hover { background: var(--hover-bg); }
.wt-form-disclosure > summary:focus-visible { outline-offset: 3px; }
.wt-disclosure-icon { width: 40px; height: 40px; border-radius: 9px; }
.wt-form-disclosure summary span:nth-child(2) { display: grid; gap: 3px; }
.wt-form-disclosure summary strong { font-size: 14px; }
.wt-form-disclosure summary small { color: var(--text-subtle); font-size: 12px; font-weight: 500; }
.wt-disclosure-chevron { color: var(--muted); transition: transform .18s ease; }
.wt-form-disclosure[open] .wt-disclosure-chevron { transform: rotate(180deg); }
.wt-disclosure-content { display: grid; gap: 17px; padding: 4px 20px 22px 73px; border-top: 1px solid var(--line); }
.wt-disclosure-content > .field:first-child, .wt-disclosure-content > .wt-form-grid:first-child { margin-top: 18px; }
.wt-disclosure-content textarea { min-height: 96px; color: var(--text); background: var(--input-bg); }
.wt-vehicle-grid { align-items: start; }
.wt-form-note { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--text-subtle); font-size: 12px; }
.wt-form-note svg { width: 15px; height: 15px; }
.wt-create-actions { align-items: center; padding-top: 5px; }
.wt-create-actions .button { min-height: 48px; }
.wt-create-actions .button.primary { min-width: 210px; }

[data-theme="dark"] .wt-app-body {
  --bg: #101814;
  --surface: #17231E;
  --surface-raised: #1B2923;
  --surface-soft: #1C2A24;
  --surface-subtle: #25372F;
  --surface-glass: rgba(23, 35, 30, .94);
  --input-bg: #101A16;
  --hover-bg: #203129;
  --text: #F3F6F4;
  --text-soft: #D4DDD8;
  --text-subtle: #A8B5AF;
  --line: #33483E;
  --line-strong: #496255;
  --muted: #A8B5AF;
  background: #101814;
  color-scheme: dark;
}
[data-theme="dark"] .wt-app-body .wt-topbar { background: rgba(16, 24, 20, .94); }
[data-theme="dark"] .wt-app-body .search-result-type-badge.trip { color: #F3B09A; background: rgba(201, 101, 69, .18); }

@media (max-width: 760px) {
  .wt-public-topbar { width: calc(100% - 28px); height: auto; min-height: 68px; }
  .wt-main-content { padding: 28px 16px 45px; }
  .wt-create-head { margin-bottom: 22px; }
  .wt-create-head h1 { font-size: 38px; }
  .wt-create-head > p { font-size: 15px; }
  .wt-create-section { padding: 23px 20px; }
  .wt-create-section-title { grid-template-columns: 40px 1fr; gap: 11px; }
  .wt-create-icon { width: 40px; height: 40px; }
  .wt-create-section-title h2 { font-size: 21px; }
  .wt-date-grid { grid-template-columns: 1fr !important; }
  .wt-form-disclosure > summary { grid-template-columns: 38px 1fr 18px; padding: 11px 14px; }
  .wt-disclosure-icon { width: 38px; height: 38px; }
  .wt-disclosure-content { padding: 2px 14px 18px; }
  .wt-vehicle-grid { grid-template-columns: 1fr !important; }
  .wt-create-actions { padding-top: 8px; }
  .wt-create-actions .button.primary { min-width: 0; }
}
