/* ============================================================
   EasyCorrect Backoffice — Custom WOW UI
   ============================================================ */

/* ── Variables ────────────────────────────────────────────── */
:root {
    --ec-blue-from: #1e40af;
    --ec-blue-to:   #3b82f6;
    --ec-indigo:    #4f46e5;
    --ec-card-bg:   #ffffff;
    --ec-radius:    1rem;
}

/* ── Sidebar gradiente ────────────────────────────────────── */
.fi-sidebar {
    background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 60%, #1e40af 100%) !important;
}

.fi-sidebar-nav-groups {
    gap: 0.25rem;
}

.fi-sidebar-item a {
    border-radius: 0.625rem !important;
    transition: background 0.15s, transform 0.1s;
}

.fi-sidebar-item a:hover {
    background: rgba(255,255,255,0.12) !important;
    transform: translateX(3px);
}

.fi-sidebar-item-active a {
    background: rgba(255,255,255,0.18) !important;
    box-shadow: 0 2px 12px rgba(59,130,246,0.35) !important;
}

.fi-sidebar-item a span,
.fi-sidebar-item a svg {
    color: rgba(255,255,255,0.85) !important;
}

.fi-sidebar-item-active a span,
.fi-sidebar-item-active a svg {
    color: #fff !important;
}

/* ── Topbar ───────────────────────────────────────────────── */
.fi-topbar {
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
    box-shadow: 0 1px 20px rgba(0,0,0,0.06) !important;
}

/* ── Stat cards WOW ──────────────────────────────────────── */
.fi-wi-stats-overview-stat {
    border-radius: var(--ec-radius) !important;
    border: none !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07) !important;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    position: relative;
}

.fi-wi-stats-overview-stat::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ec-blue-from), var(--ec-blue-to));
    border-radius: var(--ec-radius) var(--ec-radius) 0 0;
}

.fi-wi-stats-overview-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.13) !important;
}

.fi-wi-stats-overview-stat-value {
    font-size: 2rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px;
}

/* ── Tablas ───────────────────────────────────────────────── */
.fi-ta-table {
    border-radius: var(--ec-radius) !important;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06) !important;
    border: none !important;
}

.fi-ta-header-cell {
    background: #f8faff !important;
    font-weight: 700 !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: #64748b !important;
}

.fi-ta-row {
    transition: background 0.1s;
}

.fi-ta-row:hover td {
    background: #f0f7ff !important;
}

/* ── Badges de estado ─────────────────────────────────────── */
.fi-badge {
    border-radius: 999px !important;
    font-weight: 600 !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.04em !important;
    padding: 0.2rem 0.65rem !important;
}

/* ── Cards / Secciones ────────────────────────────────────── */
.fi-section {
    border-radius: var(--ec-radius) !important;
    border: none !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.05) !important;
    overflow: hidden;
}

/* ── Modales ──────────────────────────────────────────────── */
.fi-modal-window {
    border-radius: 1.25rem !important;
    box-shadow: 0 25px 80px rgba(0,0,0,0.18) !important;
    border: none !important;
}

.fi-modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
    padding: 1.25rem 1.5rem !important;
}

/* ── Botones ──────────────────────────────────────────────── */
.fi-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(59,130,246,0.4) !important;
    transition: transform 0.15s, box-shadow 0.15s !important;
}

.fi-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59,130,246,0.5) !important;
}

/* ── Service Status Card ─────────────────────────────────── */
.ec-service-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1d4ed8 100%);
    box-shadow: 0 8px 32px rgba(30,64,175,0.35);
}

.ec-service-header {
    background: rgba(0,0,0,0.15);
}

.ec-icon-wrap {
    width: 42px; height: 42px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}

.ec-status-badge {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(4px);
}

.ec-status-ok    { background: rgba(34,197,94,0.25); border: 1px solid rgba(34,197,94,0.4); }
.ec-status-error { background: rgba(239,68,68,0.25);  border: 1px solid rgba(239,68,68,0.4); }

.ec-pulse-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: ec-pulse 2s ease-in-out infinite;
}
.ec-pulse-green { background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
.ec-pulse-red   { background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }

@keyframes ec-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
    50%       { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

.ec-service-body {
    padding: 0;
}

.ec-info-block {
    display: flex; align-items: center; gap: 12px;
    padding: 1rem 1.5rem;
    color: white;
}

.ec-info-icon {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: rgba(255,255,255,0.8);
}

.ec-info-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.55);
    margin-bottom: 2px;
}

.ec-info-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

/* ── Page header ──────────────────────────────────────────── */
.fi-simple-main-ctn {
    background: #f8faff !important;
}

.fi-page-header {
    border-bottom: none !important;
}

.fi-page-heading {
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
}

/* ── Inputs ───────────────────────────────────────────────── */
.fi-input {
    border-radius: 0.625rem !important;
    border-color: #e2e8f0 !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}

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

/* ── Animación de entrada de widgets ──────────────────────── */
.fi-wi {
    animation: ec-fade-up 0.4s ease both;
}

.fi-wi:nth-child(2) { animation-delay: 0.05s; }
.fi-wi:nth-child(3) { animation-delay: 0.10s; }
.fi-wi:nth-child(4) { animation-delay: 0.15s; }
.fi-wi:nth-child(5) { animation-delay: 0.20s; }

@keyframes ec-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
