:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #162033;
  --muted: #667085;
  --line: #d9e0e8;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --danger: #b42318;
  --success: #067647;
  --shadow: 0 18px 45px rgba(22, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

button,
.secondary-button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0 18px;
  text-decoration: none;
}

button:hover,
.secondary-button:hover {
  background: var(--accent-strong);
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px;
}

.topbar {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr auto auto;
  margin-bottom: 28px;
  padding: 14px;
}

.brand {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.brand-logo {
  align-items: center;
  display: inline-flex;
  min-height: 48px;
}

.brand-logo img {
  display: block;
  height: 42px;
  max-width: 170px;
  object-fit: contain;
  width: auto;
}

.tabs {
  background: #eef3f7;
  border-radius: 8px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
}

.tabs a {
  border-radius: 6px;
  color: var(--muted);
  font-weight: 700;
  padding: 9px 14px;
  text-decoration: none;
}

.tabs a.active {
  background: #fff;
  color: var(--ink);
}

.ghost {
  background: transparent;
  color: var(--muted);
  min-height: 38px;
}

.ghost:hover {
  background: #eef3f7;
  color: var(--ink);
}

.alert {
  border-radius: 8px;
  font-weight: 700;
  margin-bottom: 18px;
  padding: 13px 16px;
}

.alert.success {
  background: #dcfae6;
  color: var(--success);
}

.alert.error {
  background: #fee4e2;
  color: var(--danger);
}

.login-panel {
  align-items: center;
  display: grid;
  gap: 38px;
  grid-template-columns: minmax(0, 1fr) 390px;
  min-height: calc(100vh - 56px);
}

.login-panel h1,
.page-head h1 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
  margin: 0 0 14px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  margin: 0;
}

.form-card,
.upload-box,
.empty-state {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

label {
  color: var(--ink);
  display: grid;
  font-weight: 700;
  gap: 8px;
}

input {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  min-width: 0;
  padding: 0 12px;
}

.form-card {
  display: grid;
  gap: 16px;
}

.page-head {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin: 22px 0;
}

.upload-box {
  display: grid;
  gap: 18px;
}

.drop-zone {
  align-items: center;
  border: 2px dashed #a7b4c4;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  justify-items: center;
  min-height: 240px;
  padding: 28px;
  text-align: center;
}

.drop-zone input {
  max-width: 100%;
}

.drop-zone span {
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  margin-top: 12px;
}

.file-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.file-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview {
  align-items: center;
  background: #e8edf2;
  display: flex;
  height: 210px;
  justify-content: center;
}

.preview img,
.preview video {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.preview audio {
  max-width: 92%;
}

.file-icon {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-weight: 900;
  height: 86px;
  justify-content: center;
  width: 86px;
}

.file-info {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.file-info h2 {
  font-size: 17px;
  margin: 0;
  overflow-wrap: anywhere;
}

.file-info p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.link-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.link-row a,
.copy-button {
  align-items: center;
  background: #eef3f7;
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  text-decoration: none;
}

.copy-button {
  border: 1px solid transparent;
  cursor: pointer;
}

.copy-button:hover,
.link-row a:hover {
  background: #dce7ef;
}

.copy-button.copied {
  background: #dcfae6;
  color: var(--success);
}

.empty-state {
  margin-bottom: 18px;
}

.empty-state h2 {
  margin: 0 0 8px;
}

.site-footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 10px;
  justify-content: center;
  margin-top: 34px;
  padding: 18px 0 6px;
}

.site-footer img {
  display: block;
  height: 26px;
  max-width: 120px;
  object-fit: contain;
  width: auto;
}

@media (max-width: 760px) {
  .shell {
    padding: 18px;
  }

  .topbar,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .tabs,
  .tabs a,
  .topbar form,
  .topbar button {
    width: 100%;
  }

  .brand-logo {
    justify-content: center;
  }

  .page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .link-row {
    grid-template-columns: 1fr;
  }

  .login-panel {
    align-items: stretch;
    min-height: auto;
    padding-top: 28px;
  }

  .login-panel h1,
  .page-head h1 {
    font-size: 36px;
  }
}
