/* ===========================================================
   KWAME PRINCE AUTO PARTS
   Shared stylesheet — index.html + login.html
   Red x Dark Navy colour system
=========================================================== */

:root {
  --navy:        #121A2B;
  --navy-soft:   #1A2338;
  --navy-card:   #202B45;
  --navy-mid:    #1C2740;
  --red:         #E11D2A;
  --red-deep:    #9E141E;
  --red-glow:    rgba(225, 29, 42, 0.35);
  --off-white:   #F4F5F7;
  --slate:       #23293A;
  --slate-mute:  #6B7280;
  --white:       #FFFFFF;
  --green:       #22C55E;
  --amber:       #F5A623;
  --blue:        #3B82F6;

  --font-display: 'Poppins', 'Segoe UI', sans-serif;
  --font-body:    'Inter', 'Segoe UI', sans-serif;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-card:       0 10px 30px rgba(18, 26, 43, 0.08);
  --shadow-card-hover: 0 20px 44px rgba(18, 26, 43, 0.14);
  --shadow-glow-red:   0 0 48px rgba(225, 29, 42, 0.38);
  --shadow-deep:       0 32px 64px rgba(0, 0, 0, 0.35);

  --ease:         cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--slate);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  color: var(--navy);
  line-height: 1.15;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  background: var(--red);
  display: inline-block;
  border-radius: 2px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.72s var(--ease), transform 0.72s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s;
}
.btn:hover::after { background: rgba(255,255,255,0.06); }
.btn-lg { padding: 14px 28px; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(225, 29, 42, 0.30);
}
.btn-primary:hover {
  background: var(--red-deep);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(225, 29, 42, 0.40);
}
.btn-primary:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(225,29,42,0.25); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(244, 245, 247, 0.22);
}
.btn-ghost:hover {
  border-color: rgba(244, 245, 247, 0.55);
  transform: translateY(-2px);
  background: rgba(255,255,255,0.04);
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.navbar.is-scrolled {
  background: rgba(15, 21, 38, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 13px 0;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.28);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }

.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 700; color: var(--white);
  font-size: 1.02rem; letter-spacing: 0.01em;
}
.brand-mark {
  position: relative; width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  display: grid; place-items: center; flex-shrink: 0;
}
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute; border-radius: 50%;
  border: 1.5px solid rgba(244, 245, 247, 0.8);
}
.brand-mark::before { width: 14px; height: 14px; }
.brand-mark::after {
  width: 22px; height: 22px;
  border-color: rgba(244, 245, 247, 0.35);
  animation: sensor-ping 2.4s ease-out infinite;
}
@keyframes sensor-ping {
  0%   { transform: scale(0.6); opacity: 0.9; }
  80%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}
.brand small {
  display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.66rem;
  color: rgba(244, 245, 247, 0.5); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px;
}

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  color: rgba(244, 245, 247, 0.72); font-size: 0.9rem; font-weight: 500;
  position: relative; padding: 4px 0; transition: color 0.25s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--red); transition: width 0.3s var(--ease); border-radius: 2px;
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* HERO */
.hero {
  position: relative;
  background: radial-gradient(120% 120% at 80% 0%, #1D2E50 0%, var(--navy) 50%, #080C16 100%);
  padding: 180px 0 130px; overflow: hidden; isolation: isolate;
}
.hero-canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.55; }
.hero-glow {
  position: absolute; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(225, 29, 42, 0.14) 0%, transparent 70%);
  top: -100px; right: -100px; z-index: 0; pointer-events: none;
}
.hero-container { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hero-copy .eyebrow { color: #FF7A84; }
.hero-copy .eyebrow::before { background: #FF7A84; }
.hero-copy h1 {
  color: var(--white); font-size: clamp(2.4rem, 4.2vw, 3.6rem); font-weight: 800;
  margin: 18px 0 22px; letter-spacing: -0.02em; line-height: 1.12;
}
.typewriter-wrap { display: inline-block; position: relative; }
.typewriter {
  background: linear-gradient(90deg, #FF7A84, var(--red));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.typewriter-cursor {
  display: inline-block; width: 3px; height: 0.85em; background: var(--red);
  border-radius: 2px; margin-left: 2px; vertical-align: middle; animation: blink 0.9s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-copy > p { color: rgba(244, 245, 247, 0.65); font-size: 1.05rem; line-height: 1.72; max-width: 480px; }
.hero-actions { display: flex; align-items: center; gap: 16px; margin-top: 36px; }
.hero-note { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: rgba(244, 245, 247, 0.42); margin-top: 16px; }
.hero-note svg { flex-shrink: 0; stroke: rgba(244,245,247,0.42); }
.hero-stats { display: flex; gap: 36px; margin-top: 52px; padding-top: 28px; border-top: 1px solid rgba(244, 245, 247, 0.1); }
.hero-stat b { display: flex; align-items: baseline; gap: 2px; font-family: var(--font-display); color: var(--white); font-size: 1.65rem; font-weight: 700; }
.hero-stat b em { font-style: normal; font-size: 1.1rem; color: rgba(244,245,247,0.65); }
.hero-stat span { display: block; font-size: 0.76rem; color: rgba(244, 245, 247, 0.48); margin-top: 2px; }

/* DASHBOARD PREVIEW CARD */
.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; padding: 20px 0; }
.dash-preview {
  width: 100%; max-width: 390px; background: rgba(26, 35, 56, 0.85);
  border: 1px solid rgba(244, 245, 247, 0.1); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 18px; padding: 0; overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
  animation: card-float 6s ease-in-out infinite; transform-origin: center;
}
@keyframes card-float { 0%, 100% { transform: translateY(0) rotate(-0.5deg); } 50% { transform: translateY(-12px) rotate(0.5deg); } }
.dp-topbar { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; background: rgba(18, 26, 43, 0.7); border-bottom: 1px solid rgba(244,245,247,0.07); font-size: 0.78rem; }
.dp-title { display: flex; align-items: center; gap: 8px; color: rgba(244,245,247,0.8); font-weight: 600; }
.dp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px rgba(34,197,94,0.7); animation: dp-blink 2s ease-in-out infinite; }
@keyframes dp-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.dp-date { font-size: 0.72rem; color: rgba(244,245,247,0.4); }
.dp-kpis { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid rgba(244,245,247,0.07); }
.dp-kpi { padding: 14px 14px 12px; border-right: 1px solid rgba(244,245,247,0.07); text-align: center; }
.dp-kpi:last-child { border-right: none; }
.dp-kpi-label { display: block; font-size: 0.65rem; color: rgba(244,245,247,0.4); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.dp-kpi-val { display: block; font-family: var(--font-display); font-size: 0.92rem; font-weight: 700; color: var(--white); }
.dp-kpi-val.red { color: var(--red); }
.dp-kpi-val.danger { color: var(--amber); }
.dp-kpi-badge { display: inline-block; font-size: 0.6rem; font-weight: 600; padding: 2px 6px; border-radius: 20px; margin-top: 3px; }
.dp-kpi-badge.up { background: rgba(34,197,94,0.18); color: var(--green); }
.dp-kpi-badge.down { background: rgba(245,166,35,0.18); color: var(--amber); }
.dp-section-label { padding: 12px 18px 6px; font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(244,245,247,0.35); }
.dp-bars { padding: 0 18px 12px; display: grid; gap: 7px; }
.dp-bar-row { display: grid; grid-template-columns: 80px 1fr 32px; align-items: center; gap: 8px; font-size: 0.7rem; color: rgba(244,245,247,0.7); }
.dp-bar-row span:last-child { text-align: right; font-size: 0.66rem; color: rgba(244,245,247,0.45); }
.dp-bar-track { height: 5px; background: rgba(244,245,247,0.08); border-radius: 10px; overflow: hidden; }
.dp-bar-fill { height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, var(--red), #FF6B76); border-radius: 10px; animation: bar-grow 1.4s var(--ease) 0.6s backwards; }
@keyframes bar-grow { from { width: 0%; } to { width: var(--w); } }
.dp-alert { display: flex; align-items: center; gap: 8px; margin: 0 18px 10px; padding: 9px 12px; background: rgba(245, 166, 35, 0.1); border: 1px solid rgba(245, 166, 35, 0.22); border-radius: 8px; font-size: 0.72rem; color: var(--amber); }
.dp-alert svg { stroke: var(--amber); flex-shrink: 0; }
.dp-alert b { font-weight: 600; }
.dp-activity { padding: 0 18px 16px; display: grid; gap: 7px; }
.dp-activity-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-size: 0.71rem; color: rgba(244,245,247,0.6); }
.dp-activity-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dp-activity-dot.green { background: var(--green); }
.dp-activity-dot.blue  { background: var(--blue); }
.dp-activity-dot.amber { background: var(--amber); }
.dp-activity-time { font-size: 0.65rem; color: rgba(244,245,247,0.3); white-space: nowrap; }

.hero-chip {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  background: rgba(26, 35, 56, 0.82); border: 1px solid rgba(244, 245, 247, 0.1);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 10px;
  font-size: 0.74rem; font-weight: 500; color: var(--white); box-shadow: 0 12px 30px rgba(0,0,0,0.28);
  white-space: nowrap; z-index: 3;
}
.hc-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.hc-dot.green { background: var(--green); box-shadow: 0 0 6px rgba(34,197,94,0.6); }
.hc-dot.red   { background: var(--red);   box-shadow: 0 0 6px rgba(225,29,42,0.6); }
.chip-1 { top: 8%; left: -10%; animation: chip-float 5s ease-in-out infinite; }
.chip-2 { bottom: 8%; right: -12%; animation: chip-float 5s ease-in-out 1.4s infinite; }
@keyframes chip-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* TRUST BAR */
.trust-bar { background: var(--navy-soft); padding: 16px 0; overflow: hidden; }
.trust-inner { display: flex; align-items: center; justify-content: center; gap: 36px; flex-wrap: wrap; color: rgba(244, 245, 247, 0.42); font-size: 0.79rem; letter-spacing: 0.04em; }
.trust-sep { opacity: 0.3; }

/* SECTION BASE */
.section { padding: 110px 0; }
.section-head { max-width: 650px; margin: 0 auto 60px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin: 16px 0 14px; letter-spacing: -0.01em; }
.section-head p { color: var(--slate-mute); font-size: 1rem; line-height: 1.72; }

/* FEATURES */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 30px 26px 28px;
  box-shadow: var(--shadow-card); border: 1px solid rgba(18, 26, 43, 0.05);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); cursor: default; position: relative; overflow: hidden;
}
.feature-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 60%, rgba(225,29,42,0.03) 100%); opacity: 0; transition: opacity 0.4s; }
.feature-card:hover { transform: translateY(-10px) rotate(-0.3deg); box-shadow: var(--shadow-card-hover); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px;
  background: linear-gradient(150deg, var(--navy), var(--navy-card)); transition: transform 0.3s var(--ease-spring);
}
.feature-card:hover .feature-icon { transform: scale(1.1) rotate(-3deg); }
.feature-icon svg { width: 24px; height: 24px; stroke: var(--red); }
.feature-card h3 { font-size: 1.02rem; margin-bottom: 10px; }
.feature-card > p { color: var(--slate-mute); font-size: 0.9rem; line-height: 1.65; }
.feature-pill { display: inline-block; margin-top: 16px; padding: 4px 10px; background: rgba(225, 29, 42, 0.08); color: var(--red); border-radius: 20px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em; }
.sdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.sdot.green { background: var(--green); }
.sdot.amber { background: var(--amber); }
.sdot.red   { background: var(--red); }

/* CATEGORIES */
.categories-section { background: var(--navy); position: relative; overflow: hidden; }
.categories-section::before { content: ""; position: absolute; width: 700px; height: 700px; background: radial-gradient(circle, rgba(225,29,42,0.09) 0%, transparent 65%); top: -200px; left: -200px; pointer-events: none; }
.categories-section .section-head h2 { color: var(--white); }
.categories-section .section-head p { color: rgba(244,245,247,0.5); }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(244,245,247,0.08); border-radius: var(--radius-lg); padding: 28px 24px; transition: background 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease); cursor: default; }
.cat-card:hover { background: rgba(225,29,42,0.07); border-color: rgba(225,29,42,0.3); transform: translateY(-6px); }
.cat-icon-wrap { width: 52px; height: 52px; border-radius: 14px; background: rgba(225,29,42,0.12); display: grid; place-items: center; margin-bottom: 18px; border: 1px solid rgba(225,29,42,0.2); transition: background 0.3s; }
.cat-card:hover .cat-icon-wrap { background: rgba(225,29,42,0.22); }
.cat-icon-wrap svg { stroke: var(--red); }
.cat-card h4 { color: var(--white); font-size: 0.98rem; margin-bottom: 8px; }
.cat-card p { color: rgba(244,245,247,0.5); font-size: 0.86rem; line-height: 1.62; }
.cat-count { margin-top: 14px; font-size: 0.8rem; font-weight: 600; color: rgba(225,29,42,0.85); }

/* HOW IT WORKS */
.flow-section { background: var(--off-white); }
.flow-list { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 0; align-items: start; }
.flow-item { background: var(--white); border-radius: var(--radius-lg); padding: 28px 22px 24px; border: 1px solid rgba(18,26,43,0.06); box-shadow: var(--shadow-card); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.flow-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }
.flow-num { font-family: var(--font-display); font-size: 0.78rem; font-weight: 700; color: var(--red); letter-spacing: 0.06em; margin-bottom: 12px; }
.flow-icon-wrap { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(150deg, var(--navy), var(--navy-card)); display: grid; place-items: center; margin-bottom: 14px; }
.flow-icon-wrap svg { stroke: var(--red); }
.flow-item h4 { font-size: 0.96rem; margin-bottom: 8px; }
.flow-item p { font-size: 0.86rem; color: var(--slate-mute); line-height: 1.6; }
.flow-connector { display: flex; align-items: flex-start; padding-top: 36px; padding-inline: 8px; opacity: 0.7; }

/* CTA */
.cta-section { padding: 0 0 110px; }
.cta-band { position: relative; border-radius: var(--radius-xl); background: linear-gradient(120deg, var(--navy) 0%, #1E2D50 60%, #1A2440 100%); padding: 70px 64px; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.cta-glow { position: absolute; width: 500px; height: 500px; background: radial-gradient(circle, rgba(225,29,42,0.22) 0%, transparent 65%); top: -200px; right: -100px; pointer-events: none; }
.cta-content { position: relative; z-index: 1; }
.cta-content h2 { color: var(--white); font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-content p { color: rgba(244,245,247,0.6); margin: 14px 0 32px; font-size: 1rem; line-height: 1.7; }
.cta-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.cta-visual { position: relative; z-index: 1; flex-shrink: 0; }
.cta-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(244,245,247,0.1); border-radius: var(--radius-md); padding: 18px 20px; min-width: 240px; display: grid; gap: 10px; }
.cta-card-line { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; color: rgba(244,245,247,0.7); }
.cta-card-line.cta-alert { color: var(--amber); }
.cta-card-line.cta-alert .sdot.red { background: var(--amber); box-shadow: 0 0 6px rgba(245,166,35,0.5); }

/* FOOTER */
.footer { background: var(--navy); padding: 64px 0 28px; }
.footer .container { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }
.footer-brand p { color: rgba(244,245,247,0.48); font-size: 0.88rem; line-height: 1.72; margin-top: 14px; max-width: 280px; }
.footer h5 { color: var(--white); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a { color: rgba(244,245,247,0.5); font-size: 0.88rem; transition: color 0.25s var(--ease); }
.footer a:hover { color: var(--white); }
.footer-bottom { margin-top: 52px; padding-top: 22px; border-top: 1px solid rgba(244,245,247,0.08); text-align: center; color: rgba(244,245,247,0.3); font-size: 0.8rem; }

/* TOAST */
.toast {
  position: fixed; left: 50%; bottom: 36px; transform: translate(-50%, 24px);
  background: var(--navy-card); color: var(--white); border: 1px solid rgba(244,245,247,0.12);
  padding: 14px 22px; border-radius: 12px; font-size: 0.86rem; display: flex; align-items: center; gap: 10px;
  opacity: 0; pointer-events: none; transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  z-index: 1000; box-shadow: 0 18px 38px rgba(0,0,0,0.38); min-width: 240px; justify-content: center;
}
.toast.success { border-color: rgba(34,197,94,0.35); }
.toast.error   { border-color: rgba(225,29,42,0.45); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.toast.success .dot { background: var(--green); }
.toast.error .dot   { background: var(--red); }

/* LOGIN PAGE — SPLIT LAYOUT */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.lp-left { position: relative; background: radial-gradient(140% 140% at 20% 10%, #1D2E50 0%, var(--navy) 45%, #080C16 100%); overflow: hidden; display: flex; align-items: stretch; }
.lp-canvas { position: absolute; inset: 0; pointer-events: none; opacity: 0.5; z-index: 0; }
.lp-left-inner { position: relative; z-index: 2; padding: 52px 56px 52px; display: flex; flex-direction: column; width: 100%; }
.login-back { display: inline-flex; align-items: center; gap: 8px; font-size: 0.84rem; font-weight: 500; color: rgba(244,245,247,0.55); transition: color 0.25s var(--ease), transform 0.25s var(--ease); align-self: flex-start; margin-bottom: 56px; }
.login-back:hover { color: var(--white); transform: translateX(-4px); }
.login-back svg { stroke: currentColor; }
.lp-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 48px; }
.lp-brand-mark { width: 48px; height: 48px; border-radius: 13px; }
.lp-brand-mark svg { width: 20px; height: 20px; }
.lp-brand h2 { color: var(--white); font-size: 1.3rem; margin-bottom: 3px; }
.lp-brand span { color: rgba(244,245,247,0.45); font-size: 0.76rem; letter-spacing: 0.04em; }
.lp-headline { margin-bottom: 40px; }
.lp-headline h3 { color: var(--white); font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; margin-bottom: 14px; }
.lp-headline p { color: rgba(244,245,247,0.55); font-size: 0.98rem; line-height: 1.7; }
.lp-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.lp-features li { display: flex; align-items: flex-start; gap: 13px; font-size: 0.88rem; color: rgba(244,245,247,0.72); line-height: 1.55; }
.lp-feat-icon { flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; background: rgba(225,29,42,0.15); border: 1px solid rgba(225,29,42,0.22); display: grid; place-items: center; margin-top: 1px; }
.lp-feat-icon svg { stroke: var(--red); }
.lp-live-stat { margin-top: auto; padding-top: 36px; display: flex; align-items: center; gap: 0; background: rgba(255,255,255,0.04); border: 1px solid rgba(244,245,247,0.08); border-radius: 12px; overflow: hidden; }
.lp-stat-item { flex: 1; padding: 14px 18px; text-align: center; }
.lp-stat-item b { display: block; color: var(--white); font-size: 0.98rem; font-weight: 700; }
.lp-stat-label { font-size: 0.66rem; color: rgba(244,245,247,0.4); text-transform: uppercase; letter-spacing: 0.06em; }
.lp-stat-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-bottom: 4px; }
.lp-stat-dot.green { background: var(--green); box-shadow: 0 0 6px rgba(34,197,94,0.6); }
.lp-stat-divider { width: 1px; height: 36px; background: rgba(244,245,247,0.08); }
.lp-right { background: var(--off-white); display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.lp-right-inner { width: 100%; max-width: 420px; }
.login-card { background: var(--white); border-radius: var(--radius-xl); padding: 42px 36px 36px; box-shadow: 0 20px 50px rgba(18,26,43,0.1), 0 2px 8px rgba(18,26,43,0.06); border: 1px solid rgba(18,26,43,0.07); opacity: 0; transform: translateY(28px) scale(0.97); animation: card-in 0.7s var(--ease) 0.1s forwards; }
@keyframes card-in { to { opacity: 1; transform: translateY(0) scale(1); } }
.login-brand { margin-bottom: 26px; }
.login-brand h1 { color: var(--navy); font-size: 1.4rem; font-weight: 800; letter-spacing: -0.01em; }
.login-brand h1 span { display: block; font-family: var(--font-body); font-size: 0.84rem; font-weight: 400; color: var(--slate-mute); margin-top: 5px; }
.role-toggle { display: flex; background: var(--off-white); border: 1px solid rgba(18,26,43,0.1); border-radius: 10px; padding: 4px; margin-bottom: 24px; gap: 4px; }
.role-toggle button { flex: 1; border: none; background: transparent; color: var(--slate-mute); font-size: 0.83rem; font-weight: 600; padding: 10px 0; border-radius: 7px; display: flex; align-items: center; justify-content: center; gap: 7px; transition: background 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s; }
.role-toggle button svg { stroke: currentColor; }
.role-toggle button.is-active { background: var(--navy); color: var(--white); box-shadow: 0 4px 14px rgba(18,26,43,0.18); }
.field { margin-bottom: 18px; position: relative; }
.field label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--slate); margin-bottom: 7px; letter-spacing: 0.02em; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 14px; width: 17px; height: 17px; stroke: var(--slate-mute); transition: stroke 0.25s; pointer-events: none; }
.field input { width: 100%; padding: 13px 14px 13px 42px; border-radius: 10px; border: 1.5px solid rgba(18,26,43,0.12); background: var(--off-white); color: var(--navy); font-size: 0.92rem; font-family: var(--font-body); transition: border-color 0.25s, box-shadow 0.25s, background 0.25s; }
.field input::placeholder { color: rgba(107,114,128,0.6); }
.field input:focus { outline: none; border-color: var(--red); background: var(--white); box-shadow: 0 0 0 4px rgba(225,29,42,0.1); }
.input-wrap:focus-within > svg { stroke: var(--red); }
.toggle-visibility { position: absolute; right: 12px; background: none; border: none; padding: 4px; display: grid; place-items: center; }
.toggle-visibility svg { position: static; width: 17px; height: 17px; stroke: var(--slate-mute); }
.toggle-visibility:hover svg { stroke: var(--slate); }
.field.error input { border-color: var(--red); animation: shake 0.4s var(--ease); }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.field-error-msg { display: none; color: var(--red); font-size: 0.74rem; margin-top: 6px; }
.field.error .field-error-msg { display: block; }
.login-meta { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 24px; font-size: 0.8rem; }
.remember { display: flex; align-items: center; gap: 8px; color: var(--slate-mute); cursor: pointer; user-select: none; }
.remember input { accent-color: var(--red); width: 14px; height: 14px; }
.forgot-link { color: var(--red); font-weight: 600; font-size: 0.8rem; transition: color 0.2s; }
.forgot-link:hover { color: var(--red-deep); }
.btn-signin { position: relative; overflow: hidden; font-size: 0.95rem; padding: 14px 24px; }
.btn-signin .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); border-top-color: var(--white); display: none; animation: spin 0.7s linear infinite; }
.btn-signin.is-loading .btn-text { opacity: 0; }
.btn-signin.is-loading .spinner { display: inline-block; position: absolute; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 16px; color: var(--slate-mute); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: rgba(18,26,43,0.1); }
.login-footnote { text-align: center; font-size: 0.82rem; color: var(--slate-mute); }
.login-footnote a { color: var(--red); font-weight: 600; }

@media (max-width: 1100px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-list { grid-template-columns: 1fr; gap: 0; }
  .flow-connector { display: none; }
  .flow-list { gap: 16px; }
  .cta-band { grid-template-columns: 1fr; padding: 52px 40px; }
  .cta-visual { display: none; }
}
@media (max-width: 900px) {
  .hero-container { grid-template-columns: 1fr; }
  .hero-visual { order: -1; padding: 0; margin-bottom: -20px; }
  .dash-preview { max-width: 340px; }
  .chip-1 { left: 0; top: 2%; }
  .chip-2 { right: 0; bottom: 2%; }
  .footer .container { grid-template-columns: 1fr 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .lp-left { display: none; }
  .lp-right { background: var(--navy); min-height: 100vh; }
  .login-card { background: rgba(26,35,56,0.85); border: 1px solid rgba(244,245,247,0.1); box-shadow: 0 30px 60px rgba(0,0,0,0.4); }
  .login-brand h1 { color: var(--white); }
  .login-brand h1 span { color: rgba(244,245,247,0.5); }
  .field label { color: rgba(244,245,247,0.7); }
  .field input { background: rgba(18,26,43,0.55); border-color: rgba(244,245,247,0.12); color: var(--white); }
  .field input::placeholder { color: rgba(244,245,247,0.3); }
  .field input:focus { background: rgba(18,26,43,0.8); box-shadow: 0 0 0 4px rgba(225,29,42,0.18); }
  .input-wrap > svg { stroke: rgba(244,245,247,0.4); }
  .role-toggle { background: rgba(18,26,43,0.6); border-color: rgba(244,245,247,0.1); }
  .role-toggle button { color: rgba(244,245,247,0.5); }
  .role-toggle button.is-active { background: var(--red); color: var(--white); }
  .remember { color: rgba(244,245,247,0.6); }
  .login-divider { color: rgba(244,245,247,0.4); }
  .login-divider::before, .login-divider::after { background: rgba(244,245,247,0.1); }
  .login-footnote { color: rgba(244,245,247,0.45); }
  .field.error input { border-color: var(--red); }
  .field-error-msg { color: #FF8790; }
  .forgot-link { color: #FF8790; }
  .toggle-visibility svg { stroke: rgba(244,245,247,0.45); }
}
@media (max-width: 720px) {
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; background: rgba(12, 18, 33, 0.98); backdrop-filter: blur(12px); max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); padding: 0 32px; }
  .nav-links.is-open { max-height: 340px; padding: 20px 32px 28px; }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid rgba(244,245,247,0.06); }
  .nav-links .btn { margin-top: 12px; width: 100%; }
  .nav-toggle { display: flex; }
  .hero { padding: 140px 0 100px; }
  .hero-stats { gap: 24px; }
  .feature-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .footer .container { grid-template-columns: 1fr; }
  .cta-band { padding: 44px 28px; margin: 0 16px; border-radius: var(--radius-lg); }
  .section { padding: 80px 0; }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .container { padding: 0 20px; }
  .login-card { padding: 36px 24px 28px; }
}

/* ===========================================================
   KWAME PRINCE AUTO PARTS — App Stylesheet
   Internal dashboard pages: sidebar layout, panels, modals
=========================================================== */

:root {
  --off-white:    #F0F2F7;
  --surface:      #FFFFFF;
  --slate-light:  #9CA3AF;
  --border:       rgba(18,26,43,0.09);
  --green-bg:     rgba(34,197,94,0.10);
  --amber-bg:     rgba(245,166,35,0.10);
  --blue-bg:      rgba(59,130,246,0.10);

  --sidebar-w:    248px;
  --topbar-h:     64px;

  --radius-lg:  18px;
  --radius-xl:  24px;

  --shadow-card:  0 2px 12px rgba(18,26,43,0.07), 0 1px 3px rgba(18,26,43,0.05);
  --shadow-deep:  0 20px 50px rgba(18,26,43,0.18);
  --shadow-modal: 0 32px 80px rgba(0,0,0,0.36);
}

/* ===========================================================
   APP SHELL
=========================================================== */
.app-body {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ===========================================================
   SIDEBAR
=========================================================== */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform 0.4s var(--ease);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sb-top {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(244,245,247,0.07);
}
.sb-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}
.sb-brand-mark {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(225,29,42,0.35);
}
.sb-brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--white);
  line-height: 1.25;
}
.sb-brand-text small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 400;
  color: rgba(244,245,247,0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sb-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(225,29,42,0.14);
  border: 1px solid rgba(225,29,42,0.28);
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #FF8790;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sb-role-badge svg { stroke: #FF8790; }

.sb-nav {
  padding: 14px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sb-nav-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(244,245,247,0.28);
  padding: 10px 8px 4px;
}
.sb-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(244,245,247,0.58);
  transition: background 0.22s var(--ease), color 0.22s var(--ease);
  position: relative;
}
.sb-link:hover {
  background: rgba(244,245,247,0.07);
  color: rgba(244,245,247,0.9);
}
.sb-link.is-active {
  background: rgba(225,29,42,0.14);
  color: var(--white);
  font-weight: 600;
}
.sb-link.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--red);
  border-radius: 0 3px 3px 0;
}
.sb-icon {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  flex-shrink: 0;
}
.sb-icon svg { stroke: currentColor; }
.sb-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 20px;
  font-size: 0.66rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.sb-badge.red   { background: rgba(225,29,42,0.22);  color: #FF8790; }
.sb-badge.amber { background: rgba(245,166,35,0.20); color: var(--amber); }

.sb-user {
  padding: 14px 16px;
  border-top: 1px solid rgba(244,245,247,0.07);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sb-avatar {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
}
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-info b {
  display: block;
  color: var(--white);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-user-info span { font-size: 0.67rem; color: rgba(244,245,247,0.38); }
.sb-logout {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  color: rgba(244,245,247,0.38);
  transition: background 0.2s, color 0.2s;
}
.sb-logout:hover { background: rgba(225,29,42,0.14); color: #FF8790; }
.sb-logout svg { stroke: currentColor; }

.sb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 190;
  backdrop-filter: blur(2px);
}

/* ===========================================================
   MAIN
=========================================================== */
.app-main {
  grid-column: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===========================================================
   TOPBAR
=========================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: rgba(240,242,247,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
}
.topbar-menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 8px;
  color: var(--slate);
  transition: background 0.2s;
}
.topbar-menu-btn:hover { background: rgba(18,26,43,0.07); }
.topbar-menu-btn svg { stroke: currentColor; display: block; }

.topbar-breadcrumb {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-mute);
  flex: 1;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-clock {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-mute);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  min-width: 72px;
  text-align: right;
}
.topbar-icon-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--slate-mute);
  transition: background 0.2s, border-color 0.2s;
}
.topbar-icon-btn:hover { background: var(--white); border-color: rgba(18,26,43,0.15); color: var(--navy); }
.topbar-icon-btn svg { stroke: currentColor; }
.notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid var(--off-white);
  box-shadow: 0 0 6px rgba(225,29,42,0.5);
  animation: notif-pulse 2s ease-in-out infinite;
}
@keyframes notif-pulse {
  0%,100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.3); opacity: 0.7; }
}
.topbar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(225,29,42,0.3);
}
.topbar-avatar:hover { box-shadow: 0 4px 14px rgba(225,29,42,0.45); }

/* ===========================================================
   PAGE CONTENT
=========================================================== */
.page-content {
  flex: 1;
  padding: 30px 28px 48px;
  max-width: 1300px;
  width: 100%;
}

/* ===========================================================
   GREETING ROW
=========================================================== */
.greeting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.greeting-text h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.greeting-text p {
  font-size: 0.84rem;
  color: var(--slate-mute);
}

.btn-new-tx {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px 13px 14px;
  background: linear-gradient(120deg, var(--navy) 0%, #1E2D50 100%);
  border: none;
  border-radius: var(--radius-md);
  color: var(--white);
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(18,26,43,0.22);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn-new-tx::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(225,29,42,0.18) 100%);
  opacity: 0;
  transition: opacity 0.35s;
}
.btn-new-tx:hover { transform: translateY(-3px); box-shadow: 0 12px 34px rgba(18,26,43,0.30); }
.btn-new-tx:hover::before { opacity: 1; }
.btn-new-tx:active { transform: translateY(0); }

.btn-new-tx-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(225,29,42,0.22);
  border: 1px solid rgba(225,29,42,0.35);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.btn-new-tx-icon svg { stroke: #FF8790; }
.btn-new-tx-body { text-align: left; position: relative; }
.btn-new-tx-body b { display: block; font-size: 0.92rem; font-weight: 700; }
.btn-new-tx-body small { font-size: 0.72rem; color: rgba(244,245,247,0.5); }
.btn-new-tx-arrow { stroke: rgba(244,245,247,0.5); position: relative; transition: transform 0.3s var(--ease); }
.btn-new-tx:hover .btn-new-tx-arrow { transform: translateX(4px); }

/* ===========================================================
   STAT CARDS
=========================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px 20px 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  cursor: default;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(18,26,43,0.11); }

.stat-card-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--ig);
  display: grid;
  place-items: center;
}
.stat-card-icon svg { stroke: var(--ic); }
.stat-card-body span {
  display: block;
  font-size: 0.73rem;
  color: var(--slate-mute);
  font-weight: 500;
  margin-bottom: 4px;
}
.stat-card-body b {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-card-body b.alert-count { color: var(--amber); }

.stat-card-delta {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  align-self: flex-start;
}
.stat-card-delta.up   { background: var(--green-bg); color: var(--green); }
.stat-card-delta.down { background: var(--amber-bg); color: var(--amber); }

/* ===========================================================
   DASHBOARD GRID
=========================================================== */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}
.dash-right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===========================================================
   PANELS
=========================================================== */
.dash-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.panel-head h3 {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-sub {
  font-size: 0.76rem;
  color: var(--slate-mute);
  margin-top: 2px;
  display: block;
}
.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-size: 0.77rem;
  color: var(--slate-mute);
}
.panel-link {
  color: var(--red);
  font-weight: 600;
  font-size: 0.77rem;
  transition: color 0.2s;
}
.panel-link:hover { color: var(--red-deep); }

.alert-badge {
  background: rgba(225,29,42,0.12);
  color: var(--red);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

/* ===========================================================
   TRANSACTION FILTER TABS
=========================================================== */
.tx-filter-tabs {
  display: flex;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.tx-tab {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--slate-mute);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.tx-tab.is-active {
  background: var(--surface);
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(18,26,43,0.1);
}

/* ===========================================================
   TRANSACTIONS TABLE
=========================================================== */
.tx-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 360px;
}
.tx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.tx-table thead th {
  position: sticky;
  top: 0;
  background: var(--off-white);
  padding: 10px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-mute);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tx-table tbody tr {
  border-bottom: 1px solid rgba(18,26,43,0.05);
  transition: background 0.2s;
}
.tx-table tbody tr:hover { background: rgba(18,26,43,0.025); }
.tx-table tbody tr.is-new {
  animation: row-in 0.45s var(--ease) backwards;
}
@keyframes row-in {
  from { opacity:0; transform: translateY(-10px); background: rgba(34,197,94,0.08); }
  to   { opacity:1; transform: none; }
}
.tx-table td {
  padding: 11px 16px;
  color: var(--slate);
  vertical-align: middle;
}
.tx-table td:last-child { text-align: right; }

.tx-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.tx-badge.sale       { background: rgba(34,197,94,0.1);  color: var(--green); }
.tx-badge.restock    { background: rgba(59,130,246,0.1); color: var(--blue); }
.tx-badge.adjustment { background: rgba(245,166,35,0.1); color: var(--amber); }
.tx-badge::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.tx-row-btn {
  background: none;
  border: none;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--slate-mute);
  font-size: 0.75rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.tx-row-btn:hover { background: rgba(18,26,43,0.07); color: var(--navy); }
.tx-row-btn.void:hover { background: rgba(225,29,42,0.07); color: var(--red); }

.tx-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--slate-mute);
}
.tx-empty svg { stroke: var(--slate-light); margin: 0 auto 12px; display: block; }
.tx-empty b { display: block; font-size: 0.9rem; color: var(--slate); margin-bottom: 4px; }
.tx-empty span { font-size: 0.8rem; }

/* ===========================================================
   LOW STOCK LIST
=========================================================== */
.low-stock-list {
  display: grid;
  gap: 0;
  padding: 6px 0;
  max-height: 250px;
  overflow-y: auto;
}
.ls-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid rgba(18,26,43,0.05);
  transition: background 0.2s;
  animation: fade-in 0.4s var(--ease) backwards;
}
@keyframes fade-in { from { opacity:0; transform:translateX(-8px); } }
.ls-item:last-child { border-bottom: none; }
.ls-item:hover { background: rgba(18,26,43,0.025); }
.ls-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ls-dot.critical { background: var(--red); box-shadow: 0 0 6px rgba(225,29,42,0.45); }
.ls-dot.low      { background: var(--amber); box-shadow: 0 0 6px rgba(245,166,35,0.4); }
.ls-info { flex: 1; min-width: 0; }
.ls-info b {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ls-info span { font-size: 0.71rem; color: var(--slate-mute); }
.ls-qty {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ls-qty.critical { background: rgba(225,29,42,0.1); color: var(--red); }
.ls-qty.low      { background: rgba(245,166,35,0.1); color: var(--amber); }

/* ===========================================================
   QUICK STOCK SEARCH
=========================================================== */
.quick-search-wrap { padding: 14px 18px 10px; }
.qs-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.qs-input-wrap svg {
  position: absolute;
  left: 12px;
  stroke: var(--slate-mute);
  pointer-events: none;
}
.qs-input-wrap input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--off-white);
  font-size: 0.84rem;
  color: var(--navy);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.qs-input-wrap input:focus {
  outline: none;
  border-color: var(--red);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(225,29,42,0.1);
}
.qs-results {
  padding: 6px 0 10px;
  max-height: 220px;
  overflow-y: auto;
}
.qs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  gap: 8px;
  color: var(--slate-light);
  font-size: 0.78rem;
}
.qs-empty svg { stroke: var(--slate-light); }
.qs-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  cursor: pointer;
  transition: background 0.18s;
}
.qs-result-item:hover { background: rgba(18,26,43,0.04); }
.qs-result-item .qs-name { flex: 1; font-size: 0.83rem; font-weight: 600; }
.qs-result-item .qs-sku  { font-size: 0.72rem; color: var(--slate-mute); display: block; margin-top: 1px; }
.qs-result-item .qs-stock {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.qs-result-item .qs-stock.ok       { background: var(--green-bg); color: var(--green); }
.qs-result-item .qs-stock.low-s    { background: var(--amber-bg); color: var(--amber); }
.qs-result-item .qs-stock.critical { background: rgba(225,29,42,0.1); color: var(--red); }
.qs-result-item .qs-sell-btn {
  padding: 5px 12px;
  border-radius: 6px;
  border: none;
  background: rgba(225,29,42,0.1);
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 600;
  transition: background 0.2s;
}
.qs-result-item .qs-sell-btn:hover { background: var(--red); color: var(--white); }

/* ===========================================================
   TRANSACTION MODAL
=========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,12,22,0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border);
  transform: translateY(32px) scale(0.96);
  transition: transform 0.4s var(--ease-spring);
}
.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 10;
}
.modal-header h2 { font-size: 1.1rem; font-weight: 800; }
.modal-header p  { font-size: 0.8rem; color: var(--slate-mute); margin-top: 3px; }
.modal-close {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--off-white);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(225,29,42,0.07); }
.modal-close svg { stroke: var(--slate-mute); }

.tx-type-row {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
  padding: 18px 24px 12px;
}
.tx-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--off-white);
  color: var(--slate-mute);
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.tx-type-btn small { font-size: 0.68rem; font-weight: 400; color: var(--slate-light); margin-top: -4px; }
.tx-type-btn:hover { border-color: rgba(18,26,43,0.2); background: var(--white); }
.tx-type-btn.is-active {
  border-color: var(--red);
  background: rgba(225,29,42,0.07);
  color: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(225,29,42,0.12);
}
.tx-type-btn.is-active .tx-type-icon { background: rgba(225,29,42,0.12); }
.tx-type-btn.is-active small { color: rgba(225,29,42,0.7); }
.tx-type-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(18,26,43,0.07);
  display: grid;
  place-items: center;
  transition: background 0.25s;
}
.tx-type-icon svg { stroke: currentColor; }

.modal-fields {
  padding: 10px 24px 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.mfield { display: flex; flex-direction: column; gap: 6px; }
.mfield-full { grid-column: 1 / -1; }
.mfield label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--slate);
  letter-spacing: 0.02em;
}
.req { color: var(--red); }
.opt { color: var(--slate-light); font-weight: 400; font-size: 0.7rem; }

.mfield input,
.mfield select,
.mfield textarea {
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--off-white);
  font-size: 0.88rem;
  color: var(--navy);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.mfield input:focus,
.mfield select:focus,
.mfield textarea:focus {
  outline: none;
  border-color: var(--red);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(225,29,42,0.1);
}
.mfield select { cursor: pointer; appearance: none; background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 32px; }
.mfield textarea { resize: vertical; min-height: 60px; }
.mfield-error { font-size: 0.72rem; color: var(--red); display: none; }
.mfield.has-error input,
.mfield.has-error select { border-color: var(--red); animation: shake 0.4s var(--ease); }
.mfield.has-error .mfield-error { display: block; }

.mfield-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.mfield-search-wrap svg {
  position: absolute;
  left: 12px;
  stroke: var(--slate-mute);
  pointer-events: none;
}
.mfield-search-wrap input { padding-left: 36px; }

.product-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-deep);
  z-index: 600;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}
.product-dropdown.is-open { display: block; }
.pd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.18s;
}
.pd-item:hover { background: var(--off-white); }
.pd-item b { font-size: 0.84rem; font-weight: 600; flex: 1; }
.pd-item span { font-size: 0.72rem; color: var(--slate-mute); display: block; margin-top: 1px; }
.pd-item-stock {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.selected-product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  background: rgba(34,197,94,0.06);
  border: 1.5px solid rgba(34,197,94,0.25);
  border-radius: var(--radius-sm);
  margin-top: 4px;
}
.sp-left b { font-size: 0.86rem; font-weight: 600; display: block; }
.sp-left span { font-size: 0.72rem; color: var(--slate-mute); }
.sp-right { display: flex; align-items: center; gap: 10px; }
.sp-stock { font-size: 0.76rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.sp-clear {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(18,26,43,0.08);
  border: none;
  font-size: 0.7rem;
  color: var(--slate-mute);
  display: grid;
  place-items: center;
  transition: background 0.2s;
}
.sp-clear:hover { background: rgba(225,29,42,0.1); color: var(--red); }

.tx-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row !important;
  padding: 12px 14px;
  background: var(--off-white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.tx-total-row span { font-size: 0.8rem; color: var(--slate-mute); font-weight: 600; }
.tx-total-row b { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; color: var(--navy); }

.sale-only { transition: opacity 0.3s; }
.sale-only.hidden { opacity: 0.3; pointer-events: none; }

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 24px 24px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}
.btn-outline {
  background: transparent;
  color: var(--slate-mute);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { background: var(--off-white); color: var(--slate); }

.btn-save-tx { min-width: 160px; }
.btn-save-tx .spinner {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  display: none;
  animation: spin 0.7s linear infinite;
  position: absolute;
}
.btn-save-tx.is-loading .btn-text { opacity: 0; }
.btn-save-tx.is-loading .spinner { display: block; }

/* ===========================================================
   APP TOAST
=========================================================== */
.app-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 20px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.3);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  white-space: nowrap;
}
.app-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.app-toast.success { border-left: 3px solid var(--green); }
.app-toast.error   { border-left: 3px solid var(--red); }
.app-toast.info    { border-left: 3px solid var(--blue); }
.toast-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.app-toast.success .toast-dot { background: var(--green); }
.app-toast.error   .toast-dot { background: var(--red); }
.app-toast.info    .toast-dot { background: var(--blue); }

/* ===========================================================
   APP RESPONSIVE
=========================================================== */
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-right-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 820px) {
  .app-body { grid-template-columns: 1fr; }
  .app-main { grid-column: 1; }
  .sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); }
  .sidebar.is-open { transform: translateX(0); box-shadow: 12px 0 40px rgba(0,0,0,0.35); }
  .sb-overlay.is-open { display: block; }
  .topbar-menu-btn { display: grid; }
  .topbar { padding: 0 18px; }
  .page-content { padding: 20px 16px 40px; }
  .greeting-row { flex-direction: column; align-items: flex-start; }
  .btn-new-tx { width: 100%; justify-content: flex-start; }
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .dash-right-col { grid-template-columns: 1fr; }
  .tx-type-row { grid-template-columns: 1fr; }
  .modal-fields { grid-template-columns: 1fr; }
  .mfield-full { grid-column: 1; }
  .modal-overlay { padding: 12px; }
  .modal { border-radius: var(--radius-lg); }
  .topbar-clock { display: none; }
}
@media (max-width: 420px) { .stats-grid { grid-template-columns: 1fr; } }

/* ===========================================================
   MODAL — 4-type grid + return/credit extras
=========================================================== */
.tx-type-row-4 { grid-template-columns: repeat(2, 1fr); }
.tx-badge.return { background: rgba(139, 92, 246, 0.12); color: #8B5CF6; }
.tx-badge.return::before { background: #8B5CF6; }

#creditDueDateWrap, #returnReasonWrap, #refundMethodWrap {
  animation: field-in 0.3s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes field-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

tr.voided td { opacity: 0.38; text-decoration: line-through; }

/* ===========================================================
   TRANSACTIONS PAGE
=========================================================== */
.txp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.txp-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 4px; }
.txp-sub   { font-size: 0.83rem; color: var(--slate-mute); }

.txp-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.txp-sum-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease);
}
.txp-sum-card:hover { transform: translateY(-3px); }
.txp-sum-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--ig);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.txp-sum-icon svg { stroke: var(--ic); }
.txp-sum-card b { display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--navy); line-height: 1; }
.txp-sum-card span { font-size: 0.72rem; color: var(--slate-mute); margin-top: 3px; display: block; }

.txp-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.txp-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  flex-wrap: wrap;
}
.txp-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-mute);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}
.txp-tab:hover { background: var(--off-white); color: var(--slate); }
.txp-tab.is-active { background: var(--navy); color: var(--white); box-shadow: 0 2px 8px rgba(18,26,43,0.15); }
.txp-tab.credit-tab.is-active { background: var(--amber); color: var(--white); }
.txp-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 20px;
  font-size: 0.63rem;
  font-weight: 700;
  background: rgba(18,26,43,0.09);
  color: inherit;
}
.txp-tab.is-active .txp-tab-count { background: rgba(255,255,255,0.2); }

.txp-filter-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.txp-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.txp-search-wrap svg { position: absolute; left: 11px; stroke: var(--slate-mute); pointer-events: none; }
.txp-search-wrap input {
  padding: 9px 12px 9px 32px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.83rem;
  color: var(--navy);
  width: 200px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.txp-search-wrap input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(225,29,42,0.1); }
.txp-date-select {
  padding: 9px 28px 9px 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.83rem;
  color: var(--slate);
  cursor: pointer;
  font-family: var(--font-body);
  appearance: none;
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}
.txp-export-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-mute);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.txp-export-btn svg { stroke: currentColor; }
.txp-export-btn:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.credit-alert-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 18px;
  background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--slate);
  margin-bottom: 14px;
}
.credit-alert-banner svg { stroke: var(--amber); flex-shrink: 0; }
.credit-alert-banner b { font-weight: 700; color: var(--amber); }

.txp-credit-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 0.63rem;
  font-weight: 700;
  background: rgba(245,166,35,0.15);
  color: var(--amber);
  letter-spacing: 0.04em;
}

.txp-check-label { display: flex; align-items: center; cursor: pointer; }
.txp-check-label input { accent-color: var(--red); width: 14px; height: 14px; cursor: pointer; }

.txp-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--slate-mute);
  flex-wrap: wrap;
  gap: 10px;
}
.txp-footer-left { display: flex; align-items: center; gap: 10px; }
.txp-footer-sep { opacity: 0.4; }
.txp-footer-total { font-weight: 700; color: var(--navy); }
.txp-pagination { display: flex; align-items: center; gap: 12px; }
.txp-page-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--slate-mute);
  transition: background 0.2s, border-color 0.2s;
}
.txp-page-btn svg { stroke: currentColor; }
.txp-page-btn:hover:not(:disabled) { background: var(--navy); border-color: var(--navy); color: var(--white); }
.txp-page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
#pageInfo { font-size: 0.78rem; font-weight: 600; color: var(--slate); }

.detail-modal { max-width: 480px; }
.detail-body { padding: 8px 0 8px; }
.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 24px;
  border-bottom: 1px solid rgba(18,26,43,0.05);
  font-size: 0.84rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-row > span:first-child { color: var(--slate-mute); font-weight: 500; flex-shrink: 0; }
.detail-row > b { font-weight: 600; text-align: right; }

@media (max-width: 1100px) { .txp-summary { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 820px)  { .txp-filter-bar { flex-direction: column; align-items: flex-start; } }
@media (max-width: 640px)  {
  .txp-summary { grid-template-columns: 1fr 1fr; }
  .txp-filter-right { width: 100%; }
  .txp-search-wrap input { width: 100%; }
  .txp-export-btn { display: none; }
}
@media (max-width: 480px)  { .txp-summary { grid-template-columns: 1fr; } }