/* ═══════════════════════════════════════════════════════════════════
   TEMA AZUL UNIVERSAL - Donde Juanita POS
   Incluir este archivo en todas las paginas HTML para estilo consistente
   Version: 1.0.0
   ═══════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────
   VARIABLES DE TEMA AZUL
   ───────────────────────────────────────────────────────────────────── */
:root {
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-900: #1e3a8a;

    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
}

/* ─────────────────────────────────────────────────────────────────────
   FONDO CON PATRON MINIMALISTA
   ───────────────────────────────────────────────────────────────────── */
body.theme-blue {
    background: linear-gradient(135deg, #e8f4fc 0%, #dbeafe 50%, #eff6ff 100%) !important;
    background-attachment: fixed !important;
    position: relative;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

body.theme-blue::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 25%),
        radial-gradient(circle at 50% 50%, rgba(147, 197, 253, 0.05) 0%, transparent 35%),
        linear-gradient(rgba(59, 130, 246, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 60px 60px, 60px 60px;
    pointer-events: none;
    z-index: 0;
}

body.theme-blue::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

body.theme-blue > * {
    position: relative;
    z-index: 1;
}

/* ─────────────────────────────────────────────────────────────────────
   HEADER AZUL
   ───────────────────────────────────────────────────────────────────── */
.header-blue {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%) !important;
    color: white !important;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.3);
}

.header-blue h1,
.header-blue h2,
.header-blue span,
.header-blue p {
    color: white !important;
}

.header-blue .material-symbols-outlined {
    color: white !important;
}

.header-blue button:not(.btn-danger) {
    color: white !important;
}

.header-blue button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Boton de salir en header */
.header-blue .logout-btn,
.header-blue .btn-salir {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.header-blue .logout-btn:hover,
.header-blue .btn-salir:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* ─────────────────────────────────────────────────────────────────────
   CARDS CON ICONO AZUL
   ───────────────────────────────────────────────────────────────────── */
.card-blue {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card-blue:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
}

.card-blue .card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
}

.card-blue .card-icon .material-symbols-outlined {
    font-size: 28px;
    color: white !important;
}

/* Decoracion curva en cards */
.card-blue .curve-decoration {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid rgba(59, 130, 246, 0.15);
    border-radius: 50%;
    top: -10px;
    right: -10px;
}

/* ─────────────────────────────────────────────────────────────────────
   PANEL / SECCION BLANCA
   ───────────────────────────────────────────────────────────────────── */
.panel-blue {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.panel-blue h2 {
    color: #1e40af !important;
}

.panel-blue .panel-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
}

/* ─────────────────────────────────────────────────────────────────────
   BOTONES AZULES
   ───────────────────────────────────────────────────────────────────── */
.btn-blue {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-blue:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.35);
    transform: translateY(-2px);
}

.btn-blue-outline {
    background: transparent;
    color: #1e40af;
    border: 2px solid #1e40af;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-blue-outline:hover {
    background: #1e40af;
    color: white;
}

.btn-blue-light {
    background: #dbeafe;
    color: #1e40af;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-blue-light:hover {
    background: #bfdbfe;
}

/* ─────────────────────────────────────────────────────────────────────
   BADGES Y ESTADOS
   ───────────────────────────────────────────────────────────────────── */
.badge-blue {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-blue-solid {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────────────
   FOOTER AZUL
   ───────────────────────────────────────────────────────────────────── */
.footer-blue {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
    color: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.2);
}

.footer-blue h3,
.footer-blue p,
.footer-blue span {
    color: white !important;
}

.footer-blue .footer-badge {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.375rem 0.75rem;
}

/* ─────────────────────────────────────────────────────────────────────
   INPUTS Y FORMULARIOS
   ───────────────────────────────────────────────────────────────────── */
.input-blue {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.input-blue:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ─────────────────────────────────────────────────────────────────────
   TABLAS
   ───────────────────────────────────────────────────────────────────── */
.table-blue thead {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
}

.table-blue thead th {
    padding: 1rem;
    font-weight: 700;
    color: white !important;
}

.table-blue tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s ease;
}

.table-blue tbody tr:hover {
    background: #f8fafc;
}

.table-blue tbody td {
    padding: 1rem;
}

/* ─────────────────────────────────────────────────────────────────────
   ALERTAS Y MENSAJES
   ───────────────────────────────────────────────────────────────────── */
.alert-blue {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-left: 4px solid #1e40af;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #1e40af;
}

.alert-blue-warning {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #92400e;
}

/* ─────────────────────────────────────────────────────────────────────
   MODO OSCURO
   ───────────────────────────────────────────────────────────────────── */
body.theme-blue.dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
    color: #e2e8f0;
}

body.theme-blue.dark::before {
    background-image:
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.12) 0%, transparent 25%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 35%),
        linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
}

body.theme-blue.dark::after {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
}

/* Header oscuro */
body.theme-blue.dark .header-blue {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%) !important;
}

/* Cards oscuras */
body.theme-blue.dark .card-blue,
body.theme-blue.dark .panel-blue {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.theme-blue.dark .card-blue:hover {
    border-color: #3b82f6 !important;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.2) !important;
}

body.theme-blue.dark .card-blue .card-title,
body.theme-blue.dark .panel-blue h2,
body.theme-blue.dark .panel-blue p {
    color: #e2e8f0 !important;
}

/* Inputs oscuros */
body.theme-blue.dark .input-blue {
    background: #0f172a;
    border-color: #475569;
    color: #e2e8f0;
}

body.theme-blue.dark .input-blue:focus {
    border-color: #3b82f6;
}

/* Textos en modo oscuro */
body.theme-blue.dark .text-gray-800,
body.theme-blue.dark .text-gray-900 {
    color: #e2e8f0 !important;
}

body.theme-blue.dark .text-gray-600,
body.theme-blue.dark .text-gray-500 {
    color: #94a3b8 !important;
}

body.theme-blue.dark .bg-white {
    background: #1e293b !important;
}

body.theme-blue.dark .bg-gray-50,
body.theme-blue.dark .bg-gray-100 {
    background: #0f172a !important;
}

body.theme-blue.dark .border-gray-200,
body.theme-blue.dark .border-gray-100 {
    border-color: #334155 !important;
}

/* Footer oscuro */
body.theme-blue.dark .footer-blue {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%) !important;
}

/* ─────────────────────────────────────────────────────────────────────
   UTILIDADES
   ───────────────────────────────────────────────────────────────────── */
.z-content {
    position: relative;
    z-index: 1;
}

.text-blue-primary {
    color: #1e40af;
}

.text-blue-secondary {
    color: #3b82f6;
}

.bg-blue-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

.shadow-blue {
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.2);
}

/* Scrollbar personalizado */
.theme-blue ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.theme-blue ::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.theme-blue ::-webkit-scrollbar-thumb {
    background: #93c5fd;
    border-radius: 4px;
}

.theme-blue ::-webkit-scrollbar-thumb:hover {
    background: #60a5fa;
}

body.theme-blue.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

body.theme-blue.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

body.theme-blue.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
