/* ==========================================================================
   KEC INSTITUTE - CONSOLIDATED MASTER STYLESHEET
   Kanchanjangha Education Centre, Bhaktapur, Nepal
   ========================================================================== */

/* --- 1. DESIGN TOKENS & CSS VARIABLES --- */
:root {
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --secondary: #4f46e5;
    --secondary-hover: #4338ca;
    --accent: #38bdf8;
    --dark-navy: #0f172a;
    --darkest: #f8fafc;
    --light-navy: #ffffff;
    --slate: #475569;
    --light-slate: #64748b;
    --white: #0f172a;
    --glass: rgba(2, 132, 199, 0.04);
    --glass-border: rgba(2, 132, 199, 0.12);
    --card-bg: #ffffff;
    --sidebar-width: 280px;
    --sidebar-bg: #0f172a;
}

/* --- 2. RESET & BASE TYPOGRAPHY --- */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--darkest);
    color: var(--slate);
    overflow-x: hidden;
    scroll-behavior: smooth;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--white);
    font-weight: 700;
    letter-spacing: -0.5px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.25s ease;
}

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

/* --- 3. AMBIENT GLOW EFFECTS & BACKGROUNDS --- */
.glow-1 {
    position: absolute;
    top: -10%;
    left: -5%;
    width: 450px;
    height: 450px;
    background: rgba(2, 132, 199, 0.12);
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
}

.glow-2 {
    position: absolute;
    bottom: 10%;
    right: -5%;
    width: 450px;
    height: 450px;
    background: rgba(79, 70, 229, 0.12);
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
}

/* --- 4. PUBLIC SITE HEADER & NAVBAR --- */
.site-header {
    z-index: 1050;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.header-topbar {
    background: #0f172a;
    background: linear-gradient(90deg, #0b1120 0%, #0f172a 50%, #1e1b4b 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 0;
    font-size: 0.8125rem;
    position: relative;
    z-index: 1051;
}

.topbar-info-link {
    color: #94a3b8 !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
    font-weight: 500;
}

.topbar-info-link:hover {
    color: #38bdf8 !important;
}

.topbar-badge {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.725rem;
    font-weight: 600;
}

/* PDF Download Prospectus Button in Header */
.btn-topbar-download {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px 5px 8px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-topbar-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-25deg);
    transition: left 0.75s ease;
}

.btn-topbar-download:hover::before {
    left: 125%;
}

.btn-topbar-download:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.5);
    color: #ffffff !important;
}

.btn-download-icon-wrap {
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.btn-download-text-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-download-title {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.btn-download-badge {
    background: rgba(0, 0, 0, 0.28);
    padding: 1px 7px;
    border-radius: 6px;
    font-size: 0.685rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

/* Mobile Drawer Download Button */
.btn-download-mobile {
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    color: var(--dark) !important;
    padding: 10px 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}

.btn-download-mobile:hover {
    background: #fee2e2;
    border-color: #f87171;
    transform: translateY(-1px);
}

.navbar {
    background: rgba(248, 250, 252, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.65rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--dark) !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
    flex-shrink: 0;
}

.navbar-logo {
    max-height: 64px;
    height: 54px;
    width: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.footer-logo {
    max-height: 68px;
    height: 58px;
    width: auto;
    object-fit: contain;
}

.nav-link {
    color: var(--slate) !important;
    font-weight: 600;
    margin: 0 8px;
    padding: 6px 12px !important;
    border-radius: 8px;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
    background: rgba(2, 132, 199, 0.05);
}

.user-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--primary) !important;
}

.btn-apply {
    background: linear-gradient(135deg, var(--primary), #0284c7);
    border: none;
    color: white !important;
    padding: 9px 24px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 18px rgba(2, 132, 199, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-apply:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #0369a1, #0284c7);
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.35);
}

.navbar-toggler {
    border-color: rgba(15, 23, 42, 0.15);
    padding: 6px 10px;
}

.site-flash-alert-container {
    padding-top: 140px;
    margin-bottom: -100px;
    position: relative;
    z-index: 1060;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--light-navy);
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: 1.5rem;
        border: 1px solid var(--glass-border);
        box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
    }
    .nav-link {
        padding: 0.75rem 0 !important;
        border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    }
    .nav-link:last-child {
        border-bottom: none;
    }
}

/* --- 5. HERO & BANNER SECTIONS --- */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 180px;
    padding-bottom: 75px;
}

.page-header {
    padding: 195px 0 75px;
    position: relative;
}

.section-tag {
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 800;
    font-size: 0.75rem;
    display: inline-block;
    margin-bottom: 0.75rem;
    background: rgba(2, 132, 199, 0.08);
    padding: 4px 14px;
    border-radius: 100px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-title span {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    line-height: 1.7;
    color: var(--slate);
}

.hero-panel {
    background: rgba(2, 132, 199, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 2.75rem 3rem;
}

.btn-white {
    background: var(--white);
    color: #ffffff !important;
    font-weight: 700;
    border-radius: 12px;
    padding: 0.9rem 1.8rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-white:hover {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(2, 132, 199, 0.25);
}

.btn-outline-glass {
    border: 1px solid var(--glass-border);
    color: var(--white);
    font-weight: 700;
    border-radius: 12px;
    padding: 0.9rem 1.8rem;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline-glass:hover {
    background: rgba(2, 132, 199, 0.08);
    color: var(--primary);
    border-color: var(--primary);
}

.hero-visual {
    position: relative;
}

.hero-visual img {
    width: 100%;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.12);
    border: 1px solid var(--glass-border);
    object-fit: cover;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 14px 20px;
    border-radius: 18px;
    z-index: 2;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    animation: float 6s ease-in-out infinite;
}

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

.card-1 { top: 12%; left: -4%; }
.card-2 { bottom: 10%; right: -4%; animation-delay: 1.5s; }

@media (max-width: 991.98px) {
    .hero {
        padding-top: 155px;
        padding-bottom: 50px;
        min-height: auto;
    }
    .page-header {
        padding: 160px 0 50px;
    }
    .hero-panel {
        padding: 2rem;
    }
    .card-1 { top: 4%; left: 0%; }
    .card-2 { bottom: 4%; right: 0%; }
}

/* --- 5.1 NOTICE TICKER BAR --- */
.ticker-section {
    background: #ffffff;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 10px 0;
    overflow: hidden;
}

.ticker-wrapper {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.ticker-track-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    flex-grow: 1;
    display: flex;
    mask-image: linear-gradient(to right, transparent, black 15px, black calc(100% - 15px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15px, black calc(100% - 15px), transparent);
}

.ticker-track {
    display: inline-flex;
    white-space: nowrap;
    will-change: transform;
    animation: marqueeScroll 28s linear infinite;
}

.ticker-track-container:hover .ticker-track,
.ticker-wrapper:hover .ticker-track,
.ticker-track:hover {
    animation-play-state: paused;
    cursor: pointer;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding-right: 4rem;
    font-size: 0.885rem;
    color: var(--slate);
    font-weight: 500;
}

@keyframes marqueeScroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* --- 6. GLASS CARDS & GENERAL COMPONENTS --- */
section {
    padding: 90px 0;
    position: relative;
}

.glass-card {
    background: var(--light-navy);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.2rem;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
}

.glass-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.icon-circle {
    width: 56px;
    height: 56px;
    background: rgba(2, 132, 199, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 2.5rem;
}

.stat-card {
    background: var(--light-navy);
    border: 1px solid var(--glass-border);
    padding: 1.4rem;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.02);
}

.stat-card .stat-number {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    font-family: 'Space Grotesk', sans-serif;
}

.stat-card span:nth-child(2) {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--light-slate);
    font-weight: 700;
}

.recommendation-panel {
    background: var(--light-navy);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3.5rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.05);
}

/* --- 7. COURSES & GALLERY --- */
.filter-btn {
    background: var(--light-navy);
    border: 1px solid var(--glass-border);
    color: var(--slate);
    padding: 8px 22px;
    border-radius: 100px;
    margin: 5px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    display: inline-block;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.course-card {
    background: var(--light-navy);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.course-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
}

.course-img {
    height: 220px;
    width: 100%;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
}

.course-body {
    padding: 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-tag {
    background: rgba(2, 132, 199, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--glass-border);
    background: var(--light-navy);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.gallery-item img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.85));
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* --- 8. CHATBOT COUNSELOR WIDGET --- */
.chat-widget {
    position: fixed;
    right: 28px;
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 1000;
}

.chat-bubble-tip {
    background: var(--light-navy);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 10px 20px;
    border-radius: 100px;
    animation: bounceTip 2.5s infinite;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

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

.tip-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 16px rgba(2, 132, 199, 0.3);
}

.chat-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(2, 132, 199, 0.4);
    transition: all 0.3s ease;
}

.chat-btn:hover {
    transform: scale(1.08);
}

/* Chat Box — Gemini-style Panel */
.chat-box {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 400px;
    max-height: 540px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(2, 132, 199, 0.06);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1001;
    animation: chatSlideUp 0.3s ease-out;
}

@keyframes chatSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-avatar-ai {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.chat-powered-badge {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
    display: block;
    line-height: 1;
}

.chat-header-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.chat-header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Chat Body */
.chat-body {
    height: 360px;
    overflow-y: auto;
    background: #f8fafc;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scroll-behavior: smooth;
}

.chat-body::-webkit-scrollbar { width: 4px; }
.chat-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* Message Rows */
.chat-msg-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    max-width: 92%;
}

.bot-row { align-self: flex-start; }
.user-row { align-self: flex-end; flex-direction: row-reverse; }

.chat-msg-avatar {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.65rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.user-row .chat-msg-avatar {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    border-radius: 50%;
}

/* Chat Bubbles */
.chat-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.84rem;
    line-height: 1.55;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.bot-bubble {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-top-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.user-bubble {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    color: white;
    border-top-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
}

/* Markdown inside bot bubbles */
.bot-bubble strong { font-weight: 700; color: #0f172a; }
.bot-bubble em { font-style: italic; color: #475569; }
.bot-bubble ul, .bot-bubble ol { margin: 6px 0 6px 16px; padding: 0; }
.bot-bubble li { margin-bottom: 3px; }
.bot-bubble a { color: var(--primary); text-decoration: underline; }
.bot-bubble p { margin: 0 0 6px 0; }
.bot-bubble p:last-child { margin-bottom: 0; }

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 12px 18px;
    align-items: center;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingPulse 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Suggestion Chips */
.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 8px 34px;
}

.chat-chip {
    font-size: 0.72rem;
    padding: 5px 12px;
    border-radius: 100px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-weight: 600;
}

.chat-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(2, 132, 199, 0.04);
    transform: translateY(-1px);
}

/* Input Area */
.chat-input-area {
    padding: 12px 14px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.chat-textarea {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 9px 14px;
    font-size: 0.84rem;
    line-height: 1.4;
    resize: none;
    max-height: 80px;
    outline: none;
    background: #f8fafc;
    color: #1e293b;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.chat-textarea:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.08);
}

.chat-send-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border: none;
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.chat-send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* --- 9. FOOTER --- */
footer {
    background: var(--darkest);
    border-top: 1px solid var(--glass-border);
    padding: 5rem 0 2rem;
    color: var(--slate);
}

.footer-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--white) !important;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.footer-link {
    color: var(--slate);
    transition: all 0.25s ease;
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.footer-link:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.footer-heading {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.social-link {
    width: 38px;
    height: 38px;
    background: var(--light-navy);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate);
    transition: all 0.25s ease;
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    border-color: var(--primary);
}

.footer-bottom {
    margin-top: 4.5rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--glass-border);
}

.footer-status {
    display: flex;
    justify-content: flex-end;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--light-slate);
}

/* --- 10. AUTH & ADMIN/PORTAL LAYOUT --- */
.auth-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 28px;
    padding: 3.5rem 3rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
    max-width: 500px;
    width: 100%;
    margin: auto;
}

.form-control, .form-select {
    border-radius: 12px;
    padding: 12px 18px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.925rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.form-control:focus, .form-select:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.14);
    outline: none;
}

/* Dashboard Sidebar & Container */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, #090e17 0%, #0f172a 100%);
    color: #ffffff;
    padding: 1.8rem 1.2rem;
    z-index: 1040;
    box-shadow: 6px 0 30px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 3rem;
    min-height: 100vh;
    background-color: #f8fafc;
    background-image: radial-gradient(#e2e8f0 0.75px, transparent 0.75px);
    background-size: 24px 24px;
    transition: margin-left 0.3s ease;
}

.sidebar .brand-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.8rem;
    color: white;
    padding: 0 0.5rem;
}

.sidebar-profile-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
    flex-shrink: 0;
}

.sidebar-heading {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-weight: 800;
    color: #64748b;
    padding: 0.8rem 0.8rem 0.4rem;
    margin-top: 0.5rem;
}

.sidebar .nav-link {
    color: #94a3b8 !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1rem !important;
    border-radius: 12px;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    transition: all 0.2s ease;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.85;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebar .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.sidebar .nav-link:hover i {
    opacity: 1;
    transform: scale(1.1);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary), #0284c7);
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35);
}

.sidebar .nav-link.active i {
    opacity: 1;
}

/* Status Badges */
.status-badge {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-badge::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-pending {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fef08a;
}
.badge-pending::before { background: #ca8a04; }

.badge-approved, .badge-active {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.badge-approved::before, .badge-active::before { background: #16a34a; }

.badge-rejected, .badge-suspended {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.badge-rejected::before, .badge-suspended::before { background: #dc2626; }

/* Sticky Dashboard Topbar & Tab Navigation */
.dashboard-topbar-sticky {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(248, 250, 252, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 1.5rem 3rem 1.2rem 3rem;
    margin-top: -3rem;
    margin-left: -3rem;
    margin-right: -3rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
    transition: all 0.25s ease;
}

.sticky-tabs-container {
    position: sticky;
    top: 88px;
    z-index: 1025;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

/* Modern Dashboard Stat Cards */
.stat-card-modern {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}

.stat-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    border-color: rgba(2, 132, 199, 0.3);
}

.stat-card-modern .stat-icon-bubble {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.stat-card-modern:hover .stat-icon-bubble {
    transform: scale(1.08);
}

.icon-bubble-blue { background: #e0f2fe; color: #0284c7; }
.icon-bubble-green { background: #dcfce7; color: #16a34a; }
.icon-bubble-purple { background: #ede9fe; color: #7c3aed; }
.icon-bubble-amber { background: #fef3c7; color: #d97706; }
.icon-bubble-rose { background: #ffe4e6; color: #e11d48; }

.stat-card-modern .stat-number-display {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
    margin: 0.35rem 0;
}

.stat-card-modern .stat-meta-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Dashboard Action Cards */
.action-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
    transition: all 0.25s ease;
}

.action-card:hover {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.action-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Tables in Dashboards */
.table-responsive {
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.02);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #64748b;
    font-weight: 700;
}

.table tbody tr {
    transition: background 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table tbody td {
    padding: 1.1rem 1.25rem;
    vertical-align: middle;
    color: #334155;
    font-size: 0.9rem;
}

/* Modals */
.modal-content {
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.18);
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.5rem 1.8rem;
}

.modal-body {
    padding: 1.8rem;
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1.2rem 1.8rem;
}

/* Pill Tabs */
.nav-pills .nav-link {
    color: #64748b;
    font-weight: 600;
    border-radius: 100px;
    padding: 8px 18px;
    transition: all 0.2s ease;
}

.nav-pills .nav-link:hover {
    color: var(--primary);
    background: rgba(2, 132, 199, 0.06);
}

.nav-pills .nav-link.active {
    background: var(--primary);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    .dashboard-topbar-sticky {
        padding: 1.2rem 1.5rem 1rem 1.5rem;
        margin-top: -1.5rem;
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        margin-bottom: 1.5rem;
    }
    .sticky-tabs-container {
        top: 75px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.4rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .recommendation-panel {
        padding: 2rem 1.5rem;
    }
    .chat-box {
        width: 320px;
        right: -10px;
        max-height: 480px;
    }
    .chat-body {
        height: 300px;
    }
    .chat-suggestions {
        padding-left: 8px;
    }
}