:root {
  --ink: #181e22;
  --muted: #667078;
  --line: #dce1e4;
  --soft: #f5f7f7;
  --white: #fff;
  --green: #148f5d;
  --green-hover: #107a4f;
  --green-soft: #e6f7ef;
  --orange: #e1842d;
  --orange-soft: #fff4e6;
  --blue: #3568da;
  --blue-soft: #eaf0fc;
  --sidebar-width: 220px;
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--white); }
body { margin: 0; color: var(--ink); background: var(--white); font-size: 14px; letter-spacing: 0; caret-color: transparent; }
button, a { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(20, 143, 93, .3); outline-offset: 2px; }
button, a, select, option, .brand-mark, .brand-copy, .nav-icon, .plan-badge, .status-badge, .tool-card, .metric-grid > div, .balance-row, .quota-label, .quota-track, .task-table th, .image-thumb { user-select: none; caret-color: transparent; }
input, textarea, [contenteditable="true"] { user-select: text; caret-color: auto; }
input[readonly], textarea[readonly] { cursor: default; user-select: none; caret-color: transparent; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); padding: 24px 14px 20px; display: flex; flex-direction: column; background: var(--soft); z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 10px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 6px; background: var(--green); color: var(--white); font-weight: 700; }
.brand-mark svg { width: 20px; height: 20px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font-family: "Segoe UI", sans-serif; font-size: 22px; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.side-nav { display: grid; gap: 6px; margin-top: 62px; }
.nav-item { min-height: 46px; padding: 0 14px; display: flex; align-items: center; gap: 14px; border-radius: 5px; color: var(--ink); text-decoration: none; font-weight: 600; }
.nav-item:hover { background: #edf1f0; }
.nav-item.active { color: var(--green); background: var(--green-soft); }
.nav-icon { width: 26px; height: 26px; display: grid; place-items: center; flex: 0 0 auto; color: var(--muted); }
.nav-icon svg { width: 18px; height: 18px; }
.nav-item.active .nav-icon { color: var(--green); }
.nav-group { display: grid; gap: 3px; }
.nav-children { position: relative; display: grid; }
.nav-children::before { content: ""; position: absolute; top: 0; bottom: 8px; left: 27px; width: 1px; background: var(--line); }
.nav-item.nav-child { min-height: 38px; margin-left: 22px; padding-left: 18px; font-size: 13px; font-weight: 500; }
.nav-item.nav-child .nav-icon { width: 18px; }
.nav-item.nav-child .nav-icon svg { width: 15px; height: 15px; }
.sidebar-footer { margin-top: auto; padding: 20px 10px 0; border-top: 1px solid var(--line); }
.quota-label { display: grid; gap: 10px; }
.quota-label span { color: var(--muted); font-size: 12px; }
.quota-label strong { font-size: 13px; }
.quota-track { height: 7px; margin: 14px 0 14px; overflow: hidden; border-radius: 999px; background: var(--line); }
.quota-track span { height: 100%; display: block; border-radius: inherit; background: var(--green); }
.text-action { padding: 0; border: 0; color: var(--muted); background: none; font-size: 12px; }
.text-action:hover { color: var(--green); }

.main-area { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { height: 78px; padding: 0 40px 0 32px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.account-area { position: relative; display: flex; align-items: center; gap: 18px; }
.plan-badge, .status-badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; white-space: nowrap; }
.plan-badge { min-width: 72px; height: 30px; color: var(--orange); background: var(--orange-soft); font-size: 12px; }
.account-button { padding: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--ink); font-weight: 600; }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--ink); }
.avatar svg { width: 22px; height: 22px; }
.account-menu { position: absolute; top: 50px; right: 0; width: 150px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); box-shadow: 0 12px 30px rgba(24, 30, 34, .12); z-index: 30; }
.account-menu button { width: 100%; padding: 10px; border: 0; border-radius: 4px; background: none; text-align: left; }
.account-menu button:hover { background: var(--soft); }
.notification-button { position: relative; width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--white); }
.notification-button svg { width: 18px; height: 18px; }
.notification-button i { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #c83d3d; }

.content { max-width: 1360px; margin: 0 auto; padding: 30px 32px 56px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading h2 { margin: 0; font-size: 26px; }
.category-tabs { height: 52px; margin-top: 8px; display: flex; align-items: stretch; gap: 8px; border-bottom: 1px solid var(--line); }
.category-tab { min-width: 80px; padding: 0 16px; position: relative; border: 0; color: var(--muted); background: none; font-weight: 600; }
.category-tab::after { content: ""; position: absolute; right: 10px; bottom: -1px; left: 10px; height: 3px; border-radius: 2px 2px 0 0; background: transparent; }
.category-tab:hover { color: var(--ink); }
.category-tab.active { color: var(--green); }
.category-tab.active::after { background: var(--green); }

.tool-grid { margin-top: 30px; display: grid; grid-template-columns: minmax(320px, 1.25fr) repeat(2, minmax(220px, 1fr)) minmax(170px, .65fr); gap: 28px; }
.tool-card { min-height: 250px; padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
.tool-card.available { border: 2px solid var(--green); }
.tool-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.tool-symbol, .placeholder-symbol { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 6px; font-size: 26px; font-weight: 700; }
.tool-symbol svg, .placeholder-symbol svg { width: 27px; height: 27px; }
.tool-symbol { color: var(--green); background: var(--green-soft); }
.placeholder-symbol { color: var(--muted); border: 1px solid var(--line); background: var(--white); }
.tool-card h3 { margin: 20px 0 10px; font-size: 24px; }
.tool-card p { min-height: 42px; margin: 0; color: var(--muted); line-height: 1.7; }
.tool-card.placeholder { background: var(--soft); }
.tool-card.placeholder h3 { margin-top: 20px; color: var(--muted); font-size: 15px; }
.tool-card.placeholder p { min-height: auto; font-size: 12px; }
.available-status { min-width: 64px; height: 28px; color: var(--green); background: var(--green-soft); font-size: 11px; }
.canceled-status { color: var(--muted); background: var(--soft); }
.primary-button, .secondary-button { min-height: 40px; padding: 0 20px; border-radius: 5px; font-weight: 600; }
.primary-button { border: 1px solid var(--green); color: var(--white); background: var(--green); }
.primary-button:hover { border-color: var(--green-hover); background: var(--green-hover); }
.tool-launch { margin-top: 14px; min-width: 150px; }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: var(--white); }
.secondary-button:hover { border-color: #aeb7bc; background: var(--soft); }
.empty-category { min-height: 250px; margin-top: 30px; display: grid; place-content: center; gap: 8px; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); text-align: center; }
.empty-category strong { color: var(--ink); }

.recent-section { margin-top: 56px; }
.recent-heading { margin-bottom: 20px; }
.task-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.task-table { width: 100%; min-width: 780px; border-collapse: collapse; }
.task-table th { height: 50px; padding: 0 24px; color: var(--muted); background: var(--soft); text-align: left; font-size: 12px; }
.task-table td { height: 110px; padding: 16px 24px; border-top: 1px solid var(--line); }
.task-table th:first-child { width: 34%; }
.task-table td strong, .task-table td small { display: block; }
.task-table td small { margin-top: 8px; color: var(--muted); font-size: 11px; }
.status-badge { min-width: 90px; height: 28px; padding: 0 10px; font-size: 11px; }
.completed { color: var(--green); background: var(--green-soft); }
.processing { color: var(--blue); background: var(--blue-soft); }
.queued { color: var(--orange); background: var(--orange-soft); }
.canceled { color: var(--muted); background: var(--soft); }
.task-actions { display: flex; align-items: center; gap: 18px; white-space: nowrap; }
.table-action { padding: 7px 0; border: 0; color: var(--green); background: none; font-weight: 600; }
.table-action:hover { color: var(--green-hover); text-decoration: underline; }
.mobile-task-list, .mobile-nav { display: none; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: min(380px, calc(100vw - 32px)); padding: 13px 18px; border-radius: 6px; color: var(--white); background: var(--ink); box-shadow: 0 10px 30px rgba(24,30,34,.22); z-index: 100; }

input, select { width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--white); font: inherit; }
textarea { width: 100%; padding: 12px 13px; resize: vertical; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--white); font: inherit; }
input:focus, select:focus { border-color: var(--green); outline: 3px solid rgba(20,143,93,.12); }
button:disabled { cursor: not-allowed; opacity: .48; }
.full-button { width: 100%; min-height: 46px; }
.text-link { padding: 0; border: 0; color: var(--green); background: none; }
.failed { color: var(--red); background: #fdecec; }

.auth-page { min-height: 100vh; padding: 56px 20px; position: relative; display: grid; place-items: center; overflow-x: hidden; overflow-y: auto; color: #edf7f2; background: #090d0c; font-family: "Segoe UI Variable", "Microsoft YaHei UI", system-ui, sans-serif; }
.auth-page::before { content: ""; width: min(940px, calc(100vw - 48px)); height: calc(100vh - 48px); position: absolute; inset: 24px auto auto 50%; transform: translateX(-50%); border: 1px solid #18221f; pointer-events: none; }
.auth-page::after { content: "WAYTO // ARTIFICIAL IMAGE INTELLIGENCE"; position: absolute; right: max(32px, calc((100vw - 940px) / 2 + 16px)); bottom: 34px; color: #52605b; font-family: "Cascadia Mono", Consolas, monospace; font-size: 10px; pointer-events: none; }
.auth-panel { width: min(486px, 100%); padding: 32px 38px 30px; position: relative; border: 1px solid #2a3c36; border-radius: 4px; background: #111816; box-shadow: 0 0 0 1px rgba(60,255,174,.03), 0 30px 90px rgba(0,0,0,.48), 0 0 50px rgba(33,204,132,.05); z-index: 1; }
.auth-panel::before, .auth-panel::after { content: ""; width: 24px; height: 24px; position: absolute; pointer-events: none; }
.auth-panel::before { top: -1px; left: -1px; border-top: 2px solid #42e39f; border-left: 2px solid #42e39f; }
.auth-panel::after { right: -1px; bottom: -1px; border-right: 2px solid #42e39f; border-bottom: 2px solid #42e39f; }
.auth-brand-row { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.auth-brand { width: max-content; margin: 0; }
.auth-brand .brand-mark { width: 38px; height: 38px; border: 1px solid #52f0ad; border-radius: 3px; color: #07100c; background: #42e39f; box-shadow: 0 0 18px rgba(66,227,159,.18); }
.auth-brand .brand-copy strong { color: #f3faf7; font-family: Bahnschrift, "Segoe UI Variable", sans-serif; font-size: 24px; font-weight: 600; }
.auth-product { padding: 6px 9px; border: 1px solid #2b493e; border-radius: 3px; color: #73dbaa; background: #14231e; font-family: "Cascadia Mono", Consolas, monospace; font-size: 9px; font-weight: 600; white-space: nowrap; }
.auth-system-line { margin: 24px 0 0; padding: 11px 0; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #202c28; border-bottom: 1px solid #202c28; color: #71807b; font-family: "Cascadia Mono", Consolas, monospace; font-size: 9px; }
.auth-system-line span { display: flex; align-items: center; gap: 7px; color: #62dca5; }
.auth-system-line i { width: 6px; height: 6px; border-radius: 50%; background: #42e39f; box-shadow: 0 0 10px rgba(66,227,159,.8); }
.auth-system-line b { font-weight: 500; }
.auth-heading { margin: 30px 0 27px; text-align: left; }
.auth-heading > span { display: block; margin-bottom: 10px; color: #58dca1; font-family: "Cascadia Mono", Consolas, monospace; font-size: 10px; font-weight: 600; }
.auth-heading h1 { margin: 0; color: #f5faf8; font-family: Bahnschrift, "Segoe UI Variable", "Microsoft YaHei UI", sans-serif; font-size: 30px; font-weight: 600; line-height: 1.25; }
.auth-heading p { margin: 10px 0 0; color: #87948f; font-size: 13px; }
.auth-panel form { display: grid; gap: 18px; }
.account-form { display: grid; gap: 20px; }
.auth-panel label { display: grid; gap: 8px; color: #a7b3ae; font-size: 11px; font-weight: 600; }
.account-form label, .settings-panel label, .select-field { display: grid; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.auth-panel input { height: 48px; border-color: #30403a; border-radius: 3px; color: #eef7f3; background: #0c1210; font-size: 13px; }
.auth-panel input::placeholder { color: #53605c; }
.auth-panel input:hover { border-color: #466057; background: #0d1512; }
.auth-panel input:focus { border-color: #42e39f; background: #0d1512; box-shadow: inset 3px 0 0 #42e39f, 0 0 18px rgba(66,227,159,.08); outline: 0; }
.inline-field { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
.auth-panel .inline-field .secondary-button { min-width: 118px; padding: 0 14px; border-color: #385047; color: #8fe6bc; background: #14211d; }
.auth-panel .inline-field .secondary-button:hover { border-color: #42e39f; background: #182a24; }
.field-help { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.5; }
.captcha-dialog { position: fixed; inset: 0; padding: 20px; display: grid; place-items: center; background: rgba(24,30,34,.55); z-index: 200; }
.captcha-panel { width: min(360px,100%); padding: 24px; display: grid; gap: 20px; justify-items: center; border-radius: 6px; background: var(--white); box-shadow: 0 18px 45px rgba(24,30,34,.25); }
.captcha-panel > strong { font-size: 18px; }
.auth-forgot { justify-self: end; margin-top: -8px; color: #63dca5; font-size: 11px; }
.auth-submit { width: 100%; min-height: 49px; margin-top: 3px; border-color: #42e39f; border-radius: 3px; color: #07120d; background: #42e39f; box-shadow: 0 0 24px rgba(66,227,159,.16); font-family: Bahnschrift, "Microsoft YaHei UI", sans-serif; }
.auth-submit:hover { border-color: #70f0b7; color: #06100b; background: #70f0b7; box-shadow: 0 0 30px rgba(66,227,159,.25); }
.auth-switch, .auth-legal { text-align: center; }
.auth-switch { margin: 24px 0 0; padding-top: 22px; border-top: 1px solid #26332f; color: #98a59f; }
.auth-switch a { color: #5fe0a5; font-weight: 600; }
.auth-legal { margin: 18px 0 0; color: #606d68; font-size: 10px; line-height: 1.7; }
.auth-legal a { color: #82938c; }

/* Light image-workspace authentication theme. Scoped to auth pages only. */
.auth-page { color: var(--ink); background: #eef2f1; font-family: Inter, "Segoe UI Variable", "Microsoft YaHei UI", system-ui, sans-serif; }
.auth-page::before { width: min(980px, calc(100vw - 48px)); height: calc(100vh - 48px); border-color: #dfe7e4; }
.auth-page::after { content: "WAYTO AI IMAGE TOOLS"; color: #91a09a; font-family: Inter, "Segoe UI", sans-serif; font-size: 9px; font-weight: 600; }
.auth-panel { width: min(470px, 100%); padding: 30px 36px 28px; border-color: #d5dedb; border-radius: 6px; background: var(--white); box-shadow: 0 26px 70px rgba(22,45,37,.10), 0 2px 8px rgba(22,45,37,.04); }
.auth-panel::before { width: 44px; height: 3px; top: -1px; left: 35px; border: 0; background: var(--green); }
.auth-panel::after { display: none; }
.auth-brand-row { min-height: 38px; }
.auth-brand .brand-mark { width: 38px; height: 38px; border: 0; border-radius: 5px; color: var(--white); background: var(--green); box-shadow: none; }
.auth-brand .brand-copy strong { color: var(--ink); font-family: Inter, "Segoe UI Variable", sans-serif; font-size: 23px; font-weight: 650; }
.auth-preview { height: 112px; margin: 26px 0 0; position: relative; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid #dce3e1; border-radius: 5px; background: #e7e9e8; }
.auth-preview figure { min-width: 0; margin: 0; position: relative; overflow: hidden; }
.auth-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.auth-preview figure:first-child img { object-position: 23% center; }
.auth-preview figure:last-child img { object-position: 74% center; }
.auth-preview figcaption { position: absolute; right: 10px; bottom: 9px; left: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.auth-preview figcaption span, .auth-preview figcaption strong { padding: 4px 6px; border-radius: 3px; background: rgba(255,255,255,.92); box-shadow: 0 1px 5px rgba(18,30,26,.10); font-size: 9px; }
.auth-preview figcaption span { color: var(--muted); }
.auth-preview figcaption strong { color: #174f3c; font-weight: 700; }
.auth-preview-divider { width: 1px; position: absolute; inset: 0 auto 0 50%; background: rgba(255,255,255,.9); z-index: 2; }
.auth-preview-divider i { width: 18px; height: 18px; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); border: 1px solid #cad5d1; border-radius: 50%; background: var(--white); box-shadow: 0 2px 8px rgba(20,40,33,.12); }
.auth-preview-divider i::before, .auth-preview-divider i::after { content: ""; width: 1px; height: 6px; position: absolute; top: 5px; background: #7e9189; }
.auth-preview-divider i::before { left: 6px; }
.auth-preview-divider i::after { right: 6px; }
.auth-heading { margin: 28px 0 24px; }
.auth-heading > span { margin-bottom: 8px; color: var(--green); font-family: Inter, "Segoe UI", sans-serif; font-size: 11px; }
.auth-heading h1 { color: var(--ink); font-family: Inter, "Segoe UI Variable", "Microsoft YaHei UI", sans-serif; font-size: 28px; font-weight: 650; }
.auth-heading p { color: var(--muted); }
.auth-panel label { color: #46524e; font-size: 12px; }
.auth-panel input { height: 46px; border-color: #cdd7d3; border-radius: 4px; color: var(--ink); background: #fbfcfc; }
.auth-panel input::placeholder { color: #929d99; }
.auth-panel input:hover { border-color: #a8b8b2; background: var(--white); }
.auth-panel input:focus { border-color: var(--green); color: var(--ink); background: var(--white); box-shadow: 0 0 0 1px var(--green); outline: 3px solid rgba(20,143,93,.10); }
.auth-panel .inline-field .secondary-button { border-color: #cdd7d3; color: #275f4c; background: #f5f8f7; }
.auth-panel .inline-field .secondary-button:hover { border-color: #9cafa7; background: #edf3f0; }
.auth-forgot { color: var(--green); }
.auth-submit { border-color: var(--green); color: var(--white); background: var(--green); box-shadow: 0 7px 20px rgba(20,143,93,.16); font-family: Inter, "Microsoft YaHei UI", sans-serif; }
.auth-submit:hover { border-color: var(--green-hover); color: var(--white); background: var(--green-hover); box-shadow: 0 9px 24px rgba(20,143,93,.20); }
.auth-switch { border-top-color: #e6ebe9; color: #56625e; }
.auth-switch a { color: var(--green); }
.auth-legal { color: #7c8883; }
.auth-legal a { color: #55766a; }

/* Keep authentication aligned with the original WayTo application UI. */
.auth-page { min-height: 100vh; padding: 48px 20px; display: grid; place-items: center; overflow: visible; color: var(--ink); background: var(--soft); font-family: inherit; }
.auth-page::before, .auth-page::after { display: none; }
.auth-panel { width: min(430px, 100%); min-width: 0; padding: 42px 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); box-shadow: none; }
.auth-panel::before, .auth-panel::after { display: none; }
.auth-brand { width: max-content; margin: 0 auto 38px; }
.auth-brand .brand-mark { width: 36px; height: 36px; border: 0; border-radius: 6px; color: var(--white); background: var(--green); box-shadow: none; }
.auth-brand .brand-copy strong { color: var(--ink); font-family: "Segoe UI", sans-serif; font-size: 22px; font-weight: 700; }
.auth-heading { margin: 0 0 28px; text-align: center; }
.auth-heading > span { display: none; }
.auth-heading h1 { margin: 0; color: var(--ink); font-family: inherit; font-size: 26px; font-weight: 700; }
.auth-heading p { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.auth-panel form { display: grid; gap: 20px; }
.auth-panel label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.auth-panel input { height: 44px; border-color: var(--line); border-radius: 5px; color: var(--ink); background: var(--white); font-size: 14px; }
.auth-panel .inline-field, .auth-panel .inline-field input { min-width: 0; }
.auth-panel input::placeholder { color: #8b949a; }
.auth-panel input:hover { border-color: var(--line); background: var(--white); }
.auth-panel input:focus { border-color: var(--green); color: var(--ink); background: var(--white); box-shadow: none; outline: 3px solid rgba(20,143,93,.12); }
.auth-panel .inline-field .secondary-button { min-width: 118px; min-height: 44px; padding: 0 20px; border-color: var(--line); border-radius: 5px; color: var(--ink); background: var(--white); }
.auth-panel .inline-field .secondary-button:hover { border-color: #aeb7bc; background: var(--soft); }
.auth-forgot { justify-self: end; margin-top: -10px; color: var(--green); font-size: 14px; }
.auth-submit { width: 100%; min-height: 48px; margin-top: 0; border-color: var(--green); border-radius: 5px; color: var(--white); background: var(--green); box-shadow: none; font-family: inherit; }
.auth-submit:hover { border-color: var(--green-hover); color: var(--white); background: var(--green-hover); box-shadow: none; }
.auth-switch, .auth-legal { text-align: center; }
.auth-switch { margin: 25px 0 0; padding: 0; border: 0; color: var(--ink); }
.auth-switch a { color: var(--green); font-weight: 600; }
.auth-legal { margin: 1em 0; color: var(--muted); font-size: 11px; line-height: normal; }
.auth-legal a { color: var(--green); }
.auth-legal { margin: 18px 0 0; color: var(--muted); font-size: 11px; }
.auth-legal a { color: var(--green); }

.translate-controls { min-height: 78px; padding: 14px 18px; display: grid; grid-template-columns: minmax(160px,220px) 40px minmax(160px,220px) 1fr; gap: 12px; align-items: end; border: 1px solid var(--line); border-radius: 6px; }
.translate-controls p { justify-self: end; margin: 0 0 13px; color: var(--muted); font-size: 12px; }
.swap-button { width: 40px; height: 44px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); font-size: 20px; }
.translate-layout, .result-layout { margin-top: 22px; display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 22px; align-items: stretch; }
.upload-panel { min-height: 560px; padding: 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #aeb8b3; border-radius: 6px; background: var(--soft); text-align: center; }
.upload-panel.dragging { border-color: var(--green); background: var(--green-soft); }
.upload-panel h2 { margin: 18px 0 8px; font-size: 22px; }
.upload-panel p { margin: 0 0 22px; color: var(--muted); }
.upload-symbol { width: 66px; height: 66px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--green); background: var(--white); font-size: 34px; }
.upload-panel.has-image { justify-content: space-between; }
.upload-panel.has-image > img { width: 100%; min-height: 0; max-height: 470px; object-fit: contain; }
.upload-file-bar { width: 100%; min-width: 0; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.upload-file-bar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-panel, .result-actions { padding: 24px; border: 1px solid var(--line); border-radius: 6px; }
.settings-panel h2, .result-actions h2 { margin: 0 0 24px; font-size: 20px; }
.settings-panel label { margin-bottom: 20px; }
.quota-box { margin: 26px 0 20px; padding: 18px; display: grid; gap: 7px; border-radius: 5px; background: var(--soft); }
.quota-box small, .quota-box span { color: var(--muted); }
.settings-panel .full-button + .full-button, .result-actions .full-button + .full-button { margin-top: 10px; }

.processing-page { min-height: 600px; display: grid; place-items: center; }
.processing-visual { width: min(500px,100%); text-align: center; }
.processing-visual h2 { margin: 24px 0 8px; font-size: 24px; }
.processing-visual p { color: var(--muted); }
.spinner { width: 58px; height: 58px; margin: auto; border: 5px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
.progress-track { height: 9px; margin: 30px 0 12px; overflow: hidden; border-radius: 99px; background: var(--line); }
.progress-track span { height: 100%; display: block; border-radius: inherit; background: var(--green); transition: width .25s ease; }
.processing-visual > strong { display: block; margin-bottom: 24px; }
.processing-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-toolbar { min-height: 54px; display: flex; align-items: center; gap: 16px; }
.view-toggle { margin-left: auto; display: flex; gap: 8px; }
.view-toggle .selected { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.comparison { min-height: 590px; padding: 18px; display: grid; gap: 16px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }
.comparison.side { grid-template-columns: repeat(2,minmax(0,1fr)); }
.comparison figure { width: 100%; margin: 0; }
.comparison figure > img, .translated-image > img { width: 100%; display: block; object-fit: contain; }
.comparison figure > img, .comparison figure .translated-image { height: min(58vh,510px); }
.comparison figure > img, .comparison figure .translated-image > img { object-fit: contain; }
.image-empty { height: min(58vh,510px); display: grid; place-items: center; padding: 20px; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); background: var(--white); text-align: center; }
.comparison figcaption { margin-top: 10px; color: var(--muted); text-align: center; }
.compare-stage { width: min(900px,100%); aspect-ratio: 4 / 3; position: relative; overflow: hidden; background: #e8ecea; }
.compare-stage > img, .translated-layer, .translated-image { position: absolute; inset: 0; width: 100%; height: 100%; }
.compare-stage > img, .translated-image img { width: 100%; height: 100%; object-fit: contain; }
.translated-layer { overflow: hidden; border-right: 3px solid var(--white); }
.translated-layer .translated-image { width: min(900px, calc((100vw - 618px))); min-width: 100%; }
.translated-image { position: relative; overflow: hidden; }
.translated-image span { position: absolute; top: 9%; left: 50%; padding: 8px 14px; transform: translateX(-50%); color: var(--white); background: rgba(24,30,34,.82); font-size: 18px; font-weight: 700; white-space: nowrap; }
.compare-stage input[type=range] { width: calc(100% - 30px); height: auto; position: absolute; right: 15px; bottom: 16px; left: 15px; accent-color: var(--green); }
.result-actions hr, .plan-card hr, .account-form hr { width: 100%; margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.result-language { margin-bottom: 20px; padding: 15px; display: grid; gap: 5px; background: var(--soft); }
.result-language small, .result-actions p { color: var(--muted); }
.result-actions h3 { margin: 0 0 14px; }
.result-actions .text-link { margin-top: 10px; text-align: left; }

.filter-bar { margin-bottom: 20px; display: grid; grid-template-columns: 160px 160px minmax(220px,1fr) auto; gap: 12px; }
.image-thumb { width: 60px; height: 48px; display: grid; place-items: center; border-radius: 4px; color: var(--muted); background: var(--soft); font-size: 11px; }
.image-thumb.has-preview { overflow: hidden; border: 1px solid var(--line); background: var(--white); }
.image-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-thumb.empty-thumb { border: 1px solid var(--line); }
.page-tasks .task-table th:first-child { width: auto; }

.balance-row { margin-bottom: 28px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 6px; }
.balance-row div { display: flex; align-items: center; gap: 16px; }
.balance-row small { color: var(--muted); }
.balance-row strong { font-size: 28px; }
.plan-grid { display: grid; grid-template-columns: repeat(3,minmax(180px,1fr)) minmax(190px,.9fr); gap: 18px; }
.formal-plan-grid { grid-template-columns: repeat(2,minmax(260px,360px)); }
.plan-card, .enterprise-card { min-height: 330px; padding: 24px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; }
.plan-card.featured { border: 2px solid var(--green); }
.plan-card .status-badge { align-self: flex-end; margin-bottom: -28px; }
.plan-card h3, .enterprise-card h3 { margin: 0 0 22px; }
.plan-count { font-size: 27px; }
.plan-count small { font-size: 14px; font-weight: 600; color: var(--muted); }
.plan-price { margin-top: 18px; font-size: 24px; }
.plan-price small { margin-right: 3px; font-size: 14px; }
.plan-card > small, .enterprise-card p { color: var(--muted); }
.plan-card p { margin: 5px 0; }
.plan-card button, .enterprise-card button { margin-top: auto; }
.enterprise-card { justify-content: center; background: var(--soft); }
.payment-section { margin-top: 42px; }
.payment-methods { padding: 18px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 6px; }
.payment-methods button { min-height: 42px; padding: 0 18px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); }
.payment-methods span { margin-left: auto; color: var(--muted); font-size: 12px; }
.alipay-label { color: #1677ff; }

.account-tabs { margin-bottom: 28px; display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.account-tabs button { min-height: 48px; padding: 0 22px; border: 0; border-bottom: 3px solid transparent; color: var(--muted); background: none; }
.account-tabs button.active { border-bottom-color: var(--green); color: var(--green); font-weight: 600; }
.account-form { max-width: 620px; }
.account-form button { justify-self: start; }
.readonly-value { width: 100%; min-height: 44px; padding: 0 13px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: var(--soft); cursor: default; user-select: none; caret-color: transparent; }
.account-profile { max-width: 680px; }
.security-section { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--line); }
.security-section h2 { margin: 0 0 18px; }
.security-list { display: grid; gap: 10px; }
.security-row { min-height: 76px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--line); border-radius: 6px; }
.security-row div { display: grid; gap: 6px; }
.security-row span { color: var(--muted); font-size: 12px; }
.modal-backdrop { position: fixed; inset: 0; padding: 20px; display: grid; place-items: center; background: rgba(24,30,34,.52); z-index: 300; }
.password-dialog { width: min(460px,100%); border-radius: 6px; background: var(--white); box-shadow: 0 20px 60px rgba(24,30,34,.28); }
.password-dialog header { padding: 22px 24px 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.password-dialog h2 { margin: 0; font-size: 20px; }
.password-dialog header p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.dialog-close { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 4px; color: var(--muted); background: transparent; font-size: 24px; line-height: 1; }
.dialog-close:hover { color: var(--ink); background: var(--soft); }
.dialog-fields { padding: 22px 24px; display: grid; gap: 18px; }
.dialog-fields label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.password-dialog footer { padding: 16px 24px 22px; display: flex; justify-content: flex-end; gap: 10px; }
.session-list { max-height: 340px; padding: 12px 24px; overflow-y: auto; }
.session-list > div { padding: 14px 0; display: grid; gap: 6px; border-bottom: 1px solid var(--line); }
.session-list span { color: var(--muted); font-size: 12px; }
.danger-button { min-height: 40px; padding: 0 20px; border: 1px solid #c83d3d; border-radius: 5px; color: #fff; background: #c83d3d; font-weight: 600; }
.danger-row strong { color: #a72f2f; }
.support-content { padding: 18px 24px; display: grid; gap: 14px; }
.support-content details { padding: 12px 0; border-bottom: 1px solid var(--line); }
.support-content summary { cursor: pointer; font-weight: 600; }
.support-content p { color: var(--muted); line-height: 1.7; }
.support-content label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.legal-page { min-height: 100vh; padding: 40px 24px 64px; background: #f7f8f8; }
.legal-page > .brand { width: max-content; margin: 0 auto 36px; }
.legal-page article { max-width: 900px; margin: auto; padding: 52px 64px 58px; border: 1px solid #e4e8e6; border-radius: 4px; background: var(--white); }
.legal-header { padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.legal-page article h1 { margin: 0; color: #202724; font-size: 30px; font-weight: 700; line-height: 1.35; }
.legal-updated { margin: 12px 0 0; color: #7b8581; font-size: 13px; }
.legal-intro { margin: 28px 0 0; padding: 16px 18px; border-left: 3px solid var(--green); color: #4f5b56; background: #f7faf8; font-size: 15px; line-height: 1.9; }
.legal-page section { padding: 30px 0 0; }
.legal-page section h2 { margin: 0 0 14px; color: #27312d; font-size: 18px; font-weight: 650; line-height: 1.5; }
.legal-page section p { margin: 0 0 12px; color: #4f5a56; font-size: 15px; line-height: 1.95; text-align: justify; }
.legal-page section p:last-child { margin-bottom: 0; }
.legal-back { margin-top: 24px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.legal-back svg { width: 16px; height: 16px; }
.admin-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.admin-metrics > div { padding: 20px; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 6px; }
.admin-metrics strong { font-size: 26px; }
.admin-section { margin-top: 32px; }
.admin-adjust { display: grid; grid-template-columns: 1.2fr .7fr 1.5fr auto; gap: 10px; }
.page-account .metric-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.simple-list { border: 1px solid var(--line); border-radius: 6px; }
.simple-list > div { min-height: 78px; padding: 16px 20px; display: grid; grid-template-columns: 1fr auto auto; gap: 24px; align-items: center; border-top: 1px solid var(--line); }
.simple-list > div:first-child { border-top: 0; }
.simple-list span:not(.status-badge) { color: var(--muted); }
.order-list span:first-child { display: grid; gap: 6px; color: var(--ink); }
.order-list small,.admin-section small { color: var(--muted); font-size: 11px; }
.credit-ledger { border: 1px solid var(--line); border-radius: 6px; }
.credit-ledger > div { min-height: 66px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); }
.credit-ledger > div:first-child { border-top: 0; }
.credit-ledger span { display: grid; gap: 5px; }
.credit-ledger small { color: var(--muted); font-size: 11px; }
.empty-state { min-height: 320px; display: grid; place-content: center; text-align: center; border: 1px dashed var(--line); border-radius: 6px; }
.empty-state p { color: var(--muted); }
.empty-state.compact { min-height: 180px; }
.empty-state button { justify-self: center; }
.metric-grid { margin: 20px 0 28px; display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.metric-grid > div { padding: 20px; display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 6px; }
.metric-grid small { color: var(--muted); }
.metric-grid strong { font-size: 25px; }
.metric-grid .green { color: var(--green); }
.metric-grid .orange { color: var(--orange); }
.usage-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 20px; }
.usage-layout > div, .rules { padding: 22px; border: 1px solid var(--line); border-radius: 6px; }
.usage-layout h2 { margin-top: 0; }
.usage-chart { height: 180px; padding: 15px 8px 0; display: flex; align-items: end; justify-content: space-around; gap: 8px; border-bottom: 1px solid var(--line); }
.usage-chart span { width: min(34px,7%); min-height: 4px; background: var(--green); }
.rules p { color: var(--muted); line-height: 1.7; }

@media (max-width: 1180px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
  .compact-placeholder { display: none; }
  .plan-grid { grid-template-columns: repeat(2,minmax(220px,1fr)); }
  .translate-controls { grid-template-columns: minmax(140px,1fr) 40px minmax(140px,1fr); }
  .translate-controls p { grid-column: 1 / -1; justify-self: start; margin: 0; }
}

@media (max-width: 760px) {
  :root { --mobile-safe-right: 18px; }
  html, body { overflow-x: hidden; }
  body { padding-bottom: 66px; }
  .sidebar { display: none; }
  .main-area { width: calc(100% - var(--mobile-safe-right)); min-width: 0; margin-left: 0; overflow-x: clip; }
  .topbar { height: 64px; padding: 0 18px; position: relative; }
  .topbar h1 { font-size: 21px; }
  .topbar p, .plan-badge, .account-name { display: none; }
  .account-area { display: none; }
  .avatar { width: 34px; height: 34px; }
  .content { width: 100%; max-width: 100%; min-width: 0; margin: 0; padding: 24px 18px 34px; }
  .content section { width: 100%; min-width: 0; max-width: 100%; }
  .section-heading h2 { font-size: 24px; }
  .category-tabs { overflow-x: auto; }
  .category-tab { min-width: 70px; padding: 0 8px; }
  .tool-grid { min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 20px; }
  .tool-card { min-width: 0; min-height: auto; }
  .tool-card.placeholder { display: none; }
  .tool-card h3 { font-size: 22px; }
  .tool-launch { width: 100%; min-height: 46px; }
  .recent-section { margin-top: 40px; }
  .recent-heading { align-items: flex-end; }
  .recent-heading .secondary-button { display: none; }
  .task-table-wrap { display: none; }
  .mobile-task-list { display: grid; gap: 10px; }
  .task-row { min-width: 0; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 6px; }
  .task-row > div { min-width: 0; }
  .task-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .task-row strong, .task-row small { display: block; }
  .task-row small { margin-top: 6px; color: var(--muted); font-size: 11px; }
  .task-row .task-actions { grid-column: 1 / -1; align-items: flex-start; gap: 14px 18px; flex-wrap: wrap; }
  .task-row .table-action { text-align: left; }
  .mobile-nav { position: fixed; right: var(--mobile-safe-right); bottom: 0; left: 0; height: 66px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: var(--white); z-index: 50; }
  .mobile-nav a { display: grid; place-content: center; gap: 4px; color: var(--muted); text-decoration: none; text-align: center; font-size: 11px; }
  .mobile-nav a span { height: 20px; display: grid; place-items: center; }
  .mobile-nav a svg { width: 18px; height: 18px; }
  .mobile-nav a.active { color: var(--green); }
  .toast { right: 16px; bottom: 82px; left: 16px; max-width: none; }
  .auth-page { width: calc(100% - var(--mobile-safe-right)); padding: 24px 18px; background: var(--white); }
  .auth-page::before { display: none; }
  .auth-page::after { display: none; }
  .auth-panel { width: 100%; max-width: 100%; padding: 28px 4px; justify-self: stretch; border: 0; background: var(--white); box-shadow: none; }
  .auth-panel::before, .auth-panel::after { display: none; }
  .auth-heading { margin-top: 0; }
  .translate-controls { padding: 12px; grid-template-columns: minmax(0,1fr) 36px minmax(0,1fr); }
  .swap-button { width: 36px; }
  .translate-controls p { font-size: 11px; }
  .translate-layout, .result-layout, .usage-layout { grid-template-columns: minmax(0,1fr); }
  .upload-panel { min-height: 350px; padding: 24px 16px; }
  .upload-panel.has-image > img { max-height: 360px; }
  .settings-panel, .result-actions { padding: 20px; }
  .processing-page { min-height: 520px; }
  .result-toolbar { flex-wrap: wrap; }
  .view-toggle { width: 100%; margin-left: 0; }
  .view-toggle button { flex: 1; }
  .comparison { min-height: 360px; padding: 10px; }
  .comparison.side { grid-template-columns: minmax(0,1fr); }
  .comparison figure > img, .comparison figure .translated-image { height: 280px; }
  .image-empty { height: 280px; }
  .compare-stage { aspect-ratio: 4 / 3; }
  .translated-layer .translated-image { width: calc(100vw - 56px); }
  .translated-image span { font-size: 12px; }
  .filter-bar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filter-bar input, .filter-bar .primary-button { grid-column: 1 / -1; }
  .plan-grid { grid-template-columns: minmax(0,1fr); }
  .plan-card, .enterprise-card { min-height: 300px; }
  .payment-methods { align-items: stretch; flex-direction: column; }
  .payment-methods span { margin: 8px 0 0; }
  .account-tabs { overflow-x: auto; }
  .account-tabs button { flex: 0 0 auto; padding: 0 14px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .page-account .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric-grid > div { padding: 16px; }
  .admin-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .admin-metrics > div { padding: 16px; }
  .admin-adjust { grid-template-columns: minmax(0,1fr); }
  .admin-adjust .primary-button { width: 100%; }
  .simple-list > div { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  .simple-list .status-badge { grid-column: 1 / -1; justify-self: start; }
  .security-row { align-items: stretch; flex-direction: column; }
  .security-row button { align-self: flex-start; }
  .password-dialog header, .dialog-fields { padding-right: 20px; padding-left: 20px; }
  .password-dialog footer { padding-right: 20px; padding-left: 20px; }
  .legal-page { padding: 24px 14px 40px; }
  .legal-page > .brand { margin-bottom: 24px; }
  .legal-page article { padding: 30px 22px 36px; }
  .legal-page article h1 { font-size: 25px; }
  .legal-header { padding-bottom: 24px; }
  .legal-intro { margin-top: 22px; padding: 14px; }
  .legal-page section { padding-top: 26px; }
  .legal-page section h2 { font-size: 17px; }
  .legal-page section p { font-size: 14px; text-align: left; }
}

/* WayTo production color and typography system. */
:root {
  --ink: #18332b;
  --muted: #587269;
  --line: #b8dccc;
  --soft: #eaf7f1;
  --white: #f8fffb;
  --green: #087f61;
  --green-hover: #056a51;
  --green-soft: #d9f2e7;
  --orange: #b85835;
  --orange-soft: #ffeadf;
  --blue: #3568b8;
  --blue-soft: #e1edff;
  --red: #b7414e;
  font-family: "Segoe UI Variable Text", "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei UI", sans-serif;
}

html { background: #e6f4ee; }
body {
  color: var(--ink);
  background: linear-gradient(135deg, #e5f6ee 0%, #eaf3ff 56%, #ffede4 100%);
  background-attachment: fixed;
  font-family: "Segoe UI Variable Text", "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  font-weight: 400;
  line-height: 1.55;
}
h1, h2, h3, .brand-copy strong { font-family: "Segoe UI Variable Display", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", sans-serif; font-weight: 680; }
button, input, select, textarea { font-family: inherit; }
button:focus-visible, a:focus-visible { outline-color: rgba(8, 127, 97, .34); }

.sidebar { background: linear-gradient(180deg, #d9f1e7 0%, #dfedff 72%, #ffe8dc 100%); border-right: 1px solid #acd4c4; }
.topbar { border-bottom-color: #b4d8cb; background: rgba(232, 248, 241, .82); backdrop-filter: blur(16px); }
.main-area { background: linear-gradient(145deg, rgba(235, 249, 243, .8), rgba(235, 243, 255, .72) 62%, rgba(255, 237, 228, .62)); }
.nav-item:hover, .account-menu button:hover, .dialog-close:hover { background: #cfe8dc; }
.nav-item.active { background: #c9eadc; }
.nav-children::before, .sidebar-footer, .category-tabs, .account-tabs, .security-section { border-color: #add5c6; }
.quota-track { background: #bddbcf; }
.quota-track span { background: linear-gradient(90deg, #087f61, #327ab8); }

.brand-mark { color: #f3fff9; background: linear-gradient(145deg, #087f61, #2c70ad); box-shadow: 0 8px 18px rgba(19, 91, 82, .18); }
.plan-badge { color: #9c452b; background: #ffe4d6; }
.avatar, .notification-button { border-color: #9fcebd; background: #e2f4ec; }
.account-menu { border-color: #a9d2c3; background: #effaf5; box-shadow: 0 14px 34px rgba(25, 84, 68, .18); }
.notification-button i { background: #d84d5b; }

.tool-card, .plan-card, .enterprise-card, .balance-row, .settings-panel, .result-actions, .security-row,
.payment-methods, .task-table-wrap, .filter-bar, .metric-grid > div, .rules, .empty-state, .task-row {
  border-color: #abd5c4;
  background: linear-gradient(145deg, #f0fcf6, #edf4ff);
  box-shadow: 0 8px 24px rgba(34, 105, 83, .07);
}
.tool-card.available { border-color: #269675; background: linear-gradient(145deg, #ddf6ea, #e4efff 68%, #ffede3); }
.tool-symbol { color: #087f61; background: #ccebdd; }
.available-status, .completed { color: #087257; background: #cdebdc; }
.processing { color: #285f9d; background: #d7e7ff; }
.canceled-status, .failed { color: #9d3e49; background: #ffe1df; }
.category-tab.active::after { background: linear-gradient(90deg, #087f61, #3976b8); }
.category-tab:hover { background: #dceee6; }
.task-table th { background: #dcefe7; }
.task-table td { border-color: #bdddcf; background: rgba(240, 251, 246, .72); }
.image-thumb, .readonly-value, .quota-box, .result-language { background: #dfeee8; border-color: #b4d5c8; }

.primary-button { border-color: #087f61; color: #f3fff9; background: linear-gradient(135deg, #087f61, #176fa0); box-shadow: 0 6px 14px rgba(8, 105, 81, .14); }
.primary-button:hover { border-color: #056a51; background: linear-gradient(135deg, #056a51, #245e96); }
.secondary-button, .swap-button { border-color: #9bc9b8; background: #e7f5ef; }
.secondary-button:hover, .swap-button:hover { border-color: #79ad9a; background: #d9eee5; }
.danger-button { border-color: #b7414e; color: #fff4f2; background: #b7414e; }
.toast { color: #effff8; background: #175b4d; box-shadow: 0 12px 32px rgba(12, 76, 61, .28); }

input, select, textarea { border-color: #a9d0c1; background: #effaf5; }
input:hover, select:hover, textarea:hover { border-color: #83b7a4; background: #e8f6f0; }
input:focus, select:focus, textarea:focus { border-color: #087f61; background: #f1fbf7; outline-color: rgba(8, 127, 97, .13); }

.auth-page { background: linear-gradient(135deg, #dcf2e8 0%, #e4efff 58%, #ffe8dc 100%); }
.auth-panel { border-color: #a7d1c1; background: linear-gradient(155deg, #effbf5, #edf4ff 72%, #fff0e8); box-shadow: 0 22px 56px rgba(28, 91, 73, .14); }
.auth-panel input { border-color: #a6cfbf; background: #eaf7f1; }
.auth-panel input:hover, .auth-panel input:focus { background: #f0faf6; }
.auth-panel .inline-field .secondary-button { border-color: #9bc8b7; background: #dff1e9; }
.captcha-dialog, .modal-backdrop { background: rgba(25, 72, 61, .58); }
.captcha-panel, .password-dialog { border: 1px solid #a5d0c0; background: linear-gradient(145deg, #effbf5, #eaf2ff); box-shadow: 0 20px 60px rgba(20, 77, 63, .24); }
.password-dialog header, .session-list > div, .support-content details { border-color: #b4d7ca; }

.translate-controls { border-color: #a8d2c2; background: linear-gradient(90deg, #e1f5ec, #e5efff); }
.upload-panel { border-color: #85bba7; background: linear-gradient(145deg, #def3e9, #e3efff); }
.upload-panel.dragging { background: #ccecdc; }
.upload-symbol { border-color: #92c4b1; background: #d5eee3; }
.comparison { border-color: #a9d2c3; background: linear-gradient(145deg, #dcefe7, #e1ebfa); }
.compare-stage { background: #d5e9e1; }
.translated-layer { border-right-color: #c6eddd; }
.translated-image span { color: #effff8; background: rgba(16, 83, 68, .88); }
.payment-methods { background: linear-gradient(90deg, #e4f5ed, #e4edff); }

.legal-page { background: linear-gradient(135deg, #dcefe7 0%, #e4edfc 62%, #fbe4d9 100%); }
.legal-layout { max-width: 1180px; margin: auto; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.legal-toc { max-height: calc(100vh - 48px); padding: 22px 18px; position: sticky; top: 24px; overflow-y: auto; border: 1px solid #a9d1c2; border-radius: 5px; background: linear-gradient(160deg, #e7f6ef, #e5edfb); }
.legal-toc > strong { display: block; margin-bottom: 14px; font-size: 15px; }
.legal-toc nav { display: grid; gap: 2px; }
.legal-toc a { padding: 7px 8px; display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 5px; border-radius: 4px; color: #526d64; text-decoration: none; font-size: 12px; line-height: 1.45; }
.legal-toc a:hover { color: #087f61; background: #ceeadd; }
.legal-toc a span { color: #087f61; font-variant-numeric: tabular-nums; }
.legal-page article { max-width: none; margin: 0; border-color: #a9d2c3; background: linear-gradient(155deg, #effaf5, #edf3ff 72%, #fff0e8); }
.legal-header { border-color: #acd2c4; }
.legal-intro { border-color: #087f61; background: #dff2e9; }
.legal-page section { scroll-margin-top: 24px; }
.legal-page section h2 { display: flex; align-items: baseline; gap: 10px; }
.legal-page section h2 span { min-width: 28px; color: #087f61; font-size: 13px; font-variant-numeric: tabular-nums; }

@media (max-width: 800px) {
  .legal-layout { display: block; }
  .legal-toc { display: none; }
  .mobile-nav { border-color: #a9d2c3; background: linear-gradient(90deg, #def2e9, #e3edfb); }
  .auth-page { background: linear-gradient(160deg, #e2f5ec, #e7effe 70%, #ffede4); }
  .auth-panel { background: transparent; box-shadow: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .tool-card, .primary-button, .secondary-button { transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
  .tool-card.available:hover { transform: translateY(-2px); }
}

/* WayTo warm navigation theme, based on design option 06. */
:root {
  --ink: #18332b;
  --muted: #63756e;
  --line: #c9ded3;
  --soft: #f3faf6;
  --white: #fffefa;
  --green: #148f5d;
  --green-hover: #0d7550;
  --green-soft: #e4f8ee;
  --orange: #d8872f;
  --orange-soft: #fff1df;
  --blue: #3568b8;
  --blue-soft: #eaf1ff;
  --red: #b7414e;
}

html { background: #f7fbf8; }
body {
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 247, 235, .5), rgba(226, 248, 238, .38) 46%, rgba(255, 254, 250, .76) 100%);
  background-attachment: fixed;
}

.sidebar {
  color: var(--ink);
  background: linear-gradient(30deg, #fff7eb 0%, #f2faef 45%, #e2f8ee 100%);
  border-right: 1px solid #cfe2d6;
}
.sidebar .brand { color: var(--ink); }
.sidebar .brand-copy small,
.quota-label span,
.text-action { color: #66776f; }
.nav-item { color: #223d34; }
.nav-icon { color: #5f746b; }
.nav-item:hover {
  color: #0f6f50;
  background: linear-gradient(90deg, rgba(255, 244, 229, .86), rgba(222, 247, 236, .62));
}
.nav-item.active {
  color: var(--green);
  background: linear-gradient(135deg, #ffecd5 0%, #d2f6e7 100%);
  box-shadow: inset 0 0 0 1px rgba(20, 143, 93, .08);
}
.nav-item.active .nav-icon { color: var(--green); }
.nav-children::before {
  background: linear-gradient(180deg, rgba(216, 135, 47, .4), rgba(20, 143, 93, .2));
}
.sidebar-footer { border-color: rgba(189, 213, 201, .85); }
.quota-track { background: #d9e6df; }
.quota-track span { background: linear-gradient(90deg, #d8872f 0%, #148f5d 100%); }

.brand-mark {
  color: #fffefa;
  background: linear-gradient(90deg, #148f5d 0%, #d8872f 100%);
  box-shadow: 0 8px 18px rgba(95, 114, 64, .16);
}
.topbar {
  border-bottom-color: #d7e4dc;
  background: rgba(255, 254, 250, .9);
  backdrop-filter: blur(16px);
}
.main-area {
  background:
    linear-gradient(180deg, rgba(255, 254, 250, .88) 0%, rgba(246, 252, 248, .88) 100%);
}
.account-menu {
  border-color: #c3dccf;
  background: linear-gradient(160deg, #fffefa 0%, #eefaf3 100%);
  box-shadow: 0 14px 34px rgba(71, 103, 86, .16);
}
.account-menu button:hover,
.dialog-close:hover { background: #e4f5ec; }
.plan-badge {
  color: #a45d22;
  background: linear-gradient(90deg, #fff1df 0%, #fff8ee 100%);
}
.avatar,
.notification-button {
  border-color: #c7ddcf;
  background: linear-gradient(180deg, #fffefa 0%, #edf8f2 100%);
}
.notification-button i { background: #c94a4a; }

.category-tabs,
.account-tabs,
.security-section { border-color: #d1e2d8; }
.category-tab:hover { background: #f2f8f4; }
.category-tab.active::after,
.account-tabs button.active {
  border-bottom-color: var(--green);
}
.category-tab.active::after {
  background: linear-gradient(90deg, #148f5d 0%, #d8872f 100%);
}

.tool-card,
.plan-card,
.enterprise-card,
.settings-panel,
.result-actions,
.balance-row,
.metric-grid > div,
.rules,
.security-row,
.empty-state,
.task-row {
  border-color: #c5dccf;
  background: linear-gradient(180deg, #fffefa 0%, #f4fbf7 100%);
  box-shadow: 0 8px 24px rgba(71, 103, 86, .06);
}
.tool-card.available {
  border-color: #148f5d;
  background: linear-gradient(25deg, rgba(226, 248, 238, .9) 0%, rgba(255, 246, 234, .72) 100%);
}
.tool-symbol {
  color: #148f5d;
  background: linear-gradient(180deg, #ddf7e9 0%, #fff7eb 100%);
}
.placeholder-symbol {
  border-color: #d4e3da;
  background: linear-gradient(90deg, #fffefa 0%, #eef8f2 100%);
}
.tool-card.placeholder,
.enterprise-card {
  background: linear-gradient(0deg, #f7fbf8 0%, #fff9ee 100%);
}
.available-status,
.completed {
  color: #0d7550;
  background: linear-gradient(90deg, #e1f8eb 0%, #fff5e8 100%);
}
.processing {
  color: #2d65a6;
  background: linear-gradient(90deg, #e9f1ff 0%, #f6fbff 100%);
}
.canceled-status,
.failed {
  color: #a54449;
  background: linear-gradient(90deg, #ffe9e4 0%, #fff6ef 100%);
}

.task-table-wrap {
  border-color: #c7ddd1;
  background: #fffefa;
}
.task-table th {
  color: #60746b;
  background: linear-gradient(45deg, #f4fbf7 0%, #fff5e8 100%);
}
.task-table td {
  border-color: #d7e5dd;
  background: rgba(255, 254, 250, .82);
}
.image-thumb,
.readonly-value,
.quota-box,
.result-language {
  border-color: #c4ddcf;
  background: linear-gradient(135deg, #f0faf4 0%, #fff7ec 100%);
}

.primary-button {
  border-color: #148f5d;
  color: #fffefa;
  background: linear-gradient(135deg, #148f5d 0%, #2ca878 100%);
  box-shadow: 0 6px 14px rgba(20, 143, 93, .14);
}
.primary-button:hover {
  border-color: #0d7550;
  background: linear-gradient(135deg, #0d7550 0%, #228f66 100%);
}
.secondary-button,
.swap-button {
  border-color: #bdd8ca;
  color: #1f3c33;
  background: linear-gradient(180deg, #fffefa 0%, #edf8f2 100%);
}
.secondary-button:hover,
.swap-button:hover {
  border-color: #9fc6b2;
  background: linear-gradient(180deg, #f8fff9 0%, #e1f4ea 100%);
}
.danger-button {
  border-color: #b7414e;
  color: #fff8f4;
  background: linear-gradient(135deg, #b7414e 0%, #d8872f 100%);
}
.toast {
  color: #fffefa;
  background: #155f49;
  box-shadow: 0 12px 32px rgba(18, 88, 67, .28);
}

input,
select,
textarea {
  border-color: #c1d9cb;
  background: #fffefa;
}
input:hover,
select:hover,
textarea:hover { border-color: #9ec8b2; background: #f7fdf9; }
input:focus,
select:focus,
textarea:focus {
  border-color: #148f5d;
  background: #fffefa;
  outline-color: rgba(20, 143, 93, .14);
}

.auth-page {
  color: var(--ink);
  background: linear-gradient(30deg, #fff7eb 0%, #f2faef 46%, #e2f8ee 100%);
}
.auth-page::before { border-color: rgba(197, 220, 207, .75); }
.auth-page::after { color: #8b9e95; }
.auth-panel {
  border-color: #c5dccf;
  background: linear-gradient(155deg, #fffefa 0%, #f0faf4 60%, #fff4e4 100%);
  box-shadow: 0 22px 56px rgba(80, 113, 93, .14);
}
.auth-panel input { border-color: #c1d9cb; background: #fffefa; }
.auth-panel input:hover,
.auth-panel input:focus { background: #f7fdf9; }
.auth-system-line { border-color: #d4e5dc; color: #758981; }
.auth-heading > span { color: var(--green); }
.captcha-dialog,
.modal-backdrop { background: rgba(33, 78, 63, .48); }
.captcha-panel,
.password-dialog {
  border: 1px solid #c4dccf;
  background: linear-gradient(145deg, #fffefa 0%, #edf8f2 72%, #fff3e3 100%);
  box-shadow: 0 20px 60px rgba(50, 88, 72, .22);
}
.password-dialog header,
.session-list > div,
.support-content details { border-color: #d3e4da; }

.translate-controls {
  border-color: #c4dccf;
  background: linear-gradient(90deg, #fff6e9 0%, #e7f8ef 100%);
}
.upload-panel {
  border-color: #a4cdb8;
  background: linear-gradient(135deg, #f0fbf5 0%, #fff7eb 100%);
}
.upload-panel.dragging { background: #e3f6ec; }
.upload-symbol {
  border-color: #b7d6c6;
  background: linear-gradient(180deg, #e2f8ee 0%, #fff6ea 100%);
}
.comparison {
  border-color: #c5dccf;
  background: linear-gradient(0deg, #eef8f2 0%, #fff7eb 100%);
}
.compare-stage { background: #e9f4ee; }
.translated-layer { border-right-color: #f1c792; }
.translated-image span {
  color: #fffefa;
  background: rgba(17, 94, 70, .88);
}
.payment-methods {
  background: linear-gradient(90deg, #fff4e5 0%, #e7f8ef 100%);
}
.filter-bar {
  border-color: #c5dccf;
  background: linear-gradient(90deg, #fff7eb 0%, #edf8f2 100%);
  box-shadow: 0 8px 24px rgba(71, 103, 86, .05);
}
.simple-list,
.credit-ledger {
  border-color: #c7ddd1;
  background: #fffefa;
}
.simple-list > div,
.credit-ledger > div {
  border-color: #d7e5dd;
  background: rgba(255, 254, 250, .82);
}
.simple-list > div:nth-child(even),
.credit-ledger > div:nth-child(even) {
  background: linear-gradient(90deg, rgba(244, 251, 247, .72) 0%, rgba(255, 247, 235, .38) 100%);
}
.account-form {
  color: var(--ink);
}
.account-form label,
.settings-panel label,
.select-field {
  color: #60746b;
}

.legal-page {
  background: linear-gradient(30deg, #fff7eb 0%, #f6fbf5 48%, #e2f8ee 100%);
}
.legal-toc {
  border-color: #c5dccf;
  background: linear-gradient(180deg, #fffefa 0%, #edf8f2 100%);
}
.legal-toc a:hover {
  color: #148f5d;
  background: linear-gradient(90deg, #fff1df 0%, #e4f8ee 100%);
}
.legal-toc a span,
.legal-page section h2 span { color: #148f5d; }
.legal-page article {
  border-color: #c5dccf;
  background: linear-gradient(155deg, #fffefa 0%, #f0faf4 72%, #fff4e4 100%);
}
.legal-header { border-color: #d3e4da; }
.legal-intro {
  border-color: #148f5d;
  background: linear-gradient(90deg, #e6f8ee 0%, #fff5e7 100%);
}

@media (max-width: 800px) {
  body { background: linear-gradient(180deg, #fffefa 0%, #f0faf4 100%); }
  .mobile-nav {
    border-color: #c8ded2;
    background: linear-gradient(90deg, #fff7eb 0%, #e2f8ee 100%);
  }
  .mobile-nav a.active { color: #148f5d; }
  .auth-page { background: linear-gradient(30deg, #fff7eb 0%, #e2f8ee 100%); }
  .auth-panel { background: transparent; box-shadow: none; }
}
