/* ============================================================
   KINUKAZI CONSTRUCTION MARKETPLACE - MASTER STYLESHEET
   Font: Syne (headings) + Source Sans 3 (body)
   Theme: Industrial precision with warm amber accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Source+Sans+3:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- CUSTOM PROPERTIES ---- */
:root {
  --color-primary:    #D4720A;
  --color-primary-d:  #A85708;
  --color-primary-l:  #F5A042;
  --color-secondary:  #1C2B3A;
  --color-accent:     #E8B04A;
  --color-success:    #22A35D;
  --color-danger:     #D63838;
  --color-warning:    #E8951A;
  --color-info:       #2480CC;
  --color-bg:         #F7F5F0;
  --color-bg-card:    #FFFFFF;
  --color-bg-dark:    #1C2B3A;
  --color-text:       #1A1A1A;
  --color-text-muted: #6B7280;
  --color-border:     #E5E0D8;
  --color-border-d:   #D0C8BC;
  --font-head:        'Syne', sans-serif;
  --font-body:        'Source Sans 3', sans-serif;
  --font-mono:        'JetBrains Mono', monospace;
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --shadow:    0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.10);
  --transition: all 0.18s ease;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--color-text); background: var(--color-bg); line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-primary-d); }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font-body); }

/* ---- TYPOGRAPHY ---- */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; color: var(--color-secondary); }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
p { margin-bottom: 0.75rem; }
.text-muted  { color: var(--color-text-muted); }
.text-sm     { font-size: 0.85rem; }
.text-xs     { font-size: 0.75rem; }
.text-lg     { font-size: 1.15rem; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ---- LAYOUT ---- */
.container   { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.page-wrap   { min-height: 100vh; display: flex; flex-direction: column; }
.main-content { flex: 1; padding: 32px 0 60px; }
.section     { padding: 60px 0; }
.section-sm  { padding: 36px 0; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

/* Flex */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; gap: 12px; }
.flex-gap-lg { display: flex; gap: 20px; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: 8px; }
.gap { gap: 16px; }

/* Spacing */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.p-2  { padding: 16px; }
.p-3  { padding: 24px; }

/* ---- NAVIGATION ---- */
.navbar {
  background: var(--color-secondary);
  padding: 0;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 1240px; margin: 0 auto; padding: 0 20px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: 1.4rem; font-weight: 800;
  color: #fff; text-decoration: none;
}
.nav-brand span { color: var(--color-accent); }
.nav-brand .brand-icon {
  width: 36px; height: 36px; background: var(--color-primary);
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-links a {
  color: rgba(255,255,255,0.75); padding: 8px 14px;
  border-radius: var(--radius-sm); font-size: 0.88rem; font-weight: 500;
  transition: var(--transition); letter-spacing: 0.01em;
}
.nav-links a:hover, .nav-links a.active {
  color: #fff; background: rgba(255,255,255,0.1);
}
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-cart {
  position: relative; color: rgba(255,255,255,0.8); font-size: 1.1rem;
  padding: 8px; border-radius: var(--radius-sm); transition: var(--transition);
}
.nav-cart:hover { color: #fff; background: rgba(255,255,255,0.1); }
.cart-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--color-primary); color: #fff;
  font-size: 0.65rem; font-weight: 700; width: 16px; height: 16px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
}
.nav-user { position: relative; }
.nav-user-btn {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius);
  padding: 6px 12px; transition: var(--transition); font-size: 0.875rem;
}
.nav-user-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }
.nav-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  font-size: 0.75rem; font-weight: 700; font-family: var(--font-head);
  display: flex; align-items: center; justify-content: center;
}
.nav-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  min-width: 200px; z-index: 999;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all 0.18s ease;
}
.nav-user.open .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown a, .nav-dropdown button {
  display: block; width: 100%; text-align: left;
  padding: 10px 16px; color: var(--color-text); font-size: 0.875rem;
  background: none; border: none; font-family: var(--font-body);
  transition: background 0.14s ease;
}
.nav-dropdown a:hover, .nav-dropdown button:hover { background: var(--color-bg); color: var(--color-primary); }
.nav-dropdown .divider { height: 1px; background: var(--color-border); margin: 4px 0; }
.nav-mobile-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; padding: 4px; }

/* ---- HERO ---- */
.hero {
  background: linear-gradient(135deg, #1C2B3A 0%, #0F1A26 60%, #1C2B3A 100%);
  padding: 80px 0 70px; overflow: hidden; position: relative;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; position: relative; z-index: 1; }
.hero h1 { font-size: 3rem; color: #fff; line-height: 1.1; margin-bottom: 20px; }
.hero h1 span { color: var(--color-accent); }
.hero p { color: rgba(255,255,255,0.7); font-size: 1.1rem; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.hero-stat { text-align: center; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); padding: 20px 12px; }
.hero-stat .num { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; color: var(--color-accent); display: block; }
.hero-stat .label { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 4px; }
.hero-visual { position: relative; }
.hero-card-stack { position: relative; }
.hero-card-stack > div { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-lg); padding: 20px 24px; color: #fff; backdrop-filter: blur(8px); }
.hero-card-stack > div:nth-child(2) { margin-top: 12px; background: rgba(212,114,10,0.18); border-color: rgba(212,114,10,0.3); }
.hero-card-stack > div:nth-child(3) { margin-top: 12px; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius); font-weight: 600;
  font-size: 0.9rem; font-family: var(--font-body); cursor: pointer;
  transition: var(--transition); white-space: nowrap; border: 2px solid transparent;
  text-decoration: none; letter-spacing: 0.01em;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-primary:hover { background: var(--color-primary-d); border-color: var(--color-primary-d); color: #fff; }
.btn-secondary { background: var(--color-secondary); color: #fff; border-color: var(--color-secondary); }
.btn-secondary:hover { background: #0F1A26; border-color: #0F1A26; color: #fff; }
.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-ghost { background: transparent; color: var(--color-text-muted); border-color: var(--color-border); }
.btn-ghost:hover { background: var(--color-bg); color: var(--color-text); }
.btn-danger { background: var(--color-danger); color: #fff; border-color: var(--color-danger); }
.btn-success { background: var(--color-success); color: #fff; border-color: var(--color-success); }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }
.btn-block { width: 100%; justify-content: center; }

/* ---- CARDS ---- */
.card {
  background: var(--color-bg-card); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; }
.card-body { padding: 20px 24px; }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--color-border); background: var(--color-bg); }
.card-img-top { width: 100%; height: 200px; object-fit: cover; }

/* Product / Equipment Card */
.product-card { cursor: pointer; }
.product-card .card-img-wrap { position: relative; overflow: hidden; height: 200px; background: var(--color-bg); }
.product-card .card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.product-card:hover .card-img-wrap img { transform: scale(1.04); }
.product-card .card-img-wrap .badge-overlay { position: absolute; top: 10px; left: 10px; }
.product-card .card-content { padding: 16px; }
.product-card .product-name { font-family: var(--font-head); font-size: 0.95rem; font-weight: 600; color: var(--color-secondary); margin-bottom: 4px; }
.product-card .product-price { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; color: var(--color-primary); }
.product-card .product-unit { font-size: 0.78rem; color: var(--color-text-muted); font-weight: 400; }
.product-card .product-meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 0.8rem; color: var(--color-text-muted); }
.product-card .card-actions { padding: 12px 16px; background: var(--color-bg); border-top: 1px solid var(--color-border); display: flex; gap: 8px; }

/* ---- BADGES ---- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600; font-family: var(--font-head);
  letter-spacing: 0.03em; text-transform: uppercase;
}
.badge-primary   { background: #FEF0E0; color: #A85708; }
.badge-success   { background: #E5F7EE; color: #167847; }
.badge-danger    { background: #FEECEC; color: #A82727; }
.badge-warning   { background: #FEF5E7; color: #9A6E0A; }
.badge-info      { background: #E6F2FB; color: #135F9E; }
.badge-secondary { background: #E8EDF2; color: #374B60; }
.badge-dark      { background: var(--color-secondary); color: #fff; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--color-secondary); margin-bottom: 6px; }
.form-label .req { color: var(--color-danger); margin-left: 3px; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius);
  font-size: 0.9rem; font-family: var(--font-body); color: var(--color-text);
  background: #fff; transition: var(--transition); outline: none;
  -webkit-appearance: none;
}
.form-control:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(212,114,10,0.1); }
.form-control::placeholder { color: #BFBAB4; }
.form-control.error { border-color: var(--color-danger); }
select.form-control { cursor: pointer; 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 fill='%236B7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-text { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 4px; }
.form-error { font-size: 0.8rem; color: var(--color-danger); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .btn { border-radius: 0 var(--radius) var(--radius) 0; border-left: none; }
.input-prefix { display: flex; align-items: center; padding: 10px 12px; background: var(--color-bg); border: 1.5px solid var(--color-border); border-right: none; border-radius: var(--radius) 0 0 var(--radius); font-size: 0.875rem; color: var(--color-text-muted); white-space: nowrap; }
.input-prefix + .form-control { border-radius: 0 var(--radius) var(--radius) 0; }

/* Checkbox & Radio */
.form-check { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; cursor: pointer; }
.form-check input[type="checkbox"], .form-check input[type="radio"] { width: 16px; height: 16px; accent-color: var(--color-primary); margin-top: 2px; flex-shrink: 0; cursor: pointer; }
.form-check-label { font-size: 0.875rem; }

/* ---- ALERTS ---- */
.alert {
  padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.9rem; font-weight: 500;
}
.alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.alert-success  { background: #E5F7EE; color: #126B3E; border: 1px solid #A7E0C3; }
.alert-error    { background: #FEECEC; color: #8B1A1A; border: 1px solid #F5B8B8; }
.alert-warning  { background: #FEF5E7; color: #7A5507; border: 1px solid #FADA97; }
.alert-info     { background: #E6F2FB; color: #0F4E87; border: 1px solid #A3D1F5; }

/* ---- TABLES ---- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th { background: var(--color-bg); font-family: var(--font-head); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); font-weight: 600; padding: 12px 16px; border-bottom: 2px solid var(--color-border); text-align: left; white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.table tr:hover td { background: rgba(212,114,10,0.03); }
.table tr:last-child td { border-bottom: none; }

/* ---- DASHBOARD LAYOUT ---- */
.dashboard-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--color-secondary); color: #fff;
  padding: 0; position: sticky; top: 64px; height: calc(100vh - 64px);
  overflow-y: auto;
}
.sidebar-header { padding: 24px 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-header h4 { font-family: var(--font-head); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.4); font-weight: 600; }
.sidebar-header .user-info { margin-top: 12px; display: flex; align-items: center; gap: 10px; }
.sidebar-header .user-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--color-primary); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; font-size: 0.875rem; flex-shrink: 0; }
.sidebar-header .user-name { font-size: 0.875rem; font-weight: 600; color: #fff; line-height: 1.3; }
.sidebar-header .user-role { font-size: 0.75rem; color: rgba(255,255,255,0.45); }
.sidebar-nav { padding: 12px 0; }
.sidebar-section-label { padding: 16px 20px 6px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.3); font-weight: 600; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; font-size: 0.875rem; font-weight: 500;
  color: rgba(255,255,255,0.65); transition: var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.sidebar-nav a.active { color: #fff; background: rgba(212,114,10,0.18); border-left-color: var(--color-primary); }
.sidebar-nav a .nav-icon { width: 18px; height: 18px; opacity: 0.7; }
.sidebar-nav a.active .nav-icon { opacity: 1; }

.dashboard-main { padding: 32px; background: var(--color-bg); overflow-x: hidden; }
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.7rem; font-weight: 800; color: var(--color-secondary); }
.page-header p { color: var(--color-text-muted); margin: 4px 0 0; font-size: 0.9rem; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 4px; }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb .sep { opacity: 0.4; }

/* Stats Cards */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 20px;
  display: flex; align-items: center; gap: 16px;
}
.stat-icon { width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.stat-icon.orange { background: #FEF0E0; }
.stat-icon.blue   { background: #E6F2FB; }
.stat-icon.green  { background: #E5F7EE; }
.stat-icon.purple { background: #F0EEFE; }
.stat-card .stat-label { font-size: 0.78rem; color: var(--color-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .stat-value { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--color-secondary); line-height: 1.1; }
.stat-card .stat-change { font-size: 0.78rem; margin-top: 3px; }
.stat-card .stat-change.up   { color: var(--color-success); }
.stat-card .stat-change.down { color: var(--color-danger); }

/* ---- CALCULATOR ---- */
.calculator-layout { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
.calc-materials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.material-item {
  background: #fff; border: 2px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 16px;
  transition: var(--transition); cursor: default;
}
.material-item:hover { border-color: var(--color-primary); }
.material-item.selected { border-color: var(--color-primary); background: #FEF7F0; }
.material-item-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.material-item-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--color-bg); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.material-item-name { font-family: var(--font-head); font-size: 0.9rem; font-weight: 600; }
.material-item-price { font-size: 0.78rem; color: var(--color-text-muted); }
.material-qty-input { display: flex; align-items: center; gap: 0; }
.qty-btn { width: 32px; height: 36px; border: 1.5px solid var(--color-border); background: var(--color-bg); font-size: 1.1rem; cursor: pointer; font-family: var(--font-head); font-weight: 600; transition: var(--transition); }
.qty-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.qty-btn:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.qty-btn:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.qty-input { width: 60px; height: 36px; border: 1.5px solid var(--color-border); border-left: none; border-right: none; text-align: center; font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; outline: none; -moz-appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.estimate-summary { position: sticky; top: 80px; }
.estimate-box { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
.estimate-box-header { background: var(--color-secondary); padding: 20px 24px; }
.estimate-box-header h3 { color: #fff; font-size: 1rem; }
.estimate-items-list { max-height: 320px; overflow-y: auto; }
.estimate-line { display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 20px; border-bottom: 1px solid var(--color-border); font-size: 0.85rem; }
.estimate-line .item-name { color: var(--color-text); font-weight: 500; }
.estimate-line .item-qty  { color: var(--color-text-muted); font-size: 0.78rem; }
.estimate-line .item-cost { font-weight: 700; font-family: var(--font-head); color: var(--color-secondary); }
.estimate-total { padding: 16px 20px; background: var(--color-bg); border-top: 2px solid var(--color-border); }
.estimate-total .total-row { display: flex; justify-content: space-between; align-items: center; }
.estimate-total .total-label { font-size: 0.875rem; color: var(--color-text-muted); font-weight: 600; }
.estimate-total .total-amount { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--color-primary); }

/* ---- MARKETPLACE ---- */
.marketplace-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.filter-sidebar { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 20px; position: sticky; top: 80px; }
.filter-section { margin-bottom: 20px; border-bottom: 1px solid var(--color-border); padding-bottom: 20px; }
.filter-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.filter-section h5 { font-family: var(--font-head); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); font-weight: 600; margin-bottom: 12px; }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range .form-control { padding: 7px 10px; font-size: 0.82rem; }
input[type="range"] { width: 100%; accent-color: var(--color-primary); cursor: pointer; }
.region-list a { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 0.875rem; color: var(--color-text); transition: color 0.15s; }
.region-list a:hover { color: var(--color-primary); }
.region-list .count { font-size: 0.75rem; background: var(--color-bg); padding: 1px 6px; border-radius: 10px; color: var(--color-text-muted); }

/* ---- CART & CHECKOUT ---- */
.cart-table td:last-child { text-align: right; }
.cart-qty-control { display: flex; align-items: center; gap: 0; }
.cart-summary-box { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 24px; position: sticky; top: 80px; }
.summary-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.9rem; border-bottom: 1px solid var(--color-border); }
.summary-line.total { font-family: var(--font-head); font-size: 1.2rem; font-weight: 800; border-bottom: none; padding-top: 12px; }

/* ---- ORDER STATUS TRACKER ---- */
.order-tracker { display: flex; align-items: flex-start; padding: 24px 0; }
.tracker-step { flex: 1; text-align: center; position: relative; }
.tracker-step::before { content: ''; position: absolute; top: 15px; left: 50%; right: -50%; height: 2px; background: var(--color-border); z-index: 0; }
.tracker-step:last-child::before { display: none; }
.tracker-step.done::before { background: var(--color-success); }
.tracker-dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--color-border); background: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; position: relative; z-index: 1; font-size: 0.85rem; }
.tracker-step.done .tracker-dot { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.tracker-step.active .tracker-dot { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.tracker-label { font-size: 0.75rem; color: var(--color-text-muted); font-weight: 600; }
.tracker-step.done .tracker-label, .tracker-step.active .tracker-label { color: var(--color-text); }

/* ---- EQUIPMENT ---- */
.equipment-type-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.type-chip { padding: 7px 16px; border: 1.5px solid var(--color-border); border-radius: 20px; font-size: 0.82rem; font-weight: 600; font-family: var(--font-head); cursor: pointer; transition: var(--transition); color: var(--color-text-muted); background: #fff; }
.type-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.type-chip.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ---- FOOTER ---- */
.footer { background: var(--color-secondary); color: rgba(255,255,255,0.65); padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .logo { font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-brand .logo span { color: var(--color-accent); }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; max-width: 280px; }
.footer h5 { font-family: var(--font-head); color: #fff; font-size: 0.9rem; margin-bottom: 16px; font-weight: 700; }
.footer-links a { display: block; color: rgba(255,255,255,0.55); font-size: 0.875rem; margin-bottom: 8px; transition: color 0.15s; }
.footer-links a:hover { color: var(--color-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; }

/* ---- AUTH PAGES ---- */
.auth-page { min-height: 100vh; background: linear-gradient(135deg, #1C2B3A, #0F1A26); display: grid; grid-template-columns: 1fr 1fr; }
.auth-left { padding: 60px; display: flex; flex-direction: column; justify-content: center; }
.auth-left h1 { color: #fff; font-size: 2.4rem; margin-bottom: 16px; }
.auth-left h1 span { color: var(--color-accent); }
.auth-left p { color: rgba(255,255,255,0.6); font-size: 1rem; max-width: 380px; }
.auth-features { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.auth-feature { display: flex; align-items: center; gap: 12px; }
.auth-feature-icon { width: 36px; height: 36px; background: rgba(212,114,10,0.2); border: 1px solid rgba(212,114,10,0.3); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--color-accent); flex-shrink: 0; }
.auth-feature-text { font-size: 0.875rem; color: rgba(255,255,255,0.65); }
.auth-feature-text strong { color: #fff; display: block; font-size: 0.95rem; }
.auth-right { background: var(--color-bg); display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-form-box { width: 100%; max-width: 440px; }
.auth-form-box .card { padding: 36px; }
.auth-form-box h2 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-form-box .subtitle { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 28px; }
.auth-form-box .or-divider { display: flex; align-items: center; gap: 12px; color: var(--color-text-muted); font-size: 0.82rem; margin: 20px 0; }
.auth-form-box .or-divider::before, .auth-form-box .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--color-border); }
.role-select-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.role-option { border: 2px solid var(--color-border); border-radius: var(--radius); padding: 12px; text-align: center; cursor: pointer; transition: var(--transition); }
.role-option:hover { border-color: var(--color-primary); }
.role-option.selected { border-color: var(--color-primary); background: #FEF7F0; }
.role-option input { display: none; }
.role-option .role-icon { font-size: 1.5rem; margin-bottom: 6px; }
.role-option .role-name { font-size: 0.8rem; font-weight: 600; color: var(--color-secondary); }

/* ---- MISC UTILITIES ---- */
.divider { height: 1px; background: var(--color-border); margin: 24px 0; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { font-size: 2rem; }
.section-title p { color: var(--color-text-muted); margin-top: 8px; max-width: 560px; margin-left: auto; margin-right: auto; }
.section-title .tag { display: inline-block; background: #FEF0E0; color: var(--color-primary); font-family: var(--font-head); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 12px; border-radius: 20px; margin-bottom: 12px; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .empty-icon { font-size: 3rem; color: var(--color-border-d); margin-bottom: 16px; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; }
.empty-state p { color: var(--color-text-muted); max-width: 340px; margin: 0 auto 20px; font-size: 0.9rem; }
.loading-spinner { width: 28px; height: 28px; border: 3px solid var(--color-border); border-top-color: var(--color-primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 10px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 20px; font-size: 0.78rem; color: var(--color-text-muted); font-weight: 500; }
.rating-stars { display: flex; gap: 2px; }
.rating-stars .star { color: #D4B04A; font-size: 0.9rem; }
.avatar { border-radius: 50%; object-fit: cover; }
.avatar-placeholder { border-radius: 50%; background: var(--color-primary); color: #fff; font-family: var(--font-head); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.supply-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 5px 10px; font-size: 0.8rem; }

/* ---- NOTIFICATIONS PANEL ---- */
.notif-list { max-height: 420px; overflow-y: auto; }
.notif-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--color-border); transition: background 0.14s; cursor: pointer; }
.notif-item:hover { background: var(--color-bg); }
.notif-item.unread { background: #FEF7F0; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary); margin-top: 5px; flex-shrink: 0; }
.notif-dot.read { background: transparent; border: 1.5px solid var(--color-border); }
.notif-content .notif-title { font-size: 0.875rem; font-weight: 600; color: var(--color-secondary); }
.notif-content .notif-msg { font-size: 0.82rem; color: var(--color-text-muted); margin-top: 3px; }
.notif-content .notif-time { font-size: 0.75rem; color: var(--color-text-muted); margin-top: 4px; }

/* ---- MOBILE RESPONSIVE ---- */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-layout { grid-template-columns: 220px 1fr; }
  .dashboard-main { padding: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .calculator-layout { grid-template-columns: 1fr; }
  .marketplace-layout { grid-template-columns: 1fr; }
  .marketplace-layout .filter-sidebar { position: static; }
}
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--color-secondary); padding: 8px; z-index: 999; }
  .nav-mobile-toggle { display: block; }
  .hero { padding: 40px 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { display: none; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; position: fixed; left: 0; top: 64px; bottom: 0; z-index: 998; width: 260px; height: calc(100vh - 64px); }
  .sidebar.open { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .calc-materials-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .auth-right { padding: 24px 16px; }
}
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .stats-grid { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.6rem; }
  .hero-stats { grid-template-columns: 1fr; }
  .section { padding: 36px 0; }
  .auth-form-box .card { padding: 24px 20px; }
}

/* ── CSS Variable Aliases (maps short names to full names) ─────── */
:root {
  --primary:        var(--color-primary);
  --secondary:      var(--color-secondary);
  --border:         var(--color-border);
  --navy:           var(--color-secondary);
  --bg-light:       var(--color-bg);
  --text-primary:   var(--color-text);
  --text-secondary: var(--color-text);
  --text-muted:     var(--color-text-muted);
}
