:root {
  color-scheme: light;
  --navy: #12304a;
  --ink: #13283a;
  --muted: #5b6f7c;
  --canvas: #f3f6f7;
  --surface: #fff;
  --line: #dce4e9;
  --teal: #167c70;
  --teal-soft: #eaf7f4;
  font-family: Inter, Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 92% 0%, rgba(76, 145, 156, .08), transparent 30rem), var(--canvas);
  line-height: 1.55;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 38px;
  border-bottom: 1px solid #d9e2e7;
  color: #6b7e89;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
}
.portal-topbar p { margin: 0; font-size: 13px; font-weight: 500; }
.portal-topbar p span { margin: 0 8px; color: #a2b0b8; }
.portal-topbar > span { color: #687c89; font-size: 11px; font-weight: 650; }

.browser-container { width: min(1180px, calc(100% - 56px)); margin: 0 auto; padding: 20px 0 42px; }
.browser-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.browser-header h1 { margin: 0 0 5px; font-size: clamp(32px, 4vw, 42px); letter-spacing: -.04em; line-height: 1.15; }
.browser-header p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 500; }
.readonly-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #bee1d9; border-radius: 999px; color: #196f62; background: var(--teal-soft); font-size: 11px; font-weight: 800; white-space: nowrap; }
.readonly-badge i { width: 8px; height: 8px; border-radius: 50%; background: #27a891; box-shadow: 0 0 0 4px rgba(39, 168, 145, .12); }

.explorer { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 9px 28px rgba(18, 48, 74, .055); }
.explorer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: #fbfcfc; }
.navigation-actions { display: flex; gap: 7px; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid #d5e0e5; border-radius: 10px; color: #425d6e; background: #fff; }
.icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover:not(:disabled) { color: var(--teal); border-color: #9dcfc5; background: #f5fbf9; }
.icon-button:disabled { cursor: default; opacity: .38; }

.search-form { display: flex; align-items: center; width: min(480px, 100%); min-height: 40px; padding-left: 12px; border: 1px solid #cddae1; border-radius: 10px; background: #fff; transition: border-color 150ms ease, box-shadow 150ms ease; }
.search-form:focus-within { border-color: #68b7a8; box-shadow: 0 0 0 3px rgba(48, 155, 137, .12); }
.search-form svg { flex: 0 0 auto; width: 18px; height: 18px; fill: none; stroke: #6d818d; stroke-width: 1.8; stroke-linecap: round; }
.search-form input { min-width: 0; flex: 1; height: 38px; padding: 0 10px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search-form button { align-self: stretch; padding: 0 15px; border: 0; border-left: 1px solid #e1e7ea; border-radius: 0 9px 9px 0; color: #fff; background: var(--navy); font-size: 12px; font-weight: 750; }

.breadcrumbs { display: flex; align-items: center; gap: 5px; min-height: 50px; padding: 10px 20px; overflow-x: auto; border-bottom: 1px solid var(--line); white-space: nowrap; scrollbar-width: thin; }
.breadcrumb-button { padding: 5px 7px; border: 0; border-radius: 7px; color: #3b596b; background: transparent; font-size: 12px; font-weight: 700; }
.breadcrumb-button:hover { color: var(--teal); background: var(--teal-soft); }
.breadcrumb-separator { color: #a3b0b8; font-size: 13px; }
.breadcrumb-home { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb-home svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.list-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 9px 20px; border-bottom: 1px solid var(--line); color: #627785; background: #f8fafb; }
.list-summary p { margin: 0; font-size: 11px; font-weight: 650; }
.list-summary button { padding: 5px 9px; border: 1px solid #cddae1; border-radius: 7px; color: #3f5b6c; background: #fff; font-size: 11px; font-weight: 700; }

.error-banner { margin: 16px 18px 0; padding: 13px 15px; border: 1px solid #e8c2bd; border-radius: 10px; color: #87433c; background: #fff4f3; font-size: 13px; font-weight: 650; }
.file-table-wrap { overflow-x: auto; }
.file-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.file-table th, .file-table td { height: 54px; padding: 10px 18px; border-bottom: 1px solid #e5eaed; text-align: left; vertical-align: middle; }
.file-table th { height: 43px; color: #627784; background: #fff; font-size: 10px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.file-table th:first-child { width: auto; }
.file-table th:nth-child(2) { width: 115px; }
.file-table th:nth-child(3) { width: 175px; }
.file-table th:last-child { width: 74px; }
.file-table tbody tr:last-child td { border-bottom: 0; }
.file-table tbody tr:hover td { background: #fbfdfd; }
.name-cell { min-width: 0; }
.file-name-wrap { display: flex; align-items: center; min-width: 0; gap: 12px; }
.file-name-block { display: flex; min-width: 0; flex-direction: column; }
.file-icon { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #597384; background: #eef3f5; }
.file-icon.folder { color: #a76718; background: #fff3dc; }
.file-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.file-name, .folder-button { min-width: 0; overflow: hidden; color: #253f50; font-size: 13px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.folder-button { max-width: 100%; padding: 4px 2px; border: 0; background: transparent; text-align: left; }
.folder-button:hover { color: var(--teal); text-decoration: underline; }
.item-location { overflow: hidden; margin-top: 2px; color: #82939c; font-size: 10px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { color: #687c88; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.download-button { display: grid; place-items: center; width: 36px; height: 36px; margin-left: auto; border: 1px solid #cedbe1; border-radius: 9px; color: #35596c; background: #fff; text-decoration: none; }
.download-button:hover { color: #fff; border-color: var(--teal); background: var(--teal); }
.download-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.loading-row, .empty-row { height: 150px !important; color: #6b7f8b; text-align: center !important; font-size: 13px; font-weight: 600; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 15px; min-height: 60px; padding: 10px 18px; border-top: 1px solid var(--line); }
.pagination button { min-width: 64px; padding: 7px 11px; border: 1px solid #cedae0; border-radius: 8px; color: #3f5c6d; background: #fff; font-size: 11px; font-weight: 750; }
.pagination button:hover:not(:disabled) { color: var(--teal); border-color: #8fc8bd; }
.pagination button:disabled { cursor: default; opacity: .4; }
.pagination span { color: #657985; font-size: 11px; font-weight: 650; }
.page-note { margin: 16px 0 0; color: #657985; font-size: 11px; text-align: center; }

button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #e49b36; outline-offset: 2px; }

@media (max-width: 760px) {
  .portal-topbar { min-height: 58px; padding: 0 18px; }
  .portal-topbar p { font-size: 11px; font-weight: 800; letter-spacing: .06em; }
  .portal-topbar > span { display: none; }
  .browser-container { width: min(100% - 28px, 1180px); padding-top: 18px; }
  .browser-header { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 17px; }
  .browser-header h1 { font-size: 30px; }
  .browser-header p { font-size: 13px; }
  .explorer-toolbar { align-items: stretch; flex-direction: column; padding: 14px; }
  .navigation-actions { order: 2; }
  .search-form { order: 1; width: 100%; }
  .file-table th:nth-child(2), .file-table td:nth-child(2) { display: none; }
  .file-table th:nth-child(3) { width: 130px; }
  .file-table th:last-child { width: 60px; }
  .file-table th, .file-table td { padding-right: 12px; padding-left: 12px; }
}

@media (max-width: 480px) {
  .file-table th:nth-child(3), .file-table td:nth-child(3) { display: none; }
  .breadcrumbs, .list-summary { padding-right: 14px; padding-left: 14px; }
}
