*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #000;
  --white:   #FFF0E0;
  --accent:  #8EC92A;
  --purple:  #A167E0;
  --gold:    #FCBA2E;
  --surface: #080808;
  --card:    #0f0f0f;
  --border:  rgba(255,240,224,0.08);
  --mid:     #999;
  --dim:     #555;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ── LAYOUT ── */
.portal-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── HEADER ── */
.portal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 24px;
  max-width: 860px; margin: 0 auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.portal-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px; letter-spacing: 0.04em;
}
.portal-logo span { -webkit-text-stroke: 0.5px var(--white); color: transparent; }
.portal-nav { display: flex; align-items: center; gap: 20px; }
.portal-nav a, .portal-nav button {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--mid);
  background: none; border: none; padding: 0;
  transition: color 0.2s;
}
.portal-nav a:hover, .portal-nav button:hover { color: var(--white); }

/* ── PAGE TITLE ── */
.page-title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 900; margin-bottom: 8px;
}
.page-sub { color: var(--mid); font-size: 14px; margin-bottom: 40px; }

/* ── STATUS BADGE ── */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 2px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.badge-pending_payment { background: rgba(255,240,224,0.06); color: var(--dim); }
.badge-confirmed       { background: rgba(142,201,42,0.15);  color: var(--accent); }
.badge-in_progress     { background: rgba(161,103,224,0.15); color: var(--purple); }
.badge-review          { background: rgba(252,186,46,0.15);  color: var(--gold); }
.badge-delivered       { background: rgba(142,201,42,0.25);  color: var(--accent); }
.badge-cancelled       { background: rgba(255,80,80,0.12);   color: #ff6b6b; }

/* ── ORDER CARD ── */
.order-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px; padding: 24px;
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; cursor: pointer;
  transition: border-color 0.2s;
  text-decoration: none; color: inherit;
}
.order-card:hover { border-color: rgba(255,240,224,0.18); }
.order-card-left { display: flex; flex-direction: column; gap: 6px; }
.order-card-type { font-size: 16px; font-weight: 700; }
.order-card-meta { font-size: 12px; color: var(--mid); }
.order-card-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.order-card-price { font-size: 18px; font-weight: 900; }
.order-arrow { color: var(--dim); font-size: 18px; }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; padding: 80px 24px;
  color: var(--dim); font-size: 14px;
}
.empty-state p { margin-bottom: 8px; }

/* ── ORDER DETAIL ── */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--mid);
  margin-bottom: 32px; transition: color 0.2s;
}
.back-link:hover { color: var(--white); }

.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 32px;
}
.detail-cell {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 4px; padding: 18px 20px;
}
.detail-cell-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--dim); margin-bottom: 6px;
}
.detail-cell-value { font-size: 16px; font-weight: 700; }

/* ── STATUS TRACKER ── */
.status-track { margin-bottom: 40px; }
.status-track-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--mid); margin-bottom: 16px;
}
.status-steps {
  display: flex; align-items: center; gap: 0;
}
.status-step {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; flex: 1; position: relative;
}
.status-step::after {
  content: '';
  position: absolute; top: 12px; left: 50%;
  width: 100%; height: 1px;
  background: var(--border);
  z-index: 0;
}
.status-step:last-child::after { display: none; }
.status-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  z-index: 1; transition: all 0.3s;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
}
.status-step.done .status-dot   { background: var(--accent); border-color: var(--accent); }
.status-step.active .status-dot { background: var(--purple); border-color: var(--purple); box-shadow: 0 0 0 4px rgba(161,103,224,0.2); }
.status-step-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--dim); text-align: center;
}
.status-step.done .status-step-label,
.status-step.active .status-step-label { color: var(--white); }

/* ── FILE SECTION ── */
.section-heading {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--mid); margin-bottom: 16px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.upload-area {
  border: 1px dashed rgba(255,240,224,0.15);
  border-radius: 4px; padding: 32px;
  text-align: center; margin-bottom: 16px;
  transition: border-color 0.2s;
}
.upload-area:hover, .upload-area.drag-over { border-color: var(--accent); }
.upload-area p { color: var(--mid); font-size: 13px; margin-bottom: 12px; }
.upload-label {
  display: inline-block;
  background: rgba(255,240,224,0.06);
  border: 1px solid var(--border);
  border-radius: 3px; padding: 8px 20px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.upload-label:hover { border-color: rgba(255,240,224,0.25); color: var(--white); }
#file-input { display: none; }

.file-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.file-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 3px; padding: 10px 16px;
  font-size: 13px;
}
.file-name { color: var(--white); }
.file-date { color: var(--dim); font-size: 11px; }
.file-download {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--accent);
  background: none; border: none; cursor: pointer;
  transition: opacity 0.2s;
}
.file-download:hover { opacity: 0.7; }

/* ── ADMIN ── */
.admin-bar {
  background: rgba(161,103,224,0.08);
  border: 1px solid rgba(161,103,224,0.2);
  border-radius: 4px; padding: 20px 24px;
  margin-bottom: 32px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.admin-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--purple);
}
.admin-select {
  background: rgba(255,240,224,0.04);
  border: 1px solid rgba(255,240,224,0.12);
  border-radius: 3px; color: var(--white);
  font-family: inherit; font-size: 13px;
  padding: 8px 12px; outline: none; flex: 1;
}
.admin-select option { background: #1a1a1a; }
.btn-admin-update {
  background: var(--purple); color: var(--white);
  border: none; border-radius: 3px;
  padding: 8px 20px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  transition: opacity 0.2s;
}
.btn-admin-update:hover { opacity: 0.8; }

/* ── FORMS (login) ── */
.auth-wrap {
  max-width: 400px; margin: 0 auto;
  padding: 80px 24px 40px;
}
.auth-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 40px; letter-spacing: 0.04em;
  margin-bottom: 40px; display: block;
}
.auth-logo span { -webkit-text-stroke: 0.5px var(--white); color: transparent; }
.auth-title { font-size: 28px; font-weight: 900; margin-bottom: 4px; }
.auth-sub { color: var(--mid); font-size: 14px; margin-bottom: 32px; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--mid);
}
.form-row input {
  background: rgba(255,240,224,0.04);
  border: 1px solid rgba(255,240,224,0.1);
  border-radius: 3px; color: var(--white);
  font-family: inherit; font-size: 14px;
  padding: 12px 14px; outline: none;
  transition: border-color 0.2s;
}
.form-row input:focus { border-color: rgba(255,240,224,0.3); }
.form-row input::placeholder { color: var(--dim); }
.btn-primary {
  width: 100%; padding: 14px;
  background: var(--accent); color: #000;
  border: none; border-radius: 3px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  transition: opacity 0.2s; margin-top: 8px;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-error {
  color: #ff6b6b; font-size: 13px;
  margin-top: 12px; display: none;
}

/* ── BRIEF NOTES ── */
.brief-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 4px; padding: 18px 20px; margin-bottom: 32px;
}
.brief-box p { font-size: 14px; color: rgba(255,240,224,0.7); line-height: 1.6; }

@media (max-width: 600px) {
  /* Layout */
  .portal-wrap { padding: 0 16px 100px; }
  .portal-header { padding: 20px 16px; margin-bottom: 32px; }
  .portal-logo { font-size: 24px; }
  .portal-nav { gap: 14px; }

  /* Auth */
  .auth-wrap { padding: 48px 20px 40px; }
  .auth-logo { font-size: 32px; margin-bottom: 32px; }
  .auth-title { font-size: 24px; }
  .form-row input { font-size: 16px; } /* prevent iOS zoom */
  .btn-primary { padding: 16px; font-size: 14px; }

  /* Page titles */
  .page-title { font-size: 26px; }
  .page-sub { font-size: 13px; margin-bottom: 24px; }

  /* Orders */
  .order-card { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px; }
  .order-card-right { width: 100%; justify-content: space-between; }
  .order-card-price { font-size: 16px; }

  /* Detail grid */
  .detail-grid { grid-template-columns: 1fr; }

  /* Status tracker */
  .status-steps { gap: 0; }
  .status-step-label { font-size: 8px; letter-spacing: 0; }
  .status-dot { width: 20px; height: 20px; font-size: 9px; }

  /* Back link */
  .back-link { margin-bottom: 20px; }

  /* Admin bar */
  .admin-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .admin-select { width: 100%; }
  .btn-admin-update { width: 100%; padding: 12px; }

  /* File upload */
  .upload-area { padding: 24px 16px; }
  .upload-label { padding: 10px 24px; }
  .file-row { flex-wrap: wrap; gap: 6px; }
  .file-date { width: 100%; order: 3; }

  /* Brief box */
  .brief-box { padding: 14px 16px; }
}

@media (max-width: 380px) {
  .status-step-label { display: none; }
  .status-dot { width: 18px; height: 18px; }
}
