/* ═══════════════════════════════════════════════════════════════════════
   Home.css  –  Página principal mejorada con calendario premium
   NegocioRodar Design System
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Layout principal ─────────────────────────────────────────────────── */
.home-dashboard .row .col-calendario {
    max-width: 65%;
    margin-top: 10px;
}
.home-dashboard .row .col-balances-gastos {
    max-width: 35%;
    padding-top: 10px;
}

/* ── Encabezado de sección Home ────────────────────────────────────────── */
.home-dashboard .home-section-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 10px;
    padding: 8px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #282b2d, #3D4044);
    color: #F2E6D8;
    box-shadow: 0 4px 16px rgba(40,43,45,0.35);
    display: flex;
    align-items: center;
    gap: 8px;
}
.home-dashboard .home-section-title::before {
    content: '';
    display: inline-block;
    width: 4px; height: 18px;
    background: #A60825;
    border-radius: 4px;
}

/* ══════════════════════════════════════════════════════════════════════════
   CALENDARIO FULLCALENDAR – REDISEÑO PREMIUM
   ══════════════════════════════════════════════════════════════════════════ */
.home-dashboard #calendar {
    margin-top: 10px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.60);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.40);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    animation: nr-fade-in-up 0.4s ease both;
}

@keyframes nr-fade-in-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Toolbar del calendario ──────────────────────────────────────────── */
.home-dashboard .fc .fc-toolbar {
    background: linear-gradient(135deg, #73020C, #A60825);
    border-radius: 12px 12px 0 0;
    margin: -14px -14px 12px;
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 6px;
}
.home-dashboard .fc-toolbar-title {
    font-family: 'Inter', sans-serif !important;
    font-weight: 800 !important;
    font-size: 1.05rem !important;
    color: #F2E6D8 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Botones de navegación del calendario ────────────────────────────── */
.home-dashboard .fc .fc-button,
.home-dashboard .fc-next-button.fc-button.fc-button-primary,
.home-dashboard .fc-prev-button.fc-button-primary,
.home-dashboard .fc-today-button.fc-button-primary,
.home-dashboard .fc-dayGridMonth-button,
.home-dashboard .fc-timeGridWeek-button,
.home-dashboard .fc-listMonth-button {
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.30) !important;
    color: #F2E6D8 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.78rem !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}
.home-dashboard .fc .fc-button:hover,
.home-dashboard .fc-button.fc-button-active {
    background: rgba(255,255,255,0.35) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.20) !important;
}
.home-dashboard .fc .fc-button-active {
    background: rgba(242, 230, 216, 0.25) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15) !important;
}
.home-dashboard .fc-icon.fc-icon-chevron-right,
.home-dashboard .fc-icon.fc-icon-chevron-left {
    color: #F2E6D8 !important;
}

/* ── Cabecera días (Lun, Mar...) ─────────────────────────────────────── */
.home-dashboard .fc .fc-col-header-cell-cushion {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.72rem !important;
    color: #282B2D !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none !important;
    padding: 6px 2px;
}
.home-dashboard .fc .fc-col-header-cell {
    background: rgba(242, 230, 216, 0.50);
    border-bottom: 2px solid rgba(115, 2, 12, 0.20);
}

/* ── Números de día ──────────────────────────────────────────────────── */
.home-dashboard .fc .fc-daygrid-day-number {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700;
    font-size: 0.85rem;
    color: #282B2D !important;
    text-decoration: none !important;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.15s;
}
.home-dashboard .fc .fc-daygrid-day:hover .fc-daygrid-day-number {
    background: rgba(115, 2, 12, 0.10);
    color: #73020C !important;
}

/* ── Día de hoy ──────────────────────────────────────────────────────── */
.home-dashboard .fc-day-today.fc-daygrid-day {
    background: linear-gradient(135deg, rgba(115, 2, 12, 0.15), rgba(166, 8, 37, 0.10)) !important;
    border: 2px solid rgba(115, 2, 12, 0.40) !important;
    border-radius: 4px;
}
.home-dashboard .fc-day-today .fc-daygrid-day-number {
    background: #A60825;
    color: #F2E6D8 !important;
    border-radius: 8px;
    padding: 3px 8px;
    box-shadow: 0 2px 8px rgba(115,2,12,0.35);
}

/* ── Días futuros / pasados ──────────────────────────────────────────── */
.home-dashboard .fc-day.fc-day-future.fc-daygrid-day {
    background: rgba(255, 255, 255, 0.35);
    transition: background 0.2s;
}
.home-dashboard .fc-day.fc-day-future.fc-daygrid-day:hover {
    background: rgba(242, 230, 216, 0.50);
}
.home-dashboard .fc-day.fc-day-past.fc-daygrid-day {
    background: rgba(200, 200, 200, 0.25);
    opacity: 0.80;
}

/* ── Eventos ──────────────────────────────────────────────────────────── */
.home-dashboard .fc-event {
    border: none !important;
    border-radius: 6px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    padding: 2px 6px !important;
    cursor: pointer;
    transition: all 0.18s ease !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
}
.home-dashboard .fc-event:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 10px rgba(0,0,0,0.22) !important;
    filter: brightness(1.08);
}
.home-dashboard .fc-event-title-container {
    font-weight: 600;
    font-size: 0.72rem;
    text-align: left;
}
/* Colores de eventos por type */
.home-dashboard .fc-event.event-venta    { background: linear-gradient(135deg, #1A7A4A, #0F5C35) !important; }
.home-dashboard .fc-event.event-gasto    { background: linear-gradient(135deg, #C01010, #8B0000) !important; }
.home-dashboard .fc-event.event-compra   { background: linear-gradient(135deg, #0052A3, #003A7A) !important; }
.home-dashboard .fc-event.event-orden    { background: linear-gradient(135deg, #C07800, #8B5500) !important; }

/* ── Variables FullCalendar ──────────────────────────────────────────── */
:root {
    --fc-border-color:              rgba(0, 0, 0, 0.08);
    --fc-daygrid-event-dot-width:   8px;
    --fc-list-event-dot-width:      10px;
    --fc-list-event-hover-bg-color: rgba(166, 8, 37, 0.08);
    --fc-page-bg-color:             transparent;
}

/* ══════════════════════════════════════════════════════════════════════════
   PANEL LATERAL: Gastos y Balance
   ══════════════════════════════════════════════════════════════════════════ */
.home-dashboard .row .col-balances-gastos .card {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.40);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
    transition: all 0.25s ease;
    overflow: hidden;
}
.home-dashboard .row .col-balances-gastos .card:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    transform: translateY(-2px);
}
.home-dashboard .row .col-balances-gastos .card .card-header {
    background: linear-gradient(135deg, #282B2D, #3D4044) !important;
    color: #F2E6D8;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    border-radius: 14px 14px 0 0 !important;
}
.home-dashboard .row .col-balances-gastos .card .card-header .card-title {
    margin: 0;
    color: #F2E6D8;
    font-size: 0.95rem;
    font-weight: 700;
}
.home-dashboard .row .col-balances-gastos .card .card-body {
    padding: 12px;
    background: transparent;
}
.home-dashboard .row .col-balances-gastos .card .card-footer {
    background: rgba(255, 255, 255, 0.30);
    padding: 8px 12px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* ── Tabla de gastos/balance ─────────────────────────────────────────── */
.home-dashboard .row .col-balances-gastos .card table {
    width: 100%;
    font-size: 0.82rem;
    font-weight: 500;
    border-collapse: separate;
    border-spacing: 0 3px;
}
.home-dashboard .row .col-balances-gastos .card table th {
    background: rgba(242, 230, 216, 0.50);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #282B2D;
    padding: 6px 10px;
}
.home-dashboard .row .col-balances-gastos .card table td {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: background 0.15s;
}
.home-dashboard .row .col-balances-gastos .card table tr:hover td {
    background: rgba(166, 8, 37, 0.05);
}

/* ── Monto del balance ───────────────────────────────────────────────── */
.home-dashboard .card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #282B2D;
}

/* ── Botón nuevo gasto ───────────────────────────────────────────────── */
#modalGasto .modal-dialog,
#modalEditarGasto .modal-dialog {
    max-width: min(96vw, 640px);
}

/* ── Modal Header (Home gastos) ──────────────────────────────────────── */
#modalGasto .modal-header h1,
#modalEditarGasto .modal-header h1 {
    background: none !important;
    box-shadow: none !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #F2E6D8 !important;
    text-align: left !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* ── Form modal de gasto ─────────────────────────────────────────────── */
#modalGasto .modal-body form,
#modalEditarGasto .modal-body form {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
#grupoMonto { margin-top: -10px; }

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1424px) {
    .home-dashboard .row .col-calendario  { max-width: 100%; }
    .home-dashboard .row .col-balances-gastos { max-width: 100%; min-width: 280px; }
    .home-dashboard #calendar { min-width: auto; }
}
@media (max-width: 768px) {
    .home-dashboard .row { flex-direction: column; gap: 12px; }
    .home-dashboard .fc .fc-toolbar { flex-direction: column; gap: 8px; }
    .home-dashboard .fc-toolbar-title { font-size: 0.9rem !important; }
}
@media (max-width: 480px) {
    .home-dashboard #calendar { padding: 8px; border-radius: 12px; }
}