/* ============================================================
   ONE OF A KIND RETRO — Master Stylesheet
   Theme: Professional Corporate Dark + Gold
   File: assets/css/style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- ROOT VARIABLES ---- */
:root {
  --bg-base:        #07090F;
  --bg-card:        #0D1117;
  --bg-card-2:      #111827;
  --bg-hover:       #161E2E;
  --border:         #1C2A3A;
  --border-light:   #243040;

  --gold:           #C9A84C;
  --gold-light:     #E8C96A;
  --gold-dim:       #8A6F2E;
  --gold-glow:      rgba(201,168,76,0.12);

  --blue:           #3B82F6;
  --blue-dim:       #1D4ED8;
  --green:          #22C55E;
  --amber:          #F59E0B;
  --red:            #EF4444;
  --purple:         #A855F7;

  --text-primary:   #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted:     #4B5563;

  --radius:         10px;
  --radius-sm:      6px;
  --radius-lg:      16px;

  --shadow:         0 4px 24px rgba(0,0,0,0.6);
  --shadow-gold:    0 0 30px rgba(201,168,76,0.15);

  --sidebar-w:      260px;
  --header-h:       68px;

  --font-display:   'Playfair Display', serif;
  --font-body:      'DM Sans', sans-serif;
  --font-mono:      'JetBrains Mono', monospace;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: var(--font-body); }

/* ---- LAYOUT ---- */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold);
  line-height: 1.2;
  letter-spacing: 0.5px;
}
.sidebar-logo .brand-tagline {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

.sidebar-role-badge {
  margin: 16px 24px;
  background: var(--gold-glow);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 12px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 12px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 400;
  transition: all 0.15s ease;
  margin-bottom: 2px;
  position: relative;
}
.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.nav-link.active {
  background: var(--gold-glow);
  color: var(--gold);
  font-weight: 500;
  border: 1px solid var(--gold-dim);
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--gold);
  border-radius: 0 3px 3px 0;
}
.nav-link .nav-icon {
  width: 18px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}
.nav-link .nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.sidebar-footer .user-name {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 2px;
}

/* ---- MAIN CONTENT ---- */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- TOP HEADER ---- */
.top-header {
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}
.header-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.notif-btn {
  position: relative;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
  font-size: 16px;
}
.notif-btn:hover { border-color: var(--gold); color: var(--gold); }
.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

/* ---- PAGE CONTENT ---- */
.page-content {
  padding: 32px;
  flex: 1;
}

/* ---- STAT CARDS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-light); }
.stat-card.gold { border-top: 2px solid var(--gold); }
.stat-card.blue { border-top: 2px solid var(--blue); }
.stat-card.green { border-top: 2px solid var(--green); }
.stat-card.amber { border-top: 2px solid var(--amber); }
.stat-card.red   { border-top: 2px solid var(--red);   }
.stat-card.purple { border-top: 2px solid var(--purple); }

.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
  line-height: 1;
}
.stat-value.gold-text { color: var(--gold); }
.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}
.stat-icon {
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  font-size: 36px;
  opacity: 0.07;
}

/* ---- CARDS ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.card-body { padding: 24px; }
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-card-2);
}

/* ---- TABLES ---- */
.table-wrapper { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  padding: 11px 16px;
  background: var(--bg-card-2);
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); color: var(--text-primary); }
.data-table .code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
}

/* ---- BADGES ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-grade-A { color: var(--green); background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); }
.badge-grade-B { color: var(--amber); background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); }
.badge-grade-C { color: var(--red);   background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3); }

/* ---- FORMS ---- */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.15s;
  outline: none;
}
.form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.full { grid-column: 1 / -1; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--gold);
  color: #0A0900;
}
.btn-primary:hover { background: var(--gold-light); color: #0A0900; }

.btn-secondary {
  background: var(--bg-card-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-success {
  background: rgba(34,197,94,0.15);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.3);
}
.btn-success:hover { background: rgba(34,197,94,0.25); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-icon { padding: 9px; }

/* ---- ALERTS ---- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: rgba(34,197,94,0.1);  border: 1px solid rgba(34,197,94,0.3);  color: var(--green); }
.alert-error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: var(--red);   }
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: var(--amber); }
.alert-info    { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); color: var(--blue);  }

/* ---- TIMELINE (hub status) ---- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 24px;
}
.timeline-dot {
  position: absolute;
  left: -24px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  transition: all 0.2s;
}
.timeline-dot.active { border-color: var(--gold); background: var(--gold); }
.timeline-dot.done   { border-color: var(--green); background: var(--green); }
.timeline-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.timeline-label.active { color: var(--gold); }
.timeline-label.done   { color: var(--green); }
.timeline-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---- INVENTORY GRID (buyer) ---- */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
}
.item-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}
.item-img {
  height: 200px;
  background: var(--bg-card-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}
.item-img img { width: 100%; height: 100%; object-fit: cover; }
.item-grade-tag {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 1px;
}
.item-info { padding: 16px; }
.item-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.item-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.item-price { font-size: 20px; font-weight: 700; color: var(--gold); font-family: var(--font-display); }
.item-price span { font-size: 12px; color: var(--text-muted); font-family: var(--font-body); font-weight: 400; }

/* ---- FILTERS ---- */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 24px;
}
.filter-group { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.filter-label { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); }

/* ---- MODALS ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal-header {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-title { font-size: 17px; font-weight: 600; }
.modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 20px; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 28px; }
.modal-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  display: flex; gap: 12px; justify-content: flex-end;
}

/* ---- UPLOAD AREA ---- */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--gold);
  background: var(--gold-glow);
  color: var(--gold);
}
.upload-zone .upload-icon { font-size: 36px; margin-bottom: 12px; }
.upload-zone p { font-size: 13px; }
.upload-zone small { font-size: 11px; color: var(--text-muted); display: block; margin-top: 6px; }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 52px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 17px; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 13px; max-width: 380px; margin: 0 auto; }

/* ---- DIVIDER ---- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.cols-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .page-content { padding: 20px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .inventory-grid { grid-template-columns: 1fr; }
}

/* ---- LOGIN PAGE ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(201,168,76,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 60%, rgba(59,130,246,0.04) 0%, transparent 60%);
}
.login-box {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 2;
  padding: 20px;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  box-shadow: var(--shadow);
}
.login-logo {
  text-align: center;
  margin-bottom: 36px;
}
.login-logo .brand {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--gold);
  letter-spacing: 0.5px;
}
.login-logo .tagline {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
}
.login-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
}

/* ---- PROGRESS STEPS (submission flow) ---- */
.progress-steps {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
}
.step-item {
  display: flex;
  align-items: center;
  flex: 1;
}
.step-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-card-2);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}
.step-circle.active { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }
.step-circle.done   { border-color: var(--green); background: var(--green); color: #fff; }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
}
.step-line.done { background: var(--green); }

/* ---- ANALYTICS CHART PLACEHOLDER ---- */
.chart-container {
  background: var(--bg-card-2);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ---- MISC ---- */
.text-gold    { color: var(--gold); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-muted   { color: var(--text-muted); }
.text-right   { text-align: right; }
.text-center  { text-align: center; }
.fw-700       { font-weight: 700; }
.mono         { font-family: var(--font-mono); font-size: 12px; }
.mt-8         { margin-top: 8px; }
.mt-16        { margin-top: 16px; }
.mt-24        { margin-top: 24px; }
.mb-8         { margin-bottom: 8px; }
.mb-16        { margin-bottom: 16px; }
.mb-24        { margin-bottom: 24px; }
.flex         { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.gap-16       { gap: 16px; }
.hidden       { display: none !important; }
