*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', sans-serif;
  background: #0e0e0e;
  color: #e0e0e0;
  line-height: 1.6;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }

:root {
  --accent: #f07200;
  --bg-card: #161616;
  --border: rgba(255,255,255,0.07);
  --text-muted: #888;
  --radius: 12px;
  --tr: 0.2s ease;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===========================
   AUTH
=========================== */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(240,114,0,0.06) 0%, transparent 70%);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  display: block;
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 28px;
}
.auth-logo span { color: var(--accent); }
.auth-card h2 { font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 6px; }
.auth-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 28px; }
.auth-error {
  display: none;
  background: rgba(220,50,50,0.1);
  border: 1px solid rgba(220,50,50,0.3);
  color: #e55;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 7px;
  margin-bottom: 16px;
}
.auth-error.visible { display: block; }
.auth-switch { font-size: 0.88rem; color: var(--text-muted); margin-top: 20px; text-align: center; }
.link-btn {
  background: none; border: none; color: var(--accent); font-size: inherit;
  cursor: pointer; font-family: inherit; font-weight: 600;
}
.link-btn:hover { text-decoration: underline; }
.back-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--tr);
}
.back-link:hover { color: var(--accent); }

/* ===========================
   FORMS (shared)
=========================== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #bbb;
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 11px 14px;
  outline: none;
  transition: border-color var(--tr);
}
.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: #444; }
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 22px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--tr);
  white-space: nowrap;
}
.btn-primary:hover { background: #d96600; }
.btn-primary.btn-full { width: 100%; padding: 13px; font-size: 1rem; }
.btn-secondary {
  display: inline-block;
  background: transparent;
  color: #ccc;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  font-family: inherit;
  transition: background var(--tr);
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); }

/* ===========================
   DASHBOARD
=========================== */
.dashboard-wrap[hidden] { display: none; }
.auth-wrap[hidden] { display: none; }

.dash-header {
  background: rgba(14,14,14,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.dash-logo { font-size: 1.1rem; font-weight: 900; color: #fff; }
.dash-logo span { color: var(--accent); }
.dash-header-right { display: flex; align-items: center; gap: 16px; }
.dash-user-name { font-size: 0.9rem; color: var(--text-muted); }

.dash-content { padding: 40px 24px; }

/* Stats row */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.dash-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.dash-stat-val { font-size: 2rem; font-weight: 900; color: var(--accent); line-height: 1; margin-bottom: 6px; }
.dash-stat-label { font-size: 0.82rem; color: var(--text-muted); }

/* Section */
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.dash-section-header h2 { font-size: 1.3rem; font-weight: 800; color: #fff; }

/* Quote cards */
.quote-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  transition: border-color var(--tr), transform var(--tr);
}
.quote-card:hover { border-color: rgba(240,114,0,0.4); transform: translateY(-1px); }
.qc-id { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 4px; }
.qc-desc { font-size: 0.95rem; font-weight: 600; color: #fff; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 500px; }
.qc-meta { font-size: 0.82rem; color: var(--text-muted); display: flex; gap: 16px; flex-wrap: wrap; }
.qc-right { text-align: right; }
.qc-cost { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.qc-date { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

.status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.04em;
}

.loading-state { color: var(--text-muted); padding: 32px; text-align: center; }
.empty-state { color: var(--text-muted); padding: 48px; text-align: center; font-size: 0.95rem; }
.empty-state a { color: var(--accent); }

/* ===========================
   MODAL
=========================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 24px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: #161616;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 28px 32px;
  width: 100%; max-width: 520px;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 1.1rem; font-weight: 700; color: #fff; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; padding: 4px 8px; border-radius: 5px; }
.modal-close:hover { color: #fff; }
.modal-footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }

.qm-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.qm-row:last-child { border-bottom: none; }
.qm-row span:first-child { color: var(--text-muted); }
.qm-row span:last-child { font-weight: 600; color: #fff; }
.qm-note { background: rgba(240,114,0,0.08); border: 1px solid rgba(240,114,0,0.2); border-radius: 8px; padding: 12px 16px; font-size: 0.9rem; color: #ccc; margin-top: 16px; }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 640px) {
  .auth-card { padding: 28px 20px; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .quote-card { grid-template-columns: 1fr; }
  .qc-right { text-align: left; }
  .dash-content { padding: 24px 16px; }
}
