/**
 * Module: /public/css/core.css
 * Updated: 2025-11-24
 * Batch #90 — "Perfection is achieved by subtraction." — Aether Core
 * © Steam Factory — Built with ❤️ by the awesome crew at Steam Factory
 * chatGPT says, "and I helped!"
 *
 * Purpose:
 *   Unified, optimized stylesheet for the Steam Factory Portal.
 *   Provides global typography, layout, navigation, buttons,
 *   tables, modals, quote/order UI, and reusable utilities
 *   in a cohesive brass / steampunk visual language.
 */

/* =========================================================
   🎨 INDEX / LOGIN BACKGROUNDS
========================================================= */

body.sf-gradient,
body.sfp-gradient {
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, .5), #000),
    url("/assets/gears-bg.jpg") center/cover no-repeat fixed;
  background-blend-mode: overlay;
}

/* =========================================================
   🧱 BASE TYPOGRAPHY & GLOBAL STRUCTURE
========================================================= */

html,
body {
  font-family: "Zilla Slab", "Segoe UI", sans-serif;
  font-size: 16px;
  color: #222;
  margin: 0;
  padding: 0;
  background: #f8f9fa;
  height: 100%;
  overflow: hidden; /* 💡 disable page-level vertical scroll (tabs handle it) */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Agency FB", "Zilla Slab", sans-serif;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #111;
}

p {
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

/* Simple container */
.sfp-container {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Base flex/grid helpers */
.sfp-flex {
  display: flex;
  align-items: center;
  justify-content: center;
}
.sfp-grid {
  display: grid;
  gap: 1rem;
}
.sfp-hidden {
  display: none !important;
}

/* Text utilities */
.sfp-center-text { text-align: center; }
.sfp-right-text  { text-align: right; }
.sfp-bold        { font-weight: 700; }
.sfp-muted       { color: #666; }

/* =========================================================
   🧭 CORE LAYOUT & NAVIGATION
========================================================= */

/* Layout wrapper */
.sf-layout {
  display: flex;
  min-height: 100vh;
  background: transparent;
  overflow: hidden;
}

/* Sidebar */
.sf-nav-app {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  background: linear-gradient(180deg, #1a1a1a, #2a2a2a);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-right: 2px solid rgba(255, 204, 0, 0.3);
  box-shadow: 3px 0 6px rgba(0, 0, 0, 0.4);
  z-index: 300;
  pointer-events: auto;
}

.sf-nav-app h2 {
  font-family: "Agency FB", "Zilla Slab", sans-serif;
  text-transform: uppercase;
  font-size: 1.3rem;
  color: #ffcc00;
  text-align: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 204, 0, 0.3);
  margin: 0;
}

/* Sidebar list */
.sf-nav-app ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sf-nav-app li {
  cursor: pointer;
  user-select: none;
}

/* Sidebar links */
.sf-nav-app nav ul,
.sf-nav-app nav li {
  margin: 0;
  padding: 0;
}

.sf-nav-app nav a,
.sf-nav-app li {
  display: block;
  padding: 0.8rem 1.2rem;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.sf-nav-app a:hover,
.sf-nav-app li:hover {
  background: rgba(255, 204, 0, 0.15);
  color: #ffcc00;
}

.sf-nav-app a.active,
.sf-nav-app li.active {
  background: rgba(255, 204, 0, 0.3);
  color: #000;
  font-weight: 700;
}

/* Top nav bar */
.sf-nav-top {
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 2px solid #ffcc00;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 250;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Main content */
.sf-main {
  flex: 1;
  margin-left: 240px;  /* sidebar width */
  margin-top: 60px;    /* top nav height */
  padding: 2rem;
  background: rgba(255, 255, 255, 0.9);
  border-left: 2px solid rgba(255, 204, 0, 0.3);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
  min-height: calc(100vh - 60px);
  animation: sfp-fade-in 0.25s ease-in-out;
  position: relative;
  z-index: 100;

  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
  overflow: hidden; /* tabs manage scroll */
}

/* Tabs container */
.sf-tabs {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
  animation: sfp-fade-up 0.3s ease-in-out;
}

/* Tab bar */
.sf-tab-bar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0 0 0.75rem 0;
  padding: 0.75rem 1rem 0 1rem;
}

.sf-tab {
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 4px 4px 0 0;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  font-size: 0.95rem;
}

.sf-tab.active {
  background: #ffcc00;
  color: #000;
  border-bottom: 2px solid #000;
  font-weight: 700;
}

/* Tab content viewport */
.sf-tab-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.25rem;
  box-sizing: border-box;
  background: #fff;
}

/* Tab scroll styling */
.sf-tab-content::-webkit-scrollbar {
  width: 8px;
}
.sf-tab-content::-webkit-scrollbar-thumb {
  background-color: #ffcc00;
  border-radius: 4px;
}
.sf-tab-content::-webkit-scrollbar-track {
  background-color: #2a2a2a;
}

/* Generic scroll helper */
.sf-scroll {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ffcc00 #2a2a2a;
}
.sf-scroll::-webkit-scrollbar {
  width: 8px;
}
.sf-scroll::-webkit-scrollbar-thumb {
  background-color: #ffcc00;
  border-radius: 4px;
}
.sf-scroll::-webkit-scrollbar-track {
  background-color: #2a2a2a;
}

/* Universal tab header row */
.sfp-tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 1rem;
}
.sfp-tab-header h1,
.sfp-tab-header h2 {
  margin: 0;
  padding: 0;
}
.sfp-tab-header .sfp-tab-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* =========================================================
   🪄 BUTTONS — UNIFIED SYSTEM
========================================================= */

.sfp-btn {
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

/* Primary (brass) */
.sfp-btn-primary {
  background: #ffcc00;
  color: #000;
}
.sfp-btn-primary:hover {
  background: #fff000;
}

/* Secondary (neutral) */
.sfp-btn-secondary {
  background: #ccc;
  color: #000;
}
.sfp-btn-secondary:hover {
  background: #aaa;
}

/* Confirm (green) */
.sfp-btn-confirm {
  background: #28a745;
  color: #fff;
}
.sfp-btn-confirm:hover {
  background: #218838;
}

/* Danger (red) */
.sfp-btn-danger {
  background: #dc3545;
  color: #fff;
}
.sfp-btn-danger:hover {
  background: #c82333;
}

/* Small variant */
.sfp-btn-small {
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
}

/* Disabled state */
.sfp-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Send/action button (gold pop) */
.sfp-btn-send {
  background: #ffcc00;
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.sfp-btn-send:hover {
  background: #fff000;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.6);
}
.sfp-btn-send:active {
  transform: translateY(0);
  background: #e6b800;
}

/* Quotes tab action button */
.sfp-btn-newquote {
  background: #ffcc00;
  color: #000;
  font-weight: 700;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  transition: all 0.2s ease;
  box-shadow: 0 3px 6px rgba(0,0,0,0.25);
}
.sfp-btn-newquote:hover {
  background: #fff000;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.35);
}

/* Loading spinner */
.sfp-btn-spinner {
  border: 2px solid rgba(255,204,0,0.3);
  border-top-color: #ffcc00;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: inline-block;
  animation: sfp-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
.sfp-btn-loading {
  opacity: 0.8;
  pointer-events: none;
}

/* =========================================================
   🧾 QUOTES TAB — DEDICATED BUTTONS
========================================================= */

.qbtn {
  padding: 0.35rem 0.75rem !important;
  font-size: 0.9rem !important;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  display: inline-block;
  white-space: nowrap;
}

/* View */
.qbtn-view {
  background: #ccc !important;
  color: #000 !important;
}
.qbtn-view:hover {
  background: #aaa !important;
}

/* Order */
.qbtn-order {
  background: #28a745 !important;
  color: #fff !important;
}
.qbtn-order:hover {
  background: #218838 !important;
}

/* Quotes header layout */
.sfv-quotes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

/* =========================================================
   📊 TABLES — STANDARD PORTAL TABLES
========================================================= */

.sfp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: #fff;
}

/* Shared headers */
.sfp-table-head th,
.sfp-orders-table thead th,
.sfp-quotes-table thead th {
  background: #2c2c2c;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  border: 1px solid #444;
  padding: 0.75rem 0.75rem;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  font-family: "Zilla Slab", "Segoe UI", sans-serif;
}

/* Cells */
.sfp-table td {
  border: 1px solid #ccc;
  padding: 0.6rem 0.75rem;
  vertical-align: middle;
  white-space: nowrap;
  font-family: "Zilla Slab", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  text-align: center;
}

/* Alignment helpers for cells */
.sfp-table td.sfp-col-title  { text-align: left;  }
.sfp-table td.sfp-col-total  { text-align: right; }

/* Column widths */
th.sfp-col-order,   td.sfp-col-order   { width: 110px; }
th.sfp-col-rfq,     td.sfp-col-rfq     { width: 110px; }
th.sfp-col-revision,td.sfp-col-revision{ width: 90px;  }
th.sfp-col-title,   td.sfp-col-title   { min-width: 240px; max-width: 100%; }
th.sfp-col-date,    td.sfp-col-date    { width: 120px; }
th.sfp-col-total,   td.sfp-col-total   { width: 110px; }
th.sfp-col-status,  td.sfp-col-status  { width: 140px; }
th.sfp-col-actions, td.sfp-col-actions { width: 160px; }

/* Subtle brass edge under headers */
.sfp-table-head tr {
  box-shadow: inset 0 -2px 0 rgba(255, 204, 0, 0.25);
}

/* =========================================================
   📦 ORDER DETAIL LAYOUT & SUMMARY
========================================================= */

/* Builds table in Order Detail */
.sfp-order-builds th,
.sfp-order-builds td {
  text-align: center;
  vertical-align: middle;
}

.sfp-order-builds th:nth-child(1),
.sfp-order-builds td:nth-child(1) {
  width: 50px;
}

.sfp-order-builds th:nth-child(2),
.sfp-order-builds td:nth-child(2) {
  width: 120px; /* Technology */
}

.sfp-order-builds th:nth-child(3),
.sfp-order-builds td:nth-child(3) {
  width: 160px; /* Material */
}

.sfp-order-builds th:nth-child(4),
.sfp-order-builds td:nth-child(4) {
  width: 120px; /* Total */
  text-align: right;
}

/* Loading card */
.sfp-loading-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  color: #555;
  animation: sfp-fade-in 0.3s ease;
  margin-top: 1rem;
}

.sfp-loading-bar {
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #ffcc00, #fff000);
  background-size: 200% 100%;
  animation: sfp-loading-bar 1.2s infinite linear;
  border-radius: 4px;
  margin-bottom: 1rem;
}

@keyframes sfp-loading-bar {
  from { background-position: 0% 0; }
  to   { background-position: -200% 0; }
}

/* Bottom action bar */
.sfp-order-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
}
.sfp-order-actions .sfp-btn {
  min-width: 180px;
  text-align: center;
}

@media (max-width: 640px) {
  .sfp-order-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .sfp-order-actions .sfp-btn {
    width: 100%;
  }
}

/* Order summary card */
.sfp-order-summary {
  margin-top: 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  padding: 1rem 1.25rem;
}

.sfp-order-summary h3 {
  font-family: "Agency FB", "Zilla Slab", sans-serif;
  text-transform: uppercase;
  font-size: 1.25rem;
  color: #111;
  margin-bottom: 1rem;
}

/* Totals grid */
.sfp-order-totals {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.sfp-order-totals th {
  width: 80%;
  text-align: right;
  padding: 0.5rem 0.75rem;
  color: #333;
  background: #fafafa;
}

.sfp-order-totals td {
  width: 120px;
  text-align: right;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
}

.sfp-order-totals tr.sfp-total th,
.sfp-order-totals tr.sfp-total td {
  border-top: 2px solid #ffcc00;
  font-size: 1.05rem;
}

.sfp-btn-proceed {
  margin-top: 0.5rem;
}

/* =========================================================
   🦴 SKELETON LOADER
========================================================= */

.sfp-skeleton {
  background: #e2e2e2;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.sfp-skeleton.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  animation: sfp-shimmer 1.5s infinite;
}

@keyframes sfp-shimmer {
  100% { transform: translateX(100%); }
}

.sfp-skel-line  { height: 18px; margin-bottom: 0.5rem; }
.sfp-skel-title { height: 26px; width: 40%; margin-bottom: 1rem; }
.sfp-skel-box   { height: 60px; margin-bottom: 1rem; }
.sfp-skel-table-row { height: 32px; margin-bottom: 0.35rem; }

/* =========================================================
   💡 MEMBERSHIP TIP
========================================================= */

.sfp-membership-tip {
  margin-top: 0.75rem;
  font-size: 0.95rem;
}
.sfp-membership-tip a.sfp-link {
  color: #ffcc00;
  font-weight: 600;
  text-decoration: none;
}
.sfp-membership-tip a.sfp-link:hover {
  text-decoration: underline;
}

/* =========================================================
   🎯 STATUS BADGES (ORDERS + QUOTES)
========================================================= */

.sfp-status-badge {
  display: inline-block;
  min-width: 110px;
  min-height: 20px;
  line-height: 1.4;
  padding: 6px 6px;
  border-radius: 5px !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: capitalize;
  text-align: center;
  color: #fff;
  background: linear-gradient(145deg, #3a3a3a, #1e1e1e);
  border: 1px solid rgba(255, 204, 0, 0.25);
  box-shadow:
    0 1px 3px rgba(0,0,0,0.4),
    inset 0 0 3px rgba(255,204,0,0.15);
  transition: all 0.15s ease;
  vertical-align: middle;
}
.sfp-status-badge:hover {
  transform: translateY(-1px);
  box-shadow:
    0 2px 5px rgba(0,0,0,0.35),
    inset 0 0 5px rgba(255,204,0,0.25);
}

/* Badge variants */
.sfp-status-badge.draft {
  background: linear-gradient(145deg, #7a7a7a, #5c5c5c);
  border-color: #8a8a8a;
}
.sfp-status-badge.submitted {
  background: linear-gradient(145deg, #2196f3, #0b63c9);
  border-color: #0b63c9;
}
.sfp-status-badge.quoted {
  background: linear-gradient(145deg, #ffd54f, #ffb300);
  color: #000;
  border-color: #cc9a00;
}
.sfp-status-badge.pending-payment {
  background: linear-gradient(145deg, #ffb703, #d68b00);
  color: #000;
  border-color: #cc9000;
}
.sfp-status-badge.paid {
  background: linear-gradient(145deg, #43a047, #2e7d32);
  border-color: #2e7d32;
}
.sfp-status-badge.canceled,
.sfp-status-badge.cancelled {
  background: linear-gradient(145deg, #e74c3c, #b71c1c);
  border-color: #b71c1c;
}

/* =========================================================
   🧱 MODAL FRAMEWORK
========================================================= */

.sfp-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px) saturate(1.2);
  -webkit-backdrop-filter: blur(6px) saturate(1.2);
  z-index: 999999;
  overflow: hidden;
  transition: opacity 0.2s ease-in-out;
}
.sfp-modal.hidden {
  display: none !important;
}

.sfp-modal-content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  width: min(620px, 95vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sfpModalAppear 0.25s ease-out;
  font-family: "Zilla Slab", "Segoe UI", sans-serif;
}

@keyframes sfpModalAppear {
  from { opacity: 0; transform: translateY(25px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sfp-modal-header {
  background: linear-gradient(180deg, #fff8e1 0%, #fff 100%);
  padding: 1rem 1.25rem;
  border-bottom: 2px solid #ffcc00;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sfp-modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
  color: #222;
}

.sfp-modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #444;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.15s ease;
}
.sfp-modal-close:hover {
  color: #000;
  transform: scale(1.15);
}

.sfp-modal-body {
  padding: 1.25rem;
  flex: 1;
  overflow-y: auto;
  color: #333;
  background: #fff;
}

.sfp-modal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}
.sfp-modal-table th,
.sfp-modal-table td {
  border: 1px solid #ddd;
  padding: 0.45rem 0.6rem;
}
.sfp-modal-table th {
  background: #ffcc00;
  color: #000;
  text-align: left;
}

.sfp-modal-summary {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-top: 1rem;
  border-top: 2px solid #ffcc00;
  padding-top: 0.6rem;
}

.sfp-modal-footer {
  background: #fafafa;
  border-top: 1px solid #ddd;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Dialog special case */
.sfp-dialog {
  max-width: 420px;
  animation: sfpDialogPop 0.25s ease-out;
}
@keyframes sfpDialogPop {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.sfp-modal-confirm .sfp-modal-body p {
  font-size: 1.05rem;
  color: #222;
  text-align: center;
  padding: 1rem 0;
}
.sfp-modal-confirm .sfp-modal-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding-top: 1rem;
}

/* =========================================================
   📤 UPLOAD MODAL (SUBMIT QUOTE)
========================================================= */

#uploadModal {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#uploadModal .modal-content {
  background: #fffbe6;
  border: 2px solid #ffcc00;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
  padding: 2rem;
  text-align: center;
  font-family: "Zilla Slab", serif;
  max-width: 400px;
  width: 90%;
}

.progress-bar-bg {
  width: 100%;
  height: 18px;
  background: #eee;
  border-radius: 9px;
  overflow: hidden;
  margin-top: 1rem;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffcc00, #ffe14a);
  border-radius: 9px;
  transition: width 0.3s ease;
}

#uploadStatus {
  margin-top: 0.5rem;
  font-weight: 600;
  color: #333;
}

/* =========================================================
   📋 QUOTE CREATE — 3-COLUMN BRASS PANEL LAYOUT
========================================================= */

/* 3 columns: Quote Data | Deliver | Quantity / Files */
.quote-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}
@media (max-width: 900px) {
  .quote-options-grid {
    grid-template-columns: 1fr;
  }
}

/* Brass panel column */
.qo-col {
  background: #fff8ed;
  padding: 1.25rem;
  border-radius: 12px;

  border: 2px solid #d4a76a;
  box-shadow:
    inset 0 0 6px rgba(212, 167, 106, 0.6),
    0 2px 4px rgba(0,0,0,0.08),
    0 0 10px rgba(212, 167, 106, 0.30);

  background-image: linear-gradient(
    to bottom right,
    rgba(255, 245, 226, 0.95),
    rgba(255, 252, 240, 1)
  );

  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Section title (Quote Data / Deliver / Quantity) */
.qo-section-title {
  font-family: "Agency FB", sans-serif;
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  color: #333;
}

/* Inner fieldset with subtle brass edge */
.qo-fieldset {
  border: 1.5px solid #c89b5e;
  background: rgba(255, 248, 235, 0.75);
  box-shadow: inset 0 0 4px rgba(200,155,94,0.4);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
}
.qo-fieldset legend {
  padding: 0 0.4rem;
  font-weight: 600;
  font-family: "Zilla Slab", serif;
  font-size: 0.95rem;
  color: #8b622c;
}

/* Form label style inside quote options */
.sfp-field-label {
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: block;
}

/* Inline radio label */
.sfp-radio-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

/* Disable look (used when shipping speed is disabled) */
.qo-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Shipping Preference – align with rest of form */
.qo-fieldset .qty-mode-options {
  margin-top: .35rem;
  margin-bottom: .25rem;
  gap: 1.25rem;
}



/* =========================================================
   🎯 BULLETPROOF RADIO ALIGNMENT (GLOBAL)
========================================================= */

/**
 * qo-radio-row:
 *   Use for any horizontal radio group that needs perfectly
 *   aligned circles and labels (shipping prefs, quantity modes, etc.).
 */

.qo-radio-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.35rem;
}

.qo-radio-row label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.2;
  padding: 2px 0;
  cursor: pointer;
}

/* Custom radio appearance */
.qo-radio-row input[type="radio"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  appearance: none;
  border: 2px solid #666;
  border-radius: 50%;
  display: grid;
  place-content: center;
  background: #fff;
}
.qo-radio-row input[type="radio"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform .12s ease-in-out;
  background: #333;
}
.qo-radio-row input[type="radio"]:checked::before {
  transform: scale(1);
}

/* =========================================================
   📦 APPLY QUANTITY MODE HEADER (QUOTE LINES)
========================================================= */

.quote-line-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 0.25rem;
  gap: 1rem;
}
.quote-line-header h2 {
  margin: 0;
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.1;
  color: #111;
}



/* Quantity mode "group box" on the right */
.qty-mode-box {
  border: 2px solid #ffcc00;
  border-radius: 6px;
  background: #fffdf2;
  font-family: "Zilla Slab", serif;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  align-self: flex-end;
  position: relative;
  top: 4px;
  overflow: visible;
}

.qty-mode-legend {
  position: absolute;
  top: -0.6rem;
  left: 1rem;
  background: #fffdf2;
  padding: 0 0.4rem;
  font-weight: 700;
  color: #111;
}

/* Ensure legend doesn't block radio clicks */
.qty-mode-box legend {
  pointer-events: none;
  z-index: 0;
}
.qty-mode-box input[type="radio"],
.qty-mode-box label {
  position: relative;
  z-index: 2;
}

.qty-mode-options {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
}
.qty-mode-options label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}
.qty-mode-options input[type="number"] {
  width: 30px;
  text-align: center;
  font-size: 0.85rem;
  border: 1px solid #bbb;
  border-radius: 4px;
  line-height: 1;
  padding: 0;
}

/* Global qty input */
#quoteGlobalQty {
  width: 32px;
  min-width: 32px;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.15rem;
  border: 1px solid #bbb;
  border-radius: 4px;
  line-height: 1;
}
#quoteGlobalQty:disabled {
  background: #f3f3f3;
  border-color: #ddd;
  color: #888;
  cursor: not-allowed;
}

/* =========================================================
   🧾 QUOTE LINE ITEMS TABLE
========================================================= */

.sf-table-quotes {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.sf-table-quotes th,
.sf-table-quotes td {
  border: 1px solid #ddd;
  padding: 0.4rem 0.5rem;
  text-align: left;
  vertical-align: middle;
  word-wrap: break-word;
}

/* Column sizing */
.sf-table-quotes th:nth-child(1),
.sf-table-quotes td:nth-child(1) {
  width: auto; /* Filename */
}
.sf-table-quotes th:nth-child(2),
.sf-table-quotes td:nth-child(2) {
  width: 120px; /* Technology */
}
.sf-table-quotes th:nth-child(3),
.sf-table-quotes td:nth-child(3) {
  width: 300px; /* Material */
}
.sf-table-quotes th:nth-child(4),
.sf-table-quotes td:nth-child(4) {
  width: 300px; /* Post-Processing */
}
.sf-table-quotes th:nth-child(5),
.sf-table-quotes td:nth-child(5) {
  width: 80px;  /* Quantity */
  text-align: center;
}
.sf-table-quotes th:nth-child(6),
.sf-table-quotes td:nth-child(6) {
  width: 90px;  /* Actions */
  text-align: center;
  white-space: nowrap;
}

/* Inputs inside table cells */
.sf-table-quotes td select,
.sf-table-quotes td input[type="text"],
.sf-table-quotes td input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.3rem 0.4rem;
  margin: 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: "Zilla Slab", serif;
  font-size: 0.9rem;
  line-height: 1.1;
}

/* Readonly input style */
input.readonly {
  background-color: #f4f4f4;
  color: #777;
  border-color: #ccc;
  cursor: not-allowed;
}

#quoteGlobalQty {
  width: 36px;
  text-align: center;
  padding: 0.1rem;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: .85rem;
  line-height: 1;
  background: #fffdf2; /* matches qo-fieldset background */
}

#quoteGlobalQty:disabled {
  background: #f3f3f3;
  color: #888;
  border-color: #ddd;
  cursor: not-allowed;
}

.qty-mode-options label {
  margin-right: .35rem;
}


/* =========================================================
   🌫️ GLOBAL STEAM / FOG LAYERS
========================================================= */

.sf-steam,
.sf-steam2 {
  content: "";
  position: fixed;
  inset: 0;
  background: url('/images/steam_haze.png') repeat;
  opacity: 0.2;
  mix-blend-mode: screen;
  pointer-events: none;
}

.sf-steam {
  animation: steamDrift 30s linear infinite;
  z-index: 1;
}
.sf-steam2 {
  animation: steamDrift2 60s linear infinite;
  z-index: 0;
}

@keyframes steamDrift {
  0%   { background-position: 0px 2048px; }
  100% { background-position: 0px 0px; }
}
@keyframes steamDrift2 {
  0%   { background-position: 1024px 2048px; }
  100% { background-position: 0px 0px; }
}

/* Login-style cards above fog */
.sf-login-card {
  position: relative;
  z-index: 10;
}

/* =========================================================
   ✨ ANIMATIONS & MISC
========================================================= */

@keyframes sfp-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes sfp-fade-up {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes sfp-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
