* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f4f5f7;
  margin: 0;
  color: #1f2430;
}
.topbar {
  background: #1f2d3d;
  color: white;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar h1 { font-size: 1.2rem; margin: 0; }
.topbar a { color: #9fd3ff; text-decoration: none; font-size: 0.9rem; }

#order-form {
  max-width: 900px;
  margin: 24px auto;
  padding: 0 16px 80px 16px;
}

.card {
  background: white;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.card h2 { margin-top: 0; font-size: 1.1rem; border-bottom: 2px solid #eef1f4; padding-bottom: 8px; }
.card h3 { font-size: 0.95rem; color: #45536b; margin-top: 20px; }

.field-row { margin-bottom: 12px; }
.field-row label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; color: #33415c; }
.field-row label.inline { display: inline-block; font-weight: 400; margin-right: 16px; }
.field-row .hint { font-weight: 400; color: #7a869a; }

input[type="text"], input[type="email"], input[type="date"], input[type="number"],
select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d2d8e0;
  border-radius: 5px;
  font-size: 0.9rem;
  font-family: inherit;
}
input[type="file"] { font-size: 0.85rem; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
@media (max-width: 700px) {
  .grid-2 { grid-template-columns: 1fr; }
}
.grid-2 > .full-width { grid-column: 1 / -1; }

.hidden { display: none !important; }
.sub-block { border-left: 3px solid #d8e2f0; padding-left: 14px; margin: 10px 0; }

.item-card {
  border: 1px solid #dfe4ea;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  background: #fbfcfe;
  position: relative;
}
.item-card h4 { margin: 0 0 10px 0; font-size: 0.95rem; }
.item-card .remove-item-btn {
  position: absolute;
  top: 10px; right: 10px;
  background: #fde8e8; color: #b3261e; border: none;
  border-radius: 4px; padding: 4px 10px; font-size: 0.8rem; cursor: pointer;
}

.decoration-block {
  border: 1px dashed #c6d0dc;
  border-radius: 6px;
  padding: 12px;
  margin: 10px 0;
  background: white;
}
.decoration-block .remove-decoration-btn {
  background: none; border: none; color: #b3261e; cursor: pointer; font-size: 0.8rem;
}

table.size-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 0.85rem; }
table.size-table th, table.size-table td { border: 1px solid #e2e6ec; padding: 5px 6px; text-align: left; }
table.size-table input { width: 100%; padding: 4px; font-size: 0.85rem; }
table.size-table tr.hidden-size { display: none; }

.btn-primary, .btn-secondary {
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.9rem;
  padding: 10px 18px;
  border: none;
}
.btn-primary { background: #1f6feb; color: white; }
.btn-primary:hover { background: #1657c4; }
.btn-secondary { background: #eef1f4; color: #1f2430; margin-top: 8px; }
.btn-secondary:hover { background: #e2e7ed; }

#submit-status { margin: 12px 0; font-size: 0.9rem; }
#submit-status.success { color: #1a7f37; }
#submit-status.error { color: #b3261e; }

#items-heading { margin-bottom: 4px; }

/* ---------------------------------------------------------------------- */
/* Topbar nav (order form / orders list)                                  */
/* ---------------------------------------------------------------------- */

.topbar-left, .topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar .home-link { font-size: 0.85rem; }
.btn-topbar {
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.85rem;
  padding: 7px 14px;
  border: 1px solid #3c4a5e;
  background: #2a374a;
  color: white;
}
.btn-topbar:hover { background: #34445a; }

/* ---------------------------------------------------------------------- */
/* Draft banner / save panel (order form)                                 */
/* ---------------------------------------------------------------------- */

.draft-banner, .draft-save-panel {
  max-width: 900px;
  margin: 16px auto 0 auto;
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 0.9rem;
}
.draft-banner { background: #eaf2ff; color: #133A6E; border: 1px solid #cfe0fb; }
.draft-save-panel { background: #e9f9f1; color: #10502f; border: 1px solid #b9ecd2; }
.draft-link-row { display: flex; gap: 8px; margin-top: 8px; }
.draft-link-row input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #b9ecd2;
  border-radius: 5px;
  font-size: 0.85rem;
  background: white;
}

/* ---------------------------------------------------------------------- */
/* Landing page                                                           */
/* ---------------------------------------------------------------------- */

.landing-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.landing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  background: white;
  border-bottom: 1px solid #e2e6ec;
}
.landing-logo { height: 36px; width: auto; }
.landing-contact {
  text-align: right;
  font-size: 0.85rem;
  color: #45536b;
  line-height: 1.5;
}
.landing-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  gap: 40px;
}
.landing-actions {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.landing-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 260px;
  padding: 32px 20px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.landing-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.12); }
.landing-btn-primary { background: #133A6E; color: white; }
.landing-btn-secondary { background: white; color: #133A6E; border: 2px solid #133A6E; }
.landing-btn-title { font-size: 1.15rem; font-weight: 700; }
.landing-btn-sub { font-size: 0.85rem; opacity: 0.85; }

.landing-resume { text-align: center; color: #45536b; font-size: 0.9rem; }
.landing-resume-form { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.landing-resume-form input {
  width: 320px;
  max-width: 60vw;
  padding: 9px 12px;
  border: 1px solid #d2d8e0;
  border-radius: 5px;
  font-size: 0.9rem;
}
.landing-resume-error { color: #b3261e; font-size: 0.85rem; min-height: 1.2em; }

.landing-footer {
  text-align: center;
  padding: 16px;
  font-size: 0.8rem;
  color: #7a869a;
  background: white;
  border-top: 1px solid #e2e6ec;
}

@media (max-width: 600px) {
  .landing-header { flex-direction: column; gap: 10px; text-align: center; }
  .landing-contact { text-align: center; }
}

/* ---------------------------------------------------------------------- */
/* Auth: session bar, login card, admin/account forms                     */
/* ---------------------------------------------------------------------- */

.session-bar {
  background: #1f2d3d;
  color: #c9d6e6;
  font-size: 0.8rem;
  text-align: center;
  padding: 6px 12px;
}
.session-bar a { color: #9fd3ff; text-decoration: none; }
.session-bar a:hover { text-decoration: underline; }

.login-card { width: 100%; max-width: 360px; }

.form-error {
  background: #fde8e8;
  color: #b3261e;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.form-success {
  background: #e9f9f1;
  color: #10502f;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.user-row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.inline-form input[type="password"] { width: 150px; padding: 6px 8px; font-size: 0.8rem; }
.inline-form .btn-secondary { margin-top: 0; padding: 6px 10px; font-size: 0.8rem; }
.btn-danger { background: #fde8e8; color: #b3261e; }
.btn-danger:hover { background: #f8cfcf; }
