/* ==================== 全局样式 ==================== */

/* CSS变量定义 - 绿色主题 */
:root {
    --primary-color: #4CAF50;
    --primary-light: #81C784;
    --primary-dark: #2E7D32;
    --background-color: #F5F5F5;
    --text-color: #333333;
    --border-color: #E0E0E0;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --navbar-height-desktop: 60px;
    --navbar-height-mobile: 56px;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* ==================== 导航栏样式 ==================== */

.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
}

/* 桌面端导航栏 */
.desktop-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height-desktop);
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.brand-icon {
    font-size: 24px;
}

.brand-text {
    display: inline-block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-item {
    display: flex;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.nav-link:hover {
    background-color: var(--primary-light);
    color: var(--white);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 500;
}

.nav-icon {
    font-size: 18px;
}

/* 移动端导航栏 */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height-mobile);
    display: none;
    border-top: 1px solid var(--border-color);
}

.mobile-nav .nav-menu {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    width: 100%;
    padding: 0 8px;
}

.mobile-nav .nav-item {
    flex: 1;
}

.mobile-nav .nav-link {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 4px 8px;
    font-size: 12px;
    text-align: center;
}

.mobile-nav .nav-icon {
    font-size: 22px;
}

.mobile-nav .nav-text {
    font-size: 11px;
}

/* ==================== 主内容区域 ==================== */

.main-content {
    min-height: calc(100vh - var(--navbar-height-desktop));
    margin-top: var(--navbar-height-desktop);
    padding: 20px;
}

/* ==================== 响应式设计 ==================== */

/* 平板 */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 16px;
    }

    .main-content {
        padding: 16px;
    }
}

/* 手机 */
@media (max-width: 768px) {

    /* 隐藏桌面导航 */
    .desktop-nav {
        display: none;
    }

    /* 显示移动导航 */
    .mobile-nav {
        display: block;
    }

    /* 调整主内容区域 */
    .main-content {
        margin-top: 0;
        margin-bottom: var(--navbar-height-mobile);
        min-height: calc(100vh - var(--navbar-height-mobile));
        padding: 12px;
    }

    /* 隐藏品牌文字，只保留图标 */
    .brand-text {
        display: none;
    }
}

/* 超小屏幕 */
@media (max-width: 480px) {
    .main-content {
        padding: 8px;
    }
}

/* ==================== 通用组件样式 ==================== */

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* 卡片 */
.card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

/* 输入框 */
.input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 消息提示 */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
}

/* ==================== 全局消息提示样式 ==================== */

.global-message {
    position: fixed;
    top: calc(var(--navbar-height-desktop) + 20px);
    /* 导航栏高度 + 20px 间距 */
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    max-width: 500px;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    /* 确保在导航栏之上 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.global-message.show {
    opacity: 1;
    visibility: visible;
    animation: slideDown 0.3s ease;
}

.global-message.success {
    background-color: #4CAF50;
    color: white;
}

.global-message.error {
    background-color: #f44336;
    color: white;
}

.global-message.warning {
    background-color: #ff9800;
    color: white;
}

.global-message.info {
    background-color: #2196F3;
    color: white;
}

.global-message-icon {
    font-size: 20px;
}

.global-message-text {
    flex: 1;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -20px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .global-message {
        top: calc(var(--navbar-height-desktop) + 10px);
        /* 移动端也在导航栏下方 */
        min-width: 280px;
        max-width: calc(100% - 40px);
        padding: 12px 16px;
        font-size: 13px;
    }
}

/
*=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
表单验证样式

=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
*

/
/* 错误状态的输入框 */
input.error,
textarea.error,
select.error {
    border-color: #f44336 !important;
    background-color: #ffebee;
}

input.error:focus,
textarea.error:focus,
select.error:focus {
    border-color: #f44336 !important;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

/* 字段错误提示 */
.field-error {
    color: #f44336;
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: slideInError 0.3s ease;
}

.field-error::before {
    content: '⚠';
    font-size: 14px;
}

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 成功状态的输入框 */
input.success,
textarea.success,
select.success {
    border-color: #4CAF50 !important;
}

input.success:focus,
textarea.success:focus,
select.success:focus {
    border-color: #4CAF50 !important;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* 表单组 */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group label.required::after {
    content: ' *';
    color: #f44336;
}

/* 输入框通用样式 */
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-control:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* 帮助文本 */
.form-help {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}