/**
 * 校园认证页样式（与 pages/sign.vue 一致）
 * 使用 .sign-page-root 包裹根 DOM（SSR 首字节即有），避免依赖 useHead 给 html 加类才匹配选择器。
 * body:has(.sign-page-root) 取消全局 body min-width:1440px，无需等 JS。
 */
body:has(.sign-page-root) {
    min-width: 0 !important;
}

.sign-page-root .sign-wrap {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: #f4f5f7;
    overflow-x: clip;
}

.sign-page-root .sign-bg {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    pointer-events: none;
    padding: 0;
    width: 100%;
    overflow: hidden;
}

.sign-page-root .sign-bg-img {
    width: 100%;
    max-width: 1920px;
    max-height: min(42vh, 400px);
    height: auto;
    object-fit: contain;
    object-position: bottom center;
    display: block;
    margin: 0 auto;
    flex-shrink: 0;
}

.sign-page-root .sign-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 80px max(16px, env(safe-area-inset-right)) 200px max(16px, env(safe-area-inset-left));
}

.sign-page-root .sign-content {
    width: min(100%, 1200px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.sign-page-root .top-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.sign-page-root .title {
    text-align: center;
    width: 100%;
    color: #292524;
    font-size: 53px;
    font-family: 'PingFang SC', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.sign-page-root .search-bar-wrap {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: center;
}

.sign-page-root .search-bar-native {
    width: 100%;
    max-width: 800px;
    height: 56px;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid #e4e5e8;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    transition: border-color 0.2s;
}

.sign-page-root .search-bar-native:focus-within {
    border-color: #2970ff;
}

.sign-page-root .search-bar-native .search-bar-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    font-family: 'PingFang SC', sans-serif;
    color: #16181b;
    appearance: none;
    -webkit-appearance: none;
}

.sign-page-root .search-bar-native .search-bar-input::placeholder {
    color: #aaadb5;
}

.sign-page-root .search-bar-native .search-bar-clear {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #aaadb5;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.sign-page-root .search-bar-native .search-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.55;
}

.sign-page-root .search-bar-placeholder {
    width: 100%;
    max-width: 800px;
    height: 56px;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid #e4e5e8;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    color: #aaadb5;
    font-size: 16px;
    font-family: 'PingFang SC', sans-serif;
    user-select: none;
}

.sign-page-root .search-bar-placeholder .search-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.55;
}

.sign-page-root .search-bar {
    width: 100%;
    max-width: 800px;
}

.sign-page-root .search-bar.el-input,
.sign-page-root .search-bar .el-input {
    width: 100%;
}

.sign-page-root .search-bar .search-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.sign-page-root .search-bar .el-input__wrapper {
    height: 56px;
    border-radius: 8px !important;
    border: 1px solid #e4e5e8 !important;
    box-shadow: none !important;
    padding: 0 12px;
}

.sign-page-root .search-bar .el-input__wrapper:hover {
    border-color: #e4e5e8 !important;
    box-shadow: none !important;
}

.sign-page-root .search-bar .el-input__wrapper.is-focus {
    border-color: #2970ff !important;
    box-shadow: none !important;
}

.sign-page-root .search-bar .el-input__inner {
    font-size: 16px;
    font-family: 'PingFang SC', sans-serif;
    color: #16181b;
}

.sign-page-root .search-bar .el-input__inner::placeholder,
.sign-page-root .search-bar .el-input__inner::-webkit-input-placeholder {
    color: #aaadb5;
}

.sign-page-root .list-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.sign-page-root .list-header {
    width: 100%;
    padding: 16px 0;
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.sign-page-root .list-title {
    color: #020617;
    font-size: 24px;
    font-family: 'PingFang SC', sans-serif;
    font-weight: 500;
    line-height: 24px;
}

.sign-page-root .list-subtitle {
    color: #666b75;
    font-size: 14px;
    font-family: 'PingFang SC', sans-serif;
    font-weight: 400;
    line-height: 22px;
}

.sign-page-root .list-card {
    width: 100%;
    min-height: 320px;
    padding: 20px 0 24px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid rgba(26, 26, 26, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.sign-page-root .grid-wrap {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 4px;
    padding: 0 28px;
    box-sizing: border-box;
}

.sign-page-root .grid-item {
    min-width: 0;
    padding: 12px 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.sign-page-root .grid-item .organ-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sign-page-root .grid-item .organ-icon img {
    width: 100%;
    height: 100%;
    opacity: 0.55;
}

.sign-page-root .grid-item .organ-name {
    color: #52525b;
    font-size: 15px;
    font-family: 'PingFang SC', sans-serif;
    font-weight: 400;
    line-height: 22px;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sign-page-root .action-btn {
    padding: 5px 16px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #dcdcdc;
    color: rgba(0, 0, 0, 0.9);
    font-size: 14px;
    font-family: 'PingFang SC', sans-serif;
    font-weight: 400;
    line-height: 22px;
    cursor: pointer;
    transition: background 0.15s;
}

.sign-page-root .action-btn:hover {
    background: #f5f5f5;
}

.sign-page-root .sign-boot {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f5f7;
}

.sign-page-root .sign-boot-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e4e5e8;
    border-top-color: #2970ff;
    border-radius: 50%;
    animation: sign-boot-spin 0.8s linear infinite;
}

@keyframes sign-boot-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 无 :has 的旧浏览器：仍依赖 useHead 打的类（见 sign.vue） */
html.page-sign body,
html.page-sign body.page-sign-body {
    min-width: 0 !important;
}
