html, body {
  height: 100%;
}

body {
  font-family: 'Assistant', sans-serif;
  background: #f5f7fa;
  margin: 0;
}

/* ---------- פריסת מסך מלא בסגנון Google Sheets — גלילה תחומה לטבלה, לא לכל הדף ---------- */

.app-body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.app-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 1rem;
}

.app-fixed-top {
  flex: 0 0 auto;
}

.tab-pane {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

.table-scroll-area {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: #fff;
  border-radius: .375rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.075);
}

.table-scroll-area table {
  margin-bottom: 0;
}

.table-scroll-area:fullscreen {
  width: 100%;
  height: 100%;
  padding: 8px;
}

#campaigns-clear-filters-btn.active-filter-btn {
  color: #1e3a8a;
  background: #e2e8f0;
  border-color: #94a3b8;
}

.st-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
}

.top-bar {
  background: #1565c0;
  color: #fff;
  padding: 14px 24px;
  font-size: 1.3rem;
}

.fw-800 { font-weight: 800; }

.home-title-btn { cursor: pointer; }

.screen-title {
  font-weight: 800;
  font-size: 1.3rem;
  color: #1a2332;
  margin: 4px 0 16px;
}

.home-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 28px;
}

.home-screen-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #495057;
}

.nav-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  max-width: 920px;
  width: 100%;
}

.nav-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 30px 16px;
  border: 1px solid #d0d7de;
  border-radius: 16px;
  background: #fff;
  color: #1a2332;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.nav-tile i {
  font-size: 2.1rem;
  color: #1565c0;
}

.nav-tile:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  border-color: #1565c0;
}

.nav-tile:disabled {
  cursor: not-allowed;
  color: #adb5bd;
  background: #f8f9fa;
}

.nav-tile:disabled i {
  color: #ced4da;
}

.nav-tile-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 700;
  background: #ffe08a;
  color: #7a5b00;
  border-radius: 20px;
  padding: 2px 8px;
}

.st-table th, .st-table td {
  white-space: nowrap;
}

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  color: #fff;
  font-size: .82rem;
}

/* ---------- login ---------- */

.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f1629 60%, #1a3a5c 100%);
  padding: 20px;
}
.login-box { width: 100%; max-width: 400px; }
.login-icon { font-size: 3rem; color: #3b82f6; text-align: center; }
.login-title { color: #fff; font-size: 1.8rem; font-weight: 800; text-align: center; margin: 4px 0 2px; }
.login-sub { color: rgba(255,255,255,0.5); font-size: 0.85rem; text-align: center; margin-bottom: 0; }

.otp-input {
  font-size: 2rem;
  font-family: monospace;
  letter-spacing: 0.5rem;
  text-align: center;
  padding: 14px 12px;
  color: #1e293b;
}

/* ---------- sortable/filterable table ---------- */

.st-th {
  white-space: nowrap;
  user-select: none;
  position: relative;
  background: #eef2f7;
}

.st-label {
  font-weight: 700;
}

.st-filter-btn {
  border: none;
  background: transparent;
  color: #6c8bc7;
  margin-right: 4px;
  cursor: pointer;
  padding: 3px 5px;
  font-size: 1.05rem;
  line-height: 1;
  border-radius: 4px;
  vertical-align: middle;
}

.st-th.st-filtered .st-filter-btn {
  color: #1e3a8a;
  background: #e2e8f0;
}

.st-header-action {
  border: none;
  background: transparent;
  color: #1565c0;
  margin-right: 4px;
  cursor: pointer;
  padding: 0 2px;
  font-size: 1rem;
}

.st-popover {
  position: absolute;
  z-index: 2000;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  width: 240px;
  padding: 8px;
}

.st-popover-sort {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
}

.st-popover-sort-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  text-align: right;
  padding: 5px 4px;
  border-radius: 4px;
  font-size: .85rem;
  cursor: pointer;
}

.st-popover-sort-btn:hover {
  background: #f0f4f8;
}

.st-popover-divider {
  margin: 6px 0;
  border: none;
  border-top: 1px solid #eee;
}

.st-popover-search {
  margin-bottom: 6px;
}

.st-popover-actions {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.st-popover-actions button {
  border: none;
  background: transparent;
  color: #1565c0;
  font-size: .85rem;
  cursor: pointer;
}

.st-popover-list {
  max-height: 220px;
  overflow-y: auto;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  padding: 4px 0;
}

.st-popover-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  font-size: .85rem;
  cursor: pointer;
}

.st-popover-footer {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
