/* Etiqueta visual para el menú lateral */
.badge-admin {
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 12px;
    margin-top: 5px;
    display: inline-block;
    letter-spacing: 1px;
}

/* ==========================
   TARJETAS KPI (INDICADORES)
========================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.kpi-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 5px solid #cbd5e1;
}

.kpi-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-data h3 {
    margin: 0;
    font-size: 28px;
    color: #1e293b;
    line-height: 1.2;
}

.kpi-data p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Colores específicos de KPIs */
.kpi-card.danger {
    border-left-color: #ef4444;
}

.kpi-card.danger .kpi-icon {
    background: #fee2e2;
    color: #ef4444;
}

.kpi-card.warning {
    border-left-color: #f59e0b;
}

.kpi-card.warning .kpi-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.kpi-card.success {
    border-left-color: #10b981;
}

.kpi-card.success .kpi-icon {
    background: #d1fae5;
    color: #10b981;
}

.kpi-card.primary {
    border-left-color: #0284c7;
}

.kpi-card.primary .kpi-icon {
    background: #e0f2fe;
    color: #0284c7;
}

/* Botón de Gestión en la tabla */
.btn-gestionar {
    background: #0284c7;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-gestionar:hover {
    background: #0369a1;
}

/* ==========================
   ESTILOS DE LA TABLA ADMIN
========================== */
#tablaAdmin {
    width: 100%;
    border-collapse: collapse;
}

#tablaAdmin th {
    text-align: left;
    padding: 15px;
    color: #64748b;
    border-bottom: 2px solid #f1f5f9;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#tablaAdmin td {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    font-size: 14px;
    vertical-align: middle;
}

#tablaAdmin tr:hover {
    background-color: #f8fafc;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background: #fff;
    width: 400px;
    margin: 100px auto;
    border-radius: 12px;
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    background: #f8fafc;
    text-align: right;
}

.close {
    cursor: pointer;
    font-size: 20px;
}

.btn-guardar {
    background: #0284c7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

/* ==========================
   MODAL PREMIUM (ESTILO DISEÑO)
========================== */
.modal-pro {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    z-index: 1000;
    backdrop-filter: blur(3px);
    overflow-y: auto;
}

.modal-content-pro {
    background: #fff;
    width: 90%;
    max-width: 800px;
    margin: 40px auto;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Header */
.modal-header-pro {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-title h3 {
    margin: 0;
    font-size: 20px;
    color: #0f172a;
}

.header-title p {
    margin: 2px 0 0 0;
    font-size: 13px;
    color: #64748b;
}

.icon-bg {
    background: #eff6ff;
    color: #3b82f6;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
}

.close-pro {
    background: none;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.close-pro:hover {
    color: #0f172a;
}

/* Body */
.modal-body-pro {
    padding: 30px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin: 25px 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: #3b82f6;
}

/* Grid Información */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.info-item i {
    font-size: 20px;
    color: #94a3b8;
    margin-top: 2px;
}

.info-item span {
    display: block;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-item strong {
    display: block;
    font-size: 14px;
    color: #0f172a;
}

/* Badges */
.badge-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.bg-abierto {
    background: #fee2e2;
    color: #ef4444;
}

.bg-abierto::before {
    background: #ef4444;
}

.bg-proceso {
    background: #fef3c7;
    color: #f59e0b;
}

.bg-proceso::before {
    background: #f59e0b;
}

.bg-resuelto {
    background: #d1fae5;
    color: #10b981;
}

.bg-resuelto::before {
    background: #10b981;
}

.priority-alta {
    background: #fee2e2;
    color: #ef4444;
}

.priority-alta::before {
    background: #ef4444;
}

.priority-media {
    background: #fef3c7;
    color: #f59e0b;
}

.priority-media::before {
    background: #f59e0b;
}

.priority-baja {
    background: #f1f5f9;
    color: #64748b;
}

.priority-baja::before {
    background: #64748b;
}

/* Cajas de contenido */
.desc-box {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
}

.evidence-box {
    display: flex;
    gap: 20px;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 12px;
    align-items: center;
}

.evidence-img-container img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.evidence-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-text {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.btn-text:hover {
    color: #2563eb;
}

.size-text {
    font-size: 12px;
    color: #94a3b8;
    padding-left: 24px;
}

.no-evidence-text {
    font-size: 14px;
    color: #64748b;
    font-style: italic;
    padding: 20px;
}

/* Controles */
.management-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group-pro label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.form-group-pro select,
.form-group-pro textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s;
}

.form-group-pro select:focus,
.form-group-pro textarea:focus {
    border-color: #3b82f6;
}

.form-group-pro textarea {
    resize: vertical;
}

.char-counter {
    text-align: right;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 5px;
}

/* Timeline simple */
.timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding-top: 10px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 40px;
    right: 40px;
    height: 1px;
    background: dashed 1px #cbd5e1;
    z-index: 1;
}

.timeline-step {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    z-index: 2;
    padding: 0 10px;
}

.timeline-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #64748b;
    background: #fff;
}

.timeline-content strong {
    display: block;
    font-size: 12px;
    color: #334155;
}

.timeline-content span {
    font-size: 11px;
    color: #94a3b8;
}

/* Footer */
.modal-footer-pro {
    padding: 20px 30px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8fafc;
}

.btn-cancelar {
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #475569;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    gap: 5px;
    align-items: center;
}

.btn-cancelar:hover {
    background: #f1f5f9;
}

.btn-guardar-pro {
    padding: 10px 25px;
    background: #014eab;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    gap: 5px;
    align-items: center;
}

.btn-guardar-pro:hover {
    background: #01387e;
}

/* Filtros avanzados en Todos los Tickets */
.filter-select,
.filter-date {
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    color: #334155;
    outline: none;
    width: 100%;
}

.filter-select:focus,
.filter-date:focus {
    border-color: #0284c7;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* ==========================
   ESTILOS FORMULARIO USUARIOS PREMIUM
========================== */
.form-premium .grid-3-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-premium .grid-2-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-group-icon label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.form-group-icon label span {
    color: #ef4444;
}

/* Asterisco rojo */

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    color: #64748b;
    font-size: 16px;
    pointer-events: none;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 12px 15px 12px 40px;
    /* 40px de padding izquierdo para hacer espacio al icono */
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    color: #0f172a;
    outline: none;
    transition: all 0.2s;
    background: #fff;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    border-color: #014eab;
    box-shadow: 0 0 0 3px rgba(1, 78, 171, 0.1);
}