:root {
  --navy: #172b4d;
  --blue: #1457d9;
  --blue-dark: #0f3f9c;
  --sky: #eaf2ff;
  --ink: #18253a;
  --muted: #6d798c;
  --line: #e6eaf0;
  --surface: #ffffff;
  --background: #f4f7fb;
  --green: #2eb67d;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 8%, rgba(44, 105, 210, .08), transparent 26rem),
    var(--background);
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.page-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 76px);
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(15px);
}

.brand { display: flex; align-items: center; gap: 14px; color: var(--navy); text-decoration: none; }
.brand img { display: block; width: 158px; height: 49px; object-fit: contain; }
.topbar-actions { display: flex; align-items: center; gap: 22px; }
.status { color: #536174; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(46,182,125,.12); }
.help-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; }
.help-button:hover { border-color: #b8c6dc; background: #f8faff; }
.help-button svg { width: 20px; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; flex: 1; }
.hero { min-height: 250px; display: flex; align-items: center; justify-content: space-between; position: relative; padding: 48px 8px 38px; overflow: hidden; }
.eyebrow { margin: 0 0 12px; color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .16em; }
.hero h1 { font: 800 clamp(30px, 4vw, 46px)/1.12 Manrope, sans-serif; letter-spacing: -.035em; margin: 0; color: var(--navy); }
.hero-copy { max-width: 530px; margin: 14px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.hero-art { position: relative; width: 260px; height: 145px; margin-right: 45px; }
.folder-shape { position: absolute; right: 5px; bottom: 5px; width: 205px; height: 117px; border-radius: 16px 24px 20px 20px; background: linear-gradient(135deg, #1c62df, #12419d); transform: rotate(-4deg); box-shadow: 0 24px 40px rgba(30,76,152,.2); }
.folder-shape::before { content: ""; position: absolute; width: 85px; height: 25px; left: 0; top: -13px; border-radius: 12px 15px 0 0; background: #2b71ea; }
.folder-shape::after { content: ""; position: absolute; inset: 12px 10px auto; height: 96px; border-radius: 13px 13px 18px 18px; background: linear-gradient(155deg, #4285f4, #1d5bca); }
.download-shape { position: absolute; z-index: 2; display: grid; place-items: center; right: 78px; top: 32px; width: 78px; height: 78px; border-radius: 20px; background: white; box-shadow: 0 16px 30px rgba(16,47,96,.2); transform: rotate(4deg); }
.download-shape svg { width: 42px; fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.content-card { background: var(--surface); border: 1px solid rgba(221,227,235,.9); border-radius: 18px; box-shadow: 0 12px 35px rgba(25,44,75,.07); overflow: hidden; }
.toolbar { min-height: 124px; padding: 25px 30px 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; border-bottom: 1px solid var(--line); }
.breadcrumb { min-height: 21px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.breadcrumb button { border: 0; padding: 0; background: none; color: var(--blue); cursor: pointer; }
.breadcrumb span:last-child { color: var(--muted); }
.breadcrumb .separator { color: #b2bac6; }
.title-row { display: flex; align-items: center; gap: 12px; }
.back-button { height: 34px; display: inline-flex; align-items: center; gap: 5px; padding: 0 11px 0 8px; border: 1px solid #dce3ed; border-radius: 9px; background: white; color: var(--blue); font-size: 12px; font-weight: 700; cursor: pointer; }
.back-button[hidden] { display: none; }
.back-button:hover { border-color: #b7caeb; background: var(--sky); }
.back-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.toolbar h2 { font: 700 22px/1.25 Manrope, sans-serif; color: var(--navy); margin: 0; }
.item-count { color: var(--muted); margin: 5px 0 0; font-size: 13px; }
.search-box { width: min(370px, 45%); height: 44px; flex: none; display: flex; align-items: center; gap: 10px; border: 1px solid #dce2eb; border-radius: 11px; padding: 0 12px; background: #fafbfd; transition: .2s; }
.search-box:focus-within { border-color: var(--blue); background: white; box-shadow: 0 0 0 3px rgba(20,87,217,.1); }
.search-box svg { width: 18px; flex: none; fill: none; stroke: #778399; stroke-width: 1.8; stroke-linecap: round; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-box input::placeholder { color: #929cac; }
.search-box kbd { border: 1px solid #d9dee7; background: white; color: #8a95a6; border-radius: 5px; padding: 2px 6px; font: 10px "DM Sans"; box-shadow: 0 1px 1px #e5e9ee; }

.table-wrap { min-height: 355px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { height: 46px; padding: 0 16px; text-align: left; background: #fbfcfe; border-bottom: 1px solid var(--line); color: #818b9c; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
th:first-child, td:first-child { padding-left: 30px; width: 53%; }
th:nth-child(2) { width: 21%; }
th:nth-child(3) { width: 14%; }
th:last-child { width: 12%; }
.sort-button { padding: 0; border: 0; background: transparent; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: inherit; font-size: inherit; cursor: pointer; }
.sort-button:hover, .sort-button.active { color: var(--blue); }
.sort-button span { margin-left: 3px; }
td { height: 68px; padding: 0 16px; border-bottom: 1px solid #edf0f4; color: #59667a; font-size: 13px; transition: background .16s; }
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: #f8faff; }
.file-cell { display: flex; align-items: center; min-width: 0; }
.file-icon { width: 37px; height: 37px; flex: none; display: grid; place-items: center; margin-right: 14px; border-radius: 9px; background: #eef4ff; color: var(--blue); }
.file-icon.folder { background: #fff3d8; color: #e19a16; }
.file-icon.video { background: #f2eefe; color: #7653cc; }
.file-icon.config { background: #e8f7f1; color: #26966e; }
.file-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.file-name { color: #26364e; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-row .file-name { color: var(--navy); }
.file-type { display: block; color: #9aa3b0; font-size: 11px; font-weight: 400; margin-top: 3px; text-transform: uppercase; letter-spacing: .03em; }
.action-cell { text-align: right; padding-right: 30px; }
.download-button, .open-button { width: 35px; height: 35px; display: inline-grid; place-items: center; border: 1px solid transparent; background: transparent; border-radius: 9px; cursor: pointer; color: #69778b; }
.download-button:hover, .open-button:hover { color: var(--blue); background: var(--sky); border-color: #dce8ff; }
.download-button svg, .open-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.empty-state { text-align: center; padding: 62px 20px; color: var(--muted); }
.empty-icon { margin: auto; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--sky); color: var(--blue); }
.empty-icon svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.empty-state h3 { color: var(--navy); margin: 15px 0 5px; font-size: 16px; }
.empty-state p { margin: 0; font-size: 13px; }

.security-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 20px 0 44px; color: #758194; font-size: 12px; }
.security-note svg { width: 17px; fill: none; stroke: #3b9c78; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
footer { min-height: 74px; border-top: 1px solid var(--line); background: white; color: #8b95a5; display: flex; justify-content: space-between; align-items: center; padding: 0 max(24px, calc((100% - 1180px)/2)); font-size: 11px; }
footer a { color: var(--blue); font-weight: 600; text-decoration: none; }

.toast { position: fixed; z-index: 10; right: 25px; bottom: 25px; display: flex; align-items: center; gap: 12px; min-width: 265px; padding: 14px 17px; border-radius: 12px; background: #172b4d; color: white; box-shadow: 0 14px 35px rgba(16,36,68,.28); transform: translateY(120%); opacity: 0; transition: .3s ease; pointer-events: none; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--green); font-weight: 700; }
.toast strong, .toast small { display: block; }
.toast strong { font-size: 13px; }
.toast small { margin-top: 2px; color: #b8c4d5; font-size: 11px; }

dialog { max-width: 400px; border: 0; border-radius: 18px; padding: 32px; box-shadow: 0 25px 80px rgba(11,31,65,.3); text-align: center; color: var(--muted); }
dialog::backdrop { background: rgba(13,30,56,.5); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; right: 14px; top: 10px; border: 0; background: none; font-size: 27px; color: #8e98a7; cursor: pointer; }
.dialog-icon { width: 48px; height: 48px; margin: auto; display: grid; place-items: center; border-radius: 14px; background: var(--sky); color: var(--blue); font-size: 22px; font-weight: 700; }
dialog h2 { color: var(--navy); margin: 16px 0 8px; font: 700 21px Manrope; }
dialog p { font-size: 14px; line-height: 1.6; margin: 0 0 22px; }
.dialog-primary { border: 0; border-radius: 9px; background: var(--blue); color: white; padding: 10px 25px; cursor: pointer; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 780px) {
  .topbar { padding: 0 20px; height: 72px; }
  .status { display: none; }
  main { width: min(100% - 24px, 1180px); }
  .hero { min-height: 208px; padding: 36px 5px; }
  .hero-art { display: none; }
  .toolbar { align-items: stretch; flex-direction: column; gap: 18px; padding: 23px 20px; }
  .search-box { width: 100%; }
  th:first-child, td:first-child { padding-left: 20px; width: auto; }
  th:nth-child(2), td:nth-child(2) { display: none; }
  th:nth-child(3) { width: 90px; }
  th:last-child { width: 62px; }
  .action-cell { padding-right: 16px; }
  footer { padding: 20px 24px; gap: 10px; flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .brand img { width: 138px; height: 43px; }
  .hero h1 { font-size: 30px; }
  .hero-copy { font-size: 14px; }
  .search-box kbd { display: none; }
  td { height: 64px; }
  th:nth-child(3), td:nth-child(3) { display: none; }
  .security-note { text-align: center; align-items: flex-start; padding: 0 15px; }
}

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