@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #f43f5e;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
}

/* Elegant Dark Mode Variable Overrides */
[data-theme="dark"] {
    --bg-primary: #0b0f17;
    --bg-secondary: #111827;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #1f2937;
    --glass: rgba(17, 24, 39, 0.75);
    --glass-border: rgba(31, 41, 55, 0.5);
}

/* Smooth Transitions for Premium Theme Transitions */
body, header, footer, .card, .sidebar-profile, .dashboard-item-card, .auth-panel, input, textarea, select {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Glassmorphic Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo a span {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-btn {
    background-color: var(--primary);
    color: #ffffff !important;
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease !important;
}

.nav-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* ── Hamburger Button ── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, border-color 0.2s;
    z-index: 200;
    flex-shrink: 0;
}

.nav-hamburger:hover {
    background: rgba(99, 102, 241, 0.07);
    border-color: var(--primary);
}

.nav-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity   0.25s ease,
                width     0.25s ease;
    transform-origin: center;
}

/* X state when open */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Slide-Down Menu ── */
.mobile-menu {
    display: none;
    max-height: 0;
    overflow: hidden;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 150;
}

.mobile-menu.open {
    max-height: 100vh;
}

.mobile-nav-links {
    list-style: none;
    padding: 0.75rem 1.25rem 1.25rem 1.25rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.mobile-nav-link:hover {
    background: rgba(99, 102, 241, 0.07);
    color: var(--primary);
    transform: translateX(4px);
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.6rem 0.5rem;
    pointer-events: none;
}

.mobile-nav-logout {
    color: #f43f5e !important;
    font-weight: 600;
}

.mobile-nav-logout:hover {
    background: rgba(244, 63, 94, 0.07) !important;
    color: #f43f5e !important;
}

.mobile-nav-btn {
    display: block;
    margin: 0.5rem 0.5rem 0 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--primary);
    color: #fff !important;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 12px;
    text-align: center;
    transition: background 0.2s, transform 0.2s;
}

.mobile-nav-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* ── Mobile Backdrop ── */
.mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Make click-through by default to prevent blocking page elements when closed */
}

.mobile-backdrop.open {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ── Responsive Breakpoints ── */
@media screen and (max-width: 768px) {
    #main-nav { display: none !important; }

    .nav-hamburger { display: flex !important; }

    .mobile-menu  { display: block; }
    /* Do NOT set display: block here so the closed backdrop remains completely hidden and doesn't block click/touch events on mobile devices */
    .mobile-backdrop { display: none; }

    .nav-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.85rem 1.25rem !important;
        box-sizing: border-box;
    }

    .logo {
        flex: 0 0 auto;
    }
}

@media screen and (max-width: 480px) {
    .logo a span { font-size: 1rem; }
    .logo a svg  { width: 20px; height: 20px; }
}




.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--accent);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Main Container Layout */
main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Flash Messages */
.alert-container {
    max-width: 1200px;
    margin: 1rem auto 0 auto;
    padding: 0 2rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.4s ease-out;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 40%),
                radial-gradient(circle at bottom left, rgba(244, 63, 94, 0.05), transparent 40%);
    border-radius: var(--radius-lg);
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.05rem;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

/* Template Cards Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.2);
}

.card-img-wrapper {
    position: relative;
    padding-top: 130%; /* Portrait aspect ratio perfect for resumes */
    background: #f1f5f9;
    overflow: hidden;
}

.card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    color: #ffffff;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

.btn:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

.btn-accent {
    background-color: var(--accent);
}

.btn-accent:hover {
    background-color: #e11d48;
}

.btn-danger {
    background-color: var(--danger);
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-success {
    background-color: var(--success);
}

.btn-success:hover {
    background-color: #059669;
}

/* Detail View Layout */
.detail-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.detail-img-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.detail-img-container img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.detail-info {
    position: sticky;
    top: 100px;
}

.detail-info h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.detail-info .price-tag {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.detail-info .desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Forms & Authentication Panels */
.auth-panel {
    max-width: 450px;
    margin: 4rem auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.auth-panel h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.auth-panel p {
    text-align: left;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.auth-panel .btn {
    width: 100%;
    margin-top: 1rem;
}

.auth-panel .footer-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-panel .footer-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Shopping Cart styling */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.cart-table th, .cart-table td {
    padding: 1.25rem 1.5rem;
    text-align: left;
}

.cart-table th {
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
}

.cart-table td {
    border-bottom: 1px solid var(--border-color);
}

.cart-table tr:last-child td {
    border-bottom: none;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.cart-total {
    font-size: 1.5rem;
    font-weight: 800;
}

/* Dashboard Order & Tables */
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

.sidebar-profile {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    height: fit-content;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 auto 1.5rem auto;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: capitalize;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-failed {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Footer Section */
footer {
    background-color: var(--text-primary);
    color: #94a3b8;
    padding: 3rem 2rem;
    text-align: center;
    font-size: 0.95rem;
    border-top: 1px solid #1e293b;
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    color: var(--primary);
}

/* ----------------------------------------------------
   Advanced Upgrades Styles: Live Editor, Analytics
   ---------------------------------------------------- */

/* A4 Sheet Canvas for Resume Live Editor */
.editor-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    min-height: calc(100vh - 65px);
    background-color: #f1f5f9;
    max-width: 100% !important;
    padding: 0 !important;
}

.editor-sidebar {
    background-color: #ffffff;
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
    height: calc(100vh - 65px);
    position: sticky;
    top: 65px;
}

.editor-canvas-container {
    padding: 3rem 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    height: calc(100vh - 65px);
}

/* A4 Page styling */
.a4-page {
    width: 794px; /* Exact A4 dimensions in px at 96 DPI */
    min-height: 1123px;
    background-color: #ffffff;
    border: none !important;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --page-padding-y: 2rem;
    --page-padding-x: 2rem;
    padding: var(--page-padding-y) var(--page-padding-x) !important;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    box-sizing: border-box;
    font-size: 13.5px;
    line-height: 1.4;
}

@media screen {
    .a4-page {
        border: 1.5px solid rgba(239, 68, 68, 0.45) !important; /* Premium red A4 page boundary border only on screen */
    }
}

/* Editable text blocks */
[contenteditable="true"] {
    outline: none;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 2px 4px;
    transition: all 0.2s ease;
}

[contenteditable="true"]:hover {
    background-color: rgba(99, 102, 241, 0.04);
    border-color: rgba(99, 102, 241, 0.2);
    cursor: text;
}

[contenteditable="true"]:focus {
    background-color: #ffffff;
    border-color: var(--primary-color, var(--primary));
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Active Typography Font Facings */
.font-outfit { font-family: 'Outfit', sans-serif !important; }
.font-inter { font-family: 'Inter', sans-serif !important; }
.font-roboto { font-family: 'Roboto', sans-serif !important; }
.font-playfair { font-family: 'Playfair Display', serif !important; }

/* Color Swatches bindings */
.theme-selector {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: #0f172a;
    transform: scale(1.1);
}

/* Admin Sales Analytics Widgets */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-widget {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-val {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.stat-lbl {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

/* ----------------------------------------------------
   Print-Media Stylesheet (@media print)
   Isolates the A4 resume sheet and hides everything else
   ---------------------------------------------------- */
@media print {
    /* ── Kill ALL scrollbars ── */
    *::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
    * { scrollbar-width: none !important; -ms-overflow-style: none !important; }

    /* ── Hide every non-content UI element ── */
    header, footer, .editor-sidebar, .alert-container, .nav-container,
    .no-print,
    .editor-header,
    .preview-control-bar,
    #mobile-exit-preview-btn,
    .floating-theme-bar,
    .floating-strength-meter,
    .block-action-controls,
    .drag-handle,
    .photo-edit-overlay,
    .avatar-edit-overlay,
    #avatar-settings-modal,
    #contact-icon-picker,
    #ai-bullet-popover,
    #pdf-export-toast,
    .a4-overflow-warning-badge,
    .a4-page-cutoff-line,
    .delete-block-btn,
    .custom-section-add-btn,
    .canvas-experience-add-btn,
    .canvas-skills-add-btn,
    .canvas-education-add-btn,
    .canvas-profile-add-btn,
    .canvas-references-add-btn,
    .premium-modal-backdrop,
    main > *:not(.editor-layout),
    .editor-layout > *:not(.editor-canvas-container),
    button {
        display: none !important;
        height: 0 !important;
        width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        overflow: hidden !important;
        visibility: hidden !important;
        position: absolute !important;
        pointer-events: none !important;
    }
    
    body, html {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
    }

    main {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .editor-layout {
        display: block !important;
        background: #ffffff !important;
        min-height: 100% !important;
    }

    .editor-canvas-container {
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
    }

    .a4-page {
        width: 100% !important;
        min-height: 100% !important;
        box-shadow: none !important;
        padding: var(--page-padding-y, 2rem) var(--page-padding-x, 2rem) !important;
        margin: 0 !important;
        border: none !important;
        outline: none !important;
        border-radius: 0 !important;
        page-break-after: always !important;
        break-after: page !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .a4-page:last-child {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }

    /* ── Contenteditable: remove all hover/focus decorations ── */
    [contenteditable="true"],
    [contenteditable="true"]:hover,
    [contenteditable="true"]:focus {
        outline: none !important;
        border-color: transparent !important;
        background-color: transparent !important;
        box-shadow: none !important;
        cursor: default !important;
    }

    /* ── Draggable decoration removal ── */
    .draggable-section {
        border: none !important;
        box-shadow: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Keyframe Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Preview Control Bar default hidden state */
.preview-control-bar {
    display: none;
}

/* Mobile Tab Switcher default hidden state */
.editor-mobile-tabs {
    display: none !important;
}

/* Desktop Recommendation Popup default hidden */
#desktop-warning-popup {
    display: none;
}

/* Responsive Breakpoints */
@media screen and (max-width: 900px) {
    .detail-layout, .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    /* Desktop Warning Premium Popup styles */
    #desktop-warning-popup {
        display: flex !important;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(15, 23, 42, 0.5) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        z-index: 10000 !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 1.5rem !important;
        box-sizing: border-box !important;
    }
    .popup-glass-card {
        background: #ffffff !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 16px !important;
        box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15) !important;
        padding: 2.25rem 1.75rem !important;
        max-width: 420px !important;
        width: 100% !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 1.25rem !important;
        box-sizing: border-box !important;
        font-family: 'Outfit', sans-serif !important;
        position: relative !important;
    }
    .popup-close-x {
        position: absolute !important;
        top: 1rem !important;
        right: 1rem !important;
        background: none !important;
        border: none !important;
        color: #94a3b8 !important;
        font-size: 1.1rem !important;
        cursor: pointer !important;
        padding: 0.25rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: color 0.2s !important;
        line-height: 1 !important;
    }
    .popup-close-x:hover {
        color: #0f172a !important;
    }
    .popup-dashboard-btn {
        width: 100% !important;
        background: rgba(15, 23, 42, 0.04) !important;
        color: #0f172a !important;
        border: 1px solid rgba(15, 23, 42, 0.15) !important;
        border-radius: 10px !important;
        padding: 0.75rem !important;
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.4rem !important;
        transition: all 0.2s ease !important;
        font-family: 'Outfit', sans-serif !important;
        box-sizing: border-box !important;
    }
    .popup-dashboard-btn:hover {
        background: rgba(15, 23, 42, 0.08) !important;
        border-color: rgba(15, 23, 42, 0.3) !important;
        color: #000000 !important;
    }
    .popup-icon-pulse {
        width: 60px !important;
        height: 60px !important;
        background: rgba(99, 102, 241, 0.1) !important;
        color: var(--primary) !important;
        font-size: 2rem !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }
    .popup-text-content h4 {
        font-size: 1.15rem !important;
        font-weight: 800 !important;
        color: var(--text-primary) !important;
        margin: 0 0 0.5rem 0 !important;
        line-height: 1.3 !important;
    }
    .popup-text-content p {
        font-size: 0.82rem !important;
        color: var(--text-secondary) !important;
        line-height: 1.5 !important;
        margin: 0 0 0.75rem 0 !important;
    }
    .popup-highlight {
        font-size: 0.8rem !important;
        font-weight: 800 !important;
        color: var(--primary) !important;
        display: block !important;
        background: #f5f3ff !important;
        padding: 0.45rem 0.75rem !important;
        border-radius: 8px !important;
        border: 1px solid rgba(99, 102, 241, 0.15) !important;
        line-height: 1.4 !important;
    }
    .popup-dismiss-btn {
        width: 100% !important;
        background: var(--primary) !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 10px !important;
        padding: 0.75rem !important;
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.4rem !important;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2) !important;
        transition: all 0.2s ease !important;
        font-family: 'Outfit', sans-serif !important;
        box-sizing: border-box !important;
    }
    .popup-dismiss-btn:hover {
        background: var(--primary-hover) !important;
        transform: translateY(-1.5px) !important;
    }
    
    /* Bulletproof Split View / Full Screen Layout on Mobile Viewports */
    .editor-layout {
        position: fixed !important;
        top: 65px !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        max-width: 100% !important;
    }
    
    .editor-sidebar {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 50% !important; /* Default 50/50 split */
        min-height: 250px !important;
        position: static !important;
        border-right: none !important;
        border-bottom: 2px solid var(--border-color) !important;
        padding: 1.25rem !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important; /* Enable smooth momentum scroll on iOS/mobile */
        box-sizing: border-box !important;
    }

    /* Unclutter Mobile Viewport editor canvas */
    .floating-theme-bar,
    .floating-strength-meter {
        display: none !important;
    }

    /* Mobile Preview Control Bar styling */
    .preview-control-bar {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        padding: 0.5rem 1rem;
        height: 48px !important;
        min-height: 48px !important;
        box-sizing: border-box;
        width: 100% !important;
        position: sticky !important;
        top: 0;
        z-index: 10;
    }
    .control-title {
        font-size: 0.8rem;
        font-weight: 800;
        color: var(--text-primary);
        text-transform: uppercase;
        letter-spacing: 0.05rem;
    }
    .control-buttons {
        display: flex;
        gap: 0.35rem;
    }
    .control-btn {
        background: #f1f5f9;
        border: 1px solid var(--border-color);
        color: var(--text-secondary);
        font-size: 0.72rem;
        font-weight: 700;
        padding: 0.25rem 0.6rem;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.2s ease;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        font-family: 'Outfit', sans-serif;
    }
    .control-btn.active {
        background: var(--primary);
        color: #ffffff;
        border-color: var(--primary);
        box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2);
    }
    
    .editor-canvas-container {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 50% !important; /* Default 50/50 split */
        min-height: 250px !important;
        position: static !important;
        border-top: none !important;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.04) !important;
        z-index: 99 !important;
        padding: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important; /* Enable smooth momentum scroll on iOS/mobile */
        box-sizing: border-box !important;
        background: #f1f5f9 !important;
    }
    
    /* Full screen preview overrides class */
    .editor-layout.mobile-full-preview .editor-sidebar,
    body.preview-mode .editor-sidebar {
        display: none !important;
        height: 0 !important;
    }
    
    .editor-layout.mobile-full-preview .editor-canvas-container,
    body.preview-mode .editor-canvas-container {
        height: 100% !important;
        min-height: 100% !important;
    }
    
    #pages-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        gap: 1.5rem !important;
        padding: 1.5rem 0 !important;
        box-sizing: border-box !important;
    }
    .a4-page {
        transform: scale(calc((100vw - 2rem) / 794)) !important;
        transform-origin: top center !important;
        flex-shrink: 0 !important;
        margin: 0 auto !important;
        max-width: 794px !important;
        margin-bottom: calc(-1123px * (1 - ((100vw - 2rem) / 794))) !important;
    }
}

@media screen and (max-width: 768px) {
    /* Reduce page main padding to gain horizontal space on mobile */
    main {
        padding: 1.5rem 1rem !important;
    }

    /* Responsive Editor Header Layout */
    .editor-header {
        padding: 0.6rem 1rem !important;
        flex-direction: column !important;
        gap: 0.6rem !important;
        align-items: stretch !important;
    }
    .editor-header-left {
        width: 100% !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }
    .editor-header-right {
        width: 100% !important;
        justify-content: space-between !important;
        gap: 0.4rem !important;
    }
    .editor-header-btn {
        padding: 0.45rem 0.6rem !important;
        font-size: 0.72rem !important;
        flex: 1 !important;
        justify-content: center !important;
    }

    /* Nav: hamburger is handled by header.php inline <style>; desktop nav hidden there too */
    /* Dashboard sidebar collapses to full width */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Dashboard item card actions wrap on mobile */
    .item-card-header {
        flex-wrap: wrap !important;
        gap: 0.75rem !important;
    }
    .item-card-actions {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    .item-card-actions > div {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    /* Cart summary stacks on mobile */
    .cart-summary {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
    .cart-summary .btn {
        width: 100% !important;
    }
}

@media screen and (max-width: 480px) {
    /* Responsive Icon-only Editor Header Buttons on small phones to prevent leaks */
    .editor-header-btn .btn-text {
        display: none !important;
    }
    .editor-header-btn {
        min-width: 40px !important;
    }
}

@media screen and (max-width: 600px) {
    .hero h1 {
        font-size: clamp(1.6rem, 7vw, 2.5rem) !important;
    }
    .hero p {
        font-size: 1rem !important;
    }
    /* Catalog header wraps cleanly */
    #catalog-search {
        width: 100% !important;
    }
    #catalog-search:focus {
        width: 100% !important;
    }
}

/* ----------------------------------------------------
   Dynamic Layout Template Designs
   ---------------------------------------------------- */
/* Layout 1: Single Column Classic (Executive Modern) */
.layout-single-column #resume-container-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
}

.layout-single-column #col-sidebar,
.layout-single-column #col-body {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1.75rem !important;
}

/* Layout 2: Two Column Modern (Elegant Academic / Professional Tech) */
.layout-two-column #resume-container-grid {
    display: grid !important;
    grid-template-columns: 240px 1fr !important;
    gap: 2.5rem !important;
}

.layout-two-column #col-sidebar {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
}

.layout-two-column #col-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
}

/* Layout 3: Creative Shaded Sidebar (Creative Minimalist) */
.layout-creative-sidebar #resume-container-grid {
    display: grid !important;
    grid-template-columns: 240px 1fr !important;
    gap: 2.5rem !important;
    position: relative !important;
}

.layout-creative-sidebar #col-sidebar {
    background: #f8fafc !important;
    border-right: 2.5px solid var(--border-color) !important;
    padding: var(--page-padding-y, 2rem) 1.25rem var(--page-padding-y, 2rem) var(--page-padding-x, 2rem) !important;
    margin: calc(-1 * var(--page-padding-y, 2rem)) 0 calc(-1 * var(--page-padding-y, 2rem)) calc(-1 * var(--page-padding-x, 2rem)) !important;
    border-radius: 4px 0 0 4px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    box-sizing: border-box !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 100% !important;
}

/* Ensure contact details wrap cleanly */
.layout-creative-sidebar #col-sidebar .contact-info-panel span,
.layout-creative-sidebar #col-sidebar .contact-info-panel a {
    word-break: break-all !important;
}

/* If the grid has a previous sibling (e.g. top name header), do NOT apply negative top margin to the sidebar! */
.layout-creative-sidebar #resume-container-grid:not(:first-child) #col-sidebar {
    margin-top: 0 !important;
}

/* Increase horizontal spacing after SVG icons in contact panels globally */
.contact-info-panel span,
.contact-info-panel a {
    gap: 0 !important; /* Spacing after icon in inline */
}

.contact-info-panel span svg,
.contact-info-panel a svg {
    margin-right: 10px !important; /* Force a robust physical margin-right of exactly 10px after the SVG icon! */
}

.contact-info-panel span i,
.contact-info-panel a i {
    margin-right: 5px !important; /* Force a robust physical margin-right of exactly 5px after the i icon! */
}

/* Increase vertical/horizontal spacing (bottom spacing) between list rows in contact panels */
.contact-info-panel {
    gap: 0.85rem !important; /* Bottom spacing for sidebar section contact list */
}

.layout-creative-sidebar #col-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    padding-top: 0.5rem !important;
    box-sizing: border-box !important;
}

/* Erase empty columns from single-column layouts to prevent visual spacing leaks */
.layout-single-column #col-sidebar:empty,
.layout-single-column #col-body:empty {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* ----------------------------------------------------
   AntiGravity Premium Upgrades CSS Suite
   ---------------------------------------------------- */

/* Real-Time Completeness Strength Meter Floating Widget */
.floating-strength-meter {
    position: fixed;
    right: 30px;
    top: 360px; /* Perfectly stacked below style customized toolbar */
    width: 44px;
    background: var(--glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    z-index: 99;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-strength-meter:hover {
    width: 140px; /* Expand dynamically to reveal score breakdown on hover */
    padding: 0.75rem 0.75rem;
}

.floating-strength-meter .meter-label {
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.4rem;
    letter-spacing: 0.05rem;
    width: 100%;
}

.floating-strength-meter .meter-expanded-content {
    display: none;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
    animation: fadeIn 0.2s ease-out;
}

.floating-strength-meter:hover .meter-expanded-content {
    display: flex;
}

.floating-strength-meter .strength-circle-svg {
    transition: transform 0.3s ease;
}

.floating-strength-meter:hover .strength-circle-svg {
    transform: scale(0.9);
}

.score-progress-ring-circle {
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

/* Magic Wand AI Enhancer Controls */
.btn-block-enhance {
    background-color: #fef3c7 !important;
    border-color: #fcd34d !important;
}
.btn-block-enhance:hover {
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* Inline Popover AI Enhancer Menu */
.ai-inline-popover {
    position: absolute;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
    padding: 1.25rem;
    width: 320px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: popoverIntro 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top left;
}

@keyframes popoverIntro {
    0% { opacity: 0; transform: scale(0.85) translateY(-5px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.ai-enhance-option-card {
    border: 1px solid var(--border-color);
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-enhance-option-card:hover {
    border-color: var(--primary);
    background: #f5f3ff;
    color: var(--text-primary);
}

/* A4 Page-Overflow Warning Badge & Outlines - strictly restricted to active edit canvas inside the editor! */
body:not(.preview-mode) .editor-canvas-container .a4-page.overflowing {
    box-shadow: 0 0 0 2.5px #ef4444, 0 10px 25px -5px rgba(239, 68, 68, 0.2) !important;
}

/* Warn tag overlaying paper sheet */
.a4-overflow-warning-badge {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4444;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    z-index: 98;
    transition: all 0.2s ease;
    animation: slideDown 0.3s ease-out;
}

.a4-overflow-warning-badge:hover {
    background: #dc2626;
    transform: translateX(-50%) translateY(-1px);
    box-shadow: 0 6px 14px rgba(239, 68, 68, 0.45);
}

/* Interactive Star Rating Grids and Sliders */
.skill-slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    margin-top: 0.4rem;
}

.skill-slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
}

.skill-slider-track {
    position: relative;
    width: 100%;
    height: 7px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.skill-slider-fill {
    height: 100%;
    background: var(--primary-color, var(--primary));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Real-time editable sliders inside editor view */
.skill-editor-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #cbd5e1;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    margin-top: 0.35rem;
    transition: all 0.2s;
}

.skill-editor-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color, var(--primary));
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: transform 0.1s;
}

.skill-editor-range::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

/* Interactive Star Rating grids */
.skill-stars-container {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-top: 0.3rem;
}

.skill-rating-star-svg {
    width: 14px;
    height: 14px;
    fill: #cbd5e1;
    cursor: pointer;
    transition: all 0.15s ease;
}

.skill-rating-star-svg.filled {
    fill: #f59e0b; /* Golden stars */
}

.skill-rating-star-svg:hover {
    transform: scale(1.25);
}

body.preview-mode .skill-editor-range {
    display: none !important;
}

body.preview-mode .skill-rating-star-svg {
    cursor: default !important;
    pointer-events: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Infographic Timeline Node Visualizer Styling */
.timeline-active {
    border-left: 2px dashed var(--border-color);
    padding-left: 1.5rem !important;
    margin-left: 0.3rem !important;
    position: relative !important;
    transition: all 0.3s ease;
}

.timeline-circle-node {
    position: absolute;
    left: -31px; /* Center node exactly on the dashed line */
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid var(--primary-color, var(--primary));
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    z-index: 5;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-circle-node:hover {
    transform: scale(1.35);
    box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.25);
    background: var(--primary-color, var(--primary));
}

@media print {
    .timeline-active {
        border-left-color: var(--primary-color, var(--primary)) !important;
    }
}

/* Visibility toggling hidden blocks styling */
.block-hidden {
    opacity: 0.22 !important;
    border: 1.5px dashed #64748b !important;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

/* Completely exclude hidden blocks in print and preview modes */
@media print {
    .block-hidden {
        display: none !important;
    }
}
body.preview-mode .block-hidden {
    display: none !important;
}

.btn-block-hide {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}
.btn-block-hide.active {
    background-color: #cbd5e1 !important;
    color: #64748b !important;
}

/* Canvas Print Margins & Safety Guidelines Overlay */
#pages-container.show-print-guides .a4-page::before {
    content: "";
    position: absolute;
    top: 0.75in;
    bottom: 0.75in;
    left: 0.75in;
    right: 0.75in;
    border: 1px dashed rgba(99, 102, 241, 0.25);
    pointer-events: none;
    z-index: 90;
    animation: fadeIn 0.2s ease-out;
}

#pages-container.show-print-guides .a4-page::after {
    content: "A4 Print Safety Margin (0.75\")";
    position: absolute;
    top: calc(0.75in + 4px);
    right: calc(0.75in + 8px);
    font-size: 0.55rem;
    font-weight: 800;
    color: rgba(99, 102, 241, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    pointer-events: none;
    z-index: 90;
    animation: fadeIn 0.2s ease-out;
}

/* Hide guidelines completely in print */
@media print {
    #pages-container.show-print-guides .a4-page::before,
    #pages-container.show-print-guides .a4-page::after {
        display: none !important;
    }
}

/* Color-Matched QR Code container styles */
.qr-code-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 60px;
    transition: all 0.3s ease;
}

.qr-code-wrapper svg {
    border: 1.5px solid var(--border-color);
    padding: 2px;
    border-radius: 4px;
    background: #ffffff;
    transition: transform 0.2s ease;
}

.qr-code-wrapper svg:hover {
    transform: scale(1.08);
}

.qr-code-wrapper img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.qr-code-wrapper img:hover {
    transform: scale(1.08);
}

.qr-code-lbl {
    font-size: 0.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    text-align: center;
}

/* =========================================================================
   AntiGravity Premium Master Enhancements CSS Suite
   ========================================================================= */

/* Dynamic dual-tone gradient accents on sliders and progress gauges */
.a4-page .skill-slider-fill,
.a4-page #jd-match-progress-bar,
.a4-page .timeline-circle-node:hover {
    background: var(--primary-gradient, var(--primary-color)) !important;
}

/* Beautiful dynamic text gradients for headings */
.a4-page h1 {
    background: var(--primary-gradient, var(--primary-color));
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    display: inline-block;
}

/* Responsive typography slider overrides */
.a4-page p,
.a4-page li {
    font-size: var(--body-font-size, 14.5px) !important;
    line-height: var(--body-line-height, 1.5) !important;
}

/* Manual Page Breaks Splice */
.forced-page-break {
    position: relative !important;
    margin-top: 3.5rem !important;
    border-top: 1.5px dashed #ef4444 !important;
    padding-top: 1.25rem !important;
}

.forced-page-break::before {
    content: "✂️ Manual Page Break Splice";
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 0.6rem;
    font-weight: 800;
    color: #ef4444;
    background: #ffffff;
    padding: 0 6px;
    border-radius: 4px;
    border: 1px solid #fca5a5;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    z-index: 10;
}

@media print {
    .forced-page-break {
        page-break-before: always !important;
        break-before: page !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top: none !important;
    }
    .forced-page-break::before {
        display: none !important;
    }
}

body.preview-mode .forced-page-break {
    border-top: none !important;
    margin-top: 2rem !important;
    padding-top: 0 !important;
}
body.preview-mode .forced-page-break::before {
    display: none !important;
}

/* Column layout separator resizer */
.layout-column-splitter {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    background: transparent;
    cursor: col-resize;
    z-index: 99;
    transition: background 0.2s ease;
    margin-left: -4px;
}

.layout-column-splitter:hover,
.layout-column-splitter.dragging {
    background: rgba(99, 102, 241, 0.2);
    border-left: 1px dashed var(--primary);
    border-right: 1px dashed var(--primary);
}

/* Google Auth and Recovery View Styling Overrides */
.btn-google {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #d1d5db;
    transition: all 0.3s ease;
}
.btn-google:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}
[data-theme="dark"] .btn-google {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}
[data-theme="dark"] .btn-google:hover {
    background: #334155 !important;
    border-color: #475569 !important;
}

/* Interactive Timeline Node Hover Glows & Connecting Currents */
.timeline-active > div {
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Hover styling for the card itself */
.timeline-active > div:hover {
    transform: translateX(4px); /* Gentle shift to the right to feel reactive */
}

/* Hover styling targeting the node */
.timeline-active > div:hover .timeline-circle-node {
    transform: scale(1.4) !important;
    background: var(--primary-color, var(--primary)) !important;
    border-color: var(--primary-color, var(--primary)) !important;
    box-shadow: 0 0 16px var(--primary-color, var(--primary)), 0 0 5px var(--primary-color, var(--primary)) !important;
    animation: timeline-node-pulse 1.5s infinite alternate ease-in-out;
}

/* Glow animation keyframes */
@keyframes timeline-node-pulse {
    0% {
        box-shadow: 0 0 8px var(--primary-color, var(--primary)), 0 0 3px var(--primary-color, var(--primary));
    }
    100% {
        box-shadow: 0 0 20px var(--primary-color, var(--primary)), 0 0 8px var(--primary-color, var(--primary));
    }
}

/* Connective Pathway Energy Current Line */
.timeline-active > div::before {
    content: '';
    position: absolute;
    left: -27px; /* Positioned exactly on top of the dashed border line */
    top: 0;
    bottom: 0;
    width: 2.5px;
    background: transparent;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 2;
    opacity: 0;
    pointer-events: none;
}

/* Glowing Neon Stream active when hovering card */
.timeline-active > div:hover::before {
    background: linear-gradient(
        to bottom,
        transparent,
        var(--primary-color, var(--primary)) 20%,
        var(--primary-color, var(--primary)) 80%,
        transparent
    );
    box-shadow: 0 0 8px var(--primary-color, var(--primary)), 
                0 0 3px var(--primary-color, var(--primary));
    opacity: 1;
}

/* PDF Export Toast Animations & Step classes */
@keyframes toast-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes toast-pulse {
    0% { transform: scale(0.9); opacity: 0.15; }
    100% { transform: scale(1.1); opacity: 0.35; }
}

.toast-step.completed {
    color: #10b981 !important;
}

.toast-step.completed .step-icon {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
}

.toast-step.active {
    color: #ffffff !important;
}

.toast-step.active .step-icon {
    background: rgba(255, 255, 255, 0.1) !important;
    animation: toast-step-pulse 1s infinite alternate ease-in-out;
}

@keyframes toast-step-pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1.05); opacity: 1; }
}

/* Custom Checkbox Toggle Slider for Public Sharing */
.sharing-toggle-switch input:checked + .sharing-toggle-slider {
    background-color: var(--primary-color, var(--primary)) !important;
}

.sharing-toggle-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}


.sharing-toggle-switch input:checked + .sharing-toggle-slider:before {
    transform: translateX(16px);
}

/* ═══════════════════════════════════════════════════
   GLOBAL RESPONSIVE — All Pages
   ═══════════════════════════════════════════════════ */

/* Prevent horizontal overflow on any page */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

@media screen and (max-width: 768px) {

    /* Blog container padding reduction */
    .blog-container {
        padding: 0 1rem !important;
    }

    /* Main container padding on mobile */
    main {
        padding: 2rem 1.25rem !important;
    }

    /* Auth panels (login, register, about, privacy, terms, faq, guide) */
    .auth-panel {
        padding: 2rem 1.5rem !important;
        margin: 1.5rem auto 3rem auto !important;
        border-radius: var(--radius-md) !important;
    }

    /* Section headings scale down */
    h1 { font-size: clamp(1.5rem, 5vw, 2.5rem) !important; }
    h2 { font-size: clamp(1.3rem, 4.5vw, 2rem) !important; }
    h3 { font-size: clamp(1.1rem, 3.5vw, 1.5rem) !important; }

    /* All inline grids without explicit classes fallback */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: 1.2fr 1.8fr"],
    [style*="grid-template-columns: 1.1fr 1fr"],
    [style*="grid-template-columns: 1fr 1.2fr"] {
        grid-template-columns: 1fr !important;
    }

    /* flex-wrap for inline flex rows */
    [style*="display: flex"][style*="justify-content: space-between"] {
        flex-wrap: wrap;
    }

    /* ATS checker tool layout */
    .ats-checker-layout {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Detail page / template preview */
    .detail-grid,
    .template-detail-layout {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Make sticky sidebars non-sticky on mobile */
    [style*="position: sticky"] {
        position: relative !important;
        top: auto !important;
    }

    /* Tables: enable horizontal scroll */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
}

@media screen and (max-width: 480px) {

    main {
        padding: 1.5rem 1rem !important;
    }

    .auth-panel {
        padding: 1.5rem 1rem !important;
        margin: 1rem auto 2rem auto !important;
    }

    /* Hero section padding reduction */
    .hero {
        padding: 2.5rem 1rem !important;
    }

    /* Features showcase: reduce inner padding */
    .features-showcase {
        padding: 2rem 1.25rem !important;
    }

    /* Buttons full-width in form/auth context only */
    .auth-panel .btn,
    .contact-form .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Cards full padding reduction (excluding blog content) */
    [style*="padding: 2.5rem"]:not(.blog-wrapper):not(.blog-main-pane),
    [style*="padding: 3rem"]:not(.blog-wrapper):not(.blog-main-pane) {
        padding: 1.25rem !important;
    }

    /* Prevent text overflow in content cards only (not nav) */
    main p, main li, .card p, .card li,
    .auth-panel p, .auth-panel li {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* =========================================================================
   CORE EXPERTISE (Skills) High-Fidelity Mobile Print & PDF Export Overrides
   ========================================================================= */
@media print {
    /* Enforce background colors and graphical elements printing strictly for background layout elements */
    html, body, div, span, label {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Badges / Pills print enhancements */
    #skills-container > div[style*="background"] {
        background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color, #6366f1) 8%, #ffffff), color-mix(in srgb, var(--primary-color, #6366f1) 12%, #ffffff)) !important;
        border: 1px solid color-mix(in srgb, var(--primary-color, #6366f1) 15%, transparent) !important;
        border-radius: 24px !important;
        color: var(--primary-color, #6366f1) !important;
        padding: 0.35rem 0.85rem !important;
    }

    /* Sliders track & fill */
    .skill-slider-track, .skill-progress-track {
        background-color: #e2e8f0 !important;
        display: inline-block !important;
        vertical-align: middle !important;
        width: 50px !important;
        height: 5px !important;
        border-radius: 3px !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .skill-progress-track {
        width: 60px !important;
        height: 6px !important;
    }
    .skill-slider-fill {
        background-color: var(--primary-color, #6366f1) !important;
        background: var(--primary-gradient, var(--primary-color, #6366f1)) !important;
        height: 100% !important;
        border-radius: 3px !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Stars visualizer print styling */
    .skill-stars-container {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.12rem !important;
    }
    .skill-rating-star-svg {
        fill: #cbd5e1 !important;
        display: inline-block !important;
        width: 11px !important;
        height: 11px !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .skill-rating-star-svg.filled {
        fill: #f59e0b !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Level Caps styling */
    .skill-level-cap {
        display: inline-block !important;
        vertical-align: middle !important;
        font-size: 0.65rem !important;
        font-weight: 800 !important;
        padding: 0.15rem 0.5rem !important;
        border-radius: 12px !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Segmented designs segment colors */
    .skill-slider-wrapper > div > div {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
