* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: #303133;
    background-color: #f0f2f5;
}

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

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -200px;
    right: -100px;
}

.login-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -100px;
    left: -100px;
}

.login-box {
    width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 10;
}

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

.login-logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: #909399;
}

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

.form-label {
    display: block;
    font-size: 14px;
    color: #606266;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 14px;
    color: #303133;
    transition: all 0.3s;
    outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #909399;
    opacity: 1;
}

.form-input:disabled,
.form-textarea:disabled {
    color: #909399;
    background: #f5f7fa;
}

.form-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input-icon {
    position: relative;
}

.form-input-icon .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #c0c4cc;
    font-size: 18px;
}

.form-input-icon input {
    padding-left: 44px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    width: 100%;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-sm {
    height: 32px;
    padding: 0 15px;
    font-size: 13px;
}

.btn-default {
    background: #fff;
    border: 1px solid #dcdfe6;
    color: #606266;
}

.btn-default:hover {
    border-color: #c0c4cc;
    color: #409eff;
}

.btn-success {
    background: #67c23a;
    color: #fff;
}

.btn-success:hover {
    background: #85ce61;
}

.btn-warning {
    background: #e6a23c;
    color: #fff;
}

.btn-warning:hover {
    background: #ebb563;
}

.btn-danger {
    background: #f56c6c;
    color: #fff;
}

.btn-danger:hover {
    background: #f78989;
}

.error-msg {
    color: #f56c6c;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.error-msg.show {
    display: block;
}

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

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: #001529;
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-logo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    margin-right: 10px;
}

.sidebar-logo-text {
    font-size: 16px;
    font-weight: 600;
}

.sidebar-menu {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.menu-group-title {
    padding: 10px 20px 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 44px;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: all 0.3s;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.menu-item.active {
    background: #1890ff;
    color: #fff;
}

.menu-item .icon {
    width: 18px;
    margin-right: 12px;
    font-size: 16px;
}

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

.header {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    font-size: 16px;
    font-weight: 500;
    color: #303133;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-user {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.header-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    color: #909399;
    font-size: 14px;
}

.header-user-name {
    font-size: 14px;
    color: #606266;
}

.header-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    min-width: 140px;
    display: none;
    margin-top: 4px;
}

.header-dropdown.show {
    display: block;
}

.dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
    color: #606266;
    cursor: pointer;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #f5f7fa;
    color: #409eff;
}

.dropdown-item.danger {
    color: #f56c6c;
}

.dropdown-item.danger:hover {
    background: #fef0f0;
}

.content {
    flex: 1;
    padding: 24px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #303133;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.card-body {
    padding: 20px;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.stat-card-title {
    font-size: 14px;
    color: #909399;
    margin-bottom: 12px;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 8px;
}

.stat-card-desc {
    font-size: 13px;
    color: #67c23a;
}

.stat-card-desc.down {
    color: #f56c6c;
}

.stat-card-icon {
    float: right;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card-icon.blue {
    background: #ecf5ff;
    color: #409eff;
}

.stat-card-icon.green {
    background: #f0f9eb;
    color: #67c23a;
}

.stat-card-icon.orange {
    background: #fdf6ec;
    color: #e6a23c;
}

.stat-card-icon.purple {
    background: #f5f0ff;
    color: #909399;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item label {
    font-size: 14px;
    color: #606266;
    white-space: nowrap;
}

.filter-item .form-input {
    height: 36px;
    width: 180px;
}

.filter-item select {
    width: 140px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #ebeef5;
}

.table th {
    background: #fafafa;
    font-weight: 500;
    color: #606266;
    font-size: 14px;
}

.table td {
    color: #606266;
    font-size: 14px;
}

.table tbody tr:hover {
    background: #f5f7fa;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.tag-success {
    background: #f0f9eb;
    color: #67c23a;
}

.tag-warning {
    background: #fdf6ec;
    color: #e6a23c;
}

.tag-danger {
    background: #fef0f0;
    color: #f56c6c;
}

.tag-info {
    background: #ecf5ff;
    color: #409eff;
}

.tag-default {
    background: #f4f4f5;
    color: #909399;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.pagination-info {
    margin-right: 12px;
    font-size: 14px;
    color: #606266;
}

.pagination-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #dcdfe6;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #606266;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #409eff;
    color: #409eff;
}

.pagination-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-btn.active {
    background: #409eff;
    border-color: #409eff;
    color: #fff;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-dialog {
    background: #fff;
    border-radius: 8px;
    width: 560px;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-lg {
    width: 800px;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 500;
    color: #303133;
}

.modal-close {
    cursor: pointer;
    color: #909399;
    font-size: 20px;
    line-height: 1;
}

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

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #ebeef5;
    text-align: right;
}

.modal-footer .btn {
    margin-left: 8px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 14px;
    color: #303133;
    resize: vertical;
    min-height: 100px;
    outline: none;
    font-family: inherit;
}

.form-textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #dcdfe6;
    transition: 0.3s;
    border-radius: 22px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.switch input:checked + .switch-slider {
    background-color: #67c23a;
}

.switch input:checked + .switch-slider:before {
    transform: translateX(22px);
}

.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    transition: color 0.2s;
}

.action-btn.edit {
    color: #409eff;
}

.action-btn.edit:hover {
    color: #66b1ff;
}

.action-btn.delete {
    color: #f56c6c;
}

.action-btn.delete:hover {
    color: #f78989;
}

.action-btn.view {
    color: #67c23a;
}

.action-btn.view:hover {
    color: #85ce61;
}

.detail-table {
    width: 100%;
}

.detail-table td {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.detail-table td:first-child {
    width: 120px;
    color: #909399;
    font-size: 14px;
}

.detail-table td:last-child {
    color: #303133;
    font-size: 14px;
}

.image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    cursor: pointer;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #e4e7ed;
    margin-bottom: 20px;
}

.tab-item {
    padding: 12px 24px;
    font-size: 14px;
    color: #606266;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.tab-item:hover {
    color: #409eff;
}

.tab-item.active {
    color: #409eff;
    border-bottom-color: #409eff;
    font-weight: 500;
}

.empty {
    text-align: center;
    padding: 60px 0;
    color: #909399;
}

.empty-icon {
    font-size: 60px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-text {
    font-size: 14px;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: #f0f9eb;
    color: #67c23a;
    border: 1px solid #e1f3d8;
}

.alert-error {
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fde2e2;
}

.alert-warning {
    background: #fdf6ec;
    color: #e6a23c;
    border: 1px solid #faecd8;
}

.alert-info {
    background: #ecf5ff;
    color: #409eff;
    border: 1px solid #d9ecff;
}

.question-item {
    padding: 16px;
    border: 1px solid #ebeef5;
    border-radius: 8px;
    margin-bottom: 12px;
}

.question-title {
    font-weight: 500;
    color: #303133;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.question-option {
    font-size: 13px;
    color: #606266;
    padding: 4px 0;
}

.question-option.correct {
    color: #67c23a;
}

.question-option.wrong {
    color: #f56c6c;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main {
        margin-left: 0;
    }
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-item .form-input {
        width: 100%;
    }
    .filter-item select {
        width: 100%;
    }
}
