:root {
    --bg-body: #f4f7fb;
    --header-gradient: linear-gradient(135deg, #2e1065 0%, #4338ca 100%);
    --header-accent: #818cf8;
    --panel-right-bg: #ffffff;
    --accent-color: #4f46e5;
    --accent-hover: #3730a3;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-large: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* ========================================= */
/* TOP HEADER (Branding) */
/* ========================================= */
.top-navbar {
    background: var(--header-gradient);
    padding: 0.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 10px 30px -10px rgba(67, 56, 202, 0.4);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-icon {
    /* Updated to fit the image properly without clipping */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Remove fixed width/height so it wraps the image */
    /* Add a subtle background/border if you want, or keep it clean */
    background: rgba(255, 255, 255, 0.9); /* Slight white background to make logo pop */
    border-radius: 50%; /* Circle shape usually looks best for logos */
    padding: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

    .brand-icon img {
        height: 65px; /* Adjust size here, slightly smaller fits the header better */
        width: 65px;
        object-fit: contain; /* Ensures the logo isn't distorted */
        border-radius: 50%; /* Match container radius if needed */
    }

.brand-text-group {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 0.95rem;
    color: #c7d2fe;
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.5px;
}

.system-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    color: #e0e7ff;
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(5px);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #34d399;
    border-radius: 50%;
    box-shadow: 0 0 12px #34d399;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(52, 211, 153, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
    }
}

/* ========================================= */
/* MAIN CONTENT AREA */
/* ========================================= */
.main-container {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.section-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

    .section-header h2 {
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--text-dark);
        margin: 0;
        letter-spacing: -0.5px;
    }

    .section-header p {
        color: var(--text-muted);
        margin: 0.25rem 0 0 0;
        font-size: 1rem;
    }

/* ========================================= */
/* MODERN RESULT LIST */
/* ========================================= */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-row {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

    .result-row:hover {
        background: #ffffff;
        border-color: #a5b4fc;
        box-shadow: 0 15px 25px -5px rgba(67, 56, 202, 0.1);
        transform: translateY(-3px);
    }

.row-icon {
    width: 48px;
    height: 48px;
    background: #eef2ff;
    color: var(--accent-color);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1.5rem;
    transition: var(--transition);
}

.result-row:hover .row-icon {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.row-content {
    flex: 1;
}

.row-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.row-meta {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    align-items: center;
}

.pill {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.row-arrow {
    color: #94a3b8;
    font-size: 1.5rem;
    transition: var(--transition);
}

.result-row:hover .row-arrow {
    color: var(--accent-color);
    transform: translateX(5px);
}

/* ========================================= */
/* HORIZONTAL CATEGORY BARS */
/* ========================================= */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.category-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

    .category-bar::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 0;
        background: var(--header-gradient);
        transition: width 0.4s ease;
        z-index: 0;
        opacity: 0.05;
    }

    .category-bar:hover {
        border-color: #a5b4fc;
        transform: translateX(8px);
        box-shadow: 0 10px 25px -5px rgba(67, 56, 202, 0.15);
    }

        .category-bar:hover::before {
            width: 100%;
        }

.cat-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 1;
}

.cat-icon {
    font-size: 2rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.category-bar:hover .cat-icon {
    color: var(--accent-color);
}

.cat-text h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.cat-text p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cat-arrow {
    font-size: 1.5rem;
    color: var(--border-color);
    z-index: 1;
    transition: var(--transition);
}

.category-bar:hover .cat-arrow {
    color: var(--accent-color);
}

/* Disabled State */
.category-bar.disabled {
    background: #f8fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
    border-style: dashed;
    box-shadow: none;
}

    .category-bar.disabled:hover {
        transform: none;
        box-shadow: none;
    }

    .category-bar.disabled::before {
        display: none;
    }

.badge-pending {
    background: #ffffff;
    color: #64748b;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid #cbd5e1;
    z-index: 1;
}

/* Buttons & Alerts */
.btn-back-header {
    background: white;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 12px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

    .btn-back-header:hover {
        background: var(--bg-body);
        border-color: var(--accent-color);
        color: var(--accent-color);
    }

.alert-custom {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fca5a5;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Preloader */
.preLoad {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-line {
    width: 150px;
    height: 3px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

    .loader-line::after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 50%;
        background: var(--accent-color);
        border-radius: 3px;
        animation: slide 1s ease-in-out infinite alternate;
    }

@keyframes slide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .top-navbar {
        flex-direction: column;
        padding: 0.5rem;
        text-align: center;
        gap: 1rem;
    }

    .brand-container {
        flex-direction: column;
    }

    .brand-title {
        font-size: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .category-bar {
        padding: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .badge-pending {
        position: absolute;
        top: 1.25rem;
        right: 1.25rem;
    }

    .cat-arrow {
        display: none;
    }
}
