/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 14px;
    color: #2D2D2D;
    background-color: #F7F5F2;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(44, 107, 94, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(169, 151, 135, 0.04) 0%, transparent 50%);
    min-height: 100vh;
}

/* ===== 浮雕效果通用类 ===== */
.relief-card {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(217, 207, 193, 0.5);
    position: relative;
    overflow: hidden;
}

.relief-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(217, 207, 193, 0.8), transparent);
}

.btn-emboss {
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-emboss:active {
    transform: translateY(1px);
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.relief-input {
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid #D9CFC1;
}

.relief-input:focus {
    outline: none;
    border-color: #2C6B5E;
    box-shadow: 
        inset 0 2px 4px rgba(44, 107, 94, 0.1),
        0 0 0 3px rgba(44, 107, 94, 0.1);
}

/* ===== 登录页面 ===== */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: 
        radial-gradient(ellipse at top, rgba(44, 107, 94, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(166, 75, 75, 0.05) 0%, transparent 50%),
        #F7F5F2;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    padding: 40px 35px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    margin-bottom: 15px;
}

.logo-emboss {
    width: 70px;
    height: 70px;
    margin: 0 auto;
    background: linear-gradient(135deg, #2C6B5E, #709E88);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: bold;
    box-shadow: 
        0 6px 16px rgba(44, 107, 94, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.login-header h1 {
    font-size: 22px;
    color: #2C6B5E;
    margin-bottom: 8px;
    font-weight: 600;
}

.login-subtitle {
    font-size: 12px;
    color: #616161;
    letter-spacing: 1px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #2D2D2D;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    background: #FAF9F7;
    transition: all 0.2s;
}

.captcha-row {
    display: flex;
    gap: 10px;
}

.captcha-input {
    flex: 1;
}

.captcha-img {
    width: 100px;
    background: linear-gradient(135deg, #E8EDEB, #D9CFC1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #2C6B5E;
    letter-spacing: 3px;
    font-family: serif;
    user-select: none;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #2C6B5E, #3A8574);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3A8574, #2C6B5E);
}

.btn-block {
    width: 100%;
    padding: 13px;
    font-size: 16px;
}

.btn-success {
    background: linear-gradient(135deg, #709E88, #5A8A74);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #A64B4B, #C25B5B);
    color: white;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.15),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-default {
    background: #F5F2ED;
    color: #2D2D2D;
    border: 1px solid #D9CFC1;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    color: #999;
    font-size: 12px;
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #FDF0F0;
    color: #A64B4B;
    border: 1px solid #F5C6C6;
}

.alert-success {
    background: #F0F7F4;
    color: #2C6B5E;
    border: 1px solid #B8D4CC;
}

/* ===== 主布局 ===== */
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: linear-gradient(180deg, #2C6B5E 0%, #23554A 100%);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.relief-sidebar::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sys-logo .logo-text {
    color: white;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar-nav {
    padding: 15px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: #709E88;
}

.nav-icon {
    margin-right: 10px;
    font-size: 16px;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 15px;
}

.main-wrapper {
    flex: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
}

.relief-topbar {
    background: white;
    height: 60px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 -1px 0 rgba(217, 207, 193, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left .page-title {
    font-size: 16px;
    font-weight: 600;
    color: #2C6B5E;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    color: #2D2D2D;
    font-weight: 500;
}

.role-tag {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.role-admin {
    background: rgba(166, 75, 75, 0.1);
    color: #A64B4B;
}

.role-teacher {
    background: rgba(44, 107, 94, 0.1);
    color: #2C6B5E;
}

.role-guest {
    background: rgba(97, 97, 97, 0.1);
    color: #616161;
}

.logout-btn {
    color: #616161;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 6px;
    background: #F5F2ED;
    font-size: 13px;
}

.logout-btn:hover {
    background: #EDE8E1;
}

.main-content {
    padding: 25px;
    flex: 1;
}

.page-header {
    margin-bottom: 25px;
}

.page-header h2 {
    font-size: 20px;
    color: #2D2D2D;
    margin-bottom: 8px;
}

.page-header p {
    color: #616161;
}

/* ===== 统计卡片 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, #E8EDEB, #D9E5E0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-number {
    font-size: 24px;
    font-weight: 600;
    color: #2C6B5E;
    margin-bottom: 4px;
}

.stat-label {
    color: #616161;
    font-size: 13px;
}

/* ===== 快捷操作 ===== */
.quick-actions {
    padding: 25px;
}

.quick-actions h3 {
    margin-bottom: 20px;
    color: #2D2D2D;
    font-size: 16px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: #FAF9F7;
    border-radius: 10px;
    text-decoration: none;
    color: #2D2D2D;
    border: 1px solid #E8E3DB;
    transition: all 0.2s;
}

.action-btn:hover {
    transform: translateY(-2px);
    background: #F5F2ED;
    border-color: #D9CFC1;
}

.action-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

/* ===== 表格样式 ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table th {
    background: #F5F2ED;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #2D2D2D;
    border-bottom: 2px solid #D9CFC1;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #EDE8E1;
    color: #2D2D2D;
}

.data-table tbody tr:hover {
    background: #E8EDEB;
}

/* ===== 表单样式 ===== */
.form-card {
    padding: 25px;
    margin-bottom: 20px;
}

.form-card h3 {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #EDE8E1;
    color: #2C6B5E;
    font-size: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 18px;
}

.form-row-2 {
    grid-template-columns: repeat(2, 1fr);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2D2D2D;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D9CFC1;
    border-radius: 6px;
    font-size: 14px;
    background: #FAF9F7;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #2C6B5E;
    box-shadow: 0 0 0 3px rgba(44, 107, 94, 0.1);
}

.form-actions {
    padding-top: 20px;
    border-top: 1px solid #EDE8E1;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ===== 搜索栏 ===== */
.search-bar {
    padding: 20px;
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.search-form .form-group {
    margin-bottom: 0;
    min-width: 180px;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    color: #2D2D2D;
    background: white;
    border: 1px solid #D9CFC1;
}

.pagination .current {
    background: #2C6B5E;
    color: white;
    border-color: #2C6B5E;
}

/* ===== 角色徽章 ===== */
.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* ===== 模态框 ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    max-width: 90%;
    max-height: 85%;
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.relief-modal {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 5px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid #D9CFC1;
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 30px;
    cursor: pointer;
    color: #999;
    z-index: 10;
}

.close-modal:hover {
    color: #A64B4B;
}

#modalImage {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
}

/* ===== 证书缩略图 ===== */
.cert-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #D9CFC1;
}

/* ===== 操作按钮组 ===== */
.btn-group {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

/* ===== 底部数据维护区 ===== */
.bottom-tools {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #D9CFC1;
}

.tool-section {
    padding: 20px;
    margin-bottom: 15px;
}

.tool-section h4 {
    color: #2C6B5E;
    margin-bottom: 15px;
    font-size: 15px;
}

.danger-zone {
    border: 1px solid #F5C6C6;
    background: #FDF8F8;
}

.danger-zone h4 {
    color: #A64B4B;
}
