:root {
  color-scheme: light;
  --ink: #111014;
  --muted: #5f5a68;
  --bg: #f6f2ed;
  --card: #ffffff;
  --accent: #ef7a4b;
  --accent-dark: #cc5b30;
  --accent-soft: #ffe1d2;
  --line: #eadfd4;
  --shadow: 0 18px 40px rgba(26, 22, 33, 0.12);
  --radius: 22px;
  --mono: "Space Grotesk", "Segoe UI", sans-serif;
  --serif: "Fraunces", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--mono);
  color: var(--ink);
  background: var(--bg);
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 0.95rem;
  background: #fffaf6;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #f6b395;
  border-color: transparent;
}

h1, h2, h3 {
  font-family: var(--serif);
  margin: 0 0 0.35rem;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.auth-body,
.panel-body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.85;
  z-index: 0;
}

.orb-a {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at 30% 30%, #ffd9c7, #ffb496 60%, #f1976f 100%);
  top: -120px;
  right: -120px;
}

.orb-b {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle at 30% 30%, #d8e6ff, #aac1ff 65%, #7a94ff 100%);
  bottom: -110px;
  left: -120px;
}

.auth {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 64px clamp(20px, 6vw, 84px);
}

.auth-card {
  background: var(--card);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 24px;
}

.auth-card__brand h1 {
  font-size: clamp(28px, 3vw, 38px);
}

.pill {
  display: inline-flex;
  padding: 6px 14px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.4px;
}

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

.field {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}

.field input,
.field textarea {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 0.95rem;
  background: #fffaf6;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid #f6b395;
  border-color: transparent;
}

.alert {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
}

.alert-error {
  background: #ffe3e3;
  color: #a13c3c;
}

.alert-success {
  background: #ddf6ea;
  color: #1f6b4f;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
}

.checkbox {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.link {
  color: var(--accent-dark);
  font-weight: 600;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-family: var(--mono);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 30px rgba(239, 122, 75, 0.35);
}

.btn-outline {
  border-color: var(--line);
  background: #fff;
}

.btn-ghost {
  border-color: transparent;
  background: #f5ede6;
  color: var(--ink);
}

.auth-side {
  display: grid;
  gap: 22px;
}

.stat {
  background: rgba(255, 255, 255, 0.62);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
}

.stat h3 {
  font-size: 1.1rem;
}

.auth-help {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 8px;
}

.customer-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 52px clamp(20px, 6vw, 84px) 28px;
  gap: 24px;
  background: linear-gradient(135deg, #fff1e7, #f3f7ff);
  border-bottom: 1px solid var(--line);
}

.customer-topbar h1 {
  font-size: clamp(28px, 3vw, 38px);
}

.customer-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.customer-nav .nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  background: #fffaf6;
  border: 1px solid var(--line);
  font-size: 0.9rem;
}

.customer-nav .nav-link.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.panel {
  padding: 32px clamp(20px, 6vw, 84px) 80px;
  display: grid;
  gap: 28px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 24px;
}

.section-nav a {
  padding: 6px 12px;
  border-radius: 999px;
  background: #fffaf6;
  border: 1px solid var(--line);
  font-size: 0.85rem;
}

.section {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.section h3 {
  margin-bottom: 12px;
}

.progress {
  margin-top: 14px;
  background: #f2e8df;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #f19a73, #ef7a4b);
  border-radius: 999px;
}

.progress-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
}

.status-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.status-item span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

.status-item strong {
  font-size: 1.05rem;
}

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

.timeline-list {
  margin: 18px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.timeline-list li {
  position: relative;
  padding-left: 18px;
  list-style: none;
  color: var(--muted);
}

.timeline-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4c8bc;
}

.timeline-list li.done {
  color: var(--ink);
}

.timeline-list li.done::before {
  background: var(--accent);
}

.timeline-list li.active {
  color: var(--ink);
  font-weight: 600;
}

.timeline-list li.active::before {
  background: #7aa0ff;
}

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

.table-actions input {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: var(--mono);
}

.table-wrapper {
  margin-top: 16px;
  overflow-x: auto;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.table-wrapper th,
.table-wrapper td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.table-wrapper input[type="file"] {
  max-width: 180px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.tag-ok {
  background: #d6f5e4;
  color: #206845;
}

.tag-warn {
  background: #ffe4c4;
  color: #a05018;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #f3ece4;
  color: var(--muted);
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.field-wide {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  grid-column: 1 / -1;
}

.security-grid {
  display: grid;
  gap: 16px;
}

.security-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: #fffaf6;
  border: 1px solid var(--line);
}

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

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

  .auth-side {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

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

@media (max-width: 700px) {
  .customer-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .customer-nav {
    width: 100%;
  }

  .panel {
    padding-bottom: 60px;
  }

  .table-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .table-actions input {
    width: 100%;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions .btn {
    flex: 1;
  }
}
