:root {
  color-scheme: dark;
  --bg: #080b16;
  --bg-soft: #0c1120;
  --panel: rgba(17, 24, 42, 0.88);
  --panel-solid: #11182a;
  --panel-raised: #172035;
  --line: rgba(151, 166, 202, 0.16);
  --line-strong: rgba(151, 166, 202, 0.28);
  --text: #f6f7fb;
  --muted: #929db8;
  --muted-strong: #b8c1d8;
  --violet: #9b87ff;
  --violet-strong: #785df2;
  --cyan: #63e8e0;
  --success: #48d7a1;
  --warning: #f7c96c;
  --danger: #ff7189;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  font-family: Inter, Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  color: var(--text);
  line-height: 1.5;
}

body.is-locked {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
a,
label[for] {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(99, 232, 224, 0.78);
  outline-offset: 3px;
}

.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;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}

.ambient-one {
  top: -240px;
  left: 24%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(119, 83, 242, 0.15), transparent 68%);
}

.ambient-two {
  top: 44%;
  right: -300px;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(49, 211, 202, 0.08), transparent 70%);
}

.app-shell {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  opacity: 1;
  transition: opacity 200ms ease, filter 200ms ease;
}

.is-locked .app-shell {
  pointer-events: none;
  opacity: 0.34;
  filter: blur(8px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand-copy {
  display: grid;
  line-height: 1.12;
}

.brand-copy strong {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 8px);
  grid-template-rows: repeat(3, 8px);
  width: 32px;
  height: 32px;
  transform: rotate(-8deg);
}

.brand-mark span {
  display: block;
  background: var(--violet);
  box-shadow: 0 0 20px rgba(155, 135, 255, 0.32);
}

.brand-mark span:nth-child(1) { grid-area: 1 / 1; }
.brand-mark span:nth-child(2) { grid-area: 2 / 1; }
.brand-mark span:nth-child(3) { grid-area: 3 / 2; }
.brand-mark span:nth-child(4) { grid-area: 3 / 3; }
.brand-mark span:nth-child(5) { grid-area: 2 / 3; background: var(--cyan); }

.brand-mark-large {
  grid-template-columns: repeat(3, 12px);
  grid-template-rows: repeat(3, 12px);
  width: 46px;
  height: 46px;
  margin-bottom: 24px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-chip,
.limit-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.025);
  color: var(--muted-strong);
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(247, 201, 108, 0.12);
}

.status-chip.is-healthy .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(72, 215, 161, 0.12);
}

.status-chip.is-error .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 113, 137, 0.12);
}

main {
  padding: 80px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px;
  padding-bottom: 64px;
}

.eyebrow,
.section-number {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(48px, 6.2vw, 88px);
  font-weight: 700;
  letter-spacing: -0.062em;
  line-height: 0.98;
}

.hero h1 span {
  color: var(--violet);
}

.hero-copy {
  max-width: 620px;
  margin: 27px 0 0;
  color: var(--muted-strong);
  font-size: 16px;
  line-height: 1.75;
}

.hero-meta {
  display: grid;
  min-width: 240px;
  padding: 22px 0 4px 24px;
  border-left: 1px solid var(--line-strong);
}

.hero-meta > span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.hero-meta a {
  margin-top: 7px;
  font-size: 20px;
  font-weight: 650;
  text-decoration: none;
}

.hero-meta a:hover {
  color: var(--cyan);
}

.hero-meta small {
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(12, 17, 32, 0.72);
  backdrop-filter: blur(18px);
}

.metric-card {
  min-width: 0;
  padding: 24px 25px 22px;
  border-right: 1px solid var(--line);
}

.metric-card:last-child {
  border-right: 0;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.metric-index {
  color: rgba(155, 135, 255, 0.62);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
}

.metric-card > strong {
  display: block;
  min-height: 42px;
  margin: 18px 0 5px;
  overflow: hidden;
  font-size: clamp(25px, 2.5vw, 34px);
  font-weight: 640;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card > small {
  color: var(--muted);
  font-size: 11px;
}

.metric-status {
  color: var(--warning);
}

.metric-status.is-healthy { color: var(--success); }
.metric-status.is-error { color: var(--danger); }

.usage-track,
.progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.usage-track {
  margin: 12px 0 8px;
}

.usage-track span,
.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transition: width 300ms ease;
}

.usage-track.is-warning span { background: var(--warning); }
.usage-track.is-danger span { background: var(--danger); }

.panel {
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 32px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.panel-heading p:not(.section-number) {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section-number {
  margin-bottom: 8px;
  font-size: 9px;
}

.limit-label {
  flex: 0 0 auto;
  color: var(--muted);
}

.upload-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(400px, 1.1fr);
  gap: 34px;
  padding: 34px;
}

.dropzone {
  display: flex;
  min-height: 360px;
  padding: 42px 24px;
  border: 1px dashed rgba(155, 135, 255, 0.38);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 15%, rgba(155, 135, 255, 0.1), transparent 42%),
    rgba(8, 12, 24, 0.52);
  cursor: pointer;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--cyan);
  background: rgba(31, 53, 69, 0.4);
  transform: translateY(-2px);
}

.dropzone:focus-within,
.file-picker:focus-within {
  outline: 3px solid rgba(99, 232, 224, 0.78);
  outline-offset: 3px;
}

.dropzone input,
.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-visual {
  display: grid;
  width: 68px;
  height: 68px;
  margin-bottom: 26px;
  border: 1px solid rgba(155, 135, 255, 0.35);
  border-radius: 20px;
  background: rgba(155, 135, 255, 0.09);
  place-items: center;
  transform: rotate(5deg);
}

.drop-visual span {
  color: var(--violet);
  font-size: 31px;
  font-weight: 300;
  transform: rotate(-5deg);
}

.dropzone > strong {
  font-size: 17px;
}

.dropzone > span:not(.drop-visual) {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.dropzone > small {
  max-width: 90%;
  margin-top: 23px;
  overflow: hidden;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-fields {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.field-group + .field-group {
  margin-top: 22px;
}

.field-label {
  display: block;
  margin: 0 0 9px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 650;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  background: rgba(7, 10, 20, 0.66);
  color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input {
  padding: 0 14px;
}

select {
  padding: 0 36px 0 13px;
}

input::placeholder {
  color: #626d88;
}

input:focus,
select:focus {
  border-color: rgba(99, 232, 224, 0.64);
  box-shadow: 0 0 0 3px rgba(99, 232, 224, 0.08);
}

.path-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(7, 10, 20, 0.66);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.path-field:focus-within {
  border-color: rgba(99, 232, 224, 0.64);
  box-shadow: 0 0 0 3px rgba(99, 232, 224, 0.08);
}

.path-field span {
  display: flex;
  align-items: center;
  padding-left: 14px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.path-field input {
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.field-help {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.url-preview {
  display: grid;
  min-width: 0;
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(155, 135, 255, 0.055);
}

.url-preview span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.url-preview strong {
  margin-top: 5px;
  overflow: hidden;
  color: var(--violet);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-progress {
  margin-top: 18px;
}

.upload-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted-strong);
  font-size: 10px;
}

.progress-track {
  height: 5px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 650;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, opacity 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.button-primary {
  background: linear-gradient(135deg, #8e76ff, #7259e9);
  color: white;
  box-shadow: 0 13px 30px rgba(114, 89, 233, 0.2);
}

.button-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #a18cff, #8065f4);
}

.button-quiet {
  border-color: var(--line);
  background: rgba(255,255,255,0.035);
  color: var(--muted-strong);
}

.button-quiet:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: rgba(255,255,255,0.065);
  color: var(--text);
}

.button-danger {
  background: var(--danger);
  color: #1c0710;
}

.button-wide {
  width: 100%;
}

.deploy-button {
  width: 100%;
  min-height: 52px;
  margin-top: 22px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.search-field {
  position: relative;
  width: min(500px, 100%);
}

.search-field span {
  position: absolute;
  top: 50%;
  left: 15px;
  color: var(--muted);
  font-size: 20px;
  transform: translateY(-54%);
}

.search-field input {
  min-height: 42px;
  padding-left: 43px;
}

.sort-field {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.sort-field select {
  width: 140px;
  min-height: 42px;
  font-size: 11px;
}

.table-wrap {
  position: relative;
  min-height: 250px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

td {
  color: var(--muted-strong);
  font-size: 12px;
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover {
  background: rgba(255,255,255,0.022);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.file-cell {
  display: grid;
  min-width: 220px;
}

.file-cell strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 620;
}

.file-cell small {
  max-width: 260px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.url-cell {
  display: flex;
  min-width: 280px;
  align-items: center;
  gap: 8px;
}

.url-cell code {
  display: block;
  max-width: 330px;
  overflow: hidden;
  color: var(--violet);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-button,
.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,0.03);
  color: var(--muted-strong);
  cursor: pointer;
  place-items: center;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.mini-button:hover,
.icon-button:hover {
  border-color: rgba(99, 232, 224, 0.35);
  background: rgba(99, 232, 224, 0.07);
  color: var(--cyan);
}

.action-cell {
  white-space: nowrap;
  text-align: right;
}

.action-button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}

.action-button:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.action-button.is-danger:hover {
  background: rgba(255, 113, 137, 0.08);
  color: var(--danger);
}

.empty-state,
.loading-state {
  display: grid;
  min-height: 250px;
  padding: 40px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-state[hidden],
.loading-state[hidden] {
  display: none;
}

.empty-state > span {
  margin-bottom: 13px;
  color: var(--violet);
  font-size: 26px;
}

.empty-state strong {
  font-size: 15px;
}

.empty-state p,
.loading-state {
  color: var(--muted);
  font-size: 11px;
}

.empty-state p {
  margin: 6px 0 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.pagination[hidden] { display: none; }

.pagination span {
  color: var(--muted);
  font-size: 11px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100px;
  color: var(--muted);
  font-size: 10px;
}

.dialog {
  width: min(520px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  overflow-y: auto;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--text);
}

.dialog::backdrop {
  background: rgba(3, 5, 11, 0.78);
  backdrop-filter: blur(10px);
}

.auth-dialog {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  margin: 0;
  padding: 24px;
  border-radius: 0;
  background: rgba(4, 7, 15, 0.8);
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  backdrop-filter: blur(14px);
}

.auth-dialog:not([open]) {
  display: none;
}

.dialog-card {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(25, 34, 57, 0.98), rgba(12, 17, 31, 0.98));
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.55);
}

.auth-card {
  max-width: 440px;
  margin: auto 0;
  padding: 42px;
}

.dialog-card h1,
.dialog-card h2 {
  margin: 0;
  letter-spacing: -0.035em;
}

.dialog-card h1 { font-size: 30px; }
.dialog-card h2 { font-size: 24px; }

.dialog-copy {
  margin: 10px 0 25px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.dialog-copy strong {
  color: var(--text);
}

.dialog-card > .field-label:not(:first-of-type) {
  margin-top: 20px;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.dialog-heading .eyebrow {
  margin-bottom: 7px;
}

.dialog-heading .icon-button {
  margin: -5px -5px 0 0;
  font-size: 22px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
}

.secret-field {
  position: relative;
}

.secret-field input {
  padding-right: 65px;
}

.text-button {
  position: absolute;
  top: 50%;
  right: 8px;
  min-width: 48px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  transform: translateY(-50%);
}

.text-button:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.auth-card .button-wide {
  min-height: 50px;
  margin-top: 23px;
}

.form-error {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 11px;
}

.file-picker {
  display: grid;
  min-height: 120px;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(7, 10, 20, 0.5);
  cursor: pointer;
  align-content: center;
  text-align: center;
}

.file-picker span {
  color: var(--violet);
  font-size: 12px;
  font-weight: 650;
}

.file-picker strong {
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.danger-card {
  text-align: center;
}

.danger-symbol {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 20px;
  border: 1px solid rgba(255, 113, 137, 0.35);
  border-radius: 17px;
  background: rgba(255, 113, 137, 0.09);
  color: var(--danger);
  font-size: 24px;
  font-weight: 700;
  place-items: center;
}

.danger-card .eyebrow {
  color: var(--danger);
}

.danger-card .dialog-actions {
  justify-content: center;
}

.toast-region {
  position: fixed;
  z-index: 400;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: min(380px, calc(100% - 44px));
  gap: 10px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(20, 28, 47, 0.96);
  box-shadow: 0 18px 50px rgba(0,0,0,0.38);
  color: var(--muted-strong);
  font-size: 12px;
  animation: toast-in 220ms ease both;
}

.toast::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
}

.toast.is-error::before { background: var(--danger); }
.toast.is-warning::before { background: var(--warning); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1080px) {
  .app-shell {
    width: min(100% - 40px, 1440px);
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card:nth-child(2) { border-right: 0; }
  .metric-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  .upload-grid {
    grid-template-columns: 1fr;
  }

  .dropzone {
    min-height: 250px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 28px, 1440px);
  }

  .topbar {
    min-height: 76px;
  }

  .status-chip {
    display: none;
  }

  main {
    padding-top: 52px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-bottom: 45px;
  }

  .hero h1 {
    font-size: clamp(43px, 13vw, 62px);
  }

  .hero-meta {
    min-width: 0;
    padding: 0 0 0 18px;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .metric-card {
    padding: 20px 18px;
  }

  .metric-card > strong {
    font-size: 25px;
  }

  .panel-heading {
    padding: 24px 20px;
  }

  .panel-heading h2 {
    font-size: 22px;
  }

  .limit-label {
    display: none;
  }

  .upload-grid {
    gap: 24px;
    padding: 20px;
  }

  .dropzone {
    min-height: 220px;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-field {
    justify-content: space-between;
  }

  .sort-field select {
    width: 160px;
  }

  table,
  tbody {
    display: block;
  }

  thead {
    display: none;
  }

  tbody {
    padding: 12px;
  }

  tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(8, 12, 23, 0.34);
  }

  tbody tr + tr {
    margin-top: 10px;
  }

  tbody td {
    display: block;
    padding: 0;
    border: 0;
  }

  tbody td:nth-child(1) { grid-column: 1 / -1; }
  tbody td:nth-child(2) { grid-column: 1 / -1; margin-top: 14px; }
  tbody td:nth-child(3) { margin-top: 15px; }
  tbody td:nth-child(4) { margin-top: 15px; text-align: right; }
  tbody td:nth-child(5) { grid-column: 1 / -1; margin-top: 13px; text-align: left; }

  .url-cell {
    min-width: 0;
  }

  .url-cell code {
    max-width: calc(100vw - 130px);
  }

  .action-button {
    min-height: 40px;
  }

  footer {
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    flex-direction: column;
  }

  .auth-card,
  .dialog-card {
    padding: 26px;
  }
}

@media (max-width: 480px) {
  .metrics {
    grid-template-columns: 1fr;
  }

  .metric-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-card:nth-child(3) { border-bottom: 1px solid var(--line); }
  .metric-card:last-child { border-bottom: 0; }

  .assets-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .assets-heading .button {
    width: 100%;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions .button {
    width: 100%;
  }
}

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