/* ============================================================
   Crown 3D Manufacturing — Main Stylesheet
   Design system: dark charcoal + electric blue
   ============================================================ */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  --bg:            #12121f;
  --bg-surface:    #1a1a2e;
  --bg-card:       #1e1e30;
  --bg-card-hover: #252540;
  --bg-input:      #16162a;
  --border:        #2a2a45;
  --border-focus:  #2a7fff;

  --primary:       #2a7fff;
  --primary-dark:  #1a6eee;
  --primary-glow:  rgba(42, 127, 255, 0.25);
  --secondary:     #00c8ff;
  --secondary-glow:rgba(0, 200, 255, 0.2);

  --text:          #f0f0f0;
  --text-muted:    #9090b0;
  --text-dim:      #5a5a80;
  --text-link:     #2a7fff;

  --success:       #22c55e;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #3b82f6;

  /* Status badge colors */
  --status-pending-bg:  rgba(245, 158, 11, 0.15);
  --status-pending-text:#f59e0b;
  --status-pending-border: rgba(245, 158, 11, 0.4);
  --status-quoted-bg:   rgba(42, 127, 255, 0.15);
  --status-quoted-text: #2a7fff;
  --status-quoted-border: rgba(42, 127, 255, 0.4);
  --status-accepted-bg: rgba(34, 197, 94, 0.15);
  --status-accepted-text:#22c55e;
  --status-accepted-border: rgba(34, 197, 94, 0.4);
  --status-closed-bg:   rgba(100, 100, 140, 0.15);
  --status-closed-text: #7070a0;
  --status-closed-border: rgba(100, 100, 140, 0.4);

  --font-heading:  'Rajdhani', 'Segoe UI', sans-serif;
  --font-body:     'Inter', 'Segoe UI', sans-serif;

  --radius-sm:   4px;
  --radius:      8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-full: 9999px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.4);
  --shadow:      0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 24px var(--primary-glow);

  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;

  --nav-height: 68px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--secondary); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

img { max-width: 100%; height: auto; display: block; }

ul { list-style: none; }

/* ===== LAYOUT UTILITIES ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 760px;
}

.section {
  padding: 72px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 24px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #1a6ee0 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px var(--primary-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #3a8fff 0%, var(--primary) 100%);
  box-shadow: 0 4px 20px rgba(42, 127, 255, 0.45);
  color: #fff;
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-glow);
  color: var(--secondary);
  border-color: var(--secondary);
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1rem;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-full {
  width: 100%;
  display: flex;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 18, 31, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 42px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: filter var(--transition);
}
.nav-logo:hover { filter: brightness(0) invert(1) drop-shadow(0 0 8px var(--primary)); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition);
  border-radius: 1px;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
}
.nav-link:hover::after, .nav-link.active::after {
  transform: scaleX(1);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.btn-nav {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text-muted);
  background: none;
}
.btn-nav:hover { color: var(--text); }
.btn-nav-outline {
  border-color: var(--border);
  color: var(--text-muted);
}
.btn-nav-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
}
.btn-nav-primary {
  background: var(--primary);
  color: #fff !important;
  border-color: var(--primary);
}
.btn-nav-primary:hover {
  background: #3a8fff;
  border-color: #3a8fff;
  box-shadow: 0 0 16px var(--primary-glow);
}

.nav-logout-form {
  display: inline;
}

/* ===== FLASH MESSAGES ===== */
.messages-container {
  position: fixed;
  top: calc(var(--nav-height) + 12px);
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 400px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  background: var(--bg-card);
  animation: slideInRight 0.3s ease;
}
.alert-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
  transition: color var(--transition);
}
.alert-close:hover { color: var(--text); }

.alert-success { border-color: var(--success); color: var(--success); }
.alert-error,
.alert-danger   { border-color: var(--danger); color: var(--danger); }
.alert-warning  { border-color: var(--warning); color: var(--warning); }
.alert-info     { border-color: var(--info); color: var(--info); }

@keyframes slideInRight {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ===== PAGE HEADER ===== */
.page-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
}
.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.page-header-eyebrow {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}
.breadcrumb-link {
  color: var(--primary);
}
.breadcrumb-link:hover { color: var(--secondary); }
.page-header-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  margin-bottom: 8px;
}
.page-header-sub {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 24px;
}

/* Animated dot-grid background */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(42, 127, 255, 0.18) 1px, transparent 1px);
  background-size: 36px 36px;
  animation: gridDrift 20s linear infinite;
  z-index: 0;
}
.hero-bg-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 30%, var(--bg) 100%);
}

@keyframes gridDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 36px 36px; }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.hero-logo-wrap {
  margin-bottom: 32px;
}
.hero-logo {
  height: 100px;
  width: auto;
  filter: brightness(0) invert(1);
  margin: 0 auto;
  drop-shadow: 0 0 30px rgba(42,127,255,0.4);
  animation: heroLogoFade 1s ease forwards;
}

@keyframes heroLogoFade {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-headline {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.1;
  margin-bottom: 20px;
  animation: fadeUp 0.8s 0.15s ease both;
}

.hero-accent {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.75;
  animation: fadeUp 0.8s 0.3s ease both;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.45s ease both;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.hero-scroll-indicator span {
  display: block;
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  margin: 0 auto;
  border-radius: 1px;
  animation: scrollPulse 2s ease infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.6); }
  50%       { opacity: 1;   transform: scaleY(1); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== FEATURES SECTION ===== */
.features-section {
  background: var(--bg-surface);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}
.feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  background: var(--bg-card-hover);
}
.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  color: var(--primary);
  margin-bottom: 20px;
}
.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-title {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text);
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== HOW IT WORKS ===== */
.how-section {
  background: var(--bg);
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  position: relative;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  position: relative;
}

.step-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 30px var(--primary-glow);
}

.step-connector {
  position: absolute;
  top: 28px;
  left: calc(50% + 32px);
  right: calc(-50% + 32px);
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0.4;
}
.step-connector.last { display: none; }

.step-body { flex: 1; }

.step-title {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--text);
}

.step-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, #0f0f20 0%, #1a1a35 40%, #0d1a35 100%);
  border-top: 1px solid rgba(42, 127, 255, 0.2);
  border-bottom: 1px solid rgba(42, 127, 255, 0.2);
  padding: 64px 24px;
}

.cta-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-banner-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 8px;
}
.cta-banner-text p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===== SERVICES PAGE ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-slow);
}
.service-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.service-card-icon {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-card));
  padding: 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-card-icon svg {
  width: 56px;
  height: 56px;
  color: var(--primary);
}

.service-card-body {
  padding: 28px;
}
.service-card-body h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.service-card-body p {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.service-list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}
.service-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* Materials */
.materials-section { background: var(--bg-surface); }

.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.material-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: all var(--transition);
}
.material-card:hover {
  border-color: var(--secondary);
  box-shadow: 0 0 20px var(--secondary-glow);
}

.material-abbr {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: 0.08em;
}

.material-name {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
  font-family: var(--font-body);
  margin-bottom: 12px;
}

.material-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.material-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(42, 127, 255, 0.1);
  border: 1px solid rgba(42, 127, 255, 0.25);
  color: var(--primary);
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
}

/* Specs table */
.specs-section { background: var(--bg); }

.specs-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}
.specs-table th {
  background: var(--bg-surface);
  padding: 14px 20px;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.specs-table td {
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.specs-table tr:last-child td { border-bottom: none; }
.specs-table tr:hover td {
  background: rgba(42, 127, 255, 0.04);
  color: var(--text);
}
.specs-table td:first-child {
  font-weight: 500;
  color: var(--text);
}

/* ===== AUTH PAGES ===== */
.auth-section {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 36px;
}

.auth-logo {
  height: 56px;
  width: auto;
  margin: 0 auto 20px;
  filter: brightness(0) invert(1);
}

.auth-title {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.auth-sub {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-link {
  color: var(--primary);
  font-weight: 500;
}
.auth-link:hover { color: var(--secondary); }

/* ===== FORMS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.required {
  color: var(--danger);
  margin-left: 2px;
}
.required-note {
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: none;
  color: var(--text-dim);
  letter-spacing: 0;
  font-family: var(--font-body);
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-control::placeholder { color: var(--text-dim); }
.form-control.is-invalid { border-color: var(--danger); }

textarea.form-control { resize: vertical; min-height: 120px; }

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239090b0' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.form-select option {
  background: var(--bg-card);
  color: var(--text);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.form-errors {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
}
.form-error-msg {
  color: var(--danger);
  font-size: 0.88rem;
}

.field-error {
  font-size: 0.82rem;
  color: var(--danger);
}

.form-row { display: flex; gap: 16px; }
.form-row-2 > * { flex: 1; min-width: 0; }

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* Password hints */
.password-hints {
  background: rgba(42, 127, 255, 0.06);
  border: 1px solid rgba(42, 127, 255, 0.15);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
}
.hints-title {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.hints-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hints-list li {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding-left: 14px;
  position: relative;
}
.hints-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 0.75rem;
}

/* ===== FILE UPLOAD DROPZONE ===== */
.dropzone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  cursor: pointer;
  transition: all var(--transition);
  overflow: hidden;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: rgba(42, 127, 255, 0.05);
}
.dropzone.dragover {
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  pointer-events: none;
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  color: var(--primary);
  opacity: 0.7;
}
.dropzone-icon svg { width: 100%; height: 100%; }

.dropzone-label {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.dropzone-label strong { color: var(--text); }

.dropzone-browse {
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
}

.dropzone-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.dropzone-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

/* Selected file list */
.file-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.file-list-item svg { color: var(--primary); flex-shrink: 0; }
.file-item-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.file-item-size {
  color: var(--text-dim);
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* ===== QUOTE FORM ===== */
.quote-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

/* ===== DASHBOARD TABLES ===== */
.dashboard-actions {
  margin-bottom: 28px;
}

.quote-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.quote-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.quote-table th {
  background: var(--bg-surface);
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.quote-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.quote-table tr:last-child td { border-bottom: none; }
.quote-table tr:hover td { background: rgba(42, 127, 255, 0.03); }
.quote-row-unread td { background: rgba(42, 127, 255, 0.04); }

.quote-title-link {
  font-weight: 500;
  color: var(--text);
  display: block;
}
.quote-title-link:hover { color: var(--primary); }
.quote-file-count {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: block;
  margin-top: 2px;
}
.date-cell { color: var(--text-muted); font-size: 0.88rem; white-space: nowrap; }
.msg-cell { text-align: center; }
.id-cell { color: var(--text-dim); font-size: 0.85rem; white-space: nowrap; }

.customer-cell .customer-name { display: block; font-weight: 500; }
.customer-cell .customer-email { display: block; font-size: 0.8rem; color: var(--text-dim); }

.unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
}

.no-unread { color: var(--text-dim); }

/* ===== STATUS BADGES ===== */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid;
  white-space: nowrap;
}
.status-badge-lg {
  font-size: 0.9rem;
  padding: 6px 18px;
}

.status-pending  { background: var(--status-pending-bg);  color: var(--status-pending-text);  border-color: var(--status-pending-border); }
.status-quoted   { background: var(--status-quoted-bg);   color: var(--status-quoted-text);   border-color: var(--status-quoted-border); }
.status-accepted { background: var(--status-accepted-bg); color: var(--status-accepted-text); border-color: var(--status-accepted-border); }
.status-closed   { background: var(--status-closed-bg);   color: var(--status-closed-text);   border-color: var(--status-closed-border); }

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 24px;
  gap: 16px;
}
.empty-state-icon {
  width: 64px;
  height: 64px;
  color: var(--text-dim);
  opacity: 0.6;
}
.empty-state-icon svg { width: 100%; height: 100%; }
.empty-state-title {
  font-size: 1.3rem;
  color: var(--text-muted);
}
.empty-state-desc {
  font-size: 0.92rem;
  color: var(--text-dim);
  max-width: 420px;
}

.empty-note {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-style: italic;
}
.thread-empty { padding: 24px 0; text-align: center; }

/* ===== QUOTE DETAIL PAGE ===== */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 24px;
}

.detail-card-title {
  font-size: 1.1rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-description {
  color: var(--text-muted);
  line-height: 1.75;
  white-space: pre-wrap;
}

/* STL file list */
.stl-file-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stl-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  transition: border-color var(--transition);
}
.stl-file-item:hover { border-color: var(--primary); }

.stl-file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.stl-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--primary);
}

.stl-filename {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.stl-filesize {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.stl-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ===== MESSAGE THREAD ===== */
.message-thread {
  max-height: 460px;
  overflow-y: auto;
  padding: 4px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.message-thread::-webkit-scrollbar { width: 4px; }
.message-thread::-webkit-scrollbar-track { background: transparent; }
.message-thread::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.message-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  line-height: 1.65;
}

.msg-admin {
  align-self: flex-start;
  background: rgba(42, 127, 255, 0.1);
  border: 1px solid rgba(42, 127, 255, 0.2);
  border-radius: 4px var(--radius-md) var(--radius-md) var(--radius-md);
}

.msg-customer {
  align-self: flex-end;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md) 4px var(--radius-md) var(--radius-md);
}

.msg-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.msg-sender {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
}

.msg-time {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.msg-body {
  color: var(--text-muted);
}

/* Reply form */
.reply-form {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.reply-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.message-input {
  min-height: 80px;
}

/* Admin reply form */
.admin-reply-form {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.admin-form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}
.admin-status-group { min-width: 220px; }

/* ===== SIDEBAR ===== */
.detail-sidebar { position: sticky; top: calc(var(--nav-height) + 16px); }

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
}
.sidebar-card-title {
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
}

.info-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.info-list dt {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-heading);
  font-weight: 600;
}
.info-list dd {
  font-size: 0.88rem;
  color: var(--text-muted);
  word-break: break-word;
}

.sidebar-text {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.6;
}

.sidebar-back-btn { margin-top: 0; }

.link {
  color: var(--primary);
}
.link:hover { color: var(--secondary); }

/* ===== COUNT BADGE ===== */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  background: rgba(42, 127, 255, 0.12);
  border: 1px solid rgba(42, 127, 255, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  font-family: var(--font-body);
}

/* ===== ADMIN DASHBOARD ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-heading);
}

.stat-pending  { border-top: 3px solid var(--status-pending-text); }
.stat-pending .stat-number  { color: var(--status-pending-text); }
.stat-quoted   { border-top: 3px solid var(--status-quoted-text); }
.stat-quoted .stat-number   { color: var(--status-quoted-text); }
.stat-accepted { border-top: 3px solid var(--status-accepted-text); }
.stat-accepted .stat-number { color: var(--status-accepted-text); }
.stat-closed   { border-top: 3px solid var(--status-closed-text); }
.stat-closed .stat-number   { color: var(--status-closed-text); }

.admin-table-header {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-table-title {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== STL VIEWER MODAL ===== */
.stl-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.stl-modal.open {
  display: flex;
}

.stl-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.stl-modal-box {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.stl-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.stl-modal-filename {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stl-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color var(--transition);
  flex-shrink: 0;
}
.stl-modal-close:hover { color: var(--text); }

.stl-modal-body {
  flex: 1;
  position: relative;
  background: var(--bg);
  overflow: hidden;
  min-height: 480px;
}

.stl-modal-body canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  inset: 0;
}

.stl-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.9rem;
  z-index: 2;
}

.stl-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.stl-modal-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}
.stl-viewer-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 40px 24px 28px;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo-icon {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.footer-brand-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-dim);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-sidebar {
    position: static;
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.open { display: flex; }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
  }
  .nav-link { width: 100%; }

  .nav-auth {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    margin-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 16px;
  }
  .btn-nav { width: 100%; text-align: center; justify-content: center; }

  .hero-ctas { flex-direction: column; align-items: center; }
  .steps-row { grid-template-columns: 1fr; }
  .step-connector { display: none; }

  .cta-banner-inner {
    flex-direction: column;
    text-align: center;
  }

  .auth-card { padding: 32px 24px; }
  .form-row-2 { flex-direction: column; }

  .quote-table th:nth-child(5),
  .quote-table td:nth-child(5),
  .quote-table th:nth-child(4),
  .quote-table td:nth-child(4) { display: none; }

  .stl-modal-box { max-height: 95vh; }
  .stl-modal-body { min-height: 320px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .page-header { padding: 32px 0; }
  .auth-card { padding: 24px 16px; }
  .quote-form { padding: 24px 16px; }
  .detail-card { padding: 20px 16px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }

  /* Hide extra columns on very small screens */
  .quote-table th:nth-child(3),
  .quote-table td:nth-child(3) { display: none; }
}

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