:root {
    --primary: #2563EB;
    --primary-hover: #1d4ed8;
    --accent: #F97316;
    --accent-hover: #ea580c;
    --bg-light: #f0f4f8;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-light);
    min-height: 100vh;
}

.login-bg {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dbdbdb 0%, #ffffff00 100%);
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1rem;
}

.login-bg > .container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    flex-grow: 0;
}

.login-bg .columns {
    display: flex;
    justify-content: center;
}

.login-bg .has-text-primary {
    color: #2563eb !important;
}

.login-card {
    border-radius: 16px;
    box-shadow: var(--card-shadow-hover);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.login-title {
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #64748b;
    font-size: 0.9rem;
}

.input-field {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.premark-modal-card {
    width: 600px;
    max-width: 90vw;
}

.premark-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.premark-content::-webkit-scrollbar {
    width: 6px;
}

.premark-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.premark-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.premark-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.premark-item {
    padding: 12px;
    margin-bottom: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.premark-item-header {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.premark-item-content {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
}

.premark-item-time {
    font-size: 0.75rem;
    color: #94a3b8;
}

.premark-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.premark-badge-ckx {
    background: #dbeafe;
    color: #1d4ed8;
}

.premark-badge-kdx {
    background: #dcfce7;
    color: #15803d;
}

.premark-badge-admin {
    background: #fef3c7;
    color: #b45309;
}

.premark-input-area {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.premark-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.premark-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.premark-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.premark-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.navbar.is-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    a strong {
        color: #fff;
    };
}

.navbar.is-primary .navbar-brand {
    background: rgba(255, 255, 255, 0.1);
    .navbar-item, .navbar-link {
        color: #f0f4f8;}
}

/* 导航栏中的学科下拉菜单和用户菜单文字颜色 */
.navbar.is-primary .navbar-start .navbar-link,
.navbar.is-primary .navbar-start .navbar-item,
.navbar.is-primary .navbar-start .navbar-link > span,
.navbar.is-primary .navbar-start .navbar-item > span,
.navbar.is-primary .navbar-end .navbar-link,
.navbar.is-primary .navbar-end .navbar-item,
.navbar.is-primary .navbar-end .navbar-link > span,
.navbar.is-primary .navbar-end .navbar-item > span {
    color: #fff !important;
}

/* 下拉菜单中的选项文字颜色 */
.navbar.is-primary .navbar-dropdown .navbar-item {
    color: #363636 !important;
}

.navbar.is-primary .navbar-brand .navbar-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.navbar-dropdown {
    max-height: 400px;
    overflow-y: auto;
}

.navbar-dropdown::-webkit-scrollbar {
    width: 6px;
}

.navbar-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.navbar-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.navbar-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.navbar-dropdown .navbar-item {
    transition: background-color 0.2s ease;
}

.navbar-dropdown .navbar-item:hover {
    background-color: #f3f4f6;
}

.navbar-dropdown .navbar-item.disabled {
    color: #9ca3af;
    cursor: not-allowed;
    background-color: transparent;
}

.navbar-dropdown .navbar-item.disabled:hover {
    background-color: transparent;
}

@media screen and (max-width: 768px) {
    .login-card {
        border-radius: 12px;
    }

    .premark-modal-card {
        width: 95vw;
        margin: 10px;
    }

    .table-container {
        overflow-x: auto;
    }

    .level {
        flex-direction: column;
        align-items: stretch;
    }

    .level-left, .level-right {
        margin-bottom: 8px;
    }
}

.subject-disabled {
    color: #a0aec0 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.tab-panel {
    margin-top: 2px;
}

#ckxAddBtn, #kdxAddBtn {
    background-color: #f1997b !important;
    border-color: transparent;
    margin-right: 2px;
}

#ckxAddBtn:hover:not([disabled]), #kdxAddBtn:hover:not([disabled]) {
    background-color: #e88a6a !important;
}

/* 验证码输入框和图片同一行显示 */
.captcha-flex {
    display: flex;
    gap: 8px;
    align-items: center;
}

.captcha-input {
    flex: 1;
}

.captcha-img-wrap {
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
}

.captcha-img-wrap img {
    height: 40px;
    border-radius: 4px;
    display: block;
}

.captcha-refresh {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 2px;
}

/* 登录标题图标样式 */
.login-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    vertical-align: middle;
}

/* 手机端姓名列和参考校列不换行显示 */
@media screen and (max-width: 510px) {
    .table td:nth-child(2),
    .table th:nth-child(2),
    .table td:nth-child(3),
    .table th:nth-child(3) {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100px;
    }
}

/* 修改container is-fluid的左右内边距为0 */
.container.is-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Tab标签选中与未选中状态区分 */
.tabs.is-boxed li a {
    border: 1px solid transparent;
    border-radius: 4px 4px 0 0;
    color: #4a4a4a;
    padding: 0.5em 1em;
    transition: all 0.2s ease;
}

.tabs.is-boxed li a:hover {
    background-color: #f5f5f5;
    border-bottom-color: #dbdbdb;
}

.tabs.is-boxed li.is-active a {
    background-color: #fff;
    border-color: #dbdbdb;
    border-bottom-color: transparent;
    color: #2563EB;
    font-weight: 600;
}
