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

:root {
    --primary: #00b4c5;
    --primary-dark: #008a97;
    --primary-light: rgba(0, 180, 197, 0.15);
    --primary-gradient: linear-gradient(135deg, #00b4c5 0%, #008a97 100%);
    --secondary: #64748b;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #00b4c5;
    --light: #f4f6f8;
    --dark: #192231;
    --dark-hover: #141c29;
    --dark-active: #111822;
    --gray: #64748b;
    --border: #e2e8f0;
    --sidebar-bg: #192231;
    --sidebar-hover: #141c29;
    --sidebar-active: #111822;
    --sidebar-accent: #00b4c5;

    /* Legacy mapping helpers */
    --pink: #00b4c5;
    --pink-light: rgba(0, 180, 197, 0.12);
    --pink-dark: #008a97;
    --pink-accent: #e0f7fa;
    --pink-gradient: linear-gradient(135deg, #00b4c5 0%, #008a97 100%);
    --maroon: #192231;
    --maroon-hover: #141c29;
    --maroon-light: rgba(25, 34, 49, 0.06);
    --maroon-gradient: linear-gradient(135deg, #192231 0%, #2a374a 100%);
    --beige: #f4f6f8;
    --white: #ffffff;
    --gray-bg: #f8fafc;
    --soft-shadow: 0 10px 30px -5px rgba(25, 34, 49, 0.07);
    --hover-shadow: 0 16px 36px -4px rgba(0, 180, 197, 0.18);
    --glass-bg: rgba(255, 255, 255, 0.92);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
}

/* Global Reset & Base Style */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--light);
    color: #334155;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding-bottom: 120px;
    min-height: 100vh;
    font-size: 0.95rem;
    -webkit-font-smoothing: antialiased;
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.2px;
}

.text-maroon, .text-festor-dark {
    color: var(--dark) !important;
}

.text-primary-festor {
    color: var(--primary) !important;
}

/* Modern Header & Navigation Bar */
.navbar-custom {
    background: var(--dark);
    border-bottom: 3px solid var(--primary);
    box-shadow: 0 8px 24px rgba(25, 34, 49, 0.25);
    border-radius: 0 0 24px 24px;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
}

.navbar-custom .navbar-brand {
    color: var(--white) !important;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
}

.brand-avatar {
    height: 46px;
    width: 46px;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid var(--primary);
    background-color: #fff;
    box-shadow: 0 3px 8px rgba(0, 180, 197, 0.25);
    transition: transform 0.2s ease;
}

.brand-avatar:hover {
    transform: scale(1.06) rotate(-2deg);
}

/* Header Banner inside Dashboard */
.header-banner {
    background: linear-gradient(135deg, #192231 0%, #24334a 100%) !important;
    border-bottom: 3.5px solid var(--primary);
    border-radius: 0 0 32px 32px;
    color: var(--white) !important;
    box-shadow: 0 10px 32px rgba(25, 34, 49, 0.25);
    padding: 1.5rem 1.25rem;
}

.header-banner h1, .header-banner h2, .header-banner h3, .header-banner p {
    color: var(--white) !important;
}

.header-banner .badge {
    background-color: var(--primary) !important;
    color: var(--dark) !important;
    border-radius: 12px;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
    box-shadow: 0 4px 10px rgba(0, 180, 197, 0.3);
}

/* Premium Card Design */
.card {
    background: var(--white);
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--soft-shadow) !important;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow) !important;
    border-color: rgba(0, 180, 197, 0.45) !important;
}

.card-title {
    color: var(--dark) !important;
    font-weight: 800;
}

/* Step Badge styling */
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    font-weight: 800;
    font-size: 0.85rem;
    margin-right: 8px;
    box-shadow: 0 2px 6px rgba(0, 180, 197, 0.4);
}

/* KPI Cards */
.kpi-card {
    border-radius: var(--radius-md) !important;
    position: relative;
    overflow: hidden;
}

.kpi-card.border-pink {
    border-left: 6px solid var(--primary) !important;
}

.kpi-card.border-maroon {
    border-left: 6px solid var(--dark) !important;
}

.kpi-card:hover {
    transform: translateY(-4px) scale(1.02);
}

/* Form Controls */
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 0.75rem 1.1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--dark);
    background-color: var(--white);
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
    color: var(--dark);
    outline: none;
    background-color: #fff;
}

.form-label {
    color: var(--dark);
    font-weight: 700;
    margin-bottom: 0.45rem;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Buttons */
.btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    letter-spacing: 0.2px;
}

.btn-primary {
    background: var(--primary-gradient) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(0, 180, 197, 0.35);
    border: none !important;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #008a97 0%, #00727d 100%) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 138, 151, 0.4) !important;
}

.btn-outline-secondary {
    border: 2px solid var(--dark) !important;
    color: var(--dark) !important;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    background-color: var(--dark) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--success) !important;
    border-color: var(--success) !important;
    color: var(--white) !important;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
    border: none !important;
}

.btn-success:hover {
    background-color: #059669 !important;
    transform: translateY(-2px);
}

.btn-outline-danger {
    border: 1.5px solid var(--danger) !important;
    color: var(--danger) !important;
    background: transparent;
}

.btn-outline-danger:hover {
    background-color: var(--danger) !important;
    color: #fff !important;
}

/* Modern Floating Navigation Dock (Pill Shape) */
.fixed-bottom {
    bottom: 18px !important;
    left: 50% !important;
    transform: translateX(-50%);
    width: calc(100% - 32px) !important;
    max-width: 460px !important;
    background: var(--dark) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1.5px solid rgba(0, 180, 197, 0.4) !important;
    border-radius: 40px !important;
    box-shadow: 0 16px 40px rgba(25, 34, 49, 0.35) !important;
    padding: 8px 16px !important;
    margin: 0 auto;
    z-index: 1040;
}

.fixed-bottom a {
    color: rgba(255, 255, 255, 0.65) !important;
    font-weight: 700;
    font-size: 0.78rem;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: 20px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
}

.fixed-bottom a .dock-icon {
    font-size: 1.25rem;
    line-height: 1.2;
    transition: transform 0.2s ease;
}

.fixed-bottom a.active, .fixed-bottom a.text-primary, .fixed-bottom a:hover {
    color: var(--white) !important;
    background-color: rgba(0, 180, 197, 0.25);
    font-weight: 800;
    transform: translateY(-2px);
}

.fixed-bottom a.active .dock-icon, .fixed-bottom a.text-primary .dock-icon {
    color: var(--primary);
    transform: scale(1.15);
}

/* Badges & Indicators */
.badge {
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.badge.bg-success {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0;
}

.badge.bg-warning {
    background-color: var(--warning) !important;
    color: var(--dark) !important;
    font-weight: 700;
}

.badge-cotizacion {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #bae6fd;
    font-weight: 700;
}

.badge-confirmado {
    background-color: var(--primary-light) !important;
    color: var(--primary-dark) !important;
    border: 1px solid rgba(0, 180, 197, 0.3);
    font-weight: 700;
}

/* Alerts */
.alert-success {
    background-color: var(--primary-light);
    border-color: rgba(0, 180, 197, 0.35);
    color: var(--dark);
    border-radius: 16px;
    font-weight: 600;
}

/* List group style updates */
.list-group-item {
    border-color: var(--border) !important;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background-color: var(--primary-light);
}

/* Custom visual tags for Logistics */
.card-entrega {
    border-left: 6px solid var(--primary) !important;
}

.card-recoleccion {
    border-left: 6px solid var(--dark) !important;
}

/* Tables */
.table {
    --bs-table-bg: transparent;
}

.table thead th {
    font-weight: 800;
    color: var(--dark);
    border-bottom: 2px solid var(--border);
}

/* SweetAlert2 Brand Styling */
.globito-swal-popup, .festor-swal-popup {
    border-radius: 24px !important;
    border: 2px solid var(--primary) !important;
    box-shadow: 0 20px 50px rgba(25, 34, 49, 0.2) !important;
    font-family: 'Outfit', sans-serif !important;
    padding: 1.75rem !important;
}

.globito-swal-popup .swal2-title, .festor-swal-popup .swal2-title {
    color: var(--dark) !important;
    font-weight: 800 !important;
    font-size: 1.35rem !important;
}

.globito-swal-popup .swal2-html-container, .festor-swal-popup .swal2-html-container {
    color: #475569 !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
}

.globito-swal-confirm-btn, .festor-swal-confirm-btn {
    background: var(--primary-gradient) !important;
    color: var(--white) !important;
    border-radius: 14px !important;
    padding: 10px 24px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    box-shadow: 0 4px 14px rgba(0, 180, 197, 0.3) !important;
    border: none !important;
}

.globito-swal-confirm-btn:hover, .festor-swal-confirm-btn:hover {
    background: linear-gradient(135deg, #008a97 0%, #00727d 100%) !important;
    transform: translateY(-2px);
}

.globito-swal-cancel-btn, .festor-swal-cancel-btn {
    border-radius: 14px !important;
    padding: 10px 20px !important;
    font-weight: 700 !important;
    background-color: var(--secondary) !important;
    color: #fff !important;
}

.globito-toast, .festor-toast {
    border-radius: 16px !important;
    box-shadow: 0 8px 30px rgba(25, 34, 49, 0.15) !important;
    border: 1.5px solid var(--primary) !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 600 !important;
}

/* ==========================================================================
   Mobile Responsive Optimizations & Touch Controls
   ========================================================================== */
@media (max-width: 768px) {
    body {
        padding-bottom: 110px !important;
        font-size: 0.90rem;
    }

    .header-banner {
        padding: 1.2rem 1rem !important;
        border-radius: 0 0 24px 24px !important;
    }

    .header-banner h3 {
        font-size: 1.35rem !important;
    }

    .brand-avatar {
        height: 38px !important;
        width: 38px !important;
    }

    .card {
        border-radius: 16px !important;
    }

    /* Fixed Bottom Dock Responsive Scaling */
    .fixed-bottom {
        width: calc(100% - 20px) !important;
        bottom: 12px !important;
        padding: 6px 10px !important;
        border-radius: 30px !important;
    }

    .fixed-bottom a {
        font-size: 0.70rem !important;
        padding: 4px 6px !important;
    }

    .fixed-bottom a .dock-icon {
        font-size: 1.15rem !important;
    }

    /* Table horizontal scroll wrapper on mobile */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    /* Horizontal filter pills */
    .overflow-x-auto {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .overflow-x-auto::-webkit-scrollbar {
        display: none;
    }

    /* Buttons minimum touch target */
    .btn {
        min-height: 38px;
    }
}

@media (max-width: 480px) {
    .fixed-bottom {
        width: calc(100% - 14px) !important;
        bottom: 8px !important;
        padding: 5px 4px !important;
    }

    .fixed-bottom a {
        font-size: 0.65rem !important;
        padding: 3px 2px !important;
    }

    .fixed-bottom a .dock-icon {
        font-size: 1.05rem !important;
    }
}

