/* ═══════════════════════════════════════════════════════
   Zakat Calculator — Islamic Design System
   Colors: Emerald Green + Gold + Warm Cream
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Scheherazade+New:wght@400;600;700&family=Cormorant+Garamond:wght@400;600;700&family=Nunito:wght@400;500;600;700&display=swap');

/* ─── CSS Variables ────────────────────────────────── */
:root {
  --green-900: #0a3d22;
  --green-800: #0d4f2e;
  --green-700: #115c35;
  --green-600: #1a7a45;
  --green-500: #22994f;
  --green-400: #4db877;
  --green-100: #e8f5ee;
  --green-50:  #f2fbf5;

  --gold-700: #8B6914;
  --gold-600: #a6801c;
  --gold-500: #c9a84c;
  --gold-400: #d4b96a;
  --gold-300: #e8d4a0;
  --gold-100: #fdf6e3;
  --gold-50:  #fffbf0;

  --cream-100: #faf5eb;
  --cream-200: #f5ead6;
  --cream-300: #ede0c8;

  --text-primary:   #1a1a1a;
  --text-secondary: #4a5568;
  --text-muted:     #718096;
  --text-gold:      #8B6914;
  --text-green:     #0d4f2e;
  --text-on-green:  #ffffff;

  --border-light: #e2d9c8;
  --border-gold:  #c9a84c;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.14);
  --shadow-gold: 0 4px 20px rgba(201,168,76,0.25);

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

  --nav-height: 70px;
  --header-height: 64px;

  --font-arabic: 'Scheherazade New', 'Amiri', serif;
  --font-latin-display: 'Cormorant Garamond', Georgia, serif;
  --font-latin-body: 'Nunito', system-ui, sans-serif;
}

/* ─── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--cream-100);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.6;
}

/* ─── Typography ───────────────────────────────────── */
[data-lang="ar"] body,
[data-lang="ar"] input,
[data-lang="ar"] select,
[data-lang="ar"] button,
[data-lang="ar"] textarea {
  font-family: var(--font-arabic);
}

[data-lang="en"] body,
[data-lang="en"] input,
[data-lang="en"] select,
[data-lang="en"] button,
[data-lang="en"] textarea,
[data-lang="fr"] body,
[data-lang="fr"] input,
[data-lang="fr"] select,
[data-lang="fr"] button,
[data-lang="fr"] textarea {
  font-family: var(--font-latin-body);
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
}

[data-lang="en"] h1, [data-lang="en"] h2, [data-lang="en"] h3,
[data-lang="fr"] h1, [data-lang="fr"] h2, [data-lang="fr"] h3 {
  font-family: var(--font-latin-display);
}

/* ─── Geometric Pattern Overlay ────────────────────── */
.pattern-bg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.5' opacity='0.15'%3E%3Cpolygon points='30,2 56,15 56,45 30,58 4,45 4,15'/%3E%3Cpolygon points='30,8 52,19 52,41 30,52 8,41 8,19'/%3E%3C/g%3E%3C/svg%3E");
}

/* ─── Header ───────────────────────────────────────── */
.app-header {
  background: var(--green-800);
  background-image: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.header-title {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
}

.header-tagline {
  color: var(--gold-300);
  font-size: 0.7rem;
  opacity: 0.9;
  display: none;
}

@media (min-width: 480px) {
  .header-tagline { display: block; }
}

.lang-switcher {
  display: flex;
  gap: 4px;
}

.lang-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.lang-btn:hover, .lang-btn.active {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--green-900);
}

/* ─── Hero Banner ──────────────────────────────────── */
.hero-banner {
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-600) 60%, var(--green-700) 100%);
  padding: 28px 20px 36px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='0.6' opacity='0.07'%3E%3Cpolygon points='40,4 76,20 76,60 40,76 4,60 4,20'/%3E%3Cpolygon points='40,12 68,26 68,54 40,68 12,54 12,26'/%3E%3Ccircle cx='40' cy='40' r='20'/%3E%3C/g%3E%3C/svg%3E");
}

.hero-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
  position: relative;
}

.hero-tagline {
  color: var(--gold-300);
  font-size: 0.9rem;
  position: relative;
  margin-bottom: 20px;
}

/* ─── Nisab Banner ─────────────────────────────────── */
#nisab-banner {
  margin: -20px 16px 0;
  position: relative;
  z-index: 10;
}

.nisab-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-gold);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.nisab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 140px;
}

.nisab-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.nisab-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nisab-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-700);
}

.nisab-update {
  width: 100%;
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--cream-300);
  padding-top: 8px;
  margin-top: 4px;
}

.nisab-source {
  color: var(--gold-700);
  font-weight: 600;
}

/* ─── Main Layout ──────────────────────────────────── */
.app-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: calc(100dvh - var(--header-height) - var(--nav-height));
  padding-bottom: calc(var(--nav-height) + 80px);
}

@media (min-width: 1024px) {
  .app-layout {
    grid-template-columns: 280px 1fr 340px;
    padding-bottom: 0;
    min-height: calc(100dvh - var(--header-height));
  }
}

/* ─── Sidebar (Desktop) ────────────────────────────── */
.sidebar-nav {
  display: none;
}

@media (min-width: 1024px) {
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    background: #fff;
    border-right: 1px solid var(--border-light);
    position: sticky;
    top: var(--header-height);
    height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    gap: 4px;
  }

  .sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    width: 100%;
    text-align: inherit;
  }

  .sidebar-nav-item:hover {
    background: var(--green-100);
    color: var(--green-700);
  }

  .sidebar-nav-item.nav-active {
    background: var(--green-700);
    color: #fff;
  }

  .sidebar-nav-item .nav-icon { font-size: 1.2rem; }
}

/* ─── Main Content ─────────────────────────────────── */
.main-content {
  padding: 20px 16px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── Results Panel (Desktop Sticky) ──────────────── */
.results-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .results-sidebar {
    display: block;
    padding: 24px 16px;
    position: sticky;
    top: var(--header-height);
    height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    background: var(--gold-50);
    border-left: 1px solid var(--border-gold);
  }
}

/* ─── Calculator Section ───────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Asset Cards ──────────────────────────────────── */
.asset-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.asset-card.removing {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s;
}

.asset-card:hover { box-shadow: var(--shadow-md); }

.asset-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(to right, var(--green-50), #fff);
  border-bottom: 1px solid var(--cream-300);
}

.asset-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--green-800);
  font-size: 0.95rem;
}

.asset-icon { font-size: 1.3rem; }

.btn-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.btn-remove:hover {
  background: #fee2e2;
  color: #dc2626;
}

.asset-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── Form Fields ──────────────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 400px) {
  .field-row { grid-template-columns: 1fr; }
}

input[type="number"],
input[type="text"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--cream-100);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(34,153,79,0.15);
  background: #fff;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234a5568' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 32px;
}

[data-dir="ltr"] select {
  background-position: right 12px center;
  padding-left: 14px;
  padding-right: 32px;
}

.checkbox-label, .radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input, .radio-label input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--green-600);
}

.radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ─── Add Asset Button ─────────────────────────────── */
.btn-add-asset {
  width: 100%;
  padding: 14px;
  border: 2px dashed var(--green-400);
  border-radius: var(--radius-md);
  background: var(--green-50);
  color: var(--green-700);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-add-asset:hover {
  background: var(--green-100);
  border-color: var(--green-600);
  transform: translateY(-1px);
}

/* ─── Asset Modal ──────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-sheet {
  background: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 20px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--cream-300);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-800);
  margin-bottom: 20px;
  text-align: center;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (min-width: 400px) {
  .asset-grid { grid-template-columns: repeat(3, 1fr); }
}

.asset-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--cream-100);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-align: center;
}

.asset-type-btn .type-icon { font-size: 2rem; }
.asset-type-btn:hover {
  border-color: var(--gold-500);
  background: var(--gold-50);
  color: var(--gold-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* ─── Results Panel ────────────────────────────────── */
#results-panel {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--green-800);
  color: #fff;
  gap: 10px;
  flex-wrap: wrap;
}

.results-header h3 { font-size: 1rem; }

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.badge--green { background: #dcfce7; color: #15803d; }
.badge--yellow { background: #fef9c3; color: #a16207; }

.results-section {
  padding: 14px 18px;
  border-bottom: 1px solid var(--cream-300);
}

.results-section-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.breakdown-cols {
  display: flex;
  gap: 16px;
  font-size: 0.7rem;
}

.breakdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--cream-100);
  gap: 8px;
}

.breakdown-item:last-child { border-bottom: none; }
.breakdown-label { font-size: 0.88rem; color: var(--text-secondary); flex: 1; }

.breakdown-right {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
}

.breakdown-eligible { color: var(--text-muted); }
.breakdown-zakat { color: var(--green-700); font-weight: 700; }
.inkind-result { font-size: 0.8rem; color: var(--gold-700); font-weight: 600; text-align: end; }

.results-totals {
  padding: 16px 18px;
  background: var(--green-50);
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--green-100);
  gap: 8px;
}

.total-row:last-child { border-bottom: none; }

.total-row--zakat {
  font-weight: 700;
  font-size: 1.05rem;
  padding: 12px 0;
  border-top: 2px solid var(--green-200);
  border-bottom: none;
}

.total-row--rate {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.zakat-amount-positive { color: var(--green-700); font-size: 1.1rem; }

.no-result {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ─── Floating Total (Mobile) ──────────────────────── */
#floating-bar {
  position: fixed;
  bottom: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 90;
  padding: 10px 16px;
  background: var(--green-800);
  border-top: 2px solid var(--gold-500);
}

@media (min-width: 1024px) {
  #floating-bar { display: none; }
}

#floating-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.float-label {
  font-size: 0.8rem;
  color: var(--gold-300);
  font-weight: 600;
}

.float-amount {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
}

.float-amount--positive { color: #4ade80; }

/* ─── Gold Rate Section ────────────────────────────── */
.gold-rate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

@media (min-width: 500px) {
  .gold-rate-grid { grid-template-columns: repeat(4, 1fr); }
}

.gold-card {
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
  color: #fff;
}

.gold-card--oz {
  background: linear-gradient(135deg, var(--gold-700), var(--gold-600));
}

.gold-karat {
  font-size: 0.7rem;
  color: var(--gold-300);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.gold-price {
  font-size: 0.95rem;
  font-weight: 700;
}

.gold-per {
  font-size: 0.65rem;
  opacity: 0.7;
  margin-top: 2px;
}

.gold-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 14px;
}

/* ─── Algeria Mode ─────────────────────────────────── */
.algeria-section {
  padding: 14px;
  background: var(--gold-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gold-300);
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold-700);
}

.toggle-label input[type="checkbox"] { display: none; }

.toggle-switch {
  width: 42px;
  height: 24px;
  background: var(--border-light);
  border-radius: 12px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle-label input:checked + .toggle-switch { background: var(--gold-600); }
.toggle-label input:checked + .toggle-switch::after { transform: translateX(18px); }

.rate-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.rate-unit {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.hidden { display: none !important; }

/* ─── Info Section ─────────────────────────────────── */
.info-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 14px;
  border: 1px solid var(--border-light);
}

.info-card h3 {
  color: var(--green-800);
  margin-bottom: 12px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }

.conditions-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.conditions-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--green-50);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.conditions-list li::before {
  content: '✓';
  color: var(--green-600);
  font-weight: 700;
}

.types-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.type-item {
  padding: 10px 12px;
  background: var(--gold-50);
  border: 1px solid var(--gold-300);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--gold-700);
  font-weight: 600;
  text-align: center;
}

/* ─── Settings ─────────────────────────────────────── */
.settings-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 14px;
  border: 1px solid var(--border-light);
}

.settings-card h3 {
  color: var(--green-800);
  margin-bottom: 16px;
  font-size: 1rem;
  border-bottom: 2px solid var(--gold-500);
  padding-bottom: 8px;
}

.settings-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.settings-row label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ─── Bottom Nav (Mobile) ──────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: #fff;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: stretch;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

@media (min-width: 1024px) {
  .bottom-nav { display: none; }
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 600;
  border: none;
  background: none;
  padding: 6px 0;
  transition: color 0.2s;
  position: relative;
}

.nav-item .nav-icon { font-size: 1.3rem; transition: transform 0.2s; }
.nav-item:hover .nav-icon { transform: scale(1.1); }

.nav-item.nav-active { color: var(--green-700); }
.nav-item.nav-active .nav-icon { 
  filter: drop-shadow(0 0 4px rgba(17,92,53,0.4));
}

.nav-item.nav-active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--green-600);
  border-radius: 0 0 4px 4px;
}

/* ─── Add Button FAB ───────────────────────────────── */
.fab-add {
  position: fixed;
  bottom: calc(var(--nav-height) + 70px);
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #fff;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: var(--shadow-gold), var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 90;
}

[data-dir="rtl"] .fab-add { right: auto; left: 16px; }

.fab-add:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(201,168,76,0.5), var(--shadow-lg);
}

@media (min-width: 1024px) { .fab-add { display: none; } }

/* ─── Empty State ──────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-hint { font-size: 0.82rem; margin-top: 6px; }

/* ─── Buttons ──────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--green-700);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover { background: var(--cream-200); }

.btn-share {
  width: 100%;
  padding: 12px;
  margin: 0;
  background: var(--green-50);
  border: 1px solid var(--green-200);
  border-radius: 0;
  color: var(--green-700);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-share:hover { background: var(--green-100); }

/* ─── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--cream-300); border-radius: 3px; }

/* ─── Print ────────────────────────────────────────── */
@media print {
  .bottom-nav, .fab-add, #floating-bar, .btn-remove,
  .btn-add-asset, .app-header .lang-switcher { display: none !important; }
  body { background: #fff; }
  .app-layout { grid-template-columns: 1fr !important; }
  .results-sidebar { display: block !important; position: static !important; height: auto !important; }
}

/* ─── Animations ───────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.3); }
  50%       { box-shadow: 0 0 0 8px rgba(201,168,76,0); }
}

.pulse-gold { animation: pulse-gold 2s infinite; }

/* ─── Utility ──────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green-700); }
.text-gold  { color: var(--gold-600); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.fw-700 { font-weight: 700; }
.text-center { text-align: center; }

.divider {
  height: 1px;
  background: var(--border-light);
  margin: 16px 0;
}

/* Desktop results inline */
@media (min-width: 1024px) {
  .mobile-results { display: none; }
}
