:root {
  color-scheme: light;
  --ink: #202129;
  --muted: #777983;
  --subtle: #a5a6ad;
  --line: #e7e7e9;
  --panel: rgba(255,255,255,.9);
  --canvas: #f7f7f5;
  --lime: #c8f35d;
  --lime-dark: #a8d63b;
  --purple: #705cf6;
  --purple-soft: #f0edff;
  --red: #ef5365;
  --green: #168b62;
  --shadow: 0 18px 55px rgba(43,42,55,.08), 0 2px 8px rgba(43,42,55,.03);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--canvas); overflow-x: hidden; }
button, input, textarea { font: inherit; }
button { color: inherit; }
.ambient { position: fixed; z-index: -1; border-radius: 50%; filter: blur(100px); pointer-events: none; opacity: .28; }
.ambient-a { width: 580px; height: 580px; top: -330px; right: -170px; background: #d8cbff; }
.ambient-b { width: 520px; height: 520px; bottom: -340px; left: -240px; background: #e4f8a8; }

.topbar { width: min(1240px, calc(100% - 52px)); height: 84px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-symbol { position: relative; width: 39px; height: 39px; display: block; border-radius: 12px; background: var(--ink); box-shadow: 0 8px 20px rgba(32,33,41,.16); overflow: hidden; }
.brand-symbol i { position: absolute; width: 7px; bottom: 9px; border-radius: 4px 4px 2px 2px; background: var(--lime); }
.brand-symbol i:nth-child(1) { left: 8px; height: 11px; }
.brand-symbol i:nth-child(2) { left: 16px; height: 17px; }
.brand-symbol i:nth-child(3) { left: 24px; height: 23px; }
.brand-copy { display: grid; line-height: 1; gap: 4px; }
.brand-copy strong { font-size: 17px; letter-spacing: .05em; }
.brand-copy small { color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.topbar-meta { display: flex; align-items: center; gap: 22px; }
.local-badge { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.62); font-size: 10px; }
.local-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(22,139,98,.09); }
.home-link { color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 650; }
.home-link:hover { color: var(--ink); }

main { width: min(1160px, calc(100% - 52px)); min-height: calc(100vh - 154px); margin: 0 auto; padding: 45px 0 74px; }
.page-loading { min-height: 60vh; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); font-size: 12px; }
.page-loading span { width: 25px; height: 25px; border: 2px solid #dedde2; border-top-color: var(--purple); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--purple); font-size: 9px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 60px; align-items: end; padding: 50px 0 58px; }
.home-hero h1 { max-width: 650px; margin: 15px 0 18px; font-size: clamp(46px, 6.2vw, 74px); line-height: 1.04; letter-spacing: -.065em; }
.home-hero h1 em { color: var(--purple); font-style: normal; }
.home-hero p { max-width: 590px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.platform-cloud { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.platform-chip { min-height: 57px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.7); color: #5f6069; font-size: 12px; font-weight: 650; }
.platform-chip:last-child { grid-column: 1 / -1; }
.platform-logo { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #fff; font-size: 10px; font-weight: 850; letter-spacing: -.05em; }
.p-xiaohongshu { background: #ff2442; }
.p-douyin { background: #19191e; }
.p-weibo { background: #ff8200; }
.p-bilibili { background: #00aeec; }
.p-wechat_channels { background: #07c160; }

.create-panel { padding: 30px; border: 1px solid #dfdee3; border-radius: 22px; background: var(--ink); color: #fff; box-shadow: 0 18px 46px rgba(32,33,41,.15); }
.create-panel-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 21px; }
.create-panel h2 { margin: 6px 0 0; font-size: 21px; letter-spacing: -.03em; }
.create-panel small { color: #aaaab2; font-size: 10px; }
.create-number { color: var(--lime); font: 800 34px/1 Georgia, serif; font-style: italic; }
.name-form { display: flex; gap: 10px; }
.name-input { min-width: 0; flex: 1; height: 48px; padding: 0 15px; outline: 0; border: 1px solid #464750; border-radius: 11px; color: #fff; background: #2a2b33; font-size: 13px; transition: .2s; }
.name-input::placeholder { color: #777882; }
.name-input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(200,243,93,.1); }
.create-button { height: 48px; padding: 0 19px; border: 0; border-radius: 11px; background: var(--lime); color: #282a20; cursor: pointer; font-size: 12px; font-weight: 800; white-space: nowrap; transition: .18s; }
.create-button:hover { background: #d5ff70; transform: translateY(-1px); }
.create-button:disabled { opacity: .5; cursor: wait; }

.projects-section { margin-top: 26px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.section-head h2 { margin: 6px 0 0; font-size: 25px; letter-spacing: -.04em; }
.section-count { color: var(--muted); font-size: 11px; }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.project-card { position: relative; min-height: 210px; padding: 22px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 8px 28px rgba(43,42,55,.045); cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; overflow: hidden; }
.project-card:hover { transform: translateY(-3px); border-color: #cac7db; box-shadow: var(--shadow); }
.project-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -40px; top: -40px; border-radius: 50%; background: var(--purple-soft); }
.project-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-index { color: var(--subtle); font: italic 700 12px Georgia, serif; }
.project-arrow { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #777681; background: #f2f1f4; font-size: 15px; }
.project-card h3 { margin: 25px 0 8px; max-width: 85%; font-size: 19px; letter-spacing: -.035em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-card > p { margin: 0; color: var(--muted); font-size: 10px; }
.project-bottom { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.project-platforms { display: flex; }
.mini-platform { width: 25px; height: 25px; margin-left: -4px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 8px; color: #fff; font-size: 7px; font-weight: 850; }
.mini-platform:first-child { margin-left: 0; }
.project-publish-progress { width: 145px; text-align: right; }
.project-publish-progress > div:first-child { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; }
.project-publish-progress strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.project-publish-progress small, .project-publish-progress > span { color: var(--subtle); font-size: 8px; }
.project-publish-progress > span { display: block; margin-top: 2px; }
.project-progress-track { height: 4px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: #e9e7ed; }
.project-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), #9b8dff); }
.empty-projects { padding: 62px 25px; border: 1px dashed #d6d4db; border-radius: 18px; text-align: center; color: var(--muted); background: rgba(255,255,255,.38); }
.empty-projects strong { display: block; margin-bottom: 7px; color: var(--ink); font-size: 14px; }
.empty-projects p { margin: 0; font-size: 11px; }

.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 29px; color: var(--muted); font-size: 10px; }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--purple); }
.breadcrumb i { width: 3px; height: 3px; border-radius: 50%; background: #bbb9c0; }
.project-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.project-title-row { display: flex; align-items: center; gap: 10px; }
.project-header h1 { margin: 8px 0 8px; font-size: clamp(34px, 5vw, 52px); letter-spacing: -.055em; line-height: 1.1; }
.edit-name { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted); cursor: pointer; }
.project-subtitle { margin: 0; color: var(--muted); font-size: 11px; }
.header-actions { display: flex; gap: 9px; padding-top: 15px; }
.button { height: 42px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-size: 11px; font-weight: 700; transition: .17s; }
.button:hover:not(:disabled) { transform: translateY(-1px); border-color: #cbc9d1; box-shadow: 0 7px 18px rgba(43,42,55,.08); }
.button:disabled { opacity: .48; cursor: wait; }
.button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.button-primary:hover:not(:disabled) { background: #30313b; }
.button-purple { border-color: var(--purple); background: var(--purple); color: #fff; }

.estimate-panel { margin-bottom: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.estimate-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 15px; }
.estimate-head h2 { margin: 5px 0 0; font-size: 16px; }
.estimate-head p { margin: 0; color: var(--muted); font-size: 9px; }
.estimate-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 120px; gap: 9px; align-items: end; }
.estimate-form label { display: grid; gap: 6px; color: var(--muted); font-size: 9px; }
.estimate-form input { width: 100%; height: 42px; padding: 0 12px; outline: 0; border: 1px solid var(--line); border-radius: 9px; background: #faf9fa; color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; transition: .15s; }
.estimate-form input:focus { border-color: var(--purple); background: #fff; box-shadow: 0 0 0 3px rgba(112,92,246,.08); }
.estimate-save { height: 42px; border: 0; border-radius: 9px; background: var(--purple); color: #fff; cursor: pointer; font-size: 10px; font-weight: 750; }
.estimate-save:hover:not(:disabled) { background: #5e4ce5; }
.estimate-save:disabled { opacity: .5; cursor: wait; }

.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.metric-card { min-width: 0; padding: 19px 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.metric-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.metric-card > strong { display: block; margin: 12px 0 6px; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.metric-card > small { color: var(--subtle); font-size: 9px; }
.metric-main { border-color: #dcd6ff; background: linear-gradient(135deg, #f5f2ff, #fff); }
.metric-main > strong { color: var(--purple); }
.metric-compare { display: flex; justify-content: space-between; gap: 10px; color: #777680; font-size: 9px; font-variant-numeric: tabular-nums; }
.completion-row { min-height: 20px; margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.completion-row small { color: var(--subtle); font-size: 8px; }
.completion-rate { flex: 0 0 auto; color: var(--purple); font-size: 10px; font-variant-numeric: tabular-nums; }
.completion-rate.done { color: var(--green); }
.completion-track { height: 5px; margin-top: 7px; border-radius: 999px; overflow: hidden; background: #eceaf0; }
.completion-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), #9b8dff); transition: width .25s ease; }
.metric-main .completion-track i { background: linear-gradient(90deg, var(--purple), var(--lime)); }
.trend { display: inline-flex; align-items: center; gap: 3px; padding: 3px 6px; border-radius: 999px; font-size: 8px; font-weight: 750; }
.trend-up { color: var(--green); background: #ebf8f2; }
.trend-down { color: #d34556; background: #fff0f2; }
.trend-flat { color: #84838b; background: #f0eff2; }
.trend-na { color: #aaa8ae; background: #f3f2f4; }

.collector { margin-bottom: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 7px 30px rgba(43,42,55,.04); }
.collector-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 14px; }
.collector h2 { margin: 4px 0 0; font-size: 16px; }
.url-count { color: var(--muted); font-size: 10px; }
.url-count strong { color: var(--ink); font-size: 16px; }
.collector-body { display: grid; grid-template-columns: 1fr 132px; gap: 10px; }
.url-input { width: 100%; min-height: 92px; padding: 13px 15px; resize: vertical; outline: 0; border: 1px solid var(--line); border-radius: 11px; background: #faf9fa; color: var(--ink); font-size: 11px; line-height: 1.65; transition: .2s; }
.url-input:focus { border-color: #a99efa; background: #fff; box-shadow: 0 0 0 3px rgba(112,92,246,.08); }
.url-input::placeholder { color: #aaa8ae; }
.collect-button { border: 0; border-radius: 11px; background: var(--lime); color: #2c3023; cursor: pointer; font-size: 12px; font-weight: 800; }
.collect-button:hover:not(:disabled) { background: #d4ff6b; }
.collect-button:disabled { opacity: .45; cursor: wait; }
.file-import-row { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.file-import-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.file-import-button { height: 34px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #5e5d66; cursor: pointer; font-size: 9px; font-weight: 700; transition: .15s; }
.file-import-button:hover { border-color: #bdb8d0; color: var(--purple); background: #fbfaff; }
.file-import-button svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.file-import-input:focus + .file-import-button { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(112,92,246,.08); }
.file-import-input:disabled + .file-import-button { opacity: .45; cursor: wait; }
.file-import-row > span { color: var(--subtle); font-size: 8px; }
.detected-platforms { min-height: 20px; margin-top: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 9px; }
.detected-tag { padding: 4px 7px; border-radius: 6px; background: #f1f0f3; color: #66666e; }
.collector-progress { margin-top: 12px; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.progress-track { height: 4px; margin-top: 7px; border-radius: 999px; background: #ecebef; overflow: hidden; }
.progress-track i { display: block; width: 35%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), #9c8eff); animation: progress-slide 1.1s ease-in-out infinite alternate; }
@keyframes progress-slide { to { transform: translateX(180%); } }

.data-panel { border: 1px solid var(--line); border-radius: 17px; background: var(--panel); overflow: hidden; box-shadow: 0 9px 34px rgba(43,42,55,.045); }
.data-head { padding: 19px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.data-title { display: flex; align-items: baseline; gap: 10px; }
.data-title h2 { margin: 0; font-size: 16px; }
.data-title span { color: var(--muted); font-size: 9px; }
.filter-row { display: flex; gap: 5px; }
.filter-button { padding: 6px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; }
.filter-button.active { color: var(--purple); background: var(--purple-soft); font-weight: 750; }
.table-scroll { overflow: auto; }
table { width: 100%; min-width: 1480px; border-collapse: collapse; table-layout: fixed; }
th { padding: 11px 12px; background: #faf9fa; border-bottom: 1px solid var(--line); color: #8d8d95; text-align: left; font-size: 9px; white-space: nowrap; }
th:nth-child(1) { width: 85px; } th:nth-child(2) { width: 215px; } th:nth-child(3) { width: 125px; }
th:nth-child(4), th:nth-child(5), th:nth-child(6), th:nth-child(7) { width: 78px; } th:nth-child(8) { width: 112px; }
th:nth-child(9) { width: 110px; } th:nth-child(10), th:nth-child(11) { width: 90px; } th:nth-child(12) { width: 47px; }
td { padding: 13px 12px; border-bottom: 1px solid #efedf0; vertical-align: top; font-size: 10px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fdfcfd; }
.platform-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 7px; color: #fff; font-size: 8px; font-weight: 700; white-space: nowrap; }
.content-cell { display: grid; gap: 4px; }
.content-cell strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-cell a { color: var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.content-cell a:hover { color: var(--purple); text-decoration: underline; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.manual-number { width: 100%; height: 31px; padding: 0 8px; border: 1px solid #dedce2; border-radius: 7px; outline: 0; background: #fff; color: var(--ink); text-align: right; font: inherit; font-variant-numeric: tabular-nums; transition: .15s; }
.manual-number:hover { border-color: #c8c4d2; }
.manual-number:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(112,92,246,.08); }
.manual-number:disabled { opacity: .55; cursor: wait; }
.metric-money { font-weight: 700; color: #4d4c55; }
.cell-trend { margin-top: 4px; display: flex; justify-content: flex-end; }
.remove-item { width: 25px; height: 25px; border: 0; border-radius: 7px; color: #aaa8ae; background: transparent; cursor: pointer; }
.remove-item:hover { color: var(--red); background: #fff0f2; }
.failed-row td { background: #fffafb; }
.error-text { color: #b64b5a; line-height: 1.45; }
.empty-data { padding: 62px 20px; text-align: center; color: var(--muted); }
.empty-data-icon { width: 54px; height: 54px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 17px; background: #f1efff; color: var(--purple); font-size: 21px; }
.empty-data strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 13px; }
.empty-data p { margin: 0; font-size: 10px; }

.user-chip { display: grid; gap: 2px; text-align: right; line-height: 1.1; }
.user-chip b { font-size: 11px; }
.user-chip small { color: var(--muted); font-size: 9px; }
.admin-link { color: var(--purple); }
.logout-button { padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); cursor: pointer; font-size: 10px; }
.logout-button:hover { border-color: #c8c4d2; color: var(--ink); }

.login-shell { min-height: calc(100vh - 240px); display: grid; grid-template-columns: 1.05fr .75fr; gap: 80px; align-items: center; }
.login-intro h1 { margin: 15px 0 20px; font-size: clamp(48px, 6vw, 76px); line-height: 1.02; letter-spacing: -.065em; }
.login-intro h1 em { color: var(--purple); font-style: normal; }
.login-intro p { max-width: 590px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.login-platforms { margin-top: 28px; display: flex; gap: 8px; }
.login-card { padding: 34px; display: grid; gap: 18px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.login-card small, .admin-create > div > small { color: var(--purple); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.login-card h2 { margin: 7px 0 5px; font-size: 25px; }
.login-card > div p, .login-help { margin: 0; color: var(--muted); font-size: 10px; }
.login-card label, .admin-create label { display: grid; gap: 7px; }
.login-card label span, .admin-create label span { color: #686972; font-size: 10px; font-weight: 700; }
.login-card input, .admin-create input, .admin-create select { width: 100%; height: 45px; padding: 0 13px; outline: 0; border: 1px solid #dedde2; border-radius: 10px; background: #fff; color: var(--ink); font-size: 12px; }
.login-card input:focus, .admin-create input:focus, .admin-create select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(112,92,246,.08); }
.login-card > button, .admin-create form > button { height: 47px; border: 0; border-radius: 10px; background: var(--ink); color: #fff; cursor: pointer; font-size: 11px; font-weight: 800; }
.login-card > button:hover, .admin-create form > button:hover { background: #33343d; }
.login-card > button:disabled, .admin-create form > button:disabled { opacity: .55; cursor: wait; }
.login-help { text-align: center; }

.ownership-badge, .readonly-title { padding: 5px 8px; border-radius: 999px; font-size: 8px; font-weight: 800; }
.ownership-badge.mine { background: #edf8ce; color: #58730d; }
.ownership-badge.readonly, .readonly-title { background: #f0edff; color: var(--purple); }
.readonly-banner { margin-bottom: 12px; padding: 13px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid #ddd7ff; border-radius: 12px; background: #f6f4ff; color: #6256a3; }
.readonly-banner strong { font-size: 11px; }
.readonly-banner span { font-size: 10px; }
.readonly-value { color: #585962; font-variant-numeric: tabular-nums; }
.estimate-form input:disabled { color: #5f6068; background: #f3f3f2; cursor: not-allowed; }

.admin-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 22px; }
.admin-header h1 { margin: 10px 0 8px; font-size: 43px; letter-spacing: -.055em; }
.admin-header p, .admin-create p { margin: 0; color: var(--muted); font-size: 11px; }
.admin-count { min-width: 90px; color: var(--purple); font-size: 38px; font-weight: 800; line-height: 1; text-align: right; }
.admin-count small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.credential-panel { margin-bottom: 16px; padding: 18px 20px; display: grid; grid-template-columns: 1fr minmax(260px, 1fr) auto; align-items: center; gap: 18px; border: 1px solid #b9de55; border-radius: 14px; background: #f5fddd; }
.credential-panel > div { display: grid; gap: 4px; }
.credential-panel small { color: #6e812e; font-size: 9px; }
.credential-panel strong { font-size: 13px; }
.credential-panel code { padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.8); color: #3f4822; font-size: 11px; line-height: 1.7; word-break: break-all; }
.credential-panel button { padding: 9px 13px; border: 0; border-radius: 8px; background: #52651f; color: #fff; cursor: pointer; font-size: 10px; font-weight: 750; }
.admin-create { margin-bottom: 26px; padding: 24px; display: grid; grid-template-columns: 220px 1fr; gap: 28px; border-radius: 18px; background: var(--ink); color: #fff; }
.admin-create h2 { margin: 7px 0 8px; font-size: 20px; }
.admin-create > div p { color: #aaaab2; line-height: 1.6; }
.admin-create form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.admin-create label span { color: #c7c7cc; }
.admin-create form > button { align-self: end; background: var(--lime); color: #292b20; }
.admin-users { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.user-table-wrap { overflow-x: auto; }
.user-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.user-table th { padding: 10px 9px; border-bottom: 1px solid var(--line); color: var(--subtle); font-size: 8px; text-align: left; white-space: nowrap; }
.user-table td { padding: 13px 9px; border-bottom: 1px solid #efeff0; color: #5f6068; }
.user-table td:first-child { display: grid; gap: 3px; }
.user-table td:first-child strong { color: var(--ink); font-size: 11px; }
.user-table td:first-child small { color: var(--muted); }
.role-badge, .status-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #f0edff; color: var(--purple); font-size: 8px; font-weight: 800; }
.role-select { min-width: 170px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 10px; }
.role-select:disabled { cursor: not-allowed; background: #f4f3f0; color: var(--muted); opacity: .8; }
.status-badge.active { background: #e8f7ef; color: var(--green); }
.status-badge.inactive { background: #f1f1f1; color: #999; }
.user-actions { display: flex; gap: 6px; }
.user-actions button { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #696a73; cursor: pointer; font-size: 8px; white-space: nowrap; }
.user-actions button:disabled { opacity: .35; cursor: not-allowed; }

.toast-region { position: fixed; z-index: 20; right: 22px; bottom: 22px; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: 350px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #56565e; box-shadow: 0 13px 38px rgba(43,42,55,.16); font-size: 11px; animation: toast-in .22s ease both; }
.toast.error { border-color: #ffd0d6; background: #fff8f9; color: #a43c4b; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } }
footer { height: 70px; display: flex; align-items: center; justify-content: center; gap: 8px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 9px; }
footer i { width: 3px; height: 3px; border-radius: 50%; background: #c5c3c8; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; gap: 35px; }
  .login-intro { padding-top: 30px; }
  .admin-create { grid-template-columns: 1fr; }
  .credential-panel { grid-template-columns: 1fr; }
  .home-hero { grid-template-columns: 1fr; gap: 30px; }
  .platform-cloud { grid-template-columns: repeat(5, 1fr); }
  .platform-chip { justify-content: center; }
  .platform-chip:last-child { grid-column: auto; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .estimate-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics-grid { grid-template-columns: repeat(3, 1fr); }
  .project-header { flex-direction: column; }
  .header-actions { padding-top: 0; }
}

@media (max-width: 650px) {
  .topbar, main { width: min(100% - 28px, 1160px); }
  .topbar { height: 70px; }
  main { padding-top: 28px; }
  .local-badge, .user-chip small { display: none; }
  .topbar-meta { gap: 9px; }
  .home-link { font-size: 9px; }
  .login-shell { min-height: auto; }
  .login-intro h1 { font-size: clamp(42px, 13vw, 60px); }
  .login-card { padding: 24px; }
  .admin-header { align-items: flex-start; }
  .admin-header h1 { font-size: 34px; }
  .admin-create form { grid-template-columns: 1fr; }
  .readonly-banner { align-items: flex-start; flex-direction: column; }
  .home-hero { padding: 35px 0 42px; }
  .home-hero h1 { font-size: clamp(42px, 13vw, 60px); }
  .platform-cloud { grid-template-columns: repeat(2, 1fr); }
  .platform-chip:last-child { grid-column: 1 / -1; }
  .projects-grid { grid-template-columns: 1fr; }
  .create-panel { padding: 22px; }
  .name-form { flex-direction: column; }
  .create-button { width: 100%; }
  .project-header h1 { font-size: 38px; }
  .project-header, .section-head { align-items: stretch; }
  .header-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .metrics-grid { gap: 8px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .estimate-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .estimate-form { grid-template-columns: 1fr; }
  .metric-card { padding: 15px; }
  .metric-card > strong { font-size: 22px; }
  .collector-body { grid-template-columns: 1fr; }
  .collect-button { min-height: 43px; }
  .file-import-row { align-items: flex-start; flex-direction: column; }
  .data-head { align-items: flex-start; flex-direction: column; }
  .filter-row { width: 100%; overflow-x: auto; }
}

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