html.theme-no-transition,
html.theme-no-transition *,
html.theme-no-transition *::before,
html.theme-no-transition *::after {
  transition: none !important;
}

:root {
  color-scheme: dark;
  /* בורסה פון — פלטה מורחבת (כתום, שחור, גווני חום-שמנת) */
  --brand: #ffb84d;
  --brand-hover: #ffc970;
  --brand-light: #ffe0a8;
  --brand-mid: #e8a030;
  --brand-dark: #c97f12;
  --brand-deep: #6b4a14;
  --brand-dim: rgba(255, 184, 77, 0.14);
  --brand-glow: rgba(255, 184, 77, 0.32);
  --cream: #fff8eb;
  --cream-muted: #d4c4a8;
  --bg: #080808;
  --bg-warm: #100c06;
  --bg-elevated: #0e0c08;
  --surface: #141414;
  --surface-warm: #1a140c;
  --surface-raised: #1e1a14;
  --surface-highlight: #262018;
  --surface-hover: #2e281c;
  --surface-muted: #181612;
  --border: rgba(255, 255, 255, 0.09);
  --border-warm: rgba(255, 184, 77, 0.22);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --text-soft: #e8e8e8;
  --muted: #a3a3a3;
  --muted-soft: #7a7a7a;
  --accent: var(--brand);
  --accent-hover: var(--brand-hover);
  --accent-text: #0a0a0a;
  --danger: #ef4444;
  --danger-dim: rgba(239, 68, 68, 0.12);
  --success: #22c55e;
  --success-dim: rgba(34, 197, 94, 0.12);
  --warning: #f59e0b;
  --info: #38bdf8;
  --overlay: rgba(0, 0, 0, 0.65);
  --topbar-bg: rgba(10, 10, 10, 0.88);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --layout-max: 1280px;
  --layout-narrow: 760px;
  --section-py: clamp(4rem, 8vw, 6.5rem);
  --section-px: clamp(1.25rem, 4vw, 2.5rem);
  --font: "Heebo", "Segoe UI", Tahoma, Arial, sans-serif;
  --chart-up: #22c55e;
  --chart-down: #ef4444;
  --chart-extended: #94a3b8;
  --chart-grid: rgba(255, 255, 255, 0.16);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.2);
  --deco-line: rgba(255, 184, 77, 0.06);
  --sidebar-bg: var(--surface-warm);
  --chart-bg: var(--bg);
  --chart-loading-overlay: rgba(10, 10, 10, 0.72);
  --tab-inactive: var(--surface-muted);
  /* Theme — semantic aliases for overlays & readability */
  --bg-color: var(--bg);
  --text-color: var(--text);
  --overlay-opacity: 0.62;
  --theme-transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
  /* Hero — תמונה אחת + שכבת overlay כהה */
  --hero-img-brightness: 0.58;
  --hero-img-saturate: 0.72;
  --hero-img-opacity: 1;
  --hero-overlay-base: rgba(0, 0, 0, var(--overlay-opacity));
  --hero-overlay-dome: rgba(0, 0, 0, 0.16);
  --hero-overlay-vignette: rgba(0, 0, 0, 0.72);
  --hero-overlay-brand-glow: rgba(255, 184, 77, 0.1);
  --hero-overlay-blur: 4px;
  --hero-fade-mix: 48%;
  --hero-title-rest-color: #ffffff;
  --hero-subtitle-color: rgba(255, 255, 255, 0.94);
  --hero-call-label-color: rgba(255, 255, 255, 0.88);
  --hero-text-shadow: 0 3px 32px rgba(0, 0, 0, 0.65);
  --hero-subtitle-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
  --hero-btn-shadow: 0 10px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  /* About showcase — overlay על תמונה */
  --about-img-brightness: 0.68;
  --about-img-saturate: 0.88;
  --about-overlay-start: rgba(8, 8, 8, 0.08);
  --about-overlay-mid: rgba(8, 8, 8, 0.02);
  --about-overlay-end: rgba(8, 8, 8, 0.42);
  /* Header over hero */
  --header-hero-bg: rgba(8, 8, 8, 0.22);
  --header-hero-border: rgba(255, 255, 255, 0.14);
  --header-hero-text: rgba(255, 255, 255, 0.92);
  --header-hero-text-strong: #ffffff;
  --header-hero-text-muted: rgba(255, 255, 255, 0.82);
  --header-hero-toggle-border: rgba(255, 255, 255, 0.38);
  --header-hero-toggle-hover-bg: rgba(255, 255, 255, 0.1);
  --header-hero-menu-bar: #ffffff;
  --header-hero-inset-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="light"] {
  color-scheme: light;
  --brand: #ffb84d;
  --brand-hover: #ffc970;
  --brand-light: #ffe0a8;
  --brand-mid: #e8a030;
  --brand-dark: #c97f12;
  --brand-deep: #6b4a14;
  --brand-dim: rgba(255, 184, 77, 0.14);
  --brand-glow: rgba(255, 184, 77, 0.32);
  --cream: #1a1408;
  --cream-muted: #5c4a32;
  --bg: #f5f0e6;
  --bg-warm: #ebe4d6;
  --bg-elevated: #faf6ef;
  --surface: #ffffff;
  --surface-warm: #faf6ef;
  --surface-raised: #fffefb;
  --surface-highlight: #f0e8d8;
  --surface-hover: #e8dfd0;
  --surface-muted: #f3ede3;
  --border: rgba(26, 20, 8, 0.12);
  --border-warm: rgba(255, 184, 77, 0.35);
  --border-strong: rgba(26, 20, 8, 0.2);
  --text: #1a1408;
  --text-soft: #2d2618;
  --muted: #5c5348;
  --muted-soft: #7a7060;
  --accent-text: #1a1408;
  --danger-dim: rgba(220, 38, 38, 0.1);
  --success-dim: rgba(22, 163, 74, 0.1);
  --overlay: rgba(26, 20, 8, 0.45);
  --topbar-bg: rgba(255, 251, 245, 0.92);
  --chart-up: #16a34a;
  --chart-down: #dc2626;
  --chart-extended: #64748b;
  --chart-grid: rgba(26, 20, 8, 0.12);
  --shadow: 0 4px 24px rgba(26, 20, 8, 0.08);
  --shadow-soft: 0 2px 12px rgba(26, 20, 8, 0.06);
  --deco-line: rgba(255, 184, 77, 0.12);
  --sidebar-bg: var(--surface-warm);
  --chart-bg: var(--bg-elevated);
  --chart-loading-overlay: rgba(250, 246, 239, 0.92);
  --tab-inactive: var(--surface-muted);
  --overlay-opacity: 0.8;
  /* Hero — Light: overlay לבן + טקסט כהה */
  --hero-img-brightness: 1;
  --hero-img-saturate: 0.92;
  --hero-img-opacity: 1;
  --hero-overlay-base: rgba(255, 255, 255, var(--overlay-opacity));
  --hero-overlay-dome: rgba(255, 255, 255, 0.32);
  --hero-overlay-vignette: rgba(255, 255, 255, 0.35);
  --hero-overlay-brand-glow: rgba(255, 184, 77, 0.08);
  --hero-overlay-blur: 0px;
  --hero-fade-mix: 58%;
  --hero-title-rest-color: #333333;
  --hero-subtitle-color: #333333;
  --hero-call-label-color: #444444;
  --hero-text-shadow: none;
  --hero-subtitle-shadow: none;
  --hero-btn-shadow: 0 10px 28px rgba(26, 20, 8, 0.18), 0 0 0 1px rgba(26, 20, 8, 0.08);
  --about-img-brightness: 0.95;
  --about-img-saturate: 0.9;
  --about-overlay-start: rgba(255, 255, 255, 0.55);
  --about-overlay-mid: rgba(255, 255, 255, 0.25);
  --about-overlay-end: rgba(255, 255, 255, 0.72);
  --header-hero-bg: rgba(255, 255, 255, 0.72);
  --header-hero-border: rgba(26, 20, 8, 0.1);
  --header-hero-text: rgba(26, 20, 8, 0.86);
  --header-hero-text-strong: #1a1408;
  --header-hero-text-muted: rgba(26, 20, 8, 0.68);
  --header-hero-toggle-border: rgba(26, 20, 8, 0.22);
  --header-hero-toggle-hover-bg: rgba(26, 20, 8, 0.06);
  --header-hero-menu-bar: #1a1408;
  --header-hero-inset-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.35);
}

img.logo-brand {
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  outline: none;
  box-shadow: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  min-height: 100vh;
  transition: var(--theme-transition);
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); text-decoration: underline; }

/* דף נחיתה — עיצוב ב-landing.css */

/* כפתורים */
.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--accent-text);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: var(--accent-text);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: 600;
}

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

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.875rem; }

/* ניהול */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.brand-logo { border-radius: 50%; }
.user-bar { display: flex; gap: 1rem; align-items: center; }
.user-phone { color: var(--muted); direction: ltr; }
.link-muted { color: var(--muted); font-size: 0.9rem; }

.login-card, .dashboard {
  max-width: 640px;
  margin: 2rem auto;
  padding: 0 1.5rem 3rem;
}

.login-card h1 { margin-top: 0; }

.phone-form label { display: block; margin-bottom: 0.35rem; }
.phone-form input {
  width: 100%;
  padding: 0.75rem;
  font-size: 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  margin-bottom: 1rem;
  direction: ltr;
  text-align: left;
}

.form-error {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 0.85rem 1rem;
  border-radius: 8px;
  line-height: 1.55;
}
.back-link { display: inline-block; margin-top: 1.5rem; color: var(--muted); }

.tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tab {
  flex: 1;
  min-width: 7rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
}

.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.panel { display: none; }
.panel.active { display: block; }

.panel h2 { margin-top: 0; }
.hint { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }

.item-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.item-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.item-list .ticker {
  font-weight: 600;
  direction: ltr;
  font-family: ui-monospace, monospace;
}

.inline-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.inline-form input {
  flex: 1;
  min-width: 8rem;
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  direction: ltr;
}

.stack-form .field-row {
  margin-bottom: 1rem;
}

.stack-form label { display: block; margin-bottom: 0.35rem; font-size: 0.9rem; }

.stack-form input,
.stack-form select {
  width: 100%;
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.stack-form input[type="text"] { direction: ltr; }

.checkbox-row label { display: flex; align-items: center; gap: 0.5rem; }

.card-list { margin-bottom: 1.5rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.card-title { font-weight: 600; margin: 0; direction: ltr; font-family: ui-monospace, monospace; }
.card-meta { color: var(--muted); font-size: 0.85rem; margin: 0.35rem 0 0; }

.card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.edit-inline {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  align-items: center;
}

.edit-inline input {
  width: 6rem;
  padding: 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  direction: ltr;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* מודאל */
.modal {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 22rem;
  width: 100%;
  border: 1px solid var(--border);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

/* טוסט */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  z-index: 200;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
