:root {
  color-scheme: light;
  --bg-start: #f5f1e8;
  --bg-end: #dce9e2;
  --card-bg: rgba(255, 255, 255, 0.88);
  --text-main: #1f2a2a;
  --text-soft: #526161;
  --primary: #0f766e;
  --primary-hover: #115e59;
  --secondary-bg: #edf6f3;
  --secondary-border: #b7d9d4;
  --shadow: 0 24px 60px rgba(31, 42, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.72), transparent 35%),
    linear-gradient(135deg, var(--bg-start), var(--bg-end));
}

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hero__card {
  width: min(100%, 680px);
  padding: 48px;
  border-radius: 28px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  text-align: center;
}

.hero__card--form {
  text-align: left;
}

.hero__card--wide {
  width: min(100%, 1280px);
  text-align: left;
}

.hero__eyebrow {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.1;
}

.hero__description {
  margin: 18px auto 0;
  max-width: 48ch;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-soft);
}

.hero__description--left {
  margin-left: 0;
  max-width: none;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.user-panel {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-form {
  margin: 0 0 24px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.is-hidden {
  display: none !important;
}

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.dashboard-header .user-panel {
  margin-top: 0;
}

.user-panel__text {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-main);
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  text-decoration: underline;
}

.auth-form {
  margin-top: 28px;
}

.form-field {
  display: block;
  margin-bottom: 18px;
}

.form-field span {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--text-main);
}

.form-field input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #c7d7d4;
  border-radius: 16px;
  font: inherit;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.95);
}

.form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #c7d7d4;
  border-radius: 16px;
  font: inherit;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.95);
  resize: vertical;
}

.form-field input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.2);
  border-color: var(--primary);
}

.form-textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.2);
  border-color: var(--primary);
}

.suggestion-card {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid #dce9e5;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
}

.suggestion-thread {
  margin-top: 20px;
}

.suggestion-message {
  margin-top: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dce9e5;
}

.suggestion-message p {
  margin: 0 0 8px;
}

.suggestion-message p:last-child {
  margin-bottom: 0;
}

.form-field select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #c7d7d4;
  border-radius: 16px;
  font: inherit;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.95);
}

.form-field select:focus {
  outline: 2px solid rgba(15, 118, 110, 0.2);
  border-color: var(--primary);
}

.consent-field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #c7d7d4;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
}

.consent-field input {
  margin-top: 4px;
  accent-color: var(--primary);
}

.consent-field span {
  line-height: 1.6;
  color: var(--text-soft);
}

.form-message {
  min-height: 24px;
  margin: 8px 0 18px;
  font-weight: 600;
}

.form-message--success {
  color: #0f766e;
}

.form-message--error {
  color: #b42318;
}

.helper-text {
  margin: -6px 0 18px;
  color: var(--text-soft);
}

.progress-panel {
  margin-top: 24px;
}

.progress-bar {
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #d8e6e2;
}

.progress-bar__fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #34a853);
  transition: width 0.12s linear;
}

.progress-table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
}

.progress-table th,
.progress-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #dce9e5;
  text-align: left;
}

.progress-table th {
  width: 50%;
  color: var(--text-main);
}

.progress-table td {
  color: var(--text-soft);
}

.progress-table tr:last-child th,
.progress-table tr:last-child td {
  border-bottom: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-section {
  margin-top: 36px;
}

.section-title {
  margin: 0 0 18px;
  font-size: 1.25rem;
}

.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin: 20px 0 24px;
  flex-wrap: wrap;
}

.form-field--inline {
  flex: 1 1 280px;
  margin-bottom: 0;
}

.form-field--compact {
  min-width: 180px;
}

.inline-form--table {
  margin: 0;
  align-items: center;
}

.settings-grid--upload-limit {
  margin-top: 4px;
}

.uploads-section {
  margin-top: 32px;
}

.admin-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.uploads-table-wrapper {
  overflow-x: auto;
  border: 1px solid #dce9e5;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
}

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

.uploads-table th,
.uploads-table td {
  padding: 16px 18px;
  border-bottom: 1px solid #dce9e5;
  text-align: left;
  vertical-align: top;
}

.uploads-table thead th {
  font-size: 0.92rem;
  color: var(--text-main);
  background: rgba(237, 246, 243, 0.95);
}

.uploads-table tbody td {
  color: var(--text-soft);
}

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

.readonly-link-field {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #c7d7d4;
  border-radius: 12px;
  font: inherit;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.98);
}

.readonly-link-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 320px;
}

.empty-state {
  padding: 20px 22px;
  border: 1px dashed #b7d9d4;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--text-soft);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.button--full {
  width: 100%;
}

.button--small {
  min-width: 110px;
  padding: 10px 16px;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button--primary {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.25);
}

.button--primary:hover,
.button--primary:focus-visible {
  background: var(--primary-hover);
}

.button--secondary {
  color: var(--text-main);
  background: var(--secondary-bg);
  border: 1px solid var(--secondary-border);
}

.button--danger {
  color: #ffffff;
  background: #b42318;
  box-shadow: 0 14px 30px rgba(180, 35, 24, 0.22);
}

.button--danger:hover,
.button--danger:focus-visible {
  background: #911d12;
}

@media (max-width: 640px) {
  .hero__card {
    padding: 32px 24px;
  }

  .dashboard-header {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

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