/* ==================== PASSKEY STYLES ==================== */
.passkey-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.passkey-overlay.hidden {
    display: none;
}

.passkey-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 50px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 400px;
    width: 90%;
}

.passkey-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.passkey-box h2 {
    color: #ffffff;
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 700;
}

.passkey-box p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 30px;
    font-size: 14px;
}

#passkeyInput {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 18px;
    text-align: center;
    letter-spacing: 5px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

#passkeyInput:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

#passkeyInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: normal;
}

#passkeySubmit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

#passkeySubmit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

#passkeySubmit:active {
    transform: translateY(0);
}

.passkey-error {
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 15px;
    min-height: 20px;
}

/* ==================== BASE STYLES ==================== */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-sidebar: #ffffff;
    --bg-app: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-focus: #2563eb;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --transition: all 0.2s ease;
}

[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --bg-sidebar: #0f172a;
    --bg-app: #020617;
    --bg-card: #1e293b;
    --border: #334155;
    --border-focus: #3b82f6;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: var(--bg-app);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100%;
}

.sidebar {
    width: 340px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 10;
    flex-shrink: 0;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    backdrop-filter: blur(10px);
}

.sidebar-header h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

.sidebar-header p {
    margin: 2px 0 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    color: white;
}

.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }
[data-theme="dark"] .theme-toggle .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }

/* Modern Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-sm);
}

.controls {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--bg-app);
}

.section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0 4px;
    margin-top: 6px;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.5px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input, select, textarea {
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    width: 100%;
    font-family: inherit;
    background: var(--bg-sidebar);
    color: var(--text);
    transition: var(--transition);
}

input:hover, select:hover, textarea:hover {
    border-color: var(--text-muted);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea { 
    resize: vertical; 
    min-height: 60px;
}

/* File Input Styling */
.file-input {
    padding: 8px;
    background: var(--bg-app);
    cursor: pointer;
}

.or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 600;
    margin: 4px 0;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    padding: 0;
    border: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-lg);
}

/* Color input styling */
input[type="color"] {
    padding: 4px 8px;
    height: 44px;
    cursor: pointer;
    -webkit-appearance: none;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-sidebar);
    transition: var(--transition);
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

input[type="color"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.color-inputs {
    display: flex;
    gap: 10px;
}

.color-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.color-group label {
    font-size: 11px;
}

.color-group input[type="color"] {
    width: 100%;
    height: 36px;
    border-radius: var(--radius-sm);
}

.dual-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dual-inputs .control-group {
    margin-bottom: 0;
}

.dual-inputs .range-value {
    display: block;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-top: 4px;
}

/* Flip Buttons */
.flip-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.flip-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-sidebar);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.flip-btn:hover {
    border-color: var(--primary);
    background: var(--bg-app);
}

.flip-btn.active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.flip-btn.reset {
    background: var(--bg-app);
}

.flip-btn.reset:hover {
    background: rgba(37, 99, 235, 0.1);
}

.help-text {
    font-size: 11px;
    color: var(--text-light);
    margin: 4px 0 0;
    line-height: 1.4;
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.text-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-hover);
}

.actions {
    padding: 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-sidebar);
    display: flex;
    gap: 10px;
}

.secondary-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-btn-secondary, white);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.secondary-btn:hover {
    background: var(--bg-btn-secondary-hover, #f9fafb);
}

.primary-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.primary-btn:hover {
    background: #1d4ed8;
}

.mobile-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    cursor: pointer;
    align-items: center;
    gap: 8px;
}

.mobile-only {
    display: none;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0 8px;
    line-height: 1;
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .mobile-toggle {
        display: flex;
    }

    .mobile-only {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    .sidebar.open {
        transform: translateY(0);
    }

    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
    }

    .sidebar-header h1 {
        font-size: 18px;
    }

    .sidebar-header p {
        font-size: 12px;
    }

    .preview-area {
        width: 100%;
        height: 100vh;
        padding: 20px;
    }
}

.preview-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #e5e5e5;
    overflow: hidden;
    position: relative;
}

.canvas-wrapper {
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    background: white;
    /* Scale down to fit screen */
    transform-origin: center center;
    width: 1080px;
    height: 1080px;
    /* Initially scaled down via JS */
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    gap: 15px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#renderTarget {
    width: 100%;
    height: 100%;
    background: white;
}

.zoom-controls {
    position: absolute;
    bottom: 6px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    pointer-events: none;
}

.help-text {
    font-size: 12px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

#dynamicContent > div {
    margin-bottom: 10px;
}
/* Choices.js overrides */
.choices {
    position: relative !important;
}

.choices__inner {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px;
    min-height: 42px;
    padding: 4px 8px;
    color: var(--text) !important;
}

.choices__list--dropdown {
    z-index: 100;
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border) !important;
}

.choices__list--dropdown .choices__list {
    max-height: 300px;
    overflow-y: auto;
}

.choices__item {
    font-size: 14px;
    color: var(--text) !important;
}

.choices__item--selectable.is-highlighted {
    background-color: var(--bg-btn-secondary-hover, #f3f4f6) !important;
}

.choices[data-type*="select-one"] .choices__input {
    background-color: var(--bg-input, #f3f4f6) !important;
    border-radius: 4px;
    color: var(--text) !important;
}

.choices__placeholder {
    color: var(--text-muted) !important;
}

.choices[data-type*="select-one"]::after {
    border-color: var(--text-muted) transparent transparent transparent !important;
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.text-btn:hover {
    color: #1d4ed8;
}

/* Mode Buttons */
.mode-buttons {
    display: flex;
    gap: 8px;
}

.mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-sidebar);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.mode-btn:hover {
    border-color: var(--primary);
    background: var(--bg-app);
    color: var(--text);
}

.mode-btn.active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.mode-btn svg {
    flex-shrink: 0;
}

/* Date Inputs */
.date-inputs {
    display: flex;
    gap: 6px;
}

.date-inputs input {
    flex: 1;
    text-align: center;
}

.date-inputs select {
    flex: 1.5;
}

/* Image Controls Box */
.image-controls-box {
    background: var(--bg-app);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-top: 10px;
    border: 1px solid var(--border);
}

.image-controls-box .control-group {
    margin-bottom: 10px;
}

.image-controls-box .control-group:last-child {
    margin-bottom: 0;
}

.range-value {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-top: 4px;
}

.image-controls {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

/* Dark mode button styles */
[data-theme="dark"] {
    --bg-input: #374151;
    --bg-input-focus: #4b5563;
    --bg-btn-secondary: #374151;
    --bg-btn-secondary-hover: #4b5563;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--bg-btn-secondary-hover, #f9fafb);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}

/* ==================== GUIDE POPUP STYLES ==================== */
.guide-avatar {
    position: fixed;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8px 14px 8px 10px;
    border-radius: 25px;
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.35);
    transition: all 0.3s ease;
}

.guide-avatar:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.45);
}

.avatar-icon {
    font-size: 20px;
}

.avatar-text {
    font-size: 13px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.guide-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.guide-modal.active {
    display: flex;
}

.guide-content {
    background: var(--bg-sidebar);
    border-radius: 20px;
    max-width: 550px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.guide-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-app);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.guide-close:hover {
    background: var(--primary);
    color: white;
}

.guide-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px 20px;
    text-align: center;
    border-radius: 20px 20px 0 0;
}

.guide-avatar-large {
    font-size: 45px;
    margin-bottom: 8px;
}

.guide-header h2 {
    margin: 0;
    font-size: 24px;
    color: white;
    font-weight: 700;
}

.guide-header p {
    margin: 5px 0 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.guide-body {
    padding: 25px;
}

.guide-section {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.guide-section:last-of-type {
    border-bottom: none;
}

.guide-icon {
    width: 45px;
    height: 45px;
    background: var(--bg-app);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.guide-text h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.guide-text p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.guide-tip {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 13px;
    color: var(--text);
    margin-top: 10px;
    border-left: 4px solid #667eea;
}

/* ==================== IMPROVED SIDEBAR STYLES ==================== */
.sidebar {
    width: 360px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 10;
    flex-shrink: 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
}

.sidebar-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: sticky;
    top: 0;
    z-index: 20;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.sidebar-header p {
    margin: 3px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.controls {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-app);
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0 6px;
    margin-top: 8px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--primary);
    border-image: linear-gradient(90deg, var(--primary), transparent) 1;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-sidebar);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.control-group:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.control-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
}

input, select, textarea {
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    font-family: inherit;
    background: var(--bg-app);
    color: var(--text);
    transition: var(--transition);
}

.actions {
    padding: 18px;
    border-top: 1px solid var(--border);
    background: var(--bg-sidebar);
    display: flex;
    gap: 12px;
    position: sticky;
    bottom: 0;
}

.primary-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 14px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.secondary-btn {
    background: var(--bg-app);
    border: 2px solid var(--border);
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
}

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

/* Switch Label Styling */
.switch-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
}

.switch-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.switch-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* Mobile Responsive Guide */
@media (max-width: 768px) {
    .guide-avatar {
        padding: 6px 10px 6px 8px;
        top: 10px;
        right: 10px;
    }
    
    .avatar-icon {
        font-size: 18px;
    }
    
    .avatar-text {
        font-size: 12px;
    }
    
    .guide-content {
        max-height: 90vh;
        border-radius: 15px;
    }
    
    .guide-header {
        padding: 20px;
    }
    
    .guide-body {
        padding: 15px;
    }
    
    .guide-section {
        flex-direction: column;
        gap: 10px;
    }
}

