:root {
    --primary: #003153;
    --primary-hover: #006db9;
    --secondary: #fafafa;
    --bg-grad-1: #0b67a6;
    --bg-grad-2: #033554;
    --muted: #6b7785;
    --card-bg: #ffffff;
    --soft: #f4f6f8;
    --border: #e6edf2;
    --radius: 16px;
    --text-dark: #1a1a1a;
    --danger: #dc3545;
    --success: #16a34a;
    --warning: #f59e0b;
    --shadow: rgba(0, 0, 0, 0.06);
    --shadow-strong: rgba(0, 0, 0, 0.15);
    --focus-ring: rgba(7, 110, 145, 0.05);
    --backdrop: rgba(0, 0, 0, 0.45);
    --transparent: transparent;
    --scrollbar-size: 13px;
    --scrollbar-track: linear-gradient(
        180deg,
        rgba(0, 49, 83, 0.16) 0%,
        rgba(0, 49, 83, 0.06) 100%
    );
    --scrollbar-track-gloss: linear-gradient(
        90deg,
        rgba(245, 158, 11, 0.2) 0%,
        rgba(255, 255, 255, 0) 42%
    );
    --scrollbar-track-outline: rgba(0, 49, 83, 0.18);
    --scrollbar-thumb: linear-gradient(
        180deg,
        var(--primary-hover) 0%,
        var(--bg-grad-1) 48%,
        var(--primary) 100%
    );
    --scrollbar-thumb-hover: linear-gradient(
        180deg,
        #1884cf 0%,
        #0b67a6 48%,
        #002f4f 100%
    );
    --scrollbar-thumb-active: linear-gradient(180deg, #0b67a6 0%, #003153 100%);
    --scrollbar-thumb-border: rgba(255, 255, 255, 0.62);
    --scrollbar-thumb-shadow: rgba(0, 49, 83, 0.34);
}

body {
    background: var(--soft);
    color: var(--text-dark);
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial;
}

/* Global scrollbar style */
html,
body,
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 49, 83, 0.72) rgba(0, 49, 83, 0.12);
}

html,
body {
    scrollbar-gutter: stable;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: var(--scrollbar-size);
    height: var(--scrollbar-size);
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    border-radius: 999px;
    background-image: var(--scrollbar-track), var(--scrollbar-track-gloss);
    box-shadow:
        inset 0 0 0 1px var(--scrollbar-track-outline),
        inset 0 8px 16px rgba(0, 49, 83, 0.11);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    border-radius: 999px;
    border: 2px solid var(--scrollbar-thumb-border);
    background-image: var(--scrollbar-thumb);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.35),
        inset 0 -10px 14px rgba(0, 49, 83, 0.2),
        0 0 0 1px rgba(0, 49, 83, 0.12),
        0 6px 14px var(--scrollbar-thumb-shadow);
    transition:
        background-image 0.2s ease,
        box-shadow 0.2s ease;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
    background-image: var(--scrollbar-thumb-hover);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.45),
        inset 0 -10px 14px rgba(0, 49, 83, 0.24),
        0 0 0 1px rgba(0, 49, 83, 0.15),
        0 9px 18px rgba(0, 109, 185, 0.35);
}

html::-webkit-scrollbar-thumb:active,
body::-webkit-scrollbar-thumb:active,
*::-webkit-scrollbar-thumb:active {
    background-image: var(--scrollbar-thumb-active);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.22),
        inset 0 -8px 12px rgba(0, 49, 83, 0.28),
        0 0 0 1px rgba(0, 49, 83, 0.17),
        0 3px 9px rgba(0, 49, 83, 0.28);
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
    background: transparent;
}

@media (max-width: 768px) {
    html::-webkit-scrollbar,
    body::-webkit-scrollbar,
    *::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html::-webkit-scrollbar-thumb,
    body::-webkit-scrollbar-thumb,
    *::-webkit-scrollbar-thumb,
    html::-webkit-scrollbar-thumb:hover,
    body::-webkit-scrollbar-thumb:hover,
    *::-webkit-scrollbar-thumb:hover {
        transition: none;
    }
}

a {
    text-decoration: none;
}

.profile-page {
    background: var(--card-bg);
}

.auth-page {
    padding: 30px;
}

.auth-shell {
    max-width: 1280px;
    min-height: 832px;
    position: relative;
    overflow: hidden;
}

.auth-shell > .flex-grow-1 {
    min-width: 0;
}

@media (min-width: 992px) {
    .auth-shell > .flex-grow-1 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.auth-shell-gradient {
    background: linear-gradient(to bottom, var(--bg-grad-1), var(--bg-grad-2));
}

.auth-shell .invalid-feedback {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ellipse {
    position: absolute;
    width: 557px;
    height: 557px;
    border: 1px solid var(--primary-hover);
    border-radius: 50%;
    z-index: 10;
}

.ellipse-auth-1 {
    top: var(--ellipse-top);
    left: -164px;
}

.ellipse-auth-2 {
    top: var(--ellipse-bot);
    left: -83px;
}

/* @media (max-width: 1256) {
  .ellipse-complete-1 {
    top: 727px;
    left: -164px;
  }
} */

.ellipse-complete-1 {
    top: 727px;
    left: -164px;
}

.ellipse-complete-2 {
    top: 753px;
    left: -83px;
}

#profileCompleteMain .ellipse-complete-1,
#profileCompleteMain .ellipse-complete-2 {
    pointer-events: none;
    z-index: 0;
    transition: top 0.2s ease, left 0.2s ease, opacity 0.2s ease;
}

#profileCompleteMain > :not(.ellipse-complete-1):not(.ellipse-complete-2) {
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    #profileCompleteMain .ellipse-complete-1,
    #profileCompleteMain .ellipse-complete-2 {
        display: none !important;
    }
}

#imagePreviewBox {
    width: 80px;
    height: 80px;
}

#imagePreviewBox img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--card-bg);
    box-shadow: 0 6px 18px var(--shadow-strong);
}

#imagePreviewBox button {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: var(--danger);
    color: var(--card-bg);
    text-align: center;
    line-height: 18px;
    cursor: pointer;
}

.verify {
    display: flex;
    justify-content: space-between;
    width: 413px;
    height: 60px;
}

.verify input {
    width: 54px;
    height: 60px;
    padding: 24px 16px;
    border-radius: 16px;
    border: 1px solid var(--primary);
}

.bg-hero {
    background: linear-gradient(
        180deg,
        var(--primary-hover) 0%,
        var(--bg-grad-2) 80%,
        var(--primary) 100%
    );
}

.auth-left-panel {
    isolation: isolate;
}

@media (min-width: 768px) {
    .auth-left-panel {
        background-image: var(--auth-left-bg-image-tablet, var(--auth-left-bg-image-mobile)) !important;
    }
}

@media (min-width: 992px) {
    .auth-left-panel {
        background-image: var(--auth-left-bg-image-desktop, var(--auth-left-bg-image-tablet)) !important;
    }
}

.auth-left-panel__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.auth-left-panel__content {
    position: relative;
    z-index: 11;
}

.input-focus {
    border-color: var(--primary);
}

.input-focus:focus-within {
    border-color: var(--bg-grad-1) !important;
    box-shadow: 0 0 0 6px var(--focus-ring) !important;
}

.hero-content {
    max-width: 453px;
}

.hero-title {
    font-size: 32px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 18px;
}

.btn-cta {
    width: 116px;
    height: 39px;
    border-radius: 12px;
    background: var(--primary);
}

.content-narrow {
    max-width: 413px;
}

.text-brand {
    color: var(--primary);
}

.link-brand {
    color: var(--primary);
}

.btn-primary-fill {
    height: 51px;
    border-radius: 16px;
    background: var(--primary);
    color: var(--card-bg);
}

.form-check-input-lg {
    width: 18px;
    height: 18px;
}

.modal-xl-wide {
    max-width: 1300px;
}

.modal-scrollable {
    max-height: 75vh;
    overflow-y: auto;
}

.logo-badge {
    width: 55px;
    height: 55px;
}

.social-tile {
    width: 96px;
    height: 64px;
    background: var(--secondary);
}

/* Profile */
.app-container {
    max-width: 1280px;
    margin: 22px auto;
    padding: 18px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 12px 18px;
    box-shadow: 0 1px 0 var(--shadow);
    border: 1px solid var(--shadow);
}
.profile-wrapper {
    position: relative;
    display: inline-block;
}

.top_profile {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.avatar-modal-footer {
    justify-content: space-between;
}

.btn-outline-primary {
    border-color: var(--border);
}
.btn-color-primary {
    color: #3783f5;
}

.custom-btn {
    --bs-btn-font-weight: 400;
    --bs-btn-line-height: 1.5;
    display: inline-block;
    font-size: var(--bs-btn-font-size);
    font-weight: var(--bs-btn-font-weight);
    line-height: var(--bs-btn-line-height);
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    background: transparent;
    border: none;
}

.hover-scale-1 {
    transition: 0.3s;
}
.hover-scale-1:hover {
    transform: scale(1.1);
}
.modal .btn-close {
    --bs-btn-close-bg: none;
    background: none;
    width: 1.2rem;
    height: 1.2rem;
}

.modal .btn-close::before {
    content: "✕";
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--bg-grad-1);
    line-height: 1;
}

.modal .btn-close:hover::before {
    color: var(--primary-hover);
}

.arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-dark);
    border-bottom: 2px solid var(--text-dark);
    transform: rotate(45deg);
    margin-top: 4px;
    transition: 0.3s;
}

/* Dropdown */

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--transparent);
}

.profile-dropdown {
    position: absolute;
    top: 52px;
    right: 0;
    width: 250px;
    background: var(--card-bg);
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: 0 4px 12px var(--shadow-strong);
    z-index: 1200;
    max-height: min(70dvh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.profile-dropdown li {
    list-style: none;
}

.profile-dropdown li a,
.profile-dropdown li .profile-dropdown-button {
    display: block;
    padding: 10px 15px;
    color: var(--text-dark);
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    font: inherit;
    text-decoration: none;
    transition: 0.2s;
}

.profile-dropdown li a:hover,
.profile-dropdown li .profile-dropdown-button:hover,
.profile-dropdown li .profile-dropdown-button:focus-visible {
    background: var(--soft);
}

@supports not (height: 100dvh) {
    .profile-dropdown {
        max-height: min(70vh, 420px);
    }
}

.show .arrow {
    transform: rotate(225deg);
}

.card-radius {
    border-radius: var(--radius);
}

.profile-card {
    z-index: 9;
    overflow: visible;
}

.profile-cover {
    height: 220px;
    border-radius: var(--radius) var(--radius) 0 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.profile-body {
    padding: 26px;
    padding-top: 14px;
}

.profile-body .avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--card-bg);
    box-shadow: 0 6px 18px var(--shadow-strong);
    margin-top: -60px;
}

.profile_top .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--card-bg);
    box-shadow: 0 6px 18px var(--shadow-strong);
    margin-top: -60px;
}

.user-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.user-meta {
    color: var(--muted);
    margin-bottom: 10px;
}

.serial-badge {
    display: inline-block;
    background: var(--soft);
    border-radius: 12px;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--muted);
    border: 1px solid var(--shadow);
}

.socials .btn {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.social-btn {
    cursor: pointer;
}

.info-card {
    padding: 22px;
}

.info-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.info-label {
    font-weight: 600;
    display: block;
}
div.dropdown {
    position: relative;
    z-index: 2;
}
.modal-content {
    overflow: visible !important;
}

.connections-body {
    overflow: visible !important;
}

.connection-item {
    overflow: visible !important;
    position: relative;
    z-index: 1;
}

.connection-item .dropdown {
    position: static; /* CRITICAL */
}

.dropdown-menu {
    z-index: 9999 !important;
}

.info-value a {
    color: var(--primary-hover);
    text-decoration: none;
}

.small-card {
    padding: 18px;
    border-radius: 14px;
}

.small-card .title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.connection-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 4px;
}

.connection-item img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

@media (min-width: 992px) {
    .left-col {
        padding-right: 8px;
    }

    .right-col {
        padding-left: 8px;
    }
}

@media (max-width: 991.98px) {
    .profile-cover {
        height: 180px;
    }

    .profile-body .avatar {
        width: 96px;
        height: 96px;
        margin-top: -48px;
        border-width: 5px;
    }
}

@media (max-width: 575.98px) {
    .profile-body .avatar {
        width: 84px;
        height: 84px;
        margin-top: -42px;
        border-width: 4px;
    }

    .profile-body {
        padding: 18px;
    }
}

.card-shadow {
    box-shadow: 0 6px 22px var(--shadow);
}
.small.muted-2 strong i {
    font-size: 20px;
    margin-right: 5px;
}

.muted-2 {
    color: var(--muted);
    font-size: 11px;
}

.font-xsm {
    font-size: 8px;
}

.hr-like {
    height: 1px;
    background: var(--shadow);
    margin: 12px 0;
    border-radius: 2px;
}

.social-outline {
    border: 1px solid var(--focus-ring);
    background: var(--card-bg);
}

@media (min-width: 992px) {
    .right-sticky {
        position: sticky;
        top: 28px;
    }
}

.nav-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 14px 22px;
    border-radius: 20px;
}

.logo {
    width: 36px;
}

.tab-btn {
    background: var(--transparent);
    border: none;
    font-size: 15px;
    color: var(--primary);
    padding: 8px 14px;
    border-radius: 10px;
}

.tab-btn.active {
    color: var(--primary-hover);
    font-weight: 700;
}

.post-btn {
    background: var(--bg-grad-2);
    color: var(--card-bg);
    border: none;
    padding: 8px 28px;
    border-radius: 10px;
}
.search-wrapper {
    position: relative;
}

.search-trigger {
    cursor: pointer;
    font-size: 18px;
}

.search-dropdown {
    position: absolute;
    top: 38px;
    right: 0;
    width: 320px;
    background: #1e1e1e;
    padding: 12px;
    border-radius: 14px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.25s ease;
    z-index: 999;
}

.search-dropdown.active {
    transform: translateY(0);

    opacity: 1;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding-right: 40px;
}

.search-box .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    z-index: 999;
}
@media (max-width: 600px) {
    .search-dropdown {
        left: -55px;
    }
}

.js-search-input {
    padding-left: 20px;
}

.search-dropdown .item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.search-dropdown .item:hover {
    background: #f5f7fb;
}

.search-dropdown .type {
    font-size: 12px;
    opacity: 0.6;
}

.mobile-actions-search,
.mobile-actions-lang {
    display: none;
}

.mobile-actions-search {
    padding: 6px 12px;
}
.dropdown-menu.dropdown-menu-end.mobile-actions-menu.show {
    left: -82.1806px !important;
    right: auto !important;
    top: 48px !important;
    transform: none !important;
}
.mobile-actions-menu {
    overflow: visible;
}

.mobile-actions-search .search-box {
    width: 100%;
    min-width: 220px;
    max-width: 70vw;
}

.mobile-actions-search .search-box input {
    width: 100%;
}

.lang-code {
    min-width: 28px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 4px;
}

.icon {
    font-size: 20px;
    opacity: 0.8;
}

#notifiDropDown {
    opacity: 1;
}

.profile,
.top_profile {
    display: flex;
    align-items: center;
    gap: 4px;
}

.top_profile .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.profile .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.arrow {
    font-size: 14px;
    opacity: 0.6;
}

@media (max-width: 992px) {
    .nav-box {
        flex-direction: column;
        gap: 12px;
        /* text-align: center; */
    }

    .left {
        justify-content: center;
        width: 100%;
    }

    .post-btn {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }
}

@media (max-width: 500px) {
    .desktop-search {
        display: none !important;
    }

    .mobile-actions-search {
        display: block;
    }
}

@media (max-width: 400px) {
    .lang-dropdown {
        display: none !important;
    }

    .mobile-actions-lang {
        display: block;
    }
}

@media (max-width: 1192px) {
    .left,
    .post-btn {
        display: none !important;
    }

    .burger-btn {
        display: block !important;
    }
}

@media (min-width: 1192px) {
    .burger-btn {
        display: none !important;
    }
}

.flex-1 {
    flex: 1;
}

.fw-600 {
    font-weight: 600;
}

.opacity-80 {
    opacity: 0.8;
}

.auth-hidden {
    display: none;
}

.complete-shell {
    max-width: 1280px;
    min-height: 1000px;
    background: var(--card-bg);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.complete-shell * {
    margin: 0;
    padding: 0;
}

.complete-shell a {
    text-decoration: none;
}

.input-box {
    height: 48px;
    /* border: 1px solid var(--primary); */
    border-radius: 16px;
    padding-left: 20px;
}

.upload-box {
    cursor: pointer;
}

.image-preview-box {
    position: relative;
    width: 100px;
    margin-top: 10px;
}

.image-preview {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
}

.image-remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: var(--danger);
    color: var(--card-bg);
    cursor: pointer;
    line-height: 11px;
}

.step div {
    width: 28px;
    height: 28px;
    background: var(--focus-ring);
    color: var(--primary);
}

.step strong {
    color: var(--primary);
}

.step.active div {
    background: var(--primary-hover);
    color: var(--card-bg);
}

.step.active strong {
    color: var(--primary-hover);
}

@media (min-width: 1292px) {
    .d-xlm-block {
        display: block !important;
    }
}

.max-413 {
    max-width: 413px;
}

.primary-heading {
    color: var(--primary);
}

.input-primary {
    border: 1px solid var(--primary);
}

.code-box {
    width: 90px;
    height: 48px;
    border-radius: 16px;
    /* border: 1px solid var(--primary); */
    text-align: center;
}

.btn-complete {
    background: var(--primary);
    height: 51px;
    border-radius: 16px;
    color: var(--card-bg);
}

/* events */

.event-card {
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 24px;
    background: var(--card-bg);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.event-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-hover);
}

.event-info small {
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.desc-title {
    font-size: 14px;
    font-weight: 600;
    margin-top: 16px;
    color: var(--primary-hover);
}

.event-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 24px;
}

/* announcement */

.blue-btn {
    background: var(--bg-grad-2);
    padding: 10px 22px;
    color: var(--card-bg);
    border-radius: 10px;
    border: none;
}
.blue-btn:hover {
    background: var(--bg-grad-1);
}

/* news */

.news-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
    transition: 0.2s;
    cursor: pointer;
}

.news-card:hover {
    box-shadow: 0 4px 14px var(--shadow);
}

.news-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 12px;
    line-height: 1.3;
}

.news-meta {
    font-size: 14px;
    color: var(--muted);
}

.news-filter {
    border: 1px solid var(--soft);
}

.news-filter .form-control,
.news-filter .form-select {
    border-radius: 10px;
}

.news-filter .input-group-text {
    border-radius: 10px 0 0 10px;
}

.meta-row {
    margin-top: 14px;
}

/* Resources and Training */

.resource-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    background: var(--card-bg);
    transition: 0.2s;
}

.resource-card:hover {
    box-shadow: 0 4px 14px var(--shadow);
}

.resource-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.resource-text {
    color: var(--muted);
    font-size: 14px;
    margin-top: 6px;
}

.pdf-btn {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 8px 0;
    background: var(--secondary);
    color: var(--bg-grad-1);
    font-weight: 500;
    margin-top: 16px;
    transition: 0.2s;
}

.pdf-btn:hover {
    background: var(--border);
}

/* Right Search Panel */
.search-panel {
    border: 1px dashed var(--border);
    border-radius: 16px;
    padding: 22px;
    background: var(--card-bg);
}

.search-btn {
    width: 100%;
    background: var(--primary);
    color: var(--card-bg);
    padding: 10px;
    border-radius: 10px;
    border: none;
    margin-top: 12px;
}

/* modal */

.top-header {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

/* SEARCH INPUT */
.search-box {
    width: 100%;
    font-size: 15px;
}
.search-box input {
    padding-left: 40px;
}

.search-icon {
    width: 20px;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 17px;
}

/* EVENT CARD */
.event-card {
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 22px;
    height: 100%;
    transition: 0.2s;
}

.event-card:hover {
    box-shadow: 0 6px 20px var(--shadow);
}

.event-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-hover);
}

.event-info small {
    font-size: 14px;
    color: var(--muted);
}

.modal-box {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 28px;
    border: 1px solid var(--border);
}

/* Search */
.search-input {
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 10px 14px;
    padding-left: 42px;
    width: 100%;
    font-size: 15px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    color: var(--muted);
}

/* Tabs */
.connection-tab {
    padding: 10px;
    font-weight: 600;
    width: 100%;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--secondary);
}

.connection-tab.active {
    background: var(--primary-hover);
    color: var(--card-bg);
    border-color: var(--primary-hover);
}

/* Connection Item */
.connection-item {
    display: flex;
    align-items: center;
    padding: 14px 8px;
    border-bottom: 1px solid var(--border);
}

.connection-item img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 14px;
}

.connection-item .name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.connection-item .faculty {
    font-size: 14px;
    color: var(--muted);
}

.icon-btn {
    border: 1px solid var(--border);
    background: var(--card-bg);
    border-radius: 8px;
    padding: 6px 10px;
    color: var(--primary-hover);
    transition: 0.2s;
}

.icon-btn:hover {
    background: var(--soft);
    border-color: var(--primary-hover);
}

/* custom alert */

.custom-alert-backdrop {
    position: fixed;
    inset: 0;
    background: var(--backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.custom-alert {
    background: var(--card-bg);
    width: 100%;
    max-width: 420px;
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    animation: caPop 0.25s ease;
}

.custom-alert-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.custom-alert-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

@keyframes caPop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Types */
.ca-success {
    color: var(--success);
}
.ca-error {
    color: var(--danger);
}
.ca-warning {
    color: var(--warning);
}

.sa-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    display: block;
}

.sa-icon circle {
    fill: none;
    stroke-width: 3;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: sa-circle 0.6s ease-out forwards;
}

.sa-icon path,
.sa-icon line {
    stroke-width: 4;
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: sa-line 0.4s ease-out forwards;
    animation-delay: 0.3s;
}

/* SUCCESS */
.sa-success circle,
.sa-success path {
    stroke: var(--success);
}

/* ERROR */
.sa-error circle,
.sa-error line {
    stroke: var(--danger);
}

/* WARNING */
.sa-warning circle,
.sa-warning line {
    stroke: var(--warning);
}

/* Animations */
@keyframes sa-circle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes sa-line {
    to {
        stroke-dashoffset: 0;
    }
}

#bottomCard .card {
    min-height: 300px;
}

/* Lively mode (messages/support excluded via body class) */
body.view-lively {
    overflow-x: hidden;
}

body.view-lively .navbar-wrapper,
body.view-lively .topbar,
body.view-lively .card,
body.view-lively .event-card,
body.view-lively .news-card,
body.view-lively .job-card,
body.view-lively .resource-card,
body.view-lively .search-panel,
body.view-lively .news-filter,
body.view-lively .list-group-item,
body.view-lively .connection-item,
body.view-lively .info-row,
body.view-lively .social-btn {
    transition:
        transform 0.24s ease,
        box-shadow 0.24s ease,
        border-color 0.24s ease;
}

body.view-lively .card:hover,
body.view-lively .event-card:hover,
body.view-lively .news-card:hover,
body.view-lively .job-card:hover,
body.view-lively .resource-card:hover,
body.view-lively .search-panel:hover,
body.view-lively .news-filter:hover,
body.view-lively .list-group-item:hover,
body.view-lively .connection-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.09);
}

body.view-lively .form-control,
body.view-lively .form-select,
body.view-lively .btn,
body.view-lively .button-primary,
body.view-lively .button-primary-outline,
body.view-lively .button-primary-soft,
body.view-lively .tab-btn {
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease;
}

body.view-lively .form-control:focus,
body.view-lively .form-select:focus {
    box-shadow: 0 0 0 4px rgba(0, 49, 83, 0.08);
}

body.view-lively .btn:hover,
body.view-lively .button-primary:hover,
body.view-lively .button-primary-outline:hover,
body.view-lively .button-primary-soft:hover,
body.view-lively .tab-btn:hover {
    transform: translateY(-1px);
}

body.view-lively .modal.fade .modal-dialog {
    transform: translateY(12px) scale(0.98);
    transition: transform 0.26s ease;
}

body.view-lively .modal.show .modal-dialog {
    transform: translateY(0) scale(1);
}

/* Modal style aligned with messages/index design */
.modal {
    --modal-viewport-gap: clamp(0.75rem, 2vh, 1.5rem);
    position: fixed;
    inset: 0;
}

.modal.show {
    display: grid !important;
    place-items: center;
    padding: var(--modal-viewport-gap);
    overflow: hidden;
}

/* Keep modal centered during Bootstrap hide transition (show class removed before display:none). */
.modal.fade:not(.show)[style*="display: block"] {
    display: grid !important;
    place-items: center;
    padding: var(--modal-viewport-gap);
    overflow: hidden;
}

.modal .modal-dialog {
    margin: 0 auto !important;
    width: calc(100vw - (var(--modal-viewport-gap) * 2));
    max-width: var(--bs-modal-width);
}

.modal .modal-content {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.24);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    width: 100%;
    max-height: calc(100dvh - (var(--modal-viewport-gap) * 2));
    display: flex;
    flex-direction: column;
}

.modal .modal-header {
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    color: #f8fafc;
}

.modal .modal-title {
    font-weight: 700;
    color: #f8fafc;
}

.modal .btn-close {
    filter: invert(1) grayscale(1);
}

.modal .modal-body {
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.modal .modal-footer {
    border-top: 1px solid #dbe3ef;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f5ff 100%);
}

.modal .modal-header,
.modal .modal-footer {
    flex-shrink: 0;
}

/* Lively structural shell for site pages */
body.view-lively .site-stage {
    position: relative;
    margin-top: 8px;
}

body.view-lively .site-stage-lively {
    position: relative;
    isolation: isolate;
    padding: 18px 18px 24px;
    border-radius: 24px;
    border: 1px solid rgba(0, 49, 83, 0.14);
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.96) 0%,
        rgba(240, 248, 255, 0.9) 100%
    );
    box-shadow: 0 24px 46px rgba(0, 49, 83, 0.08);
    overflow: hidden;
}

body.view-lively .site-stage-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.55;
    z-index: -1;
    pointer-events: none;
}

body.view-lively .site-stage-glow-left {
    top: -140px;
    left: -90px;
    background: radial-gradient(
        circle,
        rgba(0, 109, 185, 0.22) 0%,
        rgba(0, 109, 185, 0) 70%
    );
}

body.view-lively .site-stage-glow-right {
    top: -170px;
    right: -120px;
    background: radial-gradient(
        circle,
        rgba(3, 53, 84, 0.18) 0%,
        rgba(3, 53, 84, 0) 72%
    );
}

body.view-lively .site-hero {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(0, 49, 83, 0.12);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.94) 0%,
        rgba(247, 251, 255, 0.94) 100%
    );
    box-shadow: 0 10px 28px rgba(0, 49, 83, 0.06);
}

body.view-lively .site-hero-copy {
    min-width: 0;
}

body.view-lively .site-hero-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(0, 49, 83, 0.2);
    background: rgba(0, 49, 83, 0.08);
    color: var(--primary);
    text-decoration: none;
    transition:
        background 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
    flex-shrink: 0;
}

body.view-lively .site-hero-back:hover {
    background: rgba(0, 49, 83, 0.1);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 49, 83, 0.08);
}

body.view-lively .site-hero-back:focus-visible {
    outline: 2px solid rgba(0, 49, 83, 0.35);
    outline-offset: 2px;
}

body.view-lively .site-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 49, 83, 0.24);
    background: rgba(0, 49, 83, 0.06);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

body.view-lively .site-hero-title {
    margin: 10px 0 0;
    font-size: clamp(22px, 3.2vw, 34px);
    line-height: 1.15;
    font-weight: 800;
    color: var(--primary);
}

body.view-lively .site-hero-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(0, 49, 83, 0.18);
    background: rgba(0, 49, 83, 0.05);
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    transition:
        background 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

body.view-lively .site-hero-action:hover {
    background: rgba(0, 49, 83, 0.09);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 49, 83, 0.08);
}

body.view-lively .site-stage-inner {
    position: relative;
    z-index: 1;
}

body.view-lively .site-stage-inner > .row {
    --bs-gutter-y: 1.4rem;
}

body.view-lively .nav-box {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(246, 250, 255, 0.98) 100%
    );
    border-color: rgba(0, 49, 83, 0.16);
    box-shadow: 0 12px 26px rgba(0, 49, 83, 0.07);
}

body.view-lively #jobFilterForm,
body.view-lively #newsFilterForm,
body.view-lively .search-panel,
body.view-lively .news-filter {
    border-color: rgba(0, 49, 83, 0.16) !important;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(248, 252, 255, 0.98) 100%
    );
    box-shadow: 0 14px 30px rgba(0, 49, 83, 0.08);
}

body.view-lively .event-card,
body.view-lively .news-card,
body.view-lively .job-card,
body.view-lively .resource-card,
body.view-lively .list-group-item {
    background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
    border-color: rgba(0, 49, 83, 0.12);
}

body.view-lively .page-link {
    border-radius: 10px;
    border-color: rgba(0, 49, 83, 0.2);
    color: var(--primary);
}
.page-item.active .page-link {
    color: white;
}

body.view-lively .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

body.view-lively {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(249, 252, 255, 0.98) 100%
    );
    box-shadow: 0 8px 20px rgba(0, 49, 83, 0.06);
}

body.view-lively {
    box-shadow: 0 12px 24px rgba(0, 49, 83, 0.1);
}

body.view-lively .social-btn {
    border-color: rgba(0, 49, 83, 0.18) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%) !important;
    box-shadow: 0 10px 22px rgba(0, 49, 83, 0.07);
}

body.view-lively .social-btn:hover {
    transform: translateY(-2px);
}

body.view-lively .alert {
    border-radius: 14px;
    border-width: 1px;
    box-shadow: 0 8px 18px rgba(0, 49, 83, 0.06);
}

body.view-lively .lively-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity 0.42s ease,
        transform 0.42s ease;
    transition-delay: var(--lively-delay, 0ms);
}

body.view-lively .lively-reveal.is-visible,
body.view-lively .lively-static {
    opacity: 1;
    transform: translateY(0);
}

.site-footer {
    max-width: 1280px;
    margin: auto;
    border-top: 1px solid #e7e8ef;
    padding: 18px 0;
    text-align: center;
    /* background: #ffffff; */
}

.site-footer .copyright {
    font-size: 13px;
    color: #6b7280;
    letter-spacing: 0.2px;
}

.site-footer .brand {
    font-weight: 700;
    color: #003153;
}

.brand {
    font-weight: 700;
    color: #003153;
    text-decoration: none;
}

.brand:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    body.view-lively .site-stage-lively {
        padding: 12px 12px 18px;
        border-radius: 18px;
    }

    body.view-lively .site-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 14px;
        border-radius: 14px;
        margin-bottom: 14px;
    }

    body.view-lively .site-hero-title {
        font-size: 22px;
    }

    body.view-lively .site-hero-action {
        width: 100%;
    }

    body.view-lively .site-hero-back {
        width: 20px;
        height: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.view-lively .navbar-wrapper,
    body.view-lively .topbar,
    body.view-lively .card,
    body.view-lively .event-card,
    body.view-lively .news-card,
    body.view-lively .job-card,
    body.view-lively .resource-card,
    body.view-lively .search-panel,
    body.view-lively .news-filter,
    body.view-lively .list-group-item,
    body.view-lively .connection-item,
    body.view-lively .info-row,
    body.view-lively .social-btn,
    body.view-lively .form-control,
    body.view-lively .form-select,
    body.view-lively .btn,
    body.view-lively .button-primary,
    body.view-lively .button-primary-outline,
    body.view-lively .button-primary-soft,
    body.view-lively .tab-btn,
    body.view-lively .lively-reveal {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

.iti__country-list {
    min-width: 116px !important;
    max-height: 280px !important;
    overflow-y: auto;
}

.iti__search-container,
.iti__search-input {
    display: none !important;
}

.iti__country {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
}

.iti__country-name {
    display: none !important;
}

.iti__flag-box {
    margin-right: 0 !important;
}

.iti__dial-code {
    margin-left: 0 !important;
    color: #1f2d3d !important;
    font-weight: 600;
}

.system-notification-icons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
}

.system-notification-icons--mobile {
    margin: 10px 0 0;
    flex-wrap: wrap;
}

.system-notification-type-icon {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 999px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.system-notification-type-icon:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
}

.system-notification-type-icon__emoji {
    font-size: 18px;
    line-height: 1;
}

.system-notification-type-icon__count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    line-height: 17px;
    text-align: center;
    font-weight: 700;
    padding: 0 4px;
}

.system-notification-popup {
    position: fixed;
    inset: 0;
    z-index: 2300;
    display: grid;
    place-items: center;
    padding: 18px;
    --sn-accent: #f6c65b;
    --sn-preview-postcard-max: none;
}

body.system-notification-popup-open {
    overflow: hidden;
}

.system-notification-popup__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at top left,
            color-mix(in srgb, var(--sn-accent) 24%, transparent) 0%,
            transparent 40%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(59, 130, 246, 0.2) 0%,
            transparent 44%
        ),
        rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(12px);
}

.system-notification-popup__dialog {
    position: relative;
    width: min(1420px, calc(100vw - 36px));
    max-height: calc(100dvh - 36px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background:
        radial-gradient(
            circle at 16% 20%,
            color-mix(in srgb, var(--sn-accent) 17%, transparent),
            transparent 36%
        ),
        linear-gradient(
            145deg,
            rgba(2, 11, 25, 0.94) 0%,
            rgba(4, 26, 46, 0.9) 52%,
            rgba(2, 10, 24, 0.95) 100%
        );
    box-shadow: 0 35px 90px rgba(2, 6, 23, 0.62);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1;
    animation: snSceneIn 0.62s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.system-notification-popup__header {
    position: relative;
    z-index: 15;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(2, 11, 25, 0.52);
    backdrop-filter: blur(10px);
}

.system-notification-popup__head-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.system-notification-popup__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    place-items: center;
    font-size: 22px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.08);
}

.system-notification-popup__kicker {
    color: rgba(241, 245, 249, 0.92);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    white-space: nowrap;
}

.system-notification-popup__header-copy {
    min-width: 0;
}

.system-notification-popup__title {
    margin: 0;
    font-size: clamp(22px, 2.5vw, 34px);
    line-height: 1.12;
    font-weight: 800;
    color: #f8fafc;
    word-break: break-word;
    text-wrap: balance;
}

.system-notification-popup__meta {
    margin: 6px 0 0;
    color: rgba(226, 232, 240, 0.9);
    font-size: 13px;
}

.system-notification-popup__header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.system-notification-popup__sound,
.system-notification-popup__close {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    display: grid;
    place-items: center;
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease;
}

.system-notification-popup__close {
    font-size: 28px;
    line-height: 1;
}

.system-notification-popup__sound:hover,
.system-notification-popup__close:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.system-notification-popup__scene {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    padding: 14px 16px 16px;
}

.system-notification-popup__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 14px;
    min-height: min(72dvh, 780px);
    align-items: stretch;
}

.system-notification-popup.is-device-tablet .system-notification-popup__content,
.system-notification-popup.is-device-mobile .system-notification-popup__content {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
}

.system-notification-popup__postcard {
    position: relative;
    width: 100%;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    overflow: hidden;
    background: linear-gradient(140deg, rgba(5, 16, 32, 0.86), rgba(4, 24, 44, 0.9));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    isolation: isolate;
}

.system-notification-popup.is-device-tablet .system-notification-popup__postcard,
.system-notification-popup.is-device-mobile .system-notification-popup__postcard {
    max-width: min(100%, var(--sn-preview-postcard-max));
    margin-inline: auto;
}

.system-notification-popup__ambient-host {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: var(--sn-ambient-opacity, 0.6);
}

.system-notification-popup.is-ambient-muted .system-notification-popup__ambient-host {
    opacity: 0.16;
}

.system-notification-popup__ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.system-notification-popup__ambient--stars span,
.system-notification-popup__ambient--particles span {
    position: absolute;
    border-radius: 999px;
}

.system-notification-popup__ambient--stars span {
    background: color-mix(in srgb, var(--sn-accent) 70%, #fff);
    box-shadow: 0 0 14px color-mix(in srgb, var(--sn-accent) 72%, transparent);
    opacity: 0.45;
    animation: snStarTwinkle 3.4s ease-in-out infinite;
}

.system-notification-popup__ambient--particles span {
    bottom: -50px;
    background: color-mix(in srgb, var(--sn-accent) 58%, #fff);
    opacity: 0.58;
    animation: snParticleRise linear infinite;
}

.system-notification-popup.is-ambient-muted .system-notification-popup__ambient span {
    animation-play-state: paused;
}

.system-notification-popup__scene-wash {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.08), transparent 36%),
        radial-gradient(circle at 78% 84%, rgba(255, 255, 255, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.42) 100%);
}

.system-notification-popup__frame {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    z-index: 6;
    pointer-events: none;
}

.system-notification-popup__canvas-shell {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    will-change: transform;
    z-index: 4;
}

.system-notification-popup__canvas {
    position: relative;
    width: 100%;
    height: 100%;
}

.system-notification-popup__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.system-notification-popup__block {
    position: absolute;
    overflow: hidden;
}

.system-notification-popup__block-motion {
    width: 100%;
    height: 100%;
}

.system-notification-popup__scene.is-playing .system-notification-popup__block-motion {
    animation: snElementEnter var(--sn-enter-duration, 920ms)
        var(--sn-enter-easing, cubic-bezier(0.16, 1, 0.3, 1))
        var(--sn-enter-delay, 0ms) both;
}

.system-notification-popup__block-text {
    width: 100%;
    height: 100%;
    white-space: pre-wrap;
    line-height: 1.2;
    word-break: break-word;
}

.system-notification-popup__block-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.system-notification-popup__panel {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
    padding: 14px 14px 16px;
    overflow: auto;
    min-height: 0;
}

.system-notification-popup.is-device-tablet .system-notification-popup__panel,
.system-notification-popup.is-device-mobile .system-notification-popup__panel {
    width: 100%;
    max-width: min(100%, var(--sn-preview-postcard-max));
    margin-inline: auto;
    max-height: min(34dvh, 320px);
}

.system-notification-popup__body {
    line-height: 1.6;
    color: #f8fafc;
    font-size: 14px;
}

.system-notification-popup__body p:last-child {
    margin-bottom: 0;
}

.system-notification-popup__missed {
    border-radius: 12px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 13px;
}

.system-notification-popup__timeline {
    position: relative;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(2, 12, 26, 0.64);
    color: rgba(226, 232, 240, 0.9);
    font-size: 12px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-weight: 700;
}

.system-notification-popup__timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--sn-accent) 72%, #ffffff);
    box-shadow: 0 0 10px color-mix(in srgb, var(--sn-accent) 70%, transparent);
    animation: snTimelinePulse 1.3s ease-in-out infinite;
}

@keyframes snSceneIn {
    from {
        transform: translateY(16px) scale(0.982);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes snStarTwinkle {
    0%,
    100% {
        opacity: 0.26;
        transform: scale(0.7);
    }
    50% {
        opacity: 1;
        transform: scale(1.25);
    }
}

@keyframes snParticleRise {
    from {
        transform: translate3d(0, 46px, 0) scale(0.88);
        opacity: 0;
    }
    16% {
        opacity: 0.82;
    }
    to {
        transform: translate3d(var(--sn-drift, 0px), -100%, 0) scale(1.1);
        opacity: 0;
    }
}

@keyframes snElementEnter {
    from {
        opacity: var(--sn-enter-opacity, 0);
        transform: translate3d(var(--sn-enter-x, 0), var(--sn-enter-y, 0), 0)
            scale(var(--sn-enter-scale, 1));
        filter: blur(var(--sn-enter-blur, 0));
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0);
    }
}

@keyframes snTimelinePulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.82;
    }
    50% {
        transform: scale(1.28);
        opacity: 1;
    }
}

.system-notification-history {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.system-notification-history__item {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.system-notification-history__icon {
    font-size: 20px;
    line-height: 1;
}

.system-notification-history__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.system-notification-history__title {
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.system-notification-history__meta {
    font-size: 12px;
    color: #475569;
}

.system-notification-history__badge {
    border-radius: 999px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    flex-shrink: 0;
}

.system-notification-history__empty {
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 18px;
    color: #64748b;
}

@media (max-width: 1200px) {
    .system-notification-popup__content {
        grid-template-columns: minmax(0, 1fr);
        min-height: auto;
    }

    .system-notification-popup__panel {
        max-height: min(34dvh, 320px);
    }
}

@media (max-width: 900px) {
    .system-notification-popup {
        padding: 8px;
    }

    .system-notification-popup__dialog {
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 20px;
    }

    .system-notification-popup__header {
        padding: 10px 12px;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "copy actions"
            "brand actions";
    }

    .system-notification-popup__head-brand {
        grid-area: brand;
    }

    .system-notification-popup__header-copy {
        grid-area: copy;
    }

    .system-notification-popup__header-actions {
        grid-area: actions;
    }

    .system-notification-popup__icon {
        width: 38px;
        height: 38px;
        font-size: 19px;
    }

    .system-notification-popup__kicker {
        font-size: 10px;
    }

    .system-notification-popup__title {
        font-size: clamp(19px, 5.2vw, 25px);
    }

    .system-notification-popup__scene {
        padding: 10px;
        gap: 10px;
    }

    .system-notification-popup__timeline {
        align-self: stretch;
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .system-notification-popup__header {
        gap: 10px;
    }

    .system-notification-popup__head-brand {
        gap: 8px;
    }

    .system-notification-popup__sound,
    .system-notification-popup__close {
        width: 36px;
        height: 36px;
    }

    .system-notification-popup__close {
        font-size: 24px;
    }

    .system-notification-popup__postcard,
    .system-notification-popup__frame {
        border-radius: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .system-notification-popup__dialog,
    .system-notification-popup__timeline-dot,
    .system-notification-popup__ambient--stars span,
    .system-notification-popup__ambient--particles span,
    .system-notification-popup__scene.is-playing
        .system-notification-popup__block-motion {
        animation: none !important;
        transition: none !important;
    }
}
