/* ==============================================
   FIVE CLOUD AI THEME — Warehouse Monitoring
   ============================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

html { font-size: 90% !important; }

:root {
    --bg-dark: #020617;
    --glass-bg: rgba(255,255,255,0.03);
    --glass-border: rgba(255,255,255,0.08);
    --glass-highlight: rgba(255,255,255,0.15);
    --primary: #0ea5e9;
    --secondary: #8b5cf6;
    --accent: #3b82f6;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
}

/* === BASE === */
body {
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
    background: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* === LIQUID BACKGROUND BLOBS === */
.liquid-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.45;
    animation: floatBlob 22s infinite alternate ease-in-out;
}
.blob-1 { width: 600px; height: 600px; background: var(--primary); top: -15%; left: -15%; animation-duration: 26s; }
.blob-2 { width: 500px; height: 500px; background: var(--secondary); bottom: -15%; right: -10%; animation-duration: 23s; animation-delay: -6s; }
.blob-3 { width: 400px; height: 400px; background: var(--accent); top: 35%; left: 35%; animation-duration: 30s; animation-delay: -12s; opacity: 0.25; }

@keyframes floatBlob {
    0%   { transform: translate(0,0) scale(1); }
    33%  { transform: translate(40px,-60px) scale(1.12); }
    66%  { transform: translate(-30px,30px) scale(0.92); }
    100% { transform: translate(50px,50px) scale(1.06); }
}

/* === GLASSMORPHISM PANELS === */
.glass, .liquid-glass {
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-left: 1px solid var(--glass-highlight);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.45);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.glass:hover, .liquid-glass:hover {
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 16px 48px 0 rgba(0,0,0,0.55);
}

/* === FLOATING NAVBAR === */
.navbar-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 24px;
}
.navbar-pill {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 8px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

/* === TYPOGRAPHY === */
.text-gradient {
    background: linear-gradient(135deg, #38bdf8 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === NAV LINKS === */
.nav-link-pill {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    background: transparent;
    white-space: nowrap;
    text-decoration: none;
}
.nav-link-pill:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-color: var(--glass-border);
}
.nav-link-pill.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(14,165,233,0.25), rgba(139,92,246,0.20));
    border-color: rgba(14,165,233,0.4);
    box-shadow: 0 0 16px rgba(14,165,233,0.2);
}

/* === BUTTONS === */
.btn-glass {
    background: linear-gradient(135deg, rgba(14,165,233,0.85), rgba(59,130,246,0.85));
    backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(14,165,233,0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-glass:hover {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14,165,233,0.5);
}
.btn-glass-outline {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-glass-outline:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}
.btn-danger-outline {
    background: rgba(239,68,68,0.08);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.35);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-danger-outline:hover {
    background: rgba(239,68,68,0.85);
    color: #fff;
    transform: translateY(-1px);
}

/* === LOADING SCREEN (CLOUD) === */
#pageLoadingScreen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}
#pageLoadingScreen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loader-cloud-icon {
    font-size: 3.5rem;
    color: var(--primary);
    animation: cloudFloat 1.8s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(14,165,233,0.8));
}
@keyframes cloudFloat {
    0%,100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 15px rgba(14,165,233,0.6)); }
    50%      { transform: translateY(-14px) scale(1.08); filter: drop-shadow(0 0 30px rgba(14,165,233,1)) drop-shadow(0 0 50px rgba(139,92,246,0.7)); }
}
.loader-bar-wrap {
    width: 200px;
    height: 3px;
    background: rgba(255,255,255,0.07);
    border-radius: 99px;
    overflow: hidden;
}
.loader-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #0ea5e9, #8b5cf6);
    border-radius: 99px;
    animation: loadBar 1.8s ease forwards;
}
@keyframes loadBar {
    0%   { width: 0 }
    60%  { width: 75% }
    100% { width: 100% }
}
.loader-text {
    color: rgba(255,255,255,0.35);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: loaderTextPulse 1.5s ease-in-out infinite alternate;
}
@keyframes loaderTextPulse {
    from { opacity: 0.35; }
    to   { opacity: 1; }
}

/* === MINI LOADING OVERLAY (for search/download) === */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,0.7);
    backdrop-filter: blur(6px);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.loading-overlay-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 32px 48px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-highlight);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(14,165,233,0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === PAGE VIEW ANIMATION === */
.view-enter {
    animation: fadeInView 0.45s ease-out forwards;
}
@keyframes fadeInView {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* === TABLE STYLES === */
.data-table th {
    background: rgba(15,23,42,0.85);
    color: #94a3b8;
    font-weight: 700;
    padding: 0.85rem 1rem;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    white-space: nowrap;
}
.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.875rem;
    color: #f1f5f9;
    white-space: nowrap;
    transition: background 0.2s;
}
.data-table tbody tr {
    animation: tableRowFade 0.4s ease-out forwards;
    opacity: 0;
}
.data-table tbody tr:nth-child(1)  { animation-delay: 0.03s; }
.data-table tbody tr:nth-child(2)  { animation-delay: 0.06s; }
.data-table tbody tr:nth-child(3)  { animation-delay: 0.09s; }
.data-table tbody tr:nth-child(4)  { animation-delay: 0.12s; }
.data-table tbody tr:nth-child(5)  { animation-delay: 0.15s; }
.data-table tbody tr:nth-child(n+6){ animation-delay: 0.18s; }

@keyframes tableRowFade {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}
.data-table tbody tr:hover td {
    background: rgba(14,165,233,0.05);
}

/* === CLICKABLE CELLS === */
.clickable-cell {
    color: #38bdf8;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: all 0.2s;
}
.clickable-cell:hover {
    color: #7dd3fc;
    text-decoration-color: #38bdf8;
}

/* === MODAL === */
.modal-enter {
    animation: zoomIn 0.28s ease-out forwards;
}
@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

/* === LEADERBOARD PODIUM === */
.podium-enter {
    animation: slideUp 0.55s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}
@keyframes slideUp {
    to { opacity: 1; transform: translateY(0); }
}

/* === CHARTS === */
.chart-container { position: relative; height: 350px; width: 100%; }
.pie-container { position: relative; height: 250px; width: 100%; }

/* === FORM INPUTS === */
select, input[type="date"], input[type="text"], input[type="number"] {
    background-color: transparent !important;
    color: #e2e8f0 !important;
    border: none !important;
    outline: none !important;
}
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
    cursor: pointer;
}
select option {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 10px;
}

/* === SELECT2 DARK === */
.select2-container .select2-selection--single {
    background-color: transparent !important;
    border: none !important;
    height: auto !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #fff !important; font-size: 0.875rem !important; font-weight: 700 !important; padding-left: 0 !important; line-height: 1.5 !important;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: #94a3b8 !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 100% !important; top: 0 !important; right: 0 !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow b { border-color: #94a3b8 transparent transparent transparent !important; }
.select2-dropdown { background-color: #0f172a !important; border: 1px solid #334155 !important; border-radius: 0.75rem !important; box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important; }
.select2-search--dropdown .select2-search__field { background-color: #1e293b !important; border: 1px solid #475569 !important; color: #fff !important; border-radius: 0.5rem !important; padding: 8px !important; }
.select2-results__option { color: #cbd5e1 !important; background-color: #0f172a !important; font-size: 0.875rem !important; padding: 8px 12px !important; }
.select2-results__option--highlighted[aria-selected] { background-color: #0ea5e9 !important; color: #fff !important; font-weight: 700 !important; }
.select2-results__option[aria-selected="true"] { background-color: #1e293b !important; color: #fff !important; }
.select2-container { width: 100% !important; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.25); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.45); }

/* === BADGE GLOW === */
.glow-sky { box-shadow: 0 0 12px rgba(14,165,233,0.4); }
.glow-violet { box-shadow: 0 0 12px rgba(139,92,246,0.4); }
.glow-emerald { box-shadow: 0 0 12px rgba(16,185,129,0.35); }
.glow-rose { box-shadow: 0 0 12px rgba(244,63,94,0.35); }

/* === FOOTER === */
.site-footer {
    text-align: center;
    padding: 28px 24px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(2,6,23,0.4);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
}

/* === PAGINATOR === */
.paginator-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(15,23,42,0.6);
}
.paginator-info {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
}
.paginator-info strong { color: #94a3b8; }
.paginator-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.pg-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.pg-btn:hover:not(:disabled) {
    background: rgba(14,165,233,0.15);
    border-color: rgba(14,165,233,0.4);
    color: #38bdf8;
}
.pg-btn.active {
    background: linear-gradient(135deg, rgba(14,165,233,0.8), rgba(59,130,246,0.7));
    border-color: rgba(14,165,233,0.6);
    color: #fff;
    box-shadow: 0 0 10px rgba(14,165,233,0.3);
}
.pg-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.pg-ellipsis {
    color: #475569;
    font-size: 0.78rem;
    padding: 0 4px;
    line-height: 34px;
}
.paginator-size {
    display: flex;
    align-items: center;
}
.paginator-size select,
.pg-size-select {
    background: rgba(0,0,0,0.3) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 50px !important;
    padding: 5px 28px 5px 12px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    outline: none !important;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 8px center !important;
    background-repeat: no-repeat !important;
    background-size: 1.1em !important;
}

/* === SWEETALERT LIQUID TOAST === */
.swal-liquid-toast {
    background: rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(14, 165, 233, 0.3) !important;
    border-radius: 50px !important;
    padding: 5px 15px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    width: auto !important;
}
.swal-liquid-toast .swal2-title {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: #e2e8f0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.swal-liquid-toast .swal2-success-ring {
    border-color: rgba(14, 165, 233, 0.5) !important;
}
