/* ═══════════════════════════════════════════════════════════════════════════
   TUNAS TOYOTA - STUDIO FLYER & POSTER PROMO WHATSAPP (PRO STUDIO SUITE)
   Aesthetics: Executive Obsidian & Modern Glassmorphism, Precision Controls
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --flyer-bg-body: #f4f6fb;
    --flyer-primary: #c8102e;
    --flyer-primary-dark: #99001c;
    --flyer-toyota-red: #c8102e;
    --flyer-card-bg: #ffffff;
    --flyer-border: #e2e8f0;
    --flyer-text-main: #0f172a;
    --flyer-text-muted: #64748b;
    --flyer-shadow-card: 0 4px 20px rgba(15, 23, 42, 0.06);
    --flyer-shadow-hover: 0 12px 32px rgba(15, 23, 42, 0.12);
}

/* ── HEADER BANNER ── */
.flyer-header-banner {
    background: linear-gradient(135deg, #090e18 0%, #111827 50%, #2a111a 100%);
    color: #ffffff;
    border-radius: 20px;
    padding: 22px 28px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(9, 14, 24, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.flyer-header-banner::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(200, 16, 46, 0.22) 0%, rgba(200, 16, 46, 0) 70%);
    pointer-events: none;
}

.flyer-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 2;
}

.flyer-back-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.flyer-back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-3px);
    color: #ffffff;
}

.flyer-header-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 900;
    margin: 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flyer-header-subtitle {
    font-size: 12.5px;
    color: #94a3b8;
    margin: 4px 0 0;
}

.flyer-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    z-index: 2;
}

.flyer-header-actions .btn-header-action {
    width: auto !important;
    min-width: 0 !important;
    flex: none !important;
    padding: 9px 16px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    border-radius: 12px !important;
}

/* ── 2-COLUMN STUDIO WORKSPACE ── */
.flyer-studio-layout {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 26px;
    align-items: start;
    margin-bottom: 40px;
}

@media (min-width: 951px) {
    .flyer-studio-container {
        padding: 12px 18px 24px 18px !important;
        max-width: 1440px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    .flyer-header-banner {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 18px !important;
        margin-bottom: 12px !important;
        border-radius: 14px !important;
    }

    .flyer-header-left {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }

    .flyer-back-btn {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
        font-size: 14px !important;
    }

    .flyer-header-title {
        font-size: 16px !important;
        white-space: nowrap !important;
        margin: 0 !important;
    }

    .flyer-header-subtitle {
        font-size: 11px !important;
        margin: 2px 0 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 580px !important;
    }

    .flyer-header-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
    }

    .flyer-header-actions .btn-header-action {
        width: auto !important;
        min-width: 0 !important;
        flex: none !important;
        padding: 7px 14px !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
        border-radius: 9px !important;
    }

    .flyer-studio-layout {
        display: grid !important;
        grid-template-columns: 350px 1fr !important;
        gap: 18px !important;
        align-items: start !important;
        margin-bottom: 20px !important;
    }

    .flyer-artboard-column {
        position: sticky !important;
        top: 10px !important;
        z-index: 10 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .flyer-artboard-card {
        padding: 10px 12px !important;
        border-radius: 16px !important;
    }

    .flyer-ratio-switch {
        margin-bottom: 6px !important;
        padding: 2px !important;
        max-width: 250px !important;
    }

    .ratio-btn {
        padding: 5px 8px !important;
        font-size: 10.5px !important;
    }

    .flyer-canvas-wrapper {
        min-height: auto !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .flyer-preview-img {
        max-width: 100% !important;
        max-height: min(275px, calc(100vh - 340px)) !important;
        object-fit: contain !important;
        border-radius: 10px !important;
    }

    .flyer-zoom-hint {
        display: inline-flex !important;
        font-size: 9.5px !important;
        padding: 2px 8px !important;
        margin-top: 5px !important;
    }

    .flyer-res-info-tag {
        font-size: 9.5px !important;
        margin-top: 4px !important;
    }

    .flyer-artboard-column .flyer-main-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        margin-top: 2px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .flyer-artboard-column .btn-flyer-download,
    .flyer-artboard-column .btn-flyer-wa {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding: 8px 8px !important;
        font-size: 11.5px !important;
        font-weight: 800 !important;
        border-radius: 10px !important;
        white-space: nowrap !important;
        text-align: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    }

    .flyer-render-note {
        font-size: 9.5px !important;
        line-height: 1.35 !important;
        padding: 0 4px !important;
        margin-top: 2px !important;
    }

    .flyer-tabs-nav {
        margin-bottom: 12px !important;
        padding: 4px !important;
        border-radius: 14px !important;
    }

    .flyer-tab-btn {
        padding: 7px 10px !important;
        font-size: 11.5px !important;
    }

    .flyer-section-card {
        padding: 14px 16px !important;
        border-radius: 14px !important;
    }

    .flyer-card-header {
        margin-bottom: 12px !important;
        padding-bottom: 8px !important;
    }

    .flyer-card-icon {
        width: 30px !important;
        height: 30px !important;
        font-size: 13px !important;
    }

    .flyer-card-title {
        font-size: 13.5px !important;
    }

    .flyer-theme-grid {
        gap: 8px !important;
    }

    .theme-pill-box {
        padding: 8px 6px !important;
        border-radius: 10px !important;
    }

    .theme-preview-strip {
        height: 18px !important;
        margin-bottom: 4px !important;
    }
}

@media (min-width: 1360px) {
    .flyer-studio-layout {
        grid-template-columns: 350px 1fr !important;
        gap: 18px !important;
    }
    .flyer-preview-img {
        max-height: min(295px, calc(100vh - 340px)) !important;
    }
}

@media (max-width: 1120px) {
    .flyer-studio-layout {
        grid-template-columns: 410px 1fr;
        gap: 20px;
    }
}

@media (max-width: 950px) {
    .flyer-studio-layout {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════════════════════════
   KOLOM KIRI: ARTBOARD STAGE & CANVAS PREVIEW (STICKY)
   ══════════════════════════════════════════════════════════════════ */
.flyer-artboard-column {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@media (max-width: 950px) {
    .flyer-artboard-column {
        position: static;
    }
}

.flyer-artboard-card {
    background: #090e18;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.flyer-artboard-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* Format Switcher Pills inside Artboard */
.flyer-ratio-switch {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 99px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 16px;
    width: 100%;
    max-width: 380px;
    z-index: 2;
}

.ratio-btn {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 99px;
    color: #cbd5e1;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.ratio-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Device Mockup Shell */
.flyer-canvas-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    min-height: 480px;
}

.flyer-preview-img {
    max-width: 100%;
    max-height: 520px;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.flyer-res-info-tag {
    margin-top: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

/* Action Buttons under Canvas */
.flyer-main-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-flyer-download {
    width: 100%;
    padding: 14px 18px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
    transition: all 0.2s ease;
}

.btn-flyer-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
}

.btn-flyer-wa {
    width: 100%;
    padding: 13px 18px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
    transition: all 0.2s ease;
}

.btn-flyer-wa:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

/* ══════════════════════════════════════════════════════════════════
   KOLOM KANAN: STUDIO CONTROLS INSPECTOR & NAVIGATION TABS
   ══════════════════════════════════════════════════════════════════ */
.flyer-inspector-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Studio Tabs Navigation Bar */
.flyer-tabs-nav {
    display: flex;
    background: #ffffff;
    border-radius: 18px;
    border: 1.5px solid #e2e8f0;
    padding: 6px;
    gap: 6px;
    box-shadow: var(--flyer-shadow-card);
    overflow-x: auto;
    scrollbar-width: none;
}

.flyer-tabs-nav::-webkit-scrollbar {
    display: none;
}

.flyer-tab-btn {
    flex: 1;
    min-width: 110px;
    padding: 10px 14px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.flyer-tab-btn:hover {
    color: #0f172a;
    background: #f8fafc;
}

.flyer-tab-btn.active {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.flyer-tab-btn.active i {
    color: #38bdf8;
}

/* Tab Panes */
.flyer-tab-pane {
    display: none;
    flex-direction: column;
    gap: 18px;
    animation: fadeInTab 0.25s ease forwards;
}

.flyer-tab-pane.active {
    display: flex;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section Cards */
.flyer-section-card {
    background: var(--flyer-card-bg);
    border-radius: 20px;
    border: 1.5px solid var(--flyer-border);
    box-shadow: var(--flyer-shadow-card);
    padding: 20px 24px;
    transition: all 0.2s ease;
}

.flyer-section-card:hover {
    border-color: #cbd5e1;
}

.flyer-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.flyer-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.flyer-card-icon.red { background: #fee2e2; color: #dc2626; }
.flyer-card-icon.blue { background: #e0f2fe; color: #0284c7; }
.flyer-card-icon.purple { background: #f3e8ff; color: #7c3aed; }
.flyer-card-icon.amber { background: #fef3c7; color: #d97706; }
.flyer-card-icon.green { background: #dcfce7; color: #16a34a; }
.flyer-card-icon.dark { background: #0f172a; color: #f8fafc; }

.flyer-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--flyer-text-main);
    font-family: 'Outfit', sans-serif;
}

.flyer-card-sub {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 2px;
}

/* ── FORM ELEMENTS ── */
.flyer-field-group {
    margin-bottom: 14px;
}

.flyer-field-label {
    font-size: 11px;
    font-weight: 800;
    color: #475569;
    display: block;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flyer-input-text {
    width: 100%;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.flyer-input-text:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.flyer-input-textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    font-size: 12.5px;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    box-sizing: border-box;
    resize: vertical;
    min-height: 90px;
    font-family: inherit;
    line-height: 1.5;
}

.flyer-input-textarea:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

/* Mode Button Group (Pills) */
.flyer-pill-selector {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.pill-opt-btn {
    flex: 1;
    min-width: 90px;
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pill-opt-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Color Presets Grid */
.flyer-theme-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 600px) {
    .flyer-theme-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.theme-pill-box {
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.2s ease;
    user-select: none;
}

.theme-pill-box:hover {
    border-color: #94a3b8;
    transform: translateY(-2px);
}

.theme-pill-box.active {
    border-color: #7c3aed;
    background: #faf5ff;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.theme-preview-strip {
    height: 22px;
    border-radius: 8px;
    margin-bottom: 6px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}

.theme-pill-title {
    font-size: 11px;
    font-weight: 800;
    color: #1e293b;
    display: block;
}

/* Color Picker Row */
.flyer-color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 14px;
}

.color-input-circle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    cursor: pointer;
    padding: 0;
    background: transparent;
    -webkit-appearance: none;
}

.color-input-circle::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input-circle::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
}

/* File Upload Drag Box */
.flyer-upload-box {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.flyer-upload-box:hover {
    border-color: #7c3aed;
    background: #fbf9ff;
}

.flyer-upload-icon {
    font-size: 26px;
    color: #7c3aed;
    margin-bottom: 8px;
}

.flyer-upload-label {
    font-size: 12px;
    font-weight: 800;
    color: #1e293b;
    display: block;
}

.flyer-upload-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.flyer-upload-thumb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 8px 12px;
    margin-top: 10px;
}

.flyer-thumb-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #cbd5e1;
}

.btn-remove-thumb {
    margin-left: auto;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-remove-thumb:hover {
    background: #fca5a5;
}

/* Slider Controls */
.flyer-slider-wrap {
    margin-top: 10px;
}

.flyer-slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}

.flyer-slider-input {
    width: 100%;
    accent-color: #7c3aed;
    cursor: pointer;
}

/* Quick Tags */
.flyer-quick-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.tag-btn-preset {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-btn-preset:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Bonus Chips Grid */
.bonus-chips-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 600px) {
    .bonus-chips-grid {
        grid-template-columns: 1fr;
    }
}

.bonus-pill-check {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 11.5px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.bonus-pill-check:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.bonus-pill-check input[type="checkbox"] {
    accent-color: #7c3aed;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Car Slots Card */
.car-slot-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.car-slot-card.active {
    background: #ffffff;
    border-color: #7c3aed;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.08);
}

.car-slot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.car-slot-badge {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #e0f2fe;
    color: #0369a1;
}

/* Sales Profile Avatar Box */
.sales-avatar-upload-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 14px;
}

.sales-avatar-preview {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 3px solid #7c3aed;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
    background: #ffffff;
    flex-shrink: 0;
}

.sales-avatar-fallback {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 3px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #94a3b8;
    background: #ffffff;
    flex-shrink: 0;
}

/* QR Live Box */
.qr-preview-box {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 16px;
    margin-top: 10px;
}

.qr-thumb-box {
    width: 72px;
    height: 72px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.qr-thumb-box canvas,
.qr-thumb-box img {
    max-width: 100%;
    max-height: 100%;
}

/* Caption Preview */
.caption-preview-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    font-size: 12px;
    color: #334155;
    line-height: 1.6;
    max-height: 140px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: inherit;
    margin-bottom: 10px;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE GRID UTILITIES & MOBILE STUDIO OPTIMIZATIONS
   ══════════════════════════════════════════════════════════════════ */
.flyer-studio-container {
    max-width: 1320px;
    margin: 0 auto;
    min-height: 100vh;
    background: #f4f6fb;
    padding: 16px 18px 100px;
    box-sizing: border-box;
}

.flyer-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.flyer-grid-sliders {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.flyer-scale-reset-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-top: 10px;
}

.flyer-scale-reset-wrap .flyer-slider-wrap {
    flex: 1;
    margin-top: 0;
}

.btn-reset-pos {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 38px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.btn-reset-pos:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Mobile Quick Floating Action Bar */
.flyer-mobile-bottom-bar {
    display: none;
}

/* Tab Label Toggle */
.tab-label-short {
    display: none;
}
.tab-label-full {
    display: inline;
}

.flyer-zoom-hint {
    display: none;
}

/* Fullscreen Zoom Modal */
.flyer-zoom-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(4, 7, 14, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px;
    animation: fadeInModal 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.flyer-zoom-modal-dialog {
    width: 100%;
    max-width: 460px;
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #090e18;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
    overflow: hidden;
}

.flyer-zoom-modal-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #111827;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.flyer-zoom-modal-title {
    font-size: 13px;
    font-weight: 800;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flyer-zoom-close-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.flyer-zoom-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.flyer-zoom-modal-body {
    flex: 1;
    width: 100%;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px;
    background: radial-gradient(circle at 50% 50%, #1e1b4b 0%, #090e18 80%);
}

.flyer-zoom-modal-img {
    max-width: 100%;
    max-height: 68vh;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.12);
    object-fit: contain;
}

.flyer-zoom-modal-footer {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 14px;
    background: #111827;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── TABLET BREAKPOINT (<= 950px) ── */
@media (max-width: 950px) {
    .flyer-studio-layout {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        gap: 16px;
        margin-bottom: 24px;
    }

    .flyer-artboard-column {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        position: static !important;
    }

    .flyer-inspector-column {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        min-width: 0 !important;
    }
}

/* ── MOBILE BREAKPOINT (<= 768px, Samsung Galaxy, iPhone XR, etc.) ── */
@media (max-width: 768px) {
    /* Prevent iOS Safari 16px input auto-zoom */
    .flyer-input-text,
    .flyer-input-textarea,
    select.flyer-input-text,
    input[type="text"],
    input[type="number"],
    input[type="tel"] {
        font-size: 16px !important;
    }

    /* STRICT GLOBAL VIEWPORT LOCKDOWN - ZERO HORIZONTAL SPILL */
    html, body {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .desktop-shell,
    .desktop-content {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }

    .mobile-app,
    .flyer-studio-container {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        padding: 8px 8px !important;
        padding-top: max(8px, env(safe-area-inset-top)) !important;
        padding-left: max(8px, env(safe-area-inset-left)) !important;
        padding-right: max(8px, env(safe-area-inset-right)) !important;
        padding-bottom: calc(105px + env(safe-area-inset-bottom, 24px)) !important;
    }

    .flyer-header-banner {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 14px !important;
        border-radius: 16px !important;
        margin-bottom: 10px !important;
        gap: 8px !important;
    }

    .flyer-header-left {
        gap: 10px;
        width: 100%;
    }

    .flyer-back-btn {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 14px;
        flex-shrink: 0;
    }

    .flyer-header-title {
        font-size: 14.5px;
        line-height: 1.25;
    }

    .flyer-header-subtitle {
        display: none !important;
    }

    /* Hide redundant header action buttons on mobile — sticky bottom bar handles downloads & share */
    .flyer-header-actions {
        display: none !important;
    }

    .flyer-studio-layout {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }

    .flyer-artboard-column {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin: 0 auto !important;
    }

    /* THE ARTBOARD CARD - PERFECTLY CONFINED & CENTERED ON ALL SCREENS */
    .flyer-artboard-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 8px 10px !important;
        border-radius: 18px !important;
        background: radial-gradient(circle at 50% 15%, #2a111a 0%, #090e18 80%) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35) !important;
        margin: 0 auto 10px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        overflow: hidden !important;
    }

    .flyer-ratio-switch {
        width: 100% !important;
        max-width: 250px !important;
        margin: 0 auto 8px !important;
        padding: 2px !important;
        gap: 3px !important;
        box-sizing: border-box !important;
        display: flex !important;
        justify-content: center !important;
    }

    .ratio-btn {
        flex: 1 1 50% !important;
        padding: 6px 8px !important;
        font-size: 11px !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .flyer-canvas-wrapper {
        min-height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 auto !important;
        padding: 2px 0 !important;
        text-align: center !important;
    }

    /* Compact, perfectly centered preview image */
    .flyer-preview-img {
        display: block !important;
        margin: 0 auto !important;
        max-height: 235px !important;
        width: auto !important;
        max-width: 85% !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.75), 0 0 0 2px #334155, 0 0 0 3px rgba(255, 255, 255, 0.12) !important;
        cursor: pointer !important;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
        box-sizing: border-box !important;
        object-fit: contain !important;
    }

    .flyer-preview-img:active {
        transform: scale(0.97) !important;
    }

    .flyer-zoom-hint {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
        margin: 6px auto 0 !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #ef4444 !important;
        background: rgba(239, 68, 68, 0.12) !important;
        border: 1px solid rgba(239, 68, 68, 0.28) !important;
        padding: 3px 10px !important;
        border-radius: 99px !important;
        cursor: pointer !important;
        transition: all 0.15s ease !important;
    }

    .flyer-zoom-hint:active {
        background: rgba(239, 68, 68, 0.22) !important;
        transform: scale(0.96) !important;
    }

    .flyer-res-info-tag {
        font-size: 9px !important;
        color: #64748b !important;
        margin: 4px auto 0 !important;
        text-align: center !important;
        justify-content: center !important;
        width: 100% !important;
    }

    /* Hide duplicate middle action block on mobile */
    .flyer-main-actions {
        display: none !important;
    }

    .flyer-render-note {
        display: none !important;
    }

    /* Responsive Tab Labels Toggle */
    .tab-label-full {
        display: none !important;
    }

    .tab-label-short {
        display: inline !important;
    }

    /* INSPECTOR CONTROLS COLUMN */
    .flyer-inspector-column {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        min-width: 0 !important;
    }

    /* Sticky Mobile Navigation Tabs Bar */
    .flyer-tabs-nav {
        position: sticky !important;
        top: max(6px, env(safe-area-inset-top)) !important;
        z-index: 60 !important;
        background: rgba(255, 255, 255, 0.96) !important;
        backdrop-filter: blur(14px) !important;
        -webkit-backdrop-filter: blur(14px) !important;
        border-radius: 14px !important;
        padding: 4px !important;
        box-shadow: 0 4px 18px rgba(15, 23, 42, 0.1) !important;
        display: flex !important;
        gap: 4px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .flyer-tabs-nav::-webkit-scrollbar {
        display: none !important;
    }

    .flyer-tab-btn {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        padding: 8px 3px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        gap: 3px !important;
        border-radius: 10px !important;
        text-align: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        text-overflow: clip !important;
    }

    .flyer-tab-btn i {
        font-size: 12px !important;
    }

    .flyer-tab-pane {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .flyer-section-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        padding: 14px 12px !important;
        border-radius: 16px !important;
    }

    .flyer-theme-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Fixed Sticky Mobile Bottom Bar - Stretched edge to edge with exact safe area */
    .flyer-mobile-bottom-bar {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        background: rgba(9, 14, 24, 0.96) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        padding: 10px 12px !important;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 24px)) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4) !important;
        z-index: 9999 !important;
        box-sizing: border-box !important;
    }

    .btn-mobile-action {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding: 12px 8px !important;
        border-radius: 12px !important;
        border: none !important;
        font-size: 12.5px !important;
        font-weight: 800 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        cursor: pointer !important;
        min-height: 44px !important;
        transition: transform 0.15s ease, opacity 0.15s ease !important;
        text-decoration: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .btn-mobile-action:active {
        transform: scale(0.97) !important;
    }

    .btn-mobile-action.wa {
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3) !important;
    }

    .btn-mobile-action.download {
        background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35) !important;
    }

    /* Native touch-friendly range sliders on iOS */
    .flyer-slider-input {
        -webkit-appearance: none;
        appearance: none;
        height: 7px;
        border-radius: 99px;
        background: #e2e8f0;
        outline: none;
    }

    .flyer-slider-input::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: #c8102e;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(200, 16, 46, 0.45);
        border: 2px solid #ffffff;
    }
}

/* ── PHONE BREAKPOINT (<= 640px) ── */
@media (max-width: 640px) {
    .flyer-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 10px;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .flyer-section-card {
        padding: 14px 12px;
        border-radius: 16px;
    }

    .flyer-card-header {
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .flyer-card-title {
        font-size: 13.5px;
    }

    .flyer-card-sub {
        font-size: 10.5px;
    }

    /* Horizontal scroll for pills so labels like 'Warna Solid' never truncate */
    .flyer-pill-selector {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        gap: 6px !important;
        padding: 4px !important;
        background: #f1f5f9;
        border-radius: 12px;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .flyer-pill-selector::-webkit-scrollbar {
        display: none !important;
    }

    .pill-opt-btn {
        flex: 0 0 auto !important;
        min-width: max-content !important;
        padding: 8px 12px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
        border-radius: 8px;
    }

    #tonePillSelector {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    #carLayoutPills {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ── NARROW MOBILE / IPHONE XR / SE / SAMSUNG GALAXY (<= 430px) ── */
@media (max-width: 430px) {
    .flyer-studio-container {
        padding: 6px 6px !important;
        padding-top: max(6px, env(safe-area-inset-top)) !important;
        padding-left: max(6px, env(safe-area-inset-left)) !important;
        padding-right: max(6px, env(safe-area-inset-right)) !important;
        padding-bottom: calc(105px + env(safe-area-inset-bottom, 30px)) !important;
    }

    .flyer-header-banner {
        padding: 10px 12px !important;
        margin-bottom: 8px !important;
    }

    .flyer-header-title {
        font-size: 13.5px !important;
    }

    .flyer-artboard-card {
        padding: 8px 6px 6px !important;
        border-radius: 14px !important;
        margin-bottom: 8px !important;
    }

    .flyer-preview-img {
        max-height: 220px !important;
    }

    .flyer-ratio-switch {
        max-width: 230px !important;
        margin: 0 auto 6px !important;
        padding: 2px !important;
    }

    .ratio-btn {
        padding: 5px 6px !important;
        font-size: 10.5px !important;
    }

    .flyer-grid-sliders {
        grid-template-columns: 1fr !important;
        gap: 8px;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .flyer-scale-reset-wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .btn-reset-pos {
        width: 100% !important;
        justify-content: center;
        min-height: 40px;
    }

    .sales-avatar-upload-wrap {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 12px 10px;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .sales-avatar-upload-wrap > div {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100% !important;
    }

    .sales-avatar-upload-wrap div[style*="display:flex"] {
        justify-content: center;
        width: 100% !important;
    }

    .qr-preview-box {
        flex-direction: column;
        text-align: center;
        padding: 12px 10px;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .color-input-circle {
        width: 38px;
        height: 38px;
    }

    .flyer-tab-btn {
        padding: 7px 2px !important;
        font-size: 10.5px !important;
    }
}

@media (max-width: 375px) {
    .flyer-preview-img {
        max-height: 205px !important;
    }
    .flyer-tab-btn {
        padding: 6px 1px !important;
        font-size: 10px !important;
    }
}

