/* 1. RESET & VARIABLES */
:root {
    --primary: #3b82f6;
    --primary-hover: #4f46e5;
    --primary-dark: #2563eb;
    --dark: #0f172a;

    --bg-main: #f8fafc;
    --sidebar-w: 280px;
    --card-bg: #ffffff;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --radius: 20px;
    --border: #e2e8f0;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
html {
  scroll-behavior: smooth;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body { 
    background: var(--bg-main); 
    color: var(--text-dark); 
    overflow-x: hidden; 
}

/* 2. DASHBOARD LAYOUT STRUCTURE */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* SIDEBAR */
.site-sidebar {
    width: var(--sidebar-w);
    background: white;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: all 0.3s ease;
    z-index: 1000;
    flex-shrink: 0; /* Prevents sidebar from squishing */
}

.sidebar-header {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}


.logo-text a { font-size: 1.4rem; font-weight: 800; color: var(--dark); text-decoration: none; }
.logo-text .dot { color: var(--primary); }

.logo-text { font-weight: 700; font-size: 1.1rem; color: var(--text-dark); }
.logo-text span { color: var(--primary); }

/* SIDEBAR NAV */
.sidebar-nav { flex: 1; padding: 1rem; overflow-y: auto; }

.search-box {
    background: #f1f5f9;
    padding: 10px 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.85rem;
    width: 100%;
}

.group-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-light);
    margin: 1.5rem 0 0.5rem 0.5rem;
    display: block;
    letter-spacing: 0.05em;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 12px;
    transition: 0.2s;
    font-weight: 500;
    margin-bottom: 4px;
}

.nav-link:hover { background: #f1f5f9; color: var(--primary); }
.nav-link.active { background: #eef2ff; color: var(--primary); }

.sidebar-footer { padding: 1.5rem; border-top: 1px solid #f1f5f9; }
.privacy-badge {
    font-size: 0.75rem;
    color: #166534;
    background: #dcfce7;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
}

/* 3. MAIN CONTENT AREA */
.main-body {
    flex: 1;
    min-width: 0; /* Important for flex child with grid */
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: 70px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* 4. QR TOOL SPECIFIC STYLING (YOUR ORIGINAL LOGIC) */
.content-area {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 1.5rem; }
.step-num {
    background: #f1f5f9;
    color: var(--primary);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
}

/* TABS & INPUTS */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.4s ease; }

.input-group { margin-bottom: 1.2rem; }
label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--text-light); }
input, select, textarea {
    width: 100%; padding: 12px; border: 2px solid #f1f5f9; border-radius: 12px;
    font-size: 1rem; outline: none; transition: 0.3s;
}
input:focus { border-color: var(--primary); }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* PREVIEW STICKY */
.preview-sticky { position: sticky; top: 2rem; }
.preview-card {
    background: white;
    padding: 2rem;
    border-radius: 30px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border);
}

#canvas-container { margin-bottom: 1.5rem; transition: transform 0.2s; }

.action-buttons { display: flex; flex-direction: column; gap: 10px; }
.btn-main { background: var(--primary); color: white; border: none; padding: 14px; border-radius: 12px; font-weight: 600; cursor: pointer; transition: 0.3s; }
.btn-main:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-sub { background: #f8fafc; border: 1px solid var(--border); padding: 12px; border-radius: 12px; cursor: pointer; }

/* 5. RESPONSIVE FIXES */
@media (max-width: 1100px) {
    .grid-layout { grid-template-columns: 1fr; }
    .preview-column { order: -1; }
}

@media (max-width: 992px) {
    .site-sidebar {
        position: fixed;
        left: -280px;
    }
    .site-sidebar.active { left: 0; box-shadow: 15px 0 30px rgba(0,0,0,0.1); }
    .menu-toggle { display: block; }
    .top-bar { padding: 0 1rem; }
}

@media (max-width: 600px) {
    .mobile-tabs {
        display: flex;
        gap: 5px;
        background: white;
        padding: 5px;
        border-radius: 12px;
        margin-bottom: 1.5rem;
        box-shadow: var(--shadow);
    }
    .mobile-tabs .tab-link { flex: 1; padding: 10px; font-size: 0.8rem; border-radius: 8px; }
    .mobile-tabs .tab-link.active { background: var(--primary); color: white; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }




/* --- TOOL TAB NAVIGATION (URL, WiFi, Text) --- */
.mobile-tabs {
    display: flex;
    gap: 8px;
    background: #e2e8f0;
    padding: 6px;
    border-radius: 14px;
    margin-bottom: 2rem;
    max-width: 500px;
}

.tab-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Active Tab Style */
.tab-link.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tab-link i {
    font-size: 1rem;
}

/* --- MOBILE SIDEBAR DRAWER FIX --- */
@media (max-width: 992px) {
    .site-sidebar {
        position: fixed;
        top: 0;
        left: -100%; /* Completely hidden */
        height: 100vh;
        width: 280px;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }

    /* This class is added by JS to show the menu */
    .site-sidebar.active {
        left: 0;
        box-shadow: 20px 0 50px rgba(0,0,0,0.2);
    }

    .menu-toggle {
        display: block; /* Show hamburger on mobile */
        padding: 10px;
        color: var(--text-dark);
    }
    
    .content-area {
        padding: 1rem;
    }
}


.feat {
    font-family: Arial, Helvetica, sans-serif;
    color: #3f3c63;
    text-align: center;
}

/* Footer */
.main-footer { background: var(--dark); color: var(--white); padding: 40px 5%; text-align: center; }
.footer-link { color: var(--primary); text-decoration: none; font-weight: 600; display: block; margin-bottom: 10px; }
.social-links { display: flex; justify-content: center; gap: 15px; margin-top: 20px; }
.social-links a { color: white; border: 1px solid rgba(255,255,255,0.2); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.social-links a:hover { background: var(--primary); border-color: var(--primary); }