:root {
    --primary:#2563eb;
    --primary-dark:#1e40af;

    --bg-main:#f6f7fb;

    --text-main:#0f172a;
    --text-muted:#64748b;

    --radius-lg:22px;
    --radius-md:14px;
}

/* =========================
   BASE
========================= */

/* ============================
   🚀 NEXT LEVEL PREMIUM BACKGROUND
============================ */

/* ============================
   🌌 LIVE MOTION BACKGROUND
============================ */

/* ===========================
   DARK CINEMATIC BACKGROUND
=========================== */

body {
    background: radial-gradient(circle at 20% 20%, #1e1b4b, #020617 70%);
    overflow-x: hidden;
    color: white;
}

/* floating light blobs */
.bg-motion {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.bg-motion::before,
.bg-motion::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .45;
    animation: floatGlow 18s infinite alternate ease-in-out;
}

.bg-motion::before {
    background: #6366f1;
    top: -120px;
    left: -120px;
}

.bg-motion::after {
    background: #22d3ee;
    bottom: -120px;
    right: -120px;
    animation-delay: 6s;
}

@keyframes floatGlow {
    from { transform: translate(0,0); }
    to   { transform: translate(160px,120px); }
}


/* =========================
   APPLE GLASS CARDS
========================= */

.card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,.06);

    box-shadow: 0 6px 18px rgba(0,0,0,.06);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0,0,0,.12);
}



/* =========================
   TEXT
========================= */

h4,h5,h6{
    font-weight:600;
    letter-spacing:-.01em;
}

p{
    font-size:14px;
    line-height:1.65;
    margin-bottom:6px;
}

.text-muted{
    color:var(--text-muted)!important;
}

/* =========================
   INPUTS (APPLE STYLE)
========================= */

input, textarea, select{
    background:#f9fafb !important;
    border:1px solid #e5e7eb !important;
    border-radius:14px!important;
    padding:12px 14px!important;
}

input:focus, textarea:focus, select:focus{
    background:#fff!important;
    border-color:#2563eb!important;
    box-shadow:0 0 0 4px rgba(37,99,235,.12);
}


/* =========================
   BUTTONS
========================= */

.btn, button{
    background:
      linear-gradient(180deg,
        var(--primary),
        #1e3cff) !important;

    box-shadow:
      0 12px 40px rgba(37,99,235,.45),
      inset 0 1px 0 rgba(255,255,255,.5);

    position:relative;
    overflow:hidden;
}

.btn::before, button::before{
    content:"";
    position:absolute;
    inset:-40%;
    background:
      radial-gradient(circle,
        rgba(255,255,255,.55),
        transparent 60%);
    opacity:0;
    transition:.35s ease;
}

.btn:hover::before, button:hover::before{
    opacity:1;
}

.btn:hover, button:hover{
    box-shadow:
      0 22px 70px rgba(37,99,235,.75);
}


/* =========================
   CLEAN LINKS
========================= */

a{
    color:inherit;
    text-decoration:none;
}

a:not(:has(i)){
    position:relative;
}



/* =========================
   APPLE PREMIUM ICONS
========================= */

.bi{
    width:28px;
    height:28px;
    font-size:14px;

    display:inline-flex;
    align-items:center;
    justify-content:center;

    border-radius:50%;
    background:rgba(15,23,42,.04);
    border:1px solid rgba(15,23,42,.12);
    color:#475569;

    cursor:pointer;

    transition:.18s cubic-bezier(.22,1,.36,1);
}

.bi:hover{
    background:rgba(37,99,235,.10);
    border-color:rgba(37,99,235,.45);
    color:var(--primary);

    transform:translateY(-2px) scale(1.06);

    box-shadow:
        0 6px 18px rgba(37,99,235,.25),
        0 0 0 6px rgba(37,99,235,.08);
}

.bi:active{
    transform:scale(.92);
    box-shadow:none;
}

/* =========================
   REACT GALLERY (CLEAN)
========================= */

.dashboard-preview-box{
    width:360px;
    max-width:100%;
    margin:0 auto;
    padding:8px;
    overflow:hidden;

    display:flex;
    justify-content:center;
}

.dashboard-react-gallery{
    width:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
}

/* main image */

.dashboard-react-gallery > div:first-child img{
    max-width:100%;
    max-height:260px;
    object-fit:contain;

    border-radius:16px;
    background:#fff;
    padding:6px;

    box-shadow:0 10px 25px rgba(0,0,0,.12);
}

/* thumbnails */

.dashboard-react-gallery > div:last-child{
    display:flex;
    gap:6px;
    justify-content:center;
    overflow-x:auto;
    padding:6px 4px;
}

.dashboard-react-gallery > div:last-child img{
    width:40px;
    height:40px;
    object-fit:cover;

    border-radius:8px;
    opacity:.65;
    transition:.2s ease;
}

.dashboard-react-gallery > div:last-child img:hover{
    opacity:1;
    transform:scale(1.05);
}

/* =========================
   QR REVEAL
========================= */

.qr-animate{
    animation:qrReveal .6s cubic-bezier(.22,1,.36,1);
}

@keyframes qrReveal{
    0%{opacity:0;transform:scale(.6) rotate(-6deg)}
    60%{opacity:1;transform:scale(1.05)}
    100%{transform:scale(1)}
}

/* =========================
   GLOBAL SMOOTHNESS
========================= */

*{
    scroll-behavior:smooth;
    
}

.card,
.btn,
button,
input,
textarea,
select,
.bi,
img {
    transition: .18s cubic-bezier(.22,1,.36,1);
}


/* =========================
   MOBILE
========================= */

@media(max-width:768px){
    .card{border-radius:16px}
    h4{font-size:1.1rem}
}


@keyframes cardPop {
  from {opacity:0; transform:scale(.9) translateY(20px);}
  to {opacity:1; transform:scale(1) translateY(0);}
}

.card{
  animation: cardPop .55s cubic-bezier(.22,1,.36,1);
}

*{
  transition:
    transform .22s cubic-bezier(.22,1,.36,1),
    box-shadow .22s ease,
    background .22s ease,
    color .22s ease;
}


/* 🚨 FORCE GALLERY TO RECEIVE CLICKS */

.dashboard-react-gallery,
.dashboard-react-gallery * {
    pointer-events: auto !important;
}

/* 🚫 Disable card hover layer from blocking */
.card::before,
.card::after {
    pointer-events: none !important;
}

/* Make sure gallery is above animations */
.dashboard-preview-box {
    position: relative;
    z-index: 10;
}


/* 🖼️ Selectable thumbnails */

.thumb {
    opacity: .6;
    cursor: pointer;
    transition: .2s ease;
}

.thumb.selected {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
    opacity: 1;
    transform: scale(1.08);
    border-radius: 10px;
}

/* =========================
   PREMIUM PDF UI
========================= */

.pdf-grid{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:10px;
}

.pdf-card{
  display:flex;
  align-items:center;
  gap:12px;

  background:rgba(255,255,255,.85);
  border:1px solid rgba(0,0,0,.06);
  border-radius:14px;

  padding:12px 14px;

  box-shadow:0 6px 18px rgba(0,0,0,.06);

  transition:.25s cubic-bezier(.22,1,.36,1);
}

.pdf-card:hover{
  transform:translateY(-3px);
  box-shadow:0 12px 28px rgba(0,0,0,.12);
}

.pdf-icon{
  font-size:28px;
  color:#ef4444;
}

.pdf-info{
  flex:1;
}

.pdf-name{
  font-weight:600;
  font-size:14px;
  display:block;
  margin-bottom:4px;
  word-break:break-all;
}

.pdf-actions{
  display:flex;
  gap:12px;
}

.pdf-actions a{
  font-size:13px;
  color:#000000;
  font-weight:500;
}

.pdf-actions a:hover{
  text-decoration: none;
}


.card:hover,
.card:focus,
.card:active {
    box-shadow: 0 14px 32px rgba(0,0,0,.12) !important;
}

input:focus,
textarea:focus,
select:focus,
button:focus {
    box-shadow: none !important;
    outline: none !important;
}


#saveContactBtn{
    border-radius: 999px;
    font-weight: 600;
    padding: 10px 28px;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
    transition: transform .2s ease, box-shadow .2s ease;
}

#saveContactBtn:hover{
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0,0,0,.18);
}

/* PREMIUM QR LOOK */

.qr-premium {
    border-radius: 18px;
    padding: 14px;
    background: linear-gradient(135deg,#6366f1,#22d3ee);
    box-shadow:
        0 10px 35px rgba(99,102,241,.35),
        0 0 0 6px rgba(99,102,241,.15);
    display: inline-block;
}

.qr-premium img {
    background: white;
    border-radius: 12px;
    padding: 10px;
}

/* soft hover (no eye pain) */
.qr-premium:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 18px 50px rgba(99,102,241,.45),
        0 0 0 8px rgba(34,211,238,.2);
}

/* ===============================
   💎 INSANE PREMIUM QR SYSTEM
=============================== */

.qr-insane-wrapper {
    position: relative;
    display: inline-block;
    padding: 18px;
    border-radius: 26px;

    background:
        linear-gradient(135deg,#6366f1,#22d3ee,#7c3aed);
    background-size: 300% 300%;

    animation: qrGradientFlow 6s ease infinite;

    box-shadow:
        0 18px 60px rgba(99,102,241,.45),
        0 0 0 10px rgba(99,102,241,.15);

    overflow: hidden;
}

/* glass inner */
.qr-insane-wrapper::before {
    content:"";
    position:absolute;
    inset:0;
    background:rgba(255,255,255,.25);
    backdrop-filter: blur(14px);
}

/* animated scan light */
.qr-scan-line {
    position:absolute;
    left:-120%;
    top:0;
    width:120%;
    height:100%;
    background:linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,.45),
        transparent
    );
    animation: scanMove 3.5s linear infinite;
}

.qr-insane-wrapper img {
    position: relative;
    background:#fff;
    padding:14px;
    border-radius:18px;
    z-index:2;
}

/* hover luxury lift */
.qr-insane-wrapper:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow:
        0 26px 80px rgba(99,102,241,.6),
        0 0 0 14px rgba(34,211,238,.22);
}

/* animations */

@keyframes qrGradientFlow {
    0% {background-position:0% 50%}
    50% {background-position:100% 50%}
    100% {background-position:0% 50%}
}

@keyframes scanMove {
    from { left:-120% }
    to { left:120% }
}


/* ===========================
   GLASS LOGIN PANEL
=========================== */

.glass-login {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 22px;

    box-shadow:
        0 25px 60px rgba(0,0,0,.35),
        inset 0 1px 0 rgba(255,255,255,.35);

    padding: 40px 36px;
    max-width: 380px;
    width: 100%;

    animation: glassIn .6s ease;
}

@keyframes glassIn {
    from {opacity:0; transform: translateY(30px) scale(.95)}
    to {opacity:1; transform: translateY(0) scale(1)}
}

/* inputs inside glass */
.glass-login input {
    background: rgba(255,255,255,.15)!important;
    border: 1px solid rgba(255,255,255,.3)!important;
    color: white!important;
}

.glass-login input::placeholder {
    color: rgba(255,255,255,.65);
}

/* focus glow */
.glass-login input:focus {
    box-shadow: 0 0 0 4px rgba(99,102,241,.35);
}

/* login button glow */
.glass-login button {
    background: linear-gradient(135deg,#6366f1,#2563eb);
    border: none;
    color: white;
    box-shadow: 0 10px 30px rgba(99,102,241,.6);
}

.glass-login button:hover {
    transform: translateY(-2px);
}


/* ===========================
   FLOATY DARK GLASS CARD
=========================== */

.glass-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 24px;

    box-shadow:
        0 30px 80px rgba(0,0,0,.6),
        inset 0 1px 0 rgba(255,255,255,.25);

    transition: transform .35s cubic-bezier(.22,1,.36,1),
                box-shadow .35s ease;

    animation: floatIn .6s ease;
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 45px 120px rgba(0,0,0,.75);
}

@keyframes floatIn {
    from {opacity:0; transform: translateY(40px) scale(.94)}
    to {opacity:1; transform: translateY(0) scale(1)}
}




/* ================================
   💎 GLASS DASHBOARD SYSTEM
================================ */

/* soft dark cinematic background */
body {
    background:
      radial-gradient(circle at 20% 10%, rgba(99,102,241,.18), transparent 45%),
      radial-gradient(circle at 80% 30%, rgba(37,99,235,.15), transparent 45%),
      linear-gradient(180deg,#05070d,#0b1020);
    color:#e5e7eb;
}

/* glass card shell */
.card {
    background: rgba(255,255,255,0.10) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: 1px solid rgba(255,255,255,.14);
    border-radius: 22px;

    box-shadow:
        0 20px 60px rgba(0,0,0,.45),
        inset 0 1px 0 rgba(255,255,255,.2);
}

/* remove harsh pop hover */
.card:hover {
    transform: none !important;
    box-shadow:
        0 22px 65px rgba(0,0,0,.55),
        inset 0 1px 0 rgba(255,255,255,.2);
}

/* clean form look on glass */
input, textarea, select {
    background: rgba(255,255,255,.12) !important;
    color: #111;
    border: 1px solid rgba(255,255,255,.18) !important;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255,255,255,.55);
}

/* focus glow */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 4px rgba(99,102,241,.35);
}

/* stats cards slightly brighter */
.row .card {
    background: rgba(255,255,255,.16) !important;
}

/* buttons premium glow */
.btn {
    background: linear-gradient(135deg,#6366f1,#2563eb);
    border: none;
    color: white;
    box-shadow: 0 10px 30px rgba(99,102,241,.45);
}

.btn:hover {
    box-shadow: 0 14px 45px rgba(99,102,241,.7);
}

/* gallery images stay crisp (NO blur) */
.dashboard-react-gallery img,
.react-gallery-root img,
img {
    backdrop-filter: none !important;
    filter: none !important;
}


/* ===== GLOBAL BACKGROUND MODES ===== */

body[data-bg="default"] {
    background:
      radial-gradient(circle at 20% 10%, rgba(99,102,241,.18), transparent 45%),
      linear-gradient(180deg,#05070d,#0b1020);
}

body[data-bg="gradient1"] {
    background: linear-gradient(135deg,#6366f1,#2563eb);
}

body[data-bg="gradient2"] {
    background: linear-gradient(135deg,#ff6a00,#ee0979);
}

body[data-bg="noise"] {
    background:#0b1020;
    background-image:url("/static/qrapp/noise.png");
}

body[data-bg="animated"] {
    background: linear-gradient(270deg,#6366f1,#2563eb,#7c3aed);
    background-size: 600% 600%;
    animation: bgFlow 12s ease infinite;
}

@keyframes bgFlow {
    0%{background-position:0% 50%}
    50%{background-position:100% 50%}
    100%{background-position:0% 50%}
}


/* =========================
   LIGHT MODE TEXT FIX
========================= */

body.light,
body.light p,
body.light h1,
body.light h2,
body.light h3,
body.light h4,
body.light h5,
body.light h6,
body.light span,
body.light div,
body.light label,
body.light a {
    color: #111 !important;
}

/* inputs */
body.light input,
body.light textarea,
body.light select {
    background: rgba(255,255,255,.9) !important;
    color: #111 !important;
    border: 1px solid rgba(0,0,0,.12) !important;
}

/* placeholders */
body.light input::placeholder,
body.light textarea::placeholder {
    color: rgba(0,0,0,.45) !important;
}

/* glass cards */
body.light .card,
body.light .glass,
body.light .glass-card,
body.light .card-glass,
body.light .stat-box {
    background: rgba(255,255,255,.82) !important;
    color: #111 !important;
}

/* buttons */
body.light .btn,
body.light button {
    color: white !important;
}


/* =========================
   FORCE LIGHT MODE TEXT
========================= */



/* EXCEPT BUTTONS */
body.light .btn,
body.light button,
body.light .save-contact-fixed,
body.light .edit-card-btn {
    color: white !important;
}

/* inputs */
body.light input,
body.light textarea,
body.light select {
    background: #fff !important;
    color: #111 !important;
}

/* placeholders */
body.light input::placeholder,
body.light textarea::placeholder {
    color: #666 !important;
}



/* DASHBOARD STAT BOX TEXT */
.stat-box h3 {
    color: #ffffff !important;   /* number color */
    font-weight: 700;
}

.stat-box p {
    color: rgba(255,255,255,0.75) !important; /* label color */
}



/* FORCE DASHBOARD STAT COLORS */

.stat-box h3,
.stat-box h4,
.stat-box span {
    color: #ffffff !important;
}

.stat-box p {
    color: rgba(255,255,255,0.75) !important;
}

/* LIGHT MODE */
body.light .stat-box h3,
body.light .stat-box h4,
body.light .stat-box span {
    color: #111 !important;
}

body.light .stat-box p {
    color: rgba(0,0,0,0.65) !important;
}

/* FORCE ALL TEXT INSIDE STAT BOX */

.stat-box * {
    color: white !important;
}

body.light .stat-box * {
    color: #111 !important;
}

/* STAT BOX H6 FIX */

.stat-box h6 {
    color: #ffffff !important;
}

body.light .stat-box h6 {
    color: #111111 !important;
}

.stat-box P {
    color: #ffffff !important;
}

body.light .stat-box P {
    color: #111111 !important;
}
/* LIGHT LOGIN MODE */

body.light .glass-login{
    background: rgba(255,255,255,0.95);
    color:#111 !important;
}

body.light .glass-login input{
    background:#fff;
    color:#111;
    border:1px solid rgba(0,0,0,.15);
}

body.light .glass-login input::placeholder{
    color:#666;
}

body.light .glass-login .btn-outline-light{
    border-color:#111;
    color:#111;
}

/* =========================
   BACKGROUND THEMES
========================= */

/* DEFAULT */
body[data-bg="default"]{
    background: #0f1117;
}

/* PURPLE BLUE */
body[data-bg="gradient1"]{
    background:
    linear-gradient(135deg,#6a11cb,#2575fc);
}

/* SUNSET */
body[data-bg="gradient2"]{
    background:
    linear-gradient(135deg,#ff9966,#ff5e62);
}

/* PREMIUM DARK */
body[data-bg="noise"]{
    background:
    linear-gradient(135deg,#232526,#414345);
}

/* ANIMATED */
body[data-bg="animated"]{
    background:
    linear-gradient(-45deg,#1e3c72,#2a5298,#6a11cb,#2575fc);
    background-size: 400% 400%;
    animation: gradientMove 12s ease infinite;
}

/* ANIMATION */
@keyframes gradientMove{
    0%{
        background-position:0% 50%;
    }

    50%{
        background-position:100% 50%;
    }

    100%{
        background-position:0% 50%;
    }
}

/* SOCIAL ICONS */

.social-icons i{
    transition: .2s ease;
}

.social-icons i:hover{
    transform: scale(1.15);
}

/* COLORS */

.globe{
    color:#4DA3FF;
}

.insta{
    color:#E1306C;
}

.facebook{
    color:#1877F2;
}

.linkedin{
    color:#0A66C2;
}

.twitter{
    color:#ffffff;
}

body.light .twitter{
    color:#000000;
}

.maps{
    color:#EA4335;
}

.whatsapp{
    color:#25D366;
}

/* COMPACT SOCIAL ICONS */

.social-icons{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;

    flex-wrap:nowrap;
    width:100%;
}

.social-icons a{
    width:36px;
    height:36px;

    border-radius:50%;

    display:flex;
    align-items:center;
    justify-content:center;

    background:rgba(255,255,255,.10);
    border:1px solid rgba(255,255,255,.12);

    backdrop-filter:blur(10px);

    text-decoration:none;

    transition:.22s ease;

    flex-shrink:0;
}

.social-icons a:hover{
    transform:scale(1.08);
}

.social-icons i{
    font-size:17px;
    line-height:1;
}