/* ============================================================
   INSYT DESIGN SYSTEM
   Single source of truth for all non-admin pages.
   Extracted from the landing page (views/public/index.ejs +
   public/css/landing-page.css).
   ============================================================ */

/* ─── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  /* Colour system */
  --color-black: #0A0A0A;
  --color-black-solid: #020202;
  --color-yellow: #FFD600;
  --color-yellow-soft: #f7d400;
  --color-white: #FFFFFF;

  /* Text */
  --color-muted: rgba(255, 255, 255, 0.72);
  --color-muted-strong: rgba(255, 255, 255, 0.9);
  --color-ink: rgba(255, 255, 255, 0.82);
  --color-ink-muted: rgba(255, 255, 255, 0.55);
  --color-body: rgba(255, 255, 255, 0.74);

  /* Surfaces (glassmorphism) */
  --color-surface: rgba(255, 255, 255, 0.06);
  --color-surface-strong: rgba(255, 255, 255, 0.12);
  --color-surface-soft: rgba(255, 255, 255, 0.05);
  --color-surface-subtle: rgba(255, 255, 255, 0.04);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.16);
  --color-border-soft: rgba(255, 255, 255, 0.06);

  /* System states */
  --color-danger: #ff5c5c;
  --color-success: #35d07f;
  --color-warning: #ffb020;
  --color-info: #4aa3ff;

  /* Typography */
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Radii */
  --radius: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-soft: 0 28px 80px rgba(0, 0, 0, 0.28);
  --shadow-raised: 0 20px 60px rgba(0, 0, 0, 0.22);
  --shadow-card: 0 24px 48px rgba(0, 0, 0, 0.18);
  --shadow-glow: 0 20px 40px rgba(255, 214, 0, 0.08);

  /* Spacing / layout */
  --max-width: 1240px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 56px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-fast: 0.22s ease;
  --transition-base: 0.3s ease;
}

/* ─── RESET ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--color-black);
  color: var(--color-white);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  line-height: 1.6;
}

/* ─── AMBIENT ANIMATED BACKGROUND ───────────────────────────── */
/* Moving stripe gradient between yellow and black */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 214, 0, 0.06) 0%, rgba(10, 10, 10, 1) 45%, rgba(255, 214, 0, 0.04) 100%);
  background-size: 100%;
  filter: blur(36px);
  mix-blend-mode: screen;
  animation: bgMove 14s linear infinite;
}

/* Soft yellow pulse glow */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 12% 18%, rgba(255, 214, 0, 0.14) 0%, transparent 18%),
    radial-gradient(circle at 86% 80%, rgba(255, 214, 0, 0.08) 0%, transparent 14%);
  filter: blur(56px);
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: pulse 3.8s ease-in-out infinite;
}

@keyframes bgMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse {
  0% { opacity: 0.42; transform: scale(1); }
  50% { opacity: 0.78; transform: scale(1.02); }
  100% { opacity: 0.42; transform: scale(1); }
}

/* ─── BASE ELEMENTS ─────────────────────────────────────────── */
img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font: inherit;
}

ul {
  list-style: none;
}

/* ─── LAYOUT ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(24px, 4vw, 48px);
}

/* ─── TYPOGRAPHY ────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.8rem;
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(2.6rem, 4vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-top: 6px;
  margin-bottom: 32px;
  background-image: linear-gradient(135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.98) 58%,
    rgba(255, 214, 0, 0.9) 62%,
    rgba(255, 214, 0, 0.5) 72%,
    rgba(255, 255, 255, 0.95) 90%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.08);
}

/* ─── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius-pill);
  padding: 16px 28px;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-family: var(--font-body);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary,
.cta-btn {
  background: linear-gradient(135deg, var(--color-yellow) 0%, var(--color-yellow-soft) 100%);
  color: var(--color-black);
}

.btn-primary:hover,
.cta-btn:hover {
  box-shadow: 0 12px 32px rgba(255, 214, 0, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--color-white);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.btn-pill {
  border-radius: var(--radius-pill);
}

/* ─── CARDS (glassmorphism) ────────────────────────────────── */
.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-raised);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 32px;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--color-border-strong);
}

.card-flat {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-raised);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* ─── FORMS ────────────────────────────────────────────────── */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-label,
label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-muted-strong);
  letter-spacing: 0.02em;
}

.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-yellow);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(255, 214, 0, 0.12);
}

.form-input::placeholder,
input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.6) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.6) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(1em + 2px),
    calc(100% - 15px) calc(1em + 2px);
  background-size: 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

select option {
  background: #141414;
  color: var(--color-white);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ─── BADGES / PILLS ───────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pill-accent {
  background: var(--color-yellow);
  color: var(--color-black);
}

.pill-soft {
  background: rgba(255, 214, 0, 0.14);
  color: var(--color-yellow);
  border: 1px solid rgba(255, 214, 0, 0.22);
}

.pill-neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  border: 1px solid var(--color-border);
}

/* Share / social controls (extracted from landing footer styles) */
.share-social {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.share-social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.82);
  transition: color 0.24s ease, transform 0.15s ease;
  padding: 8px 10px;
  border-radius: 10px;
}

.share-social a svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  fill: var(--color-yellow);
  color: var(--color-yellow);
  stroke: currentColor;
}

.share-social a:hover {
  color: var(--color-yellow);
  transform: translateY(-2px);
}

/* Bottom navigation SVG icons — scoped to bottom-nav only */
.bottom-nav a svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
  color: var(--color-muted);
  fill: currentColor;
}

.bottom-nav a:hover svg {
  color: var(--color-yellow);
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-success { background: rgba(53, 208, 127, 0.15); color: var(--color-success); }
.badge-danger  { background: rgba(255, 92, 92, 0.15); color: var(--color-danger); }
.badge-warning { background: rgba(255, 176, 32, 0.15); color: var(--color-warning); }
.badge-info    { background: rgba(74, 163, 255, 0.15); color: var(--color-info); }
.badge-muted   { background: rgba(255, 255, 255, 0.08); color: var(--color-muted); }

/* ─── MODALS ───────────────────────────────────────────────── */
.modal-overlay,
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
}

.modal-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  width: min(480px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(20, 20, 20, 0.92);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: modalPop 0.25s var(--ease-out);
}

@keyframes modalPop {
  from { transform: translate(-50%, -50%) scale(0.92); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 1.4rem;
  color: var(--color-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--color-yellow);
}

/* ─── TABLES ───────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.03);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

thead th {
  padding: 14px 18px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border-strong);
  white-space: nowrap;
}

tbody td {
  padding: 14px 18px;
  font-size: 0.92rem;
  color: var(--color-ink);
  border-bottom: 1px solid var(--color-border-soft);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ─── ALERTS ───────────────────────────────────────────────── */
.alert,
.flash {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  margin-bottom: 16px;
  border: 1px solid;
}

.alert-success,
.flash-success { background: rgba(53, 208, 127, 0.12); border-color: rgba(53, 208, 127, 0.4); color: var(--color-success); }
.alert-error,
.flash-error   { background: rgba(255, 92, 92, 0.12); border-color: rgba(255, 92, 92, 0.4); color: var(--color-danger); }
.alert-warning,
.flash-warning { background: rgba(255, 176, 32, 0.12); border-color: rgba(255, 176, 32, 0.4); color: var(--color-warning); }
.alert-info,
.flash-info    { background: rgba(74, 163, 255, 0.12); border-color: rgba(74, 163, 255, 0.4); color: var(--color-info); }

/* ─── EMPTY STATE ──────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state .empty-icon {
  font-size: 3rem;
  color: var(--color-muted);
  margin-bottom: 16px;
}

.empty-state h2,
.empty-state h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--color-muted);
  margin-bottom: 20px;
}

/* ─── MOTION ───────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ─── LOADER (shared) ──────────────────────────────────────── */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader-overlay.active,
.loader-overlay.show {
  display: flex;
}

.loader {
  width: 44px;
  height: 44px;
  border: 3px solid var(--color-border-strong);
  border-top-color: var(--color-yellow);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 860px) {
  .modal-box {
    width: 94vw;
  }

  .card {
    padding: 24px;
  }
}

@media (max-width: 560px) {
  html,
  body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }

  .container {
    padding-inline: 16px;
  }

  .btn {
    padding: 14px 22px;
  }
}

/* Partnership section (shared) */
.partnership-section {
  padding: 28px 0;
  background: transparent;
}
.partnership-section .partnership-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.partnership-section .partnership-heading {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-white);
  margin: 0;
}
.partnership-logos {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: nowrap;
  width: 100%;
}

.partnership-logo {
  width: 80px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 80px;
}

.partnership-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
}

/* Keep the partnership logos compact on smaller screens */
@media (max-width: 480px) {
  .partnership-logos {
    gap: 14px;
  }

  .partnership-logo {
    width: 65px;
    height: 32px;
    flex-basis: 65px;
  }
}
