/* ═══════════════════════════════════════════════════
   calzio.in — styles.css
   Premium glassmorphism calculator suite styles
════════════════════════════════════════════════════ */

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

/* ─── Root Variables ─── */
:root {
  --primary: #6C63FF;
  --primary-dark: #5A52D5;
  --primary-light: #8B84FF;
  --accent: #F59E0B;
  --dark: #0F0F1A;
  --card: #1A1A2E;
  --surface: #16213E;
  --border: rgba(108, 99, 255, 0.18);
  --border-hover: rgba(108, 99, 255, 0.4);
  --text: #E2E8F0;
  --text-muted: #94A3B8;
  --text-dim: #4B5563;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --sidebar-w: 280px;
  --topbar-h: 60px;
  --radius: 14px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

a { text-decoration: none; color: inherit; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--dark);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(108, 99, 255, 0.4); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ─── Light Theme ─── */
body.light-theme {
  --dark: #F2F0FF;
  --card: #FFFFFF;
  --surface: #ECEAFF;
  --border: rgba(108, 99, 255, 0.22);
  --border-hover: rgba(108, 99, 255, 0.45);
  --text: #1A1740;
  --text-muted: #4E4C6A;
  --text-dim: #8B89A8;
}

/* ── Body & page background ── */
body.light-theme { background: #F2F0FF; color: #1A1740; }

/* ── Sidebar ── */
body.light-theme .sidebar {
  background: rgba(255, 254, 255, 0.98);
  border-right: 1px solid rgba(108,99,255,0.15);
}
body.light-theme .sidebar-search-input {
  background: rgba(108,99,255,0.06);
  color: #1A1740;
  border-color: rgba(108,99,255,0.2);
}
body.light-theme .sidebar-search-input::placeholder { color: #8B89A8; }
body.light-theme .sidebar-footer p { color: #8B89A8 !important; }

/* ── Top Bar ── */
body.light-theme .topbar {
  background: rgba(242, 240, 255, 0.95);
  border-bottom: 1px solid rgba(108,99,255,0.15);
}
body.light-theme #breadcrumb { color: #4E4C6A; }
body.light-theme .topbar-menu-btn { color: #4E4C6A; }
body.light-theme .topbar-menu-btn:hover { background: rgba(108,99,255,0.1); color: #1A1740; }
body.light-theme .icon-btn { color: #4E4C6A; background: rgba(108,99,255,0.06); border-color: rgba(108,99,255,0.18); }
body.light-theme .icon-btn:hover { background: rgba(108,99,255,0.12); color: #1A1740; border-color: rgba(108,99,255,0.35); }

/* ── Nav items ── */
body.light-theme .nav-category-label { color: #8B89A8; }
body.light-theme .nav-item { color: #4E4C6A; }
body.light-theme .nav-item:hover { background: rgba(108,99,255,0.08); color: var(--primary); }
body.light-theme .nav-item.active { background: rgba(108,99,255,0.14); color: var(--primary); font-weight: 600; }

/* ── Cards ── */
body.light-theme .glass-card {
  background: #FFFFFF;
  border: 1px solid rgba(108,99,255,0.16);
  box-shadow: 0 2px 16px rgba(108,99,255,0.07);
}
body.light-theme .glass-card:hover {
  border-color: rgba(108,99,255,0.3);
  box-shadow: 0 4px 24px rgba(108,99,255,0.12);
}

/* ── Card & page titles ── */
body.light-theme .card-title { color: #1A1740; }
body.light-theme .calc-page-title { color: #1A1740; }
body.light-theme .calc-page-subtitle { color: #4E4C6A; }
body.light-theme .section-title { color: #1A1740; }
body.light-theme .calc-header-icon { background: rgba(108,99,255,0.1); }

/* ── Home page ── */
body.light-theme .hero-section { border-bottom: 1px solid rgba(108,99,255,0.15); }
body.light-theme .hero-title {
  background: linear-gradient(135deg, #1A1740 20%, var(--primary) 60%, #7C3AED 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
body.light-theme .hero-sub { color: #4E4C6A; }
body.light-theme .hero-search-input {
  background: rgba(255,255,255,0.9);
  color: #1A1740;
  border-color: rgba(108,99,255,0.25);
  box-shadow: 0 4px 20px rgba(108,99,255,0.1);
}
body.light-theme .hero-search-input::placeholder { color: #8B89A8; }
body.light-theme .search-results-panel { background: #fff; box-shadow: 0 8px 32px rgba(108,99,255,0.15); }
body.light-theme .search-result-item { color: #1A1740; border-bottom-color: rgba(108,99,255,0.08); }
body.light-theme .search-result-item:hover { background: rgba(108,99,255,0.08); color: var(--primary); }

/* ── Category & Calc Cards ── */
body.light-theme .category-card { background: #FFFFFF; border-color: rgba(108,99,255,0.14); box-shadow: 0 2px 12px rgba(108,99,255,0.06); }
body.light-theme .category-card-title { color: #1A1740; }
body.light-theme .category-card-desc { color: #4E4C6A; }
body.light-theme .calc-card { background: #FFFFFF; border-color: rgba(108,99,255,0.14); box-shadow: 0 2px 10px rgba(108,99,255,0.05); }
body.light-theme .calc-card:hover { background: rgba(108,99,255,0.05); box-shadow: 0 6px 24px rgba(108,99,255,0.14); }
body.light-theme .calc-card-name { color: #1A1740; }
body.light-theme .calc-card-desc { color: #6B698A; }

/* ── Inputs ── */
body.light-theme .calc-input {
  background: #F5F4FF;
  border: 1px solid rgba(108,99,255,0.22);
  color: #1A1740;
  color-scheme: light;
}
body.light-theme .calc-input:focus {
  background: #fff;
  border-color: rgba(108,99,255,0.55);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.1);
}
body.light-theme .calc-input option { background: #FFFFFF !important; color: #1E1B4B !important; }

/* ── Range slider track ── */
body.light-theme .range-slider { background: rgba(108,99,255,0.18); }

/* ── Toggle & Rate buttons ── */
body.light-theme .toggle-group { background: #EEF0FF; border-color: rgba(108,99,255,0.2); }
body.light-theme .toggle-btn { color: #4E4C6A; }
body.light-theme .toggle-btn:hover { color: var(--primary); }
body.light-theme .toggle-btn.active { background: var(--primary); color: #fff; }
body.light-theme .rate-btn { background: #F5F4FF; border-color: rgba(108,99,255,0.2); color: #4E4C6A; }
body.light-theme .rate-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(108,99,255,0.08); }
body.light-theme .rate-btn.active { background: rgba(108,99,255,0.18); border-color: var(--primary); color: var(--primary); }
body.light-theme .tab-btn { background: #F5F4FF; border-color: rgba(108,99,255,0.2); color: #4E4C6A; }
body.light-theme .tab-btn:hover { color: var(--primary); border-color: var(--primary); }
body.light-theme .tab-btn.active { background: rgba(108,99,255,0.18); border-color: var(--primary); color: var(--primary); }

/* ── Field labels ── */
body.light-theme .field-label { color: #4E4C6A; }

/* ── Results ── */
body.light-theme .results-placeholder { color: #6B698A; }
body.light-theme .result-item { border-bottom-color: rgba(108,99,255,0.1); }
body.light-theme .result-label { color: #4E4C6A; }
body.light-theme .result-value { color: #1A1740; }
body.light-theme .result-big { border-bottom-color: rgba(108,99,255,0.12); }
body.light-theme .result-big-label { color: #4E4C6A; }
body.light-theme .progress-labels { color: #6B698A; }

/* ── Amortization table ── */
body.light-theme .amort-table thead th { background: rgba(255,255,255,0.98); color: #4E4C6A; border-bottom-color: rgba(108,99,255,0.15); }
body.light-theme .amort-table tbody td { color: #1A1740; border-bottom-color: rgba(108,99,255,0.07); }
body.light-theme .amort-table tbody tr:hover { background: rgba(108,99,255,0.04); }

/* ── Swap button ── */
body.light-theme .swap-btn { background: rgba(108,99,255,0.08); border-color: rgba(108,99,255,0.2); color: var(--primary); }
body.light-theme .swap-btn:hover { background: rgba(108,99,255,0.15); }

/* ── Currency ── */
body.light-theme .currency-from-label { color: #4E4C6A; }
body.light-theme .currency-amount { color: #1A1740; }
body.light-theme .currency-to-label { color: var(--primary); }
body.light-theme .currency-rate-note { background: rgba(245,158,11,0.07); border-color: rgba(245,158,11,0.18); color: #6B698A; }

/* ── Age & Time units ── */
body.light-theme .age-unit { background: rgba(108,99,255,0.07); border-color: rgba(108,99,255,0.15); }
body.light-theme .age-number { color: #1A1740; }
body.light-theme .age-label { color: #4E4C6A; }

/* ── Data Storage ── */
body.light-theme .ds-row { border-bottom-color: rgba(108,99,255,0.08); }
body.light-theme .ds-row:hover { background: rgba(108,99,255,0.05); }
body.light-theme .ds-row.active { background: rgba(108,99,255,0.08); }
body.light-theme .ds-unit-label { color: #4E4C6A; }
body.light-theme .ds-value { color: #1A1740; }

/* ── Salary rows ── */
body.light-theme .sal-row { border-bottom-color: rgba(108,99,255,0.08); }
body.light-theme .sal-label { color: #4E4C6A; }
body.light-theme .sal-value { color: #1A1740; }

/* ── Info / success notes ── */
body.light-theme .info-note { background: rgba(108,99,255,0.06); border-color: rgba(108,99,255,0.14); color: #4E4C6A; }
body.light-theme .success-note { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.2); color: #059669; }

/* ════════════════════════════════
   SIDEBAR
════════════════════════════════ */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(10, 10, 20, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-logo {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo-link {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}
.sidebar-logo-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #9B59B6);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(108,99,255,0.35);
  flex-shrink: 0;
  transition: box-shadow 0.3s;
}
.sidebar-logo-link:hover .sidebar-logo-icon {
  box-shadow: 0 6px 24px rgba(108,99,255,0.55);
}
.sidebar-logo-text { font-size: 1.15rem; font-weight: 800; background: linear-gradient(90deg, #A78BFA, var(--primary-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.sidebar-logo-sub { font-size: 0.68rem; color: var(--text-dim); margin-top: -2px; }

.sidebar-search {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(108,99,255,0.08);
  flex-shrink: 0;
}
.sidebar-search-wrap { position: relative; }
.sidebar-search-icon {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  font-size: 0.85rem; color: var(--text-dim); pointer-events: none;
}
.sidebar-search-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(108,99,255,0.18);
  border-radius: 8px;
  padding: 0.55rem 0.75rem 0.55rem 2.2rem;
  color: var(--text);
  font-size: 0.8rem;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.sidebar-search-input::placeholder { color: var(--text-dim); }
.sidebar-search-input:focus { outline: none; border-color: rgba(108,99,255,0.45); background: rgba(108,99,255,0.06); }

.sidebar-nav {
  padding: 0.5rem 0.75rem 1rem;
  flex: 1;
  overflow-y: auto;
}

.nav-category-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.875rem 0.5rem 0.4rem;
  display: block;
}

.nav-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
  border: none; background: none;
  font-family: inherit;
  width: 100%; text-align: left;
  margin-bottom: 1px;
}
.nav-item:hover { background: rgba(108,99,255,0.1); color: #C4C0FF; }
.nav-item.active {
  background: rgba(108,99,255,0.18);
  color: var(--primary-light);
  font-weight: 600;
}
.nav-icon { width: 1.25rem; text-align: center; font-size: 0.9rem; flex-shrink: 0; }

.sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(108,99,255,0.08);
  text-align: center;
  flex-shrink: 0;
}

@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
}

/* ════════════════════════════════
   MAIN CONTENT
════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
@media (max-width: 1023px) { .main-content { margin-left: 0; } }

/* ─── Top Bar ─── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0 1.5rem;
  height: var(--topbar-h);
  background: rgba(10, 10, 20, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.topbar-menu-btn {
  display: none;
  padding: 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  border: none; background: none;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}
.topbar-menu-btn:hover { background: rgba(108,99,255,0.1); color: white; }
@media (max-width: 1023px) { .topbar-menu-btn { display: flex; } }

.topbar-brand {
  display: none;
  font-size: 1rem; font-weight: 800;
  background: linear-gradient(90deg, var(--primary-light), #A78BFA);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
@media (max-width: 1023px) { .topbar-brand { display: block; } }

#breadcrumb { font-size: 0.82rem; color: var(--text-muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.icon-btn {
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(108,99,255,0.05);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.2s;
}
.icon-btn:hover { background: rgba(108,99,255,0.12); border-color: var(--border-hover); color: white; }

/* ─── Page Content ─── */
.page-content { flex: 1; }

/* ─── Calc Page visibility ─── */
.calc-page { display: none; }
.calc-page.active {
  display: block;
  animation: pageIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════
   GLASS CARD
════════════════════════════════ */
.glass-card {
  background: rgba(22, 22, 44, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.glass-card:hover { border-color: rgba(108,99,255,0.3); }

/* ════════════════════════════════
   HOME PAGE
════════════════════════════════ */
.hero-section {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, rgba(108,99,255,0.22) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 85% 70%, rgba(245,158,11,0.07) 0%, transparent 50%),
    radial-gradient(ellipse 40% 40% at 10% 60%, rgba(108,99,255,0.07) 0%, transparent 50%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.3);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 1.25rem;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 30%, var(--primary-light) 65%, #A78BFA 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 0.75rem;
}
.hero-sub {
  font-size: 1rem; color: var(--text-muted);
  max-width: 480px; margin: 0 auto 2rem;
}
.hero-search-wrap {
  max-width: 440px; margin: 0 auto;
  position: relative;
}
.hero-search-icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  font-size: 1rem; color: var(--text-dim); pointer-events: none;
}
.hero-search-input {
  width: 100%;
  background: rgba(22,22,44,0.7);
  border: 1.5px solid rgba(108,99,255,0.3);
  border-radius: 14px;
  padding: 0.9rem 1.25rem 0.9rem 2.75rem;
  color: var(--text);
  font-size: 0.925rem;
  font-family: inherit;
  backdrop-filter: blur(20px);
  transition: all 0.2s;
  box-shadow: 0 4px 30px rgba(108,99,255,0.1);
}
.hero-search-input::placeholder { color: var(--text-dim); }
.hero-search-input:focus {
  outline: none; border-color: rgba(108,99,255,0.6);
  box-shadow: 0 4px 30px rgba(108,99,255,0.2), 0 0 0 4px rgba(108,99,255,0.08);
}

/* Search results dropdown */
.search-results-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: rgba(22,22,44,0.98);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  z-index: 200;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.search-result-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s;
  border: none; background: none;
  width: 100%; text-align: left;
  color: var(--text);
  font-family: inherit;
  border-bottom: 1px solid rgba(108,99,255,0.06);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(108,99,255,0.1); color: white; }

/* Home sections */
.home-padding { padding: 0 1.5rem 2rem; }
.section-title {
  font-size: 1.1rem; font-weight: 800; color: white;
  margin-bottom: 0.875rem;
  display: flex; align-items: center; gap: 0.5rem;
}

.category-cards-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem;
}
@media (max-width: 768px) { .category-cards-grid { grid-template-columns: 1fr; } }

.category-card {
  background: rgba(22,22,44,0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  cursor: pointer;
  transition: all 0.25s ease;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(108,99,255,0.18);
  border-color: rgba(108,99,255,0.35);
}
.category-card-fin:hover { border-color: rgba(108,99,255,0.4); }
.category-card-biz:hover { border-color: rgba(168,85,247,0.4); box-shadow: 0 12px 40px rgba(168,85,247,0.18); }
.category-card-util:hover { border-color: rgba(245,158,11,0.4); box-shadow: 0 12px 40px rgba(245,158,11,0.15); }

.category-card-emoji { font-size: 2rem; margin-bottom: 0.75rem; }
.category-card-title { font-size: 1rem; font-weight: 700; color: white; margin-bottom: 0.25rem; }
.category-card-desc { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.75rem; line-height: 1.5; }
.category-card-link { font-size: 0.78rem; font-weight: 600; }
.link-primary { color: var(--primary-light); }
.link-purple { color: #C084FC; }
.link-amber { color: var(--accent); }

/* Calculator grid on home */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 0.875rem;
}
.calc-card {
  background: rgba(22,22,44,0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.1rem;
  cursor: pointer;
  transition: all 0.22s ease;
}
.calc-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(108,99,255,0.2);
  background: rgba(108,99,255,0.08);
}
.calc-card-icon { font-size: 1.6rem; margin-bottom: 0.6rem; }
.calc-card-name { font-size: 0.875rem; font-weight: 700; color: white; margin-bottom: 0.25rem; line-height: 1.3; }
.calc-card-desc { font-size: 0.75rem; color: var(--text-dim); line-height: 1.5; }

/* ════════════════════════════════
   CALCULATOR PAGES
════════════════════════════════ */
.calc-header-bar {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.5rem 1.5rem 1.25rem;
}
.calc-header-icon {
  font-size: 1.75rem;
  width: 3.25rem; height: 3.25rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(108,99,255,0.12);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-shrink: 0;
}
.calc-page-title { font-size: 1.5rem; font-weight: 800; color: white; line-height: 1.2; }
.calc-page-subtitle { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.2rem; }

.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0 1.5rem 1.5rem;
}
@media (max-width: 768px) { .calc-layout { grid-template-columns: 1fr; } }

.extra-card {
  margin: 0 1.5rem 1.5rem;
}

/* ─── Card title ─── */
.card-title {
  font-size: 0.875rem; font-weight: 700; color: white;
  margin-bottom: 1.25rem;
  letter-spacing: 0.01em;
}

/* ─── Form Fields ─── */
.field-group { margin-bottom: 1.2rem; }
.field-label {
  display: block;
  font-size: 0.7rem; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
}
.calc-input {
  width: 100%;
  background: rgba(10,10,20,0.7);
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-size: 0.9rem; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
  color-scheme: dark;
}
.calc-input:focus {
  outline: none;
  border-color: rgba(108,99,255,0.55);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
}
.calc-input option { background: #FFFFFF !important; color: #1E1B4B !important; }

/* Range Sliders */
.range-slider {
  width: 100%; height: 4px;
  -webkit-appearance: none; appearance: none;
  background: rgba(108,99,255,0.25); border-radius: 2px;
  outline: none; cursor: pointer;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 0 8px rgba(108,99,255,0.5);
}

/* Button Groups */
.btn-group { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.rate-btn {
  flex: 1; min-width: 46px;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(108,99,255,0.05);
  border: 1px solid rgba(108,99,255,0.18);
  color: var(--text-muted);
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.18s;
  font-family: inherit;
}
.rate-btn:hover { border-color: var(--primary); color: var(--primary-light); }
.rate-btn.active { background: rgba(108,99,255,0.22); border-color: var(--primary); color: white; }

/* Toggle Group */
.toggle-group {
  display: flex;
  background: rgba(10,10,20,0.6);
  border: 1px solid rgba(108,99,255,0.18);
  border-radius: var(--radius-sm);
  padding: 3px; gap: 3px;
}
.toggle-btn {
  flex: 1; padding: 0.45rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all 0.18s;
  border: none; background: none;
  color: var(--text-muted); font-family: inherit;
}
.toggle-btn:hover { color: var(--primary-light); }
.toggle-btn.active { background: var(--primary); color: white; box-shadow: 0 2px 8px rgba(108,99,255,0.4); }

/* Tab Buttons */
.tab-btn {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.18s;
  border: 1px solid rgba(108,99,255,0.2);
  background: rgba(108,99,255,0.05);
  color: var(--text-muted); font-family: inherit; white-space: nowrap;
}
.tab-btn:hover { color: var(--primary-light); border-color: var(--primary); }
.tab-btn.active { background: rgba(108,99,255,0.2); border-color: var(--primary); color: white; }

/* ─── Results Placeholder ─── */
.results-placeholder {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 200px;
  color: var(--text-muted); text-align: center; gap: 0.65rem;
  font-size: 0.875rem;
}
.placeholder-icon { font-size: 2.5rem; opacity: 0.25; }

/* ─── Result Items ─── */
.result-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(108,99,255,0.08);
}
.result-item:last-child { border-bottom: none; }
.result-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
.result-value { font-size: 0.925rem; font-weight: 700; color: white; text-align: right; }
.result-value.primary { color: var(--primary-light); }
.result-value.success { color: var(--success); }
.result-value.danger { color: var(--danger); }
.result-value.accent { color: var(--accent); }

/* ─── Big Result ─── */
.result-big {
  text-align: center;
  padding: 1.25rem 0 1rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid rgba(108,99,255,0.12);
}
.result-big-label {
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); margin-bottom: 0.3rem;
}
.result-big-value {
  font-size: 2.1rem; font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, var(--primary-light), #A78BFA);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.result-big-value.success { background: linear-gradient(135deg, #10B981, #34D399); -webkit-background-clip: text; background-clip: text; }
.result-big-value.danger { background: linear-gradient(135deg, #EF4444, #F87171); -webkit-background-clip: text; background-clip: text; }
.result-big-value.accent { background: linear-gradient(135deg, #F59E0B, #FCD34D); -webkit-background-clip: text; background-clip: text; }

/* ─── Progress Bar ─── */
.progress-bar-wrap { display: flex; height: 7px; border-radius: 4px; overflow: hidden; margin-top: 0.5rem; }
.progress-bar-seg { transition: width 0.5s ease; }
.progress-labels { display: flex; gap: 1rem; margin-top: 0.4rem; font-size: 0.72rem; color: var(--text-muted); }

/* ─── Amortization Table ─── */
.amort-wrap { overflow-x: auto; max-height: 340px; overflow-y: auto; }
.amort-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.amort-table thead th {
  padding: 0.55rem 0.75rem; text-align: right;
  font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; font-size: 0.65rem; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border); position: sticky; top: 0;
  background: rgba(22,22,44,0.95);
}
.amort-table thead th:first-child { text-align: left; }
.amort-table tbody tr:hover { background: rgba(108,99,255,0.05); }
.amort-table tbody td {
  padding: 0.45rem 0.75rem; text-align: right;
  color: var(--text); border-bottom: 1px solid rgba(108,99,255,0.05);
}
.amort-table tbody td:first-child { text-align: left; font-weight: 600; color: var(--primary-light); }

/* ─── Swap Button ─── */
.swap-btn {
  background: rgba(108,99,255,0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 1.25rem;
  color: var(--primary-light); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
  display: flex; align-items: center; gap: 0.5rem; margin: 0 auto;
}
.swap-btn:hover { background: rgba(108,99,255,0.2); border-color: var(--primary); }

/* ─── Currency ─── */
.currency-big { text-align: center; padding: 1.5rem 0.75rem; }
.currency-from-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.currency-amount { font-size: 2.5rem; font-weight: 900; color: white; line-height: 1; margin-bottom: 0.25rem; }
.currency-to-label { font-size: 0.85rem; color: var(--primary-light); font-weight: 600; }
.currency-rate-note {
  margin-top: 1rem; padding: 0.6rem 0.75rem;
  background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.12);
  border-radius: 8px; font-size: 0.72rem; color: var(--text-dim);
}

/* ─── BMI Gauge ─── */
.bmi-gauge-wrap { margin: 0.75rem 0; }
.bmi-gauge {
  position: relative; height: 10px;
  background: linear-gradient(to right, #3B82F6 0%, #10B981 30%, #F59E0B 60%, #EF4444 100%);
  border-radius: 5px; overflow: visible;
}
.bmi-indicator {
  position: absolute; top: -5px;
  width: 20px; height: 20px;
  background: white; border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.4), 0 2px 8px rgba(0,0,0,0.3);
  transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.bmi-gauge-labels { display: flex; justify-content: space-between; font-size: 0.62rem; color: var(--text-dim); margin-top: 0.5rem; }

/* ─── Age Units ─── */
.age-units-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 1rem; }
.age-unit {
  text-align: center; padding: 0.75rem 0.5rem;
  background: rgba(108,99,255,0.08);
  border: 1px solid rgba(108,99,255,0.14);
  border-radius: var(--radius-sm);
}
.age-number { font-size: 1.8rem; font-weight: 900; color: white; line-height: 1; }
.age-label { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-top: 0.15rem; }

/* Time diff 2x2 grid */
.time-units-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; margin-bottom: 1rem; }

/* ─── Data Storage ─── */
.ds-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid rgba(108,99,255,0.07);
  border-radius: 6px; transition: background 0.15s;
}
.ds-row:hover { background: rgba(108,99,255,0.05); }
.ds-row.active { background: rgba(108,99,255,0.1); }
.ds-unit-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.ds-value { font-size: 0.82rem; color: white; font-weight: 700; font-family: 'Courier New', monospace; }

/* ─── Salary rows ─── */
.sal-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(108,99,255,0.07);
  font-size: 0.82rem;
}
.sal-row:last-child { border-bottom: none; }
.sal-label { color: var(--text-muted); }
.sal-value { font-weight: 700; color: white; }
.sal-value.deduction { color: var(--danger); }
.sal-value.total-val { color: var(--success); font-size: 1rem; }

/* ─── Info note ─── */
.info-note {
  padding: 0.65rem 0.875rem;
  background: rgba(108,99,255,0.06);
  border: 1px solid rgba(108,99,255,0.12);
  border-radius: var(--radius-sm);
  font-size: 0.75rem; color: var(--text-muted);
  margin-top: 0.75rem; line-height: 1.6;
}
.success-note {
  padding: 0.875rem 1rem;
  background: rgba(16,185,129,0.07);
  border: 1px solid rgba(16,185,129,0.18);
  border-radius: var(--radius-sm);
  font-size: 0.82rem; color: #34D399;
  margin-top: 0.875rem; text-align: center;
}

/* ─── Overlay ─── */
#overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
}

/* ─── Unit Converter Category Buttons ─── */
.unit-cat-btn {
  padding: 0.45rem 0.85rem;
  background: rgba(22,22,44,0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.unit-cat-btn:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}
.unit-cat-btn.active {
  background: rgba(108,99,255,0.22);
  border-color: var(--primary);
  color: white;
  font-weight: 600;
}
body.light-theme .unit-cat-btn {
  background: #F5F4FF;
  border-color: rgba(108,99,255,0.2);
  color: #4E4C6A;
}
body.light-theme .unit-cat-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(108,99,255,0.08);
}
body.light-theme .unit-cat-btn.active {
  background: rgba(108,99,255,0.18);
  border-color: var(--primary);
  color: var(--primary);
}

/* ─── Password Strength & Output ─── */
.pass-display-box {
  background: rgba(15,15,30,0.6);
  border: 1px dashed rgba(108,99,255,0.3);
  padding: 1rem;
  border-radius: var(--radius);
  font-family: 'Courier New', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-light);
  word-break: break-all;
  text-align: center;
  position: relative;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.light-theme .pass-display-box {
  background: #F8F9FA;
  border-color: rgba(108,99,255,0.3);
  color: var(--primary);
}

.strength-meter-wrap {
  margin-top: 1rem;
}
.strength-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.4rem;
}
body.light-theme .strength-bar-bg {
  background: rgba(0,0,0,0.06);
}
.strength-bar {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease, background 0.3s ease;
}

/* ─── Age & Date Units Grid ─── */
.age-units-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1rem;
}
.age-unit-card {
  background: rgba(108,99,255,0.05);
  border: 1px solid rgba(108,99,255,0.12);
  border-radius: var(--radius-sm);
  padding: 0.75rem; text-align: center;
}
.age-unit-val {
  font-size: 1.25rem; font-weight: 800; color: var(--primary-light);
}
.age-unit-lbl {
  font-size: 0.7rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase;
}
body.light-theme .age-unit-card {
  background: #F5F4FF;
  border-color: rgba(108,99,255,0.15);
}
body.light-theme .age-unit-val {
  color: var(--primary);
}

/* ─── Extra Hover Color ─── */
.category-card-extra:hover { border-color: rgba(16,185,129,0.4); box-shadow: 0 12px 40px rgba(16,185,129,0.15); }
.link-emerald { color: #34D399; }

/* ─── Share Button Styles ─── */
.share-btn-wrap {
  margin-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
  border-top: 1px dashed rgba(108, 99, 255, 0.15);
  padding-top: 0.875rem;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.15); /* Glassmorphic green theme */
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #34D399; /* Emerald green */
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}
.share-btn:hover {
  background: rgba(16, 185, 129, 0.26);
  border-color: rgba(16, 185, 129, 0.5);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}
.share-btn:active {
  transform: translateY(0);
}
.share-btn .share-icon {
  transition: transform 0.2s ease;
}
.share-btn:hover .share-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Light Theme overrides */
body.light-theme .share-btn {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #059669; /* Darker emerald for contrast */
}
body.light-theme .share-btn:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
}
body.light-theme .share-btn-wrap {
  border-top-color: rgba(108, 99, 255, 0.1);
}

/* ─── Floating Toast Notification ─── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(108, 99, 255, 0.3);
  color: var(--text);
  padding: 0.65rem 1.35rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
}
.toast-container.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast-icon {
  font-size: 1rem;
}
body.light-theme .toast-container {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(108, 99, 255, 0.22);
  box-shadow: 0 8px 22px rgba(108, 99, 255, 0.12);
  color: #1A1740;
}

/* ─── Premium Glassmorphic Flatpickr Theme ─── */
.flatpickr-calendar {
  background: rgba(20, 20, 35, 0.85) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(108, 99, 255, 0.25) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45), 0 0 15px rgba(108, 99, 255, 0.15) !important;
  border-radius: 16px !important;
  font-family: 'Inter', sans-serif !important;
  overflow: hidden;
  animation: fpFadeIn 0.25s ease-out;
}

@keyframes fpFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Light Theme Overrides */
body.light-theme .flatpickr-calendar {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(108, 99, 255, 0.22) !important;
  box-shadow: 0 15px 35px rgba(108, 99, 255, 0.12), 0 0 15px rgba(108, 99, 255, 0.05) !important;
}

/* Arrows */
.flatpickr-calendar.arrowTop:before, .flatpickr-calendar.arrowTop:after,
.flatpickr-calendar.arrowBottom:before, .flatpickr-calendar.arrowBottom:after {
  display: none !important; /* Remove generic arrows for a cleaner modern look */
}

/* Months Header */
.flatpickr-months {
  padding: 0.6rem 0.4rem 0.2rem 0.4rem;
  border-bottom: 1px solid rgba(108, 99, 255, 0.15);
}
body.light-theme .flatpickr-months {
  border-bottom: 1px solid rgba(108, 99, 255, 0.1);
}
.flatpickr-month {
  color: #FFFFFF !important;
}
body.light-theme .flatpickr-month {
  color: #1E1B4B !important;
}
.flatpickr-current-month {
  font-weight: 600 !important;
  font-size: 1.05rem !important;
}
.flatpickr-current-month .numInputWrapper span.arrowUp:after { border-bottom-color: rgba(255,255,255,0.7) !important; }
.flatpickr-current-month .numInputWrapper span.arrowDown:after { border-top-color: rgba(255,255,255,0.7) !important; }
body.light-theme .flatpickr-current-month .numInputWrapper span.arrowUp:after { border-bottom-color: rgba(30,27,75,0.7) !important; }
body.light-theme .flatpickr-current-month .numInputWrapper span.arrowDown:after { border-top-color: rgba(30,27,75,0.7) !important; }

.flatpickr-current-month input.cur-year {
  color: inherit !important;
  font-weight: inherit !important;
}
.flatpickr-current-month select.flatpickr-monthDropdown-months {
  color: #FFFFFF !important;
  font-weight: 600 !important;
  background: #1F1F35 !important;
  border: 1px solid rgba(108, 99, 255, 0.3) !important;
  border-radius: 6px !important;
  padding: 2px 6px !important;
  outline: none !important;
  cursor: pointer;
  font-family: inherit !important;
  color-scheme: dark;
}
.flatpickr-current-month select.flatpickr-monthDropdown-months:hover {
  background: rgba(108, 99, 255, 0.25) !important;
}
.flatpickr-current-month select.flatpickr-monthDropdown-months option {
  background: #FFFFFF !important;
  color: #1E1B4B !important;
}

body.light-theme .flatpickr-current-month select.flatpickr-monthDropdown-months {
  color: #1E1B4B !important;
  background: #FFFFFF !important;
  border: 1px solid rgba(108, 99, 255, 0.2) !important;
  color-scheme: light;
}
body.light-theme .flatpickr-current-month select.flatpickr-monthDropdown-months:hover {
  background: rgba(108, 99, 255, 0.08) !important;
}
body.light-theme .flatpickr-current-month select.flatpickr-monthDropdown-months option {
  background: #FFFFFF !important;
  color: #1E1B4B !important;
}

/* Prev/Next SVGs */
.flatpickr-prev-month, .flatpickr-next-month {
  fill: #FFFFFF !important;
  border-radius: 8px;
  padding: 4px !important;
  transition: all 0.2s ease;
}
body.light-theme .flatpickr-prev-month, body.light-theme .flatpickr-next-month {
  fill: #1E1B4B !important;
}
.flatpickr-prev-month:hover, .flatpickr-next-month:hover {
  background: rgba(108, 99, 255, 0.2) !important;
  fill: var(--primary-light) !important;
}

/* Weekdays */
span.flatpickr-weekday {
  color: rgba(255, 255, 255, 0.6) !important;
  font-weight: 600 !important;
}
body.light-theme span.flatpickr-weekday {
  color: rgba(30, 27, 75, 0.6) !important;
}

/* Days container */
.flatpickr-days {
  border: none !important;
  padding: 0.4rem;
}

/* Day cell */
.flatpickr-day {
  color: rgba(255, 255, 255, 0.95) !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
  border: 1px solid transparent !important;
  margin: 2px 0 !important;
  font-weight: 500;
}
body.light-theme .flatpickr-day {
  color: #1E1B4B !important;
}

/* Hover Day */
.flatpickr-day:hover, .flatpickr-day:focus {
  background: rgba(108, 99, 255, 0.25) !important;
  border-color: rgba(108, 99, 255, 0.4) !important;
  color: #FFFFFF !important;
}
body.light-theme .flatpickr-day:hover, body.light-theme .flatpickr-day:focus {
  background: rgba(108, 99, 255, 0.15) !important;
  border-color: rgba(108, 99, 255, 0.3) !important;
  color: #6C63FF !important;
}

/* Today Day */
.flatpickr-day.today {
  border-color: #F59E0B !important;
  color: #F59E0B !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}
body.light-theme .flatpickr-day.today {
  border-color: #D97706 !important;
  color: #D97706 !important;
}
.flatpickr-day.today:hover {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #FCD34D !important;
}

/* Selected Day */
.flatpickr-day.selected, .flatpickr-day.selected:hover {
  background: #6C63FF !important;
  border-color: #8B84FF !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 12px rgba(108, 99, 255, 0.5) !important;
  font-weight: 700;
}

/* Disabled Day */
.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover {
  color: rgba(255, 255, 255, 0.25) !important;
  background: transparent !important;
  border-color: transparent !important;
}
body.light-theme .flatpickr-day.flatpickr-disabled, body.light-theme .flatpickr-day.flatpickr-disabled:hover {
  color: rgba(0, 0, 0, 0.18) !important;
}

/* Not in current month Day */
.flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay {
  color: rgba(255, 255, 255, 0.35) !important;
}
body.light-theme .flatpickr-day.prevMonthDay, body.light-theme .flatpickr-day.nextMonthDay {
  color: rgba(0, 0, 0, 0.35) !important;
}

/* Time Picker Section */
.flatpickr-time {
  border-top: 1px solid rgba(108, 99, 255, 0.2) !important;
  background: rgba(10, 10, 20, 0.4) !important;
  border-radius: 0 0 16px 16px;
  color: white !important;
  padding: 0.4rem 0 !important;
}
body.light-theme .flatpickr-time {
  border-top: 1px solid rgba(108, 99, 255, 0.15) !important;
  background: rgba(0, 0, 0, 0.02) !important;
  color: #1E1B4B !important;
}

.flatpickr-time input {
  color: inherit !important;
  font-family: inherit !important;
  font-weight: 600 !important;
}
.flatpickr-time .flatpickr-time-separator {
  color: inherit !important;
}
.flatpickr-time .flatpickr-am-pm {
  color: inherit !important;
  font-weight: 600;
}
.flatpickr-time input:hover, .flatpickr-time .flatpickr-am-pm:hover {
  background: rgba(108, 99, 255, 0.15) !important;
}

/* ════════════════════════════════════════
   CALZIO LOGO ANIMATIONS
   ════════════════════════════════════════ */
@keyframes calzio-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes calzio-line-pulse {
  0%, 100% { stroke-dashoffset: 0; filter: drop-shadow(0 0 2px var(--primary-light)); opacity: 0.9; }
  50% { stroke-dashoffset: 10; filter: drop-shadow(0 0 12px var(--primary)); opacity: 1; }
}

@keyframes calzio-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; filter: drop-shadow(0 0 8px var(--primary-light)); }
}

.calzio-ring {
  transform-origin: center;
  animation: calzio-rotate 8s linear infinite;
}

.calzio-line {
  animation: calzio-line-pulse 3s ease-in-out infinite;
}

.calzio-dot-1 {
  transform-origin: 35px 35px;
  animation: calzio-dot-pulse 2s ease-in-out infinite;
}

.calzio-dot-2 {
  transform-origin: 65px 65px;
  animation: calzio-dot-pulse 2s ease-in-out infinite;
  animation-delay: 1s;
}

/* Sidebar Logo Adjustment */
.sidebar-logo-icon {
  background: linear-gradient(135deg, var(--primary), #9B59B6) !important;
  padding: 4px !important;
}

/* Go Back Button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(108, 99, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: auto;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  user-select: none;
}

.back-btn svg {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-btn:hover {
  background: rgba(108, 99, 255, 0.16);
  border-color: var(--primary);
  color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.15);
}

.back-btn:hover svg {
  transform: translateX(-3px);
}

body.light-theme .back-btn {
  background: rgba(108, 99, 255, 0.06);
  color: var(--text);
}

body.light-theme .back-btn:hover {
  background: rgba(108, 99, 255, 0.12);
  color: var(--primary);
  border-color: var(--primary);
}

/* ─── Mobile Round Floating Back Button ─── */
.topbar-back-btn {
  display: none;
}

@media (max-width: 1023px) {
  /* Show round back button floating at the bottom-center on mobile when inside a calculator */
  body.in-calc-page .topbar-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: rgba(108, 99, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(108, 99, 255, 0.35);
  }
  
  body.in-calc-page .topbar-back-btn svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
  }
  
  body.in-calc-page .topbar-back-btn:hover {
    background: var(--primary);
    transform: translateX(-50%) scale(1.1) translateY(-3px);
    box-shadow: 0 12px 36px rgba(108, 99, 255, 0.5);
  }
  
  body.in-calc-page .topbar-back-btn:hover svg {
    transform: translateX(-3px);
  }

  /* Light Theme overrides for mobile floating back button */
  body.light-theme.in-calc-page .topbar-back-btn {
    background: rgba(108, 99, 255, 0.9);
    border-color: rgba(108, 99, 255, 0.3);
    color: white;
    box-shadow: 0 8px 32px rgba(108, 99, 255, 0.25);
  }
  
  body.light-theme.in-calc-page .topbar-back-btn:hover {
    background: var(--primary);
    box-shadow: 0 12px 36px rgba(108, 99, 255, 0.4);
  }
  
  /* Hide the page-level back button inside the section headers on mobile */
  .calc-header-bar .back-btn {
    display: none !important;
  }
  
  /* Adjust page title/subtitle spacing slightly on smaller screens */
  .calc-header-bar {
    padding: 1.25rem 1.25rem 1rem;
  }
}


