/* ---------- Base ---------- */
* { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  margin: 0;
  color: #3b2f2f;
  background: #fffaf3;
  line-height: 1.5;
}

h1, h2, h3 { color: #4a2f1a; }

a { color: #b9762c; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #f5dcc0;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
  flex-wrap: wrap;
  gap: .5rem;
}

header h1 { margin: 0; font-size: 1.4rem; }

header nav {
  display: flex;
  align-items: center;
  gap: .9rem;
  flex-wrap: wrap;
}

header nav a,
header nav button {
  font-weight: 500;
  font-size: .95rem;
}

header nav button {
  padding: .4rem .8rem;
  background: #E8AC68;
  color: #3b2f2f;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

header nav button:hover { background: #D4985A; }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 3.5rem 1rem;
  background: #fbe4c4;
}

.hero h2 { margin: 0 0 .5rem; font-size: 2rem; }
.hero p  { margin: 0 0 1.5rem; color: #7a5b3a; }

.btn {
  display: inline-block;
  padding: .7rem 1.4rem;
  background: #E8AC68;
  color: #3b2f2f;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background .15s;
}
.btn:hover { background: #D4985A; text-decoration: none; }

/* ---------- Sections ---------- */
section {
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

section h2 {
  border-bottom: 2px solid #f2dec2;
  padding-bottom: .4rem;
  margin-bottom: 1.2rem;
}

.menu-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: .6rem;
}
.menu-list li {
  background: #fff;
  border: 1px solid #f2dec2;
  border-radius: 8px;
  padding: .8rem 1rem;
}

.menu-note {
  margin-top: 1rem;
  font-size: .95rem;
  color: #7a5b3a;
}

.how-it-works ol {
  padding-left: 1.2rem;
  display: grid;
  gap: .6rem;
}
.how-it-works li { color: #5a4a3a; }

/* ---------- Forms ---------- */
.form-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem;
}

.form-intro {
  color: #7a5b3a;
  margin-bottom: 1.5rem;
}

form {
  display: grid;
  gap: 1rem;
}

form label {
  display: grid;
  gap: .35rem;
  font-size: .95rem;
  font-weight: 500;
}

input, select, textarea {
  padding: .65rem .75rem;
  border: 1px solid #e0c9a8;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: #3b2f2f;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #E8AC68;
  box-shadow: 0 0 0 3px rgba(232,172,104,.25);
}

button {
  padding: .75rem 1rem;
  background: #E8AC68;
  color: #3b2f2f;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
button:hover { background: #D4985A; }
button:disabled { background: #e6d5b8; color: #8a7f6f; cursor: not-allowed; }

/* ---------- Status messages ---------- */
#order-status, #login-status, #signup-status {
  margin: .5rem 0 0;
  font-size: .9rem;
  min-height: 1.2em;
}
#order-status.success { color: #2e7d32; }
#order-status.error   { color: #c62828; }
#signup-status.error  { color: #c62828; }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 2rem;
  color: #8a6f56;
  font-size: .9rem;
}

/* ---------- Login / Signup layout ---------- */
.centered {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: #fffaf3;
  padding: 1rem;
}

.login-box {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.login-box h1 { margin-top: 0; }
.login-box form { text-align: left; }
.login-box button { width: 100%; margin-top: .5rem; }

.back-link {
  margin-top: 1rem;
  font-size: .9rem;
}

/* ---------- Image preview / thumbnails ---------- */
.image-preview {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.thumb {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #f2dec2;
}

.ref-images {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .5rem;
}

/* ---------- Admin / order cards ---------- */
.admin-main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.order-card {
  background: #fff;
  border: 1px solid #f2dec2;
  border-left: 4px solid #E8AC68;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: .4rem;
}

.order-header h3 {
  margin: 0;
  font-size: 1.05rem;
  flex: 1;
}

.order-card p {
  margin: .25rem 0;
  color: #5a4a3a;
  font-size: .95rem;
}

/* ---------- Status badges ---------- */
.status {
  display: inline-block;
  padding: .2rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}

.status-pending   { background: #fff3cd; color: #856404; }
.status-accepted  { background: #cfe2ff; color: #084298; }
.status-confirmed { background: #d1e7dd; color: #0f5132; }
.status-completed { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #842029; }

/* ---------- Timeline ---------- */
.timeline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px dashed #ecd8bc;
  gap: .5rem;
}

.timeline.cancelled {
  color: #842029;
  font-weight: 600;
  justify-content: center;
  padding: .8rem;
  background: #f8d7da;
  border-radius: 8px;
  border-top: none;
}

.timeline .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: .35rem;
  text-align: center;
  font-size: .8rem;
  color: #a89482;
}

.timeline .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ecd8bc;
  border: 2px solid #f2dec2;
}

.timeline .step.done .dot     { background: #E8AC68; border-color: #E8AC68; }
.timeline .step.current .dot  { background: #fff; border: 3px solid #E8AC68; }

.timeline .step.done .label,
.timeline .step.current .label { color: #4a2f1a; font-weight: 600; }

.loading {
  color: #8a6f56;
  font-style: italic;
}

.user-email {
  font-weight: 600;
  color: #4a2f1a;
  padding: .4rem .6rem;
  background: #fbe4c4;
  border-radius: 6px;
  font-size: .9rem;
}

/* ---------- Admin toolbar ---------- */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-toolbar h2 { margin: 0; border-bottom: none; padding-bottom: 0; }

.filter-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.filter-bar label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
}

.filter-bar select {
  padding: .4rem .6rem;
}

.filter-bar button {
  padding: .45rem .9rem;
  font-size: .9rem;
}

/* ---------- Admin actions ---------- */
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1rem;
  padding-top: .8rem;
  border-top: 1px dashed #ecd8bc;
}

.admin-actions button {
  padding: .45rem .9rem;
  font-size: .88rem;
  border-radius: 6px;
  background: #6c757d;
}

.admin-actions button:hover { background: #5a6268; }

.btn-accept   { background: #084298 !important; }
.btn-accept:hover   { background: #06326e !important; }

.btn-confirm  { background: #0f5132 !important; }
.btn-confirm:hover  { background: #0b3d26 !important; }

.btn-complete { background: #155724 !important; }
.btn-complete:hover { background: #0d3d18 !important; }

.btn-cancel   { background: #842029 !important; }
.btn-cancel:hover   { background: #6b1a21 !important; }

.btn-note     { background: #6c757d !important; }

.admin-note {
  background: #fff8e1;
  border-left: 3px solid #E8AC68;
  padding: .5rem .7rem;
  border-radius: 4px;
  font-size: .9rem;
}

.muted { color: #8a6f56; font-style: italic; }

.legal-page {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  line-height: 1.65;
}

.legal-page h1 { margin-bottom: 0.2rem; }
.legal-page h2 { margin-top: 1.8rem; border-bottom: none; }
.legal-page ul { padding-left: 1.2rem; }
.legal-page p, .legal-page li { color: #4a3a2a; }

footer a { color: #b9762c; }

.password-wrap {
  display: flex;
  align-items: stretch;
  gap: .4rem;
}
.password-wrap input { flex: 1; }

.toggle-password {
  padding: 0 .7rem;
  background: #f5dcc0;
  color: #4a2f1a;
  border: 1px solid #e0c9a8;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.toggle-password:hover { background: #ecd0a8; }
.toggle-password:focus {
  outline: none;
  border-color: #E8AC68;
  box-shadow: 0 0 0 3px rgba(232,172,104,.25);
}

.success-text {
  color: #2e7d32;
  font-size: .9rem;
  min-height: 1.2em;
  margin: .3rem 0;
}

.error-text {
  color: #c62828;
  font-size: .9rem;
  min-height: 1.2em;
  margin: .3rem 0;
}

.status-price_sent { background: #ffe8cc; color: #a2571d; }


/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  header { padding: 1rem; }
  header h1 { font-size: 1.15rem; }
  .hero h2 { font-size: 1.5rem; }
  section { padding: 1.5rem 1rem; }
  .form-main { padding: 1.5rem 1rem; }
  .admin-main { padding: 0 1rem; }
}