.app-body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    min-height: 100vh;
    position: relative;
    background: radial-gradient(circle at top left, rgba(111, 66, 193, 0.45), transparent 45%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.35), transparent 40%),
        linear-gradient(160deg, #050918, #0f172a 55%, #111827);
    color: #f9fbff;
}

.app-gradient {
    pointer-events: none;
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.18), transparent 60%),
        radial-gradient(circle at 80% 0%, rgba(79, 70, 229, 0.18), transparent 60%),
        radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.12), transparent 65%);
    z-index: -1;
}

.glass-navbar {
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    background: rgba(15, 23, 42, 0.75);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(15, 23, 42, 0.35));
}

.glass-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1.2rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.85));
    box-shadow: 0 25px 50px -20px rgba(15, 23, 42, 0.65);
    overflow: hidden;
}

.glass-card .card-body {
    padding: 1.75rem;
    color: #e9f1ff;
}

.glass-card .card-body h1,
.glass-card .card-body h2,
.glass-card .card-body h3,
.glass-card .card-body h4,
.glass-card .card-body h5,
.glass-card .card-body h6 {
    color: #ffffff;
}

.glass-card .card-body p,
.glass-card .card-body small,
.glass-card .card-body label,
.glass-card .card-body span,
.glass-card .card-body a {
    color: rgba(237, 242, 255, 0.92);
}

.glass-card .card-body a.btn,
.glass-card .card-body a.btn:hover {
    color: inherit;
}

.accent-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(30, 64, 175, 0.25));
    border-color: rgba(96, 165, 250, 0.3);
}

.page-header {
    margin-bottom: 2.5rem;
}

.hero-heading .display-5 {
    text-shadow: 0 10px 30px rgba(15, 23, 42, 0.4);
}

.stats-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.list-group-item {
    background: transparent;
    color: #f8fbff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 1rem;
    margin-bottom: 0.75rem;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    padding-block: 1rem;
}

.list-group-item:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(59, 130, 246, 0.08);
}

.session-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.session-link {
    display: block;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid transparent;
    background: rgba(15, 23, 42, 0.6);
    text-decoration: none;
    transition: all 0.2s ease;
}

.session-link:hover {
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(30, 64, 175, 0.35);
}

.session-link.active {
    border-color: rgba(129, 140, 248, 0.75);
    background: rgba(79, 70, 229, 0.5);
    box-shadow: 0 12px 30px -15px rgba(79, 70, 229, 0.8);
}

.session-link-title {
    font-weight: 600;
    color: #f8fafc;
}

.chat-scroller {
    max-height: 460px;
    overflow-y: auto;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.chat-scroller::-webkit-scrollbar {
    width: 8px;
}

.chat-scroller::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.65), rgba(79, 70, 229, 0.65));
    border-radius: 999px;
}

.chat-bubble {
    position: relative;
    padding: 1.25rem;
    border-radius: 1.2rem;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 30px -20px rgba(15, 23, 42, 0.9);
}

.chat-bubble-user {
    margin-left: auto;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.32), rgba(14, 165, 233, 0.25));
    border-color: rgba(96, 165, 250, 0.35);
}

.chat-bubble-assistant {
    margin-right: auto;
}

.bubble-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: rgba(240, 244, 255, 0.9);
}

.bubble-content {
    line-height: 1.6;
    font-size: 0.98rem;
    color: #ffffff;
}

.bubble-attachment {
    margin-top: 1rem;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.attachment-image {
    width: 100%;
    height: auto;
    display: block;
}

.form-stacked label {
    font-weight: 600;
    color: rgba(226, 232, 240, 0.9);
    margin-bottom: 0.5rem;
}

.form-control-modern {
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.55);
    color: #ffffff;
    padding: 0.9rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control-modern:focus {
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
    background: rgba(15, 23, 42, 0.75);
}

.form-control-modern::placeholder {
    color: rgba(226, 232, 240, 0.75);
}

.form-control,
.form-select {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
}

.form-control:focus,
.form-select:focus {
    color: #ffffff;
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
    background: rgba(15, 23, 42, 0.75);
}

.form-control::placeholder {
    color: rgba(226, 232, 240, 0.75);
}

.modern-file {
    border: 1px dashed rgba(148, 163, 184, 0.4);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(244, 247, 255, 0.9);
    background: rgba(15, 23, 42, 0.4);
}

.modern-file input[type="file"] {
    cursor: pointer;
    color: inherit;
}

.modern-file input[type="file"]::-webkit-file-upload-button,
.modern-file input[type="file"]::file-selector-button {
    border: none;
    border-radius: 0.75rem;
    padding: 0.55rem 1rem;
    margin-right: 1rem;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.9), rgba(59, 130, 246, 0.9));
    color: #0b1120;
    font-weight: 600;
    cursor: pointer;
}

.btn-gradient {
    background: linear-gradient(135deg, #6366f1, #22d3ee);
    border: none;
    color: #0f172a;
    font-weight: 600;
    padding-inline: 1.75rem;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px -20px rgba(14, 165, 233, 0.8);
}

.quick-stats {
    display: flex;
    align-items: center;
}

.stat-pill {
    background: rgba(15, 23, 42, 0.75);
    border-radius: 1rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    text-align: center;
    min-width: 110px;
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fdfcff;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(229, 231, 235, 0.8);
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    left: 0.6rem;
    width: 2px;
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.4), rgba(129, 140, 248, 0.15));
}

.timeline-item {
    position: relative;
    padding-left: 1.5rem;
}

.timeline-icon {
    position: absolute;
    left: -0.1rem;
    top: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.85);
    border: 2px solid rgba(96, 165, 250, 0.45);
}

.timeline-content {
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 15px 35px -25px rgba(15, 23, 42, 0.9);
}

.status-badge {
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-weight: 600;
}

.status-pending {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    border-color: rgba(250, 204, 21, 0.55);
}

.status-processing {
    background: rgba(129, 140, 248, 0.2);
    color: #c7d2fe;
    border-color: rgba(129, 140, 248, 0.55);
}

.status-completed {
    background: rgba(52, 211, 153, 0.18);
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.55);
}

.status-failed {
    background: rgba(248, 113, 113, 0.18);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.55);
}

.empty-state {
    color: rgba(241, 245, 249, 0.82);
}

.app-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.app-footer a {
    color: rgba(148, 163, 184, 0.85);
    text-decoration: none;
}

.app-footer a:hover {
    color: #f8fafc;
}

.text-white-50 {
    color: rgba(241, 245, 249, 0.86) !important;
}

.text-white-25 {
    color: rgba(241, 245, 249, 0.65) !important;
}

@media (max-width: 991px) {
    .chat-scroller {
        max-height: 360px;
        padding: 1.25rem;
    }

    .quick-stats {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 575px) {
    .glass-card .card-body {
        padding: 1.35rem;
    }

    .chat-scroller {
        max-height: 320px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
