/* ============================================================
   CYBERSPACE 3D - ESTILOS PROFESIONALES
   Sistema de Tickets de Soporte
   ============================================================ */

/* 1. IMPORTAR FUENTES */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* 2. RESET Y BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    background: linear-gradient(rgba(8, 12, 20, 0.75), rgba(8, 12, 20, 0.75)), 
                url('../img/soportetecnico.jpeg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    color: #ffffff !important;
}

/* 4. CONTENEDORES PRINCIPALES */
.max-w-xl { max-width: 576px; }
.max-w-2xl { max-width: 672px; }
.max-w-3xl { max-width: 768px; }
.max-w-6xl { max-width: 1152px; }
.max-w-7xl { max-width: 1280px; }

.mx-auto { margin-left: auto; margin-right: auto; }
.my-8 { margin-top: 32px; margin-bottom: 32px; }

/* 5. TARJETAS GLASSMORPHISM */
.bg-white {
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: 16px !important;
}

.bg-slate-50 {
    background-color: rgba(30, 41, 59, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.bg-slate-100 {
    background: rgba(255, 255, 255, 0.08);
}

/* 6. TEXTO Y COLORES */
.text-slate-800 { color: #e2e8f0; }
.text-slate-700 { color: #cbd5e1; }
.text-slate-600 { color: #94a3b8; }
.text-slate-500 { color: #94a3b8; }
.text-slate-400 { color: #64748b; }
.text-slate-300 { color: #475569; }
.text-white { color: #ffffff; }
.text-blue-600 { color: #60a5fa; }
.text-blue-700 { color: #3b82f6; }
.text-emerald-700 { color: #34d399; }
.text-rose-700 { color: #f87171; }

/* 7. BORDES */
.border-slate-100 { border-color: rgba(255,255,255,0.06); }
.border-slate-200 { border-color: rgba(255,255,255,0.08); }
.border-slate-300 { border-color: rgba(255,255,255,0.12); }
.border-emerald-200 { border-color: rgba(52, 211, 153, 0.3); }
.border-rose-200 { border-color: rgba(248, 113, 113, 0.3); }
.border-blue-200 { border-color: rgba(96, 165, 250, 0.3); }

/* 8. INPUTS Y SELECTS */
input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #e2e8f0;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

input:hover, select:hover, textarea:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

input:focus, select:focus, textarea:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 44px;
    cursor: pointer;
    color: #e2e8f0;
}

select option {
    background: #1a1a3e;
    color: #e2e8f0;
}

textarea {
    resize: vertical;
    min-height: 120px;
    max-height: 300px;
    line-height: 1.6;
}

/* 9. BOTONES */
button {
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Botón primario */
.bg-blue-600 {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
}

.bg-blue-600:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.bg-blue-600:active:not(:disabled) {
    transform: translateY(0);
}

/* Botón secundario */
.bg-slate-600 {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 13px;
}

.bg-slate-600:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.bg-indigo-600 {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.bg-indigo-600:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.4);
}

.bg-slate-400 {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

/* 10. ALERTAS Y MENSAJES */
.bg-emerald-50 {
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.2);
    color: #34d399;
    border-radius: 12px;
}

.bg-rose-50 {
    background-color: rgba(136, 19, 55, 0.4) !important;
    border: 1px solid rgba(244, 63, 94, 0.3) !important;
    color: #fecdd3 !important;
    border-radius: 12px;
}

.bg-blue-50 {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.2);
    color: #60a5fa;
    border-radius: 12px;
}

/* 11. TABLAS */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

td {
    padding: 14px 16px;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* 12. BADGES DE ESTADO */
.bg-emerald-50.text-emerald-700 {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.bg-sky-50.text-sky-700 {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.bg-purple-50.text-purple-700 {
    background: rgba(192, 132, 252, 0.15);
    color: #c084fc;
    border: 1px solid rgba(192, 132, 252, 0.2);
}

.bg-slate-100.text-slate-600 {
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.bg-rose-100.text-rose-700 {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.bg-orange-100.text-orange-700 {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
}

.bg-amber-100.text-amber-700 {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

/* 13. TIPOGRAFÍA */
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-base { font-size: 15px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 30px; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'Courier New', monospace; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* Forzar textos a blanco */
.text-slate-800,
.text-slate-900,
.text-slate-700,
.text-gray-800,
.text-gray-900,
p, h1, h2, h3, label {
    color: #ffffff !important;
}

.text-slate-800.text-2xl,
.text-2xl {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* 14. SPINNER DE CARGA */
.animate-spin {
    animation: spin 1s linear infinite;
}

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

/* 15. ANIMACIONES */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* 16. RESPONSIVE Y UTILIDADES */
.w-full { width: 100%; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resize-none { resize: none; }

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

.flex { display: flex; }
.flex-col { flex-direction: column; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }

.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-6 { padding-left: 24px; padding-right: 24px; }

.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-2\.5 { padding-top: 10px; padding-bottom: 10px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }

.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }
.rounded-full { border-radius: 9999px; }

.shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3); }
.shadow-lg { box-shadow: 0 10px 25px -3px rgba(0,0,0,0.4); }

.max-h-48 { max-height: 192px; }
.max-h-60 { max-height: 240px; }
.min-h-screen { min-height: 100vh; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-4 > * + * { margin-top: 16px; }

.underline { text-decoration: underline; }
.hover\:text-blue-800:hover { color: #3b82f6; }

/* 17. SCROLLBAR PERSONALIZADO */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Estilos específicos para inputs de texto en los componentes */
input[type="text"] {
    font-size: 16px !important;
    background-color: rgba(30, 41, 59, 0.8) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
}

input[type="text"]::placeholder {
    color: #94a3b8 !important;
}

input[type="text"]:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4) !important;
}

.bg-slate-50.p-3 {
    background-color: rgba(15, 23, 42, 0.6) !important;
}

/* ============================================================
   ADAPTACIÓN PARA MÓVILES
   ============================================================ */
@media (max-width: 640px) {
    body {
        padding: 10px !important;
    }

    .max-w-3xl {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .bg-white {
        padding: 16px !important;
    }

    .h-20 {
        height: 50px !important;
    }

    .text-2xl {
        font-size: 18px !important;
    }

    .text-slate-800.text-2xl {
        font-size: 15px !important;
    }

    .flex.gap-3 {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .bg-blue-600 {
        width: 100% !important;
        padding: 12px !important;
    }

    .grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    .inline-flex.items-center.gap-2.mt-3 {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
    }
}

@media (max-width: 400px) {
    body {
        padding: 6px !important;
    }

    .bg-white {
        padding: 12px !important;
    }

    .h-20 {
        height: 40px !important;
    }
}
