:root {
    --bg: #f7f7fb;
    --surface: #ffffff;
    --surface-soft: #fff4f4;
    --surface-dark: #101828;
    --line: #e7e9ee;
    --text: #101828;
    --muted: #667085;
    --brand: #d92d20;
    --brand-dark: #b42318;
    --brand-soft: #fde7e5;
    --success: #16a34a;
    --warning: #f59e0b;
    --info: #2563eb;
    --radius-xs: 10px;
    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --shadow-sm: 0 10px 30px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 20px 45px rgba(16, 24, 40, 0.10);
    --shadow-lg: 0 30px 60px rgba(16, 24, 40, 0.15);
}

html {
    font-size: 15px;
    min-height: 100%;
}

body.app-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(217, 45, 32, 0.08), transparent 32%),
        radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.06), transparent 28%),
        var(--bg);
    color: var(--text);
    font-family: "Inter", "Segoe UI", sans-serif;
}

img {
    max-width: 100%;
}

.app-container {
    max-width: 1240px;
}

.site-header {
    backdrop-filter: saturate(180%) blur(14px);
    background: rgba(247, 247, 251, 0.88);
    border-bottom: 1px solid rgba(231, 233, 238, 0.9);
}

.navbar {
    padding: 1rem 0;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text);
    text-decoration: none;
}

.brand-mark strong,
.footer-brand strong {
    display: block;
    font-size: 1rem;
}

.brand-mark small,
.footer-brand p {
    display: block;
    color: var(--muted);
    font-size: 0.83rem;
    margin: 0;
}

.brand-logo {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff6b5c, var(--brand));
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.nav-link {
    color: #344054 !important;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.65rem 1rem !important;
    transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand) !important;
    background: var(--brand-soft);
}

.nav-link .badge {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--warning) !important;
    color: #111827;
    font-size: 11px;
}

.dropdown-menu {
    border-radius: 16px;
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background: #f8fafc;
}

.btn {
    border-radius: 14px !important;
    padding: 0.75rem 1.1rem !important;
    font-weight: 600 !important;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-brand {
    background: linear-gradient(135deg, #ef463a, var(--brand));
    color: white !important;
}

.btn-brand:hover {
    background: linear-gradient(135deg, #e13b2e, var(--brand-dark));
}

.btn-soft,
.btn-outline-primary,
.btn-outline-danger {
    background: white;
    color: var(--text) !important;
    border: 1px solid var(--line) !important;
}

.btn-soft:hover,
.btn-outline-primary:hover,
.btn-outline-danger:hover {
    background: #f9fafb;
    color: var(--text) !important;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-modern {
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.hero-modern::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle, rgba(217, 45, 32, 0.05) 0%, transparent 70%);
    z-index: -1;
}

.hero-modern .container {
    padding-top: 1rem;
    padding-bottom: 2rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(255,255,255,0.8);
    color: var(--brand);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    box-shadow: var(--shadow-sm);
}

.display-hero {
    font-size: clamp(2.6rem, 4.5vw, 4.5rem);
    line-height: 1.02;
    font-weight: 800;
    margin: 1rem 0;
    letter-spacing: -0.04em;
}

.hero-copy {
    max-width: 700px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.hero-stats {
    margin-top: 0.5rem;
}

.hero-stat-card,
.hero-panel,
.card,
.metric-card,
.feature-card,
.info-card,
.glass-card,
.table-card,
.list-card,
.forum-card,
.login-panel,
.dashboard-panel,
.event-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 10px 30px -5px rgba(0, 0, 0, 0.04),
        0 20px 40px -10px rgba(0, 0, 0, 0.03);
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover,
.feature-card:hover,
.info-card:hover,
.glass-card:hover,
.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px -12px rgba(16, 24, 40, 0.12);
    border-color: rgba(217, 45, 32, 0.15);
}

.hero-stat-card {
    padding: 1rem 1.1rem;
}

.hero-stat-card strong {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

.hero-stat-card span {
    color: var(--muted);
    font-size: 0.92rem;
}

.hero-panel {
    padding: 1.25rem;
}

.hero-panel-top {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 1rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.12);
}

.hero-panel-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #fff7f7);
    border: 1px solid #f3e4e4;
}

.hero-panel-item + .hero-panel-item {
    margin-top: 0.85rem;
}

.hero-panel-item i {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 1.05rem;
    flex-shrink: 0;
}

.hero-panel-item h6,
.metric-card h6,
.feature-card h5,
.info-card h5,
.section-heading h2,
.page-banner h1,
.page-title {
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.hero-panel-item p,
.metric-card p,
.feature-card p,
.info-card p,
.page-banner p,
.text-muted,
.muted-copy {
    color: var(--muted) !important;
}

.page-banner {
    padding: 2rem 0 0.35rem;
}

.page-banner .container {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.page-banner h1 {
    font-size: clamp(1.8rem, 2.6vw, 2.5rem);
    margin-top: 0.8rem;
}

.page-shell {
    padding: 1rem 0 4rem;
}

.section-block {
    margin-top: 5rem;
    position: relative;
}

.section-heading {
    margin-bottom: 1.25rem;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
}

.card,
.feature-card,
.info-card,
.metric-card,
.glass-card,
.login-panel,
.dashboard-panel,
.event-card,
.forum-card,
.table-card,
.list-card {
    border: 1px solid rgba(16, 24, 40, 0.05) !important;
}

.card,
.feature-card,
.info-card,
.metric-card,
.login-panel,
.dashboard-panel,
.event-card,
.forum-card,
.table-card,
.list-card {
    padding: 1.25rem;
}

.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    right: -35px;
    top: -35px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
}

.metric-card.metric-brand {
    background: linear-gradient(135deg, #ef463a, var(--brand));
    color: #fff;
}

.metric-card.metric-brand p,
.metric-card.metric-brand .muted-copy,
.metric-card.metric-brand .metric-label {
    color: rgba(255,255,255,0.84) !important;
}

.metric-card .metric-value {
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.metric-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255,255,255,0.8);
    color: var(--brand);
    margin-bottom: 1rem;
}

.kicker {
    display: inline-block;
    color: var(--brand);
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.55rem;
}

.form-control,
.form-select,
textarea.form-control {
    border-radius: 14px !important;
    border: 1px solid var(--line) !important;
    background: rgba(255,255,255,0.88);
    min-height: 48px;
    padding: 0.85rem 1rem;
    box-shadow: none !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #f3b0aa !important;
    box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.08) !important;
}

.table-card {
    overflow: hidden;
}

.table {
    margin: 0;
}

.table thead th {
    background: #fff6f5;
    color: #344054;
    border-bottom: 1px solid var(--line);
    font-weight: 700;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-color: var(--line);
    vertical-align: middle;
}

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

.badge {
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    font-weight: 700;
}

.bg-soft-brand {
    background: var(--brand-soft);
    color: var(--brand);
}

.search-panel {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    align-items: center;
}

.home-grid-cards .card,
.feature-grid .feature-card,
.info-grid .info-card {
    height: 100%;
}

.image-cover {
    width: 100%;
    height: 210px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 1rem;
}

.feature-card .feature-icon,
.info-card .feature-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #fff5f3;
    color: var(--brand);
    margin-bottom: 0.9rem;
}

.highlight-strip {
    background: linear-gradient(135deg, #1d2939, #344054);
    color: white;
}

.highlight-strip .metric-brand .metric-value,
.highlight-strip .metric-brand p,
.highlight-strip .metric-brand .muted-copy {
    color: white !important;
}

.login-shell {
    min-height: 68vh;
    display: grid;
    place-items: center;
}

.login-panel {
    overflow: hidden;
}

.login-side {
    background: linear-gradient(180deg, rgba(217,45,32,0.95), rgba(180,35,24,0.96));
    color: white;
    height: 100%;
    padding: 2rem;
    border-radius: var(--radius-md);
}

.login-side ul {
    padding-left: 1.1rem;
    margin-bottom: 0;
}

.login-main {
    padding: 2rem;
}

.login-badge {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.forum-toolbar,
.page-toolbar {
    display: flex;
    gap: 0.85rem;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.forum-card {
    padding: 1.35rem;
}

.forum-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.forum-user {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.forum-avatar {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--line);
}

.forum-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.forum-content {
    color: #475467;
    line-height: 1.75;
}

.forum-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.forum-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    background: #f8fafc;
}

.forum-image {
    width: 100%;
    max-width: 380px;
    max-height: 260px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.dashboard-grid canvas {
    width: 100% !important;
}

.event-card .event-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.event-meta {
    display: grid;
    gap: 0.65rem;
    color: var(--muted);
    margin: 1rem 0;
}

.event-meta div {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.slot-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    font-weight: 700;
}

.slot-pill.available {
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
}

.slot-pill.full {
    background: rgba(217, 45, 32, 0.12);
    color: var(--brand);
}

.info-note {
    color: var(--muted);
    font-size: 0.92rem;
}

.site-footer {
    background: #ffffffaa;
    border-top: 1px solid rgba(231, 233, 238, 0.9);
    padding: 1.5rem 0 2.2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.footer-meta p {
    margin-bottom: 0.25rem;
    color: var(--muted);
}

.toast-stack {
    z-index: 1200;
}

#chat-toggle-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ef463a, var(--brand));
    color: white;
    box-shadow: var(--shadow-lg);
    z-index: 1300;
}

#chatbox-wrapper {
    position: fixed;
    right: 24px;
    bottom: 95px;
    width: min(380px, calc(100vw - 30px));
    background: white;
    border-radius: 22px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1300;
}

#chatbox-wrapper.is-open {
    display: flex;
}

.chatbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem 0.85rem;
    border-bottom: 1px solid var(--line);
    background: #fff8f7;
}

.chatbox-header small {
    display: block;
    color: var(--muted);
}

#chatbox-messages {
    max-height: 340px;
    overflow-y: auto;
    padding: 1rem;
    background: #fcfcfd;
}

.chat-row {
    display: flex;
    margin-bottom: 0.8rem;
}

.chat-row.user {
    justify-content: flex-end;
}

.chat-bubble {
    max-width: 82%;
    border-radius: 18px;
    padding: 0.75rem 0.95rem;
    line-height: 1.55;
}

.chat-bubble.bot {
    background: #f4f6fb;
}

.chat-bubble.user {
    background: linear-gradient(135deg, #ef463a, var(--brand));
    color: white;
}

#chatbox-input {
    display: flex;
    gap: 0.6rem;
    padding: 0.9rem;
    border-top: 1px solid var(--line);
}

#chatbox-input input {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.8rem 0.9rem;
}

#chatbox-input button {
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #ef463a, var(--brand));
    color: white;
    padding: 0 1rem;
    min-width: 72px;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background: #d0d5dd;
    border-radius: 999px;
}

@media (max-width: 1199.98px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--line);
    }

    .user-chip,
    .btn-brand {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 991.98px) {
    .display-hero {
        font-size: 2.45rem;
    }

    .login-main,
    .login-side {
        padding: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    html {
        font-size: 14px;
    }

    .page-shell {
        padding-top: 0.4rem;
    }

    .hero-modern {
        padding-top: 1rem;
    }

    .display-hero {
        font-size: 2rem;
    }

    .forum-head,
    .event-card .event-header,
    .forum-toolbar,
    .page-toolbar,
    .search-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .forum-image {
        max-width: 100%;
    }

    #chat-toggle-btn {
        right: 18px;
        bottom: 18px;
    }

    #chatbox-wrapper {
        right: 12px;
        bottom: 88px;
    }
}
