* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* COLORES */
.text-blue { color: #2563eb; }
.text-green { color: #10b981; }
.text-muted { color: #6b7280; }
.bg-blue { background: #dbeafe; color: #2563eb; }
.bg-green { background: #d1fae5; color: #10b981; }

/* LOGIN */
.login-body {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #10b981 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 550px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.subtitle {
    color: #6b7280;
    font-size: 0.95rem;
}

.login-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1.05rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.demo-note {
    text-align: center;
    margin-top: 15px;
    font-size: 0.875rem;
    color: #6b7280;
}

/* ADMIN LAYOUT */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #334155;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.sidebar-header {
    padding: 30px 20px;
    background: #1e293b;
}

.sidebar-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 5px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px;
}

.nav-link {
    display: block;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: #475569;
}

.nav-link.active {
    background: #2563eb;
}

.sidebar-footer {
    padding: 20px;
    background: #1e293b;
    text-align: center;
}

.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 40px;
    background: #f9fafb;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2rem;
    color: #1f2937;
}

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
}

/* CARDS */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.card-header h3 {
    font-size: 1.25rem;
    color: #1f2937;
}

.card-body {
    padding: 24px;
}

/* LIST */
.list-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    transition: all 0.3s;
}

.list-item:hover {
    background: #f3f4f6;
}

.list-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.list-item-title {
    font-weight: 600;
    color: #1f2937;
}

.list-item-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    font-family: 'Courier New', monospace;
}

/* SEARCH BAR */
.search-bar {
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form .form-control {
    flex: 1;
}

/* TABLE */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: #334155;
    color: white;
}

.table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
}

.table td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.table tbody tr:hover {
    background: #f9fafb;
}

.table code {
    background: #dbeafe;
    color: #2563eb;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: #dbeafe;
    color: #2563eb;
}

.badge-success {
    background: #d1fae5;
    color: #10b981;
}

/* FASES GRID */
.fases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.fase-card {
    border-left: 4px solid #2563eb;
}

.fase-info {
    flex: 1;
}

.fase-numero {
    font-size: 0.75rem;
    color: #6b7280;
    display: block;
}

.fase-completada {
    border-left-color: #10b981;
}

.fase-progreso {
    border-left-color: #2563eb;
}

.fase-pendiente {
    border-left-color: #9ca3af;
}

/* RADICADO HEADER */
.radicado-header {
    display: flex;
    justify-content: space-between;
}

.text-right {
    text-align: right;
}

.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

/* FORM ACTIONS */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #6b7280;
}

.close:hover {
    color: #1f2937;
}

/* CLIENTE VIEW */
.cliente-body {
    background: linear-gradient(135deg, #eff6ff 0%, #d1fae5 100%);
    min-height: 100vh;
}

.cliente-header {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px 0;
    margin-bottom: 40px;
}

.cliente-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.display-4 {
    font-size: 3rem;
    margin: 10px 0 20px;
    font-family: 'Courier New', monospace;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #dbeafe;
    border-radius: 999px;
    font-weight: 600;
}

.status-badge .status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2563eb;
}

.status-completado .status-dot {
    background: #10b981;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    text-align: center;
}

/* TIMELINE */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.timeline-item.completado {
    background: #d1fae5;
    border-color: #10b981;
}

.timeline-item.en-progreso {
    background: #dbeafe;
    border-color: #2563eb;
}

.timeline-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-content h4 {
    margin-bottom: 10px;
    color: #1f2937;
}

.timeline-content p {
    color: #6b7280;
    line-height: 1.6;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        padding: 20px;
    }
    
    .stats-grid,
    .fases-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}/* ... (Todo el CSS anterior) ... */

/* AGREGAR AL FINAL DEL CSS EXISTENTE: */

/* FASES GRID 5 COLUMNAS */
.fases-grid-5 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.fase-icono {
    font-size: 2rem;
    margin-right: 10px;
}

.fase-tarjeta {
    background: linear-gradient(135deg, #dbeafe 0%, #d1fae5 100%);
    border-left-color: #10b981 !important;
}

.badge-warning {
    background: #fef3c7;
    color: #d97706;
}

.badge-secondary {
    background: #e5e7eb;
    color: #6b7280;
}

/* TARJETA CLEANDATE PREVIEW */
.tarjeta-preview {
    margin-top: 20px;
    text-align: center;
}

.cleandate-card {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #10b981 100%);
    border-radius: 16px;
    padding: 30px 25px;
    color: white;
    max-width: 380px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    font-family: 'Courier New', monospace;
}

.card-logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: left;
}

.card-chip {
    font-size: 2rem;
    text-align: left;
    margin-bottom: 20px;
}

.card-number {
    font-size: 1.5rem;
    letter-spacing: 3px;
    margin-bottom: 20px;
    text-align: left;
}

.card-holder {
    font-size: 1rem;
    text-align: left;
    font-weight: 600;
}

.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(16, 185, 129, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.text-success {
    color: #10b981;
    font-weight: bold;
}

/* RESPONSIVE PARA TARJETA */
@media (max-width: 768px) {
    .fases-grid-5 {
        grid-template-columns: 1fr;
    }
    
    .cleandate-card {
        max-width: 100%;
    }
}