/* ─── Design tokens (Elchemy brand) ─────────────────────────── */
:root {
  /* Brand reds */
  --red:              #EF4136;
  --red-hover:        #FF7068;
  --red-pressed:      #BE342C;
  --red-alt:          #E02D28;
  --red-light:        #FDECEB;
  --red-dim:          #ef413617;

  /* Ink / dark surfaces */
  --ink:              #0F1013;
  --hero-bg:          #0F1013;
  --sidebar-bg:       #0F1013;
  --sidebar-border:   #1A1B1F;
  --sidebar-text:     #9CA0AB;
  --sidebar-hover:    #1A1B1F;

  /* Text */
  --text-primary:     #0F1013;
  --text-secondary:   #3A3B3F;
  --text-muted:       #6B6E75;
  --text-light:       #9CA0AB;

  /* Surfaces */
  --bg-white:         #FFFFFF;
  --off-white:        #FCFCFC;
  --bg-surface:       #F6F6F6;
  --bg-muted:         #F1F2F2;
  --bg-page:          #F6F6F6;

  /* Borders */
  --border:           #E2E2E2;
  --border-subtle:    #EAE9E9;
  --border-light:     #F1F2F2;

  /* Status */
  --green:            #22C55E;
  --green-light:      #C8FDD4;
  --blue:             #3B82F6;
  --blue-light:       #EAEEFF;
  --orange:           #F15B2A;
  --orange-light:     #FCDBBE;
  --purple:           #8B5CF6;
  --purple-light:     #EDE9FE;
  --gold:             #FFCC99;

  /* Radii */
  --radius-xs:        4px;
  --radius-sm:        8px;
  --radius:           10px;
  --radius-md:        10px;
  --radius-lg:        20px;
  --radius-xl:        24px;
  --radius-pill:      200px;

  /* Shadows */
  --shadow-xs:        0 1px 2px rgba(0,0,0,0.08);
  --shadow-sm:        0 1px 2px rgba(0,0,0,0.08);
  --shadow:           0 4px 12px rgba(0,0,0,0.08);
  --shadow-md:        0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:        1px 1px 5px 2px rgba(128,128,128,0.18);
  --shadow-header:    0 4px 12px rgba(0,0,0,0.06);

  /* Typography */
  --font-body:        'Open Sans', 'Mukta', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display:     'Mukta', 'Open Sans', 'Bahnschrift', -apple-system, sans-serif;
  --font-alt:         'Mukta', 'Segoe UI', sans-serif;
  --font:             var(--font-body);

  --sidebar-width:    240px;
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-surface);
  line-height: 1.5;
  letter-spacing: -0.005em;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); }
strong, b { font-weight: 600; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; border: none;
  cursor: pointer; transition: background 0.15s, opacity 0.15s;
  text-decoration: none; white-space: nowrap;
}
.btn-primary    { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline    { background: #fff; color: var(--red); border: 1.5px solid var(--red); }
.btn-outline:hover { background: var(--red-light); }
.btn-outline-sm { background: transparent; color: var(--sidebar-text); border: 1px solid #1A1B1F; font-size: 12px; padding: 5px 10px; }
.btn-outline-sm:hover { border-color: var(--red); color: var(--red); }
.btn-ghost      { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border-light); }
.btn-sm         { padding: 5px 10px; font-size: 12px; }
.btn-full       { width: 100%; justify-content: center; }
.btn-link       { background: none; border: none; color: var(--red); font-size: 12px; padding: 0; text-decoration: underline; cursor: pointer; }
.btn-danger-ghost { background: transparent; color: #DC2626; border: 1px solid #FECACA; }
.btn-danger-ghost:hover { background: #FEF2F2; }
.btn-card-edit  { background: var(--bg-page); border: 1px solid var(--border); color: var(--text-muted); border-radius: var(--radius-sm); padding: 4px 10px; font-size: 12px; gap: 4px; display: inline-flex; align-items: center; }
.btn-card-edit:hover { border-color: var(--red); color: var(--red); }

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group     { display: flex; flex-direction: column; gap: 5px; }
.form-label     { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.form-input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: #fff; color: var(--text-primary);
  font-size: 14px; transition: border-color 0.15s;
}
.form-input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 2px rgba(239,65,54,0.1); }
.form-input::placeholder { color: var(--text-light); }
.form-input[type="number"]::-webkit-inner-spin-button,
.form-input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.form-input[type="number"] { -moz-appearance: textfield; }
.form-input-sm  { max-width: 80px; }
.form-textarea  {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: #fff; color: var(--text-primary);
  font-size: 14px; line-height: 1.6; resize: vertical;
  transition: border-color 0.15s;
}
.form-textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 2px rgba(239,65,54,0.1); }
.form-textarea::placeholder { color: var(--text-light); }
.form-select {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: #fff; cursor: pointer;
  font-size: 14px;
}
.form-select:focus { outline: none; border-color: var(--red); }
.form-label-row { display: flex; justify-content: space-between; align-items: center; }
.form-hint      { font-size: 11px; color: var(--text-muted); }
.form-grid-2    { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions   { display: flex; gap: 10px; padding: 20px 0 8px; }
.char-count     { font-size: 11px; color: var(--text-muted); text-align: right; }
.required       { color: var(--red); }

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}
.card + .card   { margin-top: 14px; }
.form-card      { padding: 20px; }
.card-section-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ─── Alerts ─────────────────────────────────────────────────── */
.alert          { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; }
.alert-error    { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }

/* ─── Tags / Pills ────────────────────────────────────────────── */
.page-tag, .login-tag, .upload-step-tag, .processing-tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--red); background: var(--red-light);
  padding: 3px 9px; border-radius: 20px; margin-bottom: 10px;
}
.badge {
  background: var(--red); color: #fff; font-size: 11px;
  font-weight: 600; padding: 1px 6px; border-radius: 10px; min-width: 18px;
  text-align: center; margin-left: auto;
}
.constraint-pill {
  display: inline-block; font-size: 11px; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px;
}
.cert-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: #15803D; background: var(--green-light);
  border: 1px solid #BBF7D0; border-radius: 20px; padding: 3px 10px;
}
.cert-remove    { background: none; border: none; color: #15803D; font-size: 14px; padding: 0 0 0 2px; cursor: pointer; line-height: 1; }
.cert-pills-container { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cert-add-btn   { background: none; border: 1px dashed var(--border); color: var(--text-muted); border-radius: 20px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.cert-add-btn:hover { border-color: var(--red); color: var(--red); }
.cert-add-form  { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.product-pill   { background: var(--red-light); color: var(--red); border-radius: 20px; padding: 3px 10px; font-size: 12px; font-weight: 500; }
.product-cert-pill { font-size: 11px; color: #15803D; background: var(--green-light); border: 1px solid #BBF7D0; border-radius: 20px; padding: 2px 7px; }
.unread-pill    { background: var(--red-light); color: var(--red); border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 600; }
.filter-pill    { padding: 5px 12px; border-radius: 20px; font-size: 13px; color: var(--text-muted); border: 1px solid transparent; cursor: pointer; }
.filter-pill.active { color: var(--red); background: var(--red-light); border-color: rgba(239,65,54,0.2); }
.filter-pill:hover { background: var(--border-light); }

/* ─── LOGIN PAGE ─────────────────────────────────────────────── */
.login-page     { background: var(--bg-surface); }
.login-wrapper  { display: flex; min-height: 100vh; }
.login-left     { flex: 1; display: flex; align-items: center; justify-content: center; padding: 56px 48px; background: #fff; }
.login-left-inner { width: 100%; max-width: 400px; }
.login-logo     { display: flex; align-items: center; margin-bottom: 36px; }
.login-logo-text { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); letter-spacing: -0.01em; }

/* Eyebrow tag above headline — design spec */
.login-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--red);
  background: var(--red-light);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-left: 12px;
}

.login-headline {
  font-family: var(--font-display);
  font-size: 56px; font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
}
@media (max-width: 1100px) {
  .login-headline { font-size: 44px; }
}
.login-subtext  { font-family: var(--font-body); font-size: 15px; color: var(--text-muted); margin-bottom: 32px; line-height: 1.6; }
.login-form     { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.login-form .form-input { padding: 11px 14px; font-size: 14px; border-radius: var(--radius-sm); }
.login-form .btn-primary { padding: 11px 16px; font-size: 14px; font-weight: 600; border-radius: var(--radius-sm); }
.login-footer-text { font-size: 12px; color: var(--text-muted); margin-top: 24px; text-align: center; }
.login-switch-text { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 8px; }
.login-switch-link { color: var(--red); font-weight: 600; }
.login-switch-link:hover { text-decoration: underline; }

.login-right {
  flex: 1; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 56px 48px;
  background:
    radial-gradient(ellipse 80% 60% at 85% 15%, rgba(239,65,54,0.32) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 15% 95%, rgba(241,91,42,0.22) 0%, transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(255,112,104,0.06) 0%, transparent 70%),
    var(--hero-bg);
  isolation: isolate;
}
/* Soft grain overlay for polish */
.login-right::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.04), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(239,65,54,0.08), transparent 50%);
  pointer-events: none; z-index: -1;
}
.login-right-inner { position: relative; max-width: 440px; z-index: 1; }
.login-right-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06); padding: 5px 12px;
  border-radius: var(--radius-pill); margin-bottom: 28px;
  letter-spacing: 0;
}
.login-right-headline {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 700; color: #fff;
  line-height: 1.2; letter-spacing: -0.02em;
  margin-bottom: 40px;
}
.login-steps    { display: flex; flex-direction: column; gap: 28px; }
.login-step     { display: flex; align-items: flex-start; gap: 16px; }
.step-number    {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--red); color: #fff;
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-title     { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.step-desc      { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.5; }

/* ─── UPLOAD PAGE ────────────────────────────────────────────── */
.upload-page {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(239,65,54,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(241,91,42,0.05) 0%, transparent 55%),
    var(--bg-surface);
  background-attachment: fixed;
}
.upload-layout  { min-height: 100vh; display: flex; flex-direction: column; }
.upload-header  { display: flex; align-items: center; justify-content: space-between; padding: 16px 40px; background: #fff; border-bottom: 1px solid var(--border); }
.upload-header-left { display: flex; align-items: center; gap: 16px; }
.upload-header-right { }
.back-btn       { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); text-decoration: none; padding: 5px 10px; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; transition: border-color 0.15s, color 0.15s; }
.back-btn:hover { border-color: var(--red); color: var(--red); }
.signed-in-pill { font-size: 12px; color: var(--text-muted); background: var(--border-light); padding: 5px 12px; border-radius: 20px; }
.upload-body    { display: flex; gap: 32px; padding: 40px; flex: 1; max-width: 1100px; margin: 0 auto; width: 100%; }
.upload-main    { flex: 1; }
.upload-headline { font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 12px; }
.upload-subtext { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }

.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius-lg);
  padding: 48px 32px; text-align: center; background: #fff;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--red); background: var(--red-light); }
.dropzone-inner { }
.dropzone-icon  { color: var(--text-light); margin-bottom: 12px; }
.dropzone-text  { font-size: 15px; color: var(--text-primary); margin-bottom: 4px; }
.dropzone-subtext { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.file-browse-link { color: var(--red); cursor: pointer; text-decoration: underline; }
.dropzone-pills { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }

.file-list      { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; margin-top: 16px; }
.file-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.file-list-count { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.clear-all-btn  { font-size: 12px; color: var(--text-muted); background: none; border: none; cursor: pointer; }
.clear-all-btn:hover { color: var(--red); }
.file-item      { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.file-item:last-child { border-bottom: none; }
.file-icon      { color: var(--red); flex-shrink: 0; }
.file-name      { flex: 1; font-size: 13px; font-weight: 500; }
.file-size      { font-size: 12px; color: var(--text-muted); }
.file-status    { font-size: 11px; color: var(--green); font-weight: 500; }
.file-remove    { background: none; border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; padding: 0 4px; }
.file-remove:hover { color: var(--red); }
.file-progress  { height: 3px; background: var(--border-light); border-radius: 2px; margin-top: 4px; }
.file-progress-bar { height: 100%; background: var(--green); border-radius: 2px; transition: width 0.3s; }
.validated-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); font-weight: 600; margin-top: 10px; }
.btn-process    { margin-top: 20px; padding: 12px 28px; font-size: 15px; }

.upload-rail    { width: 280px; flex-shrink: 0; }
.rail-card      { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.rail-card-title { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; }
.extract-list   { display: flex; flex-direction: column; gap: 14px; list-style: none; }
.extract-item   { display: flex; align-items: flex-start; gap: 12px; }
.extract-icon   { width: 30px; height: 30px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.extract-icon-blue   { background: var(--blue-light); color: var(--blue); }
.extract-icon-purple { background: var(--purple-light); color: var(--purple); }
.extract-icon-orange { background: var(--orange-light); color: var(--orange); }
.extract-icon-green  { background: var(--green-light); color: var(--green); }
.extract-label  { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.extract-detail { font-size: 12px; color: var(--text-muted); }
.rail-footnote  { font-size: 12px; color: var(--text-muted); margin-top: 16px; line-height: 1.5; border-top: 1px solid var(--border-light); padding-top: 12px; }

/* ─── PROCESSING PAGE ────────────────────────────────────────── */
.processing-page {
  background:
    radial-gradient(ellipse 70% 55% at 50% 30%, rgba(239,65,54,0.30) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 20% 90%, rgba(241,91,42,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 90%, rgba(255,112,104,0.15) 0%, transparent 60%),
    var(--hero-bg);
  background-attachment: fixed;
  position: relative;
  isolation: isolate;
}
.processing-page::before {
  content: ''; position: fixed; inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(239,65,54,0.05), transparent 70%);
  pointer-events: none; z-index: -1;
}
.processing-screen {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px;
}
.processing-center { text-align: center; max-width: 500px; width: 100%; }
.processing-spinner { width: 80px; height: 80px; position: relative; margin: 0 auto 24px; }
.spinner-ring   { position: absolute; inset: 0; border: 3px solid rgba(239,65,54,0.2); border-top-color: var(--red); border-radius: 50%; animation: spin 1s linear infinite; }
.spinner-logo   { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
@keyframes spin  { to { transform: rotate(360deg); } }
.processing-headline { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: #fff; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 14px; }
.processing-subtext  { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.6; margin-bottom: 40px; }

.processing-steps { display: flex; flex-direction: column; gap: 0; text-align: left; max-width: 360px; margin: 0 auto; }
.proc-step      { display: flex; gap: 16px; }
.proc-step-indicator { display: flex; flex-direction: column; align-items: center; gap: 0; }
.proc-dot       { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.proc-dot-active { background: var(--red); color: #fff; }
.proc-dot-completed { background: var(--green); color: #fff; }
.proc-dot-pending   { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.4); }
.proc-line      { width: 2px; height: 32px; background: rgba(255,255,255,0.1); margin: 4px 0; }
.proc-step:last-child .proc-line { display: none; }
.proc-step-content { padding: 4px 0 24px; }
.proc-step-title { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.9); margin-bottom: 3px; }
.proc-step-desc  { font-size: 12px; color: rgba(255,255,255,0.4); }
.proc-step[data-state="active"] .proc-step-title { color: #fff; }
.proc-step[data-state="completed"] .proc-step-title { color: rgba(255,255,255,0.6); }

.processing-footer { position: fixed; bottom: 24px; font-size: 12px; color: rgba(255,255,255,0.3); }

.processing-home-cta  { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.processing-home-note { font-size: 12px; color: rgba(255,255,255,0.4); margin: 0; }

.processing-error { display: flex; align-items: flex-start; gap: 12px; background: rgba(220,38,38,0.1); border: 1px solid rgba(220,38,38,0.3); border-radius: var(--radius); padding: 16px; margin-top: 24px; text-align: left; }
.error-icon     { color: #F87171; flex-shrink: 0; margin-top: 2px; }
.error-title    { font-size: 14px; font-weight: 600; color: #F87171; margin-bottom: 4px; }
.error-message  { font-size: 13px; color: rgba(255,255,255,0.5); }

/* ─── PORTAL LAYOUT ──────────────────────────────────────────── */
.portal-layout  { display: flex; min-height: 100vh; }
.sidebar        { width: var(--sidebar-width); background: var(--sidebar-bg); display: flex; flex-direction: column; flex-shrink: 0; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 100; }
.portal-main    { margin-left: var(--sidebar-width); flex: 1; min-height: 100vh; padding: 32px; max-width: calc(100vw - var(--sidebar-width)); }

/* Sidebar internals */
.sidebar-header { padding: 20px 16px 16px; border-bottom: 1px solid var(--sidebar-border); }
/* .sidebar-logo defined below in brand lockup section */
.sidebar-logo-text {
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}
.sidebar-section-label { font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.25); letter-spacing: 0.1em; text-transform: uppercase; padding: 18px 16px 6px; }
.sidebar-nav    { flex: 1; padding-bottom: 8px; }
.sidebar-item   { display: flex; align-items: center; gap: 10px; padding: 9px 16px; color: var(--sidebar-text); font-size: 13.5px; border-radius: var(--radius-sm); margin: 1px 8px; transition: background 0.15s, color 0.15s; }
.sidebar-item:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-item.active { color: var(--red); background: var(--red-dim); font-weight: 500; }
.sidebar-icon   { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-upload-widget { margin: 12px; padding: 14px; background: rgba(255,255,255,0.04); border-radius: var(--radius); border: 1px solid var(--sidebar-border); }
.widget-title   { font-size: 12px; font-weight: 700; color: var(--red); margin-bottom: 6px; }
.widget-desc    { font-size: 11px; color: rgba(255,255,255,0.35); line-height: 1.5; margin-bottom: 10px; }

.sidebar-user {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--sidebar-border);
}
.sidebar-user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
}
.user-avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--red); color: #fff;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-info     { flex: 1; min-width: 0; }
.user-company  {
  font-size: 13px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-email    {
  font-size: 11px; color: rgba(255,255,255,0.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}

.sidebar-logout {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.7);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sidebar-logout:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.sidebar-logout svg { flex-shrink: 0; }

/* Page headers */
.page-header    { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.page-headline  { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: -0.015em; margin-bottom: 4px; }
.page-desc      { font-size: 13px; color: var(--text-muted); }
.page-header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* Toolbar */
.products-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.products-toolbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.products-count { font-size: 13px; color: var(--text-muted); }
.search-form    { flex: 1; max-width: 320px; }
.search-input-wrap { position: relative; }
.search-icon    { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); }
.search-input   { width: 100%; padding: 8px 12px 8px 34px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; font-size: 13px; }
.search-input:focus { outline: none; border-color: var(--red); }

/* ─── PRODUCT GRID ───────────────────────────────────────────── */
.products-grid  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.product-card   { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow 0.2s; position: relative; }
.product-card:hover { box-shadow: var(--shadow); }
.product-cert-badge { position: absolute; top: 10px; left: 10px; background: var(--green-light); color: #15803D; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px; border: 1px solid #BBF7D0; }
.product-image  { height: 120px; background: var(--border-light); display: flex; align-items: center; justify-content: center; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-image-placeholder { color: var(--text-light); }
.product-card-body { padding: 14px; flex: 1; }
.product-name   { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.product-grade  { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.product-specs  { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.product-spec-row { display: flex; justify-content: space-between; font-size: 12px; }
.spec-name      { color: var(--text-muted); }
.spec-value     { color: var(--text-primary); font-weight: 500; }
.product-certs  { display: flex; flex-wrap: wrap; gap: 4px; }
.product-cert-pill.more { background: var(--border-light); color: var(--text-muted); border-color: var(--border); }
.product-card-actions { padding: 10px 14px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; }

.products-empty, .inquiry-empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--text-muted); }
.products-empty h3 { font-size: 16px; margin: 12px 0 6px; color: var(--text-primary); }
.empty-icon     { color: var(--text-light); margin-bottom: 8px; display: flex; justify-content: center; }
.empty-actions  { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

/* ─── MODAL ──────────────────────────────────────────────────── */
.modal-overlay  { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal          { background: #fff; border-radius: var(--radius-xl); width: 100%; max-width: 540px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal-header   { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 16px; border-bottom: 1px solid var(--border); }
.modal-title    { font-size: 16px; font-weight: 700; }
.modal-close    { background: none; border: none; font-size: 22px; color: var(--text-muted); cursor: pointer; padding: 0; line-height: 1; }
.modal-body     { padding: 20px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-footer   { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* Spec rows */
.spec-row       { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.spec-remove-btn { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; padding: 0 4px; flex-shrink: 0; }
.spec-remove-btn:hover { color: var(--red); }

/* ─── DRAWER ─────────────────────────────────────────────────── */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 150; }
.drawer         { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; background: #fff; z-index: 151; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow-y: auto; animation: slideIn 0.25s ease; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-header  { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; z-index: 1; }
.drawer-title   { font-size: 16px; font-weight: 700; }
.drawer-close   { background: none; border: none; font-size: 22px; color: var(--text-muted); cursor: pointer; padding: 0; line-height: 1; }
.drawer-body    { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.drawer-footer  { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: #fff; }
.drawer-footer-right { display: flex; gap: 10px; }

/* ─── COMPANY PAGE ───────────────────────────────────────────── */
.company-layout { display: flex; gap: 28px; align-items: flex-start; }
.company-main   { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.company-rail   { width: 296px; flex-shrink: 0; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }

/* Hero identity card */
.company-hero-card {
  padding: 28px 28px 24px;
  background: linear-gradient(135deg, #fff 0%, #fafafa 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.company-identity { display: flex; align-items: center; gap: 20px; }
.company-avatar-lg {
  position: relative;
  width: 84px; height: 84px;
  background: linear-gradient(135deg, var(--red) 0%, #c8151c 100%);
  border-radius: var(--radius-lg);
  color: #fff; font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: visible;
  box-shadow: 0 8px 24px rgba(239,65,54,0.25);
}
.company-avatar-lg img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); }
.avatar-edit-btn {
  position: absolute; bottom: -7px; right: -7px;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 50%; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted);
  box-shadow: 0 2px 6px rgba(0,0,0,0.10);
  transition: border-color 0.15s, color 0.15s;
}
.avatar-edit-btn:hover { border-color: var(--red); color: var(--red); }
.company-identity-info { flex: 1; min-width: 0; }
.company-name-display { font-size: 20px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.company-meta   { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.company-meta-item {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-muted);
  background: var(--border-light); border-radius: 20px;
  padding: 3px 10px; border: 1px solid var(--border);
}
.company-meta-link { color: var(--blue); text-decoration: none; }
.company-meta-link:hover { color: #2563eb; }

/* Section cards */
.company-section-card {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
}
.company-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.company-section-title {
  font-size: 13px; font-weight: 700; color: var(--text-primary);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.company-section-hint { font-size: 12px; color: var(--text-muted); }
.form-textarea-desc { resize: vertical; min-height: 80px; line-height: 1.6; }
.form-textarea-about { resize: vertical; min-height: 120px; line-height: 1.6; }
.company-empty-hint { font-size: 13px; color: var(--text-muted); font-style: italic; }

/* ── Right rail ── */
.rail-preview-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.rail-preview-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.rail-preview-title {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
}
.rail-preview-open { color: var(--text-muted); display: flex; align-items: center; }
.rail-preview-open:hover { color: var(--red); }

/* Rail coming-soon card */
.rail-coming-soon-card { border-style: dashed; }
.rail-cs-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--red);
  background: var(--red-light); border-radius: 20px; padding: 2px 9px;
}
.rail-cs-body {
  padding: 28px 20px 24px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
}
.rail-cs-icon { color: var(--text-light); }
.rail-cs-headline { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.rail-cs-desc { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.rail-cs-cta { margin-top: 4px; }

/* Quick stats card */
.quick-stats-card { padding: 20px 22px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.stat-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}
.stat-item:nth-child(2n) { border-right: none; padding-left: 20px; }
.stat-item:nth-child(odd) { padding-right: 20px; }
.stat-item:nth-last-child(-n+2) { border-bottom: none; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text-primary); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ─── INQUIRIES PAGE ─────────────────────────────────────────── */
.inquiries-layout { display: flex; gap: 0; height: calc(100vh - 140px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; overflow: hidden; }
.inquiry-list-pane { width: 320px; flex-shrink: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.inquiry-search-wrap { padding: 10px 12px; border-bottom: 1px solid var(--border-light); position: relative; display: flex; align-items: center; }
.inquiry-search-wrap .search-icon { position: absolute; left: 22px; width: 14px; height: 14px; color: var(--text-light); pointer-events: none; flex-shrink: 0; }
.inquiry-search { width: 100%; padding: 7px 10px 7px 34px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--bg-page); color: var(--text-primary); transition: border-color 0.15s, background 0.15s; }
.inquiry-search:focus { outline: none; border-color: var(--red); background: #fff; box-shadow: 0 0 0 2px rgba(239,65,54,0.08); }
.inquiry-search::placeholder { color: var(--text-light); }
.inquiry-filters { display: flex; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--border-light); }
.inquiry-list   { flex: 1; overflow-y: auto; }

.inquiry-item   { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-bottom: 1px solid var(--border-light); cursor: pointer; position: relative; transition: background 0.1s; }
.inquiry-item:hover { background: var(--border-light); }
.inquiry-item.active { background: var(--red-light); border-left: 3px solid var(--red); }
.inquiry-item-left { flex-shrink: 0; }
.buyer-avatar   { width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.inquiry-item-body { flex: 1; min-width: 0; }
.inquiry-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1px; }
.inquiry-buyer-name { font-size: 13px; font-weight: 600; }
.inquiry-time   { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.inquiry-buyer-company { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.inquiry-product-tag { display: inline-block; font-size: 11px; color: var(--red); background: var(--red-light); padding: 1px 7px; border-radius: 20px; margin-bottom: 4px; font-weight: 500; }
.inquiry-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inquiry-unread-dot { width: 7px; height: 7px; background: var(--red); border-radius: 50%; flex-shrink: 0; margin-top: 6px; }

/* Detail pane */
.inquiry-detail-pane { flex: 1; overflow-y: auto; }
.inquiry-detail-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); font-size: 14px; gap: 10px; }
.inquiry-detail { padding: 24px; }
.inquiry-detail-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border-light); }
.inquiry-detail-buyer { display: flex; gap: 14px; align-items: flex-start; }
.buyer-avatar-lg { width: 48px; height: 48px; border-radius: 50%; background: var(--red); color: #fff; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.buyer-name-lg  { font-size: 16px; font-weight: 700; }
.buyer-company-lg { font-size: 13px; color: var(--text-muted); }
.buyer-email    { font-size: 12px; color: var(--blue); margin-top: 2px; }
.inquiry-received { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.inquiry-status-new    { background: var(--red-light); color: var(--red); font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.inquiry-status-quoted { background: var(--green-light); color: #15803D; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }

.inquiry-about-card { padding: 14px 16px; margin-bottom: 14px; }
.inquiry-about-row  { display: flex; align-items: center; gap: 10px; }
.inquiry-about-label { font-size: 12px; color: var(--text-muted); min-width: 110px; }
.view-product-link  { font-size: 12px; color: var(--red); margin-left: auto; }
.text-muted         { color: var(--text-muted); }

.inquiry-message-card { padding: 16px; margin-bottom: 14px; }
.inquiry-message-body { font-size: 14px; line-height: 1.7; color: var(--text-secondary); white-space: pre-wrap; max-height: 200px; overflow-y: auto; }

/* Quote builder */
.quote-builder-card { padding: 20px; }
.quote-builder-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.quote-builder-title { font-size: 15px; font-weight: 700; }
.quote-routed-note { font-size: 11px; color: var(--green); display: flex; align-items: center; gap: 4px; }
.quote-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.quote-fields   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quote-field    { }
.input-prefix-wrap { position: relative; display: flex; align-items: center; }
.input-prefix   { position: absolute; left: 10px; font-size: 14px; color: var(--text-muted); z-index: 1; }
.input-with-prefix { padding-left: 22px; }
.input-suffix   { position: absolute; right: 8px; display: flex; align-items: center; gap: 2px; }
.unit-select    { border: none; background: transparent; font-size: 13px; color: var(--text-muted); cursor: pointer; padding: 0; }
.input-suffix-wrap { position: relative; display: flex; align-items: center; }
.input-suffix-text { position: absolute; right: 10px; font-size: 12px; color: var(--text-muted); pointer-events: none; }
.input-with-unit-suffix { padding-right: 52px; }
.quote-submitted-banner { display: flex; align-items: center; gap: 8px; background: var(--green-light); color: #15803D; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; font-weight: 500; margin-bottom: 14px; }
.quote-summary  { display: flex; flex-direction: column; gap: 8px; }
.quote-summary-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); }
.quote-summary-row strong { color: var(--text-primary); }
.quote-form-footer { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 16px; }
.quote-error    { font-size: 13px; color: #DC2626; }

/* ─── Product Detail Page ────────────────────────────────────── */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); text-decoration: none; margin-bottom: 8px; }
.back-link:hover { color: var(--text-primary); }
.page-headline-sub { font-size: 18px; font-weight: 400; color: var(--text-muted); margin-left: 8px; }
.product-detail-layout { display: flex; gap: 32px; align-items: flex-start; }
.product-detail-aside { width: 240px; flex-shrink: 0; }
.product-detail-main { flex: 1; min-width: 0; }
.product-detail-image-wrap { background: var(--border-light); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.product-detail-image { width: 100%; height: 100%; object-fit: cover; }
.product-detail-image-placeholder { display: flex; align-items: center; justify-content: center; color: var(--text-light); width: 100%; aspect-ratio: 1; }
.product-detail-section { margin-bottom: 28px; }
.section-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.product-detail-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 0; }
.specs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs-table th { text-align: left; padding: 8px 12px; background: var(--border-light); color: var(--text-muted); font-weight: 500; font-size: 12px; border-bottom: 1px solid var(--border); }
.specs-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.specs-table tr:last-child td { border-bottom: none; }
.product-detail-actions { margin-top: 8px; }

/* ─── QUOTES PAGE ────────────────────────────────────────────── */
.quotes-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.metric-card    { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 24px; }
.metric-value   { font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1; margin-bottom: 4px; }
.metric-label   { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 2px; }
.metric-sub     { font-size: 12px; color: var(--text-muted); }
.metric-sub-up  { color: #15803D; }
.metric-sub-down { color: #DC2626; }

.quotes-table   { width: 100%; border-collapse: collapse; font-size: 14px; }
.quotes-table thead tr { border-bottom: 1px solid var(--border); }
.quotes-table th { text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.quotes-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.quotes-table tbody tr:last-child td { border-bottom: none; }
.quote-row      { cursor: pointer; transition: background 0.1s; }
.quote-row:hover { background: var(--bg-page); }
.quote-id-tag   { font-family: monospace; font-size: 12px; background: var(--border-light); color: var(--text-secondary); padding: 2px 8px; border-radius: var(--radius-sm); }
.quote-buyer-name { font-weight: 500; color: var(--text-primary); }
.quote-buyer-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.quote-status-pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.quote-status-sent     { background: #DBEAFE; color: #1D4ED8; }
.quote-status-counter  { background: #FED7AA; color: #C2410C; }
.quote-status-accepted { background: var(--green-light); color: #15803D; }
.quote-status-expired  { background: var(--border-light); color: var(--text-muted); }
.quote-status-declined { background: var(--bg-muted); color: var(--text-secondary); }

.sort-link      { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.sort-link:hover { color: var(--red); }
.sort-arrow     { font-size: 10px; }

.quotes-pagination { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-top: 1px solid var(--border); }
.pagination-info { font-size: 13px; color: var(--text-muted); }
.pagination-controls { display: flex; gap: 8px; }

.quotes-empty   { padding: 60px 24px; text-align: center; color: var(--text-muted); }
.quotes-empty .empty-icon { display: flex; justify-content: center; margin-bottom: 16px; opacity: 0.3; }

/* ─── COMING SOON PAGE ───────────────────────────────────────── */
.coming-soon-wrap { display: flex; justify-content: center; padding: 40px 0; }
.coming-soon-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 48px 56px; max-width: 560px; width: 100%; text-align: center; }
.coming-soon-icon { display: flex; justify-content: center; color: var(--text-light); margin-bottom: 20px; }
.coming-soon-pill { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; background: var(--red-light); color: var(--red); padding: 3px 12px; border-radius: 20px; margin-bottom: 16px; }
.coming-soon-headline { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; line-height: 1.3; }
.coming-soon-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 28px; }
.coming-soon-features { list-style: none; text-align: left; display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.coming-soon-feature { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-secondary); }
.feature-check  { color: var(--green); flex-shrink: 0; margin-top: 2px; }
.coming-soon-notify { font-size: 13px; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 20px; margin: 0; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .products-grid  { grid-template-columns: repeat(2, 1fr); }
  .company-layout { flex-direction: column; }
  .company-rail   { width: 100%; position: static; }
  .company-avatar-lg { width: 72px; height: 72px; font-size: 22px; }
  .form-grid-2    { grid-template-columns: 1fr; }
  .product-detail-layout { flex-direction: column; }
  .product-detail-aside  { width: 100%; }
  .product-detail-image-wrap { max-width: 240px; }
  .quotes-metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .login-right    { display: none; }
  .products-grid  { grid-template-columns: 1fr; }
  .sidebar        { display: none; }
  .portal-main    { margin-left: 0; padding: 20px; }
  .inquiries-layout { flex-direction: column; height: auto; }
  .inquiry-list-pane { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .quote-fields   { grid-template-columns: 1fr; }
  .quotes-metrics { grid-template-columns: 1fr 1fr; }
  .coming-soon-card { padding: 32px 24px; }
}

/* ─── Company: View mode (read-only display) ────────────────── */
.company-readonly-content      { padding: 4px 0; }
.company-readonly-text         {
  font-size: 14.5px; line-height: 1.7; color: var(--text-secondary);
  white-space: pre-wrap;
}
.company-readonly-text p       { margin-bottom: 12px; }
.company-readonly-text p:last-child { margin-bottom: 0; }
.company-readonly-empty        {
  font-size: 14px; color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px; line-height: 1.6;
}
.company-readonly-empty strong { color: var(--text-primary); font-weight: 600; }
.cert-pill-readonly            { padding-right: 12px; }

/* ─── Company: Improved form inputs (edit mode) ─────────────── */
.edit-mode .form-input,
.edit-mode .form-textarea {
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--off-white);
  color: var(--text-primary);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.edit-mode .form-input:hover,
.edit-mode .form-textarea:hover {
  background: #fff;
  border-color: #CFCFCF;
}
.edit-mode .form-input:focus,
.edit-mode .form-textarea:focus {
  background: #fff;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239,65,54,0.10);
  outline: none;
}
.edit-mode .form-label {
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.edit-mode .form-grid-2 { gap: 18px; }
.form-input-lg { font-size: 18px !important; font-weight: 600; padding: 12px 14px !important; }

/* ─── Sticky edit-actions bar ───────────────────────────────── */
.edit-actions-bar {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.edit-actions-label {
  font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.edit-actions-label::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(239,65,54,0.15);
}
.edit-actions-buttons { display: flex; gap: 8px; }

/* ─── Brand logo (SVG image) — sized per design spec ────────── */
.brand-logo            { display: block; width: auto; flex-shrink: 0; user-select: none; }
.brand-logo-xs         { height: 22px; }
.brand-logo-sm         { height: 30px; }   /* sidebar / portal header — design spec */
.brand-logo-md         { height: 36px; }   /* login / register — design spec */
.brand-logo-lg         { height: 44px; }
.brand-logo-spinner    { height: 28px; }

/* Vertical divider between logo and wordmark (design spec: 1×22px) */
.brand-divider {
  display: inline-block;
  width: 1px; height: 22px;
  background: rgba(255,255,255,0.14);
  flex-shrink: 0;
}
.brand-divider-light   { background: var(--border); }

/* Brand lockup: logo | divider | wordmark — used in sidebar & upload header */
.sidebar-logo          { display: flex; align-items: center; gap: 12px; }

/* Upload header lockup variant (light background) */
.upload-brand-lockup .upload-wordmark {
  color: var(--ink);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.02em;
}
