/* ==========================================
   CONFIGURACIÓN PROFESIONAL - ÓpticaPro
   Rediseño total de interfaz sin cambiar IDs ni lógica de config.js.
   ========================================== */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #0f172a;
    --accent: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-main: #f6f8fc;
    --bg-card: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --text-gray: #475569;
    --border: #e2e8f0;
    --border-soft: rgba(226, 232, 240, 0.78);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 14px 34px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 28px 80px rgba(15, 23, 42, 0.20);
    --transition: all 0.24s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }
body {
    background: var(--bg-main);
    color: var(--text-dark);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ==========================================
   SIDEBAR
   ========================================== */
.sidebar.futuristic-sidebar {
    width: 318px;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 34%),
        linear-gradient(180deg, #0b1730 0%, #07111f 52%, #020617 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    border-right: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 18px 0 50px rgba(2, 6, 23, 0.26);
    z-index: 50;
}
.sidebar.futuristic-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045), transparent 30%),
        repeating-linear-gradient(180deg, transparent 0, transparent 76px, rgba(255,255,255,0.027) 77px);
}
.sidebar.futuristic-sidebar > * { position: relative; z-index: 1; }
.sidebar-header {
    min-height: 142px;
    padding: 1.35rem 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.2));
}
.brand-wrap { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo-shell {
    width: 72px;
    height: 72px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.52);
    box-shadow: 0 16px 38px rgba(2, 6, 23, 0.42), 0 0 0 5px rgba(59, 130, 246, 0.12);
}
.brand-logo-fallback { font-size: 2rem; }
.brand-copy { min-width: 0; }
.brand-name {
    font-size: 1.5rem;
    line-height: 1.05;
    font-weight: 950;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 198px;
}
.brand-subtitle {
    margin-top: 7px;
    font-size: 0.72rem;
    line-height: 1.2;
    color: #7dd3fc;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}
.nav-scroll-area { padding: 1rem 0.95rem 1.25rem; overflow-y: auto; flex: 1; }
.nav-section { padding: 1.15rem 0.55rem 0.55rem; }
.nav-section span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(203, 213, 225, 0.66);
    font-weight: 950;
}
.nav-section span::before {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, transparent);
}
.nav-item {
    position: relative;
    min-height: 66px;
    margin: 6px 0;
    padding: 0.78rem 1rem;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: center;
    border-radius: 18px;
    color: rgba(226, 232, 240, 0.80);
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 850;
    transition: var(--transition);
    border: 1px solid transparent;
}
.nav-icon {
    grid-row: 1 / 3;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.16rem;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.06);
}
.nav-label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-mini {
    color: rgba(203, 213, 225, 0.56);
    font-size: 0.76rem;
    font-weight: 650;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-item:hover {
    color: #ffffff;
    transform: translateX(4px);
    background: rgba(37, 99, 235, 0.22);
    border-color: rgba(96, 165, 250, 0.22);
}
.nav-item.active {
    color: #ffffff;
    border-color: rgba(96, 165, 250, 0.55);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.86), rgba(14, 116, 144, 0.58));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 12px 28px rgba(37, 99, 235, 0.24);
}
.nav-item.active::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 22px;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #67e8f9;
    box-shadow: 0 0 15px rgba(103,232,249,0.8);
}
.nav-item.active .nav-mini { color: rgba(226, 232, 240, 0.82); }
.nav-item.active .nav-icon { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.2); }
.nav-back { margin-bottom: 0.4rem; }
.sidebar-note {
    margin: 0 16px 18px;
    padding: 1rem;
    border-radius: 18px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255,255,255,0.09);
    font-size: 0.84rem;
    line-height: 1.45;
}
.sidebar-note strong { display: block; color: #ffffff; margin-bottom: 0.35rem; }
.sidebar-note span { color: #aebdd1; }

/* ==========================================
   LAYOUT PRINCIPAL
   ========================================== */
.main-wrapper { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.topbar {
    min-height: 78px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    z-index: 40;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.topbar-date { font-weight: 850; color: #64748b; font-size: 1rem; }
.topbar-actions { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
.btn-topbar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    font-weight: 850;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    white-space: nowrap;
}
.btn-topbar:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #bfdbfe; color: var(--primary); }
.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    font-weight: 900;
    color: #2563eb;
    white-space: nowrap;
    max-width: 38vw;
    overflow: hidden;
    text-overflow: ellipsis;
}
.content-area {
    flex: 1;
    padding: 1.55rem;
    overflow-y: auto;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.10), transparent 34%), linear-gradient(180deg,#f8fbff 0%, #f6f8fc 45%, #eef4ff 100%);
}
.btn-menu-mobile { display: none; background: transparent; border: none; color: var(--primary); cursor: pointer; padding: 5px; margin-right: 10px; }
.sidebar-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.52); z-index: 9998; display: none; opacity: 0; transition: opacity 0.3s ease; backdrop-filter: blur(2px); }
.sidebar-overlay.active { display: block; opacity: 1; }

/* ==========================================
   COMAND CENTER
   ========================================== */
.config-command-center {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(440px, 0.92fr);
    gap: 1.25rem;
    align-items: stretch;
    margin-bottom: 1.25rem;
}
.config-command-copy,
.config-command-actions,
.config-stage,
.premium-card {
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--border-soft);
    border-radius: 26px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
}
.config-command-copy {
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    min-height: 190px;
}
.config-command-copy::after {
    content: "";
    position: absolute;
    right: -54px;
    top: -70px;
    width: 230px;
    height: 230px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(37,99,235,0.16), transparent 70%);
}
.eyebrow {
    display: inline-flex;
    margin-bottom: 0.75rem;
    color: #2563eb;
    font-size: 0.76rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}
.config-command-copy h1 {
    font-size: clamp(2.25rem, 4.2vw, 4rem);
    line-height: 0.96;
    letter-spacing: -0.062em;
    color: #0f172a;
    margin-bottom: 0.9rem;
    max-width: 920px;
}
.config-command-copy p {
    max-width: 850px;
    color: #64748b;
    font-size: 1.05rem;
    line-height: 1.56;
    font-weight: 600;
}
.config-command-actions {
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
.command-card {
    width: 100%;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 0.95rem;
    align-items: center;
    text-align: left;
    padding: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}
.command-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #bfdbfe; }
.command-card.active { border-color: rgba(37, 99, 235, 0.45); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.09), var(--shadow-sm); background: linear-gradient(135deg, #ffffff, #eff6ff); }
.command-card strong { display: block; font-size: 1rem; color: #0f172a; font-weight: 950; margin-bottom: 0.25rem; }
.command-card small { display: block; color: #64748b; font-size: 0.83rem; font-weight: 650; line-height: 1.35; }
.command-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border: 1px solid transparent;
}
.command-icon.blue { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1d4ed8; border-color: #93c5fd; }
.command-icon.purple { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); color: #7e22ce; border-color: #d8b4fe; }
.command-icon.green { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #15803d; border-color: #86efac; }

/* ==========================================
   PANELES
   ========================================== */
.config-stage { padding: 1.25rem; min-height: calc(100vh - 78px - 1.55rem - 1.55rem - 216px); }
.config-panel { display: none; animation: panelFade 0.22s ease both; }
.config-panel.active { display: block; }
@keyframes panelFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.45rem 0.35rem 1.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.25rem;
}
.panel-kicker { display: inline-flex; margin-bottom: 0.45rem; color: #2563eb; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 950; }
.panel-heading h2 { color: #0f172a; font-size: clamp(1.6rem, 2.4vw, 2.35rem); letter-spacing: -0.045em; line-height: 1; margin-bottom: 0.45rem; }
.panel-heading p { color: #64748b; max-width: 760px; line-height: 1.48; font-weight: 600; }
.config-panel-grid { display: grid; gap: 1.25rem; }
.empresa-layout { grid-template-columns: minmax(320px, 0.8fr) minmax(500px, 1.4fr); }
.professional-layout { grid-template-columns: minmax(380px, 0.95fr) minmax(420px, 1.05fr); }
.premium-card { padding: 1.35rem; transition: var(--transition); position: relative; }
.premium-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.section-focus { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08); }
.card-header-pro { display: flex; gap: 1rem; align-items: flex-start; padding-bottom: 1.18rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--border); }
.card-header-pro.compact { padding-bottom: 1rem; margin-bottom: 1.1rem; }
.card-header-pro.no-border { border-bottom: 0; padding-bottom: 0; }
.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 1.5rem;
    border: 1px solid transparent;
}
.card-icon.blue { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1d4ed8; border-color: #93c5fd; }
.card-icon.purple { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); color: #7e22ce; border-color: #d8b4fe; }
.card-icon.green { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #15803d; border-color: #86efac; }
.card-icon.soft { background: #f8fafc; color: #2563eb; border-color: #e2e8f0; }
.card-title { font-size: 1.24rem; font-weight: 950; color: #0f172a; margin-bottom: 0.25rem; letter-spacing: -0.03em; }
.card-subtitle { color: #64748b; font-size: 0.92rem; line-height: 1.45; font-weight: 600; }

/* ==========================================
   FORMULARIOS
   ========================================== */
.form-grid { display: grid; gap: 1rem; }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: 1 / -1; }
.form-group { width: 100%; }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }
.form-label {
    display: block;
    font-size: 0.76rem;
    font-weight: 950;
    margin-bottom: 0.48rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.form-control {
    width: 100%;
    min-height: 50px;
    padding: 0.82rem 0.98rem;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    font-size: 0.96rem;
    font-family: inherit;
    transition: var(--transition);
    background: #f8fafc;
    color: #0f172a;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}
.form-control:hover { border-color: #cbd5e1; background: #ffffff; }
.form-control:focus { outline: none; border-color: #2563eb; background: #ffffff; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12); }
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
    cursor: pointer;
}
.helper-text { font-size: 0.83rem; color: #64748b; margin-top: 0.65rem; line-height: 1.45; }
.info-strip {
    margin-top: 1.2rem;
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 1rem;
    padding: 1rem;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.info-strip strong { color: #0f172a; font-weight: 950; }
.info-strip span { color: #64748b; line-height: 1.45; font-weight: 600; }
.purple-strip { background: #faf5ff; border-color: #e9d5ff; }

/* ==========================================
   SUBIDA DE IMÁGENES
   ========================================== */
.upload-zone {
    border: 1.5px dashed #cbd5e1;
    border-radius: 22px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    padding: 1.35rem;
    text-align: center;
    transition: var(--transition);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.logo-zone { min-height: 390px; }
.signature-zone { min-height: 330px; }
.upload-zone:hover { border-color: #60a5fa; box-shadow: 0 0 0 4px rgba(96,165,250,0.10); }
.upload-placeholder { color: #64748b; margin-bottom: 1rem; }
.upload-icon { font-size: 2.6rem; line-height: 1; margin-bottom: 0.6rem; }
.upload-placeholder p { font-size: 0.93rem; line-height: 1.45; max-width: 420px; margin: 0 auto; font-weight: 600; }
.upload-preview { max-width: 100%; margin: 0 auto 1rem; object-fit: contain; }
.logo-preview { max-height: 190px; }
.firma-preview { max-height: 160px; mix-blend-mode: multiply; }
.upload-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ==========================================
   BOTONES
   ========================================== */
.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 0.58rem 0.98rem;
    border-radius: 13px;
    font-weight: 900;
    font-size: 0.88rem;
    background: #ffffff;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.btn-soft:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-soft-primary { color: #2563eb; border-color: #bfdbfe; }
.btn-soft-primary:hover { background: #eff6ff; border-color: #60a5fa; }
.btn-soft-danger { color: #ef4444; border-color: #fecaca; }
.btn-soft-danger:hover { background: #fef2f2; border-color: #f87171; }
.btn-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 0.86rem 1.3rem;
    border-radius: 14px;
    font-weight: 950;
    font-size: 0.98rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.24);
    text-decoration: none;
}
.btn-save:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(37, 99, 235, 0.30); }
.btn-save:disabled { background: #94a3b8; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-save-topbar { min-height: 44px; white-space: nowrap; }
.btn-panel-save { align-self: center; white-space: nowrap; }
.btn-open-converter { align-self: center; white-space: nowrap; }

/* ==========================================
   MIGRACIÓN
   ========================================== */
.migration-dashboard { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr); gap: 1.25rem; align-items: stretch; }
.migration-main-card {
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.10), transparent 34%), linear-gradient(180deg, rgba(255,255,255,0.98), rgba(240,253,244,0.78));
    border-color: #bbf7d0;
}
.migration-copy { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 1rem; align-items: flex-start; min-width: 0; }
.migration-icon {
    width: 64px;
    height: 64px;
    border-radius: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
    font-size: 1.65rem;
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.12);
}
.migration-text { min-width: 0; }
.migration-kicker {
    display: inline-flex;
    margin-bottom: 0.45rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.migration-copy h3 { color: #14532d; font-size: 1.28rem; font-weight: 950; margin-bottom: 0.4rem; }
.migration-copy p { color: #475569; line-height: 1.55; font-size: 0.98rem; max-width: 860px; font-weight: 600; }
.migration-checks { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1rem; }
.migration-checks span { display: inline-flex; align-items: center; gap: 6px; padding: 0.45rem 0.68rem; border-radius: 999px; background: #ffffff; border: 1px solid #dcfce7; color: #166534; font-size: 0.82rem; font-weight: 850; }
.migration-checks span::before { content: "✓"; font-weight: 950; color: #10b981; }
.migration-action-box { background: linear-gradient(180deg, #ffffff, #f8fafc); }
.btn-migration { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 12px 24px rgba(16, 185, 129, 0.22); white-space: normal; justify-content: center; width: 100%; margin-top: 0.5rem; }
.safety-list { margin-top: 1rem; display: grid; gap: 0.65rem; }
.safety-list div {
    display: grid;
    grid-template-columns: 30px 1fr;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    background: #ffffff;
}
.safety-list strong {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ecfdf5;
    color: #047857;
    font-weight: 950;
}
.safety-list span { color: #475569; font-weight: 750; }

/* ==========================================
   MODAL / TOAST
   ========================================== */
.modal-overlay { position: fixed; inset: 0; backdrop-filter: blur(3px); }
.progress-modal { background: #ffffff; border-radius: 24px; padding: 2.25rem; text-align: center; max-width: 470px; width: 90%; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.35); }
.progress-modal-icon { font-size: 3.2rem; margin-bottom: 0.8rem; }
.progress-modal h3 { color: #1e40af; font-size: 1.4rem; font-weight: 950; margin-bottom: 0.45rem; }
.progress-modal p { color: #64748b; font-size: 0.95rem; margin-bottom: 1.3rem; }
.progress-track { width: 100%; height: 22px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin-bottom: 1rem; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #2563eb, #10b981); transition: width 0.16s ease-out; }
#progress-percentage { font-size: 1.5rem; color: #0f172a; font-weight: 950; }
.toast-container { position: fixed; top: 22px; right: 22px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #ffffff; color: #0f172a; padding: 1rem 1.2rem; border-radius: 14px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px; font-weight: 850; font-size: 0.92rem; animation: slideInRight 0.28s ease forwards, fadeOut 0.34s ease 11.6s forwards; border-left: 5px solid #2563eb; max-width: 520px; line-height: 1.4; }
.toast.success { border-left-color: #10b981; }
.toast.error { border-left-color: #ef4444; }
.toast.warning { border-left-color: #f59e0b; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1280px) {
    .config-command-center { grid-template-columns: 1fr; }
    .config-command-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .command-card { grid-template-columns: 48px minmax(0, 1fr); }
    .command-icon { width: 48px; height: 48px; border-radius: 16px; }
    .empresa-layout, .professional-layout, .migration-dashboard { grid-template-columns: 1fr; }
    .logo-zone, .signature-zone { min-height: 270px; }
}
@media (max-width: 1024px) {
    body { display: flex !important; flex-direction: column !important; height: 100vh !important; }
    .btn-menu-mobile { display: block !important; }
    .sidebar.futuristic-sidebar { position: fixed !important; top: 0 !important; left: -330px !important; width: 318px !important; height: 100% !important; min-height: 100vh !important; z-index: 9999 !important; transition: left 0.3s cubic-bezier(0.4,0,0.2,1) !important; }
    .sidebar.futuristic-sidebar.open { left: 0 !important; box-shadow: 12px 0 35px rgba(0,0,0,0.45) !important; }
    .main-wrapper { width: 100% !important; flex: 1 !important; overflow: hidden !important; }
    .topbar { padding: 0 1rem; }
    .topbar-date { display: none; }
    .config-command-actions { grid-template-columns: 1fr; }
    .panel-heading { flex-direction: column; }
    .btn-panel-save, .btn-open-converter { width: 100%; }
}
@media (max-width: 768px) {
    .topbar { height: auto !important; min-height: 62px !important; padding: 9px 12px !important; gap: 8px !important; }
    .topbar-actions { flex: 1; justify-content: flex-end; gap: 6px; }
    .btn-topbar { display: none; }
    .btn-save-topbar { padding: 0.68rem 0.85rem; font-size: 0.86rem; }
    .user-badge { max-width: calc(100vw - 210px); padding: 0.55rem 0.7rem; font-size: 0.82rem; background: transparent; border-color: transparent; color: #0f172a; }
    .content-area { padding: 12px !important; }
    .config-command-center { gap: 12px; margin-bottom: 12px; }
    .config-command-copy, .config-command-actions, .config-stage, .premium-card { border-radius: 20px; }
    .config-command-copy { padding: 1.25rem; min-height: auto; }
    .config-command-copy h1 { font-size: 1.75rem; letter-spacing: -0.045em; }
    .config-command-copy p { font-size: 0.95rem; }
    .config-stage { padding: 1rem; }
    .panel-heading { padding-bottom: 1rem; margin-bottom: 1rem; }
    .panel-heading h2 { font-size: 1.4rem; }
    .premium-card { padding: 1rem; }
    .card-header-pro { gap: 0.75rem; margin-bottom: 1rem; padding-bottom: 1rem; }
    .card-icon { width: 46px; height: 46px; border-radius: 15px; font-size: 1.25rem; }
    .card-title { font-size: 1.08rem; }
    .form-grid.two-columns { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .form-row { flex-direction: column; gap: 0; }
    .form-label { font-size: 0.74rem; }
    .form-control { min-height: 44px; border-radius: 13px; background: #f2f2f7; }
    .upload-zone { padding: 1rem; border-radius: 17px; min-height: 230px; }
    .upload-actions { flex-direction: column; }
    .btn-soft, .btn-save { width: 100%; justify-content: center; }
    .info-strip { grid-template-columns: 1fr; }
    .migration-copy { grid-template-columns: 46px 1fr; }
    .migration-icon { width: 46px; height: 46px; border-radius: 15px; }
    .toast-container { left: 12px; right: 12px; top: auto; bottom: 16px; }
    .toast { max-width: none; }
}
@media (max-width: 480px) {
    .user-badge { display: none; }
    .btn-save-topbar { font-size: 0.8rem; padding: 0.6rem 0.72rem; }
    .command-card { grid-template-columns: 44px minmax(0, 1fr); padding: 0.8rem; }
    .command-icon { width: 44px; height: 44px; }
    .premium-card { padding: 0.9rem; }
}
