:root {
  color-scheme: light;
  --ink: #17211d;
  --ink-2: #26342e;
  --paper: #f3f0e7;
  --paper-2: #faf8f1;
  --line: #d7d5ca;
  --muted: #777b73;
  --accent: #c9f27c;
  --danger: #b53a43;
  --shadow: 0 24px 80px rgba(23, 33, 29, 0.16);
  font-family: "Segoe UI Variable", "Aptos", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-height: 100vh; overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(73, 132, 93, .28); outline-offset: 2px; }
.hidden { display: none !important; }

.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.eyebrow.dark { color: #667068; }
.button { min-height: 43px; border: 0; border-radius: 5px; padding: 0 18px; font-size: 13px; font-weight: 750; transition: transform .18s, background .18s, color .18s; }
.button:hover { transform: translateY(-1px); }
.button-accent { background: var(--accent); color: var(--ink); }
.button-accent-dark { background: var(--ink); color: var(--accent); }
.button-dark { background: var(--ink); color: white; }
.button-outline { border: 1px solid #b9bdb5; background: transparent; color: var(--ink); }
.button-ghost { background: transparent; color: #626760; }
.button-danger { border: 1px solid #e0bdc0; color: var(--danger); background: #fff7f7; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 6px; background: transparent; display: grid; place-items: center; font-weight: 800; }
.icon-button:hover { background: rgba(23, 33, 29, .08); }
.icon-button.light { color: white; }
.icon-button.light:hover { background: rgba(255,255,255,.12); }

/* Login */
.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.1fr); background: var(--paper-2); }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; background: var(--ink); isolation: isolate; }
.login-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(145deg, rgba(201,242,124,.12), transparent 38%), repeating-linear-gradient(0deg, transparent 0 39px, rgba(255,255,255,.035) 40px), repeating-linear-gradient(90deg, transparent 0 39px, rgba(255,255,255,.035) 40px); z-index: -2; }
.login-art::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: rgba(201,242,124,.06); filter: blur(1px); z-index: -1; }
.orbit { position: absolute; border: 1px solid rgba(201,242,124,.28); border-radius: 50%; animation: orbit 18s linear infinite; }
.orbit::after { content: ""; position: absolute; top: 50%; left: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.orbit-one { width: 380px; height: 380px; }
.orbit-two { width: 560px; height: 560px; animation-direction: reverse; animation-duration: 27s; }
@keyframes orbit { to { transform: rotate(360deg); } }
.login-mark { width: 148px; height: 148px; display: grid; place-items: center; border-radius: 30px; background: transparent; box-shadow: 0 0 0 14px rgba(23,33,29,.72), 0 20px 48px rgba(0,0,0,.28); }
.login-mark img { width: 100%; height: 100%; display: block; border-radius: 30px; object-fit: cover; }
.login-art p { margin: 48px 0 0; font: 700 11px/1.7 "Bahnschrift", sans-serif; letter-spacing: .28em; text-align: center; color: rgba(255,255,255,.58); }
.login-panel { padding: clamp(50px, 9vw, 130px); display: flex; flex-direction: column; justify-content: center; position: relative; }
.login-copy h1 { max-width: 650px; margin: 20px 0 24px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(45px, 5.5vw, 80px); line-height: .98; font-weight: 400; letter-spacing: -.045em; }
.login-copy p { max-width: 510px; color: #666b64; font-size: 17px; line-height: 1.65; }
.login-form { margin-top: 58px; max-width: 570px; }
.login-form label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 750; letter-spacing: .06em; }
.login-username { width: 100%; height: 49px; margin: 0 0 18px; border: 1px solid #c8c8bf; background: white; padding: 0 15px; border-radius: 5px; }
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.password-row input { height: 49px; border: 1px solid #c8c8bf; background: white; padding: 0 15px; border-radius: 5px; }
.login-form small { display: block; margin-top: 12px; color: #8a8d87; }
.form-error { min-height: 20px; margin: 12px 0 0; color: var(--danger); font-size: 13px; }

/* Main shell */
.app-shell { height: 100vh; display: grid; grid-template-columns: 290px 1fr; background: var(--paper); }
.projects-panel { min-width: 0; min-height: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; padding: 13px 12px 12px; color: white; background: var(--ink); }
.brand { border: 0; background: transparent; color: white; display: flex; align-items: center; gap: 10px; padding: 0 7px 13px; text-align: left; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; overflow: hidden; border-radius: 9px; color: var(--accent); }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand strong { display: block; font-family: Georgia, serif; font-size: 21px; font-weight: 400; }
.brand small { display: block; margin-top: 1px; font: 700 8px "Bahnschrift", sans-serif; color: rgba(255,255,255,.45); letter-spacing: .18em; }
.panel-section-title { display: flex; align-items: center; justify-content: space-between; padding: 17px 9px 10px; border-top: 1px solid rgba(255,255,255,.1); }
.panel-section-title span { font: 700 10px "Bahnschrift", sans-serif; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .16em; }
.project-list-actions { display: flex; align-items: center; gap: 4px; }
.archive-projects-toggle { min-height: 26px; padding: 0 7px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: rgba(255,255,255,.42); font-size: 8px; }
.archive-projects-toggle b { min-width: 14px; margin-left: 3px; padding: 1px 4px; border-radius: 8px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.56); font-size: 7px; }
.archive-projects-toggle:hover, .archive-projects-toggle[aria-pressed="true"] { border-color: rgba(201,242,124,.25); background: rgba(201,242,124,.09); color: var(--accent); }
.projects-list { display: flex; min-height: 0; flex: 1 1 220px; max-height: none; flex-direction: column; gap: 4px; padding-right: 3px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: rgba(201,242,124,.35) transparent; }
.projects-list::-webkit-scrollbar, #codex-sidebar-tree-list::-webkit-scrollbar, .project-file-tree::-webkit-scrollbar, .chats-list::-webkit-scrollbar { width: 6px; }
.projects-list::-webkit-scrollbar-thumb, #codex-sidebar-tree-list::-webkit-scrollbar-thumb, .project-file-tree::-webkit-scrollbar-thumb, .chats-list::-webkit-scrollbar-thumb { border-radius: 6px; background: rgba(201,242,124,.3); }
.project-nav-item { width: 100%; border: 0; border-radius: 7px; background: transparent; padding: 7px 8px; color: white; display: flex; align-items: center; gap: 8px; text-align: left; transition: background .18s; }
.project-nav-item:hover { background: rgba(255,255,255,.07); }
.project-nav-item.active { background: rgba(255,255,255,.12); }
.project-nav-item.archived { opacity: .58; }
.project-nav-item.working { background: rgba(201,242,124,.08); box-shadow: inset 2px 0 var(--accent); }
.project-nav-item.working i { animation: liveProjectPulse 1.25s ease-in-out infinite; }
.project-nav-item i { flex: 0 0 29px; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 6px; background: var(--project-color); color: var(--project-contrast, var(--ink)); font: normal 700 12px Georgia, serif; }
.project-nav-item span { min-width: 0; }
.project-nav-item strong, .project-nav-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-nav-item strong { font-size: 13px; }
.project-nav-item small { margin-top: 3px; font-size: 10px; color: rgba(255,255,255,.42); }
.project-nav-item.archived small::before { content: "АРХИВ · "; color: var(--accent); font-size: 7px; letter-spacing: .06em; }
.app-shell.project-open .projects-list { flex: 0 1 auto; max-height: min(20vh, 150px); padding-bottom: 4px; }
.sidebar-footer { flex: 0 0 auto; margin-top: auto; padding: 8px 3px 0; border-top: 1px solid rgba(255,255,255,.1); }
.connection-pill { display: flex; align-items: center; gap: 8px; padding: 7px 7px 13px; color: rgba(255,255,255,.6); font-size: 10px; }
.connection-pill i { width: 7px; height: 7px; border-radius: 50%; background: #a6aaa5; }
.connection-pill.online i { background: var(--accent); box-shadow: 0 0 0 4px rgba(201,242,124,.08); }
.connection-pill.offline i { background: #ff7a7a; }
.connection-pill.checking i { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.sidebar-footer-row { min-width: 0; padding: 5px; display: grid; grid-template-columns: minmax(0, 1fr) 31px 31px; align-items: center; gap: 3px; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; background: rgba(255,255,255,.045); box-shadow: inset 0 1px rgba(255,255,255,.025); }
.sidebar-user { min-width: 0; margin: 0; padding: 4px; display: flex; align-items: center; gap: 8px; border: 0; }
.sidebar-user > i { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--ink); font: normal 700 12px Georgia, serif; }
.sidebar-user span { min-width: 0; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { color: white; font-size: 11px; }
.sidebar-user small { margin-top: 2px; color: rgba(255,255,255,.4); font-size: 9px; }
.sidebar-footer-action { width: 31px; height: 31px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: rgba(255,255,255,.55); font-size: 14px; transition: background .16s, color .16s, transform .16s; }
.sidebar-footer-action svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-footer-action:hover { color: var(--accent); background: rgba(201,242,124,.11); transform: translateY(-1px); }
.sidebar-footer-action.logout:hover { color: #ffafb5; background: rgba(255,143,163,.11); }
.sidebar-action { width: 100%; border: 0; border-radius: 5px; background: transparent; color: rgba(255,255,255,.62); padding: 9px 7px; display: flex; justify-content: space-between; font-size: 12px; }
.sidebar-action:hover { background: rgba(255,255,255,.07); color: white; }
.sidebar-action b { color: rgba(255,255,255,.28); font-weight: 400; }
.admin-nav-buttons { flex: 0 0 auto; margin: 9px 4px; display: grid; gap: 5px; }
.codex-nav-button { width: 100%; margin: 0; padding: 11px 9px; border: 1px solid rgba(201,242,124,.22); border-radius: 7px; background: rgba(201,242,124,.08); color: white; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; text-align: left; }
.codex-nav-button:hover, .codex-nav-button.active { background: rgba(201,242,124,.15); border-color: rgba(201,242,124,.42); }
.codex-nav-button > i { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--ink); font-style: normal; font-size: 18px; }
#codex-button > i { overflow: hidden; border-radius: 8px; background: transparent; }
#codex-button > i img { width: 100%; height: 100%; display: block; object-fit: cover; }
.codex-nav-button strong, .codex-nav-button small { display: block; }
.codex-nav-button strong { font-size: 11px; }.codex-nav-button small { margin-top: 2px; color: rgba(255,255,255,.43); font-size: 8px; }
.codex-nav-button > b { color: var(--accent); font-weight: 400; }
.automation-nav-button { border-color: rgba(121,199,255,.22); background: rgba(121,199,255,.07); }.automation-nav-button:hover, .automation-nav-button.active { border-color: rgba(121,199,255,.4); background: rgba(121,199,255,.14); }.automation-nav-button > i { background: #79c7ff; }

/* Project chats inside the single sidebar */
.sidebar-chats { min-height: 180px; flex: 1 1 auto; margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; overflow: hidden; }
.chats-header { min-height: 38px; padding: 2px 7px 4px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.project-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--project-color, var(--accent)); }
.chats-heading { min-width: 0; }
.chats-heading h2 { margin: 0; color: white; font: 400 14px Georgia, serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-tabs { margin: 0 3px 6px; padding: 3px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 3px; border-radius: 7px; background: rgba(255,255,255,.06); }
.sidebar-tabs button { min-height: 27px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: rgba(255,255,255,.45); font-size: 8px; font-weight: 700; }
.sidebar-tabs button:hover { color: white; }.sidebar-chats[data-tab="chats"] [data-sidebar-tab="chats"], .sidebar-chats[data-tab="files"] [data-sidebar-tab="files"] { background: rgba(255,255,255,.11); color: var(--accent); }
.sidebar-tabs .sidebar-new-chat { display: flex; align-items: center; justify-content: center; gap: 3px; border: 1px solid rgba(201,242,124,.18); color: var(--accent); }
.sidebar-new-chat b { font-size: 13px; font-weight: 400; }.sidebar-new-chat:hover { background: rgba(201,242,124,.1) !important; color: var(--accent) !important; }
.sidebar-tab-panel { min-height: 0; flex: 1; display: none; flex-direction: column; overflow: hidden; }.sidebar-chats[data-tab="chats"] .sidebar-chat-tab, .sidebar-chats[data-tab="files"] .sidebar-files-tab { display: flex; }
.new-chat-button { margin: 2px 4px 9px; min-height: 36px; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; background: rgba(255,255,255,.08); color: white; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 10px; font-weight: 750; }
.new-chat-button:hover { background: rgba(255,255,255,.14); }
.new-chat-button span { font-size: 18px; font-weight: 400; }
.chats-label { padding: 2px 9px 6px; color: rgba(255,255,255,.34); font: 700 7px "Bahnschrift", sans-serif; letter-spacing: .16em; }
.chats-list { min-height: 70px; flex: 1; overflow-y: auto; padding: 0 0 10px; }
.chat-list-item { display: grid; grid-template-columns: 1fr auto; align-items: center; border-radius: 6px; }
.chat-list-item:hover { background: rgba(255,255,255,.07); }
.chat-list-item.active { background: rgba(255,255,255,.12); box-shadow: inset 2px 0 var(--accent); }
.chat-open { min-width: 0; border: 0; background: transparent; color: white; padding: 10px 8px 10px 10px; text-align: left; }
.chat-open span, .chat-open small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-open span { font-size: 11px; font-weight: 650; }
.chat-open small { margin-top: 4px; color: rgba(255,255,255,.35); font-size: 8px; }
.chat-delete { opacity: 0; width: 27px; height: 27px; margin-right: 3px; border: 0; border-radius: 50%; background: transparent; color: #ff9fa7; }
.chat-list-item:hover .chat-delete { opacity: 1; }
.chat-delete:hover { background: rgba(255,143,163,.13); }
.empty-list { padding: 25px 12px; text-align: center; color: rgba(255,255,255,.42); }
.empty-list span { font: 400 17px Georgia, serif; }
.empty-list p { font-size: 11px; line-height: 1.5; }
.files-header { min-height: 36px; padding: 4px 8px 5px; display: flex; justify-content: space-between; align-items: center; color: rgba(255,255,255,.4); }
.files-header span { font: 700 8px "Bahnschrift", sans-serif; letter-spacing: .16em; }
.files-header .icon-button { width: 28px; height: 28px; }
.project-file-tree { min-height: 72px; flex: 1 1 auto; overflow-y: auto; padding-bottom: 8px; }
.project-folder-row { min-height: 25px; padding: 6px 7px 3px calc(8px + var(--file-depth, 0) * 12px); color: rgba(255,255,255,.42); font-size: 8px; }
.project-file-row { min-height: 31px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; border-radius: 4px; }
.project-file-row:hover { background: rgba(255,255,255,.07); }
.project-file-open { min-width: 0; padding: 7px 7px 7px calc(8px + var(--file-depth, 0) * 12px); border: 0; background: transparent; color: rgba(255,255,255,.76); text-align: left; }
.project-file-open span, .project-file-open small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.project-file-open span { font-size: 9px; }.project-file-open small { margin-top: 2px; color: rgba(255,255,255,.32); font-size: 7px; }
.project-file-delete { opacity: 0; width: 25px; height: 25px; border: 0; border-radius: 50%; background: transparent; color: #ff9fa7; }.project-file-row:hover .project-file-delete { opacity: 1; }.project-file-delete:hover { background: rgba(255,143,163,.13); }
.project-file-download { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); font-size: 11px; text-decoration: none; }.project-file-download:hover { background: rgba(201,242,124,.1); }
.file-tree-empty { padding: 17px 10px; color: rgba(255,255,255,.37); font-size: 9px; line-height: 1.45; text-align: center; }

.codex-sidebar-tree { min-height: 0; flex: 1; display: flex; flex-direction: column; border-top: 1px solid rgba(255,255,255,.1); }
.codex-sidebar-tree > header { min-height: 51px; padding: 8px 6px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,.1); }
.codex-sidebar-tree > header span, .codex-sidebar-tree > header strong { display: block; }.codex-sidebar-tree > header span { color: var(--accent); font: 700 7px "Bahnschrift", sans-serif; letter-spacing: .15em; }.codex-sidebar-tree > header strong { margin-top: 3px; font: 400 14px Georgia, serif; }
#codex-sidebar-summary { padding: 7px 7px 4px; color: rgba(255,255,255,.38); font-size: 8px; }
.codex-sidebar-filters { padding: 2px 7px 7px; display: flex; flex-wrap: wrap; gap: 5px 10px; border-bottom: 1px solid rgba(255,255,255,.06); }
.codex-sidebar-filters label { display: flex; align-items: center; gap: 4px; color: rgba(255,255,255,.45); font-size: 7px; cursor: pointer; }
.codex-sidebar-filters input { width: 11px; height: 11px; margin: 0; accent-color: var(--accent); }
#codex-sidebar-tree-list { min-height: 0; overflow-y: auto; padding-bottom: 12px; }
.codex-tree-project { border-bottom: 1px solid rgba(255,255,255,.06); }
.codex-tree-project.archived { opacity: .62; }
.codex-tree-project-row { min-width: 0; display: flex; align-items: stretch; }
.codex-tree-project.working > .codex-tree-project-row > .codex-tree-project-button { background: rgba(201,242,124,.07); box-shadow: inset 2px 0 rgba(201,242,124,.7); }
.codex-tree-project-button { min-width: 0; min-height: 42px; flex: 1 1 auto; padding: 8px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; border: 0; background: transparent; color: white; text-align: left; }
.codex-tree-project-button:hover, .codex-tree-project.active > .codex-tree-project-row > .codex-tree-project-button { background: rgba(255,255,255,.08); }.codex-tree-project-button > i { color: var(--accent); font-style: normal; font-size: 10px; }.codex-tree-project-button strong, .codex-tree-project-button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.codex-tree-project-button strong { font-size: 10px; }.codex-tree-project-button small { margin-top: 2px; color: rgba(255,255,255,.33); font-size: 7px; }.codex-tree-project-button > b { color: rgba(255,255,255,.3); font-size: 8px; font-weight: 400; }
.codex-tree-project-new, .codex-tree-project-archive { width: 29px; flex: 0 0 29px; border: 0; background: transparent; color: rgba(255,255,255,.32); opacity: 0; transition: opacity .16s, color .16s, background .16s; }
.codex-tree-project-new { color: var(--accent); font-size: 15px; }
.codex-tree-project-row:hover .codex-tree-project-new, .codex-tree-project-row:hover .codex-tree-project-archive, .codex-tree-project.active .codex-tree-project-new, .codex-tree-project.active .codex-tree-project-archive, .codex-tree-project-new:focus-visible, .codex-tree-project-archive:focus-visible { opacity: 1; }
.codex-tree-project-new:hover { color: var(--ink); background: var(--accent); }
.codex-tree-project-archive:hover { color: var(--accent); background: rgba(201,242,124,.1); }
.codex-tree-threads { padding: 0 0 6px 18px; }
.codex-tree-thread-row { min-width: 0; display: flex; align-items: stretch; position: relative; }
.codex-tree-thread { min-width: 0; min-height: 38px; flex: 1 1 auto; padding: 7px 8px 7px 12px; border: 0; border-left: 1px solid rgba(201,242,124,.2); background: transparent; color: rgba(255,255,255,.67); text-align: left; }
.codex-tree-thread:hover, .codex-tree-thread.active { color: white; background: rgba(201,242,124,.08); border-left-color: var(--accent); }.codex-tree-thread strong, .codex-tree-thread small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.codex-tree-thread strong { font-size: 9px; }.codex-tree-thread small { margin-top: 3px; color: rgba(255,255,255,.3); font-size: 7px; }.codex-tree-thread.archived { opacity: .55; }
.codex-tree-archive { width: 29px; flex: 0 0 29px; border: 0; background: transparent; color: rgba(255,255,255,.35); opacity: 0; font-size: 12px; transition: opacity .16s, color .16s, background .16s; }
.codex-tree-thread-row:hover .codex-tree-archive, .codex-tree-thread-row.active .codex-tree-archive, .codex-tree-archive:focus-visible { opacity: 1; }
.codex-tree-archive:hover { background: rgba(201,242,124,.1); color: var(--accent); }
.codex-tree-thread.working { color: white; border-left-color: var(--accent); background: linear-gradient(90deg, rgba(201,242,124,.13), rgba(201,242,124,.025)); animation: liveThreadGlow 1.7s ease-in-out infinite; }
.codex-live-dot { width: 7px; height: 7px; margin-right: 6px; display: inline-block; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(201,242,124,.55); vertical-align: -1px; animation: liveDot 1.25s ease-out infinite; }
@keyframes liveProjectPulse { 50% { transform: scale(.92); filter: brightness(1.18); } }
@keyframes liveThreadGlow { 50% { background-color: rgba(201,242,124,.12); } }
@keyframes liveDot { 55%, 100% { box-shadow: 0 0 0 6px rgba(201,242,124,0); } }
.mobile-back, .mobile-settings { display: none; }

/* Dashboard */
.workspace { min-width: 0; height: 100vh; overflow: hidden; background: var(--paper-2); }
.dashboard-view { height: 100%; overflow-y: auto; padding: clamp(34px, 5vw, 72px) clamp(34px, 6vw, 96px); background-image: radial-gradient(circle at 90% 6%, rgba(201,242,124,.17), transparent 21%), linear-gradient(90deg, rgba(23,33,29,.027) 1px, transparent 1px); background-size: auto, 42px 42px; }
.dashboard-header { display: flex; align-items: flex-start; justify-content: space-between; }
.dashboard-header h1 { margin: 18px 0 0; font: 400 clamp(42px, 5vw, 74px)/.97 Georgia, serif; letter-spacing: -.045em; }
.date-card { width: 75px; height: 87px; display: grid; place-content: center; text-align: center; border: 1px solid #c8cbc3; background: rgba(255,255,255,.6); }
.date-card span { font: 400 31px Georgia, serif; }
.date-card small { font: 700 9px "Bahnschrift", sans-serif; letter-spacing: .15em; color: #777c75; }
.setup-banner { margin: 42px 0 0; padding: 18px 20px; display: flex; justify-content: space-between; gap: 20px; align-items: center; background: var(--accent); border: 1px solid #a8cf5e; }
.setup-banner strong, .setup-banner span { display: block; }
.setup-banner strong { font-family: Georgia, serif; font-size: 18px; font-weight: 400; }
.setup-banner span { margin-top: 3px; font-size: 11px; }
.dashboard-section { margin-top: 70px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; padding-bottom: 13px; border-bottom: 1px solid #c9cbc4; }
.section-heading h2 { margin: 0; font: 400 24px Georgia, serif; }
.section-heading span { color: #7d8179; font-size: 10px; }
.project-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); gap: 10px; }
.project-card { min-height: 160px; padding: 15px; border: 1px solid #d4d4ca; border-radius: 9px; background: rgba(255,255,255,.76); display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr auto; gap: 13px; text-align: left; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.project-card::after { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; right: -34px; top: -34px; background: var(--project-color); opacity: .25; }
.project-card:hover { transform: translateY(-3px); border-color: #aeb0a8; box-shadow: 0 14px 34px rgba(23,33,29,.08); }
.project-card.archived { opacity: .68; filter: saturate(.65); }
.project-card.working { border-color: #91a86b; box-shadow: inset 0 0 0 1px rgba(142,174,85,.22), 0 14px 34px rgba(74,102,48,.11); }
.project-card.working > i { animation: liveProjectPulse 1.25s ease-in-out infinite; }
.project-card.archived .card-index::before { content: "АРХИВ · "; }
.project-card .card-index { position: absolute; top: 13px; right: 14px; font: 700 8px "Bahnschrift", sans-serif; letter-spacing: .13em; color: #9b9e96; }
.project-card > i { width: 43px; height: 43px; border-radius: 50%; display: grid; place-items: center; background: var(--project-color); color: var(--project-contrast, var(--ink)); font: normal 400 21px Georgia, serif; }
.project-card > div { align-self: center; grid-column: 1 / -1; }
.project-card h3 { margin: 0; font: 400 22px Georgia, serif; }
.project-card p { margin: 8px 0 0; color: #737870; font-size: 11px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-card footer { grid-column: 1 / -1; display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid #e0e0d8; color: #888b84; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.project-card footer b { color: var(--ink); font-size: 16px; font-weight: 400; }
.add-card { border-style: dashed; align-content: center; color: #777c75; background: transparent; }
.add-card::after { display: none; }
.add-card > i { background: transparent; border: 1px solid #b8bbb3; font-family: inherit; }
.dashboard-bottom { margin-top: 52px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
.tip-card, .api-card { min-height: 126px; padding: 23px; border-top: 1px solid #bbbeb6; background: rgba(232,230,221,.5); }
.tip-card > span, .api-card > span { font: 700 9px "Bahnschrift", sans-serif; letter-spacing: .16em; color: #868a82; }
.tip-card p { margin: 18px 0 0; max-width: 600px; font: 400 17px/1.4 Georgia, serif; }
.api-card strong { display: block; margin-top: 16px; font-size: 13px; }
.api-card p { margin: 5px 0 0; color: #7c8179; font-size: 10px; }
.api-card a { width: max-content; margin-top: 14px; display: inline-flex; align-items: center; gap: 22px; color: #48672f; font-size: 9px; font-weight: 850; text-decoration: none; }
.api-card a:hover { text-decoration: underline; }
.api-card a b { font-size: 15px; }

/* Project landing */
.project-view { height: 100%; padding: clamp(30px, 5vw, 65px); overflow-y: auto; position: relative; background: radial-gradient(circle at 82% 18%, rgba(201,242,124,.14), transparent 28%), var(--paper-2); }
.project-hero-mark { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 13px; background: var(--project-color, var(--accent)); color: var(--project-contrast, var(--ink)); font: 400 25px Georgia, serif; }
.project-view h1 { margin: 10px 0 9px; max-width: 780px; font: 400 clamp(34px, 5vw, 58px)/1 Georgia, serif; letter-spacing: -.035em; }
.project-view > p { max-width: 680px; color: #666c64; font-size: 14px; line-height: 1.55; }
.project-actions { display: flex; gap: 9px; margin-top: 24px; }
.context-preview { max-width: 780px; margin-top: 36px; padding: 17px 0; border-top: 1px solid #c9ccc4; }
.context-preview span { font: 700 9px "Bahnschrift", sans-serif; letter-spacing: .16em; color: #7f847c; }
.context-preview p { margin: 14px 0 0; max-height: 110px; overflow: auto; white-space: pre-wrap; font-size: 12px; line-height: 1.6; color: #666b64; }

/* Chat */
.chat-view { height: 100%; display: grid; grid-template-rows: 53px 1fr auto; background: var(--paper-2); }
.chat-header { display: flex; align-items: center; gap: 14px; padding: 0 20px; border-bottom: 1px solid var(--line); background: rgba(250,248,241,.94); backdrop-filter: blur(12px); }
.chat-title-wrap { min-width: 0; }
.chat-title-wrap > span { display: block; color: #8a8f87; font: 700 8px "Bahnschrift", sans-serif; letter-spacing: .15em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#chat-title { max-width: 55vw; margin: 2px 0 0; padding: 0; border: 0; background: transparent; font: 400 16px Georgia, serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.chat-ai-status { min-height: 25px; margin-left: auto; padding: 3px 9px; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; border: 1px solid #d6dad2; border-radius: 14px; background: #f4f5f1; color: #6d756f; font-size: 9px; font-weight: 750; white-space: nowrap; }
.chat-ai-status i { width: 7px; height: 7px; border-radius: 50%; background: #a7ada7; }.chat-ai-status.working { border-color: #a8c978; background: #eef8df; color: #496331; }.chat-ai-status.working i { background: #75a43f; animation: liveDot 1.25s ease-out infinite; }
.chat-list-item.working .chat-open { background: #f1f8e7; }.chat-list-item.working .chat-open small { color: #527039; font-weight: 750; }.chat-list-item.working .chat-open span { display: flex; align-items: center; }
.messages { min-height: 0; overflow-y: auto; scroll-behavior: smooth; }
.message { width: min(100%, 1120px); margin: 0 auto; display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 12px; padding: 16px clamp(13px, 3vw, 35px); }
.message.user { background: transparent; border: 0; }.message.user .message-content { width: min(88%, 820px); margin-left: auto; padding: 11px 13px; border: 1px solid #d8ded5; border-radius: 10px; background: #f0f4ed; }.message.assistant .message-content { padding: 4px 0 8px; }
.message-avatar { width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #bfc2ba; font: 700 9px "Bahnschrift", sans-serif; }
.message.assistant .message-avatar { overflow: hidden; background: var(--ink); border-color: #33433b; color: var(--accent); font: 400 20px Georgia, serif; }.message.assistant .message-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.message-content { min-width: 0; }
.message-content > header { min-height: 28px; display: flex; justify-content: space-between; align-items: start; }
.message-content > header strong { font-size: 11px; }
.copy-message { width: 28px; height: 28px; min-width: 28px; padding: 0; display: grid; place-items: center; opacity: 0; border: 0; border-radius: 6px; background: transparent; color: #7a827c; }
.copy-message svg, .codex-copy-response svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy-message:hover { background: #edf0eb; color: #405149; }
.copy-message.copied { background: #edf6dd; color: #4d6639; }
.message:hover .copy-message { opacity: 1; }
.message-actions { display: flex; align-items: center; gap: 5px; }.save-message-file { opacity: 0; border: 0; background: transparent; color: #667568; font-size: 9px; }.message:hover .save-message-file { opacity: 1; }
.markdown-body { color: #303a35; font-size: 13px; line-height: 1.62; overflow-wrap: anywhere; }
.markdown-body p { margin: 0 0 12px; }
.markdown-body p:last-child { margin-bottom: 0; }
.markdown-body h3, .markdown-body h4, .markdown-body h5 { margin: 22px 0 10px; font-family: Georgia, serif; line-height: 1.25; }
.markdown-body h3 { font-size: 24px; }.markdown-body h4 { font-size: 20px; }.markdown-body h5 { font-size: 17px; }
.markdown-body ul { padding-left: 20px; }
.markdown-body li { margin: 5px 0; }
.markdown-body code { padding: 2px 5px; border-radius: 3px; background: #e1e0d8; font: 12px Consolas, monospace; }
.markdown-body a { color: #27644d; text-underline-offset: 2px; }
.markdown-body blockquote { margin: 14px 0; padding: 3px 16px; border-left: 3px solid #96ad69; color: #666b64; }
.code-block { margin: 17px 0; border: 1px solid #303b36; border-radius: 7px; overflow: hidden; background: #1d2823; color: #e9eee9; }
.code-block > summary { min-height: 38px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; background: #26342e; color: #aebbb3; font: 700 9px "Bahnschrift", sans-serif; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; user-select: none; }
.code-block > summary::-webkit-details-marker { display: none; }
.code-block > summary > span { min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; }
.code-block > summary > span::before { content: "▸"; flex: 0 0 auto; color: #d0f48d; font-size: 10px; transition: transform .16s; }
.code-block[open] > summary > span::before { transform: rotate(90deg); }
.code-block > summary b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-block > summary small { flex: 0 0 auto; color: #74837a; font-size: 8px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.code-block button { border: 0; background: transparent; color: #aebbb3; font-size: 9px; }
.code-block button:hover { color: white; }
.code-block pre { margin: 0; padding: 16px; overflow-x: auto; }
.code-block pre code { padding: 0; background: transparent; color: inherit; font: 12px/1.6 Consolas, "Courier New", monospace; }
.message-error { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--danger); background: #fff0f0; color: #8d343b; font-size: 11px; }
.typing-dots { display: flex; gap: 4px; padding: 5px 0; }
.typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: #7b827b; animation: dots 1.1s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 50% { transform: translateY(-4px); opacity: .45; } }
.empty-chat { grid-row: 2; align-self: center; justify-self: center; text-align: center; padding: 30px; }
.empty-symbol { width: 72px; height: 72px; margin: 0 auto 22px; display: grid; place-items: center; }
.empty-symbol img { width: 100%; height: 100%; display: block; object-fit: contain; }
.empty-chat > span { color: #8b8f87; font: 700 9px "Bahnschrift", sans-serif; letter-spacing: .17em; }
.empty-chat h2 { margin: 10px 0; font: 400 36px Georgia, serif; }
.empty-chat p { margin: 0; color: #7a7f77; font-size: 12px; }
.prompt-chips { margin-top: 30px; display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.prompt-chips button { border: 1px solid #caccc4; border-radius: 20px; padding: 8px 12px; background: transparent; font-size: 10px; color: #60665f; }
.prompt-chips button:hover { border-color: #798079; color: var(--ink); }
.composer-wrap { padding: 12px clamp(25px, 7vw, 105px) 16px; background: linear-gradient(transparent, var(--paper-2) 22%); }
.composer { max-width: 1050px; margin: 0 auto; border: 1px solid #bfc2ba; border-radius: 10px; background: white; box-shadow: 0 12px 34px rgba(23,33,29,.08); position: relative; }
.composer.dragging { border-color: #7b955f; box-shadow: 0 0 0 3px rgba(126,156,100,.18), 0 12px 34px rgba(23,33,29,.08); }
.composer.dragging::after { content: "Отпустите файлы, чтобы прикрепить"; position: absolute; inset: 7px; z-index: 3; display: grid; place-items: center; border: 1px dashed #79905e; border-radius: 6px; background: rgba(244,250,234,.96); color: #506144; font-size: 11px; font-weight: 700; pointer-events: none; }
.composer textarea { display: block; width: 100%; min-height: 54px; max-height: 180px; resize: none; border: 0; outline: 0; padding: 16px 18px 6px; background: transparent; color: var(--ink); line-height: 1.5; }
.pending-attachments { padding: 7px 12px 2px; display: flex; flex-wrap: wrap; gap: 5px; }
.pending-file { max-width: 260px; min-height: 36px; padding: 5px 7px; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 7px; border: 1px solid #d1d3cc; border-radius: 6px; background: #f2f1eb; color: #59615a; }
.pending-file > i, .pending-file > img { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 4px; background: #e0e6d7; color: #506044; font: normal 700 7px "Bahnschrift", sans-serif; text-transform: uppercase; object-fit: cover; }
.pending-preview { width: 26px; height: 26px; display: block; color: #506044; text-decoration: none; }.pending-preview > i, .pending-preview > img { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 4px; background: #e0e6d7; color: #506044; font: normal 700 7px "Bahnschrift", sans-serif; text-transform: uppercase; object-fit: cover; font-style: normal; }
.pending-file span { min-width: 0; }
.pending-file strong, .pending-file small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-file strong { font-size: 8px; }.pending-file small { margin-top: 2px; color: #8a8f88; font-size: 7px; }
.pending-file button { width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: var(--danger); padding: 0; }
.pending-file button:hover { background: #fde6e7; }
.composer-bottom { min-height: 42px; display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 7px 18px; }
.composer-tools { min-width: 0; display: flex; align-items: center; gap: 7px; }
.composer-tools > .keyboard-hint { color: #a0a39d; font-size: 8px; }
.composer-attach-button { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; padding: 0; border: 1px solid #d1d3cc; border-radius: 50%; background: transparent; color: #59645d; line-height: 1; }
.composer-attach-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.composer-attach-button:hover { border-color: #83917f; background: #f1f4ed; }
.composer-attach-button:disabled { opacity: .45; cursor: wait; }
.composer-model-line { min-width: 0; height: 27px; display: flex; align-items: center; gap: 1px; padding: 0 5px 0 7px; border-radius: 4px; color: #6f7770; }
.control-caption { display: none; }
.composer-model-line select { width: auto; max-width: 190px; height: 25px; padding: 0; border: 0; outline: 0; appearance: none; background: transparent; color: #4f5a53; font-size: 9px; font-weight: 650; text-overflow: ellipsis; cursor: pointer; }
.composer-model-line i { font: normal 11px/1 sans-serif; color: #929790; pointer-events: none; transform: translateY(-1px); }
.composer-model-line:hover { background: #f3f3ee; }
.reasoning-line { padding-left: 6px; border-left: 1px solid #dedfd9; }
.reasoning-line select { max-width: 96px; color: #6b746c; font-size: 8px; font-weight: 600; }
.reasoning-line.image-model { opacity: .38; cursor: not-allowed; }.reasoning-line.image-model select { cursor: not-allowed; }
.composer-tools.auto-mode .reasoning-line { display: none; }
.file-upload-status { color: #78836f; font-size: 8px; white-space: nowrap; }
.file-upload-status.error { color: var(--danger); }
#send-button { width: 33px; height: 33px; border: 0; border-radius: 5px; background: var(--ink); color: var(--accent); font-size: 19px; }
#send-button.stop { color: #ffb4ba; font-size: 11px; }
.composer-wrap > small { display: block; margin-top: 8px; text-align: center; color: #9a9d96; font-size: 8px; }

/* Modals */
.modal { width: min(620px, calc(100vw - 30px)); max-height: min(88vh, 820px); padding: 0; border: 0; border-radius: 9px; background: var(--paper-2); color: var(--ink); box-shadow: var(--shadow); overflow: auto; }
.modal::backdrop { background: rgba(13,22,18,.58); backdrop-filter: blur(5px); }
.modal > form:first-child { padding: 30px; }
.modal header { display: flex; justify-content: space-between; align-items: start; padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.modal h2 { margin: 8px 0 0; font: 400 30px Georgia, serif; }
.modal-close { width: 32px; height: 32px; border: 0; background: transparent; color: #777c75; font-size: 25px; line-height: 1; }
.modal label { display: block; margin-top: 20px; font-size: 11px; font-weight: 700; }
.modal label > input, .modal label > textarea, .input-action-row input, .input-action-row select { width: 100%; margin-top: 8px; border: 1px solid #c6c8c0; border-radius: 5px; background: white; color: var(--ink); padding: 11px 12px; outline: 0; font-size: 13px; font-weight: 400; }
.modal label > input:focus, .modal label > textarea:focus, .input-action-row input:focus, .input-action-row select:focus { border-color: #6f8263; box-shadow: 0 0 0 3px rgba(126,156,100,.12); }
.modal textarea { resize: vertical; line-height: 1.5; }
.modal label > small { display: block; margin-top: 6px; color: #8a8e87; font-size: 9px; font-weight: 400; }
.modal fieldset { margin: 20px 0 0; padding: 0; border: 0; }
.modal legend { font-size: 11px; font-weight: 700; }
.modal-actions { display: grid; grid-template-columns: auto 1fr auto auto; gap: 9px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.project-modal-actions { grid-template-columns: auto auto 1fr auto auto; }
.project-modal { width: min(760px, calc(100vw - 30px)); max-height: none; overflow: hidden; border-radius: 14px; }
.project-modal > form:first-child { padding: 0; }
.project-modal-header { min-height: 108px; padding: 23px 25px 19px; border-bottom: 1px solid #d9dbd3; background: linear-gradient(135deg, #f4f7ed 0%, #faf8f1 58%, #f0eee7 100%); }
.project-modal-heading { min-width: 0; display: flex; align-items: center; gap: 14px; }
.project-modal-heading > i { flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: var(--ink); color: var(--accent); box-shadow: 0 8px 22px rgba(23,33,29,.14); font: normal 300 29px/1 "Segoe UI", sans-serif; }
.project-modal-heading h2 { margin-top: 5px; font-size: 26px; }
.project-modal-heading p { margin: 4px 0 0; color: #7c817a; font-size: 10px; }
.project-modal .modal-close { flex: 0 0 34px; border-radius: 50%; background: rgba(23,33,29,.055); transition: background .16s, color .16s, transform .16s; }
.project-modal .modal-close:hover { background: var(--ink); color: white; transform: rotate(4deg); }
.project-form-grid { padding: 18px 25px 3px; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 22px; }
.project-form-main { min-width: 0; }
.project-modal label { margin-top: 0; color: #505950; font-size: 10px; letter-spacing: .025em; }
.project-modal label + label, .project-modal fieldset { margin-top: 14px; }
.project-modal label > input, .project-modal label > textarea { margin-top: 6px; border-color: #d0d3ca; border-radius: 8px; padding: 10px 11px; background: #fff; transition: border-color .16s, box-shadow .16s, background .16s; }
.project-modal label > input { height: 42px; }
.project-modal label > textarea { resize: none; }
.project-modal #project-description { height: 78px; }
.project-modal #project-instructions { height: 172px; }
.project-modal legend { color: #505950; font-size: 10px; letter-spacing: .025em; }
.project-modal label.custom-color-option { width: 100%; min-height: 44px; margin-top: 8px; padding: 5px 10px 5px 6px; display: flex; align-items: center; gap: 9px; border: 1px solid #d0d3ca; border-radius: 9px; background: white; cursor: pointer; transition: border-color .16s, box-shadow .16s, transform .16s; }
.project-modal label.custom-color-option:hover { border-color: #90988d; transform: translateY(-1px); }
.project-modal label.custom-color-option:focus-within { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(23,33,29,.1); }
.project-modal label.custom-color-option > input[type="color"] { width: 34px; min-width: 34px; height: 34px; min-height: 34px; margin: 0; padding: 2px; border: 1px solid rgba(23,33,29,.2); border-radius: 7px; background: white; cursor: pointer; }
.project-modal label.custom-color-option > input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.project-modal label.custom-color-option > input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 4px; }
.project-modal label.custom-color-option > input[type="color"]::-moz-color-swatch { border: 0; border-radius: 4px; }
.custom-color-option span { white-space: nowrap; }
.custom-color-option output { margin-left: auto; color: #7d847c; font: 700 9px Consolas, monospace; text-transform: uppercase; }
.project-modal-actions { margin: 16px 25px 0; padding: 15px 0 20px; }
.project-modal-actions .button { min-height: 38px; border-radius: 7px; font-size: 11px; }

/* Image preview and mask editor */
.codex-image-dialog { width: min(1120px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: #111a16; color: white; box-shadow: 0 28px 90px rgba(5,12,9,.4); }
.codex-image-dialog::backdrop { background: rgba(8,14,11,.78); backdrop-filter: blur(8px); }
.codex-image-dialog section { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.codex-image-dialog header { min-height: 61px; padding: 9px 16px 9px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(255,255,255,.1); background: #17211d; }
.codex-image-dialog header span { color: rgba(255,255,255,.48); font: 700 8px "Bahnschrift", sans-serif; letter-spacing: .15em; }
.codex-image-dialog header h2 { max-width: min(780px, 72vw); margin: 3px 0 0; overflow: hidden; color: white; font: 400 18px Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.codex-image-dialog .modal-close { flex: 0 0 auto; border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.08); color: white; }
.codex-image-preview { min-height: 260px; max-height: calc(100dvh - 155px); padding: 14px; display: grid; place-items: center; overflow: auto; background: radial-gradient(circle at 50% 10%, #25342e, #0d1411 65%); }
.codex-image-preview img { max-width: 100%; max-height: calc(100dvh - 185px); display: block; border-radius: 8px; object-fit: contain; box-shadow: 0 14px 46px rgba(0,0,0,.3); }
.codex-image-dialog footer { min-height: 61px; padding: 10px 16px; display: flex; justify-content: flex-end; border-top: 1px solid rgba(255,255,255,.09); background: #17211d; }
.codex-image-dialog footer .button { min-height: 40px; display: grid; place-items: center; text-decoration: none; }
.image-editor-dialog { width: min(1080px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: #f7f5ee; color: var(--ink); box-shadow: 0 28px 90px rgba(5,12,9,.32); }
.image-editor-dialog::backdrop { background: rgba(8,14,11,.72); backdrop-filter: blur(7px); }
.image-editor-shell { min-height: 0; }
.image-editor-header { height: 62px; padding: 0 18px 0 21px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #d8d8d0; background: rgba(250,248,241,.96); }
.image-editor-header span { color: #81877f; font: 700 8px "Bahnschrift", sans-serif; letter-spacing: .16em; }
.image-editor-header h2 { margin: 3px 0 0; font: 400 19px Georgia, serif; }
.image-editor-header .modal-close { border-radius: 50%; background: #ecebe5; }
.image-editor-layout { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 330px; }
.image-editor-preview { min-width: 0; padding: 16px; background: #17211d; }
.image-editor-stage { position: relative; width: fit-content; max-width: 100%; min-height: 240px; margin: 0 auto; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: #0d1411; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.image-editor-stage.ready { min-height: 0; }
.image-editor-stage img { width: 100%; height: 100%; display: block; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.image-editor-stage canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; opacity: .58; cursor: crosshair; touch-action: none; }
#image-editor-loading { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: #17211d; color: rgba(255,255,255,.55); font-size: 11px; }
.image-editor-stage.ready #image-editor-loading { display: none; }
.image-editor-hint { min-height: 37px; padding: 10px 2px 0; display: flex; align-items: start; gap: 8px; color: rgba(255,255,255,.55); font-size: 9px; line-height: 1.45; }
.image-editor-hint i { flex: 0 0 8px; width: 8px; height: 8px; margin-top: 2px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(201,242,124,.08); }
.image-edit-form { min-width: 0; padding: 20px; display: flex; flex-direction: column; gap: 19px; background: #f7f5ee; }
.image-edit-tools { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: end; padding-bottom: 17px; border-bottom: 1px solid #dbd9d0; }
.image-edit-tools label, .image-edit-prompt { display: block; color: #525b54; font-size: 9px; font-weight: 750; }
.image-edit-tools input { width: 100%; margin-top: 8px; accent-color: #607d48; }
.image-edit-tools .button { min-height: 34px; padding: 0 10px; font-size: 9px; }
.image-edit-prompt { flex: 1; }
.image-edit-prompt textarea { width: 100%; min-height: 145px; margin-top: 7px; padding: 12px; resize: none; border: 1px solid #c8cbc2; border-radius: 8px; background: white; outline: 0; color: var(--ink); font-size: 12px; line-height: 1.5; }
.image-edit-prompt textarea:focus { border-color: #78915f; box-shadow: 0 0 0 3px rgba(126,156,100,.13); }
.image-edit-actions { margin-top: auto; display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.image-edit-actions .button { min-height: 42px; display: grid; place-items: center; font-size: 11px; text-decoration: none; }
.settings-note { display: flex; gap: 12px; align-items: center; margin-top: 20px; padding: 13px; background: #edf6dd; border: 1px solid #d6e8b5; }
.settings-note i { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: #78a13f; }
.settings-note p { margin: 0; color: #566149; font-size: 10px; line-height: 1.5; }
.settings-modal { width: min(940px, calc(100vw - 30px)); }
.billing-profile-settings { margin-top: 20px; padding: 18px; border: 1px solid #d6dad1; border-radius: 11px; background: linear-gradient(145deg,#fff,#f4f6ef); transition: border-color .2s, box-shadow .2s; }
.billing-profile-settings.attention { border-color: #b38b35; box-shadow: 0 0 0 4px rgba(201,166,89,.14); }
.billing-profile-settings > header { padding: 0 0 14px; align-items: center; }
.billing-profile-settings > header > div { min-width: 0; }
.billing-profile-settings h3 { margin: 4px 0 0; font: 400 23px Georgia,serif; }
.billing-profile-settings header p { margin: 5px 0 0; color: #737d77; font-size: 10px; line-height: 1.45; }
.billing-profile-grid { grid-template-columns: repeat(3,minmax(0,1fr)); padding-top: 16px; }
.billing-profile-grid label { margin-top: 0; }
.billing-profile-grid label > input, .billing-profile-grid label > textarea { margin-top: 6px; }
.billing-profile-grid .wide-field { grid-column: span 2; }
.billing-profile-grid em { color: #a34e40; font-style: normal; }
.billing-profile-help { margin: 13px 0 0; color: #758078; font-size: 10px; line-height: 1.5; }
.settings-account-card { min-width: 0; margin-top: 18px; padding: 12px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; border: 1px solid #d4d7cf; border-radius: 7px; background: white; }
.settings-account-card > i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--ink); font: normal 700 15px Georgia, serif; }
.settings-account-card > span { min-width: 0; }
.settings-account-card strong, .settings-account-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-account-card strong { font-size: 12px; }
.settings-account-card small { margin-top: 4px; color: #7e857d; font-size: 9px; }
.settings-account-card .button { min-height: 34px; padding-inline: 11px; }
.settings-auto-model { margin-top: 18px; padding: 15px; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px; border: 1px solid #d7dfcc; border-radius: 8px; background: linear-gradient(135deg,#f3f9e8,#fbfcf8); }
.settings-auto-model > i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--ink); color: var(--accent); font: normal 800 11px "Bahnschrift",sans-serif; letter-spacing: .05em; }
.settings-auto-model span, .settings-auto-model strong, .settings-auto-model b, .settings-auto-model small { min-width: 0; display: block; }
.settings-auto-model strong { color: #778177; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.settings-auto-model b { margin-top: 4px; color: var(--ink); font: 400 17px Georgia,serif; }
.settings-auto-model small { margin-top: 5px; color: #778078; font-size: 10px; line-height: 1.4; }

.message-files { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }.message-file { max-width: 330px; padding: 7px 9px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; border: 1px solid #cdd1c9; border-radius: 5px; background: #f4f3ed; color: #445049; font-size: 9px; text-decoration: none; }.message-file:hover { border-color: #8fa07e; }.message-file b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }.message-file small { color: #858b84; white-space: nowrap; }
.message-image { width: min(330px, 100%); padding: 7px; display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 9px; border: 1px solid #cdd1c9; border-radius: 6px; background: #f4f3ed; color: #445049; text-align: left; cursor: zoom-in; }.message-image:hover { border-color: #8fa07e; }.message-image img { width: 70px; height: 58px; border-radius: 4px; object-fit: cover; background: #e4e5df; }.message-image span, .message-image b, .message-image small { min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.message-image b { font-size: 9px; }.message-image small { margin-top: 4px; color: #7e857d; font-size: 8px; }
.message-image.generated { width: min(620px, 100%); padding: 8px; display: block; border-radius: 10px; background: white; box-shadow: 0 8px 25px rgba(23,33,29,.08); transition: transform .18s, box-shadow .18s; }.message-image.generated:hover { transform: translateY(-2px); box-shadow: 0 13px 31px rgba(23,33,29,.12); }.message-image.generated img { width: 100%; height: auto; max-height: 560px; display: block; border-radius: 7px; object-fit: contain; }.message-image.generated span { padding: 8px 4px 2px; }.message-image.generated b { font-size: 10px; }
.input-action-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.settings-connection { margin-top: 14px; padding: 10px 12px; border-radius: 4px; background: #ecebe5; color: #6f746d; font-size: 10px; }
.settings-connection.success { background: #edf6dd; color: #536540; }
.settings-connection.error { background: #fff0f0; color: #8f3f46; }
.password-form { padding: 22px 30px 30px; border-top: 1px solid var(--line); background: #eeece4; }
.password-form h3 { margin: 0 0 13px; font: 400 17px Georgia, serif; }
.password-fields { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 8px; }
.password-fields input { min-width: 0; border: 1px solid #c5c7bf; border-radius: 5px; padding: 10px; background: white; font-size: 11px; }
.inline-check input { width: auto; margin: 0; padding: 0; }
.inline-check { display: flex !important; align-items: center; gap: 6px; margin-top: 7px !important; font-size: 9px !important; font-weight: 500 !important; }

/* Local Codex admin view */
.codex-view { height: 100%; min-height: 0; overflow: hidden; padding: 16px 22px 18px; display: flex; flex-direction: column; background: radial-gradient(circle at 93% 0, rgba(121,199,255,.12), transparent 25%), linear-gradient(180deg, #fbfaf6, #f2f0e9); }
.codex-page-header { min-height: 42px; padding: 0 4px 9px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #d5d7d0; }
.codex-page-title { min-width: 0; display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }.codex-page-title strong { font: 400 15px Georgia, serif; }.codex-page-title span { color: #8a8f88; font-size: 8px; }
.codex-status { min-width: 0; min-height: 34px; margin-left: auto; padding: 6px 10px; display: flex; align-items: center; gap: 7px; color: #606a62; font-size: 11px; font-weight: 600; white-space: nowrap; }
.codex-status i { width: 8px; height: 8px; border-radius: 50%; background: #999; }.codex-status.checking i { animation: pulse 1.2s infinite; }.codex-status.online i { background: #75a43f; }.codex-status.offline i { background: var(--danger); }
.codex-refresh-compact { min-height: 34px; padding: 0 12px; display: flex; align-items: center; gap: 6px; border: 1px solid #c8cbc3; border-radius: 6px; background: rgba(255,255,255,.55); color: #4f5b53; font-size: 11px; font-weight: 650; }.codex-refresh-compact:hover { border-color: #8c9a82; background: white; }.codex-refresh-compact b { font-size: 16px; font-weight: 400; }
.codex-project-section { margin-top: 45px; }
.codex-no-project { min-height: 0; flex: 1; display: grid; place-content: center; text-align: center; color: #858a83; }.codex-no-project span { font: 700 9px "Bahnschrift", sans-serif; letter-spacing: .15em; }.codex-no-project p { max-width: 430px; font-size: 11px; line-height: 1.55; }
.codex-project-grid { margin-top: 15px; display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 9px; }
.codex-project-card { min-width: 0; min-height: 96px; padding: 13px; border: 1px solid #d0d2cb; border-radius: 5px; background: rgba(255,255,255,.74); text-align: left; }
.codex-project-card:hover, .codex-project-card.active { border-color: #78906d; box-shadow: inset 3px 0 var(--accent); }
.codex-project-card strong, .codex-project-card small, .codex-project-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.codex-project-card strong { font: 400 17px Georgia, serif; }.codex-project-card small { margin-top: 7px; color: #777d76; font-size: 8px; }.codex-project-card span { margin-top: 12px; color: #626b64; font-size: 9px; }
.codex-project-workspace { min-height: 0; flex: 1; margin-top: 6px; display: flex; flex-direction: column; }
.codex-workspace-header { min-height: 25px; padding: 2px 5px 5px; display: flex; align-items: baseline; gap: 8px; border-bottom: 1px solid #dedfd9; overflow: hidden; white-space: nowrap; }.codex-workspace-header strong { flex: 0 0 auto; font: 400 13px Georgia, serif; }.codex-workspace-header span { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #858a83; font: 8px Consolas, monospace; }
.codex-view.thread-selected .codex-workspace-header { display: none; }
.codex-archive-toggle { display: flex; align-items: center; gap: 7px; font-size: 10px; white-space: nowrap; }
.codex-followup-form { position: relative; flex: 0 0 auto; padding: 9px 10px; display: flex; flex-direction: column; gap: 5px; border: 1px solid #bec3b9; border-radius: 11px; background: rgba(255,255,255,.97); box-shadow: 0 9px 30px rgba(23,33,29,.1), 0 1px 2px rgba(23,33,29,.07); transition: border-color .18s, box-shadow .18s, transform .18s; }
.codex-followup-form:focus-within { border-color: #879b75; box-shadow: 0 0 0 3px rgba(126,156,100,.1), 0 12px 34px rgba(23,33,29,.11); }
.codex-followup-form.dragging { border-color: #6f8a59; box-shadow: 0 0 0 4px rgba(126,156,100,.18), 0 14px 36px rgba(23,33,29,.12); transform: translateY(-2px); }
.codex-followup-form.dragging::after { content: "Отпустите файлы, чтобы прикрепить"; position: absolute; inset: 5px; z-index: 5; display: grid; place-items: center; border: 1px dashed #6f8a59; border-radius: 8px; background: rgba(245,250,236,.96); color: #4d6639; font-size: 11px; font-weight: 750; pointer-events: none; }
.codex-followup-form textarea { width: 100%; resize: none; min-height: 42px; max-height: 150px; border: 0; outline: 0; padding: 6px 7px; background: transparent; line-height: 1.45; }
.codex-run-controls { min-width: 0; display: flex; align-items: center; gap: 7px; }
.codex-run-controls .composer-attach-button { width: 34px; height: 34px; flex-basis: 34px; }
.codex-run-controls .composer-model-line { min-height: 34px; flex: 0 1 auto; margin: 0; padding-inline: 9px; border: 1px solid #d8dad3; background: #f7f7f3; }
.codex-run-controls .composer-model-line select { width: auto; max-width: 230px; height: 32px; font-size: 12px; font-weight: 700; }
.codex-run-controls .composer-model-line + .composer-model-line { padding-left: 9px; border-left: 1px solid #d8dad3; }
.codex-run-controls .composer-model-line + .composer-model-line select { max-width: 145px; color: #59645d; font-size: 12px; }
.codex-upload-status { color: #778271; font-size: 10px; white-space: nowrap; }
.codex-run-controls .button { min-height: 36px; margin-left: auto; padding: 0 15px; font-size: 11px; }
.codex-pending-attachments { padding: 2px 5px 4px; }
.codex-task-layout { min-height: 0; flex: 1; margin-top: 7px; display: block; overflow: hidden; border: 1px solid #cdd0c8; border-radius: 10px; background: white; box-shadow: 0 12px 34px rgba(23,33,29,.07); }
.codex-thread-list { min-width: 0; max-height: 680px; overflow-y: auto; border-right: 1px solid #d7d9d2; background: #f1efe8; }
.codex-thread-button { width: 100%; padding: 13px; border: 0; border-bottom: 1px solid #dbdcd6; background: transparent; text-align: left; }
.codex-thread-button:hover, .codex-thread-button.active { background: white; box-shadow: inset 3px 0 var(--accent); }.codex-thread-button strong, .codex-thread-button small, .codex-thread-button span { display: block; }.codex-thread-button strong { font-size: 11px; line-height: 1.35; }.codex-thread-button small { margin-top: 5px; color: #81867f; font-size: 8px; }.codex-thread-button span { margin-top: 7px; color: #677068; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }.codex-thread-button.archived { opacity: .6; }
.codex-thread-detail { min-width: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; background: #fbfaf6; }
.codex-mobile-tree-button { display: none; }
.codex-thread-empty { margin: auto; padding: 35px; text-align: center; color: #858a83; }.codex-thread-empty span { font: 700 9px "Bahnschrift", sans-serif; letter-spacing: .15em; }.codex-thread-empty p { max-width: 360px; font-size: 11px; line-height: 1.5; }
#codex-thread-content { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.codex-thread-header { min-height: 57px; padding: 9px 14px; display: flex; flex: 0 0 auto; justify-content: space-between; gap: 15px; align-items: center; border-bottom: 1px solid #e2e3de; background: rgba(255,255,255,.86); }.codex-thread-heading { min-width: 0; flex: 1 1 auto; }.codex-thread-header span { color: #778078; font: 700 7px "Bahnschrift", sans-serif; letter-spacing: .12em; }.codex-thread-header h2 { max-width: 760px; margin: 3px 0 0; font: 400 17px Georgia, serif; }.codex-thread-header > div:last-child { display: flex; gap: 6px; }.codex-thread-header .button { min-height: 29px; padding: 0 9px; font-size: 8px; }
.codex-thread-header .codex-thread-status { width: max-content; max-width: 100%; min-height: 21px; padding: 3px 8px; display: inline-flex; align-items: center; gap: 6px; overflow: hidden; border: 1px solid #d5d9d2; border-radius: 12px; background: #f3f4f0; color: #667069; font: 750 8px/1.2 "Segoe UI Variable", sans-serif; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.codex-thread-status::before { content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #a4aaa5; }.codex-thread-status.working { border-color: #a7c978; background: #eef8df; color: #46612e; }.codex-thread-status.working::before { background: #75a43f; animation: liveDot 1.25s ease-out infinite; }.codex-thread-status.completed { border-color: #cbd7bf; background: #f2f7ec; color: #53644a; }.codex-thread-status.completed::before { background: #7da051; }.codex-thread-status.checking { border-color: #ddd4b3; background: #fff9e7; color: #75652e; }.codex-thread-status.checking::before { background: #c2a43d; }
.codex-load-older { flex: 0 0 auto; min-height: 32px; margin: 9px auto 0; padding: 0 14px; border: 1px solid #d2d5cd; border-radius: 16px; background: #f3f3ed; color: #657065; font-size: 9px; font-weight: 700; }.codex-load-older:hover { border-color: #8b9c80; background: #eef5e3; color: #40533f; }.codex-load-older:disabled { opacity: .6; cursor: wait; }
.codex-activity { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 15px clamp(13px, 4vw, 48px) 24px; background: radial-gradient(circle at 12% 0, rgba(201,242,124,.055), transparent 25%), #fbfaf6; }
.codex-turn { width: min(100%, 1080px); margin: 0 auto 18px; padding-bottom: 14px; border-bottom: 1px solid #e4e4df; animation: codexTurnIn .28s ease both; }.codex-turn > header { display: flex; justify-content: space-between; color: #8b9089; font-size: 7px; text-transform: uppercase; letter-spacing: .08em; }
@keyframes codexTurnIn { from { opacity: 0; transform: translateY(4px); } }
.codex-item { margin-top: 8px; padding: 10px 12px; border: 1px solid #e1e2dd; border-left: 3px solid #b7bbb3; border-radius: 8px; background: rgba(255,255,255,.94); box-shadow: 0 2px 9px rgba(23,33,29,.035); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }.codex-item.userMessage { width: min(88%, 820px); margin-left: auto; border-color: #c9dde9; background: #f2f8fb; }.codex-item.agentMessage { border-color: #d9dfd1; border-left-color: #8fb44e; background: rgba(255,255,255,.98); }.codex-item.commandExecution, .codex-item.fileChange, .codex-item.mcpToolCall, .codex-item.collabAgentToolCall { border-color: #ded3ea; border-left-color: #c9a7ff; background: #faf7ff; font-family: Consolas, monospace; font-size: 9px; }.codex-item.reasoning { border-color: #deded9; color: #747a73; background: #f3f2ed; }.codex-item > strong { display: block; margin-bottom: 5px; font-family: "Segoe UI Variable", sans-serif; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.codex-item.agentMessage { position: relative; }.codex-item.agentMessage > strong { min-height: 30px; padding-right: 38px; display: flex; align-items: center; }
.codex-copy-response { position: absolute; top: 6px; right: 7px; width: 30px; height: 30px; min-width: 30px; min-height: 30px; padding: 0; display: grid; place-items: center; border: 1px solid #d5d8d1; border-radius: 6px; background: #f7f8f4; color: #657067; }.codex-copy-response:hover { border-color: #91a180; color: #40533f; background: #f0f6e8; }.codex-copy-response.copied { border-color: #91ad6b; color: #4d6639; background: #edf6dd; }
.codex-item.userMessage.pending { opacity: .78; border-style: dashed; background: #f7fbfd; }.codex-item.userMessage.pending > strong { color: #60746a; }
@keyframes codexSendSpin { to { transform: rotate(360deg); } }
.codex-item > summary { margin: -10px -12px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; font-family: "Segoe UI Variable", sans-serif; }
.codex-item > summary::-webkit-details-marker { display: none; }
.codex-item > summary::before { content: "▸"; flex: 0 0 auto; color: #777f77; font-size: 9px; transition: transform .16s; }
.codex-item[open] > summary { margin-bottom: 0; border-bottom: 1px solid rgba(80,85,80,.12); }
.codex-item[open] > summary::before { transform: rotate(90deg); }
.codex-item > summary strong { margin-right: auto; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.codex-item > summary span { color: #858a83; font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.codex-technical-group { margin-top: 8px; border: 1px solid #dddfe0; border-left: 3px solid #98a09b; border-radius: 8px; background: #f4f5f2; box-shadow: 0 2px 9px rgba(23,33,29,.025); }
.codex-technical-group > summary { min-width: 0; min-height: 40px; padding: 7px 11px; display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; color: #68716b; font-family: "Segoe UI Variable", sans-serif; }
.codex-technical-group > summary::-webkit-details-marker { display: none; }
.codex-technical-group > summary::before { content: "▸"; flex: 0 0 auto; color: #68716b; font-size: 10px; transition: transform .16s; }
.codex-technical-group[open] > summary { border-bottom: 1px solid #dddeda; }
.codex-technical-group[open] > summary::before { transform: rotate(90deg); }
.codex-technical-group > summary strong { flex: 0 0 auto; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.codex-technical-group > summary b { min-width: 22px; padding: 2px 6px; border-radius: 10px; background: #dfe3de; color: #4f5953; font-size: 9px; text-align: center; }
.codex-technical-group > summary span { min-width: 0; flex: 1; overflow: hidden; color: #858c87; font-size: 8px; text-align: right; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.codex-technical-group.pending > summary b { background: #e6f3cf; color: #52663d; }
.codex-technical-items { padding: 1px 8px 8px; }
.codex-technical-items > .codex-item { margin-top: 7px; box-shadow: none; }
.codex-item.fileChange { font-family: "Segoe UI Variable", "Aptos", sans-serif; }
.codex-file-changes { margin-top: 9px; }
.codex-file-change-overview { min-height: 38px; padding: 6px 8px; display: flex; align-items: center; gap: 7px; border: 1px solid #d9ddd7; border-radius: 7px; background: #f5f7f2; }
.codex-file-change-overview strong { margin-right: auto; color: #455149; font-size: 10px; }
.codex-file-change-overview span { min-width: 38px; padding: 3px 7px; border-radius: 10px; font: 700 9px Consolas, monospace; text-align: center; }
.codex-file-change-overview .addition { background: #dff2df; color: #27643a; }
.codex-file-change-overview .deletion { background: #f8dede; color: #9b3038; }
.codex-file-change-list { margin-top: 7px; display: grid; gap: 5px; }
.codex-file-change { overflow: hidden; border: 1px solid #dadcd7; border-radius: 7px; background: white; }
.codex-file-change > summary { min-width: 0; min-height: 40px; padding: 5px 8px; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 7px; list-style: none; cursor: pointer; }
.codex-file-change > summary::-webkit-details-marker { display: none; }
.codex-file-change > summary::before { content: "▸"; color: #727a74; font-size: 9px; transition: transform .16s; }
.codex-file-change[open] > summary::before { transform: rotate(90deg); }
.codex-file-change > summary em { min-width: 70px; padding: 3px 7px; border-radius: 10px; font-size: 8px; font-style: normal; font-weight: 800; text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.codex-file-change.add > summary em { background: #dff2df; color: #27643a; }
.codex-file-change.delete > summary em { background: #f8dede; color: #9b3038; }
.codex-file-change.update > summary em { background: #e5e8f6; color: #475181; }
.codex-file-change.rename > summary em { background: #f6ead5; color: #876024; }
.codex-file-change > summary strong { min-width: 0; overflow: hidden; color: #3f4943; font: 600 10px Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.codex-diff-stats { display: flex; align-items: center; gap: 5px; font: 700 9px Consolas, monospace; }
.codex-diff-stats b { color: #27713e; }.codex-diff-stats i { color: #ad3941; font-style: normal; }
.codex-unified-diff { max-height: 520px; overflow: auto; border-top: 1px solid #dedfdc; background: #fbfbfa; font: 9px/1.45 Consolas, monospace; }
.codex-diff-line { min-width: max-content; display: grid; grid-template-columns: 42px 42px minmax(520px, 1fr); }
.codex-diff-line > span { padding: 1px 7px; border-right: 1px solid rgba(80,85,80,.09); color: #a0a59f; text-align: right; user-select: none; }
.codex-diff-line code { padding: 1px 9px; color: #414844; font: inherit; white-space: pre; }
.codex-diff-line.addition { background: #e7f6e8; }.codex-diff-line.addition code { color: #1f6335; }
.codex-diff-line.deletion { background: #fde9e9; }.codex-diff-line.deletion code { color: #98323a; }
.codex-diff-line.hunk { background: #edf1f8; }.codex-diff-line.hunk code { color: #4d5e82; }
.codex-diff-line.meta code { color: #7e8580; font-style: italic; }
.codex-diff-empty { padding: 14px; color: #858b85; font-size: 9px; text-align: center; }
.codex-item pre { margin: 10px 0 0; overflow-x: auto; white-space: pre-wrap; }
.codex-item-files { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 7px; font-family: "Segoe UI Variable", sans-serif; white-space: normal; }
.codex-attachment { max-width: 340px; min-height: 38px; padding: 6px 8px; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 8px; border: 1px solid #d1d3cc; border-radius: 5px; background: white; color: #445049; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.codex-attachment:hover { border-color: #879b75; }.codex-attachment > i { font-style: normal; text-align: center; color: #65804e; }.codex-attachment span, .codex-attachment b, .codex-attachment small { min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.codex-attachment b { font-size: 9px; }.codex-attachment small { margin-top: 3px; color: #81877f; font-size: 8px; }
.codex-attachment.image { width: min(340px, 100%); grid-template-columns: 82px minmax(0, 1fr); }.codex-attachment.image img { width: 82px; height: 64px; border-radius: 4px; object-fit: cover; background: #e7e8e2; }
.codex-attachment.image.generated { width: min(620px, 100%); max-width: 620px; padding: 8px; display: block; border-radius: 10px; box-shadow: 0 8px 23px rgba(23,33,29,.08); }.codex-attachment.image.generated img { width: 100%; height: auto; max-height: 520px; display: block; border-radius: 7px; object-fit: contain; }.codex-attachment.image.generated span { padding: 8px 4px 2px; }
.codex-work-summary { margin-top: 14px; padding: 12px; border: 1px solid #cbd9bc; border-left: 4px solid #80a84d; border-radius: 10px; background: linear-gradient(135deg, #f5faec, #fff 45%); box-shadow: 0 6px 20px rgba(57,81,39,.07); }
.codex-work-summary > header { display: flex; align-items: center; gap: 10px; }.codex-work-summary > header > i { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: #7da84a; color: white; font-size: 15px; font-style: normal; font-weight: 800; }.codex-work-summary > header div { min-width: 0; }.codex-work-summary > header strong, .codex-work-summary > header span { display: block; }.codex-work-summary > header strong { color: #3f5332; font-size: 12px; }.codex-work-summary > header span { margin-top: 2px; color: #718067; font-size: 9px; }
.codex-work-summary-body { margin-top: 11px; display: grid; gap: 12px; }.codex-work-summary-body section { min-width: 0; }.codex-work-summary-body h3 { margin: 0 0 7px; color: #596657; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.codex-work-summary .codex-file-changes, .codex-work-summary .codex-item-files { margin-top: 0; }.codex-work-summary .codex-item-files { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }.codex-work-summary .codex-attachment.image.generated { width: 100%; max-width: none; padding: 6px; }.codex-work-summary .codex-attachment.image.generated img { height: 150px; object-fit: cover; }.codex-work-summary .codex-attachment.image.generated span { padding: 6px 3px 1px; }
.codex-followup-form { margin: 10px clamp(10px, 3vw, 32px) 11px; }

/* Automations */
.automations-view { height: 100vh; overflow-y: auto; padding: clamp(26px, 4vw, 54px); background: radial-gradient(circle at 100% 0, rgba(121,199,255,.09), transparent 28%), var(--paper-2); }
.automations-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 22px; padding-bottom: 22px; border-bottom: 1px solid #d8d9d2; }
.automations-header h1 { margin: 8px 0 5px; font: 400 clamp(34px, 4vw, 52px)/1 Georgia, serif; }.automations-header p { max-width: 650px; margin: 0; color: #737a74; font-size: 13px; }
.automations-back { display: none; }
.automations-header-actions { display: flex; align-items: center; gap: 8px; }.automations-header-actions > span { margin-right: 4px; color: #7b827c; font-size: 11px; white-space: nowrap; }
.automations-note { margin-top: 17px; padding: 11px 13px; display: flex; align-items: center; gap: 10px; border: 1px solid #d6ddd0; border-radius: 8px; background: #f4f8ed; color: #64705f; font-size: 11px; line-height: 1.45; }.automations-note > i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #83aa4c; }.automations-note code { font-family: Consolas, monospace; }
.automations-list { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 12px; }
.automation-card { min-width: 0; padding: 15px; display: flex; flex-direction: column; border: 1px solid #d8dad4; border-top: 3px solid #86a65a; border-radius: 10px; background: rgba(255,255,255,.96); box-shadow: 0 8px 26px rgba(23,33,29,.055); }.automation-card.paused { opacity: .72; border-top-color: #9a9f99; }.automation-card.running { border-top-color: #79c7ff; box-shadow: 0 0 0 3px rgba(121,199,255,.12), 0 8px 26px rgba(23,33,29,.055); }
.automation-card > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.automation-source { padding: 3px 7px; border-radius: 10px; background: #e6f0d8; color: #52683c; font-size: 8px; font-weight: 800; letter-spacing: .08em; }.automation-source.cockpit { background: #dceef9; color: #396682; }.automation-status { color: #79817b; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.automation-card-main { min-width: 0; margin-top: 12px; padding: 0; border: 0; background: transparent; text-align: left; }.automation-card-main h2 { margin: 0; font: 400 22px/1.15 Georgia, serif; }.automation-card-main p { margin: 8px 0 0; display: -webkit-box; overflow: hidden; color: #6d756f; font-size: 11px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.automation-card dl { margin: 14px 0 0; padding-top: 10px; display: grid; gap: 7px; border-top: 1px solid #ecece8; }.automation-card dl > div { min-width: 0; display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; }.automation-card dt { color: #929791; font-size: 8px; text-transform: uppercase; letter-spacing: .05em; }.automation-card dd { min-width: 0; margin: 0; overflow: hidden; color: #4f5953; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.automation-error { margin-top: 10px; padding: 8px 9px; border-left: 3px solid #c14c55; background: #fff1f1; color: #8f343b; font-size: 10px; line-height: 1.4; }
.automation-card > footer { margin-top: auto; padding-top: 14px; display: grid; grid-template-columns: 1fr 1fr 34px; gap: 6px; }.automation-card > footer .button { min-height: 34px; padding-inline: 9px; font-size: 10px; }.automation-edit-icon { width: 34px; height: 34px; border: 1px solid #cfd2cb; border-radius: 6px; background: #f7f7f3; color: #5c665f; font-size: 15px; }
.automations-empty { min-height: 360px; display: grid; place-items: center; align-content: center; text-align: center; }.automations-empty > span { color: #8a908a; font-size: 9px; font-weight: 800; letter-spacing: .14em; }.automations-empty p { max-width: 440px; margin: 10px 0 18px; color: #737a74; font-size: 13px; line-height: 1.5; }

.automation-modal { width: min(880px, calc(100vw - 24px)); }
.automation-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.automation-form-grid label > select, .automation-interval select { width: 100%; height: 45px; margin-top: 7px; border: 1px solid #c6c8c1; border-radius: 5px; background: white; padding: 0 11px; }
.automation-name-field, .automation-schedule-fields, .automation-prompt-field, .automation-active { grid-column: 1 / -1; }
.automation-schedule-fields { padding: 13px !important; border: 1px solid #dedfd9 !important; border-radius: 8px; background: #f8f8f5; }.automation-schedule-fields legend { padding: 0 5px; }
.automation-schedule-row { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 10px; }.automation-schedule-row label { margin-top: 0; }
.automation-interval { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }.automation-interval input { width: 100%; height: 45px; margin-top: 7px; border: 1px solid #c6c8c1; border-radius: 5px; padding: 0 10px; }.automation-interval select { margin-top: 7px; }
.automation-weekdays { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 5px; }.automation-weekdays label { min-height: 34px; margin: 0; padding: 0 8px; display: flex; align-items: center; gap: 5px; border: 1px solid #d7d9d2; border-radius: 6px; background: white; font-size: 10px; }.automation-weekdays input { accent-color: #6f9342; }
.automation-prompt-field textarea { min-height: 130px; }
.automation-model-fields { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }.automation-model-fields label { margin-top: 20px; }
.automation-active { min-height: 42px; display: flex !important; align-items: center; gap: 8px; }.automation-active input { width: 18px !important; height: 18px !important; margin: 0 !important; accent-color: #739947; }
.automation-modal-actions { grid-template-columns: auto 1fr auto auto; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; align-items: end; gap: 8px; pointer-events: none; }
.toast { max-width: min(390px, calc(100vw - 40px)); padding: 12px 16px; border-left: 3px solid var(--ink); background: white; color: var(--ink); box-shadow: 0 12px 32px rgba(23,33,29,.2); font-size: 12px; opacity: 0; transform: translateY(8px); transition: .22s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.success { border-color: #75a43f; }.toast.error { border-color: var(--danger); }
.server-update-notice { position: fixed; top: 12px; left: 50%; z-index: 120; width: min(620px, calc(100vw - 24px)); padding: 12px 15px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; border: 1px solid #d99499; border-radius: 8px; background: #fff2f2; color: #742f35; box-shadow: 0 12px 36px rgba(45,16,19,.2); transform: translateX(-50%); }
.server-update-notice strong { font-size: 13px; white-space: nowrap; }.server-update-notice span { font-size: 12px; line-height: 1.4; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 270px 1fr; }
  .project-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .codex-project-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .codex-task-layout { grid-template-columns: 240px minmax(0, 1fr); }
}

@media (max-width: 760px) {
  html, body { width: 100%; overflow: hidden; }
  .login-screen { display: block; background: var(--paper-2); }
  .login-art { height: 31vh; min-height: 220px; }
  .orbit-one { width: 220px; height: 220px; }.orbit-two { width: 340px; height: 340px; }
  .login-mark { width: 88px; height: 88px; box-shadow: 0 0 0 11px rgba(23,33,29,.85); }
  .login-mark span { font-size: 52px; }
  .login-art p { display: none; }
  .login-panel { min-height: 69vh; padding: 36px 25px calc(30px + env(safe-area-inset-bottom)); justify-content: flex-start; }
  .login-panel::before { display: none; }
  .login-copy h1 { margin-top: 13px; font-size: 43px; }
  .login-copy p { font-size: 14px; }
  .login-form { margin-top: 30px; }
  .password-row { grid-template-columns: 1fr; }

  .app-shell { position: relative; display: block; height: 100dvh; }
  .projects-panel, .workspace { position: absolute; inset: 0; width: 100%; height: 100%; transform: translateX(100%); transition: transform .24s ease; }
  .projects-panel { z-index: 3; transform: translateX(-100%); padding-top: calc(20px + env(safe-area-inset-top)); }
  .workspace { z-index: 1; transform: translateX(100%); }
  .app-shell[data-mobile-view="projects"] .projects-panel { transform: translateX(0); }
  .app-shell[data-mobile-view="chats"] .projects-panel { transform: translateX(0); }
  .app-shell[data-mobile-view="chat"] .workspace { transform: translateX(0); }
  .app-shell[data-mobile-view="projects"] .workspace, .app-shell[data-mobile-view="chats"] .workspace { transform: translateX(100%); }
  .app-shell[data-mobile-view="chat"] .projects-panel { transform: translateX(-100%); }
  .brand { padding-left: 14px; }
  .projects-list { padding-bottom: 20px; }
  .app-shell.project-open .projects-list { max-height: 22dvh; padding-bottom: 4px; }
  .project-nav-item { padding: 12px 10px; }
  .project-nav-item i { width: 34px; height: 34px; flex-basis: 34px; }
  .sidebar-footer { padding-bottom: env(safe-area-inset-bottom); }

  .mobile-back { display: block; grid-column: 1 / -1; width: max-content; margin: 0 0 8px; padding: 0; border: 0; background: transparent; color: #6f756e; font-size: 10px; }
  .sidebar-chats { margin-top: 8px; }
  .sidebar-tabs { grid-template-columns: 1fr 1fr auto; }
  .sidebar-tabs button { min-height: 37px; font-size: 10px; }
  .chats-header { min-height: 45px; }
  .workspace { background: var(--paper-2); }
  .dashboard-view { padding: calc(30px + env(safe-area-inset-top)) 22px calc(35px + env(safe-area-inset-bottom)); }
  .dashboard-header h1 { font-size: 45px; }
  .date-card { display: none; }
  .mobile-settings { display: block; border: 1px solid #c5c8c0; border-radius: 5px; background: transparent; padding: 8px 10px; font-size: 10px; }
  .setup-banner { margin-top: 30px; align-items: stretch; flex-direction: column; }
  .dashboard-section { margin-top: 44px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 135px; }
  .dashboard-bottom { grid-template-columns: 1fr; margin-top: 38px; }
  .project-view { padding: calc(22px + env(safe-area-inset-top)) 19px calc(25px + env(safe-area-inset-bottom)); }
  .project-view .mobile-back { margin-bottom: 20px; }
  .project-hero-mark { width: 49px; height: 49px; margin-bottom: 18px; }
  .project-view h1 { font-size: 36px; }
  .project-actions { align-items: stretch; flex-direction: column; }

  .chat-view { grid-template-rows: auto 1fr auto; height: 100dvh; }
  .chat-header { min-height: 102px; padding: calc(11px + env(safe-area-inset-top)) 15px 11px; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
  .chat-header .mobile-back { grid-column: 1 / -1; margin: 0 0 4px; }
  #chat-title { max-width: 58vw; font-size: 17px; }
  .model-picker > span { display: none; }
  .model-picker select { max-width: 135px; }
  .message { grid-template-columns: 27px minmax(0, 1fr); gap: 8px; padding: 12px 10px; }
  .message.user .message-content { width: 96%; padding: 10px; }
  .message-avatar { width: 27px; height: 27px; }
  .message.assistant .message-avatar { font-size: 17px; }
  .markdown-body { font-size: 13px; }
  .message-image.generated { width: 100%; }.message-image.generated img { max-height: 55dvh; }
  .copy-message { opacity: 1; }
  .save-message-file { opacity: 1; }
  .empty-chat { padding: 20px; }
  .empty-chat h2 { font-size: 31px; }
  .prompt-chips { flex-direction: column; }
  .composer-wrap { padding: 7px 7px calc(7px + env(safe-area-inset-bottom)); }
  .composer-tools > .keyboard-hint, .composer-wrap > small { display: none; }
  .composer textarea { min-height: 48px; padding: 13px 13px 5px; font-size: 15px; }
  .composer-bottom { min-height: 51px; padding: 4px 6px 7px; display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 6px; }
  .composer-tools { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1.15fr) minmax(104px, .85fr); gap: 5px; overflow: visible; }
  .composer-tools.auto-mode { grid-template-columns: 38px minmax(0, 1fr); }
  .composer-attach-button { width: 38px; height: 42px; border-radius: 8px; }
  .composer-attach-button svg { width: 17px; height: 17px; }
  .composer-model-line, .reasoning-line { width: 100%; max-width: none; height: 42px; padding: 5px 8px 4px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 11px 18px; gap: 0 3px; border: 1px solid #d6d8d1; border-radius: 8px; background: #f7f7f3; }
  .composer-model-line .control-caption { display: block; grid-column: 1; color: #8b918a; font-size: 8px; font-weight: 700; line-height: 10px; text-transform: uppercase; letter-spacing: .05em; }
  .composer-model-line select, .reasoning-line select { grid-column: 1; grid-row: 2; width: 100%; max-width: none; height: 18px; padding: 0; color: #37433d; font-size: 11px; font-weight: 700; }
  .composer-model-line i { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 13px; }
  .reasoning-line { border-left: 1px solid #d6d8d1; }
  .file-upload-status { display: none; }
  #send-button { width: 40px; height: 42px; align-self: center; border-radius: 8px; }

  .modal { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .modal > form:first-child { padding: 22px 19px; }
  .modal-actions { grid-template-columns: 1fr 1fr; }
  .modal-actions > span { display: none; }
  .modal-actions .button-danger { grid-column: 1 / -1; }
  .project-modal-actions #archive-project-button { grid-column: 1 / -1; }
  .project-modal { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); overflow: hidden; border-radius: 12px; }
  .project-modal > form:first-child { padding: 0; }
  .project-modal-header { min-height: 78px; padding: 14px 15px 12px; align-items: center; }
  .project-modal-heading { gap: 10px; }
  .project-modal-heading > i { flex-basis: 38px; width: 38px; height: 38px; border-radius: 10px; font-size: 23px; }
  .project-modal-heading h2 { margin-top: 2px; font-size: 22px; }
  .project-modal-heading p, .project-modal-heading .eyebrow { display: none; }
  .project-form-grid { padding: 12px 15px 0; display: block; }
  .project-modal label + label, .project-modal fieldset, .project-modal .project-instructions-field { margin-top: 10px; }
  .project-modal label > input, .project-modal label > textarea { margin-top: 4px; padding: 8px 10px; }
  .project-modal label > input { height: 38px; }
  .project-modal #project-description { height: 57px; }
  .project-modal #project-instructions { height: 82px; }
  .project-modal label > small { margin-top: 3px; font-size: 8px; }
  .project-modal-actions { margin: 10px 15px 0; padding: 10px 0 13px; grid-template-columns: 1fr 1fr; gap: 6px; }
  .project-modal-actions #delete-project-button, .project-modal-actions #archive-project-button { grid-column: auto; }
  .project-modal-actions .button { min-height: 36px; padding: 0 9px; }
  .codex-image-dialog { width: calc(100vw - 8px); max-height: calc(100dvh - 8px); border-radius: 12px; }.codex-image-dialog header { min-height: 52px; padding: 8px 10px 8px 13px; }.codex-image-dialog header span { display: none; }.codex-image-dialog header h2 { max-width: 73vw; font-size: 16px; }.codex-image-preview { min-height: 190px; max-height: calc(100dvh - 125px); padding: 6px; }.codex-image-preview img { max-height: calc(100dvh - 145px); border-radius: 6px; }.codex-image-dialog footer { min-height: 55px; padding: 8px; }.codex-image-dialog footer .button { width: 100%; }
  .image-editor-dialog { width: calc(100vw - 8px); max-height: calc(100dvh - 8px); border-radius: 12px; }
  .image-editor-header { height: 52px; padding: 0 11px 0 14px; }.image-editor-header h2 { font-size: 17px; }.image-editor-header span { display: none; }
  .image-editor-layout { display: block; }
  .image-editor-preview { padding: 8px 8px 5px; }
  .image-editor-stage { min-height: 180px; max-height: min(42dvh, 430px); border-radius: 7px; }
  .image-editor-hint { min-height: 30px; padding: 7px 2px 2px; font-size: 8px; }
  .image-edit-form { padding: 11px; gap: 10px; }
  .image-edit-tools { padding-bottom: 9px; }.image-edit-tools .button { min-height: 38px; }
  .image-edit-prompt textarea { min-height: 72px; max-height: 13dvh; padding: 9px; font-size: 12px; }
  .image-edit-actions .button { min-height: 40px; }
  .password-form { padding: 20px; }
  .password-fields { grid-template-columns: 1fr; }
  .settings-account-card { grid-template-columns: auto minmax(0,1fr); }
  .settings-account-card .button { grid-column: 1 / -1; width: 100%; }
  .codex-view { padding: calc(10px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom)); }
  .codex-page-header { min-height: 38px; padding: 0 2px 6px; display: grid; grid-template-columns: auto minmax(72px, auto) minmax(0, 1fr) auto; gap: 5px; }
  .codex-page-header .codex-page-back { grid-column: auto; width: 32px; min-height: 30px; margin: 0; display: grid; place-items: center; border: 1px solid #cdd0c8; border-radius: 7px; background: #f3f2ec; color: #46534c; font-size: 15px; }
  .codex-page-title { gap: 0; }.codex-page-title strong { font-size: 13px; }.codex-page-title span { display: none; }
  .codex-status { min-width: 0; min-height: 28px; margin: 0; padding: 3px; overflow: hidden; }.codex-status span { overflow: hidden; text-overflow: ellipsis; }
  .codex-refresh-compact { width: 32px; min-height: 30px; padding: 0; display: grid; place-items: center; }.codex-refresh-compact span { display: none; }.codex-refresh-compact b { font-size: 16px; }
  .codex-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .codex-project-workspace { margin-top: 4px; }
  .codex-workspace-header { min-height: 27px; padding: 2px 4px 5px; flex-direction: row; align-items: baseline; gap: 6px; }.codex-workspace-header strong { font-size: 13px; }.codex-workspace-header span { font-size: 8px; }
  .codex-view.thread-selected .codex-page-header, .codex-view.thread-selected > .codex-status, .codex-view.thread-selected .codex-workspace-header { display: none; }
  .codex-view.thread-selected .codex-project-workspace { margin-top: 0; padding-top: 0; border-top: 0; }
  .codex-followup-form { margin: 6px; padding: 7px; border-radius: 10px; }
  .codex-followup-form textarea { min-height: 44px; padding: 8px; font-size: 15px; }
  .codex-run-controls { display: grid; grid-template-columns: 40px minmax(0, 1.15fr) minmax(104px, .85fr); gap: 6px; }
  .codex-run-controls .composer-attach-button { width: 40px; height: 43px; }
  .codex-run-controls .composer-model-line, .codex-run-controls .composer-model-line + .composer-model-line { width: 100%; max-width: none; height: 43px; padding: 5px 8px 4px; border: 1px solid #d6d8d1; }
  .codex-run-controls .composer-model-line select, .codex-run-controls .composer-model-line + .composer-model-line select { width: 100%; max-width: none; height: 19px; color: #37433d; font-size: 11px; font-weight: 700; }
  .codex-upload-status { display: none; }
  .codex-run-controls .button { grid-column: 1 / -1; width: 100%; min-height: 42px; margin: 0; border-radius: 8px; font-size: 12px; }
  .codex-tree-archive, .codex-tree-project-new, .codex-tree-project-archive { opacity: 1; }
  .codex-task-layout { min-height: 0; display: block; }.codex-thread-list { max-height: 250px; border-right: 0; border-bottom: 1px solid #d7d9d2; }.codex-thread-detail { min-height: 0; }
  .codex-thread-header { min-height: 56px; padding: 7px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px; align-items: center; }.codex-mobile-tree-button { min-height: 36px; padding: 0 9px; display: block; border: 1px solid #cdd0c8; border-radius: 8px; background: #f3f2ec; color: #46534c; font-size: 11px; font-weight: 750; }.codex-thread-header h2 { max-width: 100%; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.codex-thread-header > div:last-child { flex: 0 0 auto; }.codex-thread-header .button { min-height: 32px; padding: 0 8px; font-size: 9px; }.codex-thread-header #codex-interrupt-button:disabled { display: none; }
  .codex-activity { min-height: 0; padding: 10px 8px 17px; }
  .codex-item { padding: 9px 10px; }
  .codex-item > summary { margin: -9px -10px; padding: 11px 10px; }
  .codex-item[open] > summary { margin-bottom: 0; }
  .codex-technical-group > summary { min-height: 42px; padding: 8px 10px; }
  .codex-technical-items { padding: 0 7px 7px; }
  .codex-file-change > summary { min-height: 44px; }
  .codex-file-change > summary strong { font-size: 11px; }
  .codex-unified-diff { font-size: 10px; }

  .automations-view { height: 100dvh; padding: calc(15px + env(safe-area-inset-top)) 12px calc(18px + env(safe-area-inset-bottom)); }
  .automations-header { grid-template-columns: 44px minmax(0, 1fr); align-items: start; gap: 8px; padding-bottom: 14px; }
  .automations-back { width: 44px; min-width: 44px; min-height: 44px; margin: 0; display: grid; place-items: center; border: 1px solid #cdd0c8; border-radius: 8px; background: #f3f2ec; color: #46534c; font-size: 18px; }
  .automations-header h1 { margin-top: 5px; font-size: 32px; }.automations-header p { font-size: 12px; line-height: 1.4; }
  .automations-header-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }.automations-header-actions > span { grid-column: 1 / -1; }
  .automations-header-actions .button { min-height: 42px; }
  .automations-note { margin-top: 10px; font-size: 11px; }
  .automations-list { margin-top: 10px; grid-template-columns: 1fr; }
  .automation-card { padding: 13px; }.automation-card-main h2 { font-size: 21px; }.automation-card-main p { font-size: 12px; }
  .automation-card dd { font-size: 11px; }.automation-card > footer .button { min-height: 40px; font-size: 11px; }.automation-edit-icon { width: 40px; height: 40px; }
  .automation-modal { width: calc(100vw - 8px); max-height: calc(100dvh - 8px); overflow-y: auto; }
  .automation-form-grid { grid-template-columns: 1fr; gap: 0; }
  .automation-name-field, .automation-schedule-fields, .automation-prompt-field, .automation-active, .automation-model-fields { grid-column: auto; }
  .automation-model-fields { grid-template-columns: 1fr 1fr; gap: 8px; }
  .automation-schedule-row { grid-template-columns: 1fr 1fr; }.automation-schedule-row > label:first-child { grid-column: 1 / -1; }
  .automation-form-grid label > select, .automation-interval input, .automation-interval select { height: 48px; font-size: 16px; }
  .automation-modal-actions { position: sticky; bottom: 0; background: white; }

  /* Mobile usability: consistent type scale, tap targets and compact layouts. */
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  button, a, label, summary { touch-action: manipulation; }
  input, textarea, select { font-size: 16px; }
  .button { min-height: 46px; padding-inline: 15px; font-size: 14px; }
  .icon-button, .sidebar-footer-action, .modal-close { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }

  .login-screen { height: 100dvh; min-height: 0; overflow-y: auto; }
  .login-art { height: min(25dvh, 190px); min-height: 150px; }
  .login-mark { width: 74px; height: 74px; box-shadow: 0 0 0 9px rgba(23,33,29,.85); }
  .login-mark span { font-size: 44px; }
  .login-panel { min-height: auto; padding: 27px 20px calc(28px + env(safe-area-inset-bottom)); }
  .login-copy h1 { margin: 12px 0 15px; font-size: clamp(34px, 10.5vw, 42px); line-height: 1.02; }
  .login-copy p { font-size: 15px; line-height: 1.5; }
  .login-form { margin-top: 24px; }
  .login-form label { margin-bottom: 7px; font-size: 14px; }
  .login-username, .password-row input { height: 52px; font-size: 16px; }
  .login-form small { font-size: 12px; line-height: 1.45; }

  .projects-panel { padding: calc(9px + env(safe-area-inset-top)) 10px calc(9px + env(safe-area-inset-bottom)); }
  .brand { min-height: 58px; padding: 2px 7px 10px; }
  .brand-mark { width: 40px; height: 40px; font-size: 33px; }
  .brand strong { font-size: 23px; }
  .brand small { font-size: 10px; }
  .panel-section-title { min-height: 52px; padding: 7px 7px; }
  .panel-section-title span { font-size: 12px; }
  .archive-projects-toggle { min-height: 40px; padding: 0 10px; font-size: 12px; }
  .archive-projects-toggle b { font-size: 10px; }
  .project-nav-item { min-height: 58px; padding: 9px 8px; gap: 10px; }
  .project-nav-item i { width: 38px; height: 38px; flex-basis: 38px; font-size: 15px; }
  .project-nav-item strong { font-size: 15px; }
  .project-nav-item small { margin-top: 3px; font-size: 12px; }
  .project-nav-item.archived small::before { font-size: 10px; }
  .connection-pill { min-height: 42px; padding: 7px; font-size: 12px; }
  .sidebar-footer-row { grid-template-columns: minmax(0, 1fr) 44px 44px; }
  .sidebar-user { min-height: 48px; }
  .sidebar-user > i { width: 36px; height: 36px; flex-basis: 36px; font-size: 14px; }
  .sidebar-user strong { font-size: 13px; }
  .sidebar-user small { font-size: 11px; }
  .codex-nav-button { min-height: 62px; margin-block: 8px; }
  .codex-nav-button strong { font-size: 14px; }
  .codex-nav-button small { font-size: 11px; }

  .chats-header { min-height: 54px; }
  .chats-heading h2 { font-size: 18px; }
  .sidebar-tabs { margin-bottom: 8px; }
  .sidebar-tabs button { min-height: 44px; padding-inline: 10px; font-size: 13px; }
  .sidebar-new-chat b { font-size: 18px; }
  .new-chat-button { min-height: 46px; font-size: 14px; }
  .chats-label { padding: 5px 10px 7px; font-size: 10px; }
  .chat-list-item { min-height: 56px; }
  .chat-open { min-height: 56px; padding: 9px 10px; }
  .chat-open span { font-size: 14px; }
  .chat-open small { font-size: 11px; }
  .chat-delete { width: 44px; height: 44px; opacity: 1; }
  .files-header { min-height: 48px; }
  .files-header span { font-size: 11px; }
  .files-header .icon-button { width: 44px; height: 44px; }
  .project-folder-row { min-height: 35px; padding-block: 9px 5px; font-size: 11px; }
  .project-file-row { min-height: 50px; grid-template-columns: minmax(0, 1fr) 44px 44px; }
  .project-file-open { min-height: 50px; padding-block: 8px; }
  .project-file-open span { font-size: 13px; }
  .project-file-open small { font-size: 10px; }
  .project-file-delete, .project-file-download { width: 44px; height: 44px; opacity: 1; }
  .file-tree-empty { padding: 20px 12px; font-size: 12px; }

  .app-shell.codex-open .brand, .app-shell.codex-open .sidebar-footer, .app-shell.codex-open .admin-nav-buttons { display: none; }
  .app-shell.codex-open .projects-panel { padding-top: calc(7px + env(safe-area-inset-top)); }
  .codex-sidebar-tree > header { min-height: 64px; padding: 8px; }
  .codex-sidebar-tree > header span { font-size: 10px; }
  .codex-sidebar-tree > header strong { font-size: 18px; }
  #codex-sidebar-summary { padding: 9px 9px 6px; font-size: 12px; }
  .codex-sidebar-filters { padding: 4px 8px 9px; gap: 4px 16px; }
  .codex-sidebar-filters label { min-height: 36px; gap: 8px; font-size: 12px; }
  .codex-sidebar-filters input { width: 18px; height: 18px; }
  .codex-tree-project-button { min-height: 60px; padding: 9px 8px; gap: 9px; }
  .codex-tree-project-button > i { font-size: 15px; }
  .codex-tree-project-button strong { font-size: 14px; }
  .codex-tree-project-button small { margin-top: 4px; font-size: 11px; }
  .codex-tree-project-button > b { font-size: 12px; }
  .codex-tree-project-new, .codex-tree-project-archive, .codex-tree-archive { width: 44px; min-width: 44px; flex-basis: 44px; font-size: 17px; }
  .codex-tree-threads { padding-left: 16px; }
  .codex-tree-thread { min-height: 54px; padding: 9px 8px 9px 12px; }
  .codex-tree-thread strong { font-size: 13px; }
  .codex-tree-thread small { font-size: 10px; }

  .mobile-back { min-height: 44px; padding: 0 5px; display: flex; align-items: center; font-size: 13px; font-weight: 700; }
  .mobile-settings { min-height: 44px; padding: 0 13px; font-size: 13px; }
  .dashboard-view { padding: calc(24px + env(safe-area-inset-top)) 18px calc(30px + env(safe-area-inset-bottom)); }
  .dashboard-header h1 { font-size: clamp(34px, 10vw, 41px); line-height: 1; }
  .setup-banner { margin-top: 26px; padding: 15px; }
  .setup-banner strong { font-size: 19px; }
  .setup-banner span { margin-top: 5px; font-size: 13px; line-height: 1.4; }
  .dashboard-section { margin-top: 42px; }
  .section-heading h2 { font-size: 25px; }
  .section-heading span { font-size: 12px; }
  .project-card p { font-size: 14px; }
  .project-card footer { font-size: 11px; }
  .tip-card > span, .api-card > span { font-size: 10px; }
  .api-card strong { font-size: 15px; }
  .api-card p { font-size: 12px; }

  .project-view { padding: calc(15px + env(safe-area-inset-top)) 18px calc(25px + env(safe-area-inset-bottom)); }
  .project-view .mobile-back { margin-bottom: 14px; }
  .project-view h1 { font-size: 36px; }
  .project-view > p { font-size: 15px; }
  .context-preview span { font-size: 10px; }
  .context-preview p { font-size: 14px; }

  .chat-title-wrap > span { font-size: 10px; }
  #chat-title { font-size: 19px; }
  .message { grid-template-columns: 32px minmax(0, 1fr); padding: 12px 9px; }
  .message-avatar { width: 32px; height: 32px; }
  .message.user .message-content { width: 100%; }
  .message-content > header strong { font-size: 12px; }
  .copy-message { width: 34px; height: 34px; min-width: 34px; min-height: 34px; padding: 0; }
  .save-message-file { min-height: 36px; padding-inline: 7px; font-size: 11px; }
  .markdown-body { font-size: 15px; line-height: 1.58; }
  .markdown-body code, .code-block pre code { font-size: 13px; }
  .code-block > summary { min-height: 46px; font-size: 11px; }
  .code-block > summary small, .code-block button { font-size: 10px; }
  .empty-chat p { font-size: 14px; line-height: 1.45; }
  .prompt-chips button { min-height: 44px; padding: 10px 14px; font-size: 13px; }
  .composer textarea { min-height: 52px; font-size: 16px; }
  .composer-bottom { grid-template-columns: minmax(0, 1fr) 46px; }
  .composer-tools { grid-template-columns: 44px minmax(0, 1.15fr) minmax(106px, .85fr); }
  .composer-tools.auto-mode { grid-template-columns: 44px minmax(0, 1fr); }
  .composer-attach-button, .codex-run-controls .composer-attach-button { width: 44px; height: 48px; min-width: 44px; }
  .composer-model-line, .reasoning-line, .codex-run-controls .composer-model-line, .codex-run-controls .composer-model-line + .composer-model-line { height: 48px; grid-template-rows: 12px 23px; }
  .composer-model-line .control-caption { font-size: 10px; line-height: 11px; }
  .composer-model-line select, .reasoning-line select, .codex-run-controls .composer-model-line select, .codex-run-controls .composer-model-line + .composer-model-line select { height: 23px; font-size: 16px; }
  #send-button { width: 46px; height: 48px; font-size: 21px; }
  .pending-file { width: 100%; max-width: 100%; min-height: 50px; grid-template-columns: 36px minmax(0, 1fr) 36px; }
  .pending-preview, .pending-preview > i, .pending-preview > img { width: 36px; height: 36px; }
  .pending-file strong { font-size: 12px; }
  .pending-file small { font-size: 10px; }
  .pending-file button { width: 36px; height: 36px; font-size: 18px; }
  .message-file { min-height: 44px; font-size: 12px; }
  .message-image b { font-size: 12px; }
  .message-image small { font-size: 11px; }

  .modal { width: calc(100vw - 10px); max-height: calc(100dvh - 10px); border-radius: 12px; }
  .modal > form:first-child { padding: 20px 16px; }
  .modal header { padding-bottom: 15px; }
  .modal h2 { font-size: 27px; }
  .modal label, .modal legend, .project-modal label, .project-modal legend { font-size: 14px; }
  .modal label > input, .modal label > textarea, .input-action-row input, .input-action-row select { min-height: 48px; font-size: 16px; }
  .modal label > small, .project-modal label > small { font-size: 12px; line-height: 1.4; }
  .settings-note p, .settings-connection { font-size: 13px; }
  .settings-account-card strong { font-size: 14px; }
  .settings-account-card small { font-size: 12px; }
  .input-action-row { grid-template-columns: 1fr; }
  .project-modal { overflow-y: auto; }
  .project-modal-header { position: sticky; top: 0; z-index: 2; }
  .project-modal label > input { height: 48px; }
  .project-modal #project-description { height: 76px; }
  .project-modal #project-instructions { height: 118px; }
  .project-modal-actions .button { min-height: 46px; font-size: 13px; }
  .password-fields input { min-height: 48px; font-size: 16px; }
  .inline-check { min-height: 40px; font-size: 13px !important; }
  .inline-check input { width: 20px; height: 20px; }

  .image-editor-hint { font-size: 12px; }
  .image-edit-tools label, .image-edit-prompt { font-size: 13px; }
  .image-edit-tools .button, .image-edit-actions .button { min-height: 44px; font-size: 13px; }
  .image-edit-prompt textarea { min-height: 88px; font-size: 16px; }

  .codex-page-header { min-height: 50px; grid-template-columns: 44px minmax(82px, auto) minmax(0, 1fr) 44px; }
  .codex-page-header .codex-page-back, .codex-refresh-compact { width: 44px; min-height: 44px; }
  .codex-page-title strong { font-size: 16px; }
  .codex-status { min-height: 40px; font-size: 11px; }
  .codex-workspace-header { min-height: 38px; }
  .codex-workspace-header strong { font-size: 15px; }
  .codex-workspace-header span { font-size: 11px; }
  .codex-no-project span, .codex-thread-empty span { font-size: 11px; }
  .codex-no-project p, .codex-thread-empty p { font-size: 14px; }
  .codex-followup-form textarea { min-height: 50px; font-size: 16px; }
  .codex-run-controls { grid-template-columns: 44px minmax(0, 1.15fr) minmax(106px, .85fr); }
  .codex-run-controls .button { min-height: 46px; font-size: 14px; }
  .codex-thread-header { min-height: auto; padding: 8px; grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "tree title" "actions actions"; }
  .codex-mobile-tree-button { grid-area: tree; min-height: 44px; padding: 0 8px; font-size: 0; }
  .codex-mobile-tree-button::before { content: "←"; font-size: 18px; }
  .codex-thread-header > div:nth-child(2) { grid-area: title; }
  .codex-thread-header > div:last-child { grid-area: actions; display: grid; grid-template-columns: 1fr 1fr; }
  .codex-thread-header span { font-size: 10px; }
  .codex-thread-header h2 { font-size: 17px; }
  .codex-thread-header .button { min-height: 44px; font-size: 12px; }
  .codex-load-older { min-height: 44px; font-size: 12px; }
  .codex-turn > header { font-size: 10px; }
  .codex-item { font-size: 14px; }
  .codex-item.commandExecution, .codex-item.fileChange, .codex-item.mcpToolCall, .codex-item.collabAgentToolCall { font-size: 12px; }
  .codex-item > strong, .codex-item > summary strong { font-size: 10px; }
  .codex-item > summary span { font-size: 10px; }
  .codex-attachment { width: 100%; max-width: 100%; min-height: 48px; }
  .codex-attachment b { font-size: 12px; }
  .codex-attachment small { font-size: 11px; }
  .codex-work-summary { padding: 11px; }
  .codex-work-summary > header strong { font-size: 14px; }
  .codex-work-summary > header span { font-size: 11px; }
  .codex-work-summary-body h3 { font-size: 11px; }

  .toast-region { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); align-items: stretch; }
  .toast { max-width: none; font-size: 14px; line-height: 1.4; }
  .server-update-notice { top: calc(7px + env(safe-area-inset-top)); left: 7px; right: 7px; width: auto; padding: 11px 12px; grid-template-columns: 1fr; gap: 3px; transform: none; }
  .server-update-notice strong { font-size: 14px; white-space: normal; }
  .server-update-notice span { font-size: 12px; }
}

/* Phone layout: keep touch targets, but give the conversation most of the viewport. */
@media (max-width: 520px) {
  .app-shell, .projects-panel, .workspace { height: 100dvh; }

  .button { min-height: 44px; padding-inline: 13px; font-size: 13px; }
  .projects-panel { padding: calc(5px + env(safe-area-inset-top)) 8px calc(5px + env(safe-area-inset-bottom)); }
  .brand { min-height: 42px; padding: 0 6px 4px; gap: 7px; }
  .brand-mark { width: 30px; height: 30px; font-size: 24px; }
  .brand strong { font-size: 18px; }
  .brand small { display: none; }
  .panel-section-title { min-height: 40px; padding: 3px 6px; }
  .panel-section-title span { font-size: 11px; }
  .archive-projects-toggle { min-height: 34px; padding-inline: 8px; font-size: 11px; }
  .panel-section-title .icon-button { width: 38px; height: 38px; min-width: 38px; min-height: 38px; }
  .project-nav-item { min-height: 50px; padding: 6px 7px; }
  .project-nav-item i { width: 34px; height: 34px; flex-basis: 34px; }
  .project-nav-item strong { font-size: 14px; }
  .project-nav-item small { font-size: 11px; }

  /* Once a project is selected, the phone panel is a chat picker. Avoid
     repeating the full brand, projects heading and selected project card. */
  .app-shell.project-open:not(.codex-open) .brand {
    min-height: 40px;
    padding: 0 7px;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .app-shell.project-open:not(.codex-open) .brand::before { content: "←"; color: var(--accent); font-size: 18px; }
  .app-shell.project-open:not(.codex-open) .brand::after { content: "Все проекты"; color: white; font-size: 14px; font-weight: 750; }
  .app-shell.project-open:not(.codex-open) .brand > * { display: none; }
  .app-shell.project-open:not(.codex-open) .panel-section-title,
  .app-shell.project-open:not(.codex-open) .projects-list { display: none; }
  .app-shell.project-open:not(.codex-open) .sidebar-chats { margin-top: 3px; padding-top: 3px; }
  .app-shell.project-open:not(.codex-open) .chats-header { min-height: 38px; padding: 0 7px 2px; }
  .app-shell.project-open:not(.codex-open) .chats-heading h2 { font-size: 15px; }
  .app-shell.project-open:not(.codex-open) .sidebar-tabs { margin: 0 2px 3px; padding: 2px; gap: 2px; }
  .app-shell.project-open:not(.codex-open) .sidebar-tabs button { min-height: 36px; padding-inline: 8px; font-size: 12px; }
  .app-shell.project-open:not(.codex-open) .sidebar-new-chat b { font-size: 16px; }
  .app-shell.project-open:not(.codex-open) .chats-header .icon-button { width: 38px; height: 38px; min-width: 38px; min-height: 38px; }
  .app-shell.project-open:not(.codex-open) .chats-label { padding: 2px 8px 4px; font-size: 9px; }
  .app-shell.project-open:not(.codex-open) .chat-list-item,
  .app-shell.project-open:not(.codex-open) .chat-open { min-height: 50px; }
  .app-shell.project-open:not(.codex-open) .chat-open { padding: 7px 9px; }
  .app-shell.project-open:not(.codex-open) .chat-open span { font-size: 13px; }
  .app-shell.project-open:not(.codex-open) .chat-open small { font-size: 10px; }
  .app-shell.project-open:not(.codex-open) .chat-delete { width: 38px; height: 38px; }
  .app-shell.project-open:not(.codex-open) .files-header { min-height: 40px; }
  .app-shell.project-open:not(.codex-open) .files-header .icon-button { width: 38px; height: 38px; min-width: 38px; min-height: 38px; }
  .app-shell.project-open:not(.codex-open) .project-folder-row { min-height: 31px; padding-block: 7px 4px; }
  .app-shell.project-open:not(.codex-open) .project-file-row { min-height: 44px; grid-template-columns: minmax(0, 1fr) 38px 38px; }
  .app-shell.project-open:not(.codex-open) .project-file-open { min-height: 44px; padding-block: 6px; }
  .app-shell.project-open:not(.codex-open) .project-file-delete,
  .app-shell.project-open:not(.codex-open) .project-file-download { width: 38px; height: 38px; }

  .sidebar-footer { min-height: 44px; padding: 2px 0 0; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; }
  .connection-pill { min-height: 40px; padding: 0; justify-content: center; }
  .connection-pill span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sidebar-footer-row { min-height: 40px; padding: 0; grid-template-columns: minmax(0, 1fr) 38px 38px; border: 0; background: transparent; box-shadow: none; }
  .sidebar-user { min-height: 38px; padding: 1px 4px; }
  .sidebar-user > i { width: 28px; height: 28px; flex-basis: 28px; font-size: 11px; }
  .sidebar-user strong { font-size: 12px; }
  .sidebar-user small { display: none; }
  .sidebar-footer-action { width: 38px; height: 38px; min-width: 38px; min-height: 38px; }

  .admin-nav-buttons { margin: 5px 2px; grid-template-columns: 1fr 1fr; gap: 4px; }
  .admin-nav-buttons .codex-nav-button { min-height: 46px; padding: 5px 7px; grid-template-columns: 28px minmax(0, 1fr); gap: 6px; }
  .admin-nav-buttons .codex-nav-button > i { width: 28px; height: 28px; font-size: 16px; }
  .admin-nav-buttons .codex-nav-button strong { font-size: 11px; }
  .admin-nav-buttons .codex-nav-button small, .admin-nav-buttons .codex-nav-button > b { display: none; }

  .codex-sidebar-tree > header { min-height: 52px; }
  .codex-sidebar-tree > header strong { font-size: 16px; }
  #codex-sidebar-summary { font-size: 11px; }
  .codex-sidebar-filters label { min-height: 32px; }
  .codex-tree-project-button { min-height: 50px; padding-block: 6px; }
  .codex-tree-project-button strong { font-size: 14px; }
  .codex-tree-project-button small { font-size: 10px; }
  .codex-tree-project-new, .codex-tree-project-archive, .codex-tree-archive { width: 38px; min-width: 38px; flex-basis: 38px; }
  .codex-tree-thread { min-height: 46px; padding-block: 6px; }
  .codex-tree-thread strong { font-size: 13px; }

  .dashboard-view { padding: calc(18px + env(safe-area-inset-top)) 14px calc(22px + env(safe-area-inset-bottom)); }
  .dashboard-header h1 { font-size: clamp(31px, 9vw, 37px); }
  .dashboard-section { margin-top: 32px; }
  .section-heading h2 { font-size: 23px; }

  .automations-view { padding: calc(6px + env(safe-area-inset-top)) 7px calc(10px + env(safe-area-inset-bottom)); }
  .automations-header { grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: 36px 36px; grid-template-areas: "back heading" "actions actions"; align-items: center; gap: 5px 7px; padding: 0 2px 7px; }
  .automations-back { grid-area: back; width: 36px; min-width: 36px; min-height: 36px; height: 36px; border-radius: 7px; font-size: 16px; }
  .automations-heading { grid-area: heading; min-width: 0; }
  .automations-header .eyebrow, .automations-header p { display: none; }
  .automations-header h1 { margin: 0; overflow: hidden; font: 750 22px/1.1 "Segoe UI Variable", "Segoe UI", sans-serif; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
  .automations-header-actions { grid-area: actions; grid-column: 1 / -1; grid-row: 2; grid-template-columns: minmax(0, 1fr) 36px auto; align-items: center; gap: 5px; }
  .automations-header-actions > #automations-count { grid-column: auto; margin: 0 auto 0 0; font-size: 10px; }
  .automations-header-actions .button { min-height: 36px; height: 36px; padding-inline: 9px; font-size: 11px; white-space: nowrap; }
  #automations-refresh { width: 36px; min-width: 36px; padding: 0; overflow: hidden; font-size: 0; }
  #automations-refresh::before { content: "↻"; font-size: 17px; line-height: 1; }
  #automation-new { min-width: 104px; }
  .automations-note { display: none; }
  .automations-list { margin-top: 8px; gap: 8px; }
  .automation-card { padding: 10px; border-radius: 8px; }.automation-card-main { margin-top: 8px; }.automation-card-main h2 { font-size: 18px; }.automation-card-main p { margin-top: 5px; line-height: 1.4; -webkit-line-clamp: 2; }
  .automation-card dl { margin-top: 9px; padding-top: 8px; gap: 5px; }.automation-card dl > div { grid-template-columns: 54px minmax(0, 1fr); gap: 6px; }.automation-card dd { font-size: 11px; }.automation-card > footer { padding-top: 9px; grid-template-columns: 1fr 1fr 38px; }.automation-card > footer .button, .automation-edit-icon { min-height: 36px; height: 36px; }
  .automation-modal > form:first-child { padding: 15px 12px; }.automation-modal h2 { font-size: 23px; }
  .automation-model-fields, .automation-schedule-row { grid-template-columns: 1fr; }.automation-schedule-row > label:first-child { grid-column: auto; }
  .automation-weekdays { gap: 4px; }.automation-weekdays label { min-height: 32px; padding-inline: 7px; }
  .automation-modal-actions { grid-template-columns: 1fr 1fr; }.automation-modal-actions #automation-delete { grid-column: 1 / -1; }.automation-modal-actions > span { display: none; }

  .chat-header { min-height: 62px; padding: calc(7px + env(safe-area-inset-top)) 9px 7px; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
  .chat-header .mobile-back { grid-column: auto; width: 44px; min-width: 44px; margin: 0; justify-content: center; overflow: hidden; color: transparent; font-size: 0; }
  .chat-header .mobile-back::before { content: "←"; color: #4f5b53; font-size: 18px; }
  .chat-title-wrap { min-width: 0; }
  #chat-title { max-width: 100%; font-size: 17px; }
  .chat-ai-status { min-height: 28px; margin-left: 0; padding: 3px 7px; gap: 5px; font-size: 10px; }.chat-ai-status i { width: 6px; height: 6px; }
  .message { grid-template-columns: 30px minmax(0, 1fr); gap: 7px; padding: 10px 7px; }
  .message-avatar { width: 30px; height: 30px; }
  .markdown-body { font-size: 14px; line-height: 1.55; }
  .composer-wrap { padding: 5px 5px calc(5px + env(safe-area-inset-bottom)); }
  .composer textarea { min-height: 45px; padding: 10px 10px 4px; }
  .composer-bottom { min-height: 47px; padding: 3px 4px 5px; }
  .composer-attach-button { height: 44px; }
  .composer-model-line, .reasoning-line { height: 44px; grid-template-rows: 11px 20px; }
  .composer-model-line select, .reasoning-line select { height: 20px; font-size: 16px; }
  #send-button { height: 44px; }

  .modal { width: calc(100vw - 8px); max-height: calc(100dvh - 8px); }
  .modal > form:first-child { padding: 17px 14px; }
  .modal h2 { font-size: 24px; }
  .modal label, .modal legend, .project-modal label, .project-modal legend { font-size: 13px; }

  .codex-view.thread-selected { padding: 0; background: #fbfaf6; }
  .codex-view.thread-selected .codex-project-workspace { height: 100%; margin: 0; }
  .codex-view.thread-selected .codex-task-layout { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .codex-view.thread-selected .codex-thread-detail, .codex-view.thread-selected #codex-thread-content { height: 100%; }

  .codex-thread-header { min-height: 0; padding: calc(4px + env(safe-area-inset-top)) 6px 5px; grid-template-columns: 38px minmax(0, 1fr) auto; grid-template-areas: "tree title actions"; gap: 6px; align-items: center; overflow: visible; background: rgba(251,250,246,.98); }
  .codex-mobile-tree-button { grid-area: tree; width: 38px; min-width: 38px; min-height: 38px; height: 38px; padding: 0; border-radius: 7px; }
  .codex-thread-header > div:nth-child(2) { min-width: 0; overflow: hidden; }
  .codex-thread-header span { display: block; overflow: hidden; color: #747d76; font-size: 8px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
  .codex-thread-header .codex-thread-status { min-height: 20px; padding: 2px 6px; display: inline-flex; font-size: 8.5px; line-height: 1.1; }
  .codex-thread-status::before { width: 6px; height: 6px; flex-basis: 6px; }
  .codex-thread-header h2 { max-width: 100%; margin: 2px 0 0; display: block; overflow: hidden; font: 600 14px/1.15 "Segoe UI Variable", "Segoe UI", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
  .codex-thread-header > div:last-child { grid-area: actions; display: flex; gap: 4px; }
  .codex-thread-header .button { width: auto; min-width: 46px; min-height: 38px; height: 38px; padding: 0 7px; font-size: 0; }
  .codex-thread-header .button::after { content: attr(data-mobile-label); font-size: 11px; }
  .codex-thread-header #codex-interrupt-button:disabled { display: none; }
  .codex-load-older { min-height: 36px; margin-top: 5px; padding-inline: 11px; font-size: 0; }
  .codex-load-older::after { content: attr(data-mobile-label); font-size: 11px; }

  .codex-activity { padding: 8px 7px 12px; scrollbar-gutter: auto; }
  .codex-turn { margin-bottom: 12px; padding-bottom: 10px; }
  .codex-turn > header { font-size: 9px; }
  .codex-item { margin-top: 6px; padding: 9px 10px; border-radius: 7px; font-size: 13px; line-height: 1.5; }
  .codex-item.userMessage { width: 94%; }
  .codex-item .markdown-body { font-size: 13.5px; line-height: 1.48; }
  .codex-item .markdown-body p { margin-bottom: 8px; }
  .codex-item .markdown-body > br { display: none; }
  .codex-item.commandExecution, .codex-item.fileChange, .codex-item.mcpToolCall, .codex-item.collabAgentToolCall { font-size: 11px; }
  .codex-item > summary { min-height: 42px; }
  .codex-item > strong, .codex-item > summary strong { font-size: 9px; }
  .codex-technical-group { margin-top: 6px; }
  .codex-technical-group > summary { min-height: 38px; padding: 6px 9px; gap: 7px; }
  .codex-technical-group > summary strong { font-size: 9px; }
  .codex-technical-group > summary b { min-width: 20px; padding-inline: 5px; font-size: 9px; }
  .codex-technical-group > summary span { font-size: 8px; }
  .codex-technical-items { padding: 0 5px 5px; }
  .codex-file-change-overview { min-height: 34px; padding: 4px 6px; }
  .codex-file-change > summary { min-height: 40px; padding: 4px 6px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 5px; }
  .codex-file-change > summary em { display: none; }
  .codex-diff-line { grid-template-columns: 32px 32px minmax(360px, 1fr); }
  .codex-diff-line > span { padding-inline: 4px; }
  .codex-diff-line code { padding-inline: 6px; }
  .codex-item.agentMessage > strong { min-height: 34px; padding-right: 40px; }
  .codex-copy-response { top: 5px; width: 34px; height: 34px; min-width: 34px; min-height: 34px; padding: 0; opacity: 1; }
  .codex-attachment { min-height: 44px; }
  .codex-work-summary { margin-top: 10px; padding: 9px; border-radius: 8px; }
  .codex-work-summary .codex-attachment.image.generated img { height: 168px; }

  .codex-followup-form { margin: 0; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(96px, .76fr) 52px; grid-auto-rows: auto; gap: 6px; border-width: 1px 0 0; border-radius: 0; background: rgba(255,255,255,.98); box-shadow: 0 -7px 22px rgba(23,33,29,.08); }
  .codex-followup-form textarea { grid-column: 1 / 4; grid-row: 1; height: 52px; min-height: 52px; max-height: 112px; padding: 9px 10px; border: 1px solid #d2d5cd; border-radius: 9px; background: #fbfbf8; font-size: 16px; line-height: 1.35; }
  .codex-run-controls { display: contents; }
  .codex-run-controls .composer-attach-button { grid-column: 1; grid-row: 2; width: 44px; min-width: 44px; height: 46px; }
  .codex-run-controls .codex-model-control { grid-column: 2; grid-row: 2; }
  .codex-run-controls .codex-effort-control { grid-column: 3 / 5; grid-row: 2; }
  .codex-run-controls .composer-model-line, .codex-run-controls .composer-model-line + .composer-model-line { width: 100%; min-width: 0; height: 46px; padding: 4px 8px 3px; grid-template-rows: 11px 22px; }
  .codex-run-controls .composer-model-line select, .codex-run-controls .composer-model-line + .composer-model-line select { height: 22px; font-size: 16px; }
  .codex-pending-attachments { grid-column: 1 / -1; grid-row: 3; padding: 0; }
  .codex-run-controls #codex-composer-submit { grid-column: 4; grid-row: 1; width: 52px; min-width: 52px; min-height: 52px; margin: 0; padding: 0; border-radius: 9px; font-size: 0; }
  .codex-run-controls #codex-composer-submit::after { content: "↑"; font-size: 24px; line-height: 1; }
  .codex-run-controls #codex-composer-submit.sending::after { width: 18px; height: 18px; content: ""; border: 2px solid rgba(255,255,255,.38); border-top-color: white; border-radius: 50%; animation: codexSendSpin .75s linear infinite; }
  .codex-run-controls #codex-composer-submit.accepted::after { content: "✓"; font-size: 21px; animation: none; }
}

.login-register-button { width: max-content; padding: 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: #516449; font: 700 13px/1.5 inherit; cursor: pointer; }
.login-account-actions { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.smart-captcha-slot { position: relative; width: 100%; min-height: 102px; display: flex; align-items: center; justify-content: flex-start; padding: 8px; overflow: hidden; border: 1px solid #d7dbd2; border-radius: 12px; background: linear-gradient(135deg,#f8faf5,#eef3e8); transition: border-color .2s, background .2s, box-shadow .2s; }
.smart-captcha-slot:focus-within { border-color: #8da66b; box-shadow: 0 0 0 3px rgba(116,148,68,.12); }
.smart-captcha-slot > span { display: flex; align-items: center; gap: 10px; color: #66716a; font-size: 12px; line-height: 1.45; }
.smart-captcha-slot > span::before { width: 18px; height: 18px; flex: 0 0 auto; content: ""; border: 2px solid #c9d0c4; border-top-color: #698748; border-radius: 50%; animation: codexSendSpin .8s linear infinite; }
.smart-captcha-slot iframe { display: block; max-width: 100%; border: 0; }
.login-form .smart-captcha-slot { max-width: 570px; margin-top: 16px; }
.commerce-form .smart-captcha-slot { margin-top: 2px; }
.sidebar-billing-button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; padding: 11px 12px; border: 1px solid rgba(201,242,124,.26); border-radius: 10px; background: rgba(201,242,124,.08); color: #f4f6ef; text-align: left; cursor: pointer; }
.sidebar-billing-button span { min-width: 0; display: grid; gap: 2px; }
.sidebar-billing-button strong { font-size: 12px; }
.sidebar-billing-button small { overflow: hidden; color: #a9b5ac; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-billing-button b { color: #c9f27c; font-size: 18px; }
.sidebar-api-button { width: 100%; min-height: 54px; margin-bottom: 8px; padding: 9px 11px; display: grid; grid-template-columns: 35px minmax(0,1fr) auto; align-items: center; gap: 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.055); color: #f4f6ef; text-decoration: none; transition: border-color .18s,background .18s,transform .18s; }
.sidebar-api-button:hover { border-color: rgba(201,242,124,.3); background: rgba(201,242,124,.075); transform: translateY(-1px); }
.sidebar-api-button > i { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 8px; background: rgba(201,242,124,.12); color: #c9f27c; font: normal 750 10px Consolas,monospace; }
.sidebar-api-button span { min-width: 0; display: grid; gap: 2px; }
.sidebar-api-button strong { font-size: 11px; }
.sidebar-api-button small { overflow: hidden; color: #9faca4; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-api-button > b { color: #c9f27c; font-size: 17px; }
.sidebar-usage { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; margin: -1px 3px 9px; }
.sidebar-usage > span { height: 4px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.12); }
.sidebar-usage i { display: block; width: 0; height: 100%; border-radius: inherit; background: #c9f27c; }
.sidebar-usage small { color: #9eaaa2; font-size: 9px; }

.commerce-modal { width: min(980px, calc(100vw - 32px)); max-height: min(900px, calc(100vh - 32px)); padding: 0; border: 0; border-radius: 16px; background: #f7f6f1; color: #17211d; box-shadow: 0 28px 90px rgba(10,20,16,.34); }
.commerce-modal::backdrop { background: rgba(12,19,16,.68); backdrop-filter: blur(3px); }
.commerce-modal > section { padding: 26px; overflow: auto; max-height: inherit; }
.commerce-modal > section > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.commerce-modal header h2 { margin: 4px 0 5px; font: 400 clamp(25px, 3vw, 36px)/1.08 Georgia,serif; }
.commerce-modal header p { margin: 0; color: #68726d; font-size: 13px; }
.registration-modal { width: min(520px, calc(100vw - 32px)); }
.commerce-form { display: grid; gap: 14px; }
.commerce-form label, .commerce-settings-grid label, .commerce-section-head label { display: grid; gap: 6px; color: #46524c; font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.commerce-form input, .commerce-settings-grid input, .commerce-settings-grid select, .commerce-section-head select, .commerce-inline-form input { min-height: 43px; padding: 9px 11px; border: 1px solid #cfd3cb; border-radius: 8px; background: #fff; color: #17211d; font: 500 14px/1.3 inherit; }
.verification-copy { display: grid; gap: 4px; padding: 14px; border-radius: 10px; background: #eaf3da; }
.verification-copy span { color: #59665e; font-size: 13px; }
.verification-code { text-align: center; font: 700 28px/1 Consolas,monospace !important; letter-spacing: .28em; }
.commerce-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.commerce-actions .button,.commerce-row-actions .button { display: inline-flex; align-items: center; justify-content: center; line-height: 1.1; }
.usage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.usage-card { padding: 15px; border: 1px solid #d9dcd4; border-radius: 12px; background: #fff; }
.usage-card header { display: flex; justify-content: space-between; margin-bottom: 13px; font-size: 11px; font-weight: 800; }
.usage-card header b { color: #647069; }
.usage-card > span { display: block; height: 7px; overflow: hidden; border-radius: 999px; background: #e7e9e3; }
.usage-card > span i { display: block; height: 100%; border-radius: inherit; background: #17211d; }
.usage-card small { display: block; margin-top: 8px; color: #727b76; }
.commerce-section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 24px 0 12px; }
.commerce-section-head span { color: #76806f; font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.commerce-section-head h3 { margin: 3px 0 0; font: 400 21px Georgia,serif; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan-card { display: grid; gap: 10px; align-content: start; padding: 17px; border: 1px solid #d6dad1; border-radius: 12px; background: #fff; }
.plan-card.current { border-color: #789548; box-shadow: inset 0 0 0 1px #789548; }
.plan-card header { display: flex; justify-content: space-between; }
.plan-card header strong { font: 400 22px Georgia,serif; }
.plan-card header b { color: #718c44; font-size: 12px; }
.plan-card p { min-height: 38px; margin: 0; color: #65706a; font-size: 12px; line-height: 1.5; }
.plan-card .plan-price { font-size: 18px; font-weight: 800; }
.plan-card small { color: #7c8580; }
.billing-modal { width: min(1080px, calc(100vw - 32px)); background: #f4f6f0; }
.billing-modal > section { padding-top: 0; }
.billing-header { position: relative; min-height: 176px; align-items: center !important; margin: 0 -26px 22px !important; padding: 30px 130px 30px 32px; overflow: hidden; border-radius: 16px 16px 0 0; background: radial-gradient(circle at 78% 15%, rgba(201,242,124,.2), transparent 30%), linear-gradient(135deg,#111c17 0%,#1a2a22 58%,#23382c 100%); color: #fff; }
.billing-header::before { position: absolute; inset: auto -8% -76% 30%; height: 190px; content: ""; border: 1px solid rgba(201,242,124,.2); border-radius: 50%; transform: rotate(-8deg); }
.billing-header > div:first-child { position: relative; z-index: 2; }
.billing-header .eyebrow { color: #c9f27c; }
.billing-header h2 { color: #fff; font-size: clamp(30px,4vw,46px) !important; }
.billing-header p { max-width: 590px; color: #b8c4bd !important; line-height: 1.55; }
.billing-header .modal-close { position: absolute; z-index: 4; top: 18px; right: 20px; color: #dfe8e2; }
.billing-header-mark { position: absolute; z-index: 1; right: 54px; bottom: -20px; width: 150px; height: 150px; display: grid; place-items: center; }
.billing-header-mark i { position: absolute; width: 104px; height: 104px; border: 1px solid rgba(201,242,124,.3); border-radius: 50%; box-shadow: 0 0 70px rgba(201,242,124,.14); animation: billingOrbit 7s linear infinite; }
.billing-header-mark i::before { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; content: ""; border-radius: 50%; background: #c9f27c; box-shadow: 0 0 16px #c9f27c; }
.billing-header-mark img { position: relative; width: 118px; height: 118px; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0,0,0,.32)); animation: billingFloat 4.2s ease-in-out infinite; }
.billing-subscription-card { position: relative; min-height: 124px; display: flex; align-items: center; justify-content: space-between; gap: 26px; margin-bottom: 18px; padding: 22px 24px; overflow: hidden; border: 1px solid #d5dbd2; border-radius: 16px; background: #fff; box-shadow: 0 10px 32px rgba(23,33,29,.06); animation: billingCardIn .48s cubic-bezier(.2,.8,.2,1) both; }
.billing-subscription-card::after { position: absolute; right: -70px; bottom: -110px; width: 250px; height: 250px; content: ""; border-radius: 50%; background: radial-gradient(circle,rgba(201,242,124,.28),rgba(201,242,124,0) 68%); pointer-events: none; }
.billing-subscription-card > div:first-child { position: relative; z-index: 1; }
.billing-subscription-card > div:first-child > span { color: #718060; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.billing-subscription-card h3 { margin: 6px 0 5px; font: 400 28px/1.05 Georgia,serif; }
.billing-subscription-card p { margin: 0; color: #66716b; font-size: 12px; }
.billing-subscription-card.active { border-color: rgba(116,148,68,.48); background: linear-gradient(120deg,#fff 0%,#f8fbed 100%); }
.billing-subscription-card.inactive { border-style: dashed; background: linear-gradient(120deg,#fff,#f2f4ee); }
.billing-subscription-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2,minmax(120px,1fr)); gap: 10px; }
.billing-subscription-stats > span { min-width: 128px; display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 1px 6px; padding: 13px 15px; border: 1px solid rgba(23,33,29,.1); border-radius: 12px; background: rgba(255,255,255,.78); }
.billing-subscription-stats small { grid-column: 1/-1; color: #718078; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.billing-subscription-stats strong { font: 400 25px/1 Georgia,serif; }
.billing-subscription-stats b { color: #69756e; font-size: 10px; }
.billing-empty-pulse { position: relative; z-index: 1; width: 100px; height: 76px; display: grid; place-content: center; text-align: center; }
.billing-empty-pulse i { position: absolute; inset: 4px 16px; border: 1px solid #9db77a; border-radius: 50%; animation: billingPulse 2.2s ease-out infinite; }
.billing-empty-pulse b { font: 400 24px Georgia,serif; }
.billing-empty-pulse small { color: #718078; font-size: 9px; }
.billing-plans-head { align-items: center; }
.billing-period-picker { min-width: 184px; grid-template-columns: 1fr auto; align-items: center; gap: 3px 10px !important; padding: 10px 12px; border: 1px solid #ced5ca; border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(23,33,29,.05); }
.billing-period-picker > span { grid-column: 1; color: #56635c; font-size: 9px; letter-spacing: .08em; }
.billing-period-picker select { grid-column: 2; grid-row: 1/3; min-height: 39px; border-color: #bcc8b7; font-weight: 800; cursor: pointer; }
.billing-period-picker small { grid-column: 1; color: #849087; font-size: 9px; font-weight: 500; letter-spacing: 0; }
.billing-modal .plan-grid { grid-template-columns: repeat(auto-fit,minmax(225px,1fr)); gap: 14px; }
.billing-modal .plan-card { position: relative; min-height: 390px; gap: 12px; padding: 21px; overflow: hidden; border-radius: 16px; box-shadow: 0 10px 28px rgba(23,33,29,.055); transition: transform .25s ease,border-color .25s ease,box-shadow .25s ease; animation: billingCardIn .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--plan-index,0) * 70ms); }
.billing-modal .plan-card::before { position: absolute; inset: 0 0 auto; height: 3px; content: ""; background: linear-gradient(90deg,transparent,#c9f27c,transparent); opacity: 0; transition: opacity .25s ease; }
.billing-modal .plan-card:hover { z-index: 2; transform: translateY(-5px); border-color: #aebba7; box-shadow: 0 18px 40px rgba(23,33,29,.12); }
.billing-modal .plan-card:hover::before,.billing-modal .plan-card.current::before { opacity: 1; }
.billing-modal .plan-card.current { border-color: #789548; background: linear-gradient(155deg,#fff 0%,#f4fae8 100%); box-shadow: inset 0 0 0 1px #789548,0 15px 38px rgba(92,121,54,.12); }
.current-plan-tag { position: absolute; top: 0; right: 0; padding: 6px 10px; border-radius: 0 15px 0 10px; background: #17211d; color: #c9f27c; font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.billing-modal .plan-card header { align-items: center; padding-right: 4px; }
.billing-modal .plan-card header strong { font-size: 25px; }
.billing-modal .plan-card header b { padding: 5px 8px; border-radius: 999px; background: #edf4df; color: #587032; }
.billing-modal .plan-card p { min-height: 42px; }
.billing-modal .plan-price { display: grid; gap: 3px; padding-top: 4px; }
.billing-modal .plan-price strong { font-size: 22px; }
.billing-modal .plan-price small { font-size: 10px; font-weight: 500; }
.plan-volume { display: flex; align-items: baseline; gap: 7px; padding: 10px 11px; border-radius: 10px; background: #f0f3eb; }
.plan-volume span { color: #3f5725; font-size: 18px; font-weight: 900; }
.plan-volume small { font-size: 9px; }
.plan-switch-estimate { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 9px 10px; border: 1px solid #dbe2d3; border-radius: 10px; background: #fbfcf8; }
.plan-switch-estimate span { color: #707c75; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.plan-switch-estimate strong { font-size: 12px; }
.plan-switch-estimate small { grid-column: 1/-1; font-size: 9px; }
.plan-actions { display: grid; gap: 7px; margin-top: auto; }
.plan-actions .button { width: 100%; }
.plan-switch-button { border-color: #789548; color: #526d2b; }
.billing-profile-notice { margin: 17px 0 13px; padding: 13px 14px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; border: 1px solid #d6dad1; border-radius: 11px; background: #fff; }
.billing-profile-notice > i { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: #ecefe8; color: #59645e; font: normal 900 14px/1 sans-serif; }
.billing-profile-notice.ready { border-color: #c8dca8; background: #f4f9eb; }
.billing-profile-notice.ready > i { background: #c9f27c; color: #27331f; }
.billing-profile-notice.required { border-color: #ead29a; background: #fffaf0; }
.billing-profile-notice.required > i { background: #f2ca6a; color: #5c4719; }
.billing-profile-notice span, .billing-profile-notice strong, .billing-profile-notice small { min-width: 0; display: block; }
.billing-profile-notice strong { color: #2c3832; font-size: 12px; }
.billing-profile-notice small { margin-top: 4px; color: #77817b; font-size: 10px; line-height: 1.35; }
.plan-switch-modal { width: min(590px,calc(100vw - 28px)); }
.plan-switch-modal > section { position: relative; overflow: hidden; }
.plan-switch-modal > section::before { position: absolute; top: -140px; right: -130px; width: 300px; height: 300px; content: ""; border-radius: 50%; background: radial-gradient(circle,rgba(201,242,124,.23),transparent 67%); }
.plan-switch-visual { position: relative; width: 86px; height: 86px; display: grid; place-items: center; margin: -4px auto 14px; }
.plan-switch-visual img { width: 78px; height: 78px; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(30,45,37,.18)); animation: billingFloat 4s ease-in-out infinite; }
.plan-switch-visual i { position: absolute; inset: 2px; border: 1px solid #afc991; border-radius: 50%; animation: billingPulse 2.4s ease-out infinite; }
.plan-switch-route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 12px; margin-bottom: 14px; }
.plan-switch-route > div { display: grid; gap: 4px; padding: 15px; border: 1px solid #d7ddd3; border-radius: 12px; background: #fff; }
.plan-switch-route > div:last-child { border-color: #9dbb76; background: #f5faea; }
.plan-switch-route small { color: #758178; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.plan-switch-route strong { font: 400 19px Georgia,serif; }
.plan-switch-route span { color: #68746d; font-size: 10px; line-height: 1.4; }
.plan-switch-route > b { align-self: center; color: #789548; font-size: 23px; }
.plan-switch-warning { margin: 0 0 18px; padding: 12px 13px; border-left: 3px solid #8cab62; border-radius: 0 9px 9px 0; background: #eef4e5; color: #5c685f; font-size: 11px; line-height: 1.55; }
.commerce-modal[open] > section { animation: billingModalIn .32s cubic-bezier(.2,.8,.2,1) both; }
.usage-card { animation: billingCardIn .4s ease both; }
.usage-card > span i { transform-origin: left; animation: billingMeter .75s cubic-bezier(.2,.8,.2,1) both; }
@keyframes billingModalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes billingCardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes billingFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(1deg); } }
@keyframes billingOrbit { to { transform: rotate(360deg); } }
@keyframes billingPulse { 0% { opacity: .7; transform: scale(.82); } 75%,100% { opacity: 0; transform: scale(1.18); } }
@keyframes billingMeter { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.commerce-table { display: grid; gap: 7px; }
.commerce-row { display: grid; grid-template-columns: minmax(0,1.5fr) repeat(3,minmax(90px,.7fr)) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #dde0d8; border-radius: 9px; background: #fff; font-size: 12px; }
.commerce-row > span { min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.commerce-row small { color: #78817c; }
.commerce-row button { min-height: 32px; padding: 5px 9px; }
.commerce-row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.commerce-row-actions .button { min-height: 32px; padding: 6px 9px; text-decoration: none; }
.billing-order-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.billing-order-actions .button { min-height: 34px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; line-height: 1.1; text-decoration: none; }
.billing-order-cancel { color: #87483e; }
.billing-order-settled { color: #7a847e; font-size: 9px; white-space: nowrap; }
.commerce-delete-payment { color: #87483e; }
.status-badge { width: max-content; padding: 3px 7px; border-radius: 999px; background: #eceee8; color: #59645e; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.status-badge.paid, .status-badge.sent, .status-badge.active { background: #e2f1cd; color: #496527; }
.status-badge.failed, .status-badge.cancelled { background: #f8dfdb; color: #984a40; }
.invoice-preview { margin: 18px 0; padding: 24px; border: 1px solid #cfd3cb; border-radius: 12px; background: #fff; }
.invoice-preview header { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid #e1e3de; padding-bottom: 15px; }
.invoice-preview h3 { margin: 0; font: 400 25px Georgia,serif; }
.invoice-lines { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 18px 0; }
.invoice-seller { color: #65706a; font-size: 12px; line-height: 1.6; }
.commerce-admin-view { position: fixed; z-index: 45; inset: 0 0 0 290px; overflow: auto; background: #f7f6f1; color: #17211d; }
.commerce-admin-page { width: min(1560px, 100%); min-height: 100%; margin: 0 auto; padding: 28px 34px 70px; }
.commerce-page-header { position: sticky; z-index: 5; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: -28px -34px 22px; padding: 24px 34px 18px; border-bottom: 1px solid rgba(23,33,29,.12); background: rgba(247,246,241,.96); backdrop-filter: blur(12px); }
.commerce-page-header h2 { margin: 4px 0 5px; font: 400 clamp(28px,3.2vw,44px)/1.05 Georgia,serif; }
.commerce-page-header p { margin: 0; color: #68726d; font-size: 13px; }
.commerce-page-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.commerce-admin-shell { display: grid; grid-template-columns: 224px minmax(0,1fr); gap: 18px; align-items: start; }
.commerce-admin-nav { position: sticky; z-index: 4; top: 118px; display: grid; gap: 6px; padding: 8px; border: 1px solid #d6dad2; border-radius: 12px; background: #fff; box-shadow: 0 8px 30px rgba(25,36,31,.05); }
.commerce-admin-nav button { width: 100%; min-height: 56px; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 7px 9px; border: 0; border-radius: 9px; background: transparent; color: #4f5b55; text-align: left; cursor: pointer; }
.commerce-admin-nav button:hover { background: #f1f3ed; color: #17211d; }
.commerce-admin-nav button.active { background: #17211d; color: #fff; box-shadow: 0 6px 18px rgba(23,33,29,.18); }
.commerce-admin-nav button > i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #edf1e9; color: #516049; font: normal 800 12px/1 inherit; }
.commerce-admin-nav button.active > i { background: #c9f27c; color: #17211d; }
.commerce-admin-nav button > span { min-width: 0; display: grid; gap: 2px; }
.commerce-admin-nav button strong { font-size: 12px; }
.commerce-admin-nav button small { overflow: hidden; color: #849089; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.commerce-admin-nav button.active small { color: #aebbb4; }
.commerce-admin-nav button > b { min-width: 25px; padding: 3px 6px; border-radius: 999px; background: #edf1e9; color: #68736d; font-size: 9px; text-align: center; }
.commerce-admin-nav button.active > b { background: rgba(201,242,124,.16); color: #c9f27c; }
.commerce-admin-content { min-width: 0; }
.commerce-admin-panel { min-height: 520px; }
.commerce-panel-heading { margin-bottom: 16px; padding: 2px 2px 15px; border-bottom: 1px solid #d8dcd4; }
.commerce-panel-heading > span, .commerce-panel-heading > div > span { color: #76806f; font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.commerce-panel-heading h3 { margin: 4px 0 5px; font: 400 28px/1.12 Georgia,serif; }
.commerce-panel-heading p { margin: 0; color: #68726d; font-size: 12px; line-height: 1.5; }
.commerce-panel-heading-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.commerce-card-form { margin-top: 14px; padding: 16px; border: 1px solid #d8dcd4; border-radius: 11px; background: #fff; }
.commerce-payment-section { grid-column: 1/-1; padding: 15px; border: 1px solid #e0e3dc; border-radius: 11px; background: linear-gradient(145deg,#fbfcf8,#f5f7f1); }
.commerce-payment-section > header { margin-bottom: 13px; display: grid; gap: 3px; }
.commerce-payment-section > header span { color: #69804a; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.commerce-payment-section > header strong { color: #202a25; font: 400 20px/1.2 Georgia,serif; }
.commerce-payment-section > header small { color: #727d76; font-size: 10px; line-height: 1.45; }
.commerce-payment-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; align-items: end; }
.commerce-checkline { min-height: 43px; padding: 9px 11px; display: flex !important; grid-template-columns: 18px minmax(0,1fr); align-items: center; border: 1px solid #cfd3cb; border-radius: 8px; background: #fff; }
.commerce-checkline input { width: 16px; min-height: 16px !important; margin: 0; padding: 0; }
.commerce-checkline span { font-size: 10px; line-height: 1.35; }
.commerce-payment-note { grid-column: 1/-1; margin: 0; padding: 11px 13px; border: 1px solid #dbe5cc; border-radius: 8px; background: #f0f6e7; color: #65715f; font-size: 10px; line-height: 1.5; }
.commerce-save-state { display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 7px 11px; border: 1px solid #d5d9d0; border-radius: 9px; background: #fff; color: #66706b; font-size: 11px; font-weight: 800; }
.commerce-save-state i { width: 8px; height: 8px; border-radius: 50%; background: #73914b; }
.commerce-save-state.dirty { border-color: #dac88f; background: #fff9e8; color: #78652d; }
.commerce-save-state.dirty i { background: #d0a932; }
.commerce-save-state.saving i { border: 2px solid #bfc6be; border-top-color: #17211d; background: transparent; animation: codexSendSpin .75s linear infinite; }
.commerce-save-state.error { border-color: #e4b8b2; background: #fff1ef; color: #984a40; }
.commerce-save-state.error i { background: #b9574b; }
.commerce-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; margin-bottom: 18px; }
.summary-card { padding: 13px; border-radius: 10px; background: #17211d; color: #fff; }
.summary-card strong { display: block; margin-bottom: 4px; color: #c9f27c; font-size: 22px; }
.summary-card small { color: #b8c1bb; font-size: 10px; }
.summary-card-warning { background: linear-gradient(135deg,#4d3a1c,#6b5125); }
.summary-card-warning strong { color: #ffe3a3; font-size: 16px; }
.commerce-admin-page details { margin: 11px 0; border: 1px solid #d5d9d0; border-radius: 11px; background: #fff; }
.commerce-admin-page details > summary { padding: 16px 18px; cursor: pointer; font-size: 14px; font-weight: 800; }
.commerce-admin-page details > :not(summary) { margin: 0 18px 18px; }
.commerce-source-panel { margin-bottom: 18px; padding: 18px; border: 1px solid #cfd7c5; border-radius: 13px; background: linear-gradient(135deg,#17211d,#25342e); color: #f7f8f4; }
.commerce-source-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.commerce-source-panel header span { color: #c9f27c; font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.commerce-source-panel h3 { margin: 4px 0; font: 400 24px Georgia,serif; }
.commerce-source-panel p { margin: 0; color: #aebbb4; font-size: 12px; overflow-wrap: anywhere; }
.source-quota-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 9px; margin-top: 16px; }
.source-quota-card { padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: rgba(255,255,255,.055); }
.source-quota-card strong { display: block; color: #c9f27c; font-size: 23px; }
.source-quota-card small { color: #aebbb4; font-size: 10px; }
.source-quota-unavailable { grid-column: 1/-1; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid rgba(255,218,143,.28); border-radius: 10px; background: rgba(255,205,110,.09); }
.source-quota-unavailable > i { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #f0c66d; color: #332510; font: 900 17px/1 Georgia,serif; }
.source-quota-unavailable > span { display: grid; gap: 3px; }
.source-quota-unavailable strong { color: #ffe5ad; font-size: 12px; }
.source-quota-unavailable small { color: #c4c9c5; font-size: 10px; line-height: 1.5; }
.source-plan-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.source-plan-list span { padding: 5px 8px; border-radius: 999px; background: rgba(201,242,124,.11); color: #d9f7a2; font-size: 10px; font-weight: 800; }
.commerce-explanation { padding: 11px 13px; border-radius: 8px; background: #eef4e4; color: #536048; font-size: 12px; line-height: 1.5; }
.limit-preview { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 8px; }
.limit-preview article { padding: 10px 12px; border: 1px solid #dde2d7; border-radius: 8px; background: #fafbf8; }
.limit-preview strong { display: block; font-size: 18px; }
.limit-preview small { color: #758078; font-size: 10px; }
.model-price-report { display: grid; gap: 10px; }
.model-price-row { margin: 0; padding: 13px; border: 1px solid #dce1d8; border-radius: 10px; background: #fbfcf9; }
.model-price-row.unavailable { opacity: .7; background: #f1f2ee; }
.model-price-row.model-dragging { opacity: .42; transform: scale(.995); }
.model-price-row.model-drop-target { border-color: #789548; box-shadow: 0 -4px 0 #c9f27c, 0 8px 24px rgba(72,101,39,.12); }
.model-price-row > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 11px; }
.model-price-row > header > div:first-child { min-width: 0; display: grid; gap: 2px; }
.model-price-row > header strong { font-size: 15px; overflow-wrap: anywhere; }
.model-price-row > header small { color: #747e78; font: 500 11px/1.4 Consolas,monospace; overflow-wrap: anywhere; }
.model-price-row > header > div:last-child { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.model-order-controls { display: inline-flex; align-items: center; gap: 3px; margin-right: 3px; }
.model-order-controls button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 1px solid #d4d9d0; border-radius: 7px; background: #fff; color: #526059; font: 800 13px/1 inherit; cursor: pointer; }
.model-order-controls button:hover { border-color: #9aae84; background: #eef4e4; color: #26332d; }
.model-order-controls .model-drag-handle { cursor: grab; letter-spacing: -3px; }
.model-order-controls .model-drag-handle:active { cursor: grabbing; }
.price-source { width: max-content; padding: 3px 7px; border-radius: 999px; background: #eef0eb; color: #5d6862; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.price-source.official { background: #e2f1cd; color: #496527; }
.price-source.unpriced { background: #f8dfdb; color: #984a40; }
.model-price-fields { display: grid; grid-template-columns: repeat(4,minmax(105px,1fr)); gap: 8px; }
.model-price-fields label { display: grid; gap: 5px; color: #5c6862; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.model-price-fields input, .model-price-fields select { width: 100%; min-width: 0; min-height: 36px; padding: 6px 8px; border: 1px solid #d0d5cc; border-radius: 7px; background: #fff; color: #17211d; font: 600 12px/1.2 inherit; }
.model-price-row > footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px 14px; margin-top: 11px; }
.model-price-row > footer > span { margin-right: auto; color: #6b756f; font-size: 10px; }
.model-price-row > footer a { color: #496527; }
.model-price-row > footer .inline-check { margin: 0; }
.account-limit-report { display: grid; gap: 10px; }
.account-limit-card { padding: 14px; border: 1px solid #dce1d8; border-radius: 10px; background: #fbfcf9; }
.account-limit-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.account-limit-card > header > div:first-child { display: grid; gap: 3px; }
.account-limit-card > header strong { font: 400 21px Georgia,serif; }
.account-limit-card > header span { color: #68736d; font-size: 12px; }
.account-admin-tools { margin-top: 14px; padding-top: 14px; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: end; gap: 12px; border-top: 1px solid #e1e5de; }
.account-admin-tools > .button { min-height: 42px; }
.account-subscription-editor { min-width: 0; display: grid; grid-template-columns: minmax(150px,.8fr) minmax(205px,1fr) auto auto; align-items: end; gap: 8px; }
.account-subscription-editor label { min-width: 0; display: grid; gap: 5px; }
.account-subscription-editor label > span { color: #707b74; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.account-subscription-editor select,.account-subscription-editor input { min-width: 0; width: 100%; height: 42px; padding: 0 10px; border: 1px solid #ccd3c9; border-radius: 7px; background: #fff; color: #26342d; font-size: 11px; outline: 0; }
.account-subscription-editor select:focus,.account-subscription-editor input:focus { border-color: #89a75c; box-shadow: 0 0 0 3px rgba(115,148,71,.12); }
.account-subscription-editor .button { min-height: 42px; padding-inline: 11px; font-size: 10px; white-space: nowrap; }
.status-badge.refunding { background: #e8eef7; color: #45617f; }
.impersonation-banner { position: fixed; z-index: 1000; top: 0; right: 0; left: 0; min-height: 56px; padding: 8px max(16px,calc((100% - 1380px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #17211d; color: #fff; box-shadow: 0 8px 25px rgba(12,21,16,.24); }
.impersonation-banner.hidden { display: none; }
.impersonation-banner span { min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.impersonation-banner b { color: #c9f27c; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.impersonation-banner strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.impersonation-banner button { min-height: 38px; padding: 0 14px; flex: 0 0 auto; border: 1px solid rgba(201,242,124,.32); border-radius: 7px; background: rgba(201,242,124,.1); color: #d8f4a3; font-size: 10px; font-weight: 850; cursor: pointer; }
body.impersonating { padding-top: 56px; }
.account-statuses { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.account-commercial-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.account-commercial-meta span { padding: 5px 8px; border-radius: 999px; background: #edf1e9; color: #68736d; font-size: 10px; }
.account-commercial-meta b { color: #26332d; }
.account-period-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.account-period { padding: 10px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px #e1e4dd; }
.account-period > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #67716b; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.account-period > span b { color: #26332d; font-size: 10px; text-transform: none; }
.account-period > div { height: 6px; margin: 8px 0 6px; overflow: hidden; border-radius: 999px; background: #e7eae4; }
.account-period > div i { display: block; height: 100%; border-radius: inherit; background: #89ae4d; }
.account-period small { color: #7c8580; font-size: 10px; }
.empty-report { display: grid; gap: 4px; padding: 20px; border: 1px dashed #cfd5ca; border-radius: 9px; color: #737c76; text-align: center; }
.empty-report strong { color: #334039; }
.commerce-settings-grid.is-dirty { padding: 10px; border-radius: 9px; box-shadow: inset 0 0 0 1px #dfca85; background: #fffdf6; }
.commerce-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; align-items: end; padding-top: 5px; }
.commerce-settings-grid > button, .commerce-settings-grid > div { align-self: end; }
.compact-editor { margin-top: 13px !important; padding-top: 13px; border-top: 1px dashed #d4d8cf; }
.commerce-inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px !important; }
.commerce-inline-form input { flex: 1 1 240px; }
.mail-queue-health { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 10px; padding: 10px 12px; border-radius: 9px; background: #eef3e9; }
.mail-queue-health b { font-size: 12px; }
.mail-queue-health small { margin-left: auto; color: #6e7871; }

@media (max-width: 1040px) {
  .commerce-admin-shell { grid-template-columns: 1fr; }
  .commerce-admin-nav { position: sticky; top: 102px; display: flex; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .commerce-admin-nav button { min-width: 162px; width: auto; flex: 0 0 auto; }
}

@media (max-width: 760px) {
  .commerce-payment-fields { grid-template-columns: 1fr; }
  .commerce-modal { width: 100vw; max-width: none; max-height: 100dvh; margin: 0; border-radius: 0; }
  .commerce-modal > section { padding: 18px 14px calc(22px + env(safe-area-inset-bottom)); }
  .usage-grid, .plan-grid, .commerce-summary, .commerce-settings-grid, .account-period-grid { grid-template-columns: 1fr; }
  .billing-profile-grid .wide-field { grid-column: auto; }
  .billing-profile-notice { grid-template-columns: auto minmax(0,1fr); }
  .billing-profile-notice .button { grid-column: 1 / -1; width: 100%; }
  .billing-modal > section { padding-top: 0; }
  .billing-header { min-height: 190px; margin: 0 -14px 18px !important; padding: 26px 92px 24px 20px; border-radius: 0; }
  .billing-header-mark { right: 18px; bottom: -2px; width: 98px; height: 98px; }
  .billing-header-mark i { width: 82px; height: 82px; }
  .billing-header-mark img { width: 88px; height: 88px; }
  .billing-subscription-card { align-items: stretch; flex-direction: column; padding: 18px; }
  .billing-subscription-stats { grid-template-columns: 1fr 1fr; }
  .billing-subscription-stats > span { min-width: 0; }
  .billing-empty-pulse { align-self: center; }
  .billing-plans-head { align-items: stretch; flex-direction: column; }
  .billing-period-picker { width: 100%; }
  .billing-modal .plan-card { min-height: 0; }
  .plan-switch-route { grid-template-columns: 1fr; }
  .plan-switch-route > b { justify-self: center; transform: rotate(90deg); }
  .account-limit-card > header { flex-direction: column; }
  .account-statuses { justify-content: flex-start; }
  .commerce-row { grid-template-columns: 1fr auto; }
  .commerce-row > :nth-child(n+3):not(button) { display: none; }
  .commerce-section-head { align-items: stretch; flex-direction: column; }
  .model-price-fields { grid-template-columns: 1fr 1fr; }
  .model-price-row > header, .model-price-row > footer { align-items: stretch; flex-direction: column; }
  .model-price-row > header > div:last-child { justify-content: flex-start; }
  .commerce-admin-view { inset: 0; }
  .commerce-admin-page { padding: 16px 12px 50px; }
  .commerce-page-header { position: static; align-items: stretch; flex-direction: column; margin: -16px -12px 16px; padding: 16px 12px; }
  .commerce-page-actions { justify-content: stretch; }
  .commerce-page-actions > * { flex: 1 1 auto; }
  .commerce-admin-shell { gap: 12px; }
  .commerce-admin-nav { top: 0; margin-inline: -12px; padding: 7px 12px; border-width: 1px 0; border-radius: 0; box-shadow: 0 6px 18px rgba(23,33,29,.08); }
  .commerce-admin-nav button { min-width: 128px; min-height: 44px; grid-template-columns: 25px minmax(0,1fr); padding: 5px 7px; }
  .commerce-admin-nav button > i { width: 25px; height: 25px; }
  .commerce-admin-nav button small, .commerce-admin-nav button > b { display: none; }
  .commerce-panel-heading-actions { align-items: stretch; flex-direction: column; }
  .commerce-panel-heading h3 { font-size: 24px; }
  .smart-captcha-slot { min-height: 96px; padding: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .commerce-modal[open] > section,.billing-subscription-card,.billing-modal .plan-card,.usage-card,.usage-card > span i,.billing-header-mark i,.billing-header-mark img,.billing-empty-pulse i,.plan-switch-visual img,.plan-switch-visual i { animation: none !important; }
  .billing-modal .plan-card { transition: none; }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .model-price-fields { grid-template-columns: repeat(4,minmax(110px,1fr)); }
}

@media (min-width: 1700px) {
  .model-price-fields { grid-template-columns: repeat(7,minmax(105px,1fr)); }
}

@media print {
  body * { visibility: hidden !important; }
  #invoice-preview, #invoice-preview * { visibility: visible !important; }
  #invoice-preview { position: absolute; inset: 0; margin: 0; border: 0; }
  #invoice-preview button { display: none !important; }
}

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

/* Public RUcodex landing */
.public-site { height: 100dvh; overflow-x: hidden; overflow-y: auto; scroll-behavior: smooth; background: #f5f4ee; color: #17211d; }
.public-site a { color: inherit; }
.public-header { position: sticky; top: 0; z-index: 40; min-height: 78px; padding: 12px clamp(22px,5vw,76px); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid rgba(23,33,29,.1); background: rgba(248,247,241,.88); backdrop-filter: blur(18px); }
.public-brand { min-width: 0; display: flex; align-items: center; gap: 11px; color: #17211d; text-decoration: none; }
.public-brand img { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 12px; box-shadow: 0 8px 24px rgba(23,33,29,.14); }
.public-brand span,.public-brand strong,.public-brand small { min-width: 0; display: block; }
.public-brand strong { font: 400 24px/1 Georgia,serif; }
.public-brand small { margin-top: 3px; color: #7b827c; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.public-nav { display: flex; align-items: center; gap: clamp(18px,3vw,38px); }
.public-nav a { color: #515c56; font-size: 12px; font-weight: 750; text-decoration: none; transition: color .18s,transform .18s; }
.public-nav a:hover { color: #17211d; transform: translateY(-1px); }
.public-nav .public-nav-login { min-height: 42px; padding: 0 20px; display: grid; place-items: center; border-radius: 999px; background: #17211d; color: #c9f27c; box-shadow: 0 8px 22px rgba(23,33,29,.16); }
.public-nav .public-nav-login:hover { color: #c9f27c; }
.public-main { overflow: hidden; }
.public-hero { position: relative; width: min(1440px,100%); min-height: 760px; margin: 0 auto; padding: clamp(70px,8vw,120px) clamp(22px,5vw,76px) 82px; display: grid; grid-template-columns: minmax(0,1.08fr) minmax(430px,.92fr); align-items: center; gap: clamp(34px,6vw,96px); }
.public-hero::before { position: absolute; top: 9%; left: -16%; width: 470px; height: 470px; content: ""; border: 1px solid rgba(111,143,70,.12); border-radius: 50%; box-shadow: 0 0 0 60px rgba(201,242,124,.025),0 0 0 140px rgba(201,242,124,.018); pointer-events: none; }
.public-hero-copy { position: relative; z-index: 2; }
.public-kicker { width: max-content; display: flex; align-items: center; gap: 9px; padding: 7px 11px; border: 1px solid #d7ddd0; border-radius: 999px; background: rgba(255,255,255,.64); color: #59665f; font-size: 10px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.public-kicker i { width: 7px; height: 7px; border-radius: 50%; background: #80a647; box-shadow: 0 0 0 5px rgba(128,166,71,.12); }
.public-hero-copy h1 { max-width: 760px; margin: 24px 0 26px; font: 400 clamp(56px,6.4vw,94px)/.94 Georgia,"Times New Roman",serif; letter-spacing: -.055em; }
.public-hero-copy h1 em { color: #769847; font-style: normal; }
.public-hero-copy > p { max-width: 650px; margin: 0; color: #626c66; font-size: clamp(16px,1.45vw,20px); line-height: 1.65; }
.public-hero-copy > p strong { color: #26332d; font-weight: 780; }
.public-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.public-primary-action,.public-secondary-action { min-height: 52px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 30px; border-radius: 8px; font-size: 13px; font-weight: 800; text-decoration: none; transition: transform .18s,box-shadow .18s; }
.public-primary-action { background: #17211d; color: #fff !important; box-shadow: 0 13px 30px rgba(23,33,29,.18); }
.public-primary-action b { color: #c9f27c; font-size: 19px; }
.public-secondary-action { border: 1px solid #c9cec5; background: rgba(255,255,255,.58); color: #46524c; }
.public-primary-action:hover,.public-secondary-action:hover { transform: translateY(-2px); box-shadow: 0 15px 32px rgba(23,33,29,.14); }
.public-trust-row { display: flex; flex-wrap: wrap; gap: 14px 24px; margin-top: 48px; padding-top: 22px; border-top: 1px solid #d9dcd4; }
.public-trust-row span { max-width: 165px; display: flex; align-items: flex-start; gap: 8px; color: #6e7771; font-size: 10px; line-height: 1.45; }
.public-trust-row b { color: #7b9b4e; font-size: 9px; }
.public-hero-visual { position: relative; min-height: 650px; display: grid; place-items: center; }
.public-glow { position: absolute; inset: 8% -15% 0 -5%; border-radius: 50%; background: radial-gradient(circle,rgba(184,233,102,.27),rgba(184,233,102,.06) 42%,transparent 70%); filter: blur(2px); }
.public-hero-image { position: absolute; z-index: 1; top: -18px; right: -92px; width: min(330px,55%); aspect-ratio: 1; border-radius: 28%; object-fit: cover; box-shadow: 0 26px 80px rgba(18,35,24,.28); transform: rotate(8deg); animation: publicFloat 5.5s ease-in-out infinite; }
@keyframes publicFloat { 50% { transform: rotate(5deg) translateY(-12px); } }
.public-auth-card { position: relative; z-index: 3; width: 100%; max-width: 440px; min-width: 0; margin-top: 112px; padding: 30px; overflow: hidden; scroll-margin-top: 94px; border: 1px solid rgba(255,255,255,.65); border-radius: 22px; background: rgba(255,255,255,.93); box-shadow: 0 28px 80px rgba(21,33,27,.2); backdrop-filter: blur(18px); }
.public-auth-card::before { position: absolute; inset: 9px; z-index: -1; content: ""; border: 1px solid rgba(23,33,29,.055); border-radius: 16px; pointer-events: none; }
.public-auth-card > header { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 13px; margin-bottom: 25px; }
.public-auth-icon { width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 13px; background: #17211d; }
.public-auth-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }
.public-auth-card header small { color: #77904f; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.public-auth-card h2 { margin: 3px 0 4px; font: 400 27px/1.05 Georgia,serif; }
.public-auth-card header p { margin: 0; color: #77807a; font-size: 11px; }
.public-auth-card .login-form { max-width: none; margin: 0; }
.public-auth-card .login-form label { margin: 0 0 7px; color: #4d5953; font-size: 10px; font-weight: 850; letter-spacing: .04em; }
.public-auth-card .login-username,.public-auth-card .login-password { width: 100%; height: 48px; margin: 0 0 14px; padding: 0 13px; border: 1px solid #cfd3cb; border-radius: 9px; background: #fbfcf9; color: #17211d; font-size: 14px; outline: 0; transition: border-color .18s,box-shadow .18s,background .18s; }
.public-auth-card .login-username:focus,.public-auth-card .login-password:focus { border-color: #86a65a; background: #fff; box-shadow: 0 0 0 4px rgba(134,166,90,.12); }
.public-login-submit { width: 100%; min-height: 50px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 9px; background: #17211d; color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 10px 25px rgba(23,33,29,.16); transition: transform .18s,background .18s; }
.public-login-submit b { color: #c9f27c; font-size: 19px; }
.public-login-submit:hover { background: #263a30; transform: translateY(-1px); }
.public-auth-card .form-error { min-height: 16px; margin: 8px 0; font-size: 11px; }
.public-auth-card .login-account-actions { justify-content: space-between; gap: 10px; margin-top: 15px; }
.public-auth-card .login-register-button { color: #587041; font-size: 11px; }
.public-auth-security { margin-top: 18px !important; padding-top: 15px; border-top: 1px solid #e0e3dc; color: #89908b !important; font-size: 9px !important; text-align: center; }
.public-auth-security i { width: 17px; height: 17px; margin-right: 5px; display: inline-grid; place-items: center; border-radius: 50%; background: #e6f3d1; color: #61813c; font-style: normal; }

.public-subscription-section { width: min(1320px,calc(100% - 44px)); margin: 22px auto 0; padding: clamp(38px,5vw,68px); display: grid; grid-template-columns: minmax(280px,.78fr) minmax(440px,1.22fr); align-items: center; gap: clamp(38px,7vw,90px); scroll-margin-top: 94px; border-radius: 25px; background: radial-gradient(circle at 15% 10%,rgba(201,242,124,.12),transparent 35%),#17211d; color: #fff; box-shadow: 0 30px 70px rgba(23,33,29,.2); }
.public-subscription-copy > span { color: #c9f27c; font-size: 8px; font-weight: 950; letter-spacing: .17em; }
.public-subscription-copy h2 { margin: 12px 0 17px; font: 400 clamp(37px,4vw,56px)/1.02 Georgia,serif; letter-spacing: -.04em; }
.public-subscription-copy p { margin: 0; color: #abb7b0; font-size: 13px; line-height: 1.72; }
.public-subscription-copy > a { width: max-content; min-height: 47px; margin-top: 27px; padding: 0 17px; display: flex; align-items: center; gap: 28px; border-radius: 8px; background: #c9f27c; color: #17211d; font-size: 10px; font-weight: 900; text-decoration: none; transition: transform .18s,background .18s; }
.public-subscription-copy > a:hover { background: #d7f99a; transform: translateY(-2px); }
.public-subscription-copy > a b { font-size: 17px; }
.public-subscription-points { display: grid; gap: 12px; }
.public-subscription-points article { min-height: 116px; padding: 21px 23px; display: grid; grid-template-columns: 46px minmax(0,1fr); align-items: start; gap: 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 15px; background: rgba(255,255,255,.055); transition: transform .2s,border-color .2s,background .2s; }
.public-subscription-points article:hover { transform: translateX(5px); border-color: rgba(201,242,124,.3); background: rgba(255,255,255,.075); }
.public-subscription-points article > b { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(201,242,124,.11); color: #c9f27c; font-size: 9px; letter-spacing: .08em; }
.public-subscription-points h3 { margin: 1px 0 7px; font: 400 22px/1.1 Georgia,serif; }
.public-subscription-points p { margin: 0; color: #aab6af; font-size: 10px; line-height: 1.65; }

.public-section { width: min(1320px,calc(100% - 44px)); margin: 0 auto; padding: 108px 0; }
.public-section-heading { max-width: 760px; }
.public-section-heading > span,.public-product-copy > span,.public-final-cta span { color: #76944d; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.public-section-heading h2,.public-product-copy h2 { margin: 12px 0 16px; font: 400 clamp(39px,4.3vw,62px)/1.02 Georgia,serif; letter-spacing: -.035em; }
.public-section-heading p { max-width: 650px; margin: 0; color: #6a746e; font-size: 15px; line-height: 1.65; }
.public-features-section { border-top: 1px solid #d8dcd3; }
.public-feature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-top: 50px; }
.public-feature-grid article { position: relative; min-height: 310px; padding: 27px; overflow: hidden; border: 1px solid #d6dbd1; border-radius: 17px; background: rgba(255,255,255,.65); transition: transform .25s,box-shadow .25s,border-color .25s; }
.public-feature-grid article:hover { transform: translateY(-7px); border-color: #b8c9a3; box-shadow: 0 22px 50px rgba(23,33,29,.1); }
.public-feature-grid article.featured { background: #17211d; color: #fff; box-shadow: 0 22px 50px rgba(23,33,29,.18); }
.public-feature-grid article > i { position: absolute; top: 24px; right: 25px; color: #99a29d; font: normal 800 9px/1 sans-serif; letter-spacing: .12em; }
.public-feature-grid article.featured > i { color: #7f8d85; }
.feature-symbol { width: 56px; height: 56px; margin-bottom: 54px; display: grid; place-items: center; border: 1px solid #d6dbd1; border-radius: 15px; background: #f0f4e9; color: #587238; font: 800 18px/1 "Bahnschrift",sans-serif; }
.featured .feature-symbol { border-color: rgba(201,242,124,.22); background: rgba(201,242,124,.1); color: #c9f27c; }
.public-feature-grid h3 { margin: 0 0 12px; font: 400 26px/1.08 Georgia,serif; }
.public-feature-grid p { margin: 0; color: #6e7872; font-size: 12px; line-height: 1.65; }
.public-feature-grid .featured p { color: #a9b5ae; }

.public-product-section { padding: 110px max(22px,calc((100% - 1320px)/2)); display: grid; grid-template-columns: minmax(310px,.72fr) minmax(560px,1.28fr); align-items: center; gap: clamp(45px,7vw,105px); background: #17211d; color: #fff; }
.public-product-copy h2 { color: #fff; }
.public-product-copy > p { margin: 0; color: #aeb8b2; font-size: 14px; line-height: 1.7; }
.public-product-copy ul { margin: 28px 0 0; padding: 0; display: grid; gap: 13px; list-style: none; }
.public-product-copy li { display: flex; align-items: flex-start; gap: 10px; color: #d6ddd8; font-size: 11px; line-height: 1.5; }
.public-product-copy li i { width: 20px; height: 20px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: rgba(201,242,124,.12); color: #c9f27c; font-style: normal; }
.public-app-preview { overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; background: #f7f6f0; box-shadow: 0 32px 90px rgba(0,0,0,.35); transform: perspective(1100px) rotateY(-2deg) rotateX(1deg); }
.preview-top { min-height: 48px; padding: 0 15px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid #dfe2da; background: #fff; color: #707973; }
.preview-top > span { display: flex; gap: 5px; }
.preview-top > span i { width: 8px; height: 8px; border-radius: 50%; background: #d8ddd4; }
.preview-top > span i:nth-child(2) { background: #c9f27c; }
.preview-top b { color: #26342e; font: 400 14px Georgia,serif; }
.preview-top small { justify-self: end; font-size: 7px; }
.preview-body { min-height: 450px; display: grid; grid-template-columns: 180px minmax(0,1fr); }
.preview-body aside { padding: 17px 11px; display: flex; flex-direction: column; gap: 7px; background: #1a2721; color: #fff; }
.preview-body aside strong { margin-bottom: 22px; display: flex; align-items: center; gap: 8px; font: 400 15px Georgia,serif; }
.preview-body aside strong img { width: 27px; height: 27px; border-radius: 7px; }
.preview-body aside > small { margin: 0 7px 5px; color: #6f7f76; font-size: 6px; font-weight: 900; letter-spacing: .15em; }
.preview-body aside > span { min-height: 36px; padding: 7px 8px; display: flex; align-items: center; gap: 7px; border-radius: 7px; color: #9facA4; font-size: 8px; }
.preview-body aside > span.active { background: rgba(255,255,255,.1); color: #fff; }
.preview-body aside > span i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 5px; background: #c9f27c; color: #17211d; font: normal 700 8px Georgia,serif; }
.preview-chat { position: relative; padding-bottom: 80px; background: #f5f3eb; color: #17211d; }
.preview-chat > header { min-height: 62px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #d9dcd3; background: rgba(255,255,255,.8); }
.preview-chat header small,.preview-chat header b { display: block; }
.preview-chat header small { color: #7c8680; font-size: 6px; }
.preview-chat header b { margin-top: 3px; font: 400 15px Georgia,serif; }
.preview-chat header em { color: #718065; font-size: 7px; font-style: normal; }
.preview-message { margin: 20px; padding: 13px 14px; border-radius: 11px; font-size: 9px; line-height: 1.55; }
.preview-message.user { margin-left: 22%; background: #17211d; color: #fff; }
.preview-message.assistant { display: grid; grid-template-columns: 25px minmax(0,1fr); gap: 9px; border: 1px solid #d9ddd4; background: #fff; color: #58635d; }
.preview-message.assistant img { width: 25px; height: 25px; border-radius: 6px; }
.preview-message.assistant b { display: block; margin-bottom: 3px; color: #26342e; }
.preview-code { margin: 0 20px; padding: 13px; display: grid; gap: 5px; border-radius: 9px; background: #202c26; color: #bfe982; font: 8px/1.4 Consolas,monospace; }

.public-plans-section { position: relative; padding-top: 118px; border-top: 1px solid #d8dcd3; }
.public-plans-section::before { position: absolute; top: 75px; right: 3%; width: 260px; height: 260px; content: ""; border-radius: 50%; background: radial-gradient(circle,rgba(201,242,124,.19),transparent 70%); pointer-events: none; }
.public-plans-heading { position: relative; z-index: 1; }
.public-plans-assurance { position: relative; z-index: 1; margin-top: 28px; display: flex; flex-wrap: wrap; gap: 9px; }
.public-plans-assurance span { min-height: 35px; padding: 0 12px; display: flex; align-items: center; gap: 7px; border: 1px solid #d7ddd0; border-radius: 999px; background: rgba(255,255,255,.62); color: #5f6a64; font-size: 9px; font-weight: 750; }
.public-plans-assurance i { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: #e2efd0; color: #587536; font-style: normal; font-size: 8px; }
.public-plans-grid { position: relative; z-index: 1; margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(250px,100%),1fr)); align-items: stretch; gap: 16px; }
.public-plan-card { position: relative; min-width: 0; min-height: 500px; padding: 29px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid #d5dad0; border-radius: 20px; background: rgba(255,255,255,.75); box-shadow: 0 13px 38px rgba(23,33,29,.055); animation: publicPlanReveal .55s both; animation-delay: calc(var(--public-plan-index,0) * 75ms); transition: transform .25s,border-color .25s,box-shadow .25s; }
.public-plan-card:hover { transform: translateY(-7px); border-color: #aec58e; box-shadow: 0 25px 56px rgba(23,33,29,.12); }
.public-plan-card::after { position: absolute; right: -65px; bottom: -80px; width: 190px; height: 190px; content: ""; border: 1px solid rgba(105,135,68,.1); border-radius: 50%; box-shadow: 0 0 0 28px rgba(105,135,68,.025); pointer-events: none; }
.public-plan-card > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.public-plan-card > header span { color: #70805f; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.public-plan-card > header b { min-width: 47px; min-height: 34px; padding: 0 10px; display: grid; place-items: center; border-radius: 999px; background: #edf3e4; color: #5f7b3b; font-size: 12px; }
.public-plan-card h3 { margin: 32px 0 13px; font: 400 30px/1.05 Georgia,serif; letter-spacing: -.025em; }
.public-plan-card > p { min-height: 61px; margin: 0; color: #6c7670; font-size: 12px; line-height: 1.65; }
.public-plan-volume { margin-top: 29px; padding: 18px 0; display: grid; gap: 3px; border-top: 1px solid #dde1d9; border-bottom: 1px solid #dde1d9; }
.public-plan-volume strong { color: #6c8e41; font: 400 28px/1 Georgia,serif; }
.public-plan-volume span { color: #7c857f; font-size: 9px; }
.public-plan-price { margin-top: auto; padding: 27px 0 20px; display: grid; gap: 5px; }
.public-plan-price strong { color: #17211d; font: 400 25px/1.1 Georgia,serif; }
.public-plan-price span { color: #7e8782; font-size: 9px; }
.public-plan-card > button { position: relative; z-index: 1; width: 100%; min-height: 50px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 9px; background: #17211d; color: #fff; font-size: 11px; font-weight: 850; cursor: pointer; transition: transform .18s,background .18s; }
.public-plan-card > button:hover { background: #2a3b33; transform: translateY(-2px); }
.public-plan-card > button b { color: #c9f27c; font-size: 18px; }
.public-plan-card.recommended { z-index: 2; transform: translateY(-10px); border-color: #17211d; background: #17211d; color: #fff; box-shadow: 0 28px 65px rgba(23,33,29,.22); }
.public-plan-card.recommended:hover { transform: translateY(-17px); border-color: #17211d; box-shadow: 0 34px 72px rgba(23,33,29,.27); }
.public-plan-card.recommended::after { border-color: rgba(201,242,124,.16); box-shadow: 0 0 0 28px rgba(201,242,124,.025),0 0 0 58px rgba(201,242,124,.015); }
.public-plan-card.recommended > header span { color: #a9b5ae; }
.public-plan-card.recommended > header b { background: rgba(201,242,124,.12); color: #c9f27c; }
.public-plan-card.recommended > p,.public-plan-card.recommended .public-plan-volume span,.public-plan-card.recommended .public-plan-price span { color: #aab5ae; }
.public-plan-card.recommended .public-plan-volume { border-color: rgba(255,255,255,.13); }
.public-plan-card.recommended .public-plan-volume strong { color: #c9f27c; }
.public-plan-card.recommended .public-plan-price strong { color: #fff; }
.public-plan-card.recommended > button { background: #c9f27c; color: #17211d; }
.public-plan-card.recommended > button:hover { background: #d6fa92; }
.public-plan-card.recommended > button b { color: #17211d; }
.public-plan-recommended { position: absolute; top: 0; left: 50%; padding: 6px 13px; border-radius: 0 0 8px 8px; background: #c9f27c; color: #17211d; font-size: 7px; font-weight: 950; letter-spacing: .13em; transform: translateX(-50%); }
.public-plans-note { margin: 28px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: #68736d; font-size: 10px; text-align: center; }
.public-plans-note i { width: 20px; height: 20px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #e3efd4; color: #64813f; font-style: normal; }
.public-plans-empty { grid-column: 1/-1; min-height: 180px; padding: 38px; display: grid; place-content: center; gap: 8px; border: 1px dashed #c8cec3; border-radius: 18px; background: rgba(255,255,255,.55); text-align: center; }
.public-plans-empty strong { font: 400 25px Georgia,serif; }
.public-plans-empty span { color: #747e78; font-size: 11px; }
.public-plan-loading { min-height: 390px; display: grid; align-content: start; gap: 18px; }
.public-plan-loading span { height: 16px; border-radius: 999px; background: linear-gradient(90deg,#e4e7df 20%,#f5f6f2 50%,#e4e7df 80%); background-size: 240% 100%; animation: publicPlanLoading 1.3s linear infinite; }
.public-plan-loading span:nth-child(1) { width: 30%; }
.public-plan-loading span:nth-child(2) { width: 68%; height: 31px; margin-top: 21px; }
.public-plan-loading span:nth-child(3) { width: 100%; height: 70px; }
.public-plan-loading span:nth-child(4) { width: 100%; height: 50px; margin-top: 100px; }
@keyframes publicPlanReveal { from { opacity: 0; transform: translateY(18px); } }
@keyframes publicPlanLoading { to { background-position: -240% 0; } }

.public-workflow-section { padding-bottom: 122px; }
.public-workflow-grid { position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-top: 52px; }
.public-workflow-grid::before { position: absolute; top: 27px; left: 7%; right: 7%; height: 1px; content: ""; background: linear-gradient(90deg,transparent,#bfc8b7 12%,#bfc8b7 88%,transparent); }
.public-workflow-grid article { position: relative; z-index: 1; padding-right: 25px; }
.public-workflow-grid b { width: 54px; height: 54px; display: grid; place-items: center; border: 7px solid #f5f4ee; border-radius: 50%; background: #17211d; color: #c9f27c; font: 400 18px Georgia,serif; box-shadow: 0 0 0 1px #cfd5c9; }
.public-workflow-grid h3 { margin: 24px 0 10px; font: 400 24px Georgia,serif; }
.public-workflow-grid p { max-width: 300px; margin: 0; color: #6f7873; font-size: 12px; line-height: 1.6; }
.public-faq-section { width: min(1320px,calc(100% - 44px)); margin: 0 auto; padding: 20px 0 115px; display: grid; grid-template-columns: minmax(270px,.72fr) minmax(500px,1.28fr); align-items: start; gap: clamp(45px,8vw,110px); }
.public-faq-section .public-section-heading { position: sticky; top: 112px; }
.public-faq-list { display: grid; gap: 10px; }
.public-faq-list details { overflow: hidden; border: 1px solid #d4dad0; border-radius: 14px; background: rgba(255,255,255,.67); transition: border-color .2s,box-shadow .2s; }
.public-faq-list details[open] { border-color: #aec48f; box-shadow: 0 16px 35px rgba(23,33,29,.07); }
.public-faq-list summary { min-height: 68px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #29362f; font: 400 19px/1.25 Georgia,serif; cursor: pointer; list-style: none; }
.public-faq-list summary::-webkit-details-marker { display: none; }
.public-faq-list summary i { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #e8eee0; color: #637b47; font: normal 16px/1 sans-serif; transition: transform .2s,background .2s; }
.public-faq-list details[open] summary i { background: #dff0c4; transform: rotate(45deg); }
.public-faq-list details p { margin: 0; padding: 0 62px 22px 20px; color: #68736d; font-size: 11px; line-height: 1.72; }
.public-final-cta { position: relative; width: min(1320px,calc(100% - 44px)); min-height: 280px; margin: 0 auto 90px; padding: 52px 58px; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 30px; border-radius: 24px; background: #17211d; color: #fff; box-shadow: 0 30px 70px rgba(23,33,29,.2); }
.public-final-cta::after { position: absolute; right: 12%; bottom: -180px; width: 390px; height: 390px; content: ""; border: 1px solid rgba(201,242,124,.18); border-radius: 50%; box-shadow: 0 0 0 45px rgba(201,242,124,.025),0 0 0 100px rgba(201,242,124,.02); }
.public-final-cta > img { position: relative; z-index: 2; width: 118px; height: 118px; object-fit: contain; filter: drop-shadow(0 18px 25px rgba(0,0,0,.35)); }
.public-final-cta > div { position: relative; z-index: 2; }
.public-final-cta h2 { margin: 10px 0 0; font: 400 clamp(35px,4vw,54px)/1 Georgia,serif; }
.public-final-cta > a { position: relative; z-index: 2; min-height: 54px; padding: 0 21px; display: flex; align-items: center; gap: 28px; border-radius: 9px; background: #c9f27c; color: #17211d; font-size: 12px; font-weight: 900; text-decoration: none; }
.public-final-cta > a b { font-size: 19px; }
.public-footer { min-height: 150px; padding: 38px max(22px,calc((100% - 1320px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 30px; border-top: 1px solid #d7dbd2; background: #eeede6; }
.public-footer-brand { display: flex; align-items: center; gap: 10px; }
.public-footer-brand img { width: 42px; height: 42px; border-radius: 11px; }
.public-footer-brand strong,.public-footer-brand small { display: block; }
.public-footer-brand strong { font: 400 20px Georgia,serif; }
.public-footer-brand small { margin-top: 3px; color: #7c847f; font-size: 8px; }
.public-footer-legal { color: #68716c; font-size: 10px; line-height: 1.5; text-align: right; }
.public-footer-legal p { margin: 3px 0; }

/* SmartCaptcha keeps its native 302 × 100 layout instead of clipping the text. */
.smart-captcha-frame { width: 302px; max-width: 100%; height: 100px; min-height: 100px; margin: 2px 0; overflow: hidden; }
.smart-captcha-slot { width: 302px !important; min-width: 302px; max-width: none; height: 100px !important; min-height: 100px; padding: 0; overflow: visible; border: 0; border-radius: 12px; background: transparent; transform-origin: left top; }
.smart-captcha-slot:focus-within { border-color: transparent; box-shadow: none; }
.smart-captcha-slot > span { width: 302px; height: 100px; padding: 12px 15px; border: 1px solid #d7dbd2; border-radius: 12px; background: linear-gradient(135deg,#f8faf5,#eef3e8); white-space: normal; }
.smart-captcha-slot iframe,.smart-captcha-slot > div { width: 302px !important; min-width: 302px !important; max-width: none !important; }
.smart-captcha-slot.captcha-load-error { border-radius: 12px; }
.smart-captcha-slot .captcha-retry-state { height: 100px; padding: 12px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #ead4c8; border-radius: 12px; background: linear-gradient(135deg,#fffaf5,#fff2e8); }
.smart-captcha-slot .captcha-retry-state > span { min-width: 0; display: grid; gap: 3px; color: #765e52; line-height: 1.25; }
.smart-captcha-slot .captcha-retry-state b { color: #553d32; font-size: 11px; }
.smart-captcha-slot .captcha-retry-state small { display: -webkit-box; overflow: hidden; color: #8c7569; font-size: 9px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.smart-captcha-slot .captcha-retry-state button { min-width: 76px; min-height: 34px; padding: 0 11px; border: 1px solid #b8cc98; border-radius: 9px; background: #e4f2cc; color: #48632c; font: 700 10px/1 Arial,sans-serif; cursor: pointer; transition: transform .15s,background .15s,box-shadow .15s; }
.smart-captcha-slot .captcha-retry-state button:hover { background: #d9edb8; box-shadow: 0 5px 15px rgba(77,101,45,.14); transform: translateY(-1px); }
.smart-captcha-slot .captcha-retry-state button:active { transform: translateY(0); }
.login-form .smart-captcha-slot,.commerce-form .smart-captcha-slot { margin-top: 0; }
.public-auth-card .smart-captcha-frame { margin-top: 2px; }
.billing-profile-grid .field-label { min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 5px; }
.billing-profile-grid .field-label em { display: inline; color: #a34e40; font-style: normal; }
.billing-profile-grid .field-label small { display: inline; margin: 0; color: #8a938d; font-size: 9px; font-weight: 600; text-transform: none; }

@media (max-width: 1100px) {
  .public-hero { grid-template-columns: minmax(0,1fr); padding-top: 80px; }
  .public-hero-copy { max-width: 850px; }
  .public-hero-visual { width: min(580px,100%); min-height: 650px; margin: -25px auto 0; }
  .public-product-section { grid-template-columns: 1fr; }
  .public-product-copy { max-width: 720px; }
  .public-app-preview { width: min(820px,100%); margin: 0 auto; transform: none; }
  .public-subscription-section { grid-template-columns: 1fr; }
  .public-subscription-copy { max-width: 720px; }
  .public-faq-section { grid-template-columns: 1fr; }
  .public-faq-section .public-section-heading { position: static; }
}

@media (max-width: 760px) {
  .public-header { min-height: 66px; padding: 9px 14px; }
  .public-brand img { width: 40px; height: 40px; }
  .public-brand strong { font-size: 21px; }
  .public-brand small { display: none; }
  .public-nav { gap: 8px; }
  .public-nav a:not(.public-nav-login) { display: none; }
  .public-nav .public-nav-login { min-height: 39px; padding: 0 16px; }
  .public-hero { min-height: 0; padding: 64px 18px 74px; gap: 38px; }
  .public-hero::before { left: -80%; }
  .public-kicker { font-size: 8px; }
  .public-hero-copy h1 { margin-top: 20px; font-size: clamp(47px,14vw,68px); }
  .public-hero-copy > p { font-size: 15px; }
  .public-hero-actions { align-items: stretch; flex-direction: column; }
  .public-primary-action,.public-secondary-action { width: 100%; }
  .public-trust-row { display: grid; grid-template-columns: 1fr; }
  .public-trust-row span { max-width: none; }
  .public-hero-visual { min-height: 570px; margin-top: 0; }
  .public-hero-image { top: -24px; right: -55px; width: 230px; }
  .public-auth-card { margin-top: 92px; padding: 24px; border-radius: 19px; }
  .public-section { width: calc(100% - 36px); padding: 78px 0; }
  .public-subscription-section { width: calc(100% - 28px); margin-top: 12px; padding: 34px 22px; border-radius: 19px; }
  .public-subscription-points article { grid-template-columns: 40px minmax(0,1fr); padding: 18px 16px; }
  .public-subscription-points article > b { width: 38px; height: 38px; }
  .public-subscription-points h3 { font-size: 20px; }
  .public-section-heading h2,.public-product-copy h2 { font-size: 40px; }
  .public-feature-grid { grid-template-columns: 1fr; }
  .public-feature-grid article { min-height: 270px; }
  .feature-symbol { margin-bottom: 38px; }
  .public-product-section { padding: 78px 18px; }
  .preview-body { min-height: 400px; grid-template-columns: 1fr; }
  .preview-body aside { display: none; }
  .preview-chat > header { padding: 0 12px; }
  .preview-chat header em { display: none; }
  .preview-message { margin: 15px; }
  .preview-code { margin: 0 15px; }
  .public-workflow-grid { grid-template-columns: 1fr; gap: 34px; }
  .public-plans-grid { grid-template-columns: 1fr; gap: 14px; }
  .public-plan-card { min-height: 455px; padding: 25px; }
  .public-plan-card.recommended,.public-plan-card.recommended:hover { transform: none; }
  .public-plans-assurance { display: grid; grid-template-columns: 1fr; }
  .public-plans-assurance span { border-radius: 10px; }
  .public-plans-note { align-items: flex-start; text-align: left; }
  .public-workflow-grid::before { top: 0; bottom: 0; left: 26px; right: auto; width: 1px; height: auto; background: linear-gradient(transparent,#bfc8b7 8%,#bfc8b7 92%,transparent); }
  .public-workflow-grid article { min-height: 80px; padding: 0 0 0 79px; }
  .public-workflow-grid b { position: absolute; left: 0; top: 0; }
  .public-workflow-grid h3 { margin: 0 0 8px; padding-top: 4px; }
  .public-faq-section { width: calc(100% - 36px); padding: 0 0 78px; gap: 32px; }
  .public-faq-list summary { min-height: 64px; padding: 16px; font-size: 17px; }
  .public-faq-list details p { padding: 0 48px 18px 16px; }
  .public-final-cta { width: calc(100% - 28px); margin-bottom: 60px; padding: 35px 26px; grid-template-columns: 1fr; text-align: center; }
  .public-final-cta > img { width: 94px; height: 94px; justify-self: center; }
  .public-final-cta > a { width: 100%; justify-content: space-between; }
  .public-footer { align-items: flex-start; flex-direction: column; padding: 30px 20px; }
  .public-footer-legal { text-align: left; }
}

@media (max-width: 420px) {
  .public-hero { padding-inline: 10px; }
  .public-kicker { margin-left: 8px; }
  .public-hero-copy { padding-inline: 8px; }
  .public-hero-copy h1 { font-size: clamp(43px,14.5vw,58px); }
  .public-auth-card { padding: 18px 14px; }
  .public-auth-card h2 { font-size: 24px; }
  .public-auth-card > header { grid-template-columns: 42px minmax(0,1fr); }
  .public-auth-icon { width: 42px; height: 42px; }
  .public-auth-card .login-account-actions { align-items: flex-start; flex-direction: column; }
  .public-app-preview { border-radius: 13px; }
  .preview-top small { display: none; }
  .preview-top { grid-template-columns: 1fr auto 1fr; }
}

@media (max-width: 360px) {
  .smart-captcha-frame { width: 293px; height: 97px; min-height: 97px; }
  .smart-captcha-slot { transform: scale(.97); }
}

@media (max-width: 340px) {
  .public-hero { padding-inline: 4px; }
  .public-auth-card { padding-inline: 12px; }
  .smart-captcha-frame { width: 254px; height: 84px; min-height: 84px; }
  .smart-captcha-slot { transform: scale(.84); }
}

@media (max-width: 300px) {
  .smart-captcha-frame { width: 233px; height: 77px; min-height: 77px; }
  .smart-captcha-slot { transform: scale(.77); }
}

/* Unified authentication dialogs */
.public-hero-console { position: relative; z-index: 3; width: min(440px,100%); margin-top: 128px; overflow: hidden; border: 1px solid rgba(255,255,255,.17); border-radius: 20px; background: rgba(20,32,26,.94); color: #fff; box-shadow: 0 30px 80px rgba(13,24,18,.32); backdrop-filter: blur(18px); transform: rotate(-1.2deg); }
.public-hero-console > header { min-height: 49px; padding: 0 16px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid rgba(255,255,255,.1); }
.public-hero-console > header > span { display: flex; gap: 5px; }
.public-hero-console > header i { width: 7px; height: 7px; display: block; border-radius: 50%; background: rgba(255,255,255,.2); }
.public-hero-console > header i:nth-child(2) { background: #c9f27c; }
.public-hero-console > header b { color: #dfe7e1; font: 400 11px Georgia,serif; }
.public-hero-console > header em { justify-self: end; color: #9fb091; font-size: 7px; font-style: normal; }
.public-hero-console > div { padding: 27px; }
.public-hero-console > div > small { color: #c9f27c; font-size: 7px; font-weight: 900; letter-spacing: .15em; }
.public-hero-console h3 { margin: 10px 0 9px; font: 400 27px/1.05 Georgia,serif; }
.public-hero-console p { margin: 0; color: #9facA4; font-size: 10px; line-height: 1.6; }
.public-console-progress { height: 6px; margin: 25px 0 20px; overflow: hidden; display: block; border-radius: 999px; background: rgba(255,255,255,.1); }
.public-console-progress i { width: 72%; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#7da744,#c9f27c); box-shadow: 0 0 18px rgba(201,242,124,.28); animation: publicConsoleProgress 3.2s ease-in-out infinite alternate; }
@keyframes publicConsoleProgress { from { width: 44%; } to { width: 88%; } }
.public-hero-console footer { display: flex; flex-wrap: wrap; gap: 8px; }
.public-hero-console footer b { padding: 6px 8px; border-radius: 999px; background: rgba(201,242,124,.1); color: #cfeaa2; font-size: 7px; font-weight: 750; }
.public-hero-result { position: absolute; z-index: 4; right: -10px; bottom: 80px; min-width: 210px; padding: 13px 15px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.75); border-radius: 13px; background: rgba(255,255,255,.94); box-shadow: 0 18px 45px rgba(23,33,29,.18); transform: rotate(2deg); }
.public-hero-result > i { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 10px; background: #c9f27c; color: #26351d; font-style: normal; font-weight: 900; }
.public-hero-result small,.public-hero-result b { display: block; }
.public-hero-result small { color: #80906f; font-size: 6px; font-weight: 900; letter-spacing: .12em; }
.public-hero-result b { margin-top: 4px; color: #25322c; font-size: 10px; }

.auth-dialog { width: min(860px,calc(100vw - 28px)); max-width: none; max-height: calc(100dvh - 28px); padding: 0; overflow: visible; border: 0; border-radius: 24px; background: transparent; color: #17211d; box-shadow: 0 35px 100px rgba(5,14,10,.42); }
.auth-dialog.auth-dialog-wide { width: min(960px,calc(100vw - 28px)); }
.auth-dialog::backdrop { background: rgba(8,16,12,.72); backdrop-filter: blur(7px); }
.auth-dialog[open] { animation: authDialogIn .32s cubic-bezier(.2,.8,.2,1) both; }
@keyframes authDialogIn { from { opacity: 0; transform: translateY(18px) scale(.975); } to { opacity: 1; transform: none; } }
.auth-dialog-shell { min-height: 600px; max-height: calc(100dvh - 28px); display: grid; grid-template-columns: 285px minmax(0,1fr); overflow: hidden; border: 1px solid rgba(255,255,255,.5); border-radius: 24px; background: #fbfaf6; }
.auth-dialog-aside { position: relative; min-width: 0; padding: 38px 30px 30px; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; background: radial-gradient(circle at 85% 5%,rgba(201,242,124,.19),transparent 35%),linear-gradient(150deg,#101a15,#1d3026); color: #fff; }
.auth-dialog-aside::before { position: absolute; right: -145px; bottom: -110px; width: 330px; height: 330px; content: ""; border: 1px solid rgba(201,242,124,.18); border-radius: 50%; box-shadow: 0 0 0 45px rgba(201,242,124,.025),0 0 0 100px rgba(201,242,124,.018); }
.auth-dialog-aside > img { position: relative; z-index: 1; width: 118px; height: 118px; margin: -10px 0 26px; object-fit: contain; filter: drop-shadow(0 20px 28px rgba(0,0,0,.35)); }
.auth-dialog-aside > span { position: relative; z-index: 1; color: #c9f27c; font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.auth-dialog-aside h2 { position: relative; z-index: 1; margin: 11px 0 16px; font: 400 39px/1 Georgia,serif; letter-spacing: -.035em; }
.auth-dialog-aside > p { position: relative; z-index: 1; margin: 0 0 28px; color: #aab7b0; font-size: 11px; line-height: 1.65; }
.auth-dialog-aside > div { position: relative; z-index: 1; margin-top: 8px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; background: rgba(255,255,255,.055); color: #dce5df; font-size: 9px; }
.auth-dialog-aside > div b { color: #c9f27c; font-size: 8px; }
.auth-dialog-main { position: relative; min-width: 0; padding: 34px 38px 30px; overflow-y: auto; scrollbar-width: thin; }
.auth-dialog-close { position: absolute; z-index: 4; top: 18px; right: 18px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #edf0ea; color: #657069; font-size: 22px; line-height: 1; transition: background .18s,transform .18s; }
.auth-dialog-close:hover { background: #e2e8db; transform: rotate(4deg); }
.auth-dialog-heading { min-height: 58px; padding-right: 38px; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 13px; }
.auth-dialog-heading small { color: #76944d; font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.auth-dialog-heading h2 { margin: 4px 0 5px; font: 400 29px/1 Georgia,serif; }
.auth-dialog-heading p { margin: 0; color: #77807b; font-size: 10px; }
.auth-form { margin-top: 25px; display: grid; gap: 13px; }
.auth-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.auth-form label { min-width: 0; display: grid; gap: 6px; color: #4e5a54; font-size: 10px; font-weight: 850; letter-spacing: .035em; }
.auth-form input { width: 100%; min-width: 0; height: 47px; margin: 0; padding: 0 13px; border: 1px solid #cfd4cb; border-radius: 9px; background: #fff; color: #17211d; font: 500 14px/1.2 inherit; outline: 0; transition: border-color .18s,box-shadow .18s,background .18s; }
.auth-form input:focus { border-color: #88a861; background: #fff; box-shadow: 0 0 0 4px rgba(136,168,97,.12); }
.auth-form input::placeholder { color: #a1a7a2; }
.auth-password-field { position: relative; min-width: 0; }
.auth-password-field input { padding-right: 48px; }
.auth-password-field > button { position: absolute; top: 50%; right: 7px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #88918b; font-size: 15px; transform: translateY(-50%); }
.auth-password-field > button:hover { background: #eef2e9; color: #52634f; }
.auth-password-field > button.visible { color: #66893a; background: #eaf3dc; }
.password-requirements { margin: -2px 0 1px; padding: 10px; display: flex; flex-wrap: wrap; gap: 7px; border: 1px solid #e0e3dd; border-radius: 9px; background: #f3f4f0; }
.password-requirements span { display: flex; align-items: center; gap: 5px; color: #858d88; font-size: 8px; transition: color .18s; }
.password-requirements span i { width: 15px; height: 15px; display: grid; place-items: center; border-radius: 50%; background: #e3e6e0; color: #a2aaa4; font-style: normal; font-size: 8px; }
.password-requirements span.met { color: #5c773d; }
.password-requirements span.met i { background: #dff0c4; color: #537333; }
.auth-info-note { padding: 11px 12px; display: flex; align-items: center; gap: 9px; border: 1px solid #dbe4cf; border-radius: 9px; background: #f2f7e9; color: #64715f; font-size: 9px; }
.auth-info-note i { width: 20px; height: 20px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #dcecc3; color: #547232; font-style: normal; font-weight: 900; }
.auth-dialog .form-error { min-height: 15px; margin: -2px 0 0; font-size: 10px; }
.auth-dialog .public-login-submit { margin-top: -2px; }
.auth-dialog .login-account-actions { justify-content: space-between; gap: 10px; margin-top: 1px; }
.auth-dialog .login-register-button { color: #587041; font-size: 10px; }
.auth-dialog .public-auth-security { margin-top: 2px !important; padding-top: 13px; border-top: 1px solid #e0e3dc; color: #89908b !important; font-size: 8px !important; text-align: center; }
.auth-dialog .verification-copy { background: linear-gradient(135deg,#eaf3da,#f4f8ec); }
.auth-dialog .commerce-actions { margin-top: 4px; }
.auth-dialog .commerce-actions .button { min-height: 40px; }
.auth-dialog .smart-captcha-frame { margin-top: 1px; }

@media (max-width: 760px) {
  .public-hero-console { margin-top: 110px; }
  .public-hero-result { right: 2px; bottom: 55px; }
  .auth-dialog,.auth-dialog.auth-dialog-wide { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); border-radius: 18px; }
  .auth-dialog-shell { min-height: 0; max-height: calc(100dvh - 12px); grid-template-columns: minmax(0,1fr); border-radius: 18px; }
  .auth-dialog-aside { min-height: 128px; padding: 22px 105px 20px 22px; display: block; }
  .auth-dialog-aside > img { position: absolute; right: 8px; bottom: -18px; width: 112px; height: 112px; margin: 0; opacity: .9; }
  .auth-dialog-aside h2 { margin: 8px 0 0; font-size: 31px; }
  .auth-dialog-aside > p,.auth-dialog-aside > div { display: none; }
  .auth-dialog-main { max-height: calc(100dvh - 140px); padding: 23px 15px 22px; }
  .auth-dialog-close { top: 12px; right: 12px; width: 34px; height: 34px; }
  .auth-dialog-heading { padding-right: 35px; }
  .auth-dialog-heading h2 { font-size: 25px; }
  .auth-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .public-hero-console { width: calc(100% - 8px); }
  .public-hero-console > div { padding: 20px; }
  .public-hero-result { min-width: 190px; }
  .auth-dialog-main { padding-inline: 12px; }
  .auth-dialog-heading { grid-template-columns: 40px minmax(0,1fr); gap: 9px; }
  .auth-dialog-heading .public-auth-icon { width: 40px; height: 40px; }
  .password-requirements { display: grid; grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .account-admin-tools { grid-template-columns: 1fr; align-items: stretch; }
  .account-subscription-editor { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  body.impersonating { padding-top: 94px; }
  .impersonation-banner { min-height: 94px; align-items: stretch; flex-direction: column; gap: 7px; padding: 10px 14px; }
  .impersonation-banner span { display: grid; gap: 3px; }
  .impersonation-banner strong { font-size: 11px; }
  .impersonation-banner button { width: 100%; }
  .account-subscription-editor { grid-template-columns: 1fr; }
  .account-subscription-editor .button,.account-admin-tools > .button { width: 100%; }
  .commerce-row-actions { justify-content: flex-start; flex-wrap: wrap; }
  .billing-order-actions { justify-content: flex-start; }
}
/* Connected RUcodex Client devices */
.devices-modal { width: min(760px, calc(100vw - 28px)); }
.devices-modal > form { padding: 0; }
.devices-modal header { display: flex; justify-content: space-between; gap: 20px; padding: 26px; border-bottom: 1px solid var(--line, #ddd); }
.devices-modal header h2 { margin: 5px 0; }
.devices-modal header p { margin: 0; color: var(--muted, #68716b); }
.device-pairing-block { display: flex; align-items: end; gap: 12px; margin: 20px 26px 0; padding: 18px; border-radius: 14px; background: #c9f27c33; }
.device-pairing-block label { flex: 1; display: grid; gap: 7px; font-weight: 700; }
.device-pairing-block input { width: 100%; border: 1px solid #aab99b; border-radius: 10px; padding: 12px; font: 800 20px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.device-list { display: grid; gap: 10px; padding: 22px 26px; max-height: min(52vh, 520px); overflow: auto; }
.device-row { display: flex; align-items: center; gap: 13px; border: 1px solid var(--line, #ddd); border-radius: 14px; padding: 13px; }
.device-row > i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #20251f; color: #c9f27c; font-style: normal; font-weight: 800; }
.device-row > span { min-width: 0; flex: 1; display: grid; gap: 3px; }
.device-row small { color: var(--muted, #68716b); overflow-wrap: anywhere; }
.devices-empty { display: grid; gap: 7px; padding: 30px; border: 1px dashed var(--line, #ccc); border-radius: 14px; text-align: center; color: var(--muted, #68716b); }
.devices-empty strong { color: var(--ink, #171a18); }
@media (max-width: 620px) { .device-pairing-block { align-items: stretch; flex-direction: column; }.device-row { align-items: flex-start; flex-wrap: wrap; }.device-row > span { width: calc(100% - 58px); }.device-row > button { margin-left: 55px; } }
/* Per-computer navigation and workspace */
.device-nav-list { display: grid; gap: 8px; }
.device-nav-list:empty { display: none; }
.device-nav-card { width: 100%; text-align: left; }
.device-nav-card > i { position: relative; }
.device-nav-card > i::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border: 2px solid #172019; border-radius: 50%; background: #7ead48; }
.device-nav-card.offline { border-color: rgba(219, 95, 95, .45); background: rgba(178, 52, 52, .12); }
.device-nav-card.offline > i { background: #7f3535; color: #fff; }.device-nav-card.offline > i::after { background: #d85c5c; }
.device-nav-card.offline small { color: #e19b9b; }
.device-nav-card.active { border-color: rgba(201, 242, 124, .5); box-shadow: 0 0 0 2px rgba(201, 242, 124, .1); }
#devices-settings-link { text-decoration: none; }
.device-workspace-tabs { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid #d3d8d1; border-radius: 9px; background: #f1f3ee; }
.device-workspace-tabs button { min-height: 34px; border: 0; border-radius: 6px; padding: 0 12px; background: transparent; color: #677069; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.device-workspace-tabs button.active { background: #1d2822; color: #fff; box-shadow: 0 3px 10px rgba(22, 34, 28, .15); }
.automations-tabs { width: max-content; margin-top: 14px; }
.codex-status.offline { color: #a33f46; background: #fff0f0; border-color: #e5b8bb; }.codex-status.offline i { background: #c9535a; }
@media (max-width: 900px) { .codex-page-header .device-workspace-tabs { grid-column: 1 / -1; width: max-content; } }
