/* ==========================================================================
   OPEX LINK (U) LTD - TWO-COLOR INSTITUTIONAL FINTECH DESIGN SYSTEM
   Supports: Dark Mode (Default) & Light Mode (Swiss / Nordic Clean)
   Color 1: Forest & Emerald Green (#059669 / #10B981)
   Color 2: Deep Midnight Navy & Slate (#0B1320 / #0F172A) in Dark Mode
            Crisp Platinum & Clean White (#F8FAFC / #FFFFFF) in Light Mode
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root, html.light {
  /* Default Light Mode - Swiss & Nordic High-Trust Banking Aesthetic */
  --brand-green: #059669;
  --brand-green-dark: #047857;
  --brand-green-light: #10b981;
  --brand-green-subtle: rgba(5, 150, 105, 0.08);

  --brand-navy: #f8fafc;
  --brand-navy-dark: #f1f5f9;
  --brand-surface: #ffffff;
  --brand-surface-elevated: #f1f5f9;
  --brand-border: #e2e8f0;
  --brand-border-hover: rgba(5, 150, 105, 0.45);

  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-input: #ffffff;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(15, 23, 42, 0.03);

  --nav-bg: rgba(255, 255, 255, 0.94);
  --nav-border: #e2e8f0;
}

html.dark {
  /* Dark Mode */
  --brand-green: #10b981;          /* Core Accent Emerald Green */
  --brand-green-dark: #059669;     /* Deep Banking Forest Green */
  --brand-green-light: #34d399;    /* Crisp Emerald Glow */
  --brand-green-subtle: rgba(16, 185, 129, 0.12);

  --brand-navy: #0b1320;           /* Deep Midnight Navy Background */
  --brand-navy-dark: #070d17;      /* Base Dark */
  --brand-surface: #0f172a;        /* Card & Section Surface */
  --brand-surface-elevated: #1e293b; /* Hover & Input Surface */
  --brand-border: #1e293b;         /* Subtle Clean Border */
  --brand-border-hover: rgba(16, 185, 129, 0.45);

  --bg-page: #0b1320;
  --bg-surface: #0f172a;
  --bg-elevated: #1e293b;
  --bg-input: rgba(15, 23, 42, 0.85);

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --glass-bg: rgba(15, 23, 42, 0.88);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.55);

  --nav-bg: rgba(11, 19, 32, 0.92);
  --nav-border: rgba(255, 255, 255, 0.07);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.2s ease;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-secondary);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
}

/* Subtle Three.js Background Canvas */
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.22;
}

html.light #three-canvas {
  opacity: 0.12;
}

.ambient-glow-1,
.ambient-glow-2,
.ambient-glow-3 {
  display: none !important;
}

/* ==========================================================================
   CLEAN PROFESSIONAL CARDS & PANELS
   ========================================================================== */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 16px;
}

.glass-panel:hover {
  border-color: var(--brand-border-hover);
}

.glass-panel-subtle {
  background: var(--bg-elevated);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.glass-nav {
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--nav-border);
  transition: all 0.25s ease;
}

.glass-nav.scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

html.dark .glass-nav.scrolled {
  background: rgba(7, 13, 23, 0.98);
  border-bottom-color: rgba(16, 185, 129, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

html.light .glass-nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: #cbd5e1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.glass-input {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.glass-input:focus {
  outline: none;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
  background: var(--bg-surface);
}

/* ==========================================================================
   CARDS & ELEVATION
   ========================================================================== */
.tilt-card {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.tilt-card:hover {
  border-color: var(--brand-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow);
}

/* Fintech Titanium Card (Clean 2-Color Design) */
.hologram-card-wrap {
  width: 100%;
  max-width: 440px;
}

.hologram-card {
  width: 100%;
  height: 240px;
  border-radius: 18px;
  background: linear-gradient(145deg, #064e3b 0%, #0b1320 60%, #0f172a 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.45);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.emv-chip {
  width: 44px;
  height: 32px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  position: relative;
}

.floating-stat-badge {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  border-radius: 14px;
}

/* ==========================================================================
   BUTTONS (Solid, Professional & Consistent)
   ========================================================================== */
.btn-primary-glow {
  background: #059669;
  color: #ffffff !important;
  font-weight: 600;
  border: 1px solid #10b981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  transition: all 0.2s ease;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary-glow:hover {
  background: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  border-color: #34d399;
}

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

.btn-secondary-glass {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary-glass:hover {
  border-color: var(--brand-border-hover);
  transform: translateY(-1px);
}

/* Theme Toggle Button Styling */
.theme-toggle-btn {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.theme-toggle-btn:hover {
  transform: scale(1.05);
}

/* Unified Text Colors */
.gradient-text-teal,
.gradient-text-orange {
  color: var(--brand-green);
}

/* Range Slider - Strictly Emerald Green */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 6px;
  background: var(--bg-elevated);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-green);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  border: 2px solid #ffffff;
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-green);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  border: 2px solid #ffffff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-green);
}

/* Floating Contact Dock */
.floating-contact-dock {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
  position: relative;
}

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

.float-btn .tooltip {
  position: absolute;
  right: 60px;
  white-space: nowrap;
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(8px);
  border: 1px solid var(--border-card);
}

.float-btn:hover .tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Modal Transitions */
.modal-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content-box {
  transform: scale(0.95) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-card);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-overlay.active .modal-content-box {
  transform: scale(1) translateY(0);
}

/* Passcode Lock */
.pin-digit-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: 12px;
  padding: 12px 0;
  transition: all 0.15s ease;
}

.pin-digit-btn:hover {
  background: var(--brand-green-subtle);
  border-color: var(--brand-green);
  color: var(--brand-green);
}

/* Light Mode Overrides for Tailwind classes */
html.light .text-white {
  color: #0f172a;
}
html.light .btn-primary-glow .text-white,
html.light .btn-primary-glow span,
html.light .btn-primary-glow i,
html.light .hologram-card .text-white,
html.light .bg-emerald-800 .text-white {
  color: #ffffff !important;
}

html.light .text-slate-100 {
  color: #0f172a !important;
}
html.light .text-slate-200 {
  color: #1e293b !important;
}
html.light .text-slate-300 {
  color: #334155 !important;
}
html.light .text-slate-400 {
  color: #64748b !important;
}

html.light .bg-brand-navy {
  background-color: #f8fafc !important;
}

html.light .bg-slate-900,
html.light .bg-slate-900\/90,
html.light .bg-slate-900\/80,
html.light .bg-slate-950 {
  background-color: #ffffff !important;
}

html.light .bg-slate-800,
html.light .bg-slate-800\/80,
html.light .bg-slate-800\/90,
html.light .bg-slate-800\/60 {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

html.light .border-slate-800,
html.light .border-slate-700,
html.light .border-slate-700\/80,
html.light .border-slate-700\/70,
html.light .border-slate-700\/60 {
  border-color: #e2e8f0 !important;
}

/* Mobile & Responsive Cleanups */
@media (max-width: 768px) {
  .floating-contact-dock {
    bottom: 16px;
    right: 16px;
  }
  .float-btn {
    width: 44px;
    height: 44px;
  }
}
