:root {
  color-scheme: light;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: #202537;
  background: #f5f6fb;
  --ink: #202537;
  --quiet: #5b6377;
  --line: #e5e8f0;
  --brand: #4025bd;
  --pale: #ece8ff;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #7157f2; outline-offset: 3px; }
.topbar {
  display: grid; grid-template-columns: 190px minmax(0, 660px) 1fr; align-items: center; gap: 20px;
  min-height: 72px; padding: 12px 28px; background: #fff; border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; gap: 11px; align-items: center; font-weight: 760; font-size: 1.25rem; color: #291b74; width: fit-content; }
.brand-mark, .big-mark { display: grid; place-items: center; background: var(--brand); color: #fff; border-radius: 12px; font-size: 1.5rem; line-height: 1; }
.brand-mark { width: 39px; height: 39px; }
.big-mark { width: 60px; height: 60px; font-size: 2rem; }
#search { display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 0 14px; background: #f0eef8; color: #504681; }
#search > span { font-size: 1.5rem; }
#query { padding: 10px 0; background: transparent; border: 0; min-width: 0; width: 100%; color: var(--ink); }
#query:focus-visible { outline-offset: 1px; }
.identity { display: flex; justify-content: flex-end; align-items: center; gap: 16px; font-size: .93rem; color: var(--quiet); justify-self: end; }
.bare, .icon, .action, .title-button, .crumb { background: none; border: 0; padding: 4px; color: inherit; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 10px; min-height: 40px; padding: 8px 15px; font-weight: 670; white-space: nowrap; }
.primary { background: var(--brand); color: white; }
.primary:hover { background: #321d9c; }
.secondary { color: #443397; background: #fff; border-color: #dcd4f6; }
.secondary:hover { background: #f4f0ff; }
.login-panel { min-height: calc(100svh - 72px); display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 35% 20%, #e9e1ff 0%, #f4f5fb 57%); }
.login-card { width: min(100%, 480px); padding: 46px; background: white; border: 1px solid #e4ddf6; border-radius: 22px; box-shadow: 0 18px 60px #42318712; }
.login-card h1 { font-size: clamp(1.8rem, 5vw, 2.35rem); margin: 22px 0 3px; }
.login-card p { color: var(--quiet); margin: 0 0 24px; }
#login-status { font-size: .9rem; margin: 12px 0 0; }
#login-status:empty { display: none; }
.workspace { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100svh - 72px); }
.sidebar { padding: 30px 18px; border-right: 1px solid var(--line); background: #f9f9fe; }
.upload { width: 100%; min-height: 47px; box-shadow: 0 6px 14px #4025bd1c; }
.sidebar nav { margin-top: 26px; display: grid; gap: 5px; }
.nav { width: 100%; border: 0; background: transparent; color: var(--quiet); border-radius: 9px; padding: 11px 13px; text-align: left; }
.nav span { margin-right: 9px; }
.nav.active { background: var(--pale); color: #36208f; font-weight: 720; }
.nav:hover:not(.active) { background: #efedf7; }
.library { min-width: 0; padding: 30px clamp(15px, 3vw, 48px); }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
h1 { margin: 2px 0 0; line-height: 1.2; font-size: 2rem; }
#breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .875rem; color: #5e527f; }
.crumb+ .crumb::before { content: "/"; padding-right: 8px; color: #827496; }
.crumb:hover, .title-button:hover, a:hover { text-decoration: underline; }
.file-area { min-height: 270px; background: white; border: 1px solid var(--line); border-radius: 15px; overflow: auto; }
table { width: 100%; border-collapse: collapse; table-layout: auto; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); }
th { font-weight: 650; color: var(--quiet); font-size: .875rem; white-space: nowrap; background: #fafaff; }
td { font-size: .95rem; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #f8f6ff; }
.file-title { font-weight: 610; min-width: 140px; }
.title-button { font-weight: inherit; max-width: calc(100% - 34px); text-align: left; overflow-wrap: anywhere; }
.entry-icon { font-size: 1.15rem; color: var(--brand); display: inline-block; width: 25px; }
.folder-icon { color: #79511d; }
.file-type, .file-time, .file-size { color: var(--quiet); white-space: nowrap; }
.row-actions { display: flex; flex-wrap: wrap; gap: 3px 9px; color: #584788; font-size: .875rem; }
.action:hover { text-decoration: underline; color: #36208f; }
.empty { text-align: center; padding: 46px 12px; color: var(--quiet); }
.empty span { color: #7a6bac; font-size: 2rem; }
.empty h2 { color: var(--ink); font-size: 1.1rem; margin: 5px 0; }
.empty p { margin: 3px 0 0; font-size: .9rem; }
#notice { min-height: 1.45em; color: #51466e; }
dialog { max-width: calc(100vw - 28px); width: min(480px, 100%); border: 1px solid #e3dbf3; border-radius: 15px; padding: 20px; color: var(--ink); }
dialog::backdrop { background: #1d153c8c; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 15px; }
.dialog-head h2 { margin: 0; font-size: 1.2rem; overflow-wrap: anywhere; }
.icon { min-width: 33px; min-height: 33px; border-radius: 8px; font-size: 1.5rem; line-height: 1; }
.icon:hover { background: var(--pale); }
dialog label { display: grid; gap: 6px; font-size: .95rem; }
dialog input, dialog select { min-width: 0; border: 1px solid #cfc8e3; border-radius: 8px; padding: 8px; color: var(--ink); }
#entry-note { color: #9d273b; font-size: .9rem; min-height: .6em; }
.dialog-actions { display: flex; align-items: center; justify-content: end; gap: 8px; }
.report-viewer { height: 100vh; height: 100dvh; overflow: hidden; background: white; }
.report-viewer iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 935px) {
  .workspace { grid-template-columns: 171px minmax(0, 1fr); }
  .topbar { grid-template-columns: 150px minmax(0, 1fr) auto; padding-inline: 18px; }
  .file-time, th:nth-child(3) { display: none; }
}
@media (max-width: 630px) {
  .topbar { grid-template-columns: 1fr auto; gap: 9px; padding: 10px 13px; }
  .topbar #search { grid-row: 2; grid-column: 1/-1; }
  .identity { grid-row: 1; grid-column: 2; gap: 9px; }
  .workspace { display: block; }
  .sidebar { display: flex; padding: 10px; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); border-right: 0; }
  .sidebar nav { display: flex; margin-top: 0; gap: 2px; }
  .sidebar .nav { width: auto; padding-inline: 8px; white-space: nowrap; }
  .sidebar .nav span { display: none; }
  .upload { width: auto; min-height: 38px; font-size: .88rem; padding-inline: 8px; }
  .library { padding-top: 20px; }
  h1 { font-size: 1.6rem; }
  th, td { padding: 10px 7px; }
  .file-size, .file-type, th:nth-child(2), th:nth-child(4) { display: none; }
  .file-title { min-width: 120px; }
  .row-actions { gap: 1px 3px; }
  .file-actions .download { display: none; }
}
