* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #0a2a2e;
    --accent: #00d4ff;
    --bg: #f4f6f8;
    --white: #ffffff;
    --gray: #6b7280;
    --error: #ef4444;
    --success: #10b981;
    --radius: 12px;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg);
    color: var(--primary);
    min-height: 100vh;
}

/* Split layout 50/50 */
.split-layout {
    display: flex;
    min-height: 100vh;
}

.split-left {
    width: 50%;
    background: var(--primary);
    display: flex;
    align-items: stretch;
    padding: 48px 60px;
}

.split-left-content {
    max-width: 440px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.split-logo {
    width: 200px;
    margin-left: -30px;
    margin-bottom: -20px;
}

.split-left h2 {
    color: var(--white);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.35;
}

.split-left h2 .accent {
    color: var(--accent);
}

.split-desc {
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 36px;
}

.benefits {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.benefits li {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 500;
    padding-left: 36px;
    position: relative;
    line-height: 1.4;
}

.benefits li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: rgba(0,212,255,0.15);
    border-radius: 50%;
}

.benefits li::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 5px;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
}

.split-right {
    width: 50%;
    background: #f4f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.split-right-content {
    width: 100%;
    max-width: 400px;
}

.split-right-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary);
}

.split-right-content .subtitle {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 28px;
}

.split-right-content .subtitle a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* Steps indicator */
.steps {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}

.steps .step {
    flex: 1;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
}

.steps .step.active {
    background: var(--accent);
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--primary);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.2s;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn:hover { opacity: 0.9; }

.btn-primary {
    background: var(--accent);
    color: var(--primary);
}

.btn-dark {
    background: var(--primary);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.btn-whatsapp {
    background: #25d366;
    color: var(--white);
    margin-top: 12px;
}

.btn-sm {
    padding: 10px 16px;
    font-size: 13px;
    width: auto;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--gray);
}

.auth-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* Error box */
.error-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    margin-bottom: 20px;
}

.error-box p {
    font-size: 14px;
    color: var(--error);
    margin-bottom: 12px;
}

/* Code input */
.code-input {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.code-input input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
}

.code-input input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Flash messages */
.flash-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flash {
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    max-width: 360px;
}

.flash-error { background: #fef2f2; color: var(--error); border: 1px solid #fecaca; }
.flash-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* App layout (sidebar + main) */
.app-layout, .admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 190px;
    background: var(--primary);
    color: var(--white);
    padding: 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 24px 20px 16px;
}

.sidebar-logo-img {
    width: 120px;
    margin-left: -18px;
}

.sidebar-user {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 2px;
}

.sidebar-user-nit {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 6px;
}

.sidebar-badge {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
}

.sidebar-badge-admin {
    font-size: 10px;
    color: var(--primary);
    font-weight: 700;
    background: var(--accent);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 4px;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 2px;
    transition: all 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.sidebar-nav a svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.sidebar-nav a.active svg,
.sidebar-nav a:hover svg {
    opacity: 1;
}

.sidebar-bottom {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-admin-link {
    display: block;
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 12px;
}

.sidebar-logout {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
}

.sidebar-logout:hover {
    color: var(--white);
}

.main-content {
    flex: 1;
    padding: 32px 40px;
    margin-left: 190px;
    background: #f0f2f5;
}

.main-content h2 {
    font-size: 22px;
    margin-bottom: 24px;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.topbar h2 {
    margin-bottom: 0;
}

.topbar-date {
    font-size: 13px;
    color: var(--gray);
}

/* Banner dark */
.banner-dark {
    background: var(--primary);
    border-radius: var(--radius);
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.banner-text strong {
    display: block;
    color: var(--white);
    font-size: 15px;
    margin-bottom: 4px;
}

.banner-text span {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.alert-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.alert strong { display: block; margin-bottom: 2px; }
.alert span { font-size: 12px; }

.alert-red {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-red .alert-icon {
    background: #ef4444;
    color: white;
}

.alert-yellow {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert-green {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #065f46;
}

/* Metrics grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.metric-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.metric-label {
    font-size: 12px;
    color: var(--gray);
    font-weight: 500;
}

.metric-green .metric-value { color: var(--success); }
.metric-orange .metric-value { color: #f59e0b; }
.metric-blue .metric-value { color: var(--accent); }

/* Dashboard grid (2 columns) */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
}

.card-body {
    padding: 16px 20px;
}

/* Mes row */
.mes-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #f9fafb;
}

.mes-info {
    min-width: 100px;
}

.mes-info strong {
    display: block;
    font-size: 13px;
}

.mes-info span {
    font-size: 11px;
    color: var(--gray);
}

.mes-progress {
    flex: 1;
}

.progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
}

.badge-orange { background: #fef3c7; color: #92400e; }

/* Activity row */
.activity-row {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f9fafb;
    align-items: flex-start;
}

.activity-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.activity-row strong {
    display: block;
    font-size: 13px;
}

.activity-row span {
    font-size: 11px;
    color: var(--gray);
}

.empty-state {
    text-align: center;
    padding: 24px 0;
    font-size: 13px;
    color: var(--gray);
}

/* RUT page */
.rut-grid {
    margin-bottom: 24px;
}

.rut-upload-card .card-body {
    padding: 24px 20px;
}

.upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.upload-zone.drag-over {
    border-color: var(--accent);
    background: rgba(0,212,255,0.05);
}

.upload-zone p {
    font-size: 14px;
    color: var(--gray);
    margin-top: 12px;
}

.upload-hint {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 8px;
}

.rut-file {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rut-file-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.rut-file-info strong {
    display: block;
    font-size: 14px;
}

.rut-file-info span {
    font-size: 12px;
    color: var(--gray);
}

.rut-file-actions {
    display: flex;
    gap: 8px;
}

.rut-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.data-label {
    font-size: 13px;
    color: var(--gray);
}

.data-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge-sure {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    background: rgba(0,212,255,0.1);
    padding: 4px 10px;
    border-radius: 20px;
}

.retention-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}

.retention-info strong {
    font-size: 13px;
}

/* RUT redesign */
.rut-file-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
}

.rut-file-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.data-empty {
    color: #d1d5db !important;
    font-style: italic;
    font-weight: 400 !important;
}

.retention-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px 16px;
}

.retention-row-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}

.retention-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.retention-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.retention-left strong {
    display: block;
    font-size: 13px;
}

.retention-left span {
    font-size: 11px;
    color: var(--gray);
}

.retention-input {
    display: flex;
    align-items: center;
    gap: 6px;
}

.retention-input input {
    width: 80px;
    padding: 8px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.retention-input input:focus {
    outline: none;
    border-color: var(--accent);
}

.retention-input span {
    font-size: 14px;
    color: var(--gray);
    font-weight: 600;
}

/* Table */
.table-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
}

.table-card table {
    width: 100%;
    border-collapse: collapse;
}

.table-card th {
    text-align: left;
    padding: 14px 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray);
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.table-card td {
    padding: 14px 20px;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-active { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #fee2e2; color: #991b1b; }

/* Add NIT form */
.add-form {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: flex-end;
}

.add-form .form-group { margin-bottom: 0; flex: 1; }

/* Dashboard */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.resend-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 13px;
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
    border: none;
    background: none;
    font-family: 'Montserrat', sans-serif;
}

.resend-link:disabled {
    color: var(--gray);
    cursor: not-allowed;
}

/* Registration steps (sidebar left) */
.reg-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 32px;
}

.reg-step {
    display: flex;
    align-items: center;
    gap: 16px;
}

.reg-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,212,255,0.2);
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.reg-step.active .reg-step-circle {
    background: var(--accent);
    color: var(--primary);
}

.reg-step.done .reg-step-circle {
    background: var(--success);
    color: var(--white);
}

.reg-step-text strong {
    display: block;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    font-weight: 600;
}

.reg-step.active .reg-step-text strong,
.reg-step.done .reg-step-text strong {
    color: var(--white);
}

.reg-step-text span {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
}

.reg-step.active .reg-step-text span {
    color: rgba(255,255,255,0.6);
}

.reg-step.done .reg-step-text span {
    color: rgba(255,255,255,0.5);
}

/* Split footer */
.split-footer {
    margin-top: auto;
    padding-top: 40px;
    font-size: 12px;
    color: rgba(255,255,255,0.3);
}

/* Form link (forgot password) */
.form-group-link {
    text-align: right;
    margin-bottom: 20px;
    margin-top: -12px;
}

.form-group-link a {
    font-size: 13px;
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
}

.form-group-link a:hover {
    color: var(--accent);
}

/* Auth divider */
.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.auth-divider span {
    background: #f4f5f7;
    padding: 0 16px;
    position: relative;
    font-size: 13px;
    color: var(--gray);
}

/* Auth contact */
.auth-contact {
    text-align: center;
    font-size: 13px;
    color: var(--gray);
}

.auth-contact a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* Alert success (green banner) */
.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

/* Parámetros page */
.param-section {
    margin-bottom: 24px;
}

.param-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.param-hint {
    font-size: 12px;
    color: var(--gray);
    margin-top: 8px;
}

.param-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin: 24px 0 16px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.param-toggle {
    margin-top: 16px;
}

/* Plantilla status */
.plantilla-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.plantilla-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.plantilla-info strong {
    display: block;
    font-size: 14px;
}

.plantilla-info span {
    font-size: 12px;
    color: var(--gray);
}

/* Opciones detectadas */
.plantilla-opciones {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.section-desc {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 16px;
    line-height: 1.5;
}

.opciones-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.opcion-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
}

.opcion-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.opcion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.opcion-tag {
    font-size: 12px;
    background: var(--white);
    border: 1px solid #d1d5db;
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.field-hint {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

/* Auto fields preview */
.auto-fields-preview {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.auto-field-item {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px 14px;
    flex: 1;
    min-width: 140px;
}

.auto-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #065f46;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.auto-value {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.auto-source {
    display: block;
    font-size: 10px;
    color: #6b7280;
    margin-top: 2px;
}

/* Stock question */
.stock-question {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.toggle-label select {
    padding: 8px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    background: var(--white);
    cursor: pointer;
}

.stock-valor-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
}

/* Multiplicadores grid */
.mult-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Plano map table */
.plano-map {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.plano-row {
    display: grid;
    grid-template-columns: 1fr 1fr 140px;
    padding: 10px 16px;
    font-size: 13px;
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
}

.plano-row:last-child {
    border-bottom: none;
}

.plano-header {
    background: #f9fafb;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gray);
}

.plano-src {
    font-size: 12px;
    font-weight: 500;
}

.plano-auto {
    color: #065f46;
}

.plano-dropdown {
    color: #1d4ed8;
}

.plano-manual {
    color: #92400e;
}

.plano-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
}

.plano-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gray);
}

.plano-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Auto generated info */
.auto-fields-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.auto-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 4px 0;
}

.auto-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.centros-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 20px;
}

.centro-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
}

.centro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.centro-header strong {
    font-size: 14px;
}

.centro-header code {
    font-size: 12px;
    background: var(--primary);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
}

.centro-bodega {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.centro-bodega span {
    font-size: 13px;
    color: var(--gray);
}

.centro-bodega code {
    font-size: 12px;
    color: var(--gray);
}

.badge-no-bodega {
    font-size: 11px;
    color: var(--gray);
    background: #f3f4f6;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Collapsible sections */
.collapsible {
    cursor: pointer;
    user-select: none;
}

.collapse-icon {
    font-size: 12px;
    color: var(--gray);
    transition: transform 0.2s;
}

.table-card.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.table-card.collapsed .card-body,
.table-card.collapsed table,
.table-card.collapsed .add-form,
.table-card.collapsed .paste-zone,
.table-card.collapsed .centros-grid,
.table-card.collapsed .param-grid,
.table-card.collapsed .param-hint,
.table-card.collapsed form:not(.card-header),
.table-card.collapsed > form,
.table-card.collapsed > div:not(.card-header) {
    display: none !important;
}

/* Bulk actions bar */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: #fef2f2;
    border-bottom: 1px solid #fecaca;
}

.bulk-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--error);
}

/* Action buttons */
.action-btns {
    display: flex;
    gap: 6px;
}

.btn-danger-sm {
    color: var(--error) !important;
    border-color: var(--error) !important;
}

/* Badge count */
.badge-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.modal-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary);
}

/* Paste zone */
.paste-zone {
    padding: 16px 20px;
    border-top: 1px solid #f3f4f6;
}

.paste-hint {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 8px;
}

.paste-hint strong {
    color: var(--primary);
}

.paste-zone textarea {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Montserrat', monospace;
    font-size: 13px;
    resize: vertical;
    transition: border-color 0.2s;
}

.paste-zone textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* Processing overlay */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10,42,46,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.processing-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px 48px;
    text-align: center;
    min-width: 320px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.processing-icon {
    margin-bottom: 16px;
}

.spin {
    animation: spin 1s linear infinite;
}

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

.processing-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
}

.processing-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.processing-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #0ea5e9);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.processing-pct {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

/* Check indicators */
.check-green { color: var(--success); font-size: 16px; font-weight: 700; }
.check-blue { color: #3b82f6; font-size: 16px; font-weight: 700; }
.check-empty { color: #d1d5db; font-size: 16px; }

/* Upload inline */
.upload-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.upload-inline-info p {
    font-size: 14px;
    margin: 0;
}

/* Upload cards grid */
.upload-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.upload-card {
    padding: 20px;
}

.upload-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.upload-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upload-card-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2px;
}

.upload-card-header p {
    font-size: 12px;
    color: var(--gray);
    margin: 0;
}

.upload-card-count {
    margin-left: auto;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
}

.upload-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: var(--accent);
    color: var(--primary);
    border: none;
    transition: opacity 0.2s;
}

.upload-card-btn:hover { opacity: 0.9; }

.upload-card-btn-outline {
    background: transparent;
    border: 1.5px solid #e5e7eb;
    color: var(--primary);
}

.upload-card-btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.upload-card-btn-danger {
    background: transparent;
    border: 1.5px solid var(--error);
    color: var(--error);
    width: auto;
    padding: 10px 14px;
}

.upload-zone-sm {
    padding: 24px !important;
}

/* Stats banner */
.stats-banner {
    margin-bottom: 16px;
    border-radius: var(--radius);
}

/* Table filters */
.table-filters {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.filter-input {
    padding: 8px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    width: 200px;
    transition: border-color 0.2s;
}

.filter-input:focus {
    outline: none;
    border-color: var(--accent);
}

.filter-select {
    padding: 8px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    background: var(--white);
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Table row hover */
.table-row-hover:hover {
    background: #f8fafc;
}

/* Drop zone */
.drop-zone {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drop-zone.drag-over {
    background: rgba(0,212,255,0.05);
    border-radius: 8px;
}

.drop-hint {
    font-size: 12px;
    color: var(--gray);
}

/* Stats row in banner */
.stats-row {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
}

.stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.stat-green { color: #34d399; }
.stat-orange { color: #fbbf24; }
.stat-yellow { color: #fde68a; }
.stat-red { color: #f87171; }

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.15);
}

/* Alert blue */
.alert-blue {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.alert-blue .alert-icon {
    background: #3b82f6;
    color: white;
}

/* Badge variants */
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-blue { background: #dbeafe; color: #1e40af; }

/* Responsive */
@media (max-width: 768px) {
    .split-layout { flex-direction: column; }
    .split-left { width: 100%; padding: 40px 24px; min-height: auto; }
    .split-left h2 { font-size: 20px; }
    .split-logo { width: 160px; margin-bottom: 24px; }
    .benefits { gap: 12px; }
    .split-right { width: 100%; padding: 40px 24px; }
    .app-layout, .admin-layout { flex-direction: column; }
    .sidebar { width: 100%; position: relative; height: auto; }
    .main-content { margin-left: 0; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .banner-dark { flex-direction: column; gap: 16px; text-align: center; }
    .main-content { padding: 24px; }
    .add-form { flex-direction: column; }
    .add-form .btn-sm { width: 100%; }
}
