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

:root {
    --primary-color: #f59e0b;
    /* Amber/Yellow */
    --primary-hover: #d97706;
    --primary-light: rgba(245, 158, 11, 0.1);
    --secondary-color: #06b6d4;
    /* Cyan */
    --secondary-hover: #0891b2;
    --secondary-light: rgba(6, 182, 212, 0.15);
    --brand-dark: #0f172a;
    --bg-color: #f1f5f9;
    /* Slate 100 - Clean & Modern */
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #334155;
    --border-color: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --radius: 24px;
    --radius-lg: 32px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --gradient-secondary: linear-gradient(135deg, #facc15 0%, #eab308 100%);
}

[data-bs-theme="dark"] {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.8);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --primary-light: rgba(22, 158, 75, 0.2);
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

html {
    height: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    background-image: radial-gradient(circle at 0% 0%, rgba(79, 70, 229, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
    transition: background-color 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

footer {
    margin-top: auto !important;
}

footer img {
    max-height: 48px !important;
    width: auto !important;
    object-fit: contain !important;
}

/* Glassmorphism Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 0;
    transition: all 0.4s ease;
}

.nav-link {
    font-weight: 700;
    color: var(--text-muted) !important;
    border-radius: 100px;
    padding: 0.5rem 1.2rem !important;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background: var(--primary-light);
}

.nav-link.active {
    background: var(--gradient-primary);
    color: white !important;
    box-shadow: 0 4px 15px -5px rgba(245, 158, 11, 0.4);
}

[data-bs-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.8) !important;
}

.navbar.scrolled {
    padding: 0.6rem 0;
    background-color: var(--card-bg) !important;
}

.nav-link {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main) !important;
    padding: 0.6rem 1.4rem !important;
    border-radius: 100px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-light);
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

/* Premium Component: Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--gradient-primary) !important;
    padding: 40px 0 30px 0;
}

@media (max-width: 768px) {
    .hero {
        padding: 25px 0 20px 0;
    }

    .display-3 {
        font-size: 2.2rem !important;
    }

    .hero .lead {
        font-size: 1rem !important;
    }
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 15l10 10-10 10M30 15l10 10-10 10' stroke='%23000' stroke-width='2' fill='none' stroke-opacity='0.08'/%3E%3C/svg%3E");
    background-repeat: repeat;
    animation: moveArrowsLeftToRight 10s linear infinite;
    pointer-events: none;
}

@keyframes moveArrowsLeftToRight {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 60px 0;
    }
}

/* Glass Cards */
.card {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

/* Fancy Buttons */
.btn {
    font-weight: 700;
    padding: 0.8rem 1.8rem;
    border-radius: 100px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 0.85rem;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-primary);
    box-shadow: 0 10px 20px -5px rgba(245, 158, 11, 0.3);
    color: #fff !important;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 30px -5px rgba(245, 158, 11, 0.4);
    filter: brightness(1.1);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 10px 20px -5px rgba(239, 68, 68, 0.3);
    color: #fff !important;
}

.btn-danger:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 30px -5px rgba(239, 68, 68, 0.4);
    filter: brightness(1.1);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.3);
    color: #fff !important;
}

.btn-success:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 30px -5px rgba(16, 185, 129, 0.4);
    filter: brightness(1.1);
}

.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.3);
    color: #fff !important;
}

.btn-info:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 30px -5px rgba(59, 130, 246, 0.4);
    filter: brightness(1.1);
}

.btn-dark {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.3);
    color: #fff !important;
}

.btn-dark:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 30px -5px rgba(15, 23, 42, 0.4);
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
}

.btn-outline-dark {
    background: transparent;
    border: 2px solid #1e293b !important;
    color: #1e293b !important;
}

.btn-outline-dark:hover {
    background: #1e293b;
    color: #fff !important;
    transform: translateY(-3px);
}

.btn-white {
    background: #fff;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm);
}

.btn-white:hover {
    background: var(--bg-color);
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Fix for buttons inside input groups - Premium Search */
.input-group-premium {
    background: #fff;
    border-radius: 100px;
    padding: 4px;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
}

.input-group-premium:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.input-group-premium .form-control {
    border: none !important;
    background: transparent !important;
    padding-left: 1.25rem !important;
    box-shadow: none !important;
    font-size: 0.9rem;
}

.input-group-premium .input-group-text {
    background: transparent !important;
    border: none !important;
    padding-left: 1rem;
}

.input-group-premium .btn {
    border-radius: 100px !important;
    padding: 0.6rem 1.5rem !important;
    margin: 0 !important;
}

.header-actions .btn {
    padding: 0.7rem 1.5rem;
    min-width: 120px;
    white-space: nowrap;
    justify-content: center;
}

@media (min-width: 1200px) {
    .header-actions .btn {
        padding: 0.8rem 1.8rem;
    }
}

/* Action Icon Buttons for Tables */

/* Action Icon Buttons for Tables */
.btn-action {
    padding: 0;
    width: 32px !important;
    height: 32px !important;
    border-radius: 10px !important;
    font-size: 0.85rem;
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    transition: var(--transition-smooth) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.btn-action:hover {
    transform: translateY(-5px) rotate(5deg) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

.btn-action.text-primary:hover {
    background: var(--primary-light) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-action.text-info:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

.btn-action.text-success:hover {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
    border-color: #10b981 !important;
}

.btn-action.text-danger:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    border-color: #ef4444 !important;
}

.btn-action.text-secondary:hover {
    background: rgba(100, 116, 139, 0.1) !important;
    color: #64748b !important;
    border-color: #64748b !important;
}

.btn-warning {
    background: var(--gradient-secondary);
    border: none;
    box-shadow: 0 10px 20px -5px rgba(245, 158, 11, 0.3);
    color: #fff !important;
}

/* Soft Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Global Table Responsive Fix for Dropdowns */
.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 992px) {
    .table-responsive {
        overflow: visible !important;
    }
}

/* Table Design */
.table tbody tr {
    transition: all 0.3s ease;
    border-radius: var(--radius);
}

.table tbody tr:hover {
    background-color: var(--primary-light) !important;
}

/* Stat Icons */
.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.4s ease;
}

.card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Branded Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 100px;
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Form Premium Look */
.form-control,
.form-select {
    padding: 0.8rem 1.2rem;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

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

/* Status Badges */
.badge {
    padding: 0.6rem 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Dashboard Specific Improvements */
.dashboard-stat-card {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.dashboard-stat-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: currentColor;
    opacity: 0.05;
    border-radius: 50%;
    z-index: -1;
    transition: var(--transition-smooth);
}

.dashboard-stat-card:hover::before {
    transform: scale(2);
    opacity: 0.1;
}

.progress {
    height: 8px;
    border-radius: 100px;
    background-color: rgba(0, 0, 0, 0.05);
    overflow: visible;
}

.progress-bar {
    border-radius: 100px;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -4px;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid currentColor;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    color: var(--text-main);
    text-decoration: none;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.quick-action-btn:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
    background: #fff;
}

.quick-action-btn:hover::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
}

.quick-action-btn i {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    transition: var(--transition-smooth);
}

.quick-action-btn span {
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.activity-item {
    padding: 1.25rem 1.5rem;
    border-left: 4px solid transparent;
    transition: var(--transition-smooth);
}

.activity-item:hover {
    background: #f8fafc;
    border-left-color: var(--primary-color);
}

.file-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Mobile Responsiveness Fixes */
@media (max-width: 768px) {
    .navbar-brand img {
        height: 45px !important;
    }

    .card {
        margin-bottom: 1.5rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 576px) {
    .display-3 {
        font-size: 1.8rem !important;
    }
}

.hover-primary {
    transition: var(--transition-smooth);
}

.hover-primary:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
    display: inline-block;
}

/* Pulse Animation */
@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(22, 158, 75, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(22, 158, 75, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(22, 158, 75, 0);
    }
}

.pulse-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 0 rgba(22, 158, 75, 0.4);
    animation: pulse-green 2s infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* Custom Tab Colors for Transfer History */
#received-tab.active,
#sent-tab.active {
    background-color: var(--success) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

#received-tab:not(.active),
#sent-tab:not(.active) {
    color: var(--text-muted);
}

#received-tab:not(.active):hover,
#sent-tab:not(.active):hover {
    color: var(--success);
    background-color: rgba(16, 185, 129, 0.05);
}


/* Avatar Image Styling */
.object-fit-cover {
    object-fit: cover;
    object-position: center;
}

/* Notification Bar / Marquee */
.notice-bar {
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1025;
}

.notice-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 25s linear infinite;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

@keyframes marquee {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-100%, 0);
    }
}


/* Custom utility animations */
@keyframes pulse-soft {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-pulse {
    animation: pulse-soft 2s infinite ease-in-out;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.blink {
    animation: blink 1s infinite;
}

@keyframes animate-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-up {
    animation: animate-up 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes animate-toast-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-toast-in {
    animation: animate-toast-in 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

/* Dashboard Premium Enhancements */
.table thead th {
    background-color: rgba(248, 250, 252, 0.5);
    border-top: none;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.03) !important;
    transition: var(--transition-smooth);
}

.table tbody tr:last-child {
    border-bottom: none !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(245, 158, 11, 0.03) !important;
    transform: scale(1.002);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.btn-action {
    width: 36px !important;
    height: 36px !important;
    border-radius: 12px !important;
    border: 1px solid var(--border-color) !important;
    background: #fff !important;
    box-shadow: var(--shadow-sm);
}

.btn-action:hover {
    box-shadow: var(--shadow) !important;
    transform: translateY(-3px) !important;
}

.extra-small {
    font-size: 0.75rem;
}

/* Glass effect for storage card */
.storage-card-glass {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.8) 100%) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

/* Folder Cards in My Files */
.folder-card {
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color) !important;
}

.folder-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color) !important;
    background: var(--primary-light) !important;
}

.folder-card .folder-icon i {
    transition: var(--transition-smooth);
}

.folder-card:hover .folder-icon i {
    transform: scale(1.1);
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "›" !important;
    font-weight: bold;
    color: var(--text-muted);
}

/* User Online/Offline Status Indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 5px;
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.status-online {
    background-color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
    animation: status-pulse-online 2s infinite;
}

.status-offline {
    background-color: #94a3b8;
}

@keyframes status-pulse-online {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.user-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.user-avatar-wrapper .status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    margin-left: 0;
    width: 12px;
    height: 12px;
}

/* Auto-Adjusting Responsive Slide Panel (Edge-to-Edge & Mobile Optimized) */
.slide-panel-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
    background: #0d1322;
    contain: layout style paint;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

@media (max-width: 767px) {
    .slide-panel-container {
        border-radius: 16px;
    }
}

/* Bootstrap Carousel Fade Hardware Acceleration Fix */
.carousel-fade .carousel-item {
    opacity: 0;
    transition-property: opacity;
    transition-duration: 0.8s;
    transition-timing-function: ease-in-out;
    transform: translate3d(0, 0, 0);
    will-change: opacity;
    backface-visibility: hidden;
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
    opacity: 1;
}

.slide-panel-img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    object-position: center;
    display: block;
    opacity: 0;
    transition: opacity 0.4s ease-in-out, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.slide-panel-img.loaded {
    opacity: 1;
}

@media (min-width: 1400px) {
    .slide-panel-img {
        height: 520px;
    }
}

@media (max-width: 991px) {
    .slide-panel-img {
        height: 360px;
    }
}

@media (max-width: 767px) {
    .slide-panel-img {
        height: 260px;
    }
}

@media (max-width: 575px) {
    .slide-panel-img {
        height: 200px;
    }
}

.slide-panel-btn {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 14px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.85;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.slide-panel-btn:hover {
    background: rgba(0, 0, 0, 0.95) !important;
    opacity: 1;
    transform: translateY(-50%) scale(1.06);
}

.slide-panel-caption {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 60%, transparent 100%);
    padding: 25px 20px 15px 20px;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
}

/* Universal Responsive & Auto-Adjust Utilities for All Devices */
img, svg, video, canvas, iframe {
    max-width: 100%;
    height: auto;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--card-bg);
        padding: 1rem;
        border-radius: 16px;
        margin-top: 0.5rem;
        box-shadow: var(--shadow-lg);
    }
}

@media (max-width: 768px) {
    .container-fluid, .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .card {
        border-radius: 16px !important;
    }
    
    .btn-lg {
        padding: 0.65rem 1.4rem !important;
        font-size: 0.8rem !important;
    }
    
    .display-3 {
        font-size: clamp(1.8rem, 6vw, 2.5rem) !important;
    }
    
    .display-4 {
        font-size: clamp(1.6rem, 5vw, 2.2rem) !important;
    }
    
    .display-5 {
        font-size: clamp(1.4rem, 4.5vw, 1.9rem) !important;
    }

    .modal-dialog {
        margin: 0.5rem !important;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 0.9rem;
    }
    
    .d-flex.flex-sm-row {
        flex-direction: column !important;
    }
}

/* Right-to-Left Infinite Image Marquee Slider Section */
.rtl-slider-section {
    position: relative;
    background: transparent;
    padding: 20px 0 40px 0;
    overflow: hidden;
}

.rtl-slider-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 15px 0;
    contain: layout style paint;
    touch-action: pan-y;
}

/* Erase Left & Right Side Gradient Shadows Completely */
.rtl-slider-wrapper::before,
.rtl-slider-wrapper::after {
    display: none !important;
}

.rtl-slider-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: marqueeRTL 35s linear infinite;
    align-items: center;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
    touch-action: pan-y;
}

.rtl-slider-track:hover {
    animation-play-state: paused;
}

@keyframes marqueeRTL {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

.rtl-slide-card {
    position: relative;
    width: 310px;
    height: 400px;
    flex-shrink: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #0f172a;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

@media (hover: hover) {
    .rtl-slide-card:hover {
        transform: translateY(-6px) translate3d(0, 0, 0);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        border-color: rgba(245, 158, 11, 0.5);
    }

    .rtl-slide-card:hover .rtl-slide-img {
        transform: scale(1.04) translate3d(0, 0, 0);
    }
}

.rtl-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease-in-out, transform 0.4s ease;
    will-change: opacity, transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.rtl-slide-img.loaded {
    opacity: 1;
}

.rtl-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: linear-gradient(to top, rgba(9, 13, 22, 0.92) 0%, rgba(9, 13, 22, 0.45) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: white;
}

.rtl-slide-badge {
    align-self: flex-start;
    background: rgba(15, 23, 42, 0.85);
    color: #facc15;
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.rtl-slide-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
}

.rtl-slide-subtitle {
    font-size: 0.8rem;
    color: #fbbf24;
    font-weight: 600;
    margin-bottom: 10px;
}

.rtl-slide-footer {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 8px;
}

/* Responsive Auto-Adjustments for All Devices */
@media (max-width: 991px) {
    .rtl-slide-card {
        width: 260px;
        height: 340px;
        border-radius: 16px;
    }

    .rtl-slider-track {
        gap: 16px;
    }

    .rtl-slide-overlay {
        padding: 16px;
    }

    .rtl-slide-title {
        font-size: 1rem;
    }

    .rtl-slide-subtitle {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }
}

@media (max-width: 576px) {
    .rtl-slide-card {
        width: 210px;
        height: 290px;
        border-radius: 14px;
    }

    .rtl-slider-track {
        gap: 12px;
    }

    .rtl-slide-overlay {
        padding: 12px;
    }

    .rtl-slide-badge {
        font-size: 0.58rem;
        padding: 2px 8px;
        margin-bottom: 6px;
    }

    .rtl-slide-title {
        font-size: 0.9rem;
    }

    .rtl-slide-subtitle {
        font-size: 0.7rem;
        margin-bottom: 6px;
    }

    .rtl-slide-footer {
        font-size: 0.65rem;
        padding-top: 6px;
    }
}

/* ==========================================================================
   GLOBAL POPUP PANEL & HEADER Z-INDEX STACKING FIX
   Fixes all modals, popups, sweetalert dialogs, and dropdowns rendering under sticky header/navbar
   ========================================================================== */

header {
    position: relative;
    z-index: 1035 !important; /* Higher than navbar (1030) so profile dropdown floats over navbar */
}

header .dropdown-menu {
    z-index: 1040 !important; /* Header dropdown menu floats above sticky navbar */
}

nav.navbar.sticky-top {
    z-index: 1030 !important; /* Sticky navbar stays below modals and top header dropdowns */
}

.notice-bar {
    position: relative;
    z-index: 1025 !important;
}

/* Modal Backdrops & Dialog Windows - ALWAYS render ABOVE Header Section */
.modal-backdrop {
    z-index: 1070 !important; /* High above navbar (1030) and header (1035) */
}

.modal {
    z-index: 1075 !important; /* High above backdrop (1070) */
}

.modal-dialog {
    z-index: 1080 !important;
}

.modal-header {
    position: relative;
    z-index: 2;
}

/* Form Controls & Dropdowns Inside Modals */
.modal .dropdown-menu,
.modal select,
.modal .form-control {
    z-index: 1085 !important;
}

/* SweetAlert2 Notification & Alert Dialogs */
.swal2-container {
    z-index: 2000 !important; /* Highest layer for alerts */
}

/* Tooltips and Popovers */
.popover {
    z-index: 1095 !important;
}

.tooltip {
    z-index: 1100 !important;
}

/* ==========================================================================
   COMPREHENSIVE DEVICE AUTO-ADJUSTMENT STYLES (ALL SCREENS & MOBILE PHONES)
   ========================================================================== */

/* Touch Target Minimum Sizes */
.btn-action, .btn-sm {
    min-width: 32px;
    min-height: 32px;
}

/* Responsive Table Auto-Scrolling & Density */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

/* Status Capsules Mobile Support */
.status-capsule {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    white-space: nowrap;
}

.status-capsule .label-group {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Tablet & Mobile Adjustments (<992px) */
@media (max-width: 991.98px) {
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .card {
        border-radius: 18px !important;
    }
    
    .table th, .table td {
        white-space: nowrap;
        padding: 0.6rem 0.75rem !important;
        font-size: 0.85rem;
    }
    
    .dropdown-menu {
        max-width: 90vw;
    }
}

/* Phablet & Mobile Screen Widths (<768px) */
@media (max-width: 767.98px) {
    body {
        font-size: 0.9rem;
    }
    
    .hero {
        padding: 24px 0 20px 0;
    }
    
    .card-body {
        padding: 1.25rem !important;
    }
    
    /* Action bars flex grid stacking */
    .d-flex.gap-2.flex-wrap {
        gap: 0.5rem !important;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }

    /* Modal adjustments for small viewports */
    .modal-dialog {
        margin: 0.5rem auto !important;
        max-width: calc(100% - 1rem) !important;
    }

    .modal-dialog-scrollable .modal-body {
        max-height: 70vh !important;
        padding: 1rem !important;
    }

    .modal-header {
        padding: 1rem !important;
    }

    .modal-footer {
        padding: 0.75rem 1rem !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        flex: 1 1 auto;
    }
}

/* Extra Small Phones (<576px) */
@media (max-width: 575.98px) {
    h1, .h1 { font-size: 1.6rem !important; }
    h2, .h2 { font-size: 1.35rem !important; }
    h3, .h3 { font-size: 1.2rem !important; }
    .display-6 { font-size: 1.5rem !important; }
    
    .status-capsule {
        padding: 4px 8px;
    }
    
    .status-capsule .label-group {
        font-size: 0.72rem;
    }
    
    /* Full width buttons in mobile action strips */
    .btn-mobile-full {
        width: 100% !important;
    }
}

/* ==========================================================================
   IMPORTANT NOTICES SECTION - FULL WIDTH DISCRETE CAROUSEL SLIDER
   ========================================================================== */
.notice-slider-card {
    border: 1px solid var(--border-color) !important;
    transition: box-shadow 0.3s ease;
}

.notice-slider-card:hover {
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08) !important;
}

[data-bs-theme="dark"] .notice-slider-card {
    background: var(--card-bg) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .notice-slider-card .alert {
    background: rgba(30, 41, 59, 0.8) !important;
    color: var(--text-main) !important;
}

/* Notice Carousel Dots */
.notice-indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #cbd5e1;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notice-indicator-dot.active {
    width: 26px;
    border-radius: 12px;
    background-color: var(--primary-color);
}

.notice-carousel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.notice-carousel-btn:hover {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
}