        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        :root {
            /* Refined Professional Palette */
            --primary: #4f46e5;       /* Indigo 600 */
            --accent-base: var(--primary);
            --primary-hover: #4338ca; /* Indigo 700 */
            --primary-soft: #e0e7ff;  /* Indigo 100 */
            --secondary: #0ea5e9;     /* Sky 500 */
            
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            
            --bg-body: #f8fafc;       /* Slate 50 */
            --bg-surface: #ffffff;
            
            --text-main: #0f172a;     /* Slate 900 */
            --text-secondary: #64748b; /* Slate 500 */
            --text-tertiary: #94a3b8;
            
            --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);
            --radius-md: 0.5rem;
            --radius-lg: 0.75rem;
            
            /* Legacy mappings */
            --color-dark: var(--text-main);
            --color-text-light: var(--text-secondary);
            --color-bg-soft: var(--primary-soft);
            --color-border-light: var(--border-color);
            --color-accent: var(--secondary);
        }

        body {
            font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', Roboto, sans-serif;
            background-color: var(--bg-body);
            color: var(--text-main);
            min-height: 100vh;
            padding: 0; /* keep WP admin layout intact; plugin content gets its own padding */
            line-height: 1.5;
        }

        /* Subtle ambient background */
        body::before {
            content: '';
            position: fixed;
            top: 0; left: 0; right: 0;
            height: 400px;
            background: radial-gradient(circle at 50% 0%, #e0e7ff 0%, transparent 70%);
            z-index: -1;
            pointer-events: none;
            opacity: 0.6;
        }

        .biz-modern-container {
            /* Use more horizontal space on wide screens but stay padded */
            max-width: 1400px;
            margin: 24px auto;
            padding: 1rem 24px; /* keep breathing room */
        }

        .biz-btn-primary {
            background: var(--primary) !important;
            color: #fff !important;
        }

        .biz-demo-module-card {
            background: #ffffff;
            border: 2px solid #e2e8f0;
            border-radius: 14px;
            padding: 20px;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
            box-shadow: 0 1px 3px rgba(0,0,0,0.02);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        .biz-demo-module-card:hover {
            border-color: #cbd5e1;
            transform: translateY(-2px);
        }
        .biz-demo-module-card:has(input:checked) {
            border-color: var(--primary) !important;
            background: #f8faff !important;
        }

        @media (min-width: 1100px) {
            .biz-demo-controls-card {
                display: grid !important;
                grid-template-columns: 280px 1fr !important;
                gap: 24px !important;
            }
            .biz-demo-controls-card .biz-card-grid {
                grid-template-columns: repeat(3, 1fr) !important;
            }
        }

        .biz-modern-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2.5rem;
            padding-bottom: 1.5rem;
            border-bottom: 1px solid rgba(0,0,0,0.05);
        }

        .biz-modern-header h1 {
            font-size: 2rem;
            font-weight: 800;
            color: var(--text-main);
            margin: 0;
            letter-spacing: -0.025em;
        }
        
        .biz-modern-header p {
            color: var(--text-secondary);
            font-size: 0.95rem;
            margin-top: 0.25rem;
        }

        .biz-save-float {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            z-index: 999999; /* ensure it's above other admin UI */
            pointer-events: auto;
        }

        /* When a WP media modal is open, hide the floating save to avoid overlapping controls */
        .biz-save-float.biz-media-open {
            display: none !important;
            pointer-events: none !important;
            opacity: 0.6;
        }

        .biz-btn-save {
            background: var(--text-main);
            color: white;
            border: none;
            padding: 0.875rem 2rem;
            border-radius: 9999px;
            font-weight: 700;
            font-size: 1rem;
            cursor: pointer;
            pointer-events: auto;
            /* explicit shadow for reliability */
            box-shadow: 0 10px 20px rgba(0,0,0,0.12), 0 4px 6px rgba(0,0,0,0.08);
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .biz-btn-save:hover {
            transform: translateY(-2px);
            background: #000;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }

        .biz-tabs-container {
            display: grid;
            /* slightly wider sidebar to allow content to use remaining width */
            grid-template-columns: 320px 1fr;
            gap: 24px;
            align-items: start;
        }

        .biz-nav-sidebar {
            position: sticky;
            top: 2rem;
            background: var(--bg-surface);
            border-radius: var(--radius-lg);
            padding: 1rem;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border-color);
            width: 320px;
        }

        .biz-nav-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            margin-bottom: 0.25rem;
            border-radius: var(--radius-md);
            color: var(--text-secondary);
            font-weight: 600;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid transparent;
        }

        .biz-nav-item i {
            font-size: 1.1em;
            width: 1.5rem;
            text-align: center;
            color: var(--text-tertiary);
            transition: color 0.2s;
        }

        .biz-nav-item:hover {
            background-color: var(--bg-body);
            color: var(--text-main);
        }
        
        .biz-nav-item:hover i {
            color: var(--primary);
        }

        .biz-nav-item.active {
            background-color: var(--primary-soft);
            color: var(--primary);
        }

        .biz-nav-item.active i {
            transform: none;
            color: var(--primary);
        }

        .biz-content-area {
            min-height: 500px;
        }

        .biz-section {
            display: none;
            animation: fadeIn 0.3s ease-out;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .biz-section.active {
            display: block;
        }

        /* Section titles: slightly reduced for better balance with labels */
        .biz-section-title {
            font-size: 1.25rem; /* reduce from 1.5rem */
            font-weight: 700;
            margin-bottom: 0.5rem;
            color: var(--text-main);
            line-height: 1.2;
        }

        /* Subtitles should be clearly secondary and smaller than labels */
        .biz-section-subtitle {
            color: var(--text-secondary);
            font-size: 0.85rem; /* smaller than labels */
            margin-bottom: 1rem; /* tighten spacing */
            line-height: 1.3;
        }

        .biz-card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1.25rem;
            margin-bottom: 1.5rem;
            align-items: stretch;
        }

        .biz-card {
            background: var(--bg-surface);
            border-radius: var(--radius-lg);
            padding: 1.5rem;
            border: 1px solid var(--border-color);
            box-shadow: var(--shadow-sm);
            transition: all 0.2s ease;
            /* Make fields flow into columns when space permits */
            display: grid;
            grid-template-columns: 1fr;
            gap: 1rem;
        }

        .biz-card:hover {
            border-color: #cbd5e1;
            box-shadow: var(--shadow-md);
            transform: translateY(-1px);
        }

        .biz-field-group {
            margin-bottom: 1.25rem;
        }

        .biz-field-label {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 0.5rem;
            font-size: 0.95rem; /* slightly larger than section subtitle */
        }

        .biz-field-label i {
            color: var(--text-tertiary);
            font-size: 0.9em;
        }

        .biz-input, .biz-textarea, .biz-select {
            width: 100%;
            padding: 0.625rem 0.875rem;
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            font-size: 0.95rem;
            color: var(--text-main);
            transition: all 0.2s ease;
            font-family: inherit;
            background: #fff;
            box-sizing: border-box;
        }

        /* Intl-tel-input responsive fixes */
        .iti { width: 100%; display: block; }
        .iti input { width: 100% !important; }
        .iti__country-list { z-index: 1000; }

        /* Responsive contact fields grid */
        .biz-contact-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 1.25rem;
            width: 100%;
        }

        /* Display toggles grid */
        .biz-display-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(220px, 1fr));
            gap: 1rem 1.5rem;
            align-items: start;
            margin-bottom: 0.75rem;
        }

        .biz-input:focus, .biz-textarea:focus, .biz-select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-soft);
        }

        .biz-textarea {
            min-height: 100px;
            resize: vertical;
        }

        /* Responsive tweaks -------------------------------------------------- */
        @media (max-width: 900px) {
            .biz-modern-container {
                margin: 12px 12px;
                padding: 0.75rem;
                max-width: none;
            }

            .biz-tabs-container {
                grid-template-columns: 1fr; /* stack sidebar above content */
                gap: 12px;
            }

            .biz-nav-sidebar {
                position: relative;
                top: auto;
                display: flex;
                gap: 8px;
                overflow-x: auto;
                padding: 0.5rem;
            }

            .biz-nav-item { flex: 0 0 auto; }

            .biz-card-grid { grid-template-columns: 1fr; }

            .biz-card { grid-template-columns: 1fr; }
        }

        /* Responsive for display toggles */
        @media (max-width: 900px) {
            .biz-display-grid { grid-template-columns: 1fr; }
        }

        /* Logo preview styles */
        .biz-logo-preview {
            width: 150px;
            height: 80px;
            object-fit: contain;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            background: #fff;
            padding: 6px;
        }

        @media (min-width: 900px) {
            .biz-card { grid-template-columns: 1fr; }
            .biz-card-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
        }

        @media (min-width: 1400px) {
            .biz-modern-container { max-width: 1600px; }
            .biz-card-grid { grid-template-columns: repeat(3, 1fr); }
            .biz-card { grid-template-columns: repeat(2, 1fr); }
        }

        /* Compact inline toggle presentation */
        .biz-toggle-group {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 6px 4px;
            margin-bottom: 6px;
        }

        /* Larger label and icon, smaller neutral toggle (non-iOS) */
        .biz-toggle-label { font-weight:600; font-size:1rem; color:var(--text-main); display:flex; flex-direction:column; align-items:flex-start; gap:6px; flex:1; }
        .biz-toggle-label .biz-toggle-main { display:flex; align-items:center; gap:10px; }
        .biz-toggle-label i { font-size:16px; color:var(--text-tertiary); }
        .biz-toggle-note { font-size:0.85rem; color:var(--text-secondary); margin-top:2px; }

        .biz-toggle { width:36px; height:20px; border-radius:12px; position:relative; background:#f1f5f9; border:1px solid var(--border-color); transition:background .12s ease, border-color .12s; flex:0 0 auto; }
        .biz-toggle .biz-toggle-knob { position:absolute; top:2px; left:2px; width:16px; height:16px; background:#fff; border-radius:50%; box-shadow:0 1px 2px rgba(0,0,0,.06); transition:left .12s ease, box-shadow .12s; }
        .biz-toggle.on { background:var(--primary); border-color:var(--primary); }
        .biz-toggle.on .biz-toggle-knob { left:18px; box-shadow:0 2px 4px rgba(0,0,0,.12); }

        @media (max-width:700px) { .biz-display-grid { grid-template-columns: repeat(2, 1fr); } }

        .biz-logo-preview {
            width: 120px;
            height: 120px;
            border-radius: 16px;
            object-fit: cover;
            border: 3px solid var(--gray-200);
            margin-bottom: 12px;
        }

        .biz-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            border-radius: var(--radius-md);
            font-weight: 600;
            font-size: 0.875rem;
            cursor: pointer;
            transition: all 0.2s;
            border: 1px solid transparent;
            text-decoration: none;
            line-height: 1.25;
        }

        .biz-btn-primary {
            background: var(--primary);
            color: white;
            box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
        }

        .biz-btn-primary:hover {
            background: var(--primary-hover);
            transform: translateY(-1px);
            box-shadow: var(--shadow-sm);
        }

        .biz-btn-secondary {
            background: white;
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
        }

        .biz-btn-secondary:hover {
            border-color: #cbd5e1;
            color: var(--text-main);
            background: var(--bg-body);
        }

        .description {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-top: 0.4rem;
        }

        /* Match the exact style of .biz-field-label for visual consistency */
        .biz-global-toggle-note {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.95rem; /* match field label size */
            color: var(--text-main);
            margin-top: 6px;
            font-weight: 600;
            background: transparent;
            padding: 0;
            border-radius: 6px;
            border: none;
        }
        .biz-global-toggle-note i { color: var(--text-tertiary); font-size: 0.95rem; }

        /* Subsection title used for compact subsections inside cards - match field labels */
        .biz-subsection-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.95rem; /* match field labels */
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 0.5rem;
        }
        .biz-subsection-title i { color: var(--text-tertiary); font-size: 0.95rem; }

        @media (max-width: 1024px) {
            .biz-tabs-container {
                grid-template-columns: 1fr;
            }
            .biz-nav-sidebar {
                position: static;
                display: flex;
                overflow-x: auto;
                gap: 8px;
            }
            .biz-nav-item {
                white-space: nowrap;
                margin-bottom: 0;
            }
        }

        @media (max-width: 768px) {
            .biz-modern-header {
                flex-direction: column;
                gap: 20px;
                text-align: center;
            }
            .biz-card-grid {
                grid-template-columns: 1fr;
            }
        }




        .prefix-segment-tag {
            display: inline-flex;
            align-items: center;
            background-color: var(--bg-body);
            color: var(--text-main);
            padding: 0.25rem 0.75rem;
            margin: 0.25rem;
            border-radius: 9999px;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            border: 1px solid var(--border-color);
            transition: all 0.2s;
        }
        .prefix-segment-tag:hover {
            background-color: var(--primary-soft);
            color: var(--primary);
            border-color: var(--primary-soft);
        }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.6);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 100000;
        }
        .modal-content {
            background: #fff;
            padding: 0;
            border-radius: 12px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
            width: 90%;
            max-width: 800px;
            max-height: 90vh;
            overflow-y: auto;
            position: relative;
        }
        .invoice-preview-body {
            padding: 30px;
            border: 1px solid #f0f0f1;
            box-shadow: 0 0 10px rgba(0,0,0,0.05);
        }
        .close-button {
            position: absolute;
            top: 10px;
            right: 15px;
            font-size: 24px;
            cursor: pointer;
            color: #ccc;
            line-height: 1;
            z-index: 10;
        }
        .close-button:hover {
            color: var(--color-accent);
        }
        
        @media print {
            body * {
                visibility: hidden;
            }
            .invoice-preview-body, .invoice-preview-body * {
                visibility: visible;
            }
            .invoice-preview-body {
                position: absolute;
                left: 0;
                top: 0;
                width: 100%;
            }
            .close-button {
                display: none;
            }
        }
