/* ===== מתי תקשורת — Global Stylesheet ===== */
:root {
  --bg-0: #050714;
  --bg-1: #0a0e26;
  --bg-2: #11163a;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text: #f1f3ff;
  --text-dim: #aab0d2;
  --text-mute: #6a6f8e;
  --brand: #4cc9f0;
  --brand-2: #4361ee;
  --brand-3: #f0b840;
  --good: #2ecc71;
  --warn: #f7b733;
  --bad: #ff5a5f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0,0,0,.6);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Heebo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(76,201,240,.15), transparent 60%),
    radial-gradient(900px 500px at -10% 100%, rgba(67,97,238,.18), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 40%, #05060f 100%);
  color: var(--text);
  min-height: 100dvh;
  padding-bottom: 110px;
  overflow-x: hidden;
  letter-spacing: .1px;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* === Background Orbs === */
.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35; }
.orb-1 { width: 480px; height: 480px; background: radial-gradient(#4cc9f0, transparent 70%); top: -120px; right: -120px; animation: floatA 14s ease-in-out infinite alternate; }
.orb-2 { width: 360px; height: 360px; background: radial-gradient(#4361ee, transparent 70%); bottom: -100px; left: -80px; animation: floatB 18s ease-in-out infinite alternate; }
.orb-3 { width: 240px; height: 240px; background: radial-gradient(#f0b840, transparent 70%); top: 35%; left: 50%; transform: translateX(-50%); opacity: .18; animation: floatC 22s ease-in-out infinite alternate; }
@keyframes floatA { to { transform: translate(-30px, 40px) scale(1.05); } }
@keyframes floatB { to { transform: translate(40px, -30px) scale(1.08); } }
@keyframes floatC { to { transform: translate(-50%, 25px) scale(.95); } }

/* === Top bar === */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  background: rgba(8, 8, 23, 0.55);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--border-strong), 0 8px 30px -8px rgba(76,201,240,.4);
  background: rgba(255,255,255,.02);
  object-fit: cover;
}
.brand strong { font-weight: 800; display: block; font-size: 16px; }
.brand span { display: block; font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-dim);
}
.user-chip i { color: var(--brand); }

/* === Container === */
.container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

/* === Page title === */
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}
.page-head h1 {
  margin: 0;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #aab0d2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-head .sub { color: var(--text-dim); font-size: 14px; margin-top: 4px; }

/* === Cards === */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; top: 0; right: 0; left: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
}
.card h2 { margin: 0 0 14px; font-size: 18px; font-weight: 700; }
.card h3 { margin: 0 0 10px; font-size: 16px; font-weight: 700; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* === Stat tiles === */
.stat {
  position: relative;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(76,201,240,.10), rgba(67,97,238,.06));
  border: 1px solid var(--border);
  overflow: hidden;
}
.stat .ico {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(76,201,240,.15);
  color: var(--brand);
  font-size: 18px;
  margin-bottom: 12px;
}
.stat .v { font-size: 26px; font-weight: 800; line-height: 1; }
.stat .l { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.stat.tone-good .ico { background: rgba(46,204,113,.18); color: var(--good); }
.stat.tone-warn .ico { background: rgba(247,183,51,.18); color: var(--warn); }
.stat.tone-gold .ico { background: rgba(240,184,64,.18); color: var(--brand-3); }
.stat.tone-bad  .ico { background: rgba(255,90,95,.18); color: var(--bad); }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--panel-strong);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform .2s var(--spring), background .2s, border-color .2s, box-shadow .2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.10); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  border: 1px solid transparent;
  color: #fff;
  box-shadow: 0 10px 28px -10px rgba(76,201,240,.6);
}
.btn-primary:hover { box-shadow: 0 14px 32px -10px rgba(76,201,240,.8); }
.btn-gold {
  background: linear-gradient(135deg, #d4a017, #f0b840);
  color: #1a1300;
  border: 1px solid transparent;
}
.btn-danger { background: rgba(255,90,95,.18); border-color: rgba(255,90,95,.3); color: #ffadb0; }
.btn-success { background: rgba(46,204,113,.18); border-color: rgba(46,204,113,.3); color: #b8f5d0; }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-sm { padding: 7px 12px; font-size: 12px; }
.btn-block { width: 100%; }

/* === Forms === */
.form-row { display: grid; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 13px; color: var(--text-dim); font-weight: 500; }
.form-row .hint { font-size: 11px; color: var(--text-mute); }
.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  background: rgba(76,201,240,.06);
  box-shadow: 0 0 0 4px rgba(76,201,240,.12);
}
.textarea { resize: vertical; min-height: 90px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* === Tables === */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); }
table.tbl {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
table.tbl th, table.tbl td {
  padding: 14px 16px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
table.tbl th {
  background: rgba(255,255,255,.03);
  font-weight: 700;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tr:hover td { background: rgba(255,255,255,.02); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  font-size: 11px; font-weight: 600;
}
.badge-good { background: rgba(46,204,113,.16); color: #b8f5d0; border-color: rgba(46,204,113,.3); }
.badge-warn { background: rgba(247,183,51,.16); color: #ffe2a0; border-color: rgba(247,183,51,.3); }
.badge-bad  { background: rgba(255,90,95,.16); color: #ffadb0; border-color: rgba(255,90,95,.3); }
.badge-info { background: rgba(76,201,240,.16); color: #c4ecff; border-color: rgba(76,201,240,.3); }

/* === Bottom navigation === */
.bottom-nav {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  gap: 4px;
  padding: 8px;
  background: rgba(12, 14, 38, 0.85);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: 0 20px 60px -10px rgba(0,0,0,.7);
  max-width: calc(100% - 24px);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  transition: all .25s var(--spring);
  min-width: 56px;
}
.nav-item i { font-size: 16px; transition: transform .25s var(--spring); }
.nav-item:hover { color: var(--text); }
.nav-item:hover i { transform: translateY(-2px); }
.nav-item.active {
  background: rgba(76,201,240,.16);
  color: var(--brand);
}
.nav-item.nav-fab {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
  padding: 12px 18px;
  margin: -6px 4px;
  box-shadow: 0 12px 30px -8px rgba(76,201,240,.7);
  transform: translateY(-10px);
}
.nav-item.nav-fab i { font-size: 20px; }
.nav-item.nav-fab span { font-size: 10px; }

/* === Flash === */
.flash-stack { display: grid; gap: 10px; margin-bottom: 16px; }
.flash {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(76,201,240,.12);
  border: 1px solid rgba(76,201,240,.3);
  color: #d6f0ff;
  font-size: 14px;
}
.flash-success { background: rgba(46,204,113,.14); border-color: rgba(46,204,113,.3); color: #c0f5d8; }
.flash-error { background: rgba(255,90,95,.14); border-color: rgba(255,90,95,.3); color: #ffbabd; }
.flash-warn { background: rgba(247,183,51,.14); border-color: rgba(247,183,51,.3); color: #ffe7b0; }

/* === Footer === */
.page-footer {
  position: fixed;
  bottom: 6px;
  left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  color: var(--text-mute);
  opacity: .6;
  pointer-events: none;
  z-index: 30;
}

/* === Login === */
.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
  position: relative;
  z-index: 2;
}
.login-card {
  width: min(420px, 100%);
  padding: 36px 30px;
  text-align: center;
  background: rgba(12, 14, 38, 0.55);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
}
.login-card .logo-ring {
  width: 96px; height: 96px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.2), transparent 60%),
    linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 20px 50px -12px rgba(76,201,240,.7), inset 0 0 0 1px rgba(255,255,255,.2);
  position: relative;
  overflow: hidden;
}
.login-card .logo-ring img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.login-card .logo-ring i { font-size: 38px; color: #fff; }
.login-card h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.login-card p.sub { margin: 0 0 24px; color: var(--text-dim); font-size: 13px; }
.login-card .input { text-align: right; }

/* === Checklist === */
.checklist { display: grid; gap: 10px; margin-top: 12px; }
.checklist .item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  transition: all .2s;
}
.checklist .item:hover { background: rgba(255,255,255,.05); }
.checklist .item.done { background: rgba(46,204,113,.08); border-color: rgba(46,204,113,.25); }
.checklist .item.done .text { text-decoration: line-through; color: var(--text-dim); }
.checklist .check {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: transparent;
  display: grid; place-items: center;
  cursor: pointer;
  transition: all .25s var(--spring);
  flex-shrink: 0;
}
.checklist .check:hover { border-color: var(--brand); }
.checklist .item.done .check {
  background: var(--good);
  border-color: var(--good);
}
.checklist .check i { color: #fff; font-size: 12px; opacity: 0; transition: opacity .2s; }
.checklist .item.done .check i { opacity: 1; }
.checklist .text { flex: 1; font-size: 15px; }

/* === Filters bar === */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: end;
}
.filters .form-row { margin: 0; flex: 1; min-width: 140px; }

/* === Empty state === */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}
.empty i { font-size: 56px; opacity: .3; margin-bottom: 14px; display: block; }
.empty h3 { margin: 0 0 6px; color: var(--text); }

/* === Avatar === */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4cc9f0, #4361ee);
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.row-user { display: inline-flex; align-items: center; gap: 10px; }

/* === Project pill === */
.pill {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(76,201,240,.14);
  border: 1px solid rgba(76,201,240,.25);
  border-radius: 999px;
  font-size: 11px;
  color: #c4ecff;
  font-weight: 600;
}

/* === Clock display === */
.clock-display {
  text-align: center;
  padding: 30px 20px;
}
.clock-display .time {
  font-size: clamp(48px, 12vw, 80px);
  font-weight: 200;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #fff, var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.clock-display .date {
  color: var(--text-dim);
  margin-top: 8px;
  font-size: 16px;
}
.clock-display .status {
  margin-top: 24px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  font-size: 14px;
}
.clock-display .status.on { background: rgba(46,204,113,.16); border-color: rgba(46,204,113,.3); color: #b8f5d0; }
.clock-display .status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #999;
}
.clock-display .status.on .dot {
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(46,204,113,.25);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(46,204,113,.25); }
  50% { box-shadow: 0 0 0 10px rgba(46,204,113,0); }
}

.clock-actions { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.clock-actions .btn { padding: 16px 28px; font-size: 16px; }

/* === Section spacing === */
.section + .section { margin-top: 24px; }

/* === Toolbar === */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

/* === Modal === */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.show { display: flex; }
.modal {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(12, 14, 38, 0.95);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,.9);
  animation: modalIn .35s var(--spring);
}
@keyframes modalIn {
  from { transform: scale(.95) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal h2 { margin: 0 0 4px; font-size: 20px; }
.modal .modal-sub { color: var(--text-dim); font-size: 13px; margin-bottom: 18px; }
.modal-close {
  position: absolute; top: 18px; left: 18px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text-dim);
  cursor: pointer;
}

/* === Tabs === */
.tabs {
  display: flex; gap: 4px;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 18px;
  overflow-x: auto;
}
.tabs a {
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.tabs a.active { background: rgba(76,201,240,.16); color: var(--brand); }

/* === Mobile responsive === */
@media (max-width: 640px) {
  .topbar-inner { padding: 12px 14px; }
  .brand strong { font-size: 14px; }
  .brand span { font-size: 10px; }
  .brand img { width: 38px; height: 38px; }
  .container { padding: 18px 14px 32px; }
  .card { padding: 18px 16px; border-radius: 16px; }
  .user-chip span { display: none; }
  .nav-item { padding: 9px 11px; min-width: 50px; }
  .nav-item span { font-size: 10px; }
  .nav-item.nav-fab { padding: 11px 15px; }
  table.tbl th, table.tbl td { padding: 12px 12px; font-size: 13px; }
  .page-head h1 { font-size: 22px; }
  .login-card { padding: 28px 22px; border-radius: 22px; }
}

@media (max-width: 380px) {
  .user-chip { display: none; }
  .nav-item span { display: none; }
  .nav-item { padding: 12px; min-width: 0; }
  .nav-item.nav-fab span { display: inline; font-size: 9px; }
}

/* === Print === */
@media print {
  .topbar, .bottom-nav, .page-footer, .bg-orbs { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  .card { box-shadow: none; border-color: #ccc; background: #fff; color: #000; }
}

/* === Utility === */
.text-dim { color: var(--text-dim); }
.text-mute { color: var(--text-mute); }
.text-good { color: var(--good); }
.text-bad { color: var(--bad); }
.text-gold { color: var(--brand-3); }
.text-center { text-align: center; }
.text-end { text-align: end; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fs-sm { font-size: 12px; }
.fs-lg { font-size: 18px; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.full { width: 100%; }
.nowrap { white-space: nowrap; }
hr.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
