﻿:root {
  /* Figma Clean Slate-Blue Theme */
  --c-bg: #f8fafc;             
  --c-surface: #ffffff;
  --c-text: #0f172a;           
  --c-text-light: #475569;     
  --c-muted: #94a3b8;          
  --c-border: #e2e8f0;
  --c-primary: #0f172a;        
  --c-primary-hover: #1e293b;
  --c-accent: #2563eb;         
  --c-accent-hover: #1d4ed8;
  --c-accent-soft: #eff6ff;
  --c-secondary: #3b82f6;
  --c-danger: #ef4444;
  --c-success: #22c55e;
  --c-warn: #f59e0b;

  /* Refined Shadows & Elevation */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1);
  --shadow-inner: inset 0 2px 4px rgba(15, 23, 42, 0.02);

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;

  /* Typography - Clean Sans */
  --font-display: 'Heebo', system-ui, sans-serif;
  --font-body: 'Heebo', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  font-size: 17px; /* Slightly larger for editorial feel */
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

/* Custom Selection */
::selection {
  background: var(--c-accent);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
a:hover { color: var(--c-accent); }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
}
.container-narrow { max-width: 800px; }
.text-center { text-align: center; }
.muted { color: var(--c-muted); }

/* ----- High-End Header ----- */
.site-header {
  background: rgba(252, 251, 249, 0.85); /* Matches warm bg */
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  position: sticky; top: 0; z-index: 1000;
  transition: all 0.4s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
  height: 64px;
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 84px;
  transition: height 0.4s ease;
}
.site-header.scrolled .header-row { height: 64px; }

.brand {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-weight: 800; font-size: 1.25rem; color: var(--c-primary);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: var(--c-primary);
  color: var(--c-accent); 
  border-radius: 50%; /* Circle for more premium feel */
  font-weight: 900; font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand:hover .brand-mark {
  transform: rotate(-10deg) scale(1.1);
}

.main-nav { display: flex; gap: 3rem; }
.main-nav a {
  color: var(--c-text-light); font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  padding: 0.5rem 0;
}
.main-nav a:hover { color: var(--c-primary); }
.main-nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--c-accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.main-nav a:hover::after {
  transform: scaleX(1); transform-origin: left;
}
.nav-toggle {
  display: none; background: none; border: 0;
  width: 40px; height: 40px; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 10px;
}
.nav-toggle span {
  display: block; height: 2px; background: var(--c-text); border-radius: 2px;
}

/* ----- Hero ----- */
.hero {
  background: linear-gradient(135deg, #ffffff 0%, #fcfbf9 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  padding: 8rem 0 7rem;
  text-align: center;
  position: relative;
}
.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  margin: 0 0 1.5rem;
  color: var(--c-primary);
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.hero-subtitle {
  font-size: 1.25rem; color: var(--c-text-light);
  margin: 0 auto 3.5rem; max-width: 680px;
  font-weight: 400;
  line-height: 1.8;
}

/* ----- Sections ----- */
.section { padding: 6rem 0; }
.section-alt { background: #fbf8f1; border-block: 1px solid rgba(15, 23, 42, 0.05); }
.section-title {
  font-size: 2.4rem; font-weight: 800;
  margin: 0 0 1rem;
  color: var(--c-primary);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.page-head {
  background: linear-gradient(135deg, #ffffff 0%, #fcfbf9 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  padding: 5rem 0;
}
.page-title {
  font-size: 3rem; font-weight: 800; margin: 0;
  color: var(--c-primary);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.page-subtitle { color: var(--c-text-light); margin: 1rem 0 0; font-size: 1.1rem; }

/* ----- Cards (Refined Luxury) ----- */
.card-grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.card {
  display: flex; flex-direction: column;
  background: var(--c-surface);
  padding: 2.5rem; border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(15, 23, 42, 0.12);
}
.card-icon {
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-size: 1.5rem;
  border-radius: 12px; margin-bottom: 1.5rem;
  transition: transform 0.4s ease;
}
.card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
}
.card-title {
  font-size: 1.3rem; font-weight: 700; margin: 0 0 0.75rem;
  color: var(--c-primary);
  font-family: var(--font-display);
}
.card-text {
  color: var(--c-text-light); margin: 0 0 1.5rem;
  font-size: 0.95rem; line-height: 1.7;
}
.card-link {
  color: var(--c-accent); font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: auto; /* Push to bottom */
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.card-link::after {
  content: '←'; /* Left arrow for RTL */
  transition: transform 0.3s ease;
}
.card:hover .card-link::after {
  transform: translateX(-5px);
}

/* ----- Buttons (Minimalist Premium) ----- */
.btn {
  display: inline-block; padding: 1rem 2.5rem;
  font-family: 'Heebo', system-ui, sans-serif; font-weight: 600; font-size: 0.9rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  border: none; border-radius: var(--radius-md);
  cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.btn-primary {
  background: var(--c-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--c-accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--c-primary);
  border: 1px solid var(--c-primary);
}
.btn-ghost:hover {
  background: var(--c-primary);
  color: #fff;
  transform: translateY(-2px);
}
.btn-block { display: block; width: 100%; }

/* ----- Layouts with sidebar / calc ----- */
.layout-with-sidebar {
  display: grid; gap: 3rem;
  grid-template-columns: 200px 1fr;
}
.sidebar-title {
  font-size: 0.85rem; color: var(--c-primary);
  text-transform: uppercase; letter-spacing: 0.1em;
  font-weight: 700;
}
.sidebar-list { list-style: none; padding: 0; margin: 1.1rem 0 0; }
.sidebar-list li a {
  display: block; padding: 0.8rem 1rem; border-radius: var(--radius-md);
  color: var(--c-text);
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
}
.sidebar-list li a:hover {
  background: #fafbfc;
  border-left-color: var(--c-accent);
  transform: translateX(-3px);
  color: var(--c-primary);
}
.sidebar-list li a.active {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(30, 58, 95, 0.2);
  border-left-color: transparent;
}

.layout-calc {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr 1.5fr;
  align-items: start;
}

@media (max-width: 1000px) {
  .layout-calc {
    grid-template-columns: 1fr;
  }
}

/* ----- Forms ----- */
.calc-form, .admin-form {
  background: var(--c-surface);
  padding: 2.25rem; border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-md);
}
.form-title {
  font-size: 1.4rem; margin: 0 0 1.75rem;
  font-weight: 700; color: var(--c-primary);
  letter-spacing: -0.2px; font-family: var(--font-display);
}
.form-subtitle {
  font-size: 1rem; margin: 2rem 0 1.1rem;
  font-weight: 700; color: var(--c-primary);
  letter-spacing: 0.2px;
}

.field { display: block; margin-bottom: 1.5rem; }
.field-group {
  display: flex; gap: 0.75rem; align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.field-group > .field { margin-bottom: 0; flex: 1; }
.field-currency-wrap {
  display: flex; gap: 0.5rem; align-items: center;
}
.field-currency-wrap input { flex: 1; }
.field-currency-wrap select { width: 85px; flex-shrink: 0; }

.field-label {
  display: block; font-size: 0.9rem; font-weight: 600;
  color: var(--c-primary); margin-bottom: 0.6rem;
  letter-spacing: 0.2px;
}
.field-suffix { color: var(--c-muted); font-weight: 500; font-size: 0.85rem; }
.field-help {
  display: block; font-size: 0.85rem; color: var(--c-text-light);
  margin-top: 0.5rem; line-height: 1.5;
}

input[type="text"], input[type="password"], input[type="number"],
input[type="email"], select, textarea {
  width: 100%; padding: 0.85rem 1rem;
  font-family: 'Heebo', system-ui, sans-serif; font-size: 0.95rem;
  background: var(--c-surface); color: var(--c-text);
  border: 1px solid var(--c-border); border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
  background-color: rgba(212, 165, 116, 0.01);
}
input:invalid:not(:focus) {
  border-color: var(--c-danger);
}

/* ----- Deposit Rows (Global) ----- */
.deposit-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 1.25rem;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}
.deposit-row .field {
  margin-bottom: 0;
}
.remove-row {
  color: var(--c-danger);
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.5rem;
  line-height: 1;
}

/* ----- Calc result ----- */
.calc-result {
  background: var(--c-surface);
  padding: 2.25rem; border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-md);
}
.result-summary { list-style: none; padding: 0; margin: 0; }
.result-summary li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.15rem 0; border-bottom: 1px solid var(--c-border);
  transition: background 0.2s ease;
}
.result-summary li:last-child { border-bottom: 0; }
.result-summary li.emph {
  background: var(--c-accent-soft);
  margin: 0 -2.25rem; padding: 1.35rem 2.25rem;
  border-bottom: 0;
  border-radius: 8px;
  border: 1px solid rgba(212, 165, 116, 0.25);
}
.result-summary li.emph + li { border-top: 1px solid var(--c-border); }
.result-label { color: var(--c-text-light); font-weight: 600; font-size: 0.95rem; }
.result-value { font-weight: 700; font-size: 1.15rem; color: var(--c-primary); font-family: var(--font-display); }
.emph .result-value { color: var(--c-accent); font-size: 1.7rem; letter-spacing: -0.3px; }

/* ----- Tables ----- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--c-border); box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; background: var(--c-surface); }
.data-table th {
  background: #fafbfc;
  color: var(--c-primary);
  font-weight: 700; font-size: 0.9rem; text-transform: uppercase;
  padding: 1.1rem 0.85rem; text-align: right; border-bottom: 1px solid var(--c-border);
  letter-spacing: 0.4px;
}
.data-table td {
  padding: 1rem 0.85rem; border-bottom: 1px solid var(--c-border);
  font-size: 0.95rem; color: var(--c-text);
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: #fafbfc; transition: background 0.15s ease; }

/* ----- Article body ----- */
.article-page { padding: 4rem 0 5rem; }
.article-title {
  font-size: 2.8rem; line-height: 1.15;
  margin: 1.25rem 0 0.9rem; font-weight: 800;
  letter-spacing: -0.5px; font-family: var(--font-display);
  color: var(--c-primary);
}
.article-summary {
  font-size: 1.15rem; color: var(--c-text-light);
  margin: 0 0 1.75rem; font-weight: 500; line-height: 1.8;
}
.article-meta { color: var(--c-muted); font-size: 0.9rem; margin-bottom: 2.5rem; font-weight: 500; }
.article-body { font-size: 1.05rem; line-height: 1.8; color: var(--c-text); }
.article-body h2 {
  font-size: 1.8rem; margin: 2.75rem 0 1.15rem;
  font-weight: 800; color: var(--c-primary);
  font-family: var(--font-display);
  letter-spacing: -0.3px;
}
.article-body h3 {
  font-size: 1.35rem; margin: 2.25rem 0 0.85rem;
  font-weight: 700; color: var(--c-primary-light);
  letter-spacing: -0.2px;
}
.article-body p { margin: 0 0 1.35rem; }
.article-body ul, .article-body ol { margin: 0 1.5rem 1.5rem; }
.article-body li { margin-bottom: 0.65rem; }
.article-body code {
  background: #fafbfc;
  padding: 0.25rem 0.6rem; border-radius: 4px;
  font-size: 0.9em;
  color: var(--c-primary);
  font-weight: 600;
  border: 1px solid var(--c-border);
}
.article-body pre {
  background: #1a1f3a;
  color: #e8eaf6; padding: 1.75rem;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  border: 1px solid rgba(212, 165, 116, 0.15);
}
.article-body blockquote {
  border-right: 4px solid var(--c-accent);
  background: var(--c-accent-soft);
  margin: 2rem 0; padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 165, 116, 0.25);
  font-style: italic;
  color: var(--c-text);
}
.article-footer { margin-top: 4.5rem; padding-top: 3rem; border-top: 1px solid var(--c-border); }

/* ----- Flash ----- */
.flash {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  border: 1px solid transparent;
  font-weight: 500;
}
.flash-error { background: #fde5e5; color: #991b1b; border-color: #f5a5a5; }
.flash-success { background: var(--c-accent-soft); color: #4a3a28; border-color: rgba(212, 165, 116, 0.3); }
.flash-info { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }

/* ----- Footer ----- */
.site-footer {
  background: var(--c-primary);
  color: #c4d4e8;
  padding: 3.5rem 0; margin-top: 6rem;
  border-top: 1px solid rgba(212, 165, 116, 0.15);
}
.footer-row { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; font-size: 0.9rem; }
.footer-disclaimer { color: #a3b2d1; max-width: 600px; line-height: 1.7; letter-spacing: 0.2px; }

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .layout-with-sidebar, .layout-calc { grid-template-columns: 1fr; }
  .main-nav {
    display: none; position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--c-surface); border-bottom: 1px solid var(--c-border);
    flex-direction: column; gap: 0; padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 0.95rem 0; border-bottom: 1px solid var(--c-border);
    color: var(--c-text); font-weight: 500;
  }
  .nav-toggle { display: flex; }
  .hero { padding: 5rem 0 4rem; }
  .section { padding: 4rem 0; }
}

 
 
/* ----- Modern Form Overrides (Figma Style) ----- */
.calc-form {
  background: var(--c-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.calc-result {
  background: var(--c-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-md);
}

.form-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 1.5rem;
  border-bottom: none;
}

.field-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--c-text-light);
  font-weight: 600;
  font-size: 0.95rem;
}

input[type="text"], input[type="number"], input[type="email"], select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background-color: var(--c-surface);
  outline: none;
  transition: all 0.2s ease;
  font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-primary {
  background-color: var(--c-accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--c-accent-hover);
  transform: translateY(-1px);
}

.data-table th {
  background: var(--c-bg);
  color: var(--c-text-light);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  padding: 1rem;
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--c-border);
  font-size: 0.95rem;
}

/* Restore basic elements stripped by Tailwind preflight for legacy pages */
h1, .h1 { font-size: 2.25rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; color: var(--c-primary); }
h2, .h2 { font-size: 1.875rem; font-weight: 700; line-height: 1.3; margin-bottom: 1rem; color: var(--c-primary); }
h3, .h3 { font-size: 1.5rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.75rem; color: var(--c-primary); }
h4, .h4 { font-size: 1.25rem; font-weight: 600; line-height: 1.5; margin-bottom: 0.5rem; color: var(--c-primary); }
p { margin-bottom: 1rem; }
ul { list-style-type: disc; margin-right: 1.5rem; margin-bottom: 1rem; }
ol { list-style-type: decimal; margin-right: 1.5rem; margin-bottom: 1rem; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { color: var(--c-accent-hover); }
button, input, optgroup, select, textarea { font-family: 'Heebo', system-ui, sans-serif; font-size: 100%; margin: 0; }

