@charset "UTF-8";

:root {
  color-scheme: light;
  --primary: #635bda;
  --primary-dark: #5048bf;
  --primary-soft: #efedff;
  --blue: #4b83ed;
  --purple: #8a66dd;
  --text: #25263a;
  --text-secondary: #6f7288;
  --text-light: #9799aa;
  --surface: #ffffff;
  --surface-soft: #f8f9ff;
  --line: #e7e8f2;
  --success: #2b9b79;
  --success-soft: #eaf8f3;
  --warning: #c78128;
  --warning-soft: #fff6e8;
  --danger: #d75c6c;
  --danger-soft: #fff0f2;
  --sidebar-width: 244px;
  --shadow: 0 10px 35px rgba(61, 65, 120, .055);
  --shadow-float: 0 24px 70px rgba(47, 46, 105, .16);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #f6f7fc; }
body { margin: 0; color: var(--text); background: #f6f7fc; font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
button:disabled, select:disabled, input:disabled { cursor: not-allowed; opacity: .55; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(99, 91, 218, .18); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong { font-weight: 650; }
::selection { color: #433a9e; background: #e4e0ff; }

/* Login */
.login-screen { position: relative; min-height: 100vh; overflow: hidden; display: grid; place-items: center; padding: 48px 7vw; background: radial-gradient(circle at 12% 20%, rgba(159, 190, 255, .33), transparent 33%), radial-gradient(circle at 85% 78%, rgba(198, 169, 247, .28), transparent 35%), linear-gradient(135deg, #f7faff 0%, #f6f3ff 100%); }
.login-screen::before { content: ""; position: absolute; inset: 0; opacity: .28; background-image: linear-gradient(rgba(107, 108, 169, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(107, 108, 169, .055) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to right, #000, transparent 70%); }
.login-decoration { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.decoration-one { width: 360px; height: 360px; top: -190px; right: 8%; border: 80px solid rgba(139, 121, 227, .08); }
.decoration-two { width: 250px; height: 250px; bottom: -160px; left: 6%; border: 60px solid rgba(99, 158, 232, .09); }
.login-layout { position: relative; z-index: 1; width: min(1120px, 100%); display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(60px, 9vw, 130px); align-items: center; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 700; letter-spacing: -.4px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; color: #fff; background: linear-gradient(140deg, #669ee9, #7461d9 65%, #9464d5); box-shadow: 0 7px 18px rgba(99, 91, 218, .22); }
.brand-mark svg { width: 23px; height: 23px; stroke-width: 1.6; }
.brand-large { font-size: 23px; margin-bottom: 44px; }
.brand-large .brand-mark { width: 45px; height: 45px; border-radius: 14px; }
.login-intro h1 { margin-bottom: 22px; font-size: clamp(36px, 4vw, 52px); line-height: 1.26; letter-spacing: -1.7px; font-weight: 700; color: #30324d; }
.login-intro > p { max-width: 420px; margin-bottom: 34px; color: var(--text-secondary); font-size: 16px; line-height: 1.85; }
.login-feature { display: flex; align-items: center; gap: 11px; margin-top: 14px; color: #53566e; font-size: 14px; }
.login-feature > span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: rgba(255, 255, 255, .75); box-shadow: 0 3px 12px rgba(86, 88, 149, .08); }
.login-feature svg { width: 14px; height: 14px; stroke-width: 2.2; }
.login-card { padding: 42px 40px 28px; border: 1px solid rgba(255, 255, 255, .9); border-radius: 26px; background: rgba(255, 255, 255, .76); box-shadow: 0 28px 80px rgba(72, 71, 126, .12); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.login-card-heading { margin-bottom: 31px; }
.eyebrow { display: block; margin-bottom: 7px; color: #8178cf; font-size: 10px; font-weight: 750; letter-spacing: 2px; }
.login-card-heading h2 { margin-bottom: 7px; font-size: 27px; letter-spacing: -.5px; }
.login-card-heading p { color: var(--text-secondary); }
.login-footnote { margin-top: 24px; color: var(--text-light); text-align: center; font-size: 11px; }
.form-error { padding: 10px 12px; margin: 2px 0 15px; border-radius: 9px; color: #b44354; background: var(--danger-soft); font-size: 13px; }

/* Form controls */
.field { display: block; margin-bottom: 19px; }
.field > span, .field-label { display: block; margin-bottom: 7px; color: #51546a; font-size: 13px; font-weight: 550; }
.field small, .field-help { display: block; margin-top: 6px; color: var(--text-light); font-size: 12px; }
input, select, textarea { width: 100%; min-height: 42px; padding: 10px 13px; border: 1px solid #dedfea; border-radius: 10px; color: var(--text); background: rgba(255, 255, 255, .92); transition: border-color .18s, box-shadow .18s, background .18s; }
input::placeholder, textarea::placeholder { color: #aaaebd; }
input:hover, select:hover, textarea:hover { border-color: #c9c9df; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #9992e3; box-shadow: 0 0 0 3px rgba(99, 91, 218, .09); background: #fff; }
select { padding-right: 35px; }
textarea { resize: vertical; }
.password-input { position: relative; }
.password-input input { padding-right: 43px; }
.password-input .password-toggle { position: absolute; right: 4px; top: 3px; width: 36px; height: 36px; color: #989bab; }
.password-input .password-toggle svg { width: 18px; height: 18px; }
.login-card input { min-height: 47px; border-radius: 11px; background: rgba(255, 255, 255, .8); }
.login-card .field { margin-bottom: 21px; }
.login-card .password-input .password-toggle { top: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full-width { grid-column: 1 / -1; }
.required::after { content: " *"; color: var(--danger); }

/* Buttons */
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 1px solid transparent; border-radius: 10px; font-weight: 550; font-size: 13px; white-space: nowrap; transition: transform .16s, box-shadow .16s, background .16s, border-color .16s; }
.button svg { width: 17px; height: 17px; }
.button:not(:disabled):active { transform: translateY(1px); }
.button-primary { color: #fff; border-color: var(--primary); background: linear-gradient(135deg, #6d70df, #7259ce); box-shadow: 0 5px 13px rgba(99, 91, 218, .18); }
.button-primary:hover:not(:disabled) { background: linear-gradient(135deg, #6165d4, #634bc1); box-shadow: 0 7px 18px rgba(99, 91, 218, .25); }
.button-secondary { color: #56586f; border-color: #e0e1ec; background: #fff; }
.button-secondary:hover:not(:disabled) { color: var(--primary); border-color: #ccc8ed; background: #fbfaff; }
.button-danger { color: #fff; border-color: var(--danger); background: var(--danger); }
.button-danger:hover:not(:disabled) { background: #c64e5e; }
.button-block { width: 100%; }
.button-large { min-height: 47px; margin-top: 4px; font-size: 14px; }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; flex: 0 0 auto; padding: 0; border: 0; border-radius: 10px; color: #74778d; background: transparent; transition: color .16s, background .16s; }
.icon-button:hover:not(:disabled) { color: var(--primary); background: var(--primary-soft); }
.icon-button.danger:hover:not(:disabled) { color: var(--danger); background: var(--danger-soft); }
.icon-button svg { width: 18px; height: 18px; }
.text-button { padding: 3px 5px; border: 0; color: var(--primary); background: transparent; font-size: 12px; }
.text-button:hover { text-decoration: underline; }
.action-buttons { display: flex; align-items: center; gap: 4px; }
.action-button { min-height: 32px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid #e5e5ef; border-radius: 8px; color: #64677d; background: #fff; font-size: 12px; white-space: nowrap; }
.action-button svg { width: 14px; height: 14px; }
.action-button:hover { color: var(--primary); border-color: #d2cef0; background: #faf9ff; }
.action-button.danger:hover { color: var(--danger); border-color: #f0ccd1; background: #fff8f9; }
.spinner { width: 17px; height: 17px; display: inline-block; flex: 0 0 auto; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.refresh-button.is-loading svg { animation: spin .8s linear infinite; }

/* App shell */
.app { min-height: 100vh; }
.sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 25px 16px 17px; border-right: 1px solid rgba(226, 227, 239, .85); background: rgba(252, 252, 255, .89); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.sidebar-brand { padding: 0 9px 28px; }
.sidebar-brand .brand-mark { width: 35px; height: 35px; border-radius: 11px; }
.sidebar-brand .brand-mark svg { width: 21px; height: 21px; }
.sidebar-brand { font-size: 19px; }
.sidebar-close { display: none; margin-left: auto; }
.navigation { flex: 1; overflow-y: auto; }
.nav-group + .nav-group { margin-top: 26px; }
.nav-label { margin: 0 13px 9px; color: #a0a2b1; font-size: 10px; font-weight: 650; letter-spacing: 1.4px; }
.nav-item { position: relative; width: 100%; min-height: 45px; display: flex; align-items: center; gap: 12px; margin: 4px 0; padding: 10px 13px; border: 0; border-radius: 11px; color: #696c82; background: transparent; text-align: left; font-size: 13px; transition: color .17s, background .17s, transform .17s; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { color: #514ab0; background: #f2f0fc; }
.nav-item.active { color: #564cb9; background: linear-gradient(100deg, #eceaff, #f0edfc); font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 4px 4px 0; background: var(--primary); }
.nav-badge { min-width: 20px; height: 20px; margin-left: auto; padding: 0 6px; border-radius: 10px; color: #fff; background: #8880db; font-size: 10px; line-height: 20px; text-align: center; }
.sidebar-footer { padding: 16px 4px 0; border-top: 1px solid var(--line); }
.storage-note { display: flex; align-items: center; gap: 10px; padding: 10px 9px 14px; }
.storage-note-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #7870c8; background: #efedfb; }
.storage-note-icon svg { width: 17px; height: 17px; }
.storage-note strong, .storage-note small { display: block; }
.storage-note strong { margin-bottom: 1px; color: #585b70; font-size: 12px; }
.storage-note small { color: #9b9eae; font-size: 10px; }
.sidebar-footer > p { padding: 0 9px; color: #b0b1bd; font-size: 10px; }
.main-shell { min-height: 100vh; margin-left: var(--sidebar-width); background: radial-gradient(circle at 95% 0%, rgba(213, 211, 248, .18), transparent 28%), #f6f7fc; }
.topbar { position: sticky; z-index: 30; top: 0; min-height: 79px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px clamp(24px, 3vw, 46px); border-bottom: 1px solid rgba(227, 228, 238, .8); background: rgba(250, 250, 255, .83); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-left h1 { font-size: 18px; letter-spacing: -.25px; }
.topbar-left p { margin-top: 2px; color: #9698a9; font-size: 11px; }
.menu-button { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 5px; }
.topbar-divider { width: 1px; height: 25px; margin: 0 9px; background: var(--line); }
.current-user { display: flex; align-items: center; gap: 10px; margin-right: 8px; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; color: #5d55b2; background: linear-gradient(135deg, #e6e6ff, #e8e0f5); font-size: 13px; font-weight: 700; }
.current-user-copy strong, .current-user-copy small { display: block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.current-user-copy strong { font-size: 12px; }
.current-user-copy small { color: #9699a9; font-size: 10px; }
.content { width: 100%; max-width: 1660px; margin: 0 auto; padding: 34px clamp(24px, 3vw, 46px) 48px; }
.view { display: none; animation: view-in .22s ease-out; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.summary-row { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.summary-row h2 { margin-bottom: 5px; font-size: 25px; letter-spacing: -.55px; }
.summary-row p { color: var(--text-secondary); font-size: 12px; }
.summary-actions { display: flex; align-items: center; gap: 10px; }
.card { border: 1px solid rgba(228, 229, 239, .9); border-radius: 17px; background: rgba(255, 255, 255, .94); box-shadow: var(--shadow); overflow: hidden; }
.card + .card { margin-top: 20px; }
.card-heading { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 23px; border-bottom: 1px solid #ededf4; }
.card-heading.compact { min-height: auto; padding: 17px 20px; }
.card-heading h3 { font-size: 14px; }
.card-heading p { margin-top: 3px; color: #9295a7; font-size: 11px; }
.soft-chip { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 15px; color: #77738f; background: #f4f3f9; font-size: 11px; white-space: nowrap; }

/* File explorer */
.file-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 20px 23px 15px; }
.mapping-picker { width: min(370px, 100%); }
.mapping-picker > span { display: block; margin-bottom: 6px; color: #888b9e; font-size: 11px; }
.mapping-picker select { min-height: 39px; padding-top: 8px; padding-bottom: 8px; background: #fbfbfe; font-size: 13px; }
.mapping-meta { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; padding-bottom: 4px; }
.meta-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid #ececf4; border-radius: 7px; color: #7c7f91; background: #fafaff; font-size: 10px; }
.meta-chip.mode-rw { color: #5b57ae; border-color: #e4e0fb; background: #f5f3ff; }
.meta-chip.mode-ro { color: #887347; border-color: #f0e6d5; background: #fffcf7; }
.breadcrumbs { min-height: 45px; display: flex; align-items: center; gap: 3px; overflow-x: auto; margin: 0 23px; padding: 5px 0 11px; border-bottom: 1px solid #efeff5; white-space: nowrap; scrollbar-width: thin; }
.breadcrumbs button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 0; border-radius: 6px; color: #73768b; background: transparent; font-size: 12px; }
.breadcrumbs button:hover { color: var(--primary); background: #f4f2fd; }
.breadcrumbs button:last-of-type { color: #4e4aad; font-weight: 600; }
.breadcrumbs svg { width: 14px; height: 14px; }
.breadcrumbs .breadcrumb-separator { color: #b7b8c5; }
.drop-zone { position: relative; min-height: 320px; transition: background .18s; }
.drop-zone.dragging { background: #f5f3ff; box-shadow: inset 0 0 0 2px #a9a1e8; }
.drop-hint { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 20px 15px; color: #b0b1bf; font-size: 10px; }
.drop-hint svg { width: 13px; height: 13px; }
.drop-zone.dragging .drop-hint { color: var(--primary); }
.file-name-button { max-width: 100%; display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; color: #44475b; background: transparent; text-align: left; }
.file-name-button:hover { color: var(--primary); }
.file-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: #7970c4; background: #f0edfc; }
.file-icon.folder { color: #6385d4; background: #edf4ff; }
.file-icon svg { width: 18px; height: 18px; }
.file-name-text { overflow-wrap: anywhere; }
.upload-panel { margin-top: 20px; }
.upload-list { padding: 3px 20px 13px; }
.upload-item { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(220px, 1.5fr) auto; align-items: center; gap: 18px; padding: 13px 0; border-bottom: 1px solid #f0f0f5; }
.upload-item:last-child { border-bottom: 0; }
.upload-file-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.upload-file-name svg { width: 16px; height: 16px; color: #8b82cf; }
.upload-file-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.upload-progress-track { height: 6px; overflow: hidden; border-radius: 5px; background: #edeef5; }
.upload-progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6b93e5, #7a63d5); transition: width .18s; }
.upload-item.completed .upload-progress-bar { background: var(--success); }
.upload-item.failed .upload-progress-bar { background: var(--danger); }
.upload-progress-copy { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: #8d90a1; font-size: 10px; }
.upload-status { min-width: 74px; color: #777a8d; font-size: 11px; text-align: right; }
.upload-item.completed .upload-status { color: var(--success); }
.upload-item.failed .upload-status { color: var(--danger); }

/* Tables and status */
.table-wrap { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #d8d8e5 transparent; }
.data-table { width: 100%; border-collapse: collapse; border-spacing: 0; text-align: left; font-size: 12px; }
.data-table th { height: 44px; padding: 11px 20px; color: #9295a5; background: #fafafd; font-size: 10px; font-weight: 600; letter-spacing: .25px; white-space: nowrap; }
.data-table td { min-height: 62px; padding: 14px 20px; border-top: 1px solid #f0f0f5; color: #5e6174; vertical-align: middle; }
.data-table tbody tr { transition: background .14s; }
.data-table tbody tr:hover { background: #fbfbff; }
.data-table .file-name-column { width: 52%; min-width: 280px; }
.data-table .actions-column { min-width: 120px; text-align: right; }
.data-table td:last-child { text-align: right; }
.data-table td:last-child .action-buttons { justify-content: flex-end; }
.data-table td .primary-cell { color: #3f4256; font-weight: 550; }
.cell-stack strong, .cell-stack span, .cell-stack small { display: block; }
.cell-stack strong { color: #44475a; font-size: 12px; font-weight: 600; }
.cell-stack small { margin-top: 3px; color: #999cab; font-size: 10px; }
.cell-stack .path-text { max-width: 400px; margin-top: 3px; color: #898c9d; overflow-wrap: anywhere; }
.path-code { display: inline-block; max-width: 390px; padding: 3px 7px; border-radius: 5px; color: #6e7082; background: #f5f5f9; font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; font-size: 10px; overflow-wrap: anywhere; white-space: normal; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell .avatar { width: 31px; height: 31px; border-radius: 9px; font-size: 11px; }
.status-badge, .role-badge, .type-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 13px; font-size: 10px; white-space: nowrap; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-success, .status-online { color: var(--success); background: var(--success-soft); }
.status-warning, .status-pending { color: var(--warning); background: var(--warning-soft); }
.status-danger, .status-offline { color: var(--danger); background: var(--danger-soft); }
.status-info, .status-running { color: #557cc5; background: #edf4ff; }
.status-neutral { color: #858899; background: #f1f2f6; }
.role-badge { color: #6b5bb1; background: #f0edfb; }
.role-badge.user { color: #5d7fae; background: #edf4fb; }
.type-badge { color: #5f64b1; background: #efeffb; }
.type-badge.download { color: #7a5ba5; background: #f5eefb; }
.error-detail { display: block; max-width: 260px; margin-top: 4px; color: var(--danger); font-size: 10px; overflow-wrap: anywhere; }
.table-state { min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 35px 20px; color: #a0a2b2; text-align: center; }
.table-state .spinner { color: #9991dd; }
.table-state svg { width: 32px; height: 32px; color: #c4c2d8; stroke-width: 1.4; }
.table-state strong { color: #7d8092; font-size: 13px; }
.table-state p { max-width: 420px; font-size: 11px; overflow-wrap: anywhere; }
.table-state .button { margin-top: 4px; }
.info-banner { display: flex; align-items: flex-start; gap: 10px; margin: -7px 0 20px; padding: 13px 16px; border: 1px solid #e4e5f7; border-radius: 12px; color: #777b9b; background: #f4f5ff; font-size: 11px; }
.info-banner svg { width: 17px; height: 17px; margin-top: 1px; color: #7c78c6; }

/* Modal */
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(38, 39, 61, .25); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); animation: fade-in .16s ease-out; }
@keyframes fade-in { from { opacity: 0; } }
.modal { width: min(480px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; border: 1px solid rgba(255, 255, 255, .9); border-radius: 19px; background: rgba(255, 255, 255, .97); box-shadow: var(--shadow-float); animation: modal-in .2s ease-out; }
.modal.modal-wide { width: min(760px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(9px) scale(.985); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 23px 14px; }
.modal-header h2 { font-size: 18px; letter-spacing: -.25px; }
.modal-body { padding: 6px 23px 22px; }
.modal-body > .field:last-child { margin-bottom: 0; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 23px 19px; border-top: 1px solid #efeff4; }
.modal-description { margin-bottom: 19px; color: var(--text-secondary); font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; }
.modal-description strong { color: var(--text); }
.danger-description { padding: 12px 14px; border-radius: 10px; color: #a95762; background: var(--danger-soft); }
.command-intro { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; padding: 12px 14px; border-radius: 10px; color: #757990; background: #f5f6fc; font-size: 12px; }
.command-intro svg { width: 17px; height: 17px; margin-top: 2px; color: var(--primary); }
.command-block { margin-top: 15px; }
.command-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.command-heading strong { font-size: 12px; }
.command-block pre { max-height: 160px; overflow: auto; margin: 0; padding: 14px 15px; border: 1px solid #e6e6f0; border-radius: 10px; color: #50556d; background: #f7f8fc; font: 11px/1.7 "Cascadia Code", "SFMono-Regular", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.enrollment-meta { margin: 0 0 15px; color: #8d90a2; font-size: 11px; }

/* Toast */
.toast-container { position: fixed; z-index: 150; top: 20px; right: 22px; width: min(370px, calc(100vw - 36px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 11px; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, .9); border-radius: 13px; color: #55586b; background: rgba(255, 255, 255, .94); box-shadow: 0 13px 35px rgba(49, 50, 91, .14); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); pointer-events: auto; animation: toast-in .22s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateX(15px); } }
.toast.removing { opacity: 0; transform: translateX(12px); transition: .2s; }
.toast-icon { width: 23px; height: 23px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #547ec4; background: #edf4ff; }
.toast-icon svg { width: 14px; height: 14px; stroke-width: 2; }
.toast.success .toast-icon { color: var(--success); background: var(--success-soft); }
.toast.error .toast-icon { color: var(--danger); background: var(--danger-soft); }
.toast.warning .toast-icon { color: var(--warning); background: var(--warning-soft); }
.toast-copy { min-width: 0; flex: 1; }
.toast-copy strong { display: block; margin-bottom: 1px; font-size: 12px; }
.toast-copy p { color: #838697; font-size: 11px; overflow-wrap: anywhere; }
.toast .icon-button { width: 24px; height: 24px; margin: -3px -5px 0 0; }
.toast .icon-button svg { width: 14px; height: 14px; }

@media (min-width: 1500px) {
  :root { --sidebar-width: 258px; }
  .content { padding-top: 40px; }
  .data-table td { padding-top: 16px; padding-bottom: 16px; }
}

@media (max-width: 1050px) {
  .login-layout { gap: 50px; }
  .login-intro h1 { font-size: 38px; }
  .login-card { padding: 35px 30px 25px; }
  .current-user-copy { display: none; }
  .current-user { margin-right: 2px; }
  .topbar-divider { margin: 0 4px; }
}

@media (max-width: 900px) {
  .login-screen { padding: 35px 24px; }
  .login-layout { width: min(450px, 100%); grid-template-columns: 1fr; gap: 26px; }
  .login-intro { text-align: center; }
  .login-intro .brand { justify-content: center; margin-bottom: 20px; }
  .login-intro h1 { display: none; }
  .login-intro > p { margin: 0 auto; font-size: 13px; }
  .login-feature { display: none; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease-out; box-shadow: 15px 0 40px rgba(38, 40, 70, .1); }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-close, .menu-button { display: inline-grid; }
  .sidebar-backdrop { position: fixed; z-index: 35; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(40, 41, 62, .25); backdrop-filter: blur(2px); }
  .main-shell { margin-left: 0; }
  .topbar { padding-left: 20px; padding-right: 20px; }
  .content { padding: 27px 20px 40px; }
  .data-table { min-width: 720px; }
  .file-table { min-width: 650px; }
  .data-table:has(.table-state) { min-width: 100%; }
  .data-table:has(.table-state) thead { display: none; }
}

@media (max-width: 620px) {
  .login-screen { padding: 24px 16px; }
  .login-card { padding: 30px 23px 23px; border-radius: 20px; }
  .login-intro > p { padding: 0 20px; }
  .topbar { min-height: 68px; padding: 11px 13px; gap: 8px; }
  .topbar-left { gap: 7px; }
  .topbar-left h1 { font-size: 16px; }
  .topbar-left p { display: none; }
  .topbar-actions { gap: 1px; }
  .topbar-divider, .current-user, #change-password { display: none; }
  .topbar .icon-button { width: 35px; height: 35px; }
  .content { padding: 23px 14px 32px; }
  .summary-row { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 22px; }
  .summary-row h2 { font-size: 23px; }
  .summary-row > .button, .summary-actions { width: 100%; }
  .summary-actions .button { flex: 1; }
  .file-toolbar { align-items: stretch; flex-direction: column; gap: 12px; padding: 17px 16px 12px; }
  .mapping-picker { width: 100%; }
  .mapping-meta { justify-content: flex-start; }
  .breadcrumbs { margin: 0 16px; }
  .card { border-radius: 14px; }
  .card-heading { padding: 16px; }
  .data-table th { padding-left: 15px; padding-right: 15px; }
  .data-table td { padding: 13px 15px; }
  .drop-hint { display: none; }
  .drop-zone { min-height: 280px; }
  .upload-item { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .upload-progress { grid-column: 1 / -1; grid-row: 2; }
  .upload-status { grid-column: 2; grid-row: 1; }
  .modal-backdrop { padding: 14px; }
  .modal { max-height: calc(100vh - 28px); border-radius: 16px; }
  .modal-header { padding: 18px 18px 12px; }
  .modal-body { padding: 6px 18px 20px; }
  .modal-footer { padding: 14px 18px 17px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full-width { grid-column: auto; }
  .toast-container { top: 12px; right: 12px; width: calc(100vw - 24px); }
}

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