:root {
  --bg: #ffffff;
  --bg-soft: #f2f4ee;
  --bg-card: #ffffff;
  --text: #101828;
  --muted: #667085;
  --line: #e5e7eb;
  --line-strong: #cfd8ea;
  --blue: #2563eb;
  --blue-soft: #eef4ff;
  --blue-strong: #1d4ed8;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1100px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  background: #ffffff;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: #f8f9f6;
  border-bottom: 1px solid rgba(229, 231, 235, 0.72);
}

.topbar-inner {
  max-width: calc(var(--max-width) + 80px);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: auto;
  height: auto;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--blue);
  flex: none;
}

.brand-mark-image {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 28px 72px;
  background: #ffffff;
}

.page.home {
  max-width: 1240px;
}

.home {
  min-height: calc(100vh - 76px);
  display: grid;
  align-content: center;
  gap: 38px;
}

.home-hero {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  padding-top: 14px;
}

.home-title {
  margin: 0;
  font-size: clamp(48px, 8vw, 90px);
  line-height: 0.95;
  letter-spacing: -0.07em;
  font-weight: 800;
}

.home-title-image {
  display: block;
  width: min(42vw, 260px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.panel-title--logo {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.panel-title-logo {
  display: block;
  width: min(42vw, 240px);
  max-width: 240px;
  height: auto;
  object-fit: contain;
}

.home-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.5;
}

.home-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin: 0 auto;
  max-width: 1200px;
}

.home-card {
  position: relative;
  min-height: 248px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: var(--shadow);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.home-card:hover,
.home-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.08);
}

.home-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.home-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--blue-soft);
  display: grid;
  place-items: center;
  color: var(--blue);
  flex: none;
}

.home-card-icon svg {
  width: 24px;
  height: 24px;
}

.home-card-title {
  margin: 14px 0 10px;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.home-card-desc {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}

.home-card-cta {
  align-self: flex-end;
  margin-top: 18px;
  color: var(--blue);
  font-weight: 600;
  font-size: 16px;
}

.home-card:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 4px;
}

.panel {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.95);
  box-shadow: var(--shadow);
  padding: 32px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.panel-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.panel-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.form-grid {
  display: grid;
  gap: 20px;
}

.field-label {
  display: block;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.textarea,
.text-input,
.file-input-hidden {
  width: 100%;
}

.textarea {
  min-height: 220px;
  resize: vertical;
  border-radius: 22px;
  border: 1px solid var(--line);
  padding: 18px 20px;
  outline: none;
  background: #fff;
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

.textarea:focus,
.text-input:focus {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(239, 244, 255, 0.44), rgba(255, 255, 255, 0.96));
  padding: 44px 22px 32px;
  text-align: center;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.dropzone.dragover {
  border-color: rgba(37, 99, 235, 0.54);
  background: linear-gradient(180deg, rgba(238, 244, 255, 0.9), rgba(255, 255, 255, 0.99));
}

.dropzone-title {
  margin: 26px 0 18px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  appearance: none;
  border: 1px solid transparent;
  background: var(--blue);
  color: white;
  font-weight: 700;
  padding: 16px 22px;
  border-radius: 18px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  background: var(--blue-strong);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
}

.button.secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
  box-shadow: none;
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: #f8fafc;
  border-color: #d7def0;
  box-shadow: none;
}

.button.large {
  min-width: 210px;
  padding-inline: 28px;
}

.button.full {
  width: 100%;
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.upload-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  margin: 18px 0 12px;
}

.upload-list {
  display: grid;
  gap: 12px;
  margin-bottom: 8px;
}

.file-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
}

.file-thumb {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  background: #f4f6fb;
  display: grid;
  place-items: center;
  color: var(--blue);
  flex: none;
}

.file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-meta {
  min-width: 0;
}

.file-meta strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  word-break: break-word;
}

.file-meta small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.icon-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 14px;
  padding: 10px 14px;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  border-color: rgba(37, 99, 235, 0.25);
  background: #f8fbff;
}

.mini-inputs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.digit-input {
  width: 100%;
  height: 66px;
  border-radius: 18px;
  border: 1px solid var(--line);
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  outline: none;
}

.digit-input:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.code-display {
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  padding: 22px;
}

.card h3,
.card h4 {
  margin: 0 0 14px;
}

.card p {
  margin: 0;
}

.share-grid {
  display: grid;
  gap: 20px;
}

.share-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.file-gallery {
  display: grid;
  gap: 14px;
}

.viewer {
  display: grid;
  gap: 12px;
}

.viewer img,
.viewer video,
.viewer iframe {
  width: 100%;
  border: 0;
  border-radius: 20px;
  background: #0f172a;
  min-height: 260px;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.image-gallery button {
  padding: 0;
  border: 0;
  background: transparent;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
}

.image-gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.status {
  border-radius: 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.status.error {
  color: #b42318;
}

.status.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.progress-wrap {
  height: 12px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), #60a5fa);
  border-radius: 999px;
  transition: width 240ms ease;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0;
}

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 240px;
  max-width: 360px;
  border-radius: 18px;
  background: rgba(16, 24, 40, 0.94);
  color: white;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  z-index: 45;
  padding: 20px;
}

.modal {
  width: min(92vw, 520px);
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.2);
  padding: 26px;
}

.modal.modal--preview {
  width: min(92vw, 760px);
}

.modal h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.modal p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.6;
}

.modal-preview {
  display: grid;
  place-items: center;
  margin: 10px 0 22px;
}

.modal-preview img {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 18px;
  background: #f8f9f6;
}

.footer-note {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 26px;
}

@media (max-width: 960px) {
  .split,
  .home-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 24px;
  }

  .home-card {
    min-height: 210px;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 26px 16px 58px;
  }

  .topbar-inner {
    padding: 16px 16px;
  }

  .home-title {
    font-size: clamp(40px, 14vw, 64px);
  }

  .home-card-title {
    font-size: 32px;
  }

  .panel {
    border-radius: 24px;
  }

  .mini-inputs {
    gap: 8px;
  }

  .digit-input {
    height: 56px;
    font-size: 22px;
  }

  .file-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .file-card .icon-btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
