
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #050509;
  color: #f5f5f5;
}

/* ===== Shared utilities ===== */
.status {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
.status.error {
  color: #fca5a5;
}
.status.ok {
  color: #bbf7d0;
}

.error {
  color: #ff6b6b;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* ===== CLIENT PORTAL (client.html) ===== */

.shell-client {
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.shell-client h1 {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

.muted {
  color: #9ca3af;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.card {
  background: #101018;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  border: 1px solid #262636;
  margin-top: 1rem;
}

label {
  font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"] {
  width: 100%;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #374151;
  background: #030712;
  color: #e5e7eb;
  margin-top: 0.15rem;
  margin-bottom: 0.6rem;
}

button {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: none;
  background: #4f46e5;
  color: white;
  font-weight: 500;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.file-list {
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0 0;
}

/* each row = left side info + right side actions */
.file-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;      /* align buttons to the top so they don't zigzag */
  padding: 0.4rem 0;
  border-bottom: 1px solid #1f2933;
  gap: 0.75rem;
}

.file-main {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 0.85rem;
  color: #e5e7eb;
  word-break: break-all;
}

.file-meta {
  font-size: 0.75rem;
  color: #9ca3af;
  white-space: nowrap;
  margin-top: 0.1rem;
}

/* right-side buttons */
.file-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
  white-space: nowrap;
}

/* make View + Download visually matched pills */
.file-view-button,
.file-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* primary filled button */
.file-view-button {
  border: none;
  background: #4f46e5;
  color: #ffffff;
  cursor: pointer;
}

/* outline secondary button */
.file-download {
  text-decoration: none;
  border: 1px solid #4f46e5;
  background: transparent;
  color: #e5e7eb;
}

/* ===== ADMIN PORTAL (index.html) ===== */

.shell-admin {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.shell-admin h1 {
  font-size: 2.2rem;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: #a0a0b0;
  margin-bottom: 1.5rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

/* admin uses the same .card styles as client */

.card h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #a0a0ff;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 0.75rem;
}

th, td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid #262636;
  text-align: left;
  font-size: 0.92rem;
}

th {
  background: #151525;
  font-weight: 600;
}

.pill {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid #3a3a5a;
  color: #b0b0ff;
}

/* Health layout + status circles for admin */

.health-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.status-pill {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  border-width: 2px;
  border-style: solid;
  flex-shrink: 0;
}

.status-pill-pending {
  background: rgba(148, 163, 184, 0.12);
  border-color: #64748b;
  color: #e5e7eb;
}

.status-pill-ok {
  background: rgba(34, 197, 94, 0.12);
  border-color: #4ade80;
  color: #bbf7d0;
}

.status-pill-error {
  background: rgba(248, 113, 113, 0.12);
  border-color: #f97373;
  color: #fecaca;
}

.health-text-main {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.health-text-main.error {
  color: #fca5a5;
}

.health-text-main.ok {
  color: #bbf7d0;
}

.health-subrow {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* DB badge */
.db-label {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.7rem;
  color: #9ca3af;
}

.db-pill {
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  border: 1px solid;
  font-size: 0.75rem;
}

.db-pill-pending {
  border-color: #4b5563;
  background: rgba(75, 85, 99, 0.16);
  color: #e5e7eb;
}

.db-pill-ok {
  border-color: #22c55e;
  background: rgba(22, 163, 74, 0.14);
  color: #bbf7d0;
}

.db-pill-error {
  border-color: #f97373;
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
}

/* ---- Admin top bar ---- */
.top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 1rem;
}

/* ---- Modal / popup ---- */
.hidden {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85); /* dark blur overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal {
  background: #050509;
  border-radius: 16px;
  padding: 1.5rem 1.75rem 1.75rem;
  border: 1px solid #262636;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-header h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a0a0ff;
  margin: 0;
}

.modal-close {
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #e5e7eb;
}

.modal-body label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

.modal-body input[type="text"],
.modal-body input[type="email"],
.modal-body input[type="password"] {
  width: 100%;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #374151;
  background: #030712;
  color: #e5e7eb;
  margin-top: 0.15rem;
  margin-bottom: 0.3rem;
}

.modal-footer {
  margin-top: 0.9rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.btn-secondary {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #4b5563;
  background: #030712;
  color: #e5e7eb;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: #6b7280;
}

/* ------- CLIENT HEADER / PROFILE ------- */

.client-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.client-header h1 {
  margin-bottom: 0.25rem;
}

.profile-wrapper {
  position: relative;
}

.profile-button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #4f46e5;
  background: #030712;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.profile-button:hover {
  background: #111827;
}

.profile-menu {
  position: absolute;
  right: 0;
  margin-top: 0.5rem;
  min-width: 230px;
  background: #050509;
  border-radius: 12px;
  border: 1px solid #262636;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  padding: 0.35rem 0;
  z-index: 40;
}

.profile-menu-header {
  padding: 0.6rem 1rem 0.7rem;
  border-bottom: 1px solid #111827;
  font-size: 0.8rem;
  color: #9ca3af;
}

.profile-menu-header strong {
  display: block;
  color: #e5e7eb;
  font-size: 0.86rem;
  margin-bottom: 0.05rem;
}

.profile-code {
  font-size: 0.75rem;
  color: #9ca3af;
}

.profile-menu-item {
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 0.85rem;
  cursor: pointer;
}

.profile-menu-item:hover {
  background: #111827;
}

.profile-menu-divider {
  border-top: 1px solid #111827;
  margin: 0.35rem 0;
}

.profile-menu-item.logout {
  color: #fca5a5;
}

/* Utility used elsewhere too */
.hidden {
  display: none !important;
}

/* ===== ADMIN TOP MENU / HAMBURGER (index.html) ===== */

.top-menu {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #4b5563;
  background: #030712;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
  margin: 2px 0;
}

/* dropdown menu under the hamburger */
.hamburger-menu {
  position: absolute;
  right: 0;
  top: 2.4rem;
  min-width: 190px;
  background: #050509;
  border-radius: 12px;
  border: 1px solid #262636;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  padding: 0.35rem 0;
  z-index: 40;
}

.hamburger-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hamburger-menu li a {
  display: block;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  color: #e5e7eb;
  text-decoration: none;
}

.hamburger-menu li a:hover {
  background: #111827;
}



/* ===== File viewer overlay ===== */
.file-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
}

.file-viewer-modal {
  background: #020617;
  border-radius: 16px;
  border: 1px solid #1f2937;
  max-width: 900px;
  width: 90%;
  max-height: 80vh;
  padding: 1rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
}

.file-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.file-viewer-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.file-viewer-close {
  border: none;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
  background: #111827;
  color: #e5e7eb;
}

.file-viewer-body {
  overflow: auto;
  font-size: 0.85rem;
}

.file-viewer-pre {
  white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Simple table styling for CSV preview */
.file-viewer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.file-viewer-table th,
.file-viewer-table td {
  border: 1px solid #1f2937;
  padding: 0.3rem 0.4rem;
}

.file-viewer-table th {
  background: #020617;
  font-weight: 600;
}

/* ===== Admin tables: mobile friendliness ===== */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

/* Make big tables scroll horizontally instead of squishing */
.table-wrapper table {
  min-width: 640px; /* enough for all columns */
}

/* Filter row for jobs */
.jobs-filter-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .shell-admin {
    padding: 1.25rem 1rem 3rem;
  }

  .cards {
    grid-template-columns: 1fr; /* stack health + summary cards */
  }

  .jobs-filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .jobs-filter-row label {
    width: 100%;
  }

  .jobs-filter-row input {
    width: 100%;
  }

  table {
    font-size: 0.8rem;
  }

  th, td {
    padding: 0.45rem 0.4rem;
  }
}

/* =========================================================
   ORADM MARKETING HOME v2 (override)
========================================================= */

.orm-page {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3.5rem;
}

.orm-page::before {
  content: "";
  position: absolute;
  inset: -80px -40px auto -40px;
  height: 520px;
  background:
    radial-gradient(520px 320px at 15% 15%, rgba(79,70,229,0.35), transparent 60%),
    radial-gradient(520px 320px at 85% 10%, rgba(34,197,94,0.22), transparent 60%),
    radial-gradient(640px 420px at 50% 65%, rgba(56,189,248,0.12), transparent 65%);
  filter: blur(2px);
  pointer-events: none;
  z-index: 0;
}

.orm-page > * { position: relative; z-index: 1; }

.orm-topbar {
  background: rgba(5,5,9,0.70);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.orm-topbar-inner {
  max-width: 1120px;
}

.orm-brand-mark {
  box-shadow: 0 10px 30px rgba(79,70,229,0.25);
}

.orm-nav a {
  color: rgba(245,245,245,0.78);
}
.orm-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.orm-nav-toggle {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #f5f5f5;
  width: 42px;
  height: 38px;
  border-radius: 14px;
  padding: 0;
  display: none;
  place-items: center;
  cursor: pointer;
}

.orm-burger {
  width: 18px;
  height: 2px;
  background: #e5e7eb;
  border-radius: 999px;
  display: block;
  position: relative;
}
.orm-burger::before,
.orm-burger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: #e5e7eb;
  border-radius: 999px;
}
.orm-burger::before { top: -6px; }
.orm-burger::after  { top:  6px; }

.orm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(229,231,235,0.75);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.orm-hero {
  padding: 0.75rem 0 0.75rem;
}

.orm-hero-grid {
  gap: 1.25rem;
}

.orm-gradient-text {
  background: linear-gradient(135deg, rgba(79,70,229,1), rgba(34,197,94,1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.orm-lead {
  color: rgba(229,231,235,0.78);
  font-size: 1.03rem;
  line-height: 1.65;
  margin: 0.2rem 0 0;
  max-width: 56ch;
}

.orm-btn {
  box-shadow: 0 18px 45px rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.14);
}
.orm-btn-ghost {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
}

.orm-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 22px 70px rgba(0,0,0,0.55);
}

.orm-hero-card {
  padding: 1.25rem 1.25rem 1.15rem;
}

.orm-card-top h2 {
  margin: 0;
  font-size: 1.15rem;
}
.orm-subtitle {
  margin-top: 0.35rem;
  color: rgba(229,231,235,0.70);
}

.orm-checklist li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.15rem 0;
}

.orm-check {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: rgba(34,197,94,0.13);
  border: 1px solid rgba(34,197,94,0.32);
}
.orm-check::before {
  content: "?";
  display: grid;
  place-items: center;
  height: 100%;
  color: rgba(187,247,208,0.95);
  font-weight: 900;
  font-size: 0.9rem;
}

.orm-mini-cta {
  display: grid;
  gap: 0.75rem;
}

.orm-mini-title { font-weight: 800; }
.orm-mini-sub { color: rgba(229,231,235,0.70); font-size: 0.9rem; margin-top: 0.15rem; }

.orm-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.1rem 0 1rem;
  max-width: 520px;
}

.orm-metric {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  border-radius: 16px;
  padding: 0.75rem 0.85rem;
}

.orm-metric-num {
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
}

.orm-metric-label {
  color: rgba(229,231,235,0.70);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.orm-service h3,
.orm-step h3,
.orm-security h3 { margin-top: 0.35rem; }

.orm-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(229,231,235,0.92);
  margin-bottom: 0.65rem;
}
.orm-icon svg { width: 22px; height: 22px; }

.orm-step-num {
  font-weight: 900;
  letter-spacing: 0.12em;
  color: rgba(165,180,252,0.95);
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.orm-cta-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(135deg, rgba(79,70,229,0.16), rgba(34,197,94,0.10));
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 22px 70px rgba(0,0,0,0.55);
}

.orm-cta-side-card {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
  border-radius: 18px;
  padding: 1rem 1rem 0.9rem;
}

.orm-cta-side-title {
  font-weight: 900;
  margin-bottom: 0.4rem;
}

.orm-tiny {
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.orm-tiny code {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 0.15rem 0.35rem;
  border-radius: 10px;
  color: rgba(229,231,235,0.9);
}

@media (max-width: 900px) {
  .orm-metrics { grid-template-columns: 1fr; max-width: 420px; }
  .orm-cta-panel { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .orm-nav-toggle { display: grid; }
}

/* =========================================================
   HOME HEADER FIX (topbar/nav)
========================================================= */

.orm-topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(5,5,9,0.70);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
}

.orm-topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

/* Brand */
.orm-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #f5f5f5;
}

.orm-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, rgba(79,70,229,1), rgba(34,197,94,1));
  color: #07070b;
  box-shadow: 0 14px 40px rgba(79,70,229,0.25);
}

.orm-brand-name {
  font-weight: 800;
  letter-spacing: 0.2px;
}

/* Nav links */
.orm-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.orm-nav a {
  text-decoration: none;
  color: rgba(245,245,245,0.78);
  padding: 0.45rem 0.65rem;
  border-radius: 12px;
  line-height: 1;
}

.orm-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.orm-nav a:focus-visible,
.orm-nav-toggle:focus-visible {
  outline: 2px solid rgba(165,180,252,0.9);
  outline-offset: 2px;
}

/* CTA button (Client Portal) */
.orm-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.48rem 0.9rem;
  font-weight: 650;
  background: #4f46e5;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.14);
}

.orm-btn:hover {
  filter: brightness(1.05);
}

.orm-btn-small {
  padding: 0.42rem 0.78rem;
  font-size: 0.9rem;
}

/* Mobile dropdown menu */
@media (max-width: 760px) {
  .orm-nav-toggle { display: grid; }

  .orm-topbar-inner {
    position: relative;
  }

  .orm-nav {
    position: absolute;
    right: 1.25rem;
    top: calc(100% + 0.6rem);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    min-width: 240px;
    padding: 0.35rem;
    background: rgba(5,5,9,0.96);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.75);
  }

  .orm-nav.open {
    display: flex;
  }

  .orm-nav a {
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
  }

  .orm-nav .orm-btn {
    margin-top: 0.25rem;
    width: 100%;
  }
}

/* Fix the checklist icon if it shows as "?" */
.orm-check::before {
  content: "\2713"; /* ? */
}

