

:root {
    --bg-dark: #0a0602;
    --bg-card: rgba(15, 10, 5, 0.9);
    --primary: #F68931;
    --secondary: #ff5f00;
    --accent: #ffb347;
    --text-main: #ffffff;
    --text-dim: #a1a1aa;
    --glass-border: rgba(255, 255, 255, 0.12);
    --glow: 0 0 20px rgba(246, 137, 49, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(246, 137, 49, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(255, 95, 0, 0.15) 0%, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Glassmorphism Refined */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
    will-change: transform, box-shadow;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 30px rgba(246, 137, 49, 0.2);
    transform: translateY(-5px);
}

/* Futuristic Buttons */
.btn-primary {
    position: relative;
    background: linear-gradient(135deg, #F68931, #ff5f00);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--glow);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 30px rgba(246, 137, 49, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(246, 137, 49, 0.3);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(246, 137, 49, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(246, 137, 49, 0.3);
}

/* Nav & Branding */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo h2 a {
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero Section High-End */
.hero {
    padding: 150px 5% 100px;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1.5rem;
    letter-spacing: -3px;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.4rem;
    color: var(--text-dim);
    max-width: 800px;
    margin: 0 auto 3rem;
    font-weight: 400;
}

/* Floating Elements Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Grids */
.template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 60px 8%;
}

@media (max-width: 1100px) {
    .template-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
    .template-grid { grid-template-columns: 1fr; }
}

.template-card {
    padding: 0;
    overflow: hidden;
}

.template-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
}

/* AI Elements */
.btn-ai {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ai-glow {
    position: relative;
}

.ai-glow::after {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(45deg, #F68931, #ff5f00, #ffb347);
    filter: blur(15px);
    z-index: -1;
    opacity: 0.6;
    border-radius: inherit;
}

/* Dashboard Tabs Futuristic */
.tabs {
    background: var(--bg-card);
    padding: 8px;
    border-radius: 16px;
    display: inline-flex;
    margin-bottom: 3rem;
}

.tab-btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--text-dim);
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(246, 137, 49, 0.4);
}

/* Forms & Inputs */
input, textarea, select {
    background: rgba(15, 10, 5, 0.8) !important;
    border: 1px solid rgba(246, 137, 49, 0.2) !important;
    color: #ffffff !important;
    padding: 12px 18px !important;
    border-radius: 12px !important;
    font-family: inherit !important;
    width: 100% !important;
    margin-bottom: 10px !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}

input:focus, textarea:focus {
    border-color: #F68931 !important;
    box-shadow: 0 0 25px rgba(246, 137, 49, 0.3) !important;
    background: rgba(20, 15, 10, 0.98) !important;
    outline: none !important;
}

/* Footer modern */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 5%;
    margin-top: 6rem;
    background: rgba(5, 5, 16, 0.5);
}

/* =============================================
   HAMBURGER MENU (mobile nav toggle)
   ============================================= */

/* Always hidden on desktop — explicit guard */
@media (min-width: 769px) {
    .hamburger { display: none !important; }
    .nav-links-mobile { display: none !important; visibility: hidden !important; pointer-events: none !important; }
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    z-index: 1100;
    background: none;
    border: none;
}
.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--text-main);
    border-radius: 3px;
    transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav drawer — hidden by default via visibility+opacity+transform
   (more reliable than display:none for fixed+backdrop-filter elements) */
.nav-links-mobile {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(5,5,16,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.nav-links-mobile.open {
    visibility: visible;
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}
.nav-links-mobile a, .nav-links-mobile button {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 2px;
    padding: 12px 30px;
    border-radius: 12px;
    transition: background 0.3s;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-links-mobile a:hover { background: rgba(255,255,255,0.08); }

/* =============================================
   RESPONSIVE — LARGE TABLETS (≤1200px)
   ============================================= */
@media (max-width: 1200px) {
    .hero { padding: 110px 5% 80px; }
    .hero h1 { font-size: 4rem; }
}

/* =============================================
   RESPONSIVE — TABLETS / MOBILE (≤768px)
   ============================================= */
@media (max-width: 768px) {
    /* Nav */
    nav { padding: 1.2rem 5%; }
    .auth-links { display: none !important; }
    .hamburger { display: flex !important; }

    /* Hero */
    .hero { padding: 90px 5% 60px; }
    .hero h1 { font-size: 3rem; letter-spacing: -1px; }
    .hero p { font-size: 1.1rem; }
    .hero div[style*="display: flex"] {
        flex-direction: column;
        align-items: center;
    }

    /* Template grid → 2 cols */
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 40px 5%;
    }

    /* Admin stat grid */
    .stat-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Tabs — wrap */
    .tabs {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }
    .tab-btn { flex: 1 1 calc(33% - 8px); font-size: 0.85rem; padding: 10px 12px; }

    /* Glass card padding */
    .glass-card { padding: 1.5rem; border-radius: 18px; }

    /* Admin nav links — hide text labels, show as icon row */
    .nav-link span.label { display: none; }
}

/* =============================================
   RESPONSIVE — PHONES (≤768px)
   ============================================= */
@media (max-width: 768px) {
    /* Hero */
    .hero h1 { font-size: 2.4rem; letter-spacing: -1px; }
    .hero p { font-size: 1rem; }
    .hero { padding: 70px 5% 50px; }

    /* Template grid → 1 col */
    .template-grid {
        grid-template-columns: 1fr;
        padding: 30px 4%;
    }

    /* Login / Register card */
    div.glass-card[style*="width: 450px"] {
        width: calc(100% - 2rem) !important;
        padding: 2rem !important;
        margin: 1rem !important;
    }

    /* Client dashboard header */
    h1[style*="3rem"] { font-size: 2rem !important; letter-spacing: -1px !important; }
    h1[style*="4rem"] { font-size: 2rem !important; letter-spacing: -1px !important; }

    /* Scrollable tables */
    .glass-card table,
    table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Admin dashboard stat cards stack */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(300px"] {
        grid-template-columns: 1fr !important;
    }

    /* Stat card font */
    div[style*="font-size: 3rem; font-weight: 900"] { font-size: 2.2rem !important; }

    /* Tabs — 2 per row */
    .tab-btn { font-size: 0.78rem; padding: 8px 10px; }

    /* Footer */
    footer { padding: 2rem 5%; margin-top: 3rem; }

    /* Dashboard padding */
    div[style*="padding: 60px 8%"] { padding: 30px 4% !important; }
    div[style*="padding: 60px 5%"] { padding: 30px 4% !important; }
    div[style*="padding: 100px 8%"] { padding: 50px 4% !important; }
    div[style*="padding: 100px 5%"] { padding: 50px 4% !important; }
    div[style*="padding: 2rem 5%"] { padding: 1.5rem 4% !important; }

    /* Editor grid fields */
    div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
    div[style*="grid-template-columns: 1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }

    /* Admin nav inner links text */
    .nav-link { font-size: 0.65rem; letter-spacing: 1px; gap: 4px; }

    /* Invoice modal card */
    .invoice-card { width: calc(100% - 2rem) !important; padding: 24px !important; }

    /* Progress label stack */
    div[style*="display: flex; justify-content: space-between; font-size: 0.7rem"] {
        flex-direction: column; gap: 4px;
    }

    /* Insight cards grid */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(280px"] {
        grid-template-columns: 1fr !important;
    }
    div[style*="grid-template-columns: repeat(auto-fit, minmax(400px"] {
        grid-template-columns: 1fr !important;
    }
    div[style*="grid-column: span 2"] { grid-column: span 1 !important; }

    /* Reduce table padding */
    th, td { padding: 10px 12px !important; font-size: 0.8rem; }
}

/* =============================================
   RESPONSIVE — SMALL PHONES (≤480px)
   ============================================= */
@media (max-width: 480px) {
    .hero h1 { font-size: 1.9rem; }
    .hero p { font-size: 0.95rem; }
    .btn-primary { padding: 0.8rem 1.6rem; font-size: 0.9rem; }

    /* Nav brand size */
    .logo h2 { font-size: 1.1rem; }

    /* Tab buttons 1 per row on very small */
    .tabs { flex-direction: column; }
    .tab-btn { flex: unset; width: 100%; }

    /* Template card image height */
    .template-card img { height: 180px !important; }

    /* Glass card full width padding */
    .glass-card { padding: 1rem; border-radius: 14px; }

    /* Action buttons row wrap */
    div[style*="display: flex; gap: 10px; justify-content: flex-end"] {
        flex-wrap: wrap; justify-content: flex-start !important;
    }

    /* Editor template switcher items */
    .ts-item { flex: 0 0 100px; }
    .ts-item img { height: 130px !important; }

    /* Section headings */
    h1[style] { font-size: 1.7rem !important; }
    h2[style*="2.5rem"] { font-size: 1.6rem !important; }
    h2[style*="3rem"] { font-size: 1.7rem !important; }
}

/* Floating Orbs for Dope Aesthetic */
.floating-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -2;
    opacity: 0.15;
    pointer-events: none;
    animation: float 20s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
    will-change: transform;
}

.orb-1 { width: 400px; height: 400px; background: #F68931; top: -100px; left: -100px; }
.orb-2 { width: 500px; height: 500px; background: #ff5f00; bottom: -150px; right: -150px; animation-duration: 25s; }
.orb-3 { width: 300px; height: 300px; background: #ffb347; top: 50%; left: 80%; animation-duration: 18s; }

@keyframes float {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(100px, 50px) scale(1.1); }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.8s ease-out forwards; will-change: opacity, transform; }

@keyframes slideIn {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}