@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: #475569;
    --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);
}

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;
}

/* 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: 120px 0;
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 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.05'/%3E%3C/svg%3E");
}

/* 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: 1000;
}

.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.65rem;
    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.7rem;
}

/* 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;
}
