:root {
    --brand-blue: #003da0;
    --brand-blue-dark: #002d78;
    --brand-blue-light: #eaf1fd;
    --text-main: #1f2329;
    --text-sub: #646a73;
    --border-light: #e5e8ee;
    --bg-page: #ffffff;
    --bg-soft: #f7f9fc;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    min-width: 320px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
}

.container-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border-light);
}

.site-nav .container-page {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    min-height: 64px;
    gap: 8px 16px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--brand-blue);
    white-space: nowrap;
}

.nav-logo .logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand-blue) 0%, #1a66e0 100%);
    color: #fff;
    font-size: 15px;
    flex-shrink: 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background-color: #fff;
    color: var(--text-main);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-btn:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background-color: var(--brand-blue-light);
}

.nav-btn.nav-btn-primary {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
}

.nav-btn.nav-btn-primary:hover {
    background-color: var(--brand-blue-dark);
    color: #fff;
}

.nav-btn svg {
    display: none;
}

.nav-btn.entry-admin svg,
.nav-btn.entry-member svg,
.nav-btn.entry-bbs svg {
    display: inline-block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.nav-state {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.user-dropdown {
    position: relative;
}

.user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.user-trigger:hover,
.user-dropdown:hover .user-trigger {
    border-color: var(--brand-blue);
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-blue) 0%, #1a66e0 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    color: var(--text-main);
}

.user-caret {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--text-sub);
    flex-shrink: 0;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 260px;
    padding: 8px;
    background-color: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(31, 35, 41, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s ease;
}

.user-dropdown:hover .dropdown-panel,
.user-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-main);
}

.dropdown-item .dropdown-label {
    color: var(--text-sub);
    flex-shrink: 0;
}

.dropdown-item .dropdown-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-light);
    margin: 6px 4px;
}

.dropdown-item.dropdown-logout {
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    color: #d4380d;
}

.dropdown-item.dropdown-logout:hover {
    background-color: #fff1f0;
}

.hero {
    padding: 96px 0 64px;
    text-align: center;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(0, 61, 160, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
}

.hero h1 {
    margin: 0 0 16px;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 1px;
    color: var(--text-main);
}

.hero h1 .hero-highlight {
    color: var(--brand-blue);
}

.hero .hero-sub {
    margin: 0;
    font-size: 18px;
    color: var(--text-sub);
    line-height: 1.7;
}

.hero .hero-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background-color: var(--brand-blue-light);
    color: var(--brand-blue);
    font-size: 13px;
    font-weight: 500;
}

.section-title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    color: var(--text-main);
}

.section-sub {
    margin: 0 auto 40px;
    max-width: 640px;
    font-size: 15px;
    color: var(--text-sub);
    text-align: center;
    line-height: 1.7;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-bottom: 88px;
}

.card-item {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 26px;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    background-color: #fff;
    cursor: pointer;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.card-item:hover {
    border-color: rgba(0, 61, 160, 0.35);
    box-shadow: 0 12px 32px rgba(0, 61, 160, 0.08);
    transform: translateY(-4px);
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-blue) 0%, #1a66e0 100%);
    color: #fff;
    margin-bottom: 18px;
}

.card-item h3 {
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 600;
    color: var(--text-main);
}

.card-item p {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.8;
    flex-grow: 1;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--brand-blue);
}

.card-link .card-arrow {
    transition: transform 0.2s ease;
}

.card-item:hover .card-link .card-arrow {
    transform: translateX(4px);
}

.faq {
    padding: 72px 0 88px;
    background-color: var(--bg-soft);
    border-top: 1px solid var(--border-light);
}

.faq-list {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background-color: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.faq-item[open] {
    border-color: rgba(0, 61, 160, 0.35);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary .faq-chevron {
    flex-shrink: 0;
    color: var(--text-sub);
    transition: transform 0.25s ease;
}

.faq-item[open] summary .faq-chevron {
    transform: rotate(180deg);
}

.faq-item .faq-answer {
    padding: 0 20px 18px;
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.85;
}

#agreementModal {
    z-index: 3000;
}

.org-select-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background-color: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.org-select-item:hover,
.org-select-item.selected {
    border-color: var(--brand-blue);
    background-color: var(--brand-blue-light);
}

.org-select-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.org-select-sub {
    font-size: 13px;
    color: var(--text-sub);
}

.agreement-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-sub);
}

.agreement-row a {
    color: var(--brand-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.agreement-row a:hover {
    color: var(--brand-blue-dark);
}

.agreement-link {
    color: var(--brand-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.agreement-link:hover {
    color: var(--brand-blue-dark);
}

.page-footer {
    margin-top: auto;
    padding: 28px 0;
    border-top: 1px solid var(--border-light);
    background-color: #fff;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 12px;
    color: var(--text-sub);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-links a {
    color: var(--text-sub);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--brand-blue);
}

@media (max-width: 992px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 64px 0 48px;
    }

    .hero h1 {
        font-size: 30px;
    }

    .hero .hero-sub {
        font-size: 16px;
    }

    .cards {
        grid-template-columns: 1fr;
        padding-bottom: 64px;
    }

    .faq {
        padding: 56px 0 64px;
    }

    .section-title {
        font-size: 24px;
    }
}

@media (max-width: 768px) {

    .nav-logo-sub {
        display: none;
    }

    .user-name,
    .user-caret {
        display: none;
    }

    .user-trigger {
        padding: 5px;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 576px) {

    .site-nav .container-page {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        min-height: 56px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .nav-logo {
        flex-shrink: 0;
        font-size: 15px;
        gap: 6px;
    }

    .nav-actions,
    .nav-state {
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 6px;
    }

    .nav-btn {
        padding: 6px;
        border-radius: 6px;
    }

    .nav-btn .nav-btn-text {
        display: none;
    }

    .nav-btn svg {
        display: block;
        width: 16px;
        height: 16px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-overlay-box {
    text-align: center;
}

.login-overlay-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #1677ff;
    border-radius: 50%;
    animation: login-overlay-spin 0.8s linear infinite;
}

@keyframes login-overlay-spin {
    to {
        transform: rotate(360deg);
    }
}

.login-overlay-text {
    color: #666;
    font-size: 14px;
}
