/* ============================================================
   Bank Data Hartex — Ultra-Modern CSS System & Animations
   ============================================================ */

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

:root {
    /* Color Palette - Adapted to Hartex Yellow & Dark Theme */
    --primary: #FFE500;
    --primary-gradient: linear-gradient(135deg, #FFE500 0%, #FFB700 100%);
    --primary-gradient-accent: linear-gradient(135deg, #FFE500 0%, #1A1A1A 100%);
    --primary-light: rgba(255, 229, 0, 0.1);
    --primary-subtle: rgba(255, 229, 0, 0.15);
    --primary-dark: #D4BE00;
    
    --secondary: #1A1A1A;
    --secondary-light: #2D2D2D;
    
    --bg-body: #0A0A0A;
    --bg-card: #161616;
    --bg-glass: rgba(22, 22, 22, 0.8);
    
    --text-dark: #FFFFFF;
    --text-body: #E2E8F0;
    --text-muted: #94A3B8;
    --text-light: #64748B;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 229, 0, 0.4);
    
    --success: #10B981;
    --success-light: rgba(16, 185, 129, 0.1);
    --danger: #EF4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --warning: #F59E0B;
    --warning-light: rgba(245, 158, 11, 0.1);
    --info: #06B6D4;
    --info-light: rgba(6, 182, 212, 0.1);

    /* Shadow System */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 8px 25px rgba(255, 229, 0, 0.15);
    
    /* Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.85rem;
    --radius-lg: 1.25rem;
    --radius-pill: 50rem;
}

/* Base resets & typography */
body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

/* Typography Helpers */
.fs-7 { font-size: 0.875rem !important; }
.fs-8 { font-size: 0.775rem !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

/* Text & Colors Override */
.text-primary { color: var(--primary) !important; }
.text-dark-custom { color: var(--text-dark) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-primary-subtle { background-color: var(--primary-light) !important; color: var(--primary) !important; }
.bg-primary-gradient {
    background: var(--primary-gradient) !important;
}

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 229, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 229, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 229, 0, 0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* Animation utilities */
.animate-fade-in {
    animation: fadeInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Layout Wrapper */
.app-container {
    display: flex;
    min-height: 100vh;
    padding-top: 70px; /* Modern navbar height */
}

/* Glassmorphism Navbar */
.app-navbar {
    height: 70px;
    z-index: 1040;
    background: var(--bg-glass) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color) !important;
    transition: all 0.3s ease;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    box-shadow: 0 4px 14px rgba(255, 126, 41, 0.35);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Search bar header */
.search-form .search-input {
    background-color: rgba(241, 245, 249, 0.8) !important;
    border: 1px solid transparent !important;
    border-radius: var(--radius-pill) !important;
    padding-left: 2.75rem !important;
    padding-right: 3.5rem !important;
    height: 44px;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-form .search-input:focus {
    background-color: #FFFFFF !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(255, 126, 41, 0.15) !important;
}

.search-shortcut-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #E2E8F0;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    pointer-events: none;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 70px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    width: 270px;
    background-color: var(--bg-card) !important;
    border-right: 1px solid var(--border-color) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar .nav-link {
    padding: 0.75rem 1.15rem;
    margin: 0.2rem 0.8rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.925rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar .nav-link i {
    font-size: 1.2rem;
    margin-right: 0.85rem;
    transition: transform 0.25s ease, color 0.25s ease;
}

.sidebar .nav-link:hover:not(.active) {
    background-color: var(--primary-light);
    color: var(--primary) !important;
    transform: translateX(4px);
}

.sidebar .nav-link:hover:not(.active) i {
    transform: scale(1.15);
    color: var(--primary);
}

.sidebar .nav-link.active {
    background: var(--primary-gradient) !important;
    color: #121212 !important;
    font-weight: 600;
    box-shadow: var(--shadow-glow);
}

.sidebar .nav-link.active i {
    color: #121212 !important;
}

/* Storage Widget in Sidebar */
.sidebar-storage {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255, 229, 0, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin: 1rem;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-storage:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sidebar-storage .progress {
    height: 8px;
    border-radius: var(--radius-pill);
    background-color: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.sidebar-storage .progress-bar {
    border-radius: var(--radius-pill);
    background: var(--primary-gradient);
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 2.25rem 2.5rem;
    width: 100%;
    margin-left: 0;
    transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.has-sidebar .main-content {
    margin-left: 270px;
}

.footer-with-sidebar {
    margin-left: 270px;
}

/* Modern Card System */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
}

.card-hover:hover, .card-interactive:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

/* Modern Stats Widgets */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Modern Folder Cards */
.folder-card {
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.folder-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(255, 229, 0, 0.02) 100%);
}

.folder-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.folder-card:hover .folder-icon {
    transform: scale(1.1);
    background: var(--primary);
    color: #121212;
}

/* Modern File Item Cards */
.file-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.file-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

/* File Type Badges & Colors */
.file-icon-box {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.file-card:hover .file-icon-box {
    transform: scale(1.08);
}

.file-icon-pdf { background: #FEE2E2; color: #EF4444; }
.file-icon-word { background: #DBEAFE; color: #2563EB; }
.file-icon-excel { background: #D1FAE5; color: #059669; }
.file-icon-image { background: #FCE7F3; color: #DB2777; }
.file-icon-zip { background: #FEF3C7; color: #D97706; }
.file-icon-media { background: #EDE9FE; color: #7C3AED; }
.file-icon-code { background: #E0F2FE; color: #0284C7; }
.file-icon-default { background: #F1F5F9; color: #64748B; }

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 0.6rem 1.25rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn:active {
    transform: scale(0.97) !important;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    color: #121212 !important;
    box-shadow: 0 4px 14px rgba(255, 229, 0, 0.25);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #FFB700 0%, #FFE500 100%);
    box-shadow: 0 6px 20px rgba(255, 229, 0, 0.35);
    transform: translateY(-2px);
    color: #121212 !important;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-light {
    background-color: #222222;
    border-color: transparent;
    color: var(--text-body);
}

.btn-light:hover {
    background-color: #333333;
    color: var(--text-dark);
}

.btn-pill {
    border-radius: var(--radius-pill);
}

/* Forms & Inputs */
.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
    font-size: 0.925rem;
    color: var(--text-dark);
    background-color: #161616;
    transition: all 0.25s ease;
}

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

.input-group-text {
    border-color: var(--border-color);
    background-color: #222222;
    color: var(--text-muted);
    border-radius: var(--radius-md);
}

/* Modern Dropzone Drag & Drop */
.dropzone {
    border: 2px dashed rgba(255, 229, 0, 0.35);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(255, 229, 0, 0.02) 100%);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dropzone:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dropzone.dragover {
    border-color: var(--primary);
    background: rgba(255, 229, 0, 0.15);
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
    animation: pulseGlow 1.5s infinite;
}

.dropzone-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dropzone:hover .dropzone-icon {
    transform: scale(1.15) rotate(5deg);
    background: var(--primary);
    color: #121212;
}

/* Modals */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

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

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

.modal-backdrop {
    backdrop-filter: blur(8px);
    background-color: rgba(15, 23, 42, 0.5) !important;
}

/* Tables */
.table {
    vertical-align: middle;
    color: var(--text-body);
}

.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background-color: #F8FAFC;
    border-bottom: 1px solid var(--border-color);
    padding: 0.9rem 1.25rem;
}

.table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(255, 126, 41, 0.03) !important;
}

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.1rem;
    color: var(--text-light);
}

.breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--primary);
    font-weight: 600;
}

/* Badges */
.badge {
    padding: 0.4em 0.75em;
    font-weight: 600;
    border-radius: var(--radius-pill);
    letter-spacing: 0.02em;
}

/* User Avatar */
.avatar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: var(--primary-gradient) !important;
    font-weight: 700;
    color: #121212 !important;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    .has-sidebar .main-content, .footer-with-sidebar {
        margin-left: 0;
    }
    .main-content {
        padding: 1.5rem 1.25rem;
    }
    .search-form {
        display: none;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.6);
}

::-webkit-scrollbar-thumb {
    background: rgba(203, 213, 225, 0.8);
    border-radius: 10px;
}

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

/* ============================================================
   Custom Spacing Utilities for Decimals (2.5, 3.5, 1.5)
   ============================================================ */
.p-3\.5 { padding: 1.25rem !important; }
.py-3\.5 { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
.px-3\.5 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
.mb-3\.5 { margin-bottom: 1.25rem !important; }
.g-3\.5, .gx-3\.5 { --bs-gutter-x: 1.25rem; }
.g-3\.5, .gy-3\.5 { --bs-gutter-y: 1.25rem; }

.py-2\.5 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.px-2\.5 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.me-2\.5 { margin-right: 0.75rem !important; }

.py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }
.me-1\.5 { margin-right: 0.375rem !important; }
