/* ============================================================
   THE ART EFFECTS — shared stylesheet
   Design system ported from the trade-portal prototype.
   ============================================================ */

:root {
  --bg: #F4EFE6;
  --bg-soft: #FBF8F2;
  --bg-card: #FFFFFF;
  --bg-deep: #ECE4D2;
  --ink: #1A1815;
  --ink-soft: #54504A;
  --ink-mute: #8A857C;
  --accent: #B85C38;
  --accent-deep: #8E4225;
  --accent-soft: #E8A88A;
  --green: #4A7C5C;
  --green-bg: #E4EFE7;
  --gold: #C49A3A;
  --gold-bg: #F8EFD7;
  --red: #C44545;
  --red-bg: #F8DCDC;
  --line: #DCD3C1;
  --line-soft: #E9E0CC;
  --shadow: 0 1px 0 rgba(26, 24, 21, 0.04), 0 8px 24px -12px rgba(26, 24, 21, 0.12);
  --shadow-lg: 0 1px 0 rgba(26, 24, 21, 0.06), 0 24px 48px -16px rgba(26, 24, 21, 0.18);
  --radius: 7px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img, svg { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
a { color: var(--accent); }

/* ---------- logo (full lockup image: wordmark + "CUT · CRAFT · DELIVER") ---------- */
.logo {
  display: inline-block;
  width: 205px;
  height: 43px;
  max-width: 62vw;
  background: url('/img/logo.png') no-repeat left center;
  background-size: contain;
  font-size: 0;          /* collapse the old text nodes; kept in DOM for screen readers */
  line-height: 0;
  flex-shrink: 0;
}
.logo > * { display: none; }   /* hide old text spans + the dot mark */
/* Bigger, centred on the auth cards (login / apply / staff sign-in) */
.auth-card .logo {
  display: block;
  width: 300px;
  height: 62px;
  max-width: 85%;
  margin: 0 auto 16px;
  background-position: center;
}

/* Services line — "CNC · LASER · ROTARY · UV PRINTING", used away from the logo */
.services-line {
  text-align: center;
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  opacity: 0.8;
  margin-top: 18px;
}

/* ---------- buttons ---------- */
.btn {
  padding: 13px 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  border: none;
  font-family: inherit;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: var(--ink); background: var(--bg-soft); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { color: var(--ink); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid var(--line); }
.btn-danger:hover { border-color: var(--red); background: var(--red-bg); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- form fields ---------- */
.field-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  font-weight: 700;
  margin-bottom: 7px;
}
.field-input {
  width: 100%;
  padding: 13px 15px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 16px;
}
.field-input:focus { border-color: var(--ink); }
.field-input::placeholder { color: var(--ink-mute); }
.field-optional { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink-mute); }

/* ---------- centered auth card (login / apply) ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  width: 100%;
  padding: 40px 36px;
}
.auth-card.wide { max-width: 520px; }
.auth-badge {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--accent);
  background: var(--gold-bg);
  padding: 4px 10px;
  border-radius: 100px;
  margin: 14px 0 22px;
}
.auth-card h1 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.15;
}
.auth-card p.sub {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 26px;
}
.auth-hint {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--ink-mute);
  line-height: 1.6;
  text-align: center;
}
.auth-hint a { font-weight: 600; }

/* ---------- inline messages ---------- */
.msg {
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.msg.show { display: block; }
.msg-error { background: var(--red-bg); border: 1px solid var(--red); color: var(--red); }
.msg-ok { background: var(--green-bg); border: 1px solid var(--green); color: var(--green); }

/* ---------- success panel ---------- */
.success-wrap { text-align: center; }
.success-icon {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  background: var(--green-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}
.success-wrap h1 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 26px;
  margin-bottom: 10px;
}
.success-wrap p { font-size: 14px; color: var(--ink-soft); margin-bottom: 22px; }

/* ---------- app header (portal + admin) ---------- */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
  padding: 0 26px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-right { display: flex; align-items: center; gap: 16px; }
.header-account {
  text-align: right;
  font-size: 12px;
  line-height: 1.35;
}
.header-account strong { display: block; font-size: 13px; color: var(--ink); }
.header-account span { color: var(--ink-mute); }
.header-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--accent);
  background: var(--gold-bg);
  padding: 3px 9px;
  border-radius: 100px;
}

/* ---------- main content shell ---------- */
.main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 36px 26px 64px;
}
.page-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.page-subtitle {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 28px;
}

/* ---------- home: the two paths ---------- */
.path-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 680px) { .path-grid { grid-template-columns: 1fr; } }
.path-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  cursor: pointer;
  transition: all 0.22s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.path-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--ink);
}
.path-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: var(--gold-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.path-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
}
.path-card p { font-size: 13.5px; color: var(--ink-soft); }
.path-card-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 6px;
}

/* ---------- admin nav tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-mute);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
}
.tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.tab:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- list rows (applications) ---------- */
.list {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.list-row {
  display: grid;
  grid-template-columns: 1fr 150px 130px auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.list-row:last-child { border-bottom: none; }
.list-row-main strong { font-size: 14px; }
.list-row-meta { font-size: 12px; color: var(--ink-mute); }
.list-row-contact { font-size: 13px; color: var(--ink-soft); }
.list-actions { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 720px) {
  .list-row { grid-template-columns: 1fr; gap: 8px; }
  .list-actions { justify-content: flex-start; }
}

/* ---------- status pills ---------- */
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 100px;
}
.pill-pending  { background: var(--gold-bg); color: #8B6F1E; }
.pill-approved { background: var(--green-bg); color: var(--green); }
.pill-rejected { background: var(--red-bg); color: var(--red); }

/* ---------- empty state ---------- */
.empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 13px;
}

/* ---------- credentials box (shown after approval) ---------- */
.creds {
  background: var(--green-bg);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 14px 0;
}
.creds-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 10px;
}
.creds-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 5px 0;
}
.creds-row .c-lbl { color: var(--ink-soft); }
.creds-row .c-val {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  color: var(--ink);
}

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 24, 21, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}
.modal-backdrop.active { display: flex; }
.modal {
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  width: 100%;
  padding: 28px;
}
.modal h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  margin-bottom: 12px;
}
.modal p { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 8px; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- misc ---------- */
.fade-in { animation: fadeIn 0.35s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .row-2 { grid-template-columns: 1fr; } }
