:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --text: #172033;
  --muted: #5f6f87;
  --primary: #1760ff;
  --primary-dark: #124bcc;
  --border: #d7dfeb;
  --success: #14804a;
  --danger: #c9372c;
  --shadow: 0 24px 60px rgba(23, 32, 51, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #eef4ff 0%, var(--bg) 100%);
  color: var(--text);
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  padding: 24px 16px 48px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.card {
  width: 100%;
  max-width: 760px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(215, 223, 235, 0.9);
}

.form-card,
.success-card,
.admin-login-card,
.admin-dashboard-card {
  padding: 24px;
}

.brand-block,
.admin-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.brand-mark {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1760ff, #7aa8ff);
  color: white;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.08em;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.15;
}

.lead {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.order-form {
  display: grid;
  gap: 18px;
}

.compact-form {
  gap: 16px;
}

.field-group {
  display: grid;
  gap: 10px;
}

label,
legend {
  font-weight: 700;
}

input[type='text'],
input[type='password'],
input[type='file'],
select {
  width: 100%;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
}

input:focus,
select:focus,
button:focus {
  outline: 3px solid rgba(23, 96, 255, 0.16);
  outline-offset: 2px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.choice-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 72px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.choice-card input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.choice-card:has(input:checked) {
  border-color: var(--primary);
  background: rgba(23, 96, 255, 0.08);
  transform: translateY(-1px);
}

.hint,
.meta,
.location-status,
.submit-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.preview-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-alt);
}

.preview-card img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 12px;
}

.checkbox-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: flex-start;
}

.checkbox-row input {
  width: 22px;
  height: 22px;
  margin-top: 3px;
}

.primary-button,
.secondary-button,
.button-link {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 18px;
  min-height: 56px;
  padding: 14px 20px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  background: var(--primary);
  color: white;
}

.primary-button:hover {
  background: var(--primary-dark);
}

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

.secondary-button {
  background: #e9efff;
  color: var(--primary);
}

.alert {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(201, 55, 44, 0.08);
  color: var(--danger);
  border: 1px solid rgba(201, 55, 44, 0.14);
  margin-bottom: 18px;
}

.alert.success {
  color: var(--success);
  background: rgba(20, 128, 74, 0.08);
  border-color: rgba(20, 128, 74, 0.14);
}

.hidden {
  display: none;
}

.required {
  color: var(--danger);
}

.success-shell,
.admin-shell,
.admin-dashboard-shell {
  align-items: center;
}

.success-card {
  max-width: 580px;
  text-align: center;
}

.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(20, 128, 74, 0.12);
  color: var(--success);
  font-size: 2rem;
  font-weight: 800;
}

.order-badge {
  margin: 22px 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.admin-dashboard-card {
  max-width: 1100px;
}

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

.order-admin-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  background: var(--surface-alt);
}

.order-admin-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(23, 96, 255, 0.1);
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 700;
}

.admin-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.admin-meta-item {
  padding: 14px;
  border-radius: 14px;
  background: white;
  border: 1px solid var(--border);
}

.admin-meta-item strong {
  display: block;
  margin-bottom: 6px;
}

.admin-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
}

.admin-actions select {
  min-height: 50px;
}

.inline-link {
  color: var(--primary);
  font-weight: 700;
}

@media (max-width: 767px) {
  .page-shell {
    padding: 16px 12px 32px;
  }

  .form-card,
  .success-card,
  .admin-login-card,
  .admin-dashboard-card {
    padding: 18px;
  }

  .brand-block,
  .admin-header {
    flex-direction: column;
  }

  .status-grid,
  .admin-meta,
  .admin-actions {
    grid-template-columns: 1fr;
  }
}
