/* ========================================================
   Bowitiya Hub - Saturated White & Pink Modern UI
   ======================================================== */

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

:root {
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Saturated Pink Palette */
    --pink-primary: #ff2e83;
    --pink-hover: #e0176b;
    --pink-deep: #be185d;
    --pink-light: #fff0f6;
    --pink-subtle: #fdf2f8;
    --pink-border: #fbcfe8;
    --pink-glow: rgba(255, 46, 131, 0.25);
    
    /* Saturated Accent Colors */
    --accent-violet: #7c3aed;
    --accent-purple: #9333ea;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --accent-indigo: #4f46e5;

    /* Clean Crisp Whites & Neutrals */
    --bg-body: #faf7f9;
    --bg-surface: #ffffff;
    --bg-surface-glass: rgba(255, 255, 255, 0.88);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-subtle: #f1e4ec;
    --border-card: #f8e1ee;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(255, 46, 131, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(255, 46, 131, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 35px -5px rgba(255, 46, 131, 0.12), 0 10px 15px -5px rgba(0, 0, 0, 0.04);
    --shadow-pink-glow: 0 8px 24px rgba(255, 46, 131, 0.35);

    /* Gradients */
    --grad-pink: linear-gradient(135deg, #ff2e83 0%, #ff5b9e 60%, #902bf5 100%);
    --grad-pink-soft: linear-gradient(135deg, #fff0f6 0%, #fdf2f8 100%);
    --grad-violet: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    --grad-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --grad-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Base Elements */
body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 46, 131, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(124, 58, 237, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.02) 0%, transparent 60%);
    background-attachment: fixed;
}

main {
    flex: 1 0 auto;
}

/* Custom Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

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

.bg-pink-subtle {
    background-color: var(--pink-subtle) !important;
}

.bg-pink-light {
    background-color: var(--pink-light) !important;
}

.border-pink-subtle {
    border-color: var(--pink-border) !important;
}

/* Saturated Gradient Text */
.gradient-text-pink {
    background: var(--grad-pink);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Glassmorphic Navbar */
.navbar-custom {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.85rem 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 46, 131, 0.04);
}

.navbar-brand {
    font-size: 1.35rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--grad-pink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: var(--shadow-pink-glow);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.navbar-brand:hover .brand-icon {
    transform: rotate(12deg) scale(1.08);
}

.nav-link {
    font-weight: 600;
    font-size: 0.93rem;
    color: var(--text-secondary);
    padding: 0.55rem 1rem !important;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--pink-primary);
    background-color: var(--pink-light);
}

/* Modern Rounded Cards */
.card-custom {
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.card-custom:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--pink-border);
}

.card-hover-lift:hover {
    transform: translateY(-5px);
}

/* Stat Widgets */
.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.stat-icon.pink {
    background: var(--pink-light);
    color: var(--pink-primary);
    box-shadow: 0 4px 15px rgba(255, 46, 131, 0.15);
}

.stat-icon.violet {
    background: #f5f3ff;
    color: var(--accent-violet);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.15);
}

.stat-icon.cyan {
    background: #ecfeff;
    color: var(--accent-cyan);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.15);
}

.stat-icon.emerald {
    background: #ecfdf5;
    color: var(--accent-emerald);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

.stat-icon.amber {
    background: #fffbeb;
    color: var(--accent-amber);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Buttons */
.btn-pink {
    background: var(--pink-primary);
    color: #ffffff;
    border: none;
    font-weight: 600;
    padding: 0.65rem 1.4rem;
    border-radius: 12px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(255, 46, 131, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-pink:hover, .btn-pink:focus {
    background: var(--pink-hover);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(255, 46, 131, 0.4);
    transform: translateY(-2px);
}

.btn-pink-gradient {
    background: var(--grad-pink);
    color: #ffffff;
    border: none;
    font-weight: 700;
    padding: 0.75rem 1.6rem;
    border-radius: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 46, 131, 0.32);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.btn-pink-gradient:hover {
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(255, 46, 131, 0.5);
    transform: translateY(-2px);
}

.btn-pink-outline {
    background: transparent;
    color: var(--pink-primary);
    border: 2px solid var(--pink-primary);
    font-weight: 600;
    padding: 0.55rem 1.3rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-pink-outline:hover {
    background: var(--pink-light);
    color: var(--pink-hover);
    border-color: var(--pink-hover);
}

.btn-subtle-pink {
    background: var(--pink-light);
    color: var(--pink-primary);
    border: 1px solid var(--pink-border);
    font-weight: 600;
    border-radius: 10px;
    padding: 0.45rem 0.9rem;
    transition: all 0.2s;
}

.btn-subtle-pink:hover {
    background: var(--pink-primary);
    color: #ffffff;
}

/* Badges */
.badge-custom {
    padding: 0.45rem 0.85rem;
    font-weight: 700;
    border-radius: 30px;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-pink {
    background: var(--pink-light);
    color: var(--pink-primary);
    border: 1px solid var(--pink-border);
}

.badge-emerald {
    background: #ecfdf5;
    color: var(--accent-emerald);
    border: 1px solid #a7f3d0;
}

.badge-amber {
    background: #fffbeb;
    color: var(--accent-amber);
    border: 1px solid #fde68a;
}

.badge-violet {
    background: #f5f3ff;
    color: var(--accent-violet);
    border: 1px solid #ddd6fe;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 12px;
    border: 1.5px solid var(--border-card);
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    font-family: var(--font-main);
    color: var(--text-primary);
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--pink-primary);
    box-shadow: 0 0 0 4px rgba(255, 46, 131, 0.15);
    outline: none;
}

.form-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

/* Modern Upload Dropzone */
.upload-dropzone {
    border: 2px dashed var(--pink-border);
    border-radius: 20px;
    background: var(--pink-subtle);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: var(--pink-primary);
    background: #fff0f6;
    transform: scale(1.01);
}

.dropzone-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: #ffffff;
    color: var(--pink-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(255, 46, 131, 0.15);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.upload-dropzone:hover .dropzone-icon {
    transform: translateY(-5px);
}

/* Data Tables */
.table-custom {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom th {
    background: #fff5f8;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-subtle);
}

.table-custom td {
    padding: 1rem 1.2rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.92rem;
    background: #ffffff;
    transition: background-color 0.2s;
}

.table-custom tbody tr:hover td {
    background-color: #fff9fb;
}

/* File Icon Box */
.file-thumb-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.gallery-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid var(--border-card);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.gallery-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--pink-border);
    transform: translateY(-6px);
}

.gallery-preview-box {
    height: 200px;
    width: 100%;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-preview-box img {
    transform: scale(1.06);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

/* Tool Hero Card */
.tool-banner-card {
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-card);
    background: #ffffff;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.tool-banner-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--pink-border);
}

.tool-card-icon-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 1.5rem;
}

/* Modal Styling */
.modal-content {
    border-radius: 22px;
    border: 1px solid var(--border-card);
    box-shadow: 0 25px 50px -12px rgba(255, 46, 131, 0.25);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.25rem 1.75rem;
    background: var(--pink-subtle);
}

.modal-body {
    padding: 1.75rem;
}

.modal-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 1rem 1.75rem;
    background: #ffffff;
}

/* Footer */
.footer-custom {
    background: #ffffff;
    border-top: 1px solid var(--border-subtle);
    padding: 1.75rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 3rem;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .stat-card {
        padding: 1.15rem;
    }
    .stat-value {
        font-size: 1.5rem;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Background Real-Time Live Sync Indicator */
.live-sync-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--border-card);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    display: inline-block;
    position: relative;
}

.live-pulse-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background-color: rgba(16, 185, 129, 0.4);
    animation: livePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes livePulse {
    0%, 100% {
        transform: scale(0.9);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.live-sync-pill.syncing .live-pulse-dot {
    background-color: var(--pink-primary);
}
.live-sync-pill.syncing .live-pulse-dot::after {
    background-color: rgba(255, 46, 131, 0.4);
}

/* Floating Real-Time Toast for Admin Notifications */
#bowitiyaLiveToastContainer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
