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

:root {
    /* Brand Colors */
    --brand-red: #A30000;
    --brand-red-dark: #820000;
    --brand-red-light: #FF3D3D;
    --brand-red-soft: rgba(163, 0, 0, 0.1);

    /* Neutrals */
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --border-light: #E2E8F0;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.brand-font {
    font-family: 'Outfit', sans-serif;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Glassmorphism Classes */
.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Premium Button Overrides */
.tw-btn-premium {
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(163, 0, 0, 0.2);
}

.tw-btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(163, 0, 0, 0.3);
    color: white;
}

.tw-btn-premium:active {
    transform: translateY(0);
}

/* Input Styles */
.premium-input {
    border: 2px solid transparent !important;
    background-color: #F1F5F9 !important;
    border-radius: 12px !important;
    transition: var(--transition) !important;
}

.premium-input:focus {
    background-color: #FFFFFF !important;
    border-color: var(--brand-red-soft) !important;
    box-shadow: 0 0 0 4px var(--brand-red-soft) !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Sidebar Specific */
#main-sidebar {
    background: #ffffff;
}

/* Sidebar Enhancements */
.sidebar-dept-header {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 1.5rem 1rem 0.5rem 1rem;
    display: block;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 12px;
    margin: 0.125rem 0.5rem;
    transition: var(--transition);
    text-decoration: none !important;
}

.sidebar-link:hover {
    background-color: #F1F5F9;
    color: var(--brand-red);
}

.sidebar-link.active {
    background-color: var(--brand-red-soft);
    color: var(--brand-red);
    font-weight: 600;
}

.sidebar-link i,
.sidebar-link svg {
    margin-right: 0.75rem;
    width: 1.125rem;
    height: 1.125rem;
    transition: var(--transition);
}

.sidebar-link:hover i,
.sidebar-link:hover svg {
    transform: translateX(2px);
}

.sidebar-link.active i,
.sidebar-link.active svg {
    color: var(--brand-red);
}


/* Header Enhancements */
.premium-navbar {
    height: 72px;
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
}

.search-wrapper {
    background: #F1F5F9;
    border-radius: 14px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.search-wrapper:focus-within {
    background: #ffffff;
    border-color: var(--brand-red-soft);
    box-shadow: 0 0 0 4px var(--brand-red-soft);
}

/* Search Results Premium */
.search-result-card {
    display: block;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    background: #ffffff;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
}

.search-result-card:hover {
    background: var(--bg-main);
    border-color: var(--brand-red-soft);
    transform: translateX(4px);
}

.search-result-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

/* Archived States */
.result-archived {
    background: #FFF5F5 !important;
    border-color: #FED7D7 !important;
}

.result-archived .search-result-card-title {
    color: #C53030;
}

.archived-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 1.5rem;
    font-weight: 900;
    color: rgba(163, 0, 0, 0.1);
    letter-spacing: 0.2em;
    pointer-events: none;
    white-space: nowrap;
}

.archived-cross {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image:
        linear-gradient(to top right, transparent calc(50% - 1px), rgba(163, 0, 0, 0.05) 50%, transparent calc(50% + 1px)),
        linear-gradient(to bottom right, transparent calc(50% - 1px), rgba(163, 0, 0, 0.05) 50%, transparent calc(50% + 1px));
}

/* Dashboard Cards */
.card-premium {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-premium);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    border-color: var(--brand-red-soft);
}

.card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-red), var(--brand-red-light));
    opacity: 0;
    transition: var(--transition);
}

.card-premium:hover::before {
    opacity: 1;
}

.card-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--transition);
}

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

/* Status Colors */
.status-red {
    background: rgba(163, 0, 0, 0.1);
    color: #A30000;
}

.status-blue {
    background: rgba(37, 99, 235, 0.1);
    color: #2563EB;
}

.status-green {
    background: rgba(22, 163, 74, 0.1);
    color: #16A34C;
}

.status-orange {
    background: rgba(234, 88, 12, 0.1);
    color: #EA580C;
}

.status-purple {
    background: rgba(147, 51, 234, 0.1);
    color: #9333EA;
}

/* Grid Layouts */
.premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}