/* ═══════════════════════════════════════════════════════════════
   Wisdsol Tech — Global Stylesheet
   All critical CSS is here so the site works even without CSP middleware.
   ═══════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
  --ink: #0d0d12;
  --ink-soft: #2c2c3e;
  --primary: #3b5bdb;
  --primary-vivid: #4c6ef5;
  --primary-dark: #2f4ac7;
  --primary-glow: rgba(59,91,219,.12);
  --gold: #f59f00;
  --surface: #ffffff;
  --surface-alt: #f8f9fc;
  --muted: #6c757d;
  --border: rgba(0,0,0,.08);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --shadow-card: 0 4px 32px rgba(0,0,0,.07);
  --shadow-lift: 0 16px 56px rgba(59,91,219,.14);
  --transition: all .25s cubic-bezier(.4,0,.2,1);
}

/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--surface);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .serif { font-family: 'Fraunces', serif; letter-spacing: -.02em; }
img { max-width: 100%; height: auto; display: block; }
a { transition: var(--transition); }

/* ── NAVBAR ── */
.wt-nav {
  padding: 0;
  background: rgba(255,255,255,.95) !important;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  position: sticky;
  top: 0;
  z-index: 9000;
}
.wt-nav.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,.08); }
.wt-nav .container { min-height: 64px; display: flex; align-items: center; }
.wt-brand {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--ink) !important;
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: -.03em;
  text-decoration: none;
  flex-shrink: 0;
}
.wt-brand img { height: 32px; width: 32px; object-fit: cover; border-radius: 7px; }
.wt-brand .dot { color: var(--primary-vivid); }

/* Toggler */
.navbar-toggler {
  border: 1.5px solid var(--border) !important;
  border-radius: 9px !important;
  padding: 7px 10px !important;
  transition: var(--transition);
  background: transparent;
  box-shadow: none !important;
}
.navbar-toggler:hover { border-color: var(--primary) !important; background: var(--primary-glow); }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(13,13,18,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  width: 20px;
  height: 20px;
}

/* Nav links */
.navbar-nav .nav-link {
  font-weight: 500;
  font-size: .91rem;
  color: #3d3d4e !important;
  padding: .45rem .95rem !important;
  border-radius: 8px;
  transition: var(--transition);
  white-space: nowrap;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: var(--primary) !important; background: var(--primary-glow); }

/* Nav buttons */
.btn-nav-ghost {
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: .42rem 1.1rem;
  font-weight: 600;
  font-size: .87rem;
  color: var(--ink) !important;
  transition: var(--transition);
  background: transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-nav-ghost:hover { border-color: var(--primary); color: var(--primary) !important; }
.btn-nav-solid {
  background: var(--primary);
  border-radius: 9px;
  padding: .42rem 1.2rem;
  font-weight: 600;
  font-size: .87rem;
  color: white !important;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-nav-solid:hover { background: var(--primary-vivid); box-shadow: 0 4px 18px rgba(59,91,219,.35); transform: translateY(-1px); color: white !important; }

/* Dropdown */
.dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 8px;
  min-width: 220px;
}
.dropdown-item {
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 500;
  padding: 8px 14px;
  transition: var(--transition);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dropdown-item i { width: 18px; font-size: .85rem; flex-shrink: 0; }
.dropdown-item:hover { background: var(--primary-glow); color: var(--primary); }
.dropdown-item.text-danger:hover { background: rgba(220,53,69,.08); color: #dc3545 !important; }

/* Avatar */
.avatar-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: .75rem;
  flex-shrink: 0;
}

/* Mobile nav */
@media (max-width: 991.98px) {
  .wt-nav .container { min-height: 58px; }
  .navbar-collapse {
    padding: 12px 0 16px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
  }
  .navbar-nav .nav-link { padding: .55rem .75rem !important; font-size: .95rem; }
  .navbar-nav.align-items-center { align-items: flex-start !important; }
  .navbar-nav .btn-nav-ghost,
  .navbar-nav .btn-nav-solid { width: 100%; justify-content: center; margin-top: 4px; padding: .6rem 1rem; }
  .dropdown-menu { box-shadow: none; border: 1px solid var(--border); margin-left: .5rem; }
}

/* ── PROMO CHIP ── */
.promo-chip {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 8000;
  background: linear-gradient(135deg, #e03131, #c92a2a);
  color: white;
  border-radius: 14px;
  padding: 10px 16px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(224,49,49,.35);
  text-decoration: none;
  animation: promoFloat 3s ease-in-out infinite;
  border: 2px solid rgba(255,255,255,.2);
}
.promo-chip:hover { color: white; transform: scale(1.05) !important; animation: none; }
.promo-chip .pct { font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 900; display: block; line-height: 1; }
.promo-chip .lbl { font-size: .65rem; font-weight: 700; opacity: .88; letter-spacing: .06em; text-transform: uppercase; }
@keyframes promoFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }

/* ── BUTTONS ── */
.btn { font-weight: 600; border-radius: 9px; transition: all .2s cubic-bezier(.4,0,.2,1); }
.btn-sm { font-size: .8rem; padding: .3rem .75rem; border-radius: 7px; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-vivid); border-color: var(--primary-vivid); box-shadow: 0 4px 20px rgba(59,91,219,.35); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: rgba(255,255,255,.7);
  padding: clamp(36px,6vw,64px) 0 clamp(20px,3vw,32px);
  margin-top: clamp(40px,7vw,80px);
}
.footer-brand { font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 900; color: white; letter-spacing: -.025em; }
footer h6 { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.35); margin-bottom: 1rem; }
footer a { color: rgba(255,255,255,.6); text-decoration: none; font-size: .87rem; transition: var(--transition); display: block; padding: 2px 0; }
footer a:hover { color: white; padding-left: 4px; }
footer ul.list-unstyled li { margin-bottom: 3px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.6);
  font-size: .9rem; transition: var(--transition); text-decoration: none; padding: 0;
}
.footer-social a:hover { background: var(--primary); color: white; transform: translateY(-2px); padding-left: 0; }
.contact-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; font-size: .86rem; }
.contact-item i { color: var(--primary); margin-top: 3px; flex-shrink: 0; width: 14px; }
.footer-divider { border-color: rgba(255,255,255,.07); margin: clamp(16px,3vw,28px) 0 clamp(12px,2vw,20px); }
.footer-copy { font-size: .8rem; color: rgba(255,255,255,.4); }

/* ── ALERTS ── */
.alert { border-radius: var(--radius-sm); border: none; font-size: .88rem; }
.alert-success { background: rgba(47,158,68,.1); color: #1e7e34; border-left: 3px solid #2f9e44; }
.alert-danger, .alert-error { background: rgba(224,49,49,.1); color: #c0392b; border-left: 3px solid #e03131; }
.alert-warning { background: rgba(230,119,0,.1); color: #856404; border-left: 3px solid #f59f00; }
.alert-info { background: rgba(59,91,219,.08); color: #1a5276; border-left: 3px solid var(--primary); }

/* ── FORMS ── */
.form-control, .form-select {
  border-radius: 9px;
  border: 1.5px solid rgba(0,0,0,.12);
  padding: .55rem 1rem;
  font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,91,219,.12);
  outline: none;
}
.form-label { font-size: .82rem; font-weight: 600; color: #4a4a6a; margin-bottom: .35rem; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

/* ── CARDS ── */
.card { border: 1px solid rgba(0,0,0,.07); border-radius: 14px; box-shadow: 0 2px 16px rgba(0,0,0,.05); }

/* ── TABLES ── */
.table { font-size: .88rem; }
.table thead th {
  font-size: .73rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: #6c757d;
  background: #f8f9fc; border-bottom: 1.5px solid rgba(0,0,0,.08);
  white-space: nowrap;
}
.table td { vertical-align: middle; border-color: rgba(0,0,0,.05); }
.table-hover tbody tr:hover td { background: rgba(59,91,219,.03); }

/* ── APP SIDEBAR ── */
@media (max-width: 767px) {
  .app-sidebar { transform: translateX(-100%); transition: transform .3s ease; }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0 !important; }
  .sidebar-toggle { display: block !important; }
}

/* ── MOBILE GLOBAL ── */
@media (max-width: 575.98px) {
  h1 { font-size: clamp(1.6rem, 7vw, 2rem); }
  h2 { font-size: clamp(1.4rem, 6vw, 1.8rem); }
  .container { padding-left: 16px; padding-right: 16px; }
}

/* ── PRINT ── */
@media print {
  .wt-nav, footer, .promo-chip, .btn, .alert { display: none !important; }
  body { background: white; }
}

/* ── DROPDOWN Z-INDEX FIX (inside sticky nav stacking context) ── */
.wt-nav .dropdown-menu {
  z-index: 9999;
}

/* ── NAVBAR TOGGLER ICON ── */
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2813,13,18,0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  width: 22px;
  height: 22px;
}
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(59,91,219,.15) !important; }
