@import url('https://api.fontshare.com/v2/css?f[]=neue-machina@800,700,400&display=swap');

/* ── MKCTV Business Platform — Base CSS ─────────────────────────────────── */

:root {
  --bg:          #07090f;
  --bg-2:        #0d1120;
  --bg-3:        #121828;
  --surface:     rgba(255,255,255,0.04);
  --surface-2:   rgba(255,255,255,0.07);
  --border:      rgba(255,255,255,0.08);
  --border-2:    rgba(255,255,255,0.14);

  --text:        #f0f4ff;
  --text-2:      rgba(240,244,255,0.55);
  --text-3:      rgba(240,244,255,0.35);

  --blue:        #2ea8ff;
  --blue-dim:    rgba(46,168,255,0.15);
  --teal:        #30d158;
  --teal-dim:    rgba(48,209,88,0.12);
  --amber:       #f5a623;
  --red:         #ff453a;
  --red-dim:     rgba(255,69,58,0.12);

  --orb-1:       rgba(46,168,255,0.28);
  --orb-2:       rgba(80,200,120,0.22);

  --radius:      14px;
  --radius-lg:   20px;
  --radius-xl:   28px;

  --font-display: 'Neue Machina', 'Syne', sans-serif;
  --teal-accent:  #20d28c;
  --font-body:    'DM Sans', sans-serif;

  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:   0 8px 48px rgba(0,0,0,0.6);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Orb background — used on auth/admin pages, NOT landing ─────────────── */
.orb-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb-bg::before {
  content: '';
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orb-1) 0%, transparent 70%);
  top: -200px; right: -150px;
  filter: blur(60px);
}
.orb-bg::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orb-2) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  filter: blur(80px);
}

/* ── Noise overlay ──────────────────────────────────────────────────────── */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px;
}

/* ── Card / glass ───────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: #4db8ff; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255,69,58,0.2);
}
.btn-danger:hover { background: rgba(255,69,58,0.22); }

.btn-success {
  background: var(--teal-dim);
  color: var(--teal);
  border: 1px solid rgba(48,209,88,0.2);
}
.btn-success:hover { background: rgba(48,209,88,0.2); }

.btn-full { width: 100%; justify-content: center; }

/* ── Form elements ──────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; }

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

.field input,
.field textarea,
.field select {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-3); }
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(46,168,255,0.12);
}
.field select option { background: var(--bg-2); }
.field textarea { resize: vertical; min-height: 90px; }

/* ── Chips ──────────────────────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 50px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.chip-label input[type="checkbox"] { display: none; }
.chip-label:hover { border-color: var(--blue); color: var(--text); }
.chip-label.selected {
  background: var(--blue-dim);
  border-color: var(--blue);
  color: var(--blue);
}

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
}
.alert-error   { background: var(--red-dim);              border: 1px solid rgba(255,69,58,0.2);  color: var(--red);   }
.alert-warning { background: rgba(245,166,35,0.12);       border: 1px solid rgba(245,166,35,0.2); color: var(--amber); }
.alert-success { background: var(--teal-dim);             border: 1px solid rgba(48,209,88,0.2);  color: var(--teal);  }

/* ── Badge ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-pending  { background: rgba(245,166,35,0.14); color: var(--amber); }
.badge-approved { background: var(--teal-dim);       color: var(--teal);  }
.badge-rejected { background: var(--red-dim);        color: var(--red);   }

/* ── Divider ────────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── Muted ──────────────────────────────────────────────────────────────── */
.muted   { color: var(--text-2); }
.muted-2 { color: var(--text-3); }

/* ── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.anim-fade-up  { animation: fadeUp  0.5s ease both; }
.anim-fade-in  { animation: fadeIn  0.4s ease both; }
.anim-scale-in { animation: scaleIn 0.35s ease both; }

/* ── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

/* ════════════════════════════════════════════════════════════════════════════
   GLOBAL PAGE LOADER
   ════════════════════════════════════════════════════════════════════════════ */

.mkl-wrap {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Transition for fade-out */
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.65s ease;
}

/* Exit state — triggered by JS */
.mkl-wrap.mkl-exit {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Pitch black backdrop */
.mkl-backdrop {
  position: absolute;
  inset: 0;
  background: #040712;
}

/* Stage — centres the ring + logo */
.mkl-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* ── SVG ring ─────────────────────────────────────────────────────────────── */
.mkl-ring {
  width: 160px;
  height: 160px;
}

/* Outer segments — main rotation */
.mkl-arcs {
  transform-origin: 80px 80px;
  animation: mkl-spin 2.8s linear infinite;
}

/* Inner arcs — counter-rotate for that arc reactor layered feel */
.mkl-inner-arcs {
  transform-origin: 80px 80px;
  animation: mkl-spin-rev 4.2s linear infinite;
}

@keyframes mkl-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes mkl-spin-rev {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* Segments pulse in/out — 2 circles, offset delays */
.mkl-seg { animation: mkl-seg-pulse 2.8s ease-in-out infinite; }
.mkl-seg-1 { animation-delay: 0s;   }
.mkl-seg-3 { animation-delay: 1.4s; }

@keyframes mkl-seg-pulse {
  0%, 100% { opacity: 0.4; stroke-width: 2.5; }
  50%       { opacity: 1;   stroke-width: 3.5; }
}

/* Centre core dot — slow breathe */
.mkl-core {
  animation: mkl-core-pulse 1.8s ease-in-out infinite;
  transform-origin: 80px 80px;
}
@keyframes mkl-core-pulse {
  0%, 100% { r: 3;   opacity: 0.6; }
  50%       { r: 5.5; opacity: 1;   }
}

/* ── Logo centred inside the ring ────────────────────────────────────────── */
.mkl-logo-wrap {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Subtle entrance — fades in slightly after ring starts */
  animation: mkl-logo-in 0.7s ease 0.4s both;
}

.mkl-logo {
  width: 52px;
  height: auto;
  /* Blue glow matching the logo colour */
  filter: drop-shadow(0 0 12px rgba(46,168,255,0.5))
          drop-shadow(0 0 24px rgba(46,168,255,0.25));
  animation: mkl-logo-float 3s ease-in-out infinite;
}

/* Fallback text if logo image missing */
.mkl-fallback-text {
  font-family: 'Neue Machina', 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow: 0 0 16px rgba(46,168,255,0.6);
}

@keyframes mkl-logo-in {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1);    }
}

/* Very subtle float — makes it feel alive */
@keyframes mkl-logo-float {
  0%, 100% { transform: translateY(0px)   scale(1);    }
  50%       { transform: translateY(-3px) scale(1.04); }
}

/* ── Page content — hidden until loader exits ────────────────────────────── */
/* We DON'T hide the content — loader sits on top and fades out,
   so page transitions play naturally underneath as loader exits */

/* ════════════════════════════════════════════════════════════════════════════
   MOBILE TOUCH HOVER
   ════════════════════════════════════════════════════════════════════════════ */

/* Mirror hover styles for touch devices */
.lp-btn.touch-active               { transform: translateY(-2px); }
.lp-btn--primary.touch-active      { border-color: rgba(32,210,140,0.9); background: rgba(32,210,140,0.1); box-shadow: 0 0 28px rgba(32,210,140,0.15); }
.lp-btn--ghost.touch-active        { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.07); }
.lp-btn.touch-active .lp-btn-arrow { transform: translateX(4px); opacity: 1; }
.lp-btn.touch-active .lp-btn-shine { transform: translateX(120%); }

.sidebar-link.touch-active  { background: var(--surface-2); color: var(--text); }
.btn.touch-active           { opacity: 0.82; }
.chip-label.touch-active    { border-color: var(--blue); color: var(--text); }

/* ════════════════════════════════════════════════════════════════════════════
   COOKIE CONSENT POPUP
   ════════════════════════════════════════════════════════════════════════════ */

.mkc-wrap {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  /* Subtle backdrop when visible */
  background: rgba(0,0,0,0);
  transition: background 0.4s ease;
}

.mkc-wrap.mkc-visible {
  pointer-events: all;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Exit state */
.mkc-wrap.mkc-exiting {
  background: rgba(0,0,0,0);
  pointer-events: none;
  transition: background 0.5s ease 0.4s;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.mkc-card {
  position: relative;
  width: 340px;
  max-width: calc(100vw - 40px);
  padding: 28px 24px 24px;
  /* Glass dark surface */
  background: rgba(8, 12, 28, 0.82);
  border: 0.5px solid rgba(32,210,140,0.2);
  border-radius: 20px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.06),
    0 24px 64px rgba(0,0,0,0.6),
    0 0 40px rgba(32,210,140,0.06);

  /* Entrance — card slides up from below */
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition:
    opacity   0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  overflow: hidden; /* ripple canvas clips to card */
}

.mkc-wrap.mkc-visible .mkc-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Card exit */
.mkc-card.mkc-card-exit {
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

/* ── Ripple canvas — covers card, pointer-events off ─────────────────────── */
.mkc-ripple-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  border-radius: 20px;
}

/* ── Close button ────────────────────────────────────────────────────────── */
.mkc-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s ease;
}
.mkc-close svg { width: 13px; height: 13px; }
.mkc-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }

/* ── Icon ────────────────────────────────────────────────────────────────── */
.mkc-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(32,210,140,0.1);
  border: 0.5px solid rgba(32,210,140,0.25);
  display: flex; align-items: center; justify-content: center;
  color: #20d28c;
  margin-bottom: 14px;
}
.mkc-icon svg { width: 20px; height: 20px; }

/* ── Text ────────────────────────────────────────────────────────────────── */
.mkc-text { margin-bottom: 20px; }
.mkc-title {
  font-family: 'Neue Machina', 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 7px;
  letter-spacing: -0.01em;
}
.mkc-body {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
}

/* ── Action buttons ──────────────────────────────────────────────────────── */
.mkc-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  /* Perspective on parent so child rotateY looks 3D */
  perspective: 600px;
}

.mkc-btn {
  position: relative;
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Neue Machina', 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* preserve-3d so faces behave like a real card */
  transform-style: preserve-3d;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  /* Prevent overflow clipping the 3D effect */
  overflow: visible;
}
.mkc-btn:hover  { transform: translateY(-2px) scale(1.01); }
.mkc-btn:active { transform: translateY(0) scale(0.98); }

/* Front and back faces — real backface-visibility so rotateY works */
.mkc-btn-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: opacity 0.08s ease;
}

.mkc-btn-front {
  /* Front is visible by default */
  transform: rotateY(0deg);
}

.mkc-btn-back {
  /* Back starts rotated 180° behind */
  transform: rotateY(180deg);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Accept face colours */
.mkc-btn--accept .mkc-btn-front,
.mkc-btn--accept .mkc-btn-back {
  background: rgba(32,210,140,0.12);
  border: 0.5px solid rgba(32,210,140,0.4);
  color: #20d28c;
}
.mkc-btn--accept .mkc-btn-back {
  background: rgba(32,210,140,0.22);
  border-color: rgba(32,210,140,0.7);
  box-shadow: 0 0 24px rgba(32,210,140,0.25);
}

/* Decline face colours */
.mkc-btn--decline .mkc-btn-front,
.mkc-btn--decline .mkc-btn-back {
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(255,255,255,0.1);
  color: red;
}
.mkc-btn--decline .mkc-btn-back {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
  color: var(--text);
}

/* Hover border glow */
.mkc-btn--accept:hover .mkc-btn-front {
  border-color: rgba(32,210,140,0.7);
  box-shadow: 0 0 20px rgba(32,210,140,0.15);
}
.mkc-btn--decline:hover .mkc-btn-front {
  border-color: rgba(255,255,255,0.2);
  color: red;
}

/* Mobile touch states */
.mkc-btn--accept.touch-active  .mkc-btn-front { border-color: rgba(32,210,140,0.7); background: rgba(32,210,140,0.18); }
.mkc-btn--decline.touch-active .mkc-btn-front { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); }