/* ── Reset & tokens ─────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f7f8fa;
    --bg-tertiary: #f0f2f5;
    --bg-info: #e6f1fb;
    --bg-success: #eaf3de;
    --bg-warning: #faeeda;
    --bg-danger: #fcebeb;

    --text-primary: #0f1117;
    --text-secondary: #5a6272;
    --text-tertiary: #9299a8;
    --text-info: #0c447c;
    --text-success: #27500a;
    --text-warning: #633806;
    --text-danger: #791f1f;

    --border-base: rgba(15, 17, 23, 0.12);
    --border-md: rgba(15, 17, 23, 0.22);
    --border-info: rgba(24, 95, 165, 0.35);
    --border-success: rgba(59, 109, 17, 0.3);
    --border-warning: rgba(186, 117, 23, 0.35);
    --border-danger: rgba(163, 45, 45, 0.3);

    --blue: #185fa5;
    --blue-dark: #0c447c;
    --blue-bg: #e6f1fb;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
    height: 100%;
}
body {
    font-family: var(--font);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
}

/* ── Shell ──────────────────────────────────────────────────────────────── */
.shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
    width: 220px;
    background: var(--bg-primary);
    border-right: 0.5px solid var(--border-base);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.sb-header {
    padding: 20px 18px 16px;
    border-bottom: 0.5px solid var(--border-base);
}
.sb-logo {
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}
.sb-logo span {
    color: var(--blue);
}
.sb-plan {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding: 3px 8px;
    background: var(--bg-info);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-info);
}
.plan-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
    flex-shrink: 0;
}
.sb-nav {
    padding: 12px 10px;
    flex: 1;
    overflow-y: auto;
}
.nav-section {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 0 8px;
    margin: 12px 0 4px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition:
        background 0.15s,
        color 0.15s;
    margin-bottom: 1px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    text-decoration: none;
}
/* Controla el tamaño de los iconos específicamente dentro del menú */
.nav-item .material-symbols-outlined {
    font-size: 22px;       /* Tamaño personalizado */
    font-variation-settings: 'opsz' 12; /* Ajuste óptico de Google */
}

.nav-badge {
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    background-color: var(--bg-warning);
    color: var(--text-warning);
    border: 1px solid var(--border-md);
    text-transform: uppercase;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0% { opacity: 0.9; }
    50% { opacity: 0.6; }
    100% { opacity: 0.9; }
}
.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}
.nav-item.active {
    background: var(--bg-info);
    color: var(--text-info);
    font-weight: 500;
}
.nav-icon {
    width: 15px;
    height: 15px;
    opacity: 0.7;
    flex-shrink: 0;
}
.nav-item.active .nav-icon {
    opacity: 1;
}
.nav-badge {
    margin-left: auto;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    border: 0.5px solid var(--border-base);
}
.nav-item.active .nav-badge {
    background: #b5d4f4;
    color: #0c447c;
    border-color: transparent;
}
.nav-badge.red {
    background: var(--bg-danger);
    color: var(--text-danger);
    border-color: transparent;
}

.sb-footer {
    padding: 12px 10px;
    border-top: 0.5px solid var(--border-base);
}
.user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
}
.user-row:hover {
    background: var(--bg-secondary);
}
.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-info);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-info);
    flex-shrink: 0;
}
.user-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}
.user-role {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ── Main area ──────────────────────────────────────────────────────────── */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-tertiary);
    min-width: 0;
}

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.topbar {
    background: var(--bg-primary);
    border-bottom: 0.5px solid var(--border-base);
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 12px;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.page-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}
.topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 0.5px solid var(--border-base);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    font-size: 12px;
    color: var(--text-tertiary);
    cursor: text;
    min-width: 180px;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: 0.5px solid var(--border-base);
    background: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--text-secondary);
}
.icon-btn:hover {
    background: var(--bg-secondary);
}
.notif-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e24b4a;
    border: 1.5px solid var(--bg-primary);
}
.btn-primary {
    display: inline-flex;;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    font-family: var(--font);
    vertical-align: middle;
}
.btn-primary:hover {
    background: var(--blue-dark);
}
/* Control exacto sobre el icono desalineado de Google */
.btn-primary .btn-icon {
    font-size: 16px;
    line-height: 1;
    display: inline-block;
    /* Forzamos al icono a bajar un poco para contrarrestar el error de su fuente */
    transform: translateY(2.5px); 
}

/* Control sobre el texto */
.btn-primary .btn-text {
    line-height: 1;
    display: inline-block;
}

.btn-chat-telegram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #0088cc 0%, #00a6f3 100%);
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    max-width: 340px;
    margin: 15px auto;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.25);
    transition: all 0.3s ease;
}

/* Efecto interactivo premium al pasar el ratón */
.btn-chat-telegram:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
    background: linear-gradient(135deg, #0099e6 0%, #1ab2ff 100%);
}

/* Tamaño del icono integrado */
.btn-chat-telegram .material-icons {
    font-size: 20px;
}

/* Ocultar el panel según el plan */
.solo-premium, .solo-pro, .ocultar-inicial {
    display: none !important;
}

/* ── Content scroll area ────────────────────────────────────────────────── */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

/* ── Alert banner ───────────────────────────────────────────────────────── */
.alert-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-warning);
    border: 0.5px solid var(--border-warning);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 12px;
}
.alert-strip strong {
    color: var(--text-warning);
    font-weight: 500;
}
.alert-strip span {
    color: var(--text-secondary);
}
.alert-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-tertiary);
    line-height: 1;
    padding: 0 2px;
}
.alert-dismiss:hover {
    color: var(--text-primary);
}

/* ── Metrics ────────────────────────────────────────────────────────────── */
.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.metric {
    background: var(--bg-primary);
    border: 0.5px solid var(--border-base);
    border-radius: var(--radius-md);
    padding: 14px 16px;
}
.metric-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.metric-value {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 6px;
}
.metric-delta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
}
.delta-up {
    background: var(--bg-success);
    color: var(--text-success);
}
.delta-down {
    background: var(--bg-danger);
    color: var(--text-danger);
}
.delta-neutral {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 0.5px solid var(--border-base);
}

.cls-suscripcion{
    position: relative; 
    display: flex; 
    align-items: center;
    justify-content: space-between; 
    width: 100%;
}

.sidebar-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-base, rgba(255, 255, 255, 0.2)), transparent);
    margin: 20px 0;
    width: 100%;
}


/* ── Two-column row ─────────────────────────────────────────────────────── */
.row1{
    margin-bottom:24px;
}

.canvas-container{
    background:var(--bg-primary);
    border:0.5px solid var(--border-base);
    border-radius:var(--radius-md);
    padding:20px;
    max-width:700px;
    margin:0 auto;
}

.row2{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:24px;
    align-items:start;
}

.col-left{
    display:flex;
    flex-direction:column;
    gap:24px;
    min-width:0;
}

.col-right{
    display:flex;
    flex-direction:column;
    gap:24px;
    position:sticky;
    top:20px;
    min-width:0;
}
.col-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Panel ──────────────────────────────────────────────────────────────── */
.panel {
    background: var(--bg-primary);
    border: 0.5px solid var(--border-base);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.panel-header {
    padding: 13px 16px;
    border-bottom: 0.5px solid var(--border-base);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.panel-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}
.panel-action {
    font-size: 11px;
    color: var(--blue);
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font);
}
.panel-action:hover {
    text-decoration: underline;
}

/* ── Doc table ──────────────────────────────────────────────────────────── */
.doc-table {
    width: 100%;
    border-collapse: collapse;
}
.doc-table th {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 16px;
    text-align: left;
    border-bottom: 0.5px solid var(--border-base);
    background: var(--bg-secondary);
}
.doc-table td {
    padding: 10px 16px;
    font-size: 12px;
    border-bottom: 0.5px solid var(--border-base);
    vertical-align: middle;
}
.doc-table tr:last-child td {
    border-bottom: none;
}
.doc-table tr:hover td {
    background: var(--bg-secondary);
}
.doc-table-container{
    overflow-x:auto;
    /*min-width:850px;*/
}
.doc-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-primary);
}
.doc-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    background: var(--bg-danger);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-danger);
    font-weight: 600;
    flex-shrink: 0;
}
.doc-icon.word {
    background: var(--bg-info);
    color: var(--text-info);
}
.doc-icon.img {
    background: var(--bg-success);
    color: var(--text-success);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.s-done {
    background: var(--bg-success);
    color: var(--text-success);
}
.s-proc {
    background: var(--bg-warning);
    color: var(--text-warning);
}
.s-pend {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 0.5px solid var(--border-base);
}
.s-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.7;
}

.btn-sm {
    padding: 5px 11px;
    border-radius: var(--radius-md);
    border: 0.5px solid var(--border-md);
    background: var(--bg-primary);
    font-size: 11px;
    cursor: pointer;
    color: var(--text-primary);
    font-family: var(--font);
}
.btn-sm:hover {
    background: var(--bg-secondary);
}
.btn-sm.primary {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}
.btn-sm.primary:hover {
    background: var(--blue-dark);
}
.btn-sm:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Quota bars ─────────────────────────────────────────────────────────── */
.quota-body {
    padding: 14px 16px;
}
.quota-item {
    margin-bottom: 13px;
}
.quota-item:last-child {
    margin-bottom: 0;
}
.quota-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}
.quota-label {
    font-size: 12px;
    color: var(--text-secondary);
}
.quota-nums {
    font-size: 11px;
    color: var(--text-secondary);
}
.quota-nums strong {
    color: var(--text-primary);
    font-weight: 500;
}
.track {
    height: 5px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    border: 0.5px solid var(--border-base);
}
.fill {
    height: 100%;
    border-radius: 10px;
}
.fill-blue {
    background: var(--blue);
}
.fill-amber {
    background: #ba7517;
}
.fill-green {
    background: #3b6d11;
}

/* ── Activity feed ──────────────────────────────────────────────────────── */
.activity-list {
    padding: 0 16px;
}
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 0.5px solid var(--border-base);
}
.activity-item:last-child {
    border-bottom: none;
}
.act-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.act-text {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.4;
}
.act-text strong {
    font-weight: 500;
}
.act-time {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* ── Upload modal overlay ───────────────────────────────────────────────── */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.overlay.open {
    display: flex;
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 0.5px solid var(--border-base);
    width: 100%;
    /* Cambiamos el ancho fijo por max-width para que sea flexible */
    max-width: 590px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Intetamos que aparezca la barra de desplazamiento vertical */
/* comieza */
#modal-main {
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* Limita la altura al 90% de la pantalla */
    width: 100%; /* O el ancho que prefieras */
    background: white;
    border-radius: 12px;
    overflow: hidden; /* Evita que el contenido se salga de los bordes redondeados */
}

/* El cuerpo de la modal - AQUÍ SUCEDE LA MAGIA */
.modal-body {
    flex: 1; /* Toma el espacio disponible entre header y footer */
    overflow-y: auto; /* Activa el scroll vertical solo si es necesario */
    padding: 20px;

    /* Opcional: Estilizar la barra de scroll para que se vea más moderna */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

/* El footer se mantiene fijo abajo */
.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    background: #fdfdfd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* fin */

.modal-head {
    padding: 16px 20px;
    border-bottom: 0.5px solid var(--border-base);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.modal-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}
.step-pills {
    display: flex;
    align-items: center;
    gap: 6px;
}
.step-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-tertiary);
}
.step-pill.active {
    color: var(--blue);
    font-weight: 500;
}
.step-pill.done {
    color: var(--text-success);
}
.step-num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 0.5px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}
.step-pill.done .step-num {
    background: var(--bg-success);
    border-color: var(--border-success);
}
.step-pill.active .step-num {
    background: var(--bg-info);
    border-color: var(--border-info);
}
.step-sep {
    width: 20px;
    height: 0.5px;
    background: var(--border-base);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Drop zone */
.drop-zone {
    border: 1.5px dashed var(--border-md);
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition:
        border-color 0.15s,
        background 0.15s;
    position: relative;
}
.drop-zone:hover,
.drop-zone.drag {
    border-color: var(--blue);
    background: var(--bg-info);
}
.drop-zone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.drop-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 0.5px solid var(--border-base);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}
.drop-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.drop-sub {
    font-size: 12px;
    color: var(--text-secondary);
}
.drop-sub span {
    color: var(--blue);
    font-weight: 500;
}
.drop-formats {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}
.fmt-pill {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 0.5px solid var(--border-base);
}

/* File list */
.file-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 0.5px solid var(--border-base);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}
.file-icon-sm {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: var(--bg-danger);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-danger);
    flex-shrink: 0;
}
.file-info {
    flex: 1;
    min-width: 0;
}
.file-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 1px;
}
.prog-track {
    height: 3px;
    background: var(--bg-primary);
    border-radius: 10px;
    margin-top: 5px;
    overflow: hidden;
    border: 0.5px solid var(--border-base);
}
.prog-fill {
    height: 100%;
    border-radius: 10px;
    background: var(--blue);
    transition: width 0.4s ease;
}
.file-remove {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 0.5px solid var(--border-md);
    background: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 14px;
    flex-shrink: 0;
    line-height: 1;
}
.file-remove:hover {
    background: var(--bg-danger);
    color: var(--text-danger);
    border-color: var(--border-danger);
}

/* Quota mini */
.quota-bar {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0.5px solid var(--border-warning);
}
.quota-bar-text {
    font-size: 11px;
    color: var(--text-secondary);
    flex: 1;
}
.quota-bar-text strong {
    color: var(--text-primary);
    font-weight: 500;
}
.quota-mini {
    height: 4px;
    width: 80px;
    background: var(--bg-primary);
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}
.quota-mini-fill {
    height: 100%;
    background: #ba7517;
    border-radius: 10px;
}

/* Form fields */
.section-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 18px 0 10px;
}
.fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.field.full {
    grid-column: 1 / -1;
}
.field label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 400;
}
.field select,
.field input[type="text"] {
    width: 100%;
    font-size: 12px;
    padding: 7px 10px;
    border: 0.5px solid var(--border-md);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font);
    outline: none;
    appearance: auto;
}
.field select:focus,
.field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.12);
}
.field textarea {
    width: 100%;
    font-size: 12px;
    resize: vertical;
    min-height: 64px;
    padding: 8px 10px;
    border: 0.5px solid var(--border-md);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font);
    outline: none;
}
.field textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.12);
}

/* Modal footer */
.modal-footer {
    padding: 14px 20px;
    border-top: 0.5px solid var(--border-base);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
    background: var(--bg-primary);
}
.btn-cancel {
    padding: 7px 16px;
    border: 0.5px solid var(--border-md);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    font-size: 12px;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: var(--font);
}
.btn-cancel:hover {
    background: var(--bg-secondary);
}
.modal-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-hint {
    font-size: 11px;
    color: var(--text-tertiary);
}
.btn-upload {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--blue);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    font-family: var(--font);
}
.btn-upload:hover {
    background: var(--blue-dark);
}
.btn-upload:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Success state */
.success-state {
    text-align: center;
    padding: 36px 20px 28px;
}
.success-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-success);
    border: 0.5px solid var(--border-success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.success-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.success-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 22px;
    line-height: 1.6;
}
.action-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.btn-action {
    padding: 8px 20px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
}
.btn-action.primary {
    background: var(--blue);
    color: #fff;
    border: none;
}
.btn-action.primary:hover {
    background: var(--blue-dark);
}
.btn-action.outline {
    background: var(--bg-primary);
    border: 0.5px solid var(--border-md);
    color: var(--text-primary);
}
.btn-action.outline:hover {
    background: var(--bg-secondary);
}

/* --- AJUSTES PARA MÓVILES (Media Queries) --- */
@media (max-width: 600px) {
    .overlay {
        padding: 10px; /* Menos espacio en los bordes */
    }

    .modal {
        max-height: 95vh; /* Aprovechar más altura en móvil */
    }

    /* Ocultar texto de los pasos para que no se amontonen */
    .step-pill {
        font-size: 0; /* Oculta el texto */
    }
    .step-num {
        font-size: 10px; /* Mantiene el número visible */
        margin: 0;
    }
    .step-sep {
        width: 10px; /* Acorta la línea separadora */
    }

    /* Título de la modal más pequeño */
    .modal-title {
        display: none; /* Opcional: ocultar título para ganar espacio */
    }

    /* Convertir el grid de 2 columnas a 1 columna */
    .fields {
        grid-template-columns: 1fr;
    }

    /* Ajustar el footer para que los botones quepan */
    .modal-footer {
        flex-direction: column-reverse;
        gap: 12px;
        padding: 15px;
    }
    .modal-footer-right {
        width: 100%;
        flex-direction: column;
    }
    .btn-upload,
    .btn-cancel {
        width: 100%; /* Botones de ancho completo para facilitar el toque */
        justify-content: center;
    }
    .footer-hint {
        text-align: center;
    }
}

/* Logout */
.btn-logout {
    background: transparent;
    border: 1px solid #3349c4;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-logout:hover {
    background: #eee;
}

/* ── Servicio post-venta ──────────────────────────────────────────────────────────────── */
.servicio-item {
    transition:
        background 0.2s,
        transform 0.1s;
    user-select: none;
}
.servicio-item:hover {
    background: var(--bg-info) !important;
}
.servicio-item input {
    margin-right: 6px;
    transform: scale(1.1);
    cursor: pointer;
}
.btn-close-modal {
    font-size: 22px;
    line-height: 1;
    color: var(--text-tertiary);
}
.btn-close-modal:hover {
    color: var(--text-primary);
}

/* ── Spinner ──────────────────────────────────────────────────────────────── */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.spin {
    animation: spin 0.8s linear infinite;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .sidebar {
        display: none;
    }
    .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .row2 {
        grid-template-columns: 1fr;
    }
    .col-right{
        position:sticky;
        top:20px;
        align-self:start;
    }
}
@media (max-width: 560px) {
    .fields {
        grid-template-columns: 1fr;
    }
    .field.full {
        grid-column: 1;
    }
}

/* ---------- MODAL (copiado de informe-precio) ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    inset: 0;
    background: rgba(15, 17, 23, 0.65);
    width: 100vw;               /* Cubre el ancho completo del viewport */
    height: 100vh;              /* Cubre el alto completo del viewport */
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(2px);
}
.modal-overlay.open {
    display: flex !important;
}
.modal {
    background: var(--bg-primary, #ffffff);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modal-in 0.2s ease;
    border-radius: 12px;
    padding: 2.25rem 2rem;      /* Espaciado interno generoso */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25); /* Sombra pronunciada para darle flotación y despegue */
    animation: modalSlideUp 0.3s ease-out; /* Una animación suave al aparecer */
}
@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.modal-header {
    padding: 2rem 2rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.modal-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.25rem;
}
.modal-subtitle {
    font-size: 0.82rem;
    color: var(--muted);
}
.modal-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-top: 1rem;
}
.modal-price {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--ink);
}
.modal-price-orig {
    font-size: 1rem;
    color: var(--muted);
    text-decoration: line-through;
}
.modal-body {
    padding: 1.5rem 2rem;
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-tertiary);
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}
.modal-close:hover {
    color: var(--text-danger);
}
.form-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.4rem;
}
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-strong);
    border-radius: 2px;
    background: white;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--ink);
    outline: none;
    transition: border-color 0.15s;
    margin-bottom: 1rem;
}
.form-input:focus {
    border-color: var(--accent);
}
.payment-opts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.pay-opt {
    border: 1px solid var(--border);
    padding: 0.75rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition:
        border-color 0.15s,
        background 0.15s;
    border-radius: 2px;
}
.pay-opt:hover {
    border-color: var(--border-strong);
}
.pay-opt.selected {
    border-color: var(--accent);
    background: rgba(181, 71, 12, 0.04);
}
.pay-opt-icon {
    font-size: 1.3rem;
    display: block;
    margin-bottom: 0.2rem;
}
.pay-opt-name {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--muted);
}
.confirm-btn {
    background: var(--blue);
    display: inline-flex;  /* Alinea los elementos en línea usando flexbox */
    align-items: center; /* Centra verticalmente el contenido del botón */
    justify-content: center; /* Centra el contenido horizontalmente si el botón es ancho */
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: white;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.15s;
}
.confirm-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.modal-trust {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--muted);
    margin-top: 0.75rem;
    line-height: 1.5;

    /* Activamos Flexbox para alinear el icono y el bloque de texto */
    display: flex;
    align-items: center; /* Centra verticalmente el icono con las dos líneas */
    justify-content: center; /* Mantiene todo el bloque centrado en el modal */
    gap: 0.6rem; /* Espacio horizontal exacto entre el candado y el texto */
}

/* Estilos limpios para el icono */
.modal-trust .icon-lock {
    font-size: 28px;
    color: var(--accent);
    flex-shrink: 0; /* Evita que el icono se encoja en pantallas muy pequeñas */
    display: flex;
    align-items: center;
}

/* Alineación del texto */
.modal-trust-text {
    text-align: left; /* Al estar al lado de un icono, el alineado a la izquierda se ve más ordenado */
}
.modal-success {
    text-align: center;
    padding: 2rem 0;
}
.modal-success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.next-step {
    background: var(--paper-warm);
    border: 1px solid var(--border);
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.7;
    text-align: left;
}
.btn-cta-modal {
    background: var(--accent);
    color: white;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.55rem 1.25rem;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    display: inline-block;
}

/* ── Estilos específicos para el contenido de Suscripción ────────────────── */
.modal-header {
    margin-bottom: 1.5rem;
}
.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}
.modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}
.modal-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}
.modal-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
}
.modal-price-orig {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}
.form-field-block {
    margin-bottom: 1.25rem;
}
.form-input-highlight {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-md);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
}
.form-input-highlight:focus {
    border-color: var(--text-info);
}
.payment-opts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.pay-opt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--border-base);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-primary);
}
.pay-opt:hover {
    border-color: var(--border-md);
    background: var(--bg-secondary);
}
.pay-opt.selected {
    border-color: #0c447c; /* Mapeado a tu color de texto informativo */
    background: var(--bg-info);
}
.confirm-btn {
    width: 100%;
    padding: 0.85rem;
    background: var(--text-primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.confirm-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Cambia el tamaño de todos los iconos */
.material-symbols-outlined {
  font-size: 20px; /* Por defecto es 24px */
}

.icon-small {
  font-size: 10px; /* Por defecto es 24px */
}

.icon-medium {
  font-size: 16px; /* Por defecto es 24px */
}

.icon-large {
  font-size: 24px; /* Por defecto es 24px */
}

/* --- Media query para Tablets y Móviles --- */
@media (max-width: 768px) {
    /* Mostrar la barra superior del menú móvil */
    .mobile-top-bar {
        display: flex !important;
    }

    /* Convertir el menú lateral en un panel flotante oculto por defecto */
    .sidebar {
        display: block !important; /* Forzar que no sea display:none */
        position: fixed;
        top: 0;
        left: -280px; /* Escondido a la izquierda */
        width: 260px;
        height: 100vh;
        z-index: 9999;
        background: #ffffff; /* Ajusta al color de tu menú */
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Clase que se añade con JS para mostrar el menú */
    .sidebar.active {
        left: 0;
    }

    /* Fondo oscuro semitransparente cuando el menú está abierto */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; width: 100vw; height: 100vh;
        background: rgba(0, 0, 0, 0.4);
        z-index: 9998;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

/* --- CENTRO DE AYUDA / FAQ --- */
.faq-category-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin: 20px 0 10px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-base);
}

.faq-item {
    border: 1px solid var(--border-base);
    border-radius: 6px;
    margin-bottom: 8px;
    background: var(--bg-primary);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item:hover, .faq-item.active {
    border-color: var(--border-md);
    box-shadow: 0 2px 6px rgba(15, 17, 23, 0.04);
}

.faq-trigger {
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    gap: 15px;
}

.faq-icon {
    color: var(--text-tertiary);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--text-info);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-secondary);
}

.faq-content p {
    padding: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

#faq-search:focus {
    border-color: var(--text-primary) !important;
    background: var(--bg-primary) !important;
}

/* Contenedor principal de la página */
.dashboard-container {
    display: grid;
    grid-template-columns: 1fr 350px; /* Columna principal + Columna lateral fija */
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Ajuste para pantallas pequeñas (móviles) */
@media (max-width: 992px) {
    .dashboard-container {
        grid-template-columns: 1fr; /* Todo se apila en una columna */
    }
}

/* Asegurar que los paneles no rompan el layout */
.panel {
    width: 100%;
    box-sizing: border-box; /* Importante para que el padding no añada ancho extra */
}

/* Informe de Looker */
.section-heading{
    text-align:center;
    margin-bottom:16px;
}

.section-heading h2{
    font-size:20px;
    font-weight:600;
    margin-bottom:4px;
}

.section-heading p{
    color:var(--text-secondary);
    font-size:13px;
}

.market-section{
    padding:0px;
}

.centrar-texto{
    align-items:center;
    text-align:center;
    width:100%;
    gap:20px;
}

.centrar-texto-agrupado{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    gap:20px;
}

.separar-titulo {
    margin-block-start: 15px; 
    margin-inline-start: 10px;
}