/* MODULE-START: BASE (variables, reset, background) */
:root {
  --bg1: #0b1020;
  --bg2: #1a1038;
  --glass: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  --text: #eef2ff;
  --muted: #a5b4fc;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --info: #38bdf8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 10% -10%, #4c1d95 0%, transparent 60%),
    radial-gradient(800px 600px at 110% 10%, #0e7490 0%, transparent 55%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  background-attachment: fixed;
}
/* MODULE-END: BASE */

/* MODULE-START: LAYOUT AND HERO */
.app { max-width: 720px; margin: 0 auto; padding: 24px 16px 40px; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.brand { display: flex; gap: 14px; align-items: center; }
.logo {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  font-size: 30px; font-weight: 800;
  background: linear-gradient(135deg, #a855f7, #06b6d4);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.45);
}
h1 { font-size: clamp(1.25rem, 3vw, 1.7rem); margin: 0; letter-spacing: -0.02em; }
.tagline { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }
.install-btn {
  border: 0; cursor: pointer; padding: 12px 18px; border-radius: 999px; font-weight: 700;
  color: #0b1020; background: linear-gradient(135deg, #67e8f9, #c084fc);
  box-shadow: 0 8px 24px rgba(103, 232, 249, 0.3); transition: transform 0.15s;
}
.install-btn:hover { transform: translateY(-2px); }
.ios-hint { width: 100%; margin: 0; font-size: 0.85rem; color: var(--muted); }
/* MODULE-END: LAYOUT AND HERO */

/* MODULE-START: TABS */
.tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 6px;
  background: var(--glass); border: 1px solid var(--border); border-radius: 18px; margin-bottom: 16px;
}
.tab {
  border: 0; background: transparent; color: var(--muted); padding: 12px 6px; border-radius: 12px;
  cursor: pointer; font-weight: 600; font-size: 0.9rem; transition: all 0.2s;
}
.tab.active {
  color: #fff; background: linear-gradient(135deg, rgba(168, 85, 247, 0.55), rgba(6, 182, 212, 0.45));
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}
@media (max-width: 520px) { .tabs { grid-template-columns: repeat(2, 1fr); } }
/* MODULE-END: TABS */

/* MODULE-START: CARDS AND INPUTS */
.card {
  background: var(--glass); border: 1px solid var(--border); border-radius: 22px; padding: 22px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); margin-bottom: 16px;
}
.mode-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
input {
  font: inherit; font-size: 1.15rem; color: var(--text); width: 100%;
  background: rgba(2, 6, 23, 0.45); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; outline: none; transition: border 0.2s, box-shadow 0.2s;
}
input:focus { border-color: #a855f7; box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.25); }
/* MODULE-END: CARDS AND INPUTS */

/* MODULE-START: RESULT, BADGES AND CHARTS */
.result-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: rgba(255, 255, 255, 0.1); }
.badge.good { background: rgba(52, 211, 153, 0.18); color: var(--good); }
.badge.warn { background: rgba(251, 191, 36, 0.18); color: var(--warn); }
.badge.bad { background: rgba(248, 113, 113, 0.18); color: var(--bad); }
.badge.info { background: rgba(56, 189, 248, 0.18); color: var(--info); }
.ghost-btn { border: 1px solid var(--border); background: transparent; color: var(--text); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; }
.main-value {
  font-size: clamp(2.4rem, 8vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; margin: 14px 0 4px;
  background: linear-gradient(90deg, #67e8f9, #c084fc);
  -webkit-background-clip: text; background-clip: text; color: transparent; word-break: break-word;
}
.main-value.pop { animation: pop 0.35s ease; }
@keyframes pop { 0% { transform: scale(0.92); opacity: 0.5; } 100% { transform: scale(1); opacity: 1; } }
.sentence { color: var(--muted); margin: 0 0 18px; min-height: 1.4em; }
.viz { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: center; }
@media (max-width: 560px) { .viz { grid-template-columns: 1fr; } }
.chart { min-height: 140px; display: grid; place-items: center; }
.donut { width: 150px; height: 150px; }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 12; }
.ring-fg { fill: none; stroke: url(#ringGrad); stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray 0.6s ease; }
.donut-val { fill: #fff; font-size: 18px; font-weight: 800; text-anchor: middle; }
.donut-sub { fill: var(--muted); font-size: 10px; text-anchor: middle; }
.bars { width: 100%; max-width: 260px; }
.bar-old { fill: rgba(148, 163, 184, 0.5); }
.bar-new { fill: url(#ringGrad); }
.bar-val { fill: #e0e7ff; font-size: 12px; text-anchor: middle; }
.bar-lbl { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.review h2 { font-size: 0.95rem; margin: 0 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.review p { margin: 0; font-size: 1rem; line-height: 1.5; }
/* MODULE-END: RESULT, BADGES AND CHARTS */

/* MODULE-START: TOAST, FOOTER, ACCESSIBILITY */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: #111827; border: 1px solid var(--border); padding: 12px 18px; border-radius: 14px;
  opacity: 0; transition: all 0.25s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot { text-align: center; color: var(--muted); font-size: 0.8rem; margin-top: 24px; }
.foot p { margin: 4px 0; }
button:focus-visible { outline: 3px solid #67e8f9; outline-offset: 2px; }
/* MODULE-END: TOAST, FOOTER, ACCESSIBILITY */

/* MODULE-START: LANGUAGE, CURRENCY, EXAMPLE AND EXCEL ADDITIONS */
.hero-right { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.lang-wrap { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.lang-select, .currency-select {
  font: inherit; font-size: 1rem; color: var(--text); width: 100%;
  background: rgba(2, 6, 23, 0.45); border: 1px solid var(--border); border-radius: 14px; padding: 12px; outline: none;
}
.lang-select:focus, .currency-select:focus { border-color: #a855f7; box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.25); }
select option { background: #111827; color: #eef2ff; }
.example-card h2, .excel-card h2 {
  font-size: 0.95rem; margin: 0 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;
}
.example-card p { margin: 0; line-height: 1.7; font-size: 1rem; }
.hint { color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; line-height: 1.5; }
.fx-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 10px;
  background: rgba(2, 6, 23, 0.3);
}
.fx-label { font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; }
.fx { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; color: #67e8f9; word-break: break-all; direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .fx-row { flex-direction: row-reverse; }
[dir="rtl"] .fx-row > div { text-align: right; }
[dir="rtl"] .ios-hint, [dir="rtl"] .tagline { text-align: right; }
/* MODULE-END: LANGUAGE, CURRENCY, EXAMPLE AND EXCEL ADDITIONS */


