/* ==========================================================================
   QR STUDIO - CORE DESIGN SYSTEM (FASE 3)
   ========================================================================== */

:root {
    --bg-dark: #090d16;
    --bg-surface: #111827;
    --bg-input: #1f2937;
    --brand-electric: #6366f1;
    --brand-electric-hover: #4f46e5;
    --brand-emerald: #10b981;
    --brand-emerald-hover: #059669;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-glow: #1e293b;
    --radius-lg: 16px;
    --radius-md: 8px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.workspace-container {
    width: 100%;
    max-width: 1100px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.app-header {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border-glow);
    padding-bottom: 20px;
}

.logo-wrapper { width: 320px; }

.studio-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 35px;
    align-items: start;
}

@media (max-width: 900px) {
    .studio-layout { grid-template-columns: 1fr; }
}

.studio-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4);
}

.margin-top-20 { margin-top: 20px; }

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.card-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.step-badge {
    background: var(--brand-electric);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.studio-input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    transition: var(--transition);
    box-sizing: border-box;
}

.studio-input:focus {
    outline: none;
    border-color: var(--brand-electric);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Envoltorio especial para inputs de color estéticos */
.color-picker-wrapper {
    background-color: var(--bg-input);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    padding: 6px;
    display: flex;
    align-items: center;
    height: 44px;
    box-sizing: border-box;
}

input[type="color"] {
    border: none;
    background: none;
    width: 100%;
    height: 100%;
    padding: 0;
    cursor: pointer;
    border-radius: 4px;
}

button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--brand-electric);
    color: white;
    margin-top: 25px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    background-color: var(--brand-electric-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--brand-emerald);
    color: white;
    margin-top: 20px;
}

.btn-secondary:hover:not(:disabled) { background-color: var(--brand-emerald-hover); }
.btn-secondary:disabled {
    background-color: #334155;
    color: #64748b;
    cursor: not-allowed;
}

.preview-panel { height: 100%; }
.sticky-viewport { position: sticky; top: 40px; }
.viewport-card {
    background-color: #0b0f17;
    border: 2px dashed var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 340px;
}

.canvas-box { display: flex; justify-content: center; align-items: center; }
.canvas-box svg { border-radius: 8px; }
.engine-placeholder { text-align: center; color: var(--text-muted); }
.engine-placeholder p { margin: 0 0 5px 0; font-size: 15px; font-weight: 500; }
.engine-placeholder .sub-text { font-size: 12px; color: #4b5563; }

/* Añadir al final del archivo style.css anterior o actualizar las clases existentes */

.input-tip {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
}

.studio-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    outline: none;
    margin: 15px 0;
}

.studio-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand-electric);
    cursor: pointer;
    transition: var(--transition);
}

.studio-slider::-webkit-slider-thumb:hover {
    background: var(--brand-electric-hover);
    transform: scale(1.1);
}

.flex-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-electric);
    cursor: pointer;
}

.label-inline {
    margin-bottom: 0 !important;
    cursor: pointer;
    user-select: none;
}