:root {
  --blue: #1769e0;
  --blue-dark: #0e54bf;
  --blue-soft: #edf5ff;
  --ink: #172033;
  --muted: #738097;
  --line: #e7ebf2;
  --surface: #ffffff;
  --background: #f4f7fb;
  --danger: #d33b47;
  --shadow: 0 20px 60px rgba(33, 56, 94, .12);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.brand-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  border-radius: 12px;
  background: linear-gradient(145deg, #3f91ff, #0e5fd2);
  box-shadow: 0 8px 20px rgba(23, 105, 224, .28);
}
.brand-mark--large { width: 58px; height: 58px; border-radius: 18px; font-size: 29px; }
.eyebrow { margin: 0 0 9px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.muted { color: var(--muted); }

.login-page { background: #fff; }
.login-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, 47%) 1fr; }
.login-brand {
  position: relative;
  display: flex;
  overflow: hidden;
  padding: clamp(50px, 8vw, 116px);
  flex-direction: column;
  justify-content: center;
  color: #fff;
  background:
    radial-gradient(circle at 18% 85%, rgba(87, 179, 255, .32), transparent 32%),
    radial-gradient(circle at 88% 12%, rgba(82, 170, 255, .25), transparent 28%),
    linear-gradient(145deg, #073b88 0%, #0758c6 53%, #0b73e5 100%);
}
.login-brand::before, .login-brand::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.login-brand::before { width: 520px; height: 520px; right: -275px; top: -130px; }
.login-brand::after { width: 360px; height: 360px; left: -210px; bottom: -180px; }
.login-brand .eyebrow { margin-top: 34px; color: #8fc8ff; }
.login-brand h1 { max-width: 580px; margin: 0; font-size: clamp(38px, 4.3vw, 66px); line-height: 1.12; letter-spacing: -.045em; }
.login-lead { max-width: 500px; margin: 30px 0 42px; color: rgba(255,255,255,.72); font-size: 17px; line-height: 1.9; }
.brand-feature { display: flex; gap: 12px; margin: 8px 0; color: rgba(255,255,255,.86); font-size: 14px; }
.brand-feature span { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 50%; color: #dff1ff; background: rgba(255,255,255,.14); }
.login-panel { display: grid; padding: 40px; place-items: center; background: linear-gradient(180deg, #fff 0%, #f7faff 100%); }
.login-card { width: min(420px, 100%); }
.mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 46px; }
.login-card h2 { margin: 0 0 9px; font-size: 31px; letter-spacing: -.03em; }
.login-card > .muted { margin: 0 0 34px; font-size: 14px; }
.alert { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #ffd3d7; border-radius: 10px; color: #a8212c; background: #fff4f5; font-size: 14px; }
.login-form { display: grid; gap: 21px; }
.login-form label > span, .field-label { display: block; margin-bottom: 9px; color: #3b4659; font-size: 13px; font-weight: 650; }
.input-wrap { display: flex; height: 52px; align-items: center; border: 1px solid #dce2ec; border-radius: 12px; background: #fff; transition: border .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: #62a2f5; box-shadow: 0 0 0 4px rgba(23,105,224,.09); }
.input-icon { width: 47px; text-align: center; filter: grayscale(1); opacity: .55; }
.input-wrap input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.input-action { padding: 8px 14px; border: 0; color: var(--blue); background: transparent; font-size: 12px; }
.login-footnote { margin-top: 25px; color: #9aa4b4; font-size: 12px; text-align: center; }

.button { display: inline-flex; min-height: 40px; padding: 0 17px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; font-weight: 650; font-size: 13px; transition: transform .15s, background .15s, border .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .6; transform: none; }
.button--primary { color: #fff; background: var(--blue); box-shadow: 0 7px 18px rgba(23,105,224,.17); }
.button--primary:hover { background: var(--blue-dark); }
.button--secondary { border-color: #dce3ec; color: #364258; background: #fff; }
.button--secondary:hover, .button--ghost:hover { border-color: #bfcadb; background: #f7f9fc; }
.button--ghost { border-color: #dfe4ec; color: #5b6679; background: #fff; }
.button--danger-text { color: var(--danger); background: #fff; }
.button--block { width: 100%; }
.button--large { min-height: 50px; border-radius: 11px; font-size: 14px; }
.button--download { min-height: 34px; padding: 0 13px; color: var(--blue); background: var(--blue-soft); }

.app-shell { display: grid; min-height: 100vh; grid-template-columns: 228px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; width: 228px; padding: 28px 18px 20px; flex-direction: column; color: #dce8fb; background: #102744; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; }
.sidebar-brand > span:last-child { display: grid; gap: 2px; }
.sidebar-brand strong { color: inherit; font-size: 16px; }
.sidebar-brand small { color: #8094ae; font-size: 10px; letter-spacing: .08em; }
.sidebar-nav { display: grid; gap: 5px; margin-top: 48px; }
.nav-item { display: flex; min-height: 44px; padding: 0 14px; align-items: center; gap: 13px; border-radius: 9px; color: #9db0c9; font-size: 13px; }
.nav-item > span { width: 18px; color: #7191b6; font-size: 18px; text-align: center; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(58, 136, 235, .17); }
.nav-item.active > span { color: #68a9ff; }
.sidebar-info { display: flex; margin-top: auto; padding: 17px 11px; align-items: flex-start; gap: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.035); }
.status-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: #43d29b; box-shadow: 0 0 0 4px rgba(67,210,155,.1); }
.sidebar-info div { display: grid; min-width: 0; gap: 4px; }
.sidebar-info strong { color: #dbe9fb; font-size: 11px; }
.sidebar-info small { overflow: hidden; color: #748aa6; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.logout-form { margin-top: 9px; }
.nav-button { width: 100%; border: 0; background: transparent; }

.workspace { grid-column: 2; min-width: 0; padding: 0 34px 34px; }
.topbar { display: flex; min-height: 104px; align-items: center; justify-content: space-between; gap: 20px; }
.topbar .eyebrow { margin-bottom: 5px; color: #8b96a8; }
.breadcrumbs { display: flex; min-width: 0; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.breadcrumbs a { overflow: hidden; max-width: 220px; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumbs span { color: #aeb7c5; font-weight: 400; }
.breadcrumbs a:last-child { color: var(--ink); }
.account-chip { display: flex; padding: 7px 11px 7px 7px; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.75); }
.avatar { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; color: #fff; background: #2e79dc; font-size: 12px; font-weight: 800; }
.account-chip > span:last-child { display: grid; }
.account-chip strong { font-size: 11px; }
.account-chip small { color: #9aa5b5; font-size: 9px; }

.content-card { overflow: hidden; min-height: calc(100vh - 138px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 10px 35px rgba(42, 65, 99, .045); }
.toolbar { display: flex; min-height: 75px; padding: 16px 22px; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.toolbar-actions { display: flex; gap: 10px; }
.search-box { display: flex; width: min(250px, 36vw); height: 39px; padding: 0 12px; align-items: center; gap: 8px; border: 1px solid #e1e6ee; border-radius: 9px; color: #9da8b8; background: #fafbfd; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.drop-zone { position: absolute; z-index: 10; inset: 120px 55px 55px 249px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; border: 2px dashed #72a9ed; border-radius: 16px; color: var(--blue); background: rgba(239,247,255,.95); backdrop-filter: blur(5px); }
.drop-zone span { color: #718198; font-size: 12px; }
.drop-icon { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 50%; color: #fff; background: var(--blue); font-size: 23px; }
.table-wrap { overflow-x: auto; }
.file-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.file-table th { height: 45px; padding: 0 22px; color: #9aa5b5; background: #fbfcfe; font-size: 10px; font-weight: 750; letter-spacing: .03em; text-align: left; }
.file-table th:first-child { width: 51%; }
.file-table th:nth-child(2) { width: 13%; }
.file-table th:nth-child(3) { width: 20%; }
.file-table th:last-child { width: 16%; }
.file-table td { height: 62px; padding: 0 22px; border-top: 1px solid #f0f2f6; font-size: 12px; }
.file-table tbody tr { transition: background .12s; }
.file-table tbody tr:hover { background: #fafcff; }
.align-right { text-align: right !important; }
.file-name { display: flex; min-width: 0; align-items: center; gap: 12px; font-weight: 620; }
.file-name > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-icon { display: inline-grid; width: 34px; height: 34px; place-items: center; flex: 0 0 auto; border-radius: 8px; font-size: 17px; }
.file-icon--folder { color: #e39a13; background: #fff6dc; }
.file-icon--file { color: #367bd4; background: #edf5ff; }
.file-icon--back { color: #75859b; background: #f0f3f7; }
.shared-badge { flex: 0 0 auto; padding: 3px 7px; border-radius: 10px; color: #4181d5; background: #edf5ff; font-size: 9px; font-weight: 700; }
.actions { white-space: nowrap; }
.icon-button { display: inline-grid; width: 30px; height: 30px; margin-left: 3px; padding: 0; place-items: center; border: 1px solid transparent; border-radius: 7px; color: #748197; background: transparent; font-size: 16px; }
.icon-button:hover { border-color: #dfe6ef; color: var(--blue); background: #fff; }
.icon-button--danger:hover { border-color: #f1c9cd; color: var(--danger); background: #fff5f6; }
.empty-state { display: flex; min-height: 340px; align-items: center; justify-content: center; flex-direction: column; color: #8b97a8; }
.empty-state strong { margin-top: 10px; color: #465267; font-size: 14px; }
.empty-state p { font-size: 11px; }
.empty-illustration { display: grid; width: 76px; height: 60px; place-items: center; border-radius: 24px; color: #72a8ea; background: #edf5ff; font-size: 35px; }
.content-footer { display: flex; padding: 15px 22px; justify-content: space-between; border-top: 1px solid var(--line); color: #9aa5b5; font-size: 10px; }

.modal { width: min(450px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 15px; color: var(--ink); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(11, 25, 44, .45); backdrop-filter: blur(2px); }
.modal-head { display: flex; margin-bottom: 23px; justify-content: space-between; align-items: flex-start; gap: 20px; }
.modal-head h3 { margin: 0; font-size: 20px; }
.modal-close { width: 31px; height: 31px; padding: 0; border: 0; border-radius: 8px; color: #7d899a; background: #f3f5f8; font-size: 21px; }
.text-input { width: 100%; height: 45px; padding: 0 13px; border: 1px solid #dce2eb; border-radius: 9px; outline: 0; color: var(--ink); background: #fff; }
.text-input:focus { border-color: #70a8ef; box-shadow: 0 0 0 3px rgba(23,105,224,.08); }
.modal-actions { display: flex; margin-top: 25px; justify-content: flex-end; gap: 9px; }
.modal-actions--spread { justify-content: space-between; }
.share-success { display: flex; margin-bottom: 20px; padding: 14px; gap: 12px; border: 1px solid #cdebdc; border-radius: 10px; background: #f1fbf6; }
.share-success-icon { display: grid; width: 28px; height: 28px; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: #38ae78; }
.share-success strong { color: #237951; font-size: 13px; }
.share-success p { margin: 3px 0 0; color: #6c8c7c; font-size: 10px; }
.copy-row { display: flex; gap: 8px; }
.copy-row .text-input { min-width: 0; flex: 1; color: #58708e; background: #f7f9fc; font-size: 11px; }
.upload-progress { position: fixed; z-index: 20; right: 24px; bottom: 24px; width: min(360px, calc(100vw - 48px)); padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.upload-progress-head { display: flex; margin-bottom: 11px; justify-content: space-between; font-size: 12px; }
.upload-progress-head span { color: var(--blue); }
.progress-track { overflow: hidden; height: 5px; border-radius: 5px; background: #eaf0f7; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width .15s; }
.toast-region { position: fixed; z-index: 100; right: 22px; top: 22px; display: grid; gap: 8px; }
.toast { min-width: 230px; padding: 12px 15px; border-radius: 9px; color: #fff; background: #21354f; box-shadow: 0 8px 26px rgba(19,39,65,.2); font-size: 12px; animation: toast-in .2s ease-out; }
.toast--error { background: #a9323c; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.share-page { background: #f4f7fb; }
.public-header { display: flex; height: 72px; padding: 0 max(28px, calc((100% - 1120px) / 2)); align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #fff; }
.public-header .sidebar-brand { color: var(--ink); }
.public-tag { padding: 7px 11px; border-radius: 16px; color: #64738a; background: #f3f6fa; font-size: 10px; }
.public-main { width: min(1120px, calc(100% - 40px)); margin: 36px auto; }
.share-hero { display: flex; margin-bottom: 24px; align-items: center; gap: 20px; }
.share-folder-icon { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 17px; color: #e29a15; background: #fff3d3; font-size: 28px; }
.share-hero h1 { margin: 0 0 7px; font-size: 27px; letter-spacing: -.03em; }
.share-hero p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.public-card { min-height: 420px; }
.public-toolbar { display: flex; min-height: 60px; padding: 0 22px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.public-toolbar .breadcrumbs { font-size: 13px; }
.public-toolbar > span { font-size: 10px; }
.public-footer { margin: 25px 0 0; color: #9ca7b6; font-size: 10px; text-align: center; }
.single-share-main { display: grid; min-height: calc(100vh - 72px); padding: 34px 20px; place-items: center; }
.single-share-card { width: min(520px, 100%); padding: 55px 45px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 20px 55px rgba(32,60,98,.08); text-align: center; }
.single-file-icon { display: grid; width: 82px; height: 82px; margin: 0 auto 28px; place-items: center; border-radius: 24px; color: #347ad3; background: #edf5ff; font-size: 36px; }
.single-share-card h1 { overflow-wrap: anywhere; margin: 0 0 10px; font-size: 25px; }
.download-primary { min-width: 190px; margin: 30px auto; }
.security-note { padding: 13px; border-radius: 9px; color: #718096; background: #f7f9fc; font-size: 10px; }
.security-note span { color: #35a570; }
.error-page { background: #f5f8fc; }
.error-shell { display: flex; min-height: 100vh; padding: 30px; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.error-shell .sidebar-brand { position: absolute; left: 30px; top: 25px; color: var(--ink); }
.error-code { color: #d5e5fa; font-size: 130px; font-weight: 900; letter-spacing: -.08em; line-height: .9; }
.error-shell h1 { margin: 25px 0 8px; }
.error-shell p { max-width: 520px; margin: 0 0 25px; color: var(--muted); }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; padding: 25px; }
  .mobile-brand { display: flex; }
  .app-shell { display: block; }
  .sidebar { position: static; width: auto; height: 68px; padding: 10px 18px; flex-direction: row; align-items: center; }
  .sidebar-brand small, .sidebar-info, .logout-form { display: none; }
  .sidebar-nav { display: flex; margin: 0 0 0 auto; }
  .sidebar-nav .nav-item { min-height: 40px; }
  .workspace { padding: 0 16px 20px; }
  .topbar { min-height: 84px; }
  .account-chip { display: none; }
  .content-card { min-height: calc(100vh - 172px); }
  .drop-zone { inset: 100px 20px 30px; }
  .file-table { min-width: 760px; }
}

@media (max-width: 700px) {
  .file-table { min-width: 0; table-layout: fixed; }
  .file-table th:first-child { width: 76%; }
  .file-table th:last-child { width: 24%; }
  .file-table th:nth-child(2),
  .file-table th:nth-child(3),
  .file-table td:nth-child(2),
  .file-table td:nth-child(3) { display: none; }
  .file-table th, .file-table td { padding-right: 14px; padding-left: 14px; }
  .file-name { gap: 9px; }
  .shared-badge { display: none; }
}

@media (max-width: 600px) {
  .sidebar-brand > span:last-child { display: none; }
  .sidebar-nav .nav-item { padding: 0 9px; }
  .sidebar-nav .nav-item > span { display: none; }
  .breadcrumbs { font-size: 15px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .search-box { width: 100%; }
  .public-main { width: calc(100% - 24px); margin-top: 24px; }
  .public-header { height: 64px; padding: 0 14px; }
  .public-tag { display: none; }
  .share-hero { gap: 13px; }
  .share-folder-icon { width: 50px; height: 50px; border-radius: 13px; }
  .share-hero h1 { font-size: 21px; }
  .single-share-card { padding: 40px 22px; }
  .copy-row { flex-direction: column; }
}

