﻿:root {
  --red:#c82c35;
  --red-dark:#9f2630;
  --navy:#0b1f33;
  --navy-2:#143452;
  --teal:#ed1c24;
  --ink:#171717;
  --muted:#707070;
  --line:#e4e4e4;
  --soft:#f5f5f5;
  --ok:#16794b;
  --warn:#9a5d15;
}

* { box-sizing:border-box; }
html,body { margin:0;min-height:100%;font-family:Inter,"PingFang SC","Microsoft YaHei",Arial,sans-serif;color:var(--ink); }
body { background:#f5f5f5; }

.auth-body {
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(0,1.08fr) minmax(420px,.92fr);
  background:radial-gradient(circle at 13% 15%,rgba(237,28,36,.09),transparent 23rem),#fff;
}
.auth-brand {
  padding:8vh 7vw;
  color:#131313;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  position:relative;
  overflow:hidden;
  border-right:1px solid var(--line);
}
.auth-brand:before,.auth-brand:after {
  content:"";
  position:absolute;
  border:1px solid rgba(237,28,36,.13);
  border-radius:50%;
  pointer-events:none;
}
.auth-brand:before { width:460px;height:460px;right:-130px;bottom:-180px; }
.auth-brand:after { width:240px;height:240px;right:80px;bottom:-70px; }
.auth-logo {
  display:block;
  width:min(238px,72%);
  height:auto;
  position:relative;
  z-index:1;
}
.brand-text { position:relative;z-index:1;font-weight:900;font-size:25px;letter-spacing:.04em; }
.brand-text span { color:var(--red); }
.auth-copy { max-width:660px;position:relative;z-index:1; }
.auth-copy .beta { color:var(--red);background:transparent;padding:0;border-radius:0;font-size:12px;letter-spacing:.16em; }
.auth-copy h1 { font-size:clamp(38px,5vw,68px);line-height:1.08;margin:18px 0 22px;letter-spacing:-.04em; }
.auth-copy p { max-width:580px;margin:0;color:#626262;font-size:17px;line-height:1.8; }
.auth-stats { display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:42px;max-width:620px; }
.auth-stats div { padding:16px;border:1px solid var(--line);background:#f6f6f6;border-radius:14px; }
.auth-stats b { display:block;font-size:24px;color:#171717; }
.auth-stats span { font-size:12px;color:#878787; }
.auth-brand>small { position:relative;z-index:1;color:#929292;font-size:11px; }
.auth-side { display:flex;align-items:center;justify-content:center;padding:34px;background:#f6f6f6; }
.auth-card { width:min(440px,100%);background:#fff;border:1px solid var(--line);border-radius:28px;padding:38px;box-shadow:0 28px 70px rgba(0,0,0,.12); }
.auth-card-logo { display:none;width:min(200px,70%);height:auto;margin:0 0 20px; }
.auth-version { display:inline-flex;align-items:center;margin-bottom:18px;padding:7px 10px;border-radius:999px;color:var(--red-dark);background:#fff0f1;font-size:11px;font-weight:900;letter-spacing:.04em; }
.auth-card h1,.auth-card h2 { margin:0 0 8px;font-size:26px; }
.auth-card>p { margin:0 0 28px;color:#6d6d6d;line-height:1.7; }
.beta { display:inline-flex;padding:6px 9px;border-radius:999px;background:#fff0f1;color:var(--red-dark);font-size:11px;font-weight:800; }
.field { margin-top:15px; }
.field label { display:block;margin-bottom:7px;color:#555;font-size:12px;font-weight:800; }
.field input,.field select { width:100%;min-height:44px;border:1px solid #d5d5d5;background:#fff;border-radius:10px;padding:10px 12px;color:var(--ink);font-size:16px;outline:none; }
.field input:focus,.field select:focus { border-color:var(--red);box-shadow:0 0 0 3px rgba(237,28,36,.10); }
.field small { display:block;margin-top:6px;color:#888;font-size:11px;line-height:1.5; }
.btn { display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;border:0;border-radius:10px;background:var(--red);color:#fff;text-decoration:none;font-weight:800;cursor:pointer; }
.btn:hover { background:var(--red-dark); }
.btn.secondary { background:#242424; }
.btn.secondary:hover { background:#343434; }
.btn.ghost { background:#fff;color:#333;border:1px solid #ccc; }
.btn.ghost:hover { background:#f7f7f7; }
.btn.danger { background:#fff;color:#a5232c;border:1px solid #e2bfc2; }
.btn.danger:hover { background:#fff0f1; }
.wide { width:100%;margin-top:22px; }
.links { display:flex;justify-content:space-between;gap:12px;margin-top:18px;font-size:13px; }
.links a { color:var(--red-dark);text-decoration:none;font-weight:700; }
.message { margin:14px 0;padding:11px 12px;border-radius:10px;font-size:13px;line-height:1.55; }
.message:empty { display:none; }
.message.error { background:#fff0f1;color:#97232b;border:1px solid #efc5c8; }
.message.ok { background:#edf8f2;color:#12623d;border:1px solid #bce1cc; }
.small-note { margin-top:16px;color:#888;font-size:11px;line-height:1.6; }

.admin-shell { width:min(1180px,calc(100% - 32px));margin:24px auto 60px; }
.admin-head { display:flex;align-items:center;justify-content:space-between;gap:20px;background:#171717;color:#fff;border-radius:18px;padding:20px 24px; }
.admin-head h1 { margin:0;font-size:22px; }
.admin-head .brand-text span { color:#ef3a43; }
.admin-actions { display:flex;gap:8px;flex-wrap:wrap; }
.panel { margin-top:16px;background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden; }
.panel-head { padding:16px 18px;border-bottom:1px solid var(--line); }
.panel-head h2 { margin:0;font-size:17px; }
.table-wrap { overflow:auto; }
table { width:100%;border-collapse:collapse;min-width:900px; }
th,td { padding:11px 12px;border-bottom:1px solid #ececec;text-align:left;font-size:12px;vertical-align:middle; }
th { background:#eee3e4;color:#4a292c;font-weight:900; }
td small { display:block;margin-top:3px;color:#888; }
.status { display:inline-block;border-radius:999px;padding:4px 8px;font-weight:800; }
.status.Pending { background:#fff2df;color:#8a5412; }
.status.Approved { background:#e9f7ef;color:#176840; }
.status.Rejected { background:#fff0f1;color:#9f2630; }
.status.Disabled { background:#eee;color:#666; }
.row-actions { display:flex;gap:6px;flex-wrap:wrap; }
.mini { min-height:34px;padding:6px 10px;font-size:11px; }
.reset-box { display:grid;grid-template-columns:1fr 1fr auto;gap:10px;padding:16px 18px;align-items:end; }
.reset-box .field { margin:0; }
.profile-edit .panel-head { display:flex;align-items:center;justify-content:space-between;gap:14px; }
.profile-edit .panel-head p { margin:5px 0 0;color:#888;font-size:11px; }
.edit-grid { display:grid;grid-template-columns:.8fr 1fr 1fr 1fr auto;gap:12px;padding:18px;align-items:end; }
.edit-grid .field { margin:0; }
.account-name { min-height:44px;padding:7px 0; }
.account-name span { display:block;color:#777;font-size:11px;margin-bottom:5px; }
.account-name b { font-size:14px; }
.delete-account { border-color:#d7898f!important;color:#8e161e!important; }
.footer-note { color:#888;font-size:11px;margin-top:14px;line-height:1.6; }

@media(max-width:850px) {
  .auth-body { grid-template-columns:1fr;min-height:100vh;min-height:100svh;min-height:100dvh;background:#fff; }
  .auth-brand { display:none; }
  .auth-side { min-height:100vh;min-height:100svh;min-height:100dvh;padding:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));background:#fff; }
  .auth-card { padding:28px 22px;border:1px solid var(--line);border-radius:22px;box-shadow:0 18px 55px rgba(0,0,0,.10); }
  .auth-card-logo { display:block; }
  .auth-card>.brand-text { margin-bottom:18px; }
  .reset-box { grid-template-columns:1fr; }
  .edit-grid { grid-template-columns:1fr; }
  .admin-head { align-items:flex-start;flex-direction:column; }
  .admin-shell { width:min(100% - 20px,1180px);margin-top:10px; }
}

@media(max-width:430px) {
  .auth-card { width:100%;box-shadow:0 15px 45px rgba(0,0,0,.09); }
  .links { flex-direction:column; }
}

/* 华蓄内部工具平台 v1.0.0 */
.portal-body { min-height:100vh;background:radial-gradient(circle at 88% 0,rgba(237,28,36,.07),transparent 30rem),#f5f5f5; }
.portal-nav { position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:14px;min-height:70px;padding:10px max(24px,calc((100vw - 1480px)/2));background:rgba(255,255,255,.94);border-bottom:1px solid #e5e5e5;backdrop-filter:blur(16px); }
.portal-brand { display:flex;align-items:center;gap:13px;color:#171717;text-decoration:none;white-space:nowrap; }
.portal-brand img { width:142px;height:auto;display:block; }
.portal-brand span { padding-left:13px;border-left:1px solid #d8d8d8;font-size:14px;font-weight:900; }
.portal-brand em { padding:4px 7px;border-radius:999px;background:#fff0f1;color:#b51d25;font-size:10px;font-style:normal;font-weight:900; }
.portal-nav-spacer { flex:1; }
.portal-identity { display:flex;align-items:flex-end;flex-direction:column;line-height:1.2; }
.portal-identity b { font-size:13px; }.portal-identity span { margin-top:3px;color:#888;font-size:10px; }
.portal-nav-link { display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:7px 11px;border:1px solid #d7d7d7;border-radius:9px;color:#333;text-decoration:none;font-size:12px;font-weight:800; }
.portal-nav-link:hover { border-color:#ed1c24;color:#b91820;background:#fff8f8; }
.nav-badge { padding:2px 6px;border-radius:99px;background:#ed1c24;color:#fff;font-size:9px; }
.portal-shell { width:min(1480px,calc(100% - 48px));margin:0 auto;padding:52px 0 28px; }
.portal-hero { display:flex;align-items:flex-end;justify-content:space-between;gap:30px;margin-bottom:30px; }
.portal-kicker { color:#ed1c24;font-size:11px;font-weight:900;letter-spacing:.18em; }
.portal-hero h1 { margin:10px 0 9px;font-size:clamp(32px,4.3vw,58px);line-height:1.08;letter-spacing:-.045em; }
.portal-hero p { margin:0;color:#666;font-size:15px;line-height:1.75; }
.portal-port { min-width:148px;padding:18px 20px;border:1px solid #ddd;border-radius:18px;background:#fff;text-align:right;box-shadow:0 12px 34px rgba(0,0,0,.05); }
.portal-port span { display:block;color:#888;font-size:10px; }.portal-port b { display:block;margin-top:4px;color:#ed1c24;font-size:32px;letter-spacing:-.04em; }
.module-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px; }
.module-card { position:relative;display:flex;min-height:330px;padding:24px;border:1px solid #e0e0e0;border-radius:22px;background:#fff;color:#171717;text-decoration:none;flex-direction:column;overflow:hidden;box-shadow:0 12px 36px rgba(0,0,0,.055);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
a.module-card:hover { transform:translateY(-4px);border-color:#c9c9c9;box-shadow:0 20px 50px rgba(0,0,0,.09); }
.module-card:after { content:"";position:absolute;right:-60px;bottom:-80px;width:190px;height:190px;border-radius:50%;background:radial-gradient(circle,rgba(237,28,36,.10),transparent 68%);pointer-events:none; }
.module-top { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:28px; }
.module-icon { display:grid;width:48px;height:48px;place-items:center;border-radius:14px;background:var(--accent);color:#fff;font-size:23px;font-weight:900;box-shadow:0 10px 24px color-mix(in srgb,var(--accent),transparent 72%); }
.module-version { padding:5px 8px;border-radius:99px;background:#f3f3f3;color:#777;font-size:10px;font-weight:800; }
.module-warning .module-version { background:#fff2df;color:#8a5412; }
.module-category { color:#ed1c24;font-size:10px;font-weight:900;letter-spacing:.13em;text-transform:uppercase; }
.module-card h2 { margin:10px 0 12px;font-size:24px;line-height:1.25;letter-spacing:-.025em; }
.module-card p { margin:0;color:#696969;font-size:13px;line-height:1.75; }
.module-enter { display:flex;align-items:center;justify-content:space-between;margin-top:auto;padding-top:28px;color:#171717;font-size:13px;font-weight:900; }
.module-enter span { color:#ed1c24;font-size:20px; }.module-enter.muted { color:#999; }
.future-card { border-style:dashed;background:rgba(255,255,255,.56);box-shadow:none; }
.future-plus { display:grid;width:48px;height:48px;margin-bottom:28px;place-items:center;border:1px dashed #bbb;border-radius:14px;color:#999;font-size:25px; }
.no-access { grid-column:1/-1;padding:24px;border:1px solid #edc5c8;border-radius:16px;background:#fff0f1;color:#8f2229; }
.no-access p { margin:7px 0 0;color:#9a4d52; }
.portal-footer { display:flex;justify-content:space-between;gap:20px;margin-top:28px;padding-top:18px;border-top:1px solid #ddd;color:#888;font-size:11px; }

.tool-host-body { width:100%;height:100vh;height:100dvh;overflow:hidden;background:#fff; }
.tool-host-bar { position:relative;z-index:10;display:flex;align-items:center;gap:10px;height:48px;padding:0 14px;background:#171717;color:#fff;border-bottom:3px solid #ed1c24;box-shadow:0 4px 16px rgba(0,0,0,.18); }
.tool-back,.tool-host-link { display:inline-flex;align-items:center;height:30px;padding:0 9px;border:1px solid #4d4d4d;border-radius:7px;color:#fff;text-decoration:none;font-size:11px;font-weight:800;white-space:nowrap; }
.tool-back:hover,.tool-host-link:hover { border-color:#ed1c24;background:#292929; }
.tool-divider { width:1px;height:20px;background:#555; }
.tool-host-title { display:flex;align-items:baseline;gap:8px;min-width:0; }.tool-host-title b { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px; }.tool-host-title span { color:#aaa;font-size:10px;white-space:nowrap; }
.tool-host-spacer { flex:1; }.tool-host-user { color:#ccc;font-size:11px;white-space:nowrap; }
.tool-host-frame { display:block;width:100%;height:calc(100% - 48px);border:0;background:#fff; }

.portal-admin { width:min(1480px,calc(100% - 32px)); }
.admin-logo { display:block;width:145px;height:auto;filter:brightness(0) invert(1);margin-bottom:10px; }
.portal-admin table { min-width:1160px; }
.permission-text { font-weight:800;color:#464646;white-space:nowrap; }
.portal-edit-grid { grid-template-columns:.65fr 1fr 1fr .8fr .9fr;align-items:end; }
.permission-picker { grid-column:1/-1;display:grid;grid-template-columns:auto repeat(2,minmax(210px,1fr));gap:10px;align-items:stretch;padding-top:4px; }
.permission-picker>span { align-self:center;color:#555;font-size:12px;font-weight:900; }
.permission-picker label { position:relative;display:grid;grid-template-columns:22px 1fr;grid-template-rows:auto auto;column-gap:8px;padding:12px;border:1px solid #d9d9d9;border-radius:11px;background:#fafafa;cursor:pointer; }
.permission-picker input { grid-row:1/3;width:18px;height:18px;margin:2px 0 0;accent-color:#ed1c24; }
.permission-picker i { font-size:13px;font-style:normal;font-weight:900; }.permission-picker small { margin-top:3px;color:#888;font-size:10px; }
.permission-picker em { grid-column:2/-1;color:#8a5b12;font-size:11px;font-style:normal; }
.save-user { grid-column:1/-1;justify-self:end; }

@media(max-width:980px) {
  .module-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .portal-edit-grid { grid-template-columns:1fr 1fr; }
  .permission-picker,.save-user { grid-column:1/-1; }
}

@media(max-width:680px) {
  .portal-nav { min-height:60px;padding:9px 12px;gap:8px; }
  .portal-brand img { width:112px; }.portal-brand span,.portal-brand em,.portal-identity,.portal-nav-link .nav-badge { display:none; }
  .portal-nav-link { min-height:34px;padding:6px 8px;font-size:11px; }
  .portal-shell { width:min(100% - 24px,1480px);padding-top:30px; }
  .portal-hero { align-items:flex-start;flex-direction:column; }.portal-port { min-width:0;width:100%;text-align:left; }.portal-port b { font-size:26px; }
  .module-grid { grid-template-columns:1fr; }.module-card { min-height:288px; }
  .portal-footer { flex-direction:column;gap:6px; }
  .tool-host-bar { height:44px;padding:0 8px;gap:7px; }.tool-divider,.tool-host-user,.tool-host-title span { display:none; }.tool-host-title b { max-width:130px;font-size:11px; }.tool-host-link { padding:0 7px; }.tool-host-frame { height:calc(100% - 44px); }
  .portal-edit-grid,.permission-picker { grid-template-columns:1fr; }.permission-picker>span,.permission-picker label,.permission-picker em { grid-column:1; }.save-user { width:100%; }
}

@media print {
  .tool-host-bar { display:none; }.tool-host-frame { height:100%; }
}
