:root {
    --itct-primary: #5a879a;
    --itct-dark: #456878;
    --itct-light: #8db7c8;
    --itct-coral: #f2b39b;
    --itct-cream: #faf4ef;
    --itct-success: #69b578;
    --itct-warning: #f3be63;
    --itct-danger: #e97a7a;
    --itct-radius: 1.5rem;
    --itct-shadow: 0 16px 40px rgba(69, 104, 120, .12);
}

body {
    min-height: 100vh;
    color: #294653;
    font-family: Inter, sans-serif;
    background: radial-gradient(circle at 8% 2%, rgba(242, 179, 155, .25), transparent 30%),
        radial-gradient(circle at 95% 15%, rgba(141, 183, 200, .3), transparent 26%), #f8fbfc;
}

h1, h2, h3, h4, h5, h6, .brand { font-family: Manrope, sans-serif; }
.navbar-brand { color: var(--itct-dark); }
.sidebar { width: 260px; background: rgba(255, 255, 255, .82); backdrop-filter: blur(18px); }
.sidebar { overflow-y: auto; }
.content-shell { min-width: 0; min-height: 100vh; max-width: 100%; }
.app-card { border: 0; border-radius: var(--itct-radius); box-shadow: var(--itct-shadow); background: rgba(255,255,255,.92); }
.stat-icon { width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 1rem; color: var(--itct-dark); background: var(--itct-cream); }
.btn-primary { --bs-btn-bg: var(--itct-primary); --bs-btn-border-color: var(--itct-primary); --bs-btn-hover-bg: var(--itct-dark); --bs-btn-hover-border-color: var(--itct-dark); }
.form-control { min-height: 3rem; border-radius: .9rem; }
.form-check-input:checked { background-color: var(--itct-primary); border-color: var(--itct-primary); }
.nav-link { color: #63808d; border-radius: .9rem; }
.nav-link:hover, .nav-link.active { color: var(--itct-dark); background: var(--itct-cream); }
.nav-section-label { padding-inline: .9rem; font-size: .68rem; letter-spacing: .1em; }
.metric-value { font-family: Manrope, sans-serif; font-size: clamp(1.4rem, 2.6vw, 2.2rem); font-weight: 800; letter-spacing: -.04em; }
.workspace-section { animation: rise-in .45s ease both; }
.table tbody tr { transition: background-color .18s ease, transform .18s ease; }
.table tbody tr:hover { background: rgba(141, 183, 200, .08); }
.chart-wrap { position: relative; min-height: 290px; }
.soft-panel { padding-block: 1.25rem; border-bottom: 1px solid rgba(69, 104, 120, .12); }
.soft-panel:last-child { border-bottom: 0; }
.metric-card { padding-inline: 1rem; border: 0; border-radius: 1.25rem; background: rgba(255,255,255,.72); box-shadow: 0 10px 26px rgba(69, 104, 120, .08); }
.table-responsive { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-radius: 1rem; }
.table-responsive > .table { min-width: 720px; }
.modal-content { overflow: hidden; }
.modal-body { padding-top: .25rem; }
.modal-dialog-scrollable .modal-body { max-height: calc(100vh - 9rem); overflow-y: auto; }
.leaderboard-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: .75rem; min-height: 245px; padding-top: 1rem; }
.podium-member { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; color: #294653; }
.podium-member span { font-size: .86rem; color: #63808d; }
.podium-avatar-wrap { position: relative; display: grid; place-items: center; padding: .35rem; border-radius: 50%; background: linear-gradient(135deg, #fff, var(--itct-cream)); box-shadow: 0 14px 35px rgba(69, 104, 120, .16); }
.podium-avatar-wrap .avatar { width: 4.25rem; height: 4.25rem; font-size: 1.3rem; }
.podium-rank { position: absolute; right: -.2rem; bottom: -.2rem; width: 1.8rem; height: 1.8rem; display: grid; place-items: center; border-radius: 50%; background: var(--itct-warning); color: #fff !important; font-weight: 800; box-shadow: 0 8px 16px rgba(243, 190, 99, .32); }
.rank-1 { order: 2; transform: translateY(-2rem); }
.rank-1 .podium-avatar-wrap { outline: .35rem solid rgba(243, 190, 99, .35); }
.rank-2 { order: 1; }
.rank-3 { order: 3; }
.other-participants { padding: 1rem; border-radius: 1.25rem; background: rgba(255, 255, 255, .78); }

@keyframes rise-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.mobile-nav { background: rgba(255,255,255,.94); backdrop-filter: blur(16px); box-shadow: 0 -8px 30px rgba(69,104,120,.1); }
.app-offcanvas { width: 280px; background: rgba(255,255,255,.96); backdrop-filter: blur(18px); }
.app-offcanvas .offcanvas-body { overflow-y: auto; }
.login-panel { max-width: 440px; }
.avatar { width: 2.5rem; height: 2.5rem; display: inline-grid; place-items: center; border-radius: 50%; background: var(--itct-light); color: #fff; font-weight: 700; }

@media (max-width: 767.98px) {
    .content-shell { width: 100%; padding-bottom: 5.5rem; overflow-x: hidden; }
    .app-card { border-radius: 1.25rem; }
    .display-6 { font-size: 1.75rem; }
    .metric-value { font-size: 1.45rem; }
    .chart-wrap { min-height: 250px; }
    .modal-dialog { margin: .75rem; }
    .modal-dialog-scrollable .modal-body { max-height: calc(100vh - 7rem); }
    .leaderboard-podium { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; min-height: 210px; width: 100%; overflow: hidden; }
    .podium-avatar-wrap .avatar { width: 3.35rem; height: 3.35rem; }
    .podium-member strong { font-size: .9rem; }
    .podium-member span { font-size: .75rem; }
    .rank-1 { transform: translateY(-1.2rem); }
    .table-responsive { max-width: calc(100vw - 2rem); }
    .table-responsive > .table { width: 640px; min-width: 640px; }
}

@media (min-width: 768px) {
    .content-shell { width: calc(100% - 260px); margin-left: 260px; }
}
