@charset "UTF-8";

/* ==========================================================================
   נטובוקס (NettoBox) — Obsidian & Emerald Luxury FinTech Design System
   Inspired by Linear / Revolut / Mercury / Apple Finance
   100% Native Hebrew RTL Layout, Ultra-Dark Luxury, Glassmorphism & Micro-Glow
   ========================================================================== */

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

:root {
  --font-sans: 'Assistant', 'Rubik', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Rubik', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Palette Tokens */
  --bg-app: #06090c;
  --bg-surface: #0c1218;
  --bg-surface-elevated: #111a22;
  --bg-surface-subtle: #16222d;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-emerald: rgba(16, 185, 129, 0.35);

  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --emerald-600: #059669;
  --emerald-glow: 0 0 25px -4px rgba(16, 185, 129, 0.35);

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
}

html {
  direction: rtl;
  text-align: right;
  background-color: #06090c;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  direction: rtl;
  text-align: right;
  background-color: #06090c !important;
  color: #f1f5f9 !important;
  background-image: 
    radial-gradient(ellipse 90% 60% at 85% -15%, rgba(16, 185, 129, 0.13), transparent 70%),
    radial-gradient(ellipse 70% 50% at 10% 25%, rgba(6, 182, 212, 0.07), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(16, 185, 129, 0.05), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Israeli Number & Currency font formatting (LTR numbers in RTL context) */
.font-numeric {
  font-family: var(--font-mono);
  direction: ltr;
  display: inline-block;
  unicode-bidi: embed;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ========================================================
   Global Privacy Mode (Camouflage)
   ======================================================== */
body.privacy-active .privacy-sensitive {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
  transition: filter 0.25s ease;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

body.privacy-active .privacy-mask-text {
  display: inline !important;
}

body.privacy-active .privacy-real-text {
  display: none !important;
}

/* ========================================================
   Core Surface Overrides (Transforms Tailwind Cards into Obsidian Luxury)
   ======================================================== */
.bg-white {
  background-color: #0c1218 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f1f5f9;
}

.bg-slate-50 {
  background-color: #06090c !important;
  color: #f1f5f9;
}

.bg-slate-100 {
  background-color: #111a24 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
}

.bg-slate-200 {
  background-color: #172330 !important;
  color: #f8fafc !important;
}

.bg-slate-800 {
  background-color: #0e161f !important;
}

/* Border System */
.border-slate-100,
.border-slate-200,
.border-slate-300 {
  border-color: rgba(255, 255, 255, 0.07) !important;
}

/* Text Hierarchy */
.text-slate-900,
.text-slate-800 {
  color: #f8fafc !important;
}

.text-slate-700,
.text-slate-600 {
  color: #94a3b8 !important;
}

.text-slate-500,
.text-slate-400 {
  color: #64748b !important;
}

/* Card Shadows & Glass Surface */
.shadow-sm,
.shadow,
.shadow-md,
.shadow-lg,
.shadow-2xl {
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.06) !important;
}

/* ========================================================
   Header & Navigation
   ======================================================== */
header.sticky {
  background: rgba(7, 12, 16, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
}

/* Pill Navigation Tabs */
[data-tab-btn] {
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-tab-btn]:hover {
  background-color: rgba(255, 255, 255, 0.04) !important;
  color: #e2e8f0 !important;
}

/* Primary Brand Gradient Action Buttons */
.bg-blue-600 {
  background: linear-gradient(135deg, #059669 0%, #0d9488 100%) !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
  box-shadow: 0 0 20px -3px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  transition: all 0.2s ease;
}

.bg-blue-600:hover {
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%) !important;
  box-shadow: 0 0 28px -2px rgba(16, 185, 129, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-1px);
}

.bg-blue-50 {
  background-color: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
  color: #34d399 !important;
}

.text-blue-600,
.text-blue-700 {
  color: #34d399 !important;
}

.bg-blue-500 {
  background-color: #06b6d4 !important;
}

/* Emerald Accents */
.bg-emerald-50,
.bg-emerald-100 {
  background-color: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
}

.text-emerald-700,
.text-emerald-800 {
  color: #6ee7b7 !important;
}

.text-emerald-600 {
  color: #34d399 !important;
}

/* Amber / Wants Accents */
.bg-amber-50,
.bg-amber-100 {
  background-color: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
}

.text-amber-700,
.text-amber-800 {
  color: #fcd34d !important;
}

.text-amber-600 {
  color: #fbbf24 !important;
}

/* Rose / Needs / Alerts Accents */
.bg-rose-50,
.bg-rose-100 {
  background-color: rgba(244, 63, 94, 0.12) !important;
  border-color: rgba(244, 63, 94, 0.25) !important;
}

.text-rose-700,
.text-rose-800 {
  color: #fda4af !important;
}

.text-rose-600 {
  color: #f43f5e !important;
}

/* ========================================================
   Form Inputs, Selects & Interactive Elements
   ======================================================== */
input, select, textarea {
  background-color: #080d12 !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 0.625rem;
  transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
  outline: none !important;
}

select option {
  background-color: #0c1218;
  color: #f8fafc;
}

/* ========================================================
   Tables (Ledger, Allocations, Categories)
   ======================================================== */
table {
  color: #f1f5f9 !important;
}

thead tr, thead th {
  background-color: #090f15 !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  transition: background-color 0.15s ease;
}

tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.035) !important;
}

/* ========================================================
   Pacing Gauges & Thresholds (RTL aware)
   ======================================================== */
.pacing-bar-track {
  height: 8px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: visible;
}

.pacing-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.pacing-marker-time {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 3px;
  background-color: #34d399;
  box-shadow: 0 0 8px #34d399;
  border-radius: 2px;
  z-index: 10;
}

.pacing-marker-label {
  position: absolute;
  top: -22px;
  transform: translateX(50%);
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
}

/* Range Sliders for 50/30/20 */
input[type="range"] {
  accent-color: #10b981;
  background: rgba(255, 255, 255, 0.1) !important;
  height: 6px;
  border-radius: 9999px;
}

/* ========================================================
   Mobile Bottom Navigation & Ergonomics
   ======================================================== */
@media (max-width: 768px) {
  .app-container {
    padding-bottom: 80px; /* Space for sticky bottom bar */
  }

  .mobile-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(8, 13, 18, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 40;
    display: flex;
    justify-content: space-around;
    padding: 8px 12px;
  }

  .mobile-fab {
    position: fixed;
    bottom: 74px;
    left: 16px;
    z-index: 45;
  }
}

@media (min-width: 769px) {
  .mobile-nav-bar {
    display: none;
  }
}

/* Custom Luxury Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #06090c;
}
::-webkit-scrollbar-thumb {
  background: #172430;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
::-webkit-scrollbar-thumb:hover {
  background: #10b981;
}

/* ========================================================
   Modal Transitions & Luxury Glass Backdrop
   ======================================================== */
.modal-overlay {
  background: rgba(3, 6, 9, 0.8) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  animation: fadeIn 0.18s ease-out;
}

.modal-content {
  background: #0b1218 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 35px -5px rgba(16, 185, 129, 0.15) !important;
  animation: slideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ========================================================
   Markdown Guide Content Styling
   ======================================================== */
.guide-markdown h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.guide-markdown p {
  margin-bottom: 0.75rem;
  line-height: 1.7;
  color: #cbd5e1;
}

.guide-markdown ul, .guide-markdown ol {
  margin-bottom: 0.75rem;
  padding-right: 1.25rem;
  color: #cbd5e1;
}

.guide-markdown li {
  margin-bottom: 0.35rem;
  line-height: 1.6;
}

.guide-markdown table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
}

.guide-markdown th, .guide-markdown td {
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: right;
}

.guide-markdown th {
  background-color: #0f1822;
  font-weight: 600;
  color: #94a3b8;
}

/* ========================================================
   Tab Guide Banners Luxury Gradient
   ======================================================== */
[id^="tab-guide-"] {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.35) 0%, rgba(12, 18, 24, 0.95) 50%, rgba(16, 26, 35, 0.95) 100%) !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  box-shadow: 0 4px 25px -2px rgba(0, 0, 0, 0.6), 0 0 25px -5px rgba(16, 185, 129, 0.15) !important;
}

/* ========================================================
   Print Stylesheet (@media print) - Executive Summary Report
   ======================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt;
    direction: rtl;
    text-align: right;
  }

  /* Hide app navigation, buttons, FAB, toasts */
  header, nav, .mobile-nav-bar, .mobile-fab, .no-print, button, .btn-action {
    display: none !important;
  }

  .print-page-wrapper {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 20px !important;
  }

  .page-break {
    page-break-after: always;
  }

  .print-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    margin-bottom: 16px !important;
    padding: 16px !important;
    color: #000000 !important;
  }

  /* Unblur sensitive in print if user is intentionally printing report */
  .privacy-sensitive {
    filter: none !important;
  }
}
