:root {
  --bg: #f5f6fa;
  --panel: #fff;
  --ink: #1d2030;
  --muted: #7b8196;
  --line: #e9eaf0;
  --purple: #6558e8;
  --purple-dark: #5144d1;
  --purple-soft: #efedff;
  --green: #28a77b;
  --amber: #d89529;
  --rose: #d75b78;
  --danger: #d94d5c;
  --shadow: 0 10px 35px rgba(41, 38, 78, .07);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hidden { display: none !important; }

.brand { display: flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 760; letter-spacing: -.4px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(145deg, #7165f0, #5446d0); color: white; font: 750 20px/1 Georgia, serif; box-shadow: 0 7px 18px rgba(92, 78, 221, .28); }
.brand-light { color: white; }
.brand-light .brand-mark { color: #5f51db; background: white; box-shadow: 0 8px 24px rgba(18, 12, 73, .2); }

/* Login */
.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(440px, 54%) 1fr; background: white; }
.login-art { position: relative; min-height: 720px; overflow: hidden; padding: 44px 7vw; color: white; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.14), transparent 30%), linear-gradient(140deg, #392d98 0%, #6557df 50%, #7770ee 100%); }
.login-art::before, .login-art::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; }
.login-art::before { width: 600px; height: 600px; left: -300px; bottom: -260px; }
.login-art::after { width: 420px; height: 420px; right: -220px; top: -180px; }
.art-copy { position: relative; z-index: 1; margin-top: 13vh; max-width: 560px; }
.eyebrow { margin: 0 0 12px; font-size: 11px; font-weight: 750; letter-spacing: 2.1px; opacity: .75; }
.eyebrow.purple { color: var(--purple); opacity: 1; }
.art-copy h1 { margin: 0 0 21px; font-size: clamp(40px, 4.2vw, 64px); line-height: 1.15; letter-spacing: -2.4px; }
.art-copy > p:last-child { max-width: 430px; margin: 0; color: rgba(255,255,255,.72); font-size: 16px; line-height: 1.8; }
.visual-card { position: absolute; width: 340px; height: 202px; border-radius: 22px; box-shadow: 0 28px 60px rgba(20, 12, 79, .3); }
.visual-card-back { z-index: 1; right: 8%; bottom: 13%; transform: rotate(9deg); background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.07)); border: 1px solid rgba(255,255,255,.17); backdrop-filter: blur(10px); }
.visual-card-back span { display: block; height: 40px; margin-top: 34px; background: rgba(25, 17, 90, .25); }
.visual-card-front { z-index: 2; right: 15%; bottom: 17%; padding: 26px; transform: rotate(-5deg); background: linear-gradient(140deg, #191935, #303050); color: white; }
.vc-top, .vc-bottom { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,.7); }
.vc-chip { width: 38px; height: 28px; border-radius: 7px; background: linear-gradient(135deg, #f6d48c, #b88a38); }
.vc-num { margin: 45px 0 34px; font-size: 18px; letter-spacing: 1.7px; }
.vc-bottom strong { color: white; font: italic 700 22px Arial, sans-serif; }
.art-foot { position: absolute; bottom: 40px; left: 7vw; display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.65); font-size: 12px; }
.art-foot svg { width: 17px; }
.login-panel { display: grid; place-items: center; padding: 50px; }
.login-form { width: min(390px, 100%); }
.login-form h2 { margin: 4px 0 8px; font-size: 34px; letter-spacing: -1px; }
.form-subtitle { margin: 0 0 40px; color: var(--muted); }
label { display: grid; gap: 9px; color: #4b5063; font-size: 13px; font-weight: 620; }
input, select, textarea { width: 100%; border: 1px solid #dfe1e9; border-radius: 11px; outline: none; color: var(--ink); background: white; transition: border-color .15s, box-shadow .15s; }
input, select { height: 46px; padding: 0 14px; }
textarea { padding: 13px 14px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: #8a80ed; box-shadow: 0 0 0 3px rgba(101, 88, 232, .1); }
input::placeholder, textarea::placeholder { color: #b2b5c1; }
.login-form > label { margin-bottom: 21px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 62px; }
.text-button { position: absolute; right: 13px; top: 50%; padding: 4px; transform: translateY(-50%); border: 0; background: transparent; color: var(--purple); font-size: 12px; font-weight: 650; }
.form-error { min-height: 18px; margin: 2px 0 9px; color: var(--danger); font-size: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 17px; border: 0; border-radius: 10px; font-size: 13px; font-weight: 680; transition: .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.btn-primary { color: white; background: linear-gradient(135deg, #6c5fe9, #584bd5); box-shadow: 0 7px 18px rgba(94, 80, 222, .22); }
.btn-primary:hover { box-shadow: 0 9px 23px rgba(94, 80, 222, .32); }
.btn-secondary { color: #4e476f; background: white; border: 1px solid #dedee8; }
.btn-secondary:hover { border-color: #bbb7df; background: #fbfaff; }
.btn-ghost { color: #686d7e; background: #f2f3f7; }
.btn-danger { color: white; background: var(--danger); }
.btn-block { width: 100%; height: 48px; justify-content: space-between; padding: 0 20px; }
.btn-block svg { width: 18px; }
.login-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 25px; color: #969aaa; font-size: 11px; }
.login-note svg { width: 15px; color: var(--green); }
.mobile-brand { display: none; margin-bottom: 42px; }

/* App shell */
.app-view { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: 236px; padding: 26px 18px 18px; border-right: 1px solid var(--line); background: #fff; }
.sidebar .brand { padding: 0 10px 28px; }
.sidebar nav { display: grid; gap: 5px; }
.nav-label { margin: 20px 13px 8px; color: #adafba; font-size: 10px; font-weight: 750; letter-spacing: 1.4px; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 13px; border: 0; border-radius: 10px; color: #777b8e; background: transparent; font-size: 13px; font-weight: 580; text-align: left; transition: .15s; }
.nav-item svg { width: 18px; }
.nav-item:hover { color: #4d466f; background: #f7f6fd; }
.nav-item.active { color: var(--purple); background: var(--purple-soft); font-weight: 680; }
.nav-badge { margin-left: auto; min-width: 22px; padding: 2px 6px; border-radius: 8px; color: #6c61c5; background: white; font-size: 10px; text-align: center; }
.sidebar-security { display: flex; align-items: center; gap: 10px; margin: auto 3px 14px; padding: 13px; border: 1px solid #e7e4fb; border-radius: 11px; color: var(--purple); background: #f9f8ff; }
.sidebar-security svg { flex: 0 0 auto; width: 21px; }
.sidebar-security div { display: grid; gap: 2px; }
.sidebar-security strong { color: #504a6c; font-size: 11px; }
.sidebar-security span { color: #9793aa; font-size: 9px; }
.user-panel { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 9px 4px; border: 0; border-top: 1px solid var(--line); color: inherit; background: transparent; text-align: left; }
.user-panel > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.user-panel strong { max-width: 110px; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.user-panel small { color: #9b9daa; font-size: 9px; }
.user-panel > svg { margin-left: auto; width: 17px; color: #a6a8b2; }
.avatar { display: grid; flex: 0 0 auto; place-items: center; width: 35px; height: 35px; border-radius: 10px; color: #5348c7; background: #e7e4ff; font-size: 12px; font-weight: 750; }
.avatar-small { width: 31px; height: 31px; border-radius: 9px; }
.main { min-height: 100vh; margin-left: 236px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 68px; padding: 0 38px; border-bottom: 1px solid rgba(231,232,239,.9); background: rgba(255,255,255,.88); backdrop-filter: blur(14px); }
.crumb { display: flex; gap: 9px; color: #adb0bb; font-size: 11px; }
.crumb b { font-weight: 400; }
.crumb strong { color: #5d6172; }
.top-actions { display: flex; align-items: center; gap: 13px; }
.status-dot { display: flex; align-items: center; gap: 6px; margin-right: 6px; color: #7e8291; font-size: 10px; }
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: #3db98c; box-shadow: 0 0 0 3px #e1f6ee; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px; color: #7d8192; background: #f4f5f8; }
.icon-button:hover { color: var(--purple); background: #eeecff; }
.icon-button svg { width: 18px; }
.mobile-menu { display: none; }
.content { max-width: 1460px; margin: 0 auto; padding: 38px; }
.page { display: none; }
.page.active { display: block; animation: page-in .28s ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } }
.page-heading { margin-bottom: 29px; }
.page-heading h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.8px; }
.page-heading > p:last-child, .page-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.heading-actions { display: flex; gap: 10px; }

/* Dashboard */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 17px; margin-bottom: 18px; }
.stat-card { position: relative; display: flex; align-items: flex-start; gap: 15px; min-height: 126px; overflow: hidden; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 4px 18px rgba(36,35,60,.03); }
.stat-card > div:nth-child(2) { display: grid; }
.stat-card span { color: #8a8e9f; font-size: 11px; }
.stat-card strong { margin: 4px 0 2px; font-size: 27px; letter-spacing: -.7px; }
.stat-card small { color: #a1a4b0; font-size: 9px; }
.stat-card small b { color: #bdb7ff; }
.stat-card .positive { color: var(--green); }
.stat-icon { display: grid; flex: 0 0 auto; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: white; background: rgba(255,255,255,.18); }
.stat-icon svg { width: 19px; }
.stat-icon.mint { color: var(--green); background: #e7f7f1; }
.stat-icon.amber { color: var(--amber); background: #fff4df; }
.stat-icon.rose { color: var(--rose); background: #fdebf0; font-weight: 700; }
.purple-card { border: 0; color: white; background: linear-gradient(135deg, #6254df, #7b70ec); box-shadow: 0 11px 28px rgba(94,79,214,.21); }
.purple-card span, .purple-card small { color: rgba(255,255,255,.64); }
.purple-card strong { color: white; }
.mini-orbit { position: absolute; right: -35px; bottom: -60px; width: 150px; height: 150px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.mini-orbit::before { content: ""; position: absolute; inset: 22px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.dashboard-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; margin-bottom: 18px; }
.panel { border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 4px 20px rgba(38,37,61,.025); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 21px 23px; }
.panel h3 { margin: 0 0 5px; font-size: 14px; }
.panel-head p { margin: 0; color: #9da0ad; font-size: 10px; }
.soft-badge { padding: 6px 9px; border-radius: 7px; color: #757088; background: #f5f4f8; font-size: 9px; }
.activity-chart { display: flex; align-items: flex-end; gap: clamp(10px, 3vw, 34px); height: 180px; padding: 15px 30px 25px; border-top: 1px solid #f4f4f7; }
.bar-group { display: grid; flex: 1; justify-items: center; align-items: end; height: 100%; grid-template-rows: 1fr auto; gap: 9px; }
.bar-track { display: flex; align-items: end; width: 100%; max-width: 34px; height: 100%; border-radius: 7px; background: #f0eff7; overflow: hidden; }
.bar { width: 100%; min-height: 4px; border-radius: 7px; background: linear-gradient(180deg, #887dec, #6659df); transition: height .45s ease; }
.bar-group span { color: #a0a3af; font-size: 9px; }
.compliance-panel { padding: 25px; background: linear-gradient(150deg, #fcfbff, #f5f3ff); }
.compliance-icon { display: grid; place-items: center; width: 45px; height: 45px; margin-bottom: 20px; border-radius: 14px; color: var(--purple); background: white; box-shadow: 0 8px 22px rgba(82,71,175,.12); }
.compliance-panel h3 { font-size: 16px; }
.compliance-panel > p { margin: 8px 0 20px; color: #858198; font-size: 11px; line-height: 1.7; }
.compliance-list { display: flex; flex-wrap: wrap; gap: 8px; }
.compliance-list span { color: #68637e; font-size: 9px; }
.compliance-list i { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-right: 3px; border-radius: 50%; color: white; background: #47b98e; font-size: 8px; font-style: normal; }
.recent-panel { overflow: hidden; }
.link-button { display: inline-flex; align-items: center; gap: 5px; padding: 5px; border: 0; color: var(--purple); background: transparent; font-size: 10px; font-weight: 650; }
.link-button svg { width: 14px; }

/* Table */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table th { height: 41px; padding: 0 16px; border-top: 1px solid #f0f0f4; border-bottom: 1px solid #f0f0f4; color: #a4a7b2; background: #fbfbfc; font-size: 9px; font-weight: 650; text-align: left; white-space: nowrap; }
.data-table td { height: 62px; padding: 8px 16px; border-bottom: 1px solid #f1f1f4; color: #606476; white-space: nowrap; }
.data-table tbody tr { transition: background .14s; }
.data-table tbody tr:hover { background: #fbfaff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.card-cell { display: flex; align-items: center; gap: 11px; }
.tiny-card { display: grid; place-items: center; width: 41px; height: 27px; border-radius: 6px; color: rgba(255,255,255,.82); background: linear-gradient(135deg, #3d3c56, #222237); font: italic 700 8px Arial, sans-serif; letter-spacing: -.2px; }
.tiny-card.visa { background: linear-gradient(135deg, #4053a4, #222e70); }
.tiny-card.mastercard { background: linear-gradient(135deg, #f26e49, #bf324c); }
.tiny-card.amex { background: linear-gradient(135deg, #2686b2, #126080); }
.tiny-card.unionpay { background: linear-gradient(135deg, #287c72, #205361); }
.card-cell div:last-child { display: grid; gap: 3px; }
.card-cell strong { color: #36394a; font-size: 11px; }
.card-cell small { color: #a4a6b0; font-size: 9px; }
.holder-cell { display: flex; align-items: center; gap: 8px; }
.mini-avatar { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: #675cd5; background: #eeecff; font-size: 9px; font-weight: 750; }
.cvv-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: 0.04em; color: #2b2f3a; background: #f1f2f6; padding: 3px 7px; border-radius: 6px; }
.cvv-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; padding: 6px 10px; border-radius: 8px; color: #6b3d12; background: #fff1d8; border: 1px solid #f0d19a; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; font-weight: 700; letter-spacing: 0.12em; }
.cvv-spotlight { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid #f0d19a; background: linear-gradient(135deg, #fff8e8, #ffe8b8); }
.cvv-spotlight span { color: #8a5a16; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.cvv-spotlight strong { color: #6b3d12; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 28px; font-weight: 800; letter-spacing: 0.2em; }
.cvv-field input { border-color: #f0d19a; background: #fffaf0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 18px; font-weight: 700; letter-spacing: 0.16em; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 7px; color: #258464; background: #e9f7f2; font-size: 9px; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill.frozen { color: #ba7922; background: #fff5e5; }
.status-pill.archived { color: #7c7f8d; background: #f1f2f5; }
.row-actions { position: relative; }
.more-button { display: grid; place-items: center; width: 29px; height: 29px; border: 0; border-radius: 7px; color: #9699a7; background: transparent; }
.more-button:hover, .more-button.active { color: var(--purple); background: var(--purple-soft); }
.more-button svg { width: 17px; }
.action-menu { position: fixed; z-index: 60; width: 145px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 12px 32px rgba(37,34,67,.16); }
.action-menu button { display: flex; align-items: center; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 7px; color: #5f6374; background: transparent; font-size: 10px; text-align: left; }
.action-menu button:hover { background: #f5f4fc; }
.action-menu button.danger { color: var(--danger); }
.empty-state { display: grid; place-items: center; min-height: 250px; padding: 35px; text-align: center; }
.empty-state .empty-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 14px; border-radius: 18px; color: var(--purple); background: var(--purple-soft); }
.empty-state h3 { margin: 0 0 7px; font-size: 14px; }
.empty-state p { max-width: 320px; margin: 0 0 16px; color: var(--muted); font-size: 10px; line-height: 1.6; }

/* Cards page */
.cards-panel { overflow: hidden; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; }
.search-box { position: relative; width: min(360px, 100%); }
.search-box svg { position: absolute; left: 13px; top: 50%; width: 16px; color: #aaadba; transform: translateY(-50%); }
.search-box input { height: 39px; padding-left: 39px; border-color: #e6e7ec; background: #fafafd; font-size: 11px; }
.filter-group { display: flex; gap: 3px; padding: 3px; border-radius: 9px; background: #f3f3f7; }
.filter { height: 31px; padding: 0 12px; border: 0; border-radius: 7px; color: #858997; background: transparent; font-size: 10px; }
.filter.active { color: #5146ca; background: white; box-shadow: 0 2px 7px rgba(40,38,67,.08); font-weight: 650; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 7px; min-height: 58px; padding: 10px 20px; border-top: 1px solid #f0f0f3; }
.pagination button { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid #e5e5eb; border-radius: 7px; color: #707483; background: white; font-size: 10px; }
.pagination button.active { border-color: var(--purple); color: white; background: var(--purple); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.pagination span { margin-right: auto; color: #999ca9; font-size: 10px; }

/* Audit */
.audit-panel { padding: 10px 24px; }
.audit-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 13px; align-items: center; padding: 17px 0; border-bottom: 1px solid #f0f0f3; }
.audit-item:last-child { border: 0; }
.audit-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--purple); background: var(--purple-soft); font-size: 13px; font-weight: 750; }
.audit-copy { display: grid; gap: 4px; }
.audit-copy strong { color: #434657; font-size: 11px; }
.audit-copy span, .audit-time { color: #9da0ac; font-size: 9px; }
.audit-time { text-align: right; }

/* Modal */
.modal { width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 18px; color: var(--ink); background: white; box-shadow: 0 30px 80px rgba(20,17,55,.28); overflow: auto; }
.modal::backdrop { background: rgba(27,26,43,.48); backdrop-filter: blur(4px); }
.modal form { padding: 26px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.modal-head h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.4px; }
.modal-head p:last-child { margin: 0; color: var(--muted); font-size: 10px; }
.security-banner { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; padding: 12px 13px; border: 1px solid #e4e0ff; border-radius: 10px; color: #746e91; background: #f8f7ff; font-size: 10px; line-height: 1.55; }
.security-banner svg { flex: 0 0 auto; width: 18px; color: var(--purple); }
.security-banner strong { color: #55506d; }
.security-banner.warning { border-color: #f2dfb8; background: #fffaf0; }
.security-banner.warning svg { color: var(--amber); }
#new-card-fields { margin-bottom: 16px; }
label small { color: #a2a5b0; font-size: 9px; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #eeeeF2; }
.modal-wide { width: min(700px, calc(100vw - 28px)); }
.import-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.import-guide div { display: grid; gap: 5px; padding: 11px; border-radius: 9px; background: #f6f6fa; }
.import-guide b { color: var(--purple); font-size: 9px; }
.import-guide span { color: #777b8c; font-size: 9px; }
.textarea-label textarea { min-height: 190px; margin-top: 2px; font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; }
.import-preview { display: none; max-height: 190px; margin-top: 15px; border: 1px solid var(--line); border-radius: 10px; overflow: auto; }
.import-preview.visible { display: block; }
.preview-row { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 10px; padding: 11px 13px; border-bottom: 1px solid #f0f0f3; color: #676b7c; font-size: 10px; }
.preview-row:last-child { border: 0; }
.preview-row strong { color: #3f4252; }
.preview-head { color: #a0a3af; background: #fafafd; font-size: 9px; font-weight: 650; }
.modal-small { width: min(390px, calc(100vw - 28px)); padding: 32px; text-align: center; }
.modal-small h2 { margin: 13px 0 8px; font-size: 20px; }
.modal-small > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.danger-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto; border-radius: 15px; color: var(--danger); background: #fdecef; font-size: 20px; font-weight: 750; }
.modal-actions.centered { justify-content: center; }

/* Toast */
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 100; display: grid; gap: 9px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 270px; max-width: 380px; padding: 13px 15px; border: 1px solid #e6e6eb; border-radius: 11px; color: #505465; background: white; box-shadow: 0 14px 35px rgba(35,32,64,.16); font-size: 11px; animation: toast-in .25s ease both; }
.toast i { display: grid; flex: 0 0 auto; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: white; background: var(--green); font-size: 11px; font-style: normal; }
.toast.error i { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.sidebar-overlay { display: none; }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .login-view { grid-template-columns: 48% 1fr; }
  .visual-card { width: 280px; height: 168px; }
  .vc-num { margin: 30px 0 23px; font-size: 14px; }
}

@media (max-width: 820px) {
  .login-view { display: block; background: linear-gradient(145deg, #f5f3ff, white 45%); }
  .login-art { display: none; }
  .login-panel { min-height: 100vh; padding: 32px 24px; }
  .mobile-brand { display: flex; }
  .sidebar { transform: translateX(-105%); box-shadow: 12px 0 40px rgba(32,29,64,.15); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 25; background: rgba(24,22,42,.36); }
  .sidebar-overlay.open { display: block; }
  .main { margin-left: 0; }
  .mobile-menu { display: grid; }
  .crumb { display: none; }
  .topbar { padding: 0 20px; }
  .content { padding: 28px 20px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .status-dot { display: none; }
  .heading-row { align-items: stretch; flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions .btn { flex: 1; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 122px; padding: 15px; flex-direction: column; gap: 9px; }
  .stat-card > div:nth-child(2) { display: block; }
  .stat-card strong { display: block; font-size: 23px; }
  .stat-icon { width: 34px; height: 34px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .filter-group { justify-content: stretch; }
  .filter { flex: 1; padding: 0 7px; }
  .data-table th:nth-child(3), .data-table td:nth-child(3), .data-table th:nth-child(4), .data-table td:nth-child(4) { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .modal form { padding: 20px; }
  .import-guide { grid-template-columns: 1fr; }
  .preview-row { grid-template-columns: 1fr 1fr; }
  .preview-row > :last-child { display: none; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn { flex: 1; }
}
