:root {
    --app-bg: #f4f7fb;
    --app-surface: #ffffff;
    --app-primary: #0f4c81;
    --app-primary-soft: #d8e8f7;
    --app-accent: #f2b84b;
    --app-text: #1f2937;
}

body.app-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(15, 76, 129, 0.16), transparent 35%),
        radial-gradient(circle at top right, rgba(242, 184, 75, 0.22), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, var(--app-bg) 100%);
    color: var(--app-text);
    font-family: 'Source Sans 3', sans-serif;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .btn {
    font-family: 'Manrope', sans-serif;
}

.app-nav {
    background: rgba(10, 22, 39, 0.92);
    backdrop-filter: blur(14px);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35);
}

.navbar-toggler-icon {
    filter: invert(1);
}

.nav-link {
    color: rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    padding-inline: 1rem !important;
}

.nav-link.active,
.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.hero-panel {
    background:
        linear-gradient(135deg, rgba(12, 48, 83, 0.98), rgba(18, 86, 128, 0.86)),
        linear-gradient(45deg, rgba(242, 184, 75, 0.25), transparent 50%);
    box-shadow: 0 30px 80px rgba(15, 76, 129, 0.24);
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.feature-card,
.stat-card {
    height: 100%;
    border-radius: 1.5rem;
    background: var(--app-surface);
    border: 1px solid rgba(15, 76, 129, 0.08);
    box-shadow: 0 20px 45px rgba(15, 76, 129, 0.08);
    padding: 1.5rem;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.hero-metric {
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.hero-metric strong {
    display: block;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.hero-metric span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
}

.landing-section {
    margin-top: 3rem;
}

.resource-card {
    padding: 1.4rem;
    border-radius: 1.4rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 76, 129, 0.08);
    box-shadow: 0 18px 42px rgba(15, 76, 129, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.resource-card:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 76, 129, 0.18);
    box-shadow: 0 24px 50px rgba(15, 76, 129, 0.12);
}

.content-icon {
    width: 3rem;
    height: 3rem;
    flex: 0 0 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: #e9f2fb;
    color: var(--app-primary);
    font-size: 1.25rem;
}

.content-icon.icon-helpdesk {
    background: #fff3d6;
    color: #9a6700;
}

.content-icon.icon-manual {
    background: #dbeafe;
    color: #1d4ed8;
}

.content-icon.icon-training_audio {
    background: #ede9fe;
    color: #6d28d9;
}

.content-icon.icon-training_video {
    background: #fee2e2;
    color: #b91c1c;
}

.content-icon.icon-article {
    background: #e0f2fe;
    color: #0369a1;
}

.content-icon.icon-wiki {
    background: #dcfce7;
    color: #166534;
}

.hero-panel .form-control {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.92);
}

.feature-card p,
.stat-card span {
    color: #6b7280;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    margin-top: 0.5rem;
    color: var(--app-primary);
}

.card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
}

.page-link {
    border: 0;
    color: var(--app-primary);
    box-shadow: 0 8px 18px rgba(15, 76, 129, 0.08);
}

.page-item.active .page-link {
    background: var(--app-primary);
    color: #fff;
}

.ticket-message {
    border-radius: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid rgba(15, 76, 129, 0.08);
}

.ticket-message-internal {
    background: #fff9eb;
    border-color: rgba(242, 184, 75, 0.4);
}

.chat-header {
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.08), rgba(242, 184, 75, 0.12));
}

.chat-history {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 24rem;
    max-height: 40rem;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(15, 76, 129, 0.03), rgba(255, 255, 255, 0));
}

.chat-bubble {
    max-width: min(82%, 46rem);
    border-radius: 1.25rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 12px 30px rgba(15, 76, 129, 0.08);
}

.chat-bubble-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #0f4c81, #1a6aa6);
    color: #fff;
}

.chat-bubble-bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid rgba(15, 76, 129, 0.1);
}

@media (max-width: 768px) {
    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .chat-bubble {
        max-width: 100%;
    }
}