:root {
  --portal-bg-1: #fffdf9;
  --portal-bg-2: #fff4f7;
  --portal-bg-3: #faf5ff;
  --portal-ink: #40343b;
  --portal-muted: #8a747d;
  --portal-soft: #a39299;
  --portal-line: rgba(239, 224, 231, .94);
  --portal-card: rgba(255, 255, 255, .82);
  --portal-pink: #ef7fa3;
  --portal-pink-deep: #e76892;
  --portal-peach: #f3aa82;
  --portal-gold: #e5b768;
  --portal-violet: #a497e4;
  --portal-mint: #72c4b6;
  --portal-bad: #b75d68;
  --portal-good: #4f9d88;
  --portal-shadow: 0 16px 38px rgba(211, 158, 179, .12);
  --portal-radius-xl: 28px;
  --portal-radius-lg: 22px;
  --portal-radius-md: 16px;
}

* { box-sizing: border-box; }

body.portal-ui,
body.login-ui,
body.portal-admin,
body.report-view-ui {
  min-height: 100vh;
  margin: 0;
  color: var(--portal-ink);
  background:
    radial-gradient(circle at 10% -3%, rgba(255, 221, 232, .52), transparent 28%),
    radial-gradient(circle at 93% 1%, rgba(255, 237, 209, .46), transparent 27%),
    radial-gradient(circle at 96% 62%, rgba(234, 224, 255, .36), transparent 25%),
    linear-gradient(135deg, var(--portal-bg-1), var(--portal-bg-2) 52%, var(--portal-bg-3));
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body.portal-ui a,
body.login-ui a,
body.portal-admin a,
body.report-view-ui a { color: inherit; }

.portal-shell { width: min(100% - 36px, 860px); margin: 0 auto; padding: 26px 0 46px; }
.portal-topbar,
.report-toolbar,
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.portal-brand { display: inline-flex; align-items: center; gap: 10px; color: #41353d; font-weight: 900; text-decoration: none; letter-spacing: .02em; }
.brand-orb { position: relative; width: 33px; height: 33px; border-radius: 12px 15px 13px 16px; background: linear-gradient(135deg, #f8a8bd, #f5c48e); box-shadow: 0 8px 15px rgba(239, 127, 163, .18); }
.brand-orb::before { position: absolute; top: 7px; left: 8px; width: 12px; height: 7px; border-radius: 999px; background: rgba(255,255,255,.68); content: ""; transform: rotate(-22deg); }
.portal-brand small { display: block; margin-top: 3px; color: var(--portal-muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.top-link { padding: 9px 13px; border: 1px solid rgba(239, 127, 163, .18); border-radius: 999px; background: rgba(255,255,255,.62); color: var(--portal-pink-deep) !important; font-size: 12px; font-weight: 800; text-decoration: none; }
.top-link:hover { background: #fff; }

.portal-hero { position: relative; margin-top: 24px; padding: 42px 38px 36px; overflow: hidden; border: 1px solid rgba(255,255,255,.94); border-radius: var(--portal-radius-xl); background: linear-gradient(135deg, rgba(255,246,249,.96), rgba(255,243,231,.94) 57%, rgba(250,247,255,.93)); box-shadow: var(--portal-shadow); }
.portal-hero::after { position: absolute; right: -28px; bottom: -60px; width: 200px; height: 200px; border: 1px solid rgba(229, 183, 104, .16); border-radius: 50%; box-shadow: 0 0 0 22px rgba(229, 183, 104, .06), 0 0 0 44px rgba(229, 183, 104, .04); content: ""; }
.eyebrow { display: inline-flex; flex-direction: column; gap: 7px; margin-bottom: 13px; color: var(--portal-pink-deep); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.eyebrow::after { width: 36px; height: 3px; border-radius: 999px; background: linear-gradient(90deg, var(--portal-pink), #f6b882); content: ""; }
.portal-hero h1 { position: relative; z-index: 1; max-width: 540px; margin: 0; color: #4a3737; font-size: clamp(32px, 6vw, 52px); line-height: 1.12; letter-spacing: -.04em; }
.portal-hero p { position: relative; z-index: 1; max-width: 560px; margin: 16px 0 0; color: #9a7670; font-size: 14px; line-height: 1.8; }
.hero-spark { position: absolute; top: 43px; right: 115px; width: 66px; height: 66px; border-radius: 52% 48% 55% 45%; background: radial-gradient(circle at 35% 27%, #ffe1e9, #f58aaa 78%, rgba(255,255,255,.12)); box-shadow: 0 14px 26px rgba(215, 162, 180, .12); transform: rotate(17deg); }
.hero-spark::after { position: absolute; top: 12px; left: 14px; width: 20px; height: 9px; border-radius: 999px; background: rgba(255,255,255,.65); content: ""; transform: rotate(-20deg); }
.hero-dot { position: absolute; top: 91px; right: 72px; width: 33px; height: 33px; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #ffe9d4, #f3ad7e 78%); }
.hero-ring { position: absolute; right: 50px; bottom: 42px; width: 24px; height: 24px; border: 6px solid rgba(164, 151, 228, .7); border-radius: 50%; }

.portal-section-head { margin: 30px 2px 14px; }
.portal-section-head h2 { margin: 0; color: #4a3737; font-size: 19px; }
.portal-section-head p { margin: 5px 0 0; color: var(--portal-soft); font-size: 12px; }
.entry-stack { display: grid; gap: 13px; }
.entry-card { position: relative; display: grid; grid-template-columns: 57px 1fr auto; align-items: center; gap: 15px; min-height: 112px; padding: 18px 21px; overflow: hidden; border: 1px solid rgba(255,255,255,.96); border-radius: var(--portal-radius-lg); background: var(--portal-card); box-shadow: 0 13px 30px rgba(211,158,179,.09); text-decoration: none; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.entry-card::before { position: absolute; top: -38px; right: 68px; width: 116px; height: 116px; border-radius: 50%; background: var(--entry-glow, rgba(239,127,163,.12)); content: ""; }
.entry-card:hover { border-color: rgba(239,127,163,.28); box-shadow: 0 18px 36px rgba(211,158,179,.17); transform: translateY(-2px); }
.entry-card:focus-visible { outline: 3px solid rgba(239,127,163,.35); outline-offset: 3px; }
.entry-number { position: relative; z-index: 1; display: grid; width: 48px; height: 48px; place-items: center; border-radius: 17px; background: var(--entry-icon-bg, #fff0f4); color: var(--entry-accent, var(--portal-pink-deep)); font-size: 13px; font-weight: 900; }
.entry-card:nth-child(2) { --entry-accent: #b3873e; --entry-icon-bg: #fff7e7; --entry-glow: rgba(229,183,104,.14); }
.entry-card:nth-child(3) { --entry-accent: #7c6bc1; --entry-icon-bg: #f0edff; --entry-glow: rgba(164,151,228,.15); }
.entry-card:nth-child(4) { --entry-accent: #4f9d88; --entry-icon-bg: #eaf8f3; --entry-glow: rgba(114,196,182,.16); }
.entry-copy { position: relative; z-index: 1; min-width: 0; }
.entry-copy strong { display: block; color: #44383f; font-size: 18px; line-height: 1.35; }
.entry-copy span { display: block; margin-top: 7px; color: var(--portal-muted); font-size: 12px; }
.entry-arrow { position: relative; z-index: 1; display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid var(--portal-line); border-radius: 50%; color: var(--entry-accent, var(--portal-pink-deep)); font-size: 18px; transition: transform .22s ease; }
.entry-card:hover .entry-arrow { transform: translateX(3px); }
.portal-note { margin-top: 18px; padding: 15px 17px; border: 1px solid rgba(239,224,231,.8); border-radius: 18px; background: rgba(255,255,255,.5); color: var(--portal-muted); font-size: 11px; line-height: 1.7; }
.portal-footer { margin-top: 24px; color: var(--portal-soft); font-size: 10px; text-align: center; }

.user-top-actions { display: flex; align-items: center; gap: 10px; }
.user-welcome { color: var(--portal-muted); font-size: 12px; }
.user-entry-card { width: 100%; color: var(--portal-ink); text-align: left; font: inherit; cursor: pointer; }
.user-entry-card .entry-copy span { line-height: 1.55; }
.user-entry-card .entry-status { color: var(--portal-good); font-weight: 800; }
.user-entry-card.is-disabled .entry-status { color: var(--portal-bad); }
.user-entry-card.is-disabled { background: rgba(255,255,255,.66); }
.user-entry-card.is-disabled:hover { border-color: rgba(239,127,163,.28); }
.user-message { position: relative; margin-top: 16px; padding: 16px 18px; border: 1px solid rgba(239,127,163,.25); border-radius: 17px; background: linear-gradient(135deg, rgba(255,247,250,.97), rgba(255,251,241,.94)); color: #765b65; font-size: 12px; line-height: 1.8; box-shadow: 0 12px 24px rgba(211,158,179,.08); }
.user-message strong { display: block; margin-bottom: 4px; color: #a9536e; font-size: 13px; }
.user-message[hidden] { display: none; }
.user-home-note { margin-top: 19px; }

/* Exact login treatment from 02.学习综合能力交互测评/public/login.html. */
body.login-ui { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; overflow-x: hidden; }
body.login-ui main { position: relative; width: 100%; max-width: 420px; min-width: 0; overflow: hidden; padding: 30px 26px; border: 1px solid rgba(255,255,255,.94); border-radius: var(--portal-radius-xl); background: rgba(255,255,255,.82); box-shadow: var(--portal-shadow); }
body.login-ui h1 { color: #3b3137; letter-spacing: 0; }
body.login-ui input { width: 100%; border: 1px solid var(--portal-line); border-radius: 14px; background: rgba(255,255,255,.86); color: var(--portal-ink); padding: 13px 14px; font: inherit; outline: none; }
body.login-ui input:focus { border-color: rgba(239,127,163,.65); box-shadow: 0 0 0 4px rgba(239,127,163,.11); }
body.login-ui .login-mark { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
body.login-ui .login-mark i { width: 34px; height: 34px; border-radius: 12px; background: linear-gradient(135deg, #f6a1ba, #f3b081); box-shadow: 0 10px 18px rgba(239,127,163,.18); }
body.login-ui button { width: 100%; margin-top: 14px; padding: 13px; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--portal-pink), var(--portal-peach)); color: #fff; font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 13px 25px rgba(239,127,163,.18); }
body.login-ui button:disabled { cursor: wait; opacity: .62; }
body.login-ui .login-lead { margin: 0 0 20px; color: var(--portal-muted); font-size: 13px; line-height: 1.65; }
body.login-ui label { display: grid; gap: 7px; margin: 13px 0; color: #574b51; font-size: 13px; font-weight: 800; }
.login-msg { min-height: 21px; margin-top: 11px; color: var(--portal-bad); font-size: 12px; }
.login-links { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 12px; color: var(--portal-pink-deep); font-size: 12px; font-weight: 800; }
.login-links a { padding: 10px; border: 1px solid var(--portal-line); border-radius: 14px; background: rgba(255,248,251,.74); color: var(--portal-pink-deep); text-align: center; text-decoration: none; }
.login-links a:hover { background: #fff; }
.login-boundary { margin: 18px 0 0; color: var(--portal-soft); font-size: 10px; line-height: 1.7; text-align: center; }

body.portal-admin { padding: 24px; }
.admin-shell { width: min(100%, 1120px); margin: 0 auto; }
.admin-topbar { margin: 0 auto 20px; }
.admin-top-actions { display: flex; align-items: center; gap: 9px; }
.admin-user { color: var(--portal-muted); font-size: 11px; }
.admin-button, .admin-link { padding: 9px 13px; border: 1px solid rgba(239,127,163,.22); border-radius: 999px; background: rgba(255,248,251,.72); color: var(--portal-pink-deep); font: inherit; font-size: 11px; font-weight: 900; text-decoration: none; cursor: pointer; }
.admin-button.primary { border: 0; background: linear-gradient(135deg, var(--portal-pink), var(--portal-peach)); color: #fff; box-shadow: 0 10px 18px rgba(239,127,163,.16); }
.admin-button.danger { color: #ad5663; }
.admin-hero { padding: 27px 29px; border: 1px solid rgba(255,255,255,.95); border-radius: var(--portal-radius-lg); background: linear-gradient(135deg, rgba(255,246,249,.94), rgba(255,243,232,.92)); box-shadow: var(--portal-shadow); }
.admin-hero h1 { margin: 0; color: #40343b; font-size: 28px; }
.admin-hero p { margin: 8px 0 0; color: var(--portal-muted); font-size: 13px; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-top: 18px; }
.admin-stat { padding: 14px 16px; border: 1px solid var(--portal-line); border-radius: 17px; background: rgba(255,255,255,.61); }
.admin-stat strong { display: block; color: #4a3d45; font-size: 23px; }
.admin-stat span { display: block; margin-top: 4px; color: var(--portal-muted); font-size: 11px; }
.admin-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 14px; margin-top: 14px; }
.admin-panel { padding: 21px; border: 1px solid rgba(255,255,255,.95); border-radius: var(--portal-radius-lg); background: rgba(255,255,255,.77); box-shadow: 0 13px 28px rgba(211,158,179,.08); }
.admin-panel.full { margin-top: 14px; }
.admin-panel h2 { margin: 0; color: #493d44; font-size: 18px; }
.admin-panel > p { margin: 7px 0 16px; color: var(--portal-muted); font-size: 11px; line-height: 1.65; }
.admin-form { display: grid; gap: 12px; }
.admin-form label { display: grid; gap: 6px; color: #5a4d55; font-size: 11px; font-weight: 900; }
.admin-form input, .admin-form select { width: 100%; padding: 11px 12px; border: 1px solid var(--portal-line); border-radius: 12px; outline: none; background: rgba(255,255,255,.7); color: var(--portal-ink); font: inherit; font-size: 12px; }
.admin-form input:focus, .admin-form select:focus { border-color: rgba(239,127,163,.65); box-shadow: 0 0 0 4px rgba(239,127,163,.1); }
.admin-form input[type=file] { padding: 9px; }
.admin-form button { justify-self: start; }
.admin-message { min-height: 18px; margin-top: 10px; color: var(--portal-bad); font-size: 11px; }
.admin-message.good { color: var(--portal-good); }
.security-note { margin-top: 13px; padding: 11px 12px; border-left: 3px solid var(--portal-violet); border-radius: 10px; background: #f5f2ff; color: #746a91; font-size: 10px; line-height: 1.65; }
.table-wrap { overflow-x: auto; }
.user-directory-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-top: 16px; }
.user-search { display: grid; gap: 6px; width: min(100%, 320px); color: #5a4d55; font-size: 11px; font-weight: 900; }
.user-search input { width: 100%; padding: 10px 12px; border: 1px solid var(--portal-line); border-radius: 12px; outline: none; background: rgba(255,255,255,.7); color: var(--portal-ink); font: inherit; font-size: 12px; }
.user-search input:focus { border-color: rgba(239,127,163,.65); box-shadow: 0 0 0 4px rgba(239,127,163,.1); }
.user-search-count { padding-bottom: 10px; color: var(--portal-soft); font-size: 10px; white-space: nowrap; }
.user-table-wrap { max-height: min(58vh, 430px); overflow: auto; border: 1px solid var(--portal-line); border-radius: var(--portal-radius-lg); overscroll-behavior: contain; }
.user-table { min-width: 790px; }
.user-table thead th { position: sticky; top: 0; z-index: 2; background: #fff8fb; box-shadow: 0 1px 0 var(--portal-line); }
.customer-management-panel { margin-top: 14px; }
.customer-management-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 390px); align-items: start; gap: 24px; }
.customer-management-head > div { min-width: 0; }
.customer-create-form { grid-template-columns: 1fr 1fr auto; align-items: end; gap: 9px; }
.customer-create-form label { min-width: 0; }
.customer-create-form button { white-space: nowrap; }
.customer-detail { margin-top: 18px; padding: 19px; border: 1px solid rgba(239,127,163,.26); border-radius: var(--portal-radius-lg); background: linear-gradient(135deg, rgba(255,248,251,.98), rgba(255,252,245,.95)); }
.customer-detail[hidden] { display: none; }
.customer-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.customer-detail-head h3 { margin: 0; color: #493d44; font-size: 19px; }
.customer-detail-head h3 span { color: var(--portal-pink-deep); }
.customer-detail-head p { margin: 6px 0 0; color: var(--portal-muted); font-size: 11px; }
.customer-permission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-top: 17px; }
.customer-permission-card { display: grid; align-content: start; gap: 11px; min-width: 0; padding: 14px; border: 1px solid var(--portal-line); border-radius: 16px; background: rgba(255,255,255,.78); }
.customer-permission-title { display: flex; align-items: center; gap: 10px; min-height: 38px; }
.customer-permission-title > div { min-width: 0; }
.customer-permission-title strong { display: block; color: #44383f; font-size: 13px; }
.customer-permission-title small { display: block; margin-top: 4px; color: var(--portal-muted); font-size: 10px; line-height: 1.4; }
.customer-permission-number { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: #fff0f4; color: var(--portal-pink-deep); font-size: 11px; font-weight: 900; }
.customer-permission-card:nth-child(2) .customer-permission-number { background: #fff7e7; color: #b3873e; }
.customer-permission-card:nth-child(3) .customer-permission-number { background: #f0edff; color: #7c6bc1; }
.permission-switch { display: flex; align-items: center; gap: 7px; color: var(--portal-pink-deep); font-size: 11px; font-weight: 900; cursor: pointer; }
.permission-switch input { width: 16px; height: 16px; accent-color: var(--portal-pink); }
.customer-permission-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--portal-line); }
.customer-permission-stat strong { color: #4a3d45; font-size: 15px; }
.customer-permission-stat span { color: var(--portal-soft); font-size: 10px; text-align: right; }
.customer-permission-card .admin-button { justify-self: start; }
.customer-detail-field { display: grid; gap: 5px; color: #5a4d55; font-size: 10px; font-weight: 900; }
.customer-detail-field select, .customer-detail-field input { width: 100%; padding: 8px 9px; border: 1px solid var(--portal-line); border-radius: 10px; outline: none; background: rgba(255,255,255,.82); color: var(--portal-ink); font: inherit; font-size: 11px; }
.customer-detail-field select:focus, .customer-detail-field input:focus { border-color: rgba(239,127,163,.65); box-shadow: 0 0 0 4px rgba(239,127,163,.1); }
.customer-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--portal-line); }
.user-table tr.is-selected td { background: #fff1f5; }
.user-name-button { padding: 0; border: 0; background: transparent; color: var(--portal-pink-deep); font: inherit; font-size: 11px; font-weight: 900; cursor: pointer; }
.user-name-button:hover { text-decoration: underline; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 11px 8px; border-bottom: 1px solid var(--portal-line); text-align: left; vertical-align: middle; }
.admin-table th { color: var(--portal-soft); font-size: 10px; font-weight: 900; white-space: nowrap; }
.admin-table td { color: #5a4d55; font-size: 11px; }
.admin-table td strong { color: #44383f; }
.admin-table .row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-table .admin-button { padding: 6px 9px; font-size: 10px; }
.focus-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.focus-panel-head > div { min-width: 0; }
.focus-plan-table { min-width: 930px; }
.focus-plan-table select, .focus-plan-table input[type=date] { width: 132px; padding: 8px 9px; border: 1px solid var(--portal-line); border-radius: 10px; outline: none; background: rgba(255,255,255,.82); color: var(--portal-ink); font: inherit; font-size: 11px; }
.focus-plan-table input[type=date] { width: 142px; }
.focus-plan-table select:focus, .focus-plan-table input[type=date]:focus { border-color: rgba(239,127,163,.65); box-shadow: 0 0 0 4px rgba(239,127,163,.1); }
.focus-plan-table select:disabled, .focus-plan-table input[type=date]:disabled { cursor: not-allowed; opacity: .52; }
.focus-member-meta { display: block; margin-top: 4px; color: var(--portal-soft); font-size: 10px; font-weight: 400; }
.focus-daily-rule { color: var(--portal-muted); font-size: 10px; line-height: 1.65; white-space: nowrap; }
.focus-test-actions { flex-wrap: nowrap !important; }
.focus-test-actions .admin-button { white-space: nowrap; }
.focus-plan-note { margin-top: 16px; }
.status-on { color: var(--portal-good) !important; font-weight: 900; }
.status-off { color: var(--portal-bad) !important; font-weight: 900; }
.empty-row { padding: 24px !important; color: var(--portal-soft) !important; text-align: center !important; }
.admin-footnote { margin: 18px 0 0; color: var(--portal-soft); font-size: 10px; line-height: 1.7; }
.admin-dialog[hidden] { display: none; }
.admin-dialog { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; }
.admin-dialog-backdrop { position: absolute; inset: 0; background: rgba(64,52,59,.28); backdrop-filter: blur(4px); }
.admin-dialog-panel { position: relative; z-index: 1; width: min(100%, 430px); padding: 25px; border: 1px solid rgba(255,255,255,.96); border-radius: 23px; background: #fffafd; box-shadow: 0 24px 65px rgba(104,65,84,.22); }
.admin-dialog-panel h2 { margin: 0; color: #493d44; font-size: 20px; }
.admin-dialog-panel > p { margin: 8px 0 16px; color: var(--portal-muted); font-size: 12px; line-height: 1.7; }
.admin-dialog-panel > p strong { color: var(--portal-pink-deep); }
.admin-dialog-panel .admin-form { gap: 10px; }
.admin-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 3px; }

/* Outer report shell follows the V1.2 client-report pink dashboard language. */
body.report-view-ui { padding: 18px; overflow: hidden; }
.report-shell { display: flex; min-height: calc(100vh - 36px); flex-direction: column; width: min(100%, 1220px); margin: 0 auto; }
.report-toolbar { flex: 0 0 auto; margin-bottom: 14px; padding: 24px; border: 1px solid rgba(255,255,255,.94); border-radius: var(--portal-radius-xl); background: linear-gradient(135deg, #fff4f7, #fff1e8 58%, #fffbed); box-shadow: var(--portal-shadow); }
.report-title-block { min-width: 0; }
.report-title-block .eyebrow { margin-bottom: 5px; }
.report-title-block h1 { overflow: hidden; margin: 0; color: #4a3737; font-size: 25px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.report-meta { margin-top: 6px; color: var(--portal-muted); font-size: 11px; }
.report-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.report-frame-wrap { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.94); border-radius: var(--portal-radius-lg); background: rgba(255,255,255,.78); box-shadow: var(--portal-shadow); }
.report-frame { display: block; width: 100%; height: 100%; min-height: calc(100vh - 150px); border: 0; background: #fff8f9; }
.report-watermark { position: absolute; right: 22px; bottom: 18px; z-index: 2; padding: 6px 9px; border: 1px solid rgba(239,127,163,.2); border-radius: 999px; background: rgba(255,255,255,.76); color: rgba(154,118,112,.66); font-size: 9px; pointer-events: none; user-select: none; }
.report-empty { display: grid; min-height: calc(100vh - 150px); place-items: center; padding: 30px; text-align: center; }
.report-empty strong { display: block; color: #44383f; font-size: 19px; }
.report-empty p { margin: 8px 0 0; color: var(--portal-muted); font-size: 12px; }
.report-empty .admin-link { display: inline-block; margin-top: 16px; }
.report-dashboard { display: grid; gap: 14px; }
.report-list-panel, .report-viewer-panel { padding: 25px; border: 1px solid rgba(255,255,255,.94); border-radius: var(--portal-radius-lg); background: rgba(255,255,255,.78); box-shadow: var(--portal-shadow); }
.report-section-head, .report-viewer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.report-section-head h2, .report-viewer-head h2 { margin: 0; color: #493d44; font-size: 22px; }
.report-section-head p { margin: 7px 0 0; color: var(--portal-muted); font-size: 12px; }
.report-count { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--portal-line); border-radius: 999px; background: #fff8fb; color: var(--portal-pink-deep); font-size: 11px; font-weight: 900; }
.report-list { display: grid; gap: 11px; margin-top: 20px; }
.report-card { display: grid; grid-template-columns: 44px 1fr 31px; align-items: center; gap: 13px; width: 100%; padding: 16px; border: 1px solid var(--portal-line); border-radius: 17px; background: rgba(255,255,255,.7); color: var(--portal-ink); text-align: left; font: inherit; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.report-card:hover { border-color: rgba(239,127,163,.36); box-shadow: 0 14px 28px rgba(211,158,179,.14); transform: translateY(-2px); }
.report-card:focus-visible { outline: 3px solid rgba(239,127,163,.3); outline-offset: 3px; }
.report-card-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; background: linear-gradient(135deg, #fff0f4, #fff4e9); color: var(--portal-pink-deep); font-size: 18px; }
.report-card-copy { min-width: 0; }
.report-card-copy strong { display: block; overflow: hidden; color: #44383f; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.report-card-copy span { display: block; margin-top: 5px; color: var(--portal-muted); font-size: 11px; }
.report-card-arrow { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid var(--portal-line); border-radius: 50%; color: var(--portal-pink-deep); }
.report-empty-inline { padding: 28px 12px 12px; color: var(--portal-muted); font-size: 12px; text-align: center; }
.report-empty-inline strong { display: block; color: #44383f; font-size: 17px; }
.report-empty-inline p { margin: 7px 0 0; color: var(--portal-muted); font-size: 12px; }
.report-viewer-head { align-items: center; margin-bottom: 16px; }
.report-viewer-head .eyebrow { margin-bottom: 5px; }
.report-viewer-head .admin-button { flex: 0 0 auto; }
.report-viewer-panel .report-frame-wrap { min-height: calc(100vh - 235px); }
.module-kicker { margin-bottom: 7px; color: var(--portal-pink-deep); font-size: 10px; font-weight: 900; letter-spacing: .09em; }
.module-summary { margin-top: 16px; padding: 16px; border: 1px solid var(--portal-line); border-radius: 15px; background: #fff9fb; color: var(--portal-muted); font-size: 12px; line-height: 1.7; }
.customer-linked-section { margin-top: 16px; padding: 16px; border: 1px solid rgba(239,127,163,.22); border-radius: 17px; background: rgba(255,255,255,.56); }
.customer-linked-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.customer-linked-head .module-kicker { margin-bottom: 3px; }
.customer-linked-head p { margin: 0; color: var(--portal-muted); font-size: 11px; line-height: 1.7; }
.customer-linked-empty { margin-top: 12px; padding: 18px; border: 1px dashed rgba(239,127,163,.35); border-radius: 13px; background: #fff9fb; color: var(--portal-muted); font-size: 12px; text-align: center; }
.customer-linked-section [hidden] { display: none; }
.customer-linked-section .table-wrap { margin-top: 12px; }
.report-upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.report-upload-card { position: relative; display: grid; gap: 10px; padding: 18px; overflow: hidden; border: 1px solid var(--portal-line); border-radius: 19px; background: rgba(255,255,255,.72); }
.report-upload-card::after { position: absolute; right: -28px; top: -35px; width: 100px; height: 100px; border-radius: 50%; background: rgba(239,127,163,.08); content: ""; pointer-events: none; }
.report-upload-card:nth-child(2)::after { background: rgba(229,183,104,.12); }
.report-upload-card:nth-child(3)::after { background: rgba(164,151,228,.12); }
.report-card-number { position: absolute; right: 15px; top: 13px; color: var(--portal-pink-deep); font-size: 12px; font-weight: 900; }
.report-upload-card:nth-child(2) .report-card-number { color: #b3873e; }
.report-upload-card:nth-child(3) .report-card-number { color: #7c6bc1; }
.report-upload-card h3 { margin: 0; color: #44383f; font-size: 16px; }
.report-upload-card > p { min-height: 38px; margin: 0; color: var(--portal-muted); font-size: 11px; line-height: 1.65; }
.report-upload-card .admin-form, .report-upload-card label { position: relative; z-index: 1; }
.report-upload-card label { display: grid; gap: 6px; color: #5a4d55; font-size: 11px; font-weight: 900; }
.report-upload-card input, .report-upload-card select { width: 100%; padding: 10px 11px; border: 1px solid var(--portal-line); border-radius: 11px; outline: none; background: rgba(255,255,255,.8); color: var(--portal-ink); font: inherit; font-size: 11px; }
.report-upload-card input:focus, .report-upload-card select:focus { border-color: rgba(239,127,163,.65); box-shadow: 0 0 0 4px rgba(239,127,163,.1); }
.report-upload-card input[type=file] { padding: 8px; }
.report-upload-card .admin-button { justify-self: start; position: relative; z-index: 1; }
.report-card-message { min-height: 18px; margin: 0; }
.report-center-message { margin-top: 10px; }
.report-auto-card { align-content: start; }
.report-auto-card::after { background: rgba(239,127,163,.08); }
.report-auto-card:nth-child(2)::after { background: rgba(229,183,104,.12); }
.auto-report-rule { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--portal-line); border-radius: 12px; background: rgba(255,250,252,.82); }
.auto-report-rule strong { color: var(--portal-pink-deep); font-size: 12px; }
.auto-report-rule span { color: var(--portal-muted); font-size: 10px; text-align: right; }
.report-auto-card:nth-child(2) .auto-report-rule strong { color: #b3873e; }

@media (max-width: 760px) {
  .portal-shell { width: min(100% - 26px, 620px); padding-top: 18px; }
  .portal-hero { padding: 32px 25px 28px; }
  .hero-spark { right: 47px; top: 43px; width: 50px; height: 50px; }
  .hero-dot { right: 22px; top: 80px; width: 25px; height: 25px; }
  .hero-ring { right: 28px; bottom: 28px; }
  body.portal-admin { padding: 15px; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-topbar { align-items: flex-start; flex-direction: column; }
  .admin-top-actions { width: 100%; justify-content: space-between; }
  .user-topbar { align-items: flex-start; flex-direction: column; }
  .user-top-actions { width: 100%; justify-content: space-between; }
  .report-upload-grid { grid-template-columns: 1fr; }
  .customer-management-head { grid-template-columns: 1fr; gap: 14px; }
  .customer-create-form { grid-template-columns: 1fr 1fr; }
  .customer-create-form button { grid-column: 1 / -1; justify-self: start; }
  .customer-permission-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .entry-card { grid-template-columns: 47px 1fr 27px; gap: 11px; min-height: 98px; padding: 15px; }
  .entry-number { width: 42px; height: 42px; border-radius: 14px; }
  .entry-copy strong { font-size: 15px; }
  .entry-copy span { font-size: 11px; }
  .portal-hero h1 { font-size: 34px; }
  .portal-hero p { font-size: 13px; }
  .user-welcome { font-size: 11px; }
  body.login-ui { padding: 16px; }
  body.login-ui main { padding: 27px 20px; border-radius: 24px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-stats .admin-stat:last-child { grid-column: 1 / -1; }
  .admin-panel { padding: 17px; }
  .customer-create-form { grid-template-columns: 1fr; }
  .customer-create-form button { grid-column: auto; }
  .customer-detail { padding: 15px; }
  .customer-detail-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  body.report-view-ui { padding: 10px; }
  .report-shell { min-height: calc(100vh - 20px); }
  .report-toolbar { align-items: flex-start; flex-direction: column; padding: 20px; }
  .report-actions { width: 100%; justify-content: flex-start; }
  .report-frame { min-height: calc(100vh - 170px); }
  .report-list-panel, .report-viewer-panel { padding: 19px; }
  .report-section-head, .report-viewer-head { flex-direction: column; }
  .report-viewer-head .admin-button { align-self: flex-start; }
  .focus-panel-head { align-items: stretch; flex-direction: column; }
  .focus-panel-head .admin-button { align-self: flex-start; }
}

@media print {
  body.report-view-ui { display: none !important; }
}
