/* ============================================
   SMARTVAULT - COMPACT ENTERPRISE STYLES
   Primary: #4d7802 | Secondary: #005ac2
   ============================================ */

:root {
    --primary: #4d7802;
    --primary-dark: #3a5c01;
    --secondary: #005ac2;
    --secondary-dark: #004094;
    --dark: #1a1f2e;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --gray-bg: #f8f9fc;
    --white: #fff;
    --danger: #e74c3c;
    --warning: #f39c12;
    --success: #27ae60;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 5px 20px rgba(0,0,0,0.05);
    --shadow-hover: 0 10px 25px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--gray-bg), var(--white));
    min-height: 100vh;
}

/* ========== NAVBAR (COMPACT) ========== */
.navbar-modern {
    background: var(--dark) !important;
    padding: 0.5rem 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--white) !important;
}

.navbar-brand i {
    color: var(--primary);
    margin-right: 6px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem !important;
}

/* ========== HERO & HEADERS ========== */
.hero-section,
.category-header,
.results-header,
.page-header {
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.hero-section {
    background: linear-gradient(135deg, var(--dark), #2a3040);
}

.category-header,
.results-header {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
}

.page-header {
    background: linear-gradient(135deg, var(--dark), #2a3040);
}

.hero-section h1 {
    font-weight: 800;
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    color: var(--white);
}

.category-header h4,
.results-header h4,
.page-header h3 {
    font-weight: 700;
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 0;
}

.hero-section p,
.category-header p,
.results-header p,
.page-header p {
    color: rgba(255,255,255,0.75);
    font-size: 0.8rem;
    margin: 0;
}

/* ========== SEARCH BAR ========== */
.search-card {
    background: rgba(255,255,255,0.08);
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.15);
    overflow: hidden;
}

.search-input {
    background: transparent !important;
    border: none !important;
    color: var(--white) !important;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    height: auto;
}

.search-input::placeholder {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
}

.search-btn {
    background: var(--primary);
    border: none;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* ========== FILE CARDS (COMPACT) ========== */
.file-card,
.category-card {
    background: var(--white);
    border: none;
    border-radius: var(--radius);
    transition: var(--transition);
    height: 100%;
    box-shadow: var(--shadow);
}

.file-card:hover,
.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.card-body {
    padding: 1rem;
    position: relative;
}

/* File Icons - Smaller */
.file-icon-wrapper {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(77,120,2,0.08), rgba(0,90,194,0.04));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem;
}

.file-icon {
    font-size: 24px;
}

.file-icon.fa-file-pdf { color: var(--danger); }
.file-icon.fa-file-word { color: #2c3e66; }
.file-icon.fa-file-excel { color: var(--success); }
.file-icon.fa-file-image { color: #e67e22; }

.card-title {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    text-align: center;
    color: var(--dark);
}

/* Badge - Compact */
.badge-category {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: var(--secondary);
    color: var(--white);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 600;
}

/* File Meta - Compact */
.file-meta {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.3rem 0;
    margin: 0.5rem 0;
    border-top: 1px solid var(--gray-light);
    border-bottom: 1px solid var(--gray-light);
    font-size: 0.65rem;
    color: var(--gray);
}

.file-meta span i {
    margin-right: 3px;
    color: var(--primary);
    font-size: 0.65rem;
}

.file-description {
    font-size: 0.7rem;
    color: var(--gray);
    line-height: 1.3;
    margin-bottom: 0.8rem;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== CATEGORY CARDS ========== */
.category-icon {
    font-size: 38px;
    transition: transform 0.3s ease;
    margin-bottom: 0.6rem;
}

.category-card:hover .category-icon {
    transform: scale(1.05);
}

.category-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 0.4rem;
}

.category-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0.6rem 0;
    padding: 0.4rem 0;
    border-top: 1px solid var(--gray-light);
    border-bottom: 1px solid var(--gray-light);
}

.stat-value {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark);
}

.stat-label {
    font-size: 0.6rem;
    color: var(--gray);
    text-transform: uppercase;
}

/* ========== BUTTONS (COMPACT) ========== */
.download-btn,
.browse-btn {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.8rem;
    font-weight: 600;
    font-size: 0.75rem;
    width: 100%;
    transition: var(--transition);
    color: var(--white);
    display: inline-block;
    text-align: center;
}

.download-btn:hover,
.browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,90,194,0.3);
    color: var(--white);
}

.back-btn {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    padding: 0.35rem 1rem;
    font-weight: 500;
    font-size: 0.75rem;
    transition: var(--transition);
    color: var(--white);
    display: inline-block;
}

.back-btn:hover {
    background: var(--white);
    color: var(--dark);
}

/* ========== SECTION HEADER ========== */
.section-header {
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-header h3 {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--dark);
    margin: 0;
    position: relative;
    padding-bottom: 6px;
}

.section-header h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.section-header a {
    font-size: 0.75rem;
}

/* ========== ALERTS ========== */
.alert {
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

/* ========== FOOTER (COMPACT) ========== */
.footer-modern {
    background: var(--dark);
    margin-top: 2rem;
    padding: 1.5rem 0 1rem;
}

.footer-modern h5 {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.footer-text {
    color: rgba(255,255,255,0.6);
    font-size: 0.7rem;
}

/* ========== ERROR PAGE ========== */
.error-container {
    max-width: 350px;
    margin: 60px auto;
}

.error-header {
    background: linear-gradient(135deg, var(--danger), #c0392b);
    padding: 1.2rem;
}

.error-header i {
    font-size: 40px;
}

.error-header h4 {
    font-size: 1.1rem;
}

.error-body {
    padding: 1.2rem;
}

/* ========== RESPONSIVE (MOBILE FIRST) ========== */
/* Mobile */
@media (max-width: 768px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .hero-section,
    .category-header,
    .results-header,
    .page-header {
        padding: 1.2rem;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 1.4rem;
    }
    
    .category-header h4,
    .results-header h4 {
        font-size: 1.1rem;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .section-header h3:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .card-body {
        padding: 0.85rem;
    }
    
    .file-icon-wrapper {
        width: 42px;
        height: 42px;
    }
    
    .file-icon {
        font-size: 20px;
    }
    
    .badge-category {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 0.55rem;
    }
    
    .card-title {
        font-size: 0.8rem;
    }
    
    .file-meta {
        gap: 0.6rem;
        font-size: 0.6rem;
    }
    
    .search-input {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .search-btn {
        padding: 0.5rem 1rem;
    }
    
    .footer-modern {
        text-align: center;
    }
    
    .footer-modern .text-md-right {
        text-align: center !important;
        margin-top: 0.5rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.2rem;
    }
    
    .category-header h4 {
        font-size: 1rem;
    }
    
    .file-meta {
        gap: 0.5rem;
        font-size: 0.55rem;
    }
    
    .download-btn,
    .browse-btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.7rem;
    }
    
    .back-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .category-icon {
        font-size: 32px;
    }
    
    .category-title {
        font-size: 0.9rem;
    }
    
    .stat-value {
        font-size: 0.8rem;
    }
}

/* Landscape Mode Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 1rem;
    }
    
    .file-card .card-body {
        padding: 0.75rem;
    }
}