@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- DESIGN SYSTEM TOKENS --- */
:root {
  /* Fonts */
  --font-headings: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Colors (Light Mode Default) */
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-dark-accent: #0F172A;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  
  --primary: #0F172A;
  --primary-hover: #1E293B;
  --accent: #22C55E;
  --accent-hover: #16A34A;
  --accent-light: #DCFCE7;
  
  --border-color: #E2E8F0;
  --card-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --card-shadow-hover: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -6px rgba(15, 23, 42, 0.1);
  --transition-speed: 0.3s;
  
  /* Alert / States */
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --success: #10B981;
  --success-light: #D1FAE5;
  --info: #3B82F6;
  --info-light: #DBEAFE;
}

/* Dark Mode Variables Override */
[data-theme="dark"] {
  --bg-primary: #0B0F19;
  --bg-secondary: #1E293B;
  --bg-dark-accent: #020617;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --primary: #22C55E;
  --primary-hover: #4ADE80;
  --accent: #22C55E;
  --accent-hover: #4ADE80;
  --accent-light: #14532D;
  
  --border-color: #334155;
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -6px rgba(0, 0, 0, 0.4);
}

/* --- BASE & LAYOUT --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-speed);
}

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

/* --- CONTAINER --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- STICKY NAV --- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  transition: all var(--transition-speed);
}

header[data-theme="dark"] {
  background-color: rgba(2, 6, 17, 0.95);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-headings);
  font-size: 1.5rem;
  font-weight: 800;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: #CBD5E1;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #FFFFFF;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width var(--transition-speed);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.1);
  transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.theme-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: rotate(15deg);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Dark mode button swaps icon active states */
body:not([data-theme="dark"]) .theme-toggle-btn .sun-icon {
  display: none;
}
body[data-theme="dark"] .theme-toggle-btn .moon-icon {
  display: none;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #FFFFFF;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: currentColor;
  margin: 5px 0;
  transition: var(--transition-speed);
}

/* --- HERO SECTION --- */
.hero {
  padding: 5rem 0 3rem 0;
  text-align: center;
  background: radial-gradient(circle at top right, rgba(34, 197, 94, 0.08), transparent 40%),
              radial-gradient(circle at bottom left, rgba(15, 23, 42, 0.05), transparent 40%);
}

[data-theme="dark"] .hero {
  background: radial-gradient(circle at top right, rgba(34, 197, 94, 0.15), transparent 50%),
              radial-gradient(circle at bottom left, rgba(15, 23, 42, 0.8), transparent 50%);
}

.hero h1 {
  font-size: 3rem;
  max-width: 800px;
  margin: 0 auto 1.5rem auto;
  letter-spacing: -0.025em;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
}

/* --- CARD STYLES --- */
.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed), background-color var(--transition-speed);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(34, 197, 94, 0.3);
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.btn-primary {
  background-color: var(--accent);
  color: #0F172A;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: #0F172A;
}

.btn-danger {
  background-color: var(--danger);
  color: #FFFFFF;
}

.btn-danger:hover {
  background-color: #DC2626;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 12px;
}

/* --- ADSENSE PLACEHOLDERS --- */
.adsense-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  padding: 1rem;
  background-color: var(--bg-primary);
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.adsense-slot::before {
  content: 'ADVERTISEMENT';
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.ads-leaderboard {
  min-height: 110px;
  width: 100%;
  max-width: 728px;
  margin-left: auto;
  margin-right: auto;
}

.ads-rectangle {
  min-height: 300px;
  width: 100%;
  max-width: 336px;
  margin-left: auto;
  margin-right: auto;
}

.ads-sidebar {
  min-height: 270px;
  width: 100%;
  max-width: 300px;
}

.ads-responsive {
  min-height: 100px;
  width: 100%;
}

.ad-box-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font-headings);
  font-weight: 500;
}

.ad-box-placeholder svg {
  width: 32px;
  height: 32px;
  margin-bottom: 0.5rem;
  stroke: currentColor;
  fill: none;
}

/* --- MAIN PAGE LAYOUT --- */
main {
  flex: 1;
}

.grid-cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.grid-cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-cols-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* --- FOOTER --- */
footer {
  background-color: var(--bg-dark-accent);
  color: #F8FAFC;
  padding: 4rem 0 2rem 0;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h3 {
  color: #FFFFFF;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-headings);
}

.footer-col p {
  color: #94A3B8;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.footer-logo {
  font-family: var(--font-headings);
  font-size: 1.6rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 1rem;
}

.footer-logo span {
  color: var(--accent);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #94A3B8;
  font-size: 0.95rem;
  transition: color var(--transition-speed);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #64748B;
}

.footer-affiliate-note {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #64748B;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  margin-top: 1.5rem;
}

/* --- BLOG CARD --- */
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card-img {
  height: 200px;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  position: relative;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.05);
}

.blog-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--accent);
  color: #0F172A;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  font-family: var(--font-headings);
}

.blog-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.blog-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.blog-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.blog-card-link:hover {
  text-decoration: underline;
}

/* --- BLOG FILTER BAR --- */
.blog-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.blog-categories {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--accent);
  color: #0F172A;
  border-color: var(--accent);
  font-weight: 500;
}

.search-bar {
  position: relative;
  max-width: 320px;
  width: 100%;
}

.search-bar input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.search-bar svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  fill: none;
}

/* --- BLOG DETAILS PAGE --- */
.blog-article {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 3rem;
  margin-bottom: 3rem;
}

.blog-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2rem;
}

.blog-post-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.blog-post-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.blog-featured-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2.5rem;
}

.blog-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.blog-content h2 {
  font-size: 1.75rem;
  margin: 2.5rem 0 1rem 0;
}

.blog-content h3 {
  font-size: 1.35rem;
  margin: 2rem 0 1rem 0;
}

.blog-content p {
  margin-bottom: 1.5rem;
}

.blog-content ul, 
.blog-content ol {
  margin: 0 0 1.5rem 2rem;
}

.blog-content li {
  margin-bottom: 0.5rem;
}

.blog-content blockquote {
  border-left: 4px solid var(--accent);
  background-color: var(--bg-primary);
  padding: 1.5rem;
  font-style: italic;
  border-radius: 0 8px 8px 0;
  margin: 2rem 0;
}

.blog-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.sidebar-widget h3 {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

/* --- STATS DASHBOARD & CALCULATOR --- */
.calculator-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.preset-container {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.preset-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-speed);
}

.preset-btn:hover {
  background-color: var(--accent-light);
  border-color: var(--accent);
  color: #0F172A;
}

.appliance-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-secondary);
  margin-bottom: 1.5rem;
}

.appliance-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.appliance-table th {
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.appliance-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.appliance-table tr:last-child td {
  border-bottom: none;
}

.appliance-table input,
.appliance-table select {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.star-rating-select {
  display: flex;
  gap: 2px;
  cursor: pointer;
}

.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-muted);
  transition: transform 0.1s ease;
}

.star-btn.active {
  color: var(--warning);
}

.star-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.inline-result {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.85rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-danger {
  background-color: var(--danger-light);
  color: var(--danger);
}

.badge-success {
  background-color: var(--accent-light);
  color: var(--accent-hover);
}

.badge-info {
  background-color: var(--info-light);
  color: var(--info);
}

/* --- SUMMARY DASHBOARD CARDS --- */
.summary-dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--card-shadow);
}

.summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background-color: var(--accent-light);
  color: var(--accent-hover);
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
}

.summary-info {
  flex: 1;
}

.summary-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.summary-info h4 {
  font-size: 1.4rem;
  font-family: var(--font-headings);
  font-weight: 700;
  margin-top: 0.1rem;
}

/* --- BILL HISTORY TABLE --- */
.history-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-top: 1rem;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th {
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  text-align: left;
}

.history-table td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
}

/* --- FORM GROUP STYLING --- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  outline: none;
  font-size: 0.95rem;
  transition: border-color var(--transition-speed);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Slider Custom Styling */
.range-slider {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.range-slider input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  cursor: pointer;
}

.range-slider span {
  font-weight: 700;
  min-width: 45px;
  text-align: right;
  font-size: 0.9rem;
}

/* --- ACCORDIONS --- */
.accordion {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
  background-color: var(--bg-secondary);
}

.accordion-header {
  padding: 1.25rem;
  background-color: var(--bg-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-headings);
  font-weight: 600;
  transition: background-color var(--transition-speed);
}

.accordion-header:hover {
  background-color: var(--border-color);
}

.accordion-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-speed);
}

.accordion.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0;
  height: 0;
  overflow: hidden;
  transition: height var(--transition-speed), padding var(--transition-speed);
}

.accordion.active .accordion-content {
  padding: 1.25rem;
  height: auto;
}

/* --- COLLAPSIBLE BAR CHART (CSS BAR CHART) --- */
.chart-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.chart-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chart-label {
  min-width: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.chart-bar-wrapper {
  flex: 1;
  height: 20px;
  background-color: var(--bg-primary);
  border-radius: 10px;
  overflow: hidden;
}

.chart-bar {
  height: 100%;
  background-color: var(--accent);
  border-radius: 10px;
  width: 0;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-value {
  min-width: 80px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 700;
}

/* --- RECOMMENDATIONS SLIDER/CARDS --- */
.rec-card {
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--accent);
  transition: transform var(--transition-speed);
}

.rec-card:hover {
  transform: translateX(4px);
}

.rec-title {
  font-family: var(--font-headings);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rec-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.rec-disclosure {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* --- ALERTS & NOTIFICATIONS --- */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  border-left: 4px solid;
}

.alert-danger {
  background-color: var(--danger-light);
  color: var(--danger);
  border-left-color: var(--danger);
}

.alert-warning {
  background-color: var(--warning-light);
  color: var(--warning);
  border-left-color: var(--warning);
}

.alert-success {
  background-color: var(--success-light);
  color: var(--success);
  border-left-color: var(--success);
}

/* --- RESPONSIVENESS --- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
  
  .summary-dashboard {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark-accent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    gap: 1rem;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .hamburger {
    display: block;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .blog-filters {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .search-bar {
    max-width: 100%;
  }
  
  .blog-article {
    padding: 1.5rem;
  }
  
  .blog-post-title {
    font-size: 1.8rem;
  }
}

/* --- QUANTITY CELL INPUT STYLING --- */
.row-qty {
  width: 100% !important;
  max-width: 80px !important;
  padding: 0.5rem 0.60rem !important;
  border: 2px solid #CBD5E1 !important;
  border-radius: 8px !important;
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  font-weight: 700 !important;
  text-align: center !important;
  font-size: 1rem !important;
  outline: none !important;
  transition: all var(--transition-speed) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
}

[data-theme="dark"] .row-qty {
  background-color: #F8FAFC !important;
  color: #0F172A !important;
  border: 2px solid #E2E8F0 !important;
}

.row-qty:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25) !important;
}

/* --- AUTHENTICATION MODAL STYLING --- */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.25s ease-out;
}

.auth-modal-content {
  width: 100%;
  max-width: 420px;
  background-color: var(--bg-secondary);
  border-radius: 16px;
  box-shadow: var(--card-shadow-hover);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Locked Buttons indicators */
.btn-locked {
  opacity: 0.65;
  cursor: not-allowed;
  position: relative;
}

