@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --pip-primary: #4f46e5;
    --pip-primary-hover: #4338ca;
    --pip-primary-light: #eef2ff;
    --pip-secondary: #64748b;
    --pip-accent: #0ea5e9;
    --pip-gradient: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
    --pip-gradient-header: linear-gradient(135deg, #3730a3 0%, #4f46e5 50%, #2563eb 100%);
    --pip-gradient-card: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    --pip-bg: #f1f5f9;
    --pip-surface: #ffffff;
    --pip-text-main: #0f172a;
    --pip-text-muted: #64748b;
    --pip-border: #e2e8f0;
    --pip-radius-lg: 1.25rem;
    --pip-radius-md: 0.75rem;
    --pip-radius-sm: 0.5rem;
    --pip-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --pip-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --pip-shadow-lg: 0 10px 25px -5px rgba(79, 70, 229, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

body {
    background-color: var(--pip-bg);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--pip-text-main);
    min-height: 100vh;
}

/* Glassmorphism & Navbar */
.pip-navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.pip-brand-icon {
    width: 40px;
    height: 40px;
    background: var(--pip-gradient);
    border-radius: var(--pip-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.pip-nav-btn {
    border-radius: var(--pip-radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.pip-nav-btn.active {
    background: var(--pip-primary-light);
    color: var(--pip-primary) !important;
    border-color: transparent;
}

/* Base Cards */
.pip-card {
    background: var(--pip-surface);
    border-radius: var(--pip-radius-lg);
    border: 1px solid var(--pip-border);
    box-shadow: var(--pip-shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.pip-card-hover:hover {
    transform: translateY(-3px);
    box-shadow: var(--pip-shadow-lg);
    border-color: rgba(79, 70, 229, 0.2);
}

.pip-card-header {
    background: var(--pip-gradient-header);
    color: #ffffff;
    padding: 1.5rem;
    border-bottom: none;
}

/* Stat Cards */
.pip-stat-card {
    background: var(--pip-surface);
    border-radius: var(--pip-radius-lg);
    border: 1px solid var(--pip-border);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--pip-shadow-sm);
    transition: all 0.2s ease;
}

.pip-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--pip-shadow-md);
}

.pip-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--pip-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Form Styling */
.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.form-control, .form-select {
    border-radius: var(--pip-radius-md);
    border: 1px solid var(--pip-border);
    padding: 0.65rem 0.9rem;
    font-size: 0.925rem;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    background-color: #ffffff;
    border-color: var(--pip-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.input-group-text {
    border-radius: var(--pip-radius-md);
    background-color: #f8fafc;
    border-color: var(--pip-border);
    color: var(--pip-secondary);
}

/* Custom Upload Dropzone */
.pip-dropzone {
    border: 2px dashed var(--pip-border);
    border-radius: var(--pip-radius-lg);
    padding: 1.5rem;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pip-dropzone:hover {
    border-color: var(--pip-primary);
    background: var(--pip-primary-light);
}

.pip-preview-img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: var(--pip-radius-md);
    box-shadow: var(--pip-shadow-sm);
    border: 2px solid #fff;
    transition: transform 0.2s ease;
}

.pip-preview-wrapper {
    position: relative;
    display: inline-block;
}

.pip-preview-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: var(--pip-shadow-sm);
}

/* Buttons */
.btn-pip-primary {
    background: var(--pip-gradient);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--pip-radius-md);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    transition: all 0.25 ease;
}

.btn-pip-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #1d4ed8 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.btn-pip-primary:disabled {
    background: #94a3b8;
    box-shadow: none;
}

.btn-pip-outline {
    border: 1.5px solid var(--pip-border);
    background: #fff;
    color: var(--pip-text-main);
    font-weight: 600;
    border-radius: var(--pip-radius-md);
    padding: 0.65rem 1.25rem;
    transition: all 0.2s ease;
}

.btn-pip-outline:hover {
    background: #f8fafc;
    border-color: var(--pip-secondary);
    color: var(--pip-primary);
}

/* Badges & Tags */
.pip-badge {
    padding: 0.35em 0.75em;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 2rem;
}

.pip-badge-primary {
    background-color: var(--pip-primary-light);
    color: var(--pip-primary);
}

.pip-badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.pip-badge-info {
    background-color: #e0f2fe;
    color: #0369a1;
}

/* Quick Preset Chips */
.btn-pip-chip {
    background-color: var(--pip-primary-light);
    color: var(--pip-primary);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 2rem;
    font-size: 0.825rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    transition: all 0.2s ease;
    box-shadow: var(--pip-shadow-sm);
}

.btn-pip-chip:hover, .btn-pip-chip:focus, .btn-pip-chip.active {
    background-color: var(--pip-primary) !important;
    color: #ffffff !important;
    border-color: var(--pip-primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

/* Flatpickr Theme Overrides */
.flatpickr-calendar {
    border-radius: var(--pip-radius-lg) !important;
    box-shadow: var(--pip-shadow-lg) !important;
    border: 1px solid var(--pip-border) !important;
    font-family: inherit !important;
}

.flatpickr-day.selected {
    background: var(--pip-primary) !important;
    border-color: var(--pip-primary) !important;
}

/* Flatpickr Timepicker Enhancements */
.flatpickr-calendar.hasTime.noCalendar {
    width: auto !important;
    min-width: 220px !important;
    padding: 0.75rem 1rem !important;
    border-radius: var(--pip-radius-lg) !important;
    box-shadow: var(--pip-shadow-lg) !important;
}

.flatpickr-time {
    max-height: 52px !important;
    line-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.flatpickr-time .numInputWrapper {
    height: 44px !important;
}

.flatpickr-time input {
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    color: var(--pip-text-main) !important;
}

.flatpickr-time .flatpickr-am-pm {
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    color: var(--pip-primary) !important;
    background: var(--pip-primary-light) !important;
    border-radius: var(--pip-radius-sm) !important;
    padding: 0.25rem 0.6rem !important;
    height: auto !important;
    line-height: 1.4 !important;
    border: 1px solid rgba(79, 70, 229, 0.15) !important;
}

/* Gallery Thumbnails in Activity List */
.pip-gallery-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--pip-radius-sm);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--pip-border);
}

.pip-gallery-thumb:hover {
    transform: scale(1.08);
    box-shadow: var(--pip-shadow-md);
}

/* Login Page Hero Backdrop */
.pip-login-bg {
    background: radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(14, 165, 233, 0.08) 0%, transparent 40%),
                var(--pip-bg);
}

/* FullCalendar PIP Custom Styles */
.fc {
    font-family: inherit !important;
    --fc-border-color: var(--pip-border) !important;
    --fc-today-bg-color: rgba(79, 70, 229, 0.05) !important;
    --fc-button-bg-color: var(--pip-primary) !important;
    --fc-button-border-color: var(--pip-primary) !important;
    --fc-button-hover-bg-color: var(--pip-primary-hover) !important;
    --fc-button-hover-border-color: var(--pip-primary-hover) !important;
    --fc-button-active-bg-color: var(--pip-primary-hover) !important;
    --fc-button-active-border-color: var(--pip-primary-hover) !important;
}

.fc .fc-toolbar {
    align-items: center !important;
    margin-bottom: 1.25rem !important;
}

.fc .fc-toolbar-title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: var(--pip-text-main) !important;
}

.fc .fc-button {
    border-radius: var(--pip-radius-md) !important;
    font-weight: 600 !important;
    font-size: 0.825rem !important;
    padding: 0.45rem 0.85rem !important;
    transition: all 0.2s ease !important;
    text-transform: capitalize !important;
}

.fc .fc-button-primary {
    background: var(--pip-gradient) !important;
    border: none !important;
    box-shadow: var(--pip-shadow-sm) !important;
}

.fc .fc-button-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #1d4ed8 100%) !important;
    box-shadow: var(--pip-shadow-md) !important;
}

.fc .fc-button-primary:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25) !important;
}

.fc .fc-button-group > .fc-button {
    margin-right: 2px !important;
}

.fc-col-header-cell {
    background-color: #f8fafc !important;
    padding: 0.6rem 0 !important;
    border-bottom: 1px solid var(--pip-border) !important;
}

.fc-col-header-cell-cushion {
    color: var(--pip-text-muted) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fc-daygrid-day-number {
    color: var(--pip-text-main) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    font-size: 0.85rem !important;
    padding: 6px 8px !important;
}

.fc-daygrid-day.fc-day-today {
    background-color: rgba(79, 70, 229, 0.03) !important;
}

.fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
    background-color: var(--pip-primary) !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    margin: 4px !important;
}

/* Custom Highlight class for selected day cell */
.fc-day.fc-day-selected {
    background-color: rgba(79, 70, 229, 0.1) !important;
    transition: background-color 0.2s ease;
}

.fc-event {
    background-color: var(--pip-primary-light) !important;
    border: 1px solid rgba(79, 70, 229, 0.15) !important;
    color: var(--pip-primary) !important;
    border-radius: var(--pip-radius-sm) !important;
    padding: 3px 6px !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-bottom: 2px !important;
}

.fc-event:hover {
    background-color: var(--pip-primary) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: var(--pip-shadow-sm) !important;
}

.fc-theme-bootstrap5 a {
    text-decoration: none !important;
}

.fc-daygrid-event-hdom {
    padding: 2px !important;
}

.fc-daygrid-more-link {
    font-weight: 700 !important;
    color: var(--pip-accent) !important;
    font-size: 0.725rem !important;
    text-decoration: none !important;
}

@media (max-width: 991.98px) {
    .fc .fc-toolbar {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
}

/* Soft Pastel Cards Styles */
.pip-card-pastel-1 {
    background-color: #f5f3ff !important; /* Soft Lavender */
    border-left: 4px solid #8b5cf6 !important;
}
.pip-card-pastel-2 {
    background-color: #ecfdf5 !important; /* Soft Emerald */
    border-left: 4px solid #10b981 !important;
}
.pip-card-pastel-3 {
    background-color: #fffbeb !important; /* Soft Amber */
    border-left: 4px solid #f59e0b !important;
}
.pip-card-pastel-4 {
    background-color: #fff1f2 !important; /* Soft Rose */
    border-left: 4px solid #f43f5e !important;
}
.pip-card-pastel-5 {
    background-color: #ecfeff !important; /* Soft Cyan */
    border-left: 4px solid #06b6d4 !important;
}
.pip-card-pastel-6 {
    background-color: #fdf2f8 !important; /* Soft Pink */
    border-left: 4px solid #ec4899 !important;
}

/* Days with activities: soft highlight on the day number */
.fc-day-has-activity:not(.fc-day-today) .fc-daygrid-day-number {
    background-color: var(--pip-primary-light) !important;
    color: var(--pip-primary) !important;
    border: 1.5px solid rgba(79, 70, 229, 0.25) !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    margin: 4px !important;
    font-weight: 700 !important;
    transition: all 0.2s ease;
}

/* Hover effects for days with activities */
.fc-day-has-activity:not(.fc-day-today):hover .fc-daygrid-day-number {
    background-color: var(--pip-primary) !important;
    color: #ffffff !important;
    border-color: var(--pip-primary) !important;
}

/* Elegant dot indicator at the bottom center of the day cell */
.fc-day-has-activity .fc-daygrid-day-frame {
    position: relative;
}

.fc-day-has-activity .fc-daygrid-day-frame::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--pip-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    transition: all 0.2s ease;
    animation: pipDotPulse 2s infinite ease-in-out;
}

/* Color adjustments for the dot when the cell is selected or is today */
.fc-day-today.fc-day-has-activity .fc-daygrid-day-frame::after {
    background-color: var(--pip-accent);
}

.fc-day-selected.fc-day-has-activity .fc-daygrid-day-frame::after {
    background-color: var(--pip-primary);
    width: 8px;
    height: 8px;
}

@keyframes pipDotPulse {
    0% {
        transform: translateX(-50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translateX(-50%) scale(1.3);
        opacity: 1;
        box-shadow: 0 0 6px rgba(79, 70, 229, 0.6);
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.8;
    }
}

/* ==========================================================================
   Botones y Estilos para Exportación a Word
   ========================================================================== */
.btn-pip-word {
    background: linear-gradient(135deg, #185abd 0%, #104a9e 100%);
    border: 1px solid #104a9e;
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--pip-radius-md);
    box-shadow: 0 3px 10px rgba(24, 90, 189, 0.25);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-pip-word:hover {
    background: linear-gradient(135deg, #104a9e 0%, #0c3674 100%);
    box-shadow: 0 5px 15px rgba(24, 90, 189, 0.35);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.btn-pip-word:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(24, 90, 189, 0.2);
}

.btn-pip-word-outline {
    background: #ffffff;
    border: 1.5px solid #185abd;
    color: #185abd !important;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    border-radius: var(--pip-radius-md);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-pip-word-outline:hover {
    background: #eef4fc;
    border-color: #104a9e;
    color: #104a9e !important;
    box-shadow: 0 2px 8px rgba(24, 90, 189, 0.15);
}

/* Modal Selector Cards */
.pip-export-option-card {
    border: 1.5px solid var(--pip-border);
    border-radius: var(--pip-radius-md);
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pip-export-option-card:hover {
    border-color: #185abd;
    background: #f8faff;
}

.pip-export-option-card.active,
.pip-export-option-card:has(input[type="radio"]:checked) {
    border-color: #185abd;
    background: #eef4fc;
    box-shadow: 0 2px 6px rgba(24, 90, 189, 0.12);
}

.pip-export-option-card input[type="radio"] {
    accent-color: #185abd;
    cursor: pointer;
}

