/* ====================================================
   岭峰禽业 ERP · 全站统一样式表
   低饱和简约风格 · 支持 PC + 移动端
   ==================================================== */

/* ==================== 全局变量 ==================== */
:root {
    --primary-color: #5b7a9d;
    --primary-hover: #4a6685;
    --primary-light: #e8edf4;
    --primary-soft: #f3f6f9;
    --success-color: #6f9a7a;
    --success-hover: #5d8468;
    --success-light: #e8f0ea;
    --danger-color: #b27a7a;
    --danger-hover: #9d6666;
    --danger-light: #f1e8e8;
    --warning-color: #b89a6a;
    --warning-hover: #a38655;
    --warning-light: #f1ece2;
    --info-color: #7a9bb5;
    --info-light: #e8edf2;
    --gray-50: #fafafa;
    --gray-100: #f5f6f8;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --dark-bg: #2b3137;
    --dark-card: #343b41;
    --dark-text: #dce1e6;
    --light-bg: #f5f7fa;
    --light-card: #ffffff;
    --light-text: #3a4149;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-xl: 16px;
    --radius-full: 50px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 12px 36px rgba(0, 0, 0, 0.10);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    --font-sans: 'Inter', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', 'Courier New', monospace;
    --nav-width: 220px;
    --nav-width-mini: 64px;
}

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

html, body {
    height: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.6;
    color: var(--light-text);
    background: var(--light-bg);
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    display: block;
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d0d7de;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b0b8c0;
}

/* ==================== 登录页 ==================== */
.login-wrap {
    display: flex;
    height: 100vh;
    background: #fff;
    overflow: hidden;
}

.login-brand {
    flex: 1.1;
    background: linear-gradient(155deg, #3d4a56 0%, #2b3137 100%);
    color: var(--dark-text);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 52px 56px;
    position: relative;
    overflow: hidden;
}

.login-brand .brand-top {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.login-brand .brand-logo {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 600;
    color: #cbd5e0;
    flex-shrink: 0;
}

.login-brand .brand-name {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.login-brand .brand-mid {
    position: relative;
    z-index: 2;
}

.login-brand .brand-mid h1 {
    font-size: 34px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.5px;
    color: #eef1f4;
    margin-bottom: 16px;
}

.login-brand .brand-mid p {
    font-size: 13px;
    color: #8a96a3;
    letter-spacing: 0.05em;
}

.login-brand .brand-foot {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #6b7683;
    position: relative;
    z-index: 2;
    letter-spacing: 0.03em;
}

.login-brand .brand-deco {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(91, 122, 157, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.login-brand .brand-deco.d1 {
    width: 420px;
    height: 420px;
    right: -140px;
    top: -120px;
}

.login-brand .brand-deco.d2 {
    width: 320px;
    height: 320px;
    left: -100px;
    bottom: -120px;
}

.login-form-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #fff;
}

.login-box {
    width: 100%;
    max-width: 340px;
}

.login-box h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.login-box .login-tip {
    font-size: 12px;
    color: #8a96a3;
    margin-bottom: 30px;
}

.login-box .input-wrapper {
    max-width: 100%;
}

.login-box .input-field {
    padding: 10px 12px;
    font-size: 13px;
}

.login-box .btn-block {
    margin-top: 10px;
    padding: 11px;
    font-size: 14px;
}

.login-box .login-extra {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #8a96a3;
    margin-top: 18px;
}

.login-error {
    background: var(--danger-light);
    border: 1px solid #e0cccc;
    color: #8a5a5a;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    margin-bottom: 16px;
    display: none;
}

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

.login-success {
    background: var(--success-light);
    border: 1px solid #cfe0d5;
    color: #4a6b52;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    margin-bottom: 16px;
    display: none;
}

.login-success.show {
    display: block;
}

/* ==================== 主框架（iframe 布局） ==================== */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.main-nav {
    width: var(--nav-width);
    flex-shrink: 0;
    background: #ffffff;
    border-right: 1px solid #e9edf1;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.03);
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal);
    scrollbar-width: thin;
}

.main-nav-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 20px 0;
}

.main-nav .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
    padding: 0 20px;
    margin-bottom: 24px;
    letter-spacing: -0.3px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
}

.main-nav .logo-icon {
    width: 30px;
    height: 30px;
    background: var(--primary-soft);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 15px;
    font-weight: 600;
    border: 1px solid #dce3ea;
    flex-shrink: 0;
}

.main-nav .nav-group-title {
    padding: 0 20px 8px;
    font-size: 10px;
    color: #adb5bd;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
}

.main-nav .nav-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    list-style: none;
    width: 100%;
    flex: 1;
    padding: 0;
    margin: 0;
}

.main-nav .nav-links li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #5a6673;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.main-nav .nav-links li a .nav-ico {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a96a3;
    transition: color var(--transition-fast);
}

.main-nav .nav-links li a .nav-ico svg {
    width: 16px;
    height: 16px;
    display: block;
}

.main-nav .nav-links li a .nav-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-nav .nav-links li a:hover {
    background: var(--primary-soft);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.main-nav .nav-links li a:hover .nav-ico {
    color: var(--primary-color);
}

.main-nav .nav-links li a.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
    border-left-color: var(--primary-color);
}

.main-nav .nav-links li a.active .nav-ico {
    color: var(--primary-color);
}

.main-nav .nav-links li a .badge {
    display: inline-block;
    background: var(--danger-color);
    color: #fff;
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 500;
    flex-shrink: 0;
}

.main-nav .avatar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #f0f2f5;
    margin-top: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}

.main-nav .avatar-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #dce3ea;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 13px;
    flex-shrink: 0;
    text-decoration: none;
}

.main-nav .user-meta {
    flex: 1;
    min-width: 0;
}

.main-nav .user-name {
    font-size: 12px;
    color: #3a4651;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-nav .user-role {
    font-size: 11px;
    color: #adb5bd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-nav .logout-btn {
    background: transparent;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-nav .logout-btn svg {
    width: 15px;
    height: 15px;
    display: block;
}

.main-nav .logout-btn:hover {
    background: var(--danger-light);
    color: var(--danger-color);
}

/* ==================== 右侧内容区（iframe 容器） ==================== */
.app-content {
    flex: 1;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-content iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: var(--light-bg);
}

/* ==================== iframe 内页结构 ==================== */
.page-body {
    background: var(--light-bg);
    min-height: 100vh;
    overflow-x: hidden;
    /* ★ 固定滚动槽：切换页签内容长短不同时，页面不再左右抖动 */
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

/* ==================== 次导航（已隐藏横向滚动条） ==================== */
.sub-nav {
    background: #ffffff;
    border-bottom: 1px solid #e9edf1;
    padding: 0 24px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 90;
    -webkit-overflow-scrolling: touch;
    /* 隐藏横向滚动条 */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sub-nav::-webkit-scrollbar {
    height: 0;
    width: 0;
    display: none;
}

.sub-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    gap: 4px;
    height: 44px;
}

.sub-nav .sub-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px 10px;
    color: #6b7683;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    background: transparent;
    border-bottom: 2px solid transparent;
    position: relative;
    margin-bottom: -1px;
    white-space: nowrap;
}

.sub-nav .sub-link:hover {
    color: #2c3e50;
}

.sub-nav .sub-link.active {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom-color: var(--primary-color);
}

.sub-nav .sub-link .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success-color);
    display: inline-block;
}

/* ==================== 主容器 ==================== */
.main-container {
    padding: 24px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==================== 标题 ==================== */
.page-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #2c3e50;
    letter-spacing: -0.3px;
}

.page-subtitle {
    font-size: 13px;
    color: #7a8694;
    margin-bottom: 24px;
    font-weight: 400;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
    color: #3a4651;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title .st-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .st-left svg {
    color: #7a8694;
}

.section-title .st-link {
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 400;
}

/* ==================== 卡片 ==================== */
.card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #eef1f4;
    transition: box-shadow var(--transition-normal);
}

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

/* ==================== 统计卡片 ==================== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border: 1px solid #eef1f4;
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #e2e8ee;
}

.stat-card .stat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.stat-card .stat-label {
    font-size: 12px;
    color: #8a96a3;
    font-weight: 500;
}

.stat-card .stat-ico {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.stat-card .stat-ico.green {
    background: var(--success-light);
    color: var(--success-color);
}

.stat-card .stat-ico.amber {
    background: var(--warning-light);
    color: var(--warning-color);
}

.stat-card .stat-ico.red {
    background: var(--danger-light);
    color: var(--danger-color);
}

.stat-card .stat-value {
    font-size: 26px;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.stat-card .stat-value .unit {
    font-size: 12px;
    color: #8a96a3;
    font-weight: 400;
    margin-left: 3px;
}

.stat-card .stat-foot {
    font-size: 11px;
    color: #adb5bd;
    margin-top: 6px;
}

/* ==================== 工具栏 ==================== */
.toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.toolbar .spacer {
    flex: 1;
}

/* 搜索框：工具栏与弹窗内统一同一套样式 */
.search-box,
.toolbar .search-box {
    position: relative;
    width: 240px;
    max-width: 100%;
}

.search-box input,
.toolbar .search-box input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid #d0d7de;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: #2c3e50;
    background: #fff;
    outline: none;
    transition: all var(--transition-fast);
}

.search-box input:focus,
.toolbar .search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(91, 122, 157, 0.1);
}

.search-box .s-ico,
.toolbar .search-box .s-ico {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    pointer-events: none;
    display: flex;
    align-items: center;
}

/* ==================== 表单 ==================== */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.input-group label {
    font-size: 12px;
    font-weight: 500;
    color: #5a6673;
}

.input-group label .required {
    color: var(--danger-color);
    margin-left: 2px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-field {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d0d7de;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: #2c3e50;
    background: #fff;
    transition: all var(--transition-fast);
    outline: none;
}

.input-field:hover {
    border-color: #b8c2cc;
}

.input-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(91, 122, 157, 0.1);
}

.input-field::placeholder {
    color: #b0b8c0;
}

.input-field:disabled {
    background: #f5f6f8;
    cursor: not-allowed;
    opacity: 0.6;
}

.input-wrapper .input-icon-left,
.input-wrapper .input-icon-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #8a96a3;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.input-wrapper .input-icon-left {
    left: 10px;
}

.input-wrapper .input-icon-right {
    right: 10px;
}

.input-field.input-with-left-icon {
    padding-left: 32px;
}

.textarea-field {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d7de;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: #2c3e50;
    background: #fff;
    transition: all var(--transition-fast);
    outline: none;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.textarea-field:hover {
    border-color: #b8c2cc;
}

.textarea-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(91, 122, 157, 0.1);
}

/* 下拉框 */
.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.select-wrapper::after {
    content: '▾';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #8a96a3;
    pointer-events: none;
}

.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid #d0d7de;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: #2c3e50;
    background: #fff;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(91, 122, 157, 0.1);
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    letter-spacing: 0.02em;
    background: transparent;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn svg {
    flex-shrink: 0;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    box-shadow: 0 2px 8px rgba(91, 122, 157, 0.2);
}

.btn-success {
    background: var(--success-color);
    color: #fff;
    border-color: var(--success-color);
}

.btn-success:hover {
    background: var(--success-hover);
    border-color: var(--success-hover);
    color: #fff;
}

.btn-danger {
    background: var(--danger-color);
    color: #fff;
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background: var(--danger-hover);
    border-color: var(--danger-hover);
    color: #fff;
}

.btn-warning {
    background: var(--warning-color);
    color: #fff;
    border-color: var(--warning-color);
}

.btn-warning:hover {
    background: var(--warning-hover);
    border-color: var(--warning-hover);
    color: #fff;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border-color: #c5cfda;
}

.btn-outline-primary:hover {
    background: var(--primary-soft);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger-color);
    border-color: #d5c2c2;
}

.btn-outline-danger:hover {
    background: var(--danger-light);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.btn-ghost {
    background: transparent;
    color: #6b7683;
    border-color: transparent;
}

.btn-ghost:hover {
    background: #f0f2f5;
    color: #2c3e50;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
    display: flex;
}

/* ==================== 表格 ==================== */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid #e9edf1;
    border-radius: var(--radius-md);
    background: #fff;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 720px;
}

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

.table th {
    background: #f8f9fb;
    color: #5a6673;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover td {
    background: #fafbfc;
}

.table .cell-id {
    white-space: nowrap;
    color: #8a96a3;
    font-family: var(--font-mono);
    font-size: 12px;
}

.table .cell-name {
    font-weight: 500;
    color: #2c3e50;
    white-space: nowrap;
}

.table .cell-mono {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #5a6673;
    white-space: nowrap;
}

.table .cell-actions {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

.table .cell-nowrap {
    white-space: nowrap;
}

.table .cell-money {
    font-family: var(--font-mono);
    font-weight: 500;
    color: #2c3e50;
    text-align: right;
    white-space: nowrap;
}

.table td.center,
.table th.center {
    text-align: center;
}

.table td.right,
.table th.right {
    text-align: right;
}

/* 空状态 */
.table-empty {
    padding: 60px 20px;
    text-align: center;
    color: #adb5bd;
    font-size: 13px;
}

.table-empty .empty-ico {
    font-size: 40px;
    opacity: 0.4;
    margin-bottom: 12px;
}

/* 骨架屏 */
.skeleton-row td {
    padding: 14px 16px;
}

.skeleton-bar {
    height: 12px;
    background: linear-gradient(90deg, #f0f2f5 25%, #e6eaee 50%, #f0f2f5 75%);
    background-size: 200% 100%;
    animation: skeleton 1.4s ease-in-out infinite;
    border-radius: 3px;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==================== 徽标 ==================== */
.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    background: #f0f2f5;
    color: #6b7683;
    white-space: nowrap;
}

.badge-success { background: var(--success-light); color: var(--success-color); }
.badge-danger  { background: var(--danger-light);  color: var(--danger-color); }
.badge-warning { background: var(--warning-light); color: var(--warning-color); }
.badge-info    { background: var(--info-light);    color: var(--info-color); }
.badge-primary { background: var(--primary-light); color: var(--primary-color); }

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px 0;
    font-size: 12px;
    color: #8a96a3;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination .page-btns {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.pagination .page-btns button {
    min-width: 30px;
    padding: 5px 8px;
    border: 1px solid #e2e6ea;
    background: #fff;
    border-radius: var(--radius-sm);
    color: #5a6673;
    cursor: pointer;
    font-size: 12px;
    transition: all var(--transition-fast);
}

.pagination .page-btns button:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination .page-btns button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.pagination .page-btns button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ==================== 加载提示 ==================== */
.loading-bar {
    display: none;
    padding: 10px 16px;
    background: var(--primary-soft);
    border: 1px solid #dce6ef;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--primary-color);
    margin-bottom: 12px;
    align-items: center;
    gap: 8px;
}

.loading-bar.show {
    display: flex;
}

.loading-bar .spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #c8d5e2;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

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

/* ==================== 提示消息（Toast） ==================== */
.toast-wrap {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.25s ease;
    pointer-events: auto;
    max-width: 90vw;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast-success { background: var(--success-color); color: #fff; }
.toast-error   { background: var(--danger-color);  color: #fff; }
.toast-info    { background: var(--primary-color); color: #fff; }
.toast-warning { background: var(--warning-color); color: #fff; }

/* ==================== 弹窗 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 50, 56, 0.45);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 460px;
    transform: scale(0.95) translateY(10px);
    transition: all var(--transition-normal);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-dialog {
    transform: scale(1) translateY(0);
}

.modal-dialog.modal-lg { max-width: 720px; }
.modal-dialog.modal-sm { max-width: 360px; }

.modal-header {
    padding: 18px 20px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f2f5;
    flex-shrink: 0;
}

.modal-header .modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.modal-header .modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #8a96a3;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-header .modal-close:hover {
    background: #f0f2f5;
    color: #2c3e50;
}

.modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    font-size: 13px;
    color: #4a5560;
}

.modal-footer {
    padding: 14px 20px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid #f0f2f5;
    flex-shrink: 0;
}

/* ==================== 滑动开关 ==================== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
    vertical-align: middle;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-switch .toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d0d7de;
    border-radius: 22px;
    transition: all var(--transition-normal);
}

.toggle-switch .toggle-slider::before {
    content: '';
    position: absolute;
    left: 2px;
    bottom: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-normal);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--success-color);
}

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

.toggle-switch input:focus-visible + .toggle-slider {
    outline: 1px solid var(--primary-color);
    outline-offset: 2px;
}

/* ==================== 进度条 ==================== */
.progress-item {
    margin-bottom: 16px;
}

.progress-item:last-child {
    margin-bottom: 0;
}

.progress-item .p-head {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 6px;
}

.progress-item .p-name {
    color: #5a6673;
    font-weight: 500;
}

.progress-item .p-val {
    color: #8a96a3;
}

.progress-item .p-track {
    height: 6px;
    background: #f0f2f5;
    border-radius: 3px;
    overflow: hidden;
}

.progress-item .p-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--primary-color);
    transition: width var(--transition-normal);
}

.progress-item .p-fill.warn { background: var(--warning-color); }
.progress-item .p-fill.danger { background: var(--danger-color); }
.progress-item .p-fill.ok { background: var(--success-color); }

/* ==================== 图片网格 ==================== */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    list-style: none;
}

.image-grid .image-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid #e9edf1;
    transition: all var(--transition-normal);
    position: relative;
}

.image-grid .image-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #d5dce2;
}

.image-grid .image-card .img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #e8ecef;
}

.image-grid .image-card .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.image-grid .image-card:hover .img-wrap img {
    transform: scale(1.03);
}

.image-grid .image-card .img-info {
    padding: 10px 12px;
}

.image-grid .image-card .img-title {
    font-size: 13px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-grid .image-card .img-meta {
    font-size: 11px;
    color: #8a96a3;
}

.image-grid .image-card .img-actions {
    padding: 0 12px 10px;
    display: flex;
    gap: 6px;
}

.image-grid .image-card .img-actions .btn {
    flex: 1;
    padding: 5px 8px;
    font-size: 11px;
}

/* ==================== 空状态 ==================== */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #adb5bd;
}

.empty-state .es-ico {
    font-size: 44px;
    margin-bottom: 12px;
    opacity: 0.45;
}

.empty-state .es-text {
    font-size: 13px;
}

/* ==================== 天气卡片 ==================== */
.weather-card {
    background: linear-gradient(140deg, #e9eef4 0%, #dbe3eb 100%);
    border: 1px solid #d8e0e8;
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.weather-card .wc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.weather-card .wc-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.weather-card .wc-icon {
    width: 52px;
    height: 52px;
    color: #5b7a9d;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.weather-card .wc-temp {
    font-size: 36px;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: -1px;
    line-height: 1;
}

.weather-card .wc-desc {
    font-size: 12px;
    color: #6b7683;
    margin-top: 4px;
}

.weather-card .wc-loc {
    font-size: 12px;
    color: #6b7683;
    margin-bottom: 2px;
}

.weather-card .wc-hours {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.weather-card .wc-hour {
    text-align: center;
    font-size: 11px;
    color: #6b7683;
}

.weather-card .wc-hour b {
    display: block;
    font-size: 15px;
    color: #2c3e50;
    font-weight: 600;
    margin-top: 2px;
}

.weather-card .wc-alert {
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--warning-light);
    border: 1px solid #e4d8c0;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: #8a6d3b;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==================== 工具类 ==================== */
.flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.flex-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #8a96a3; }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.hidden { display: none !important; }
.divider {
    height: 1px;
    background: #f0f2f5;
    margin: 14px 0;
    border: none;
}

/* ==================== 响应式 ==================== */
@media (max-width: 900px) {
    .main-nav {
        width: 200px;
    }
}

@media (max-width: 860px) {
    .login-brand {
        display: none;
    }
    .login-form-area {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .main-nav {
        width: var(--nav-width-mini);
    }
    .main-nav .logo span:not(.logo-icon) {
        display: none;
    }
    .main-nav .logo {
        justify-content: center;
        padding: 0 10px;
    }
    .main-nav .nav-group-title {
        display: none;
    }
    .main-nav .nav-links li a {
        justify-content: center;
        padding: 12px 0;
        border-left-width: 0;
    }
    .main-nav .nav-links li a .nav-text {
        display: none;
    }
    .main-nav .nav-links li a .badge {
        position: absolute;
        top: 6px;
        right: 6px;
        margin-left: 0;
        transform: scale(0.85);
    }
    .main-nav .nav-links li a {
        position: relative;
    }
    .main-nav .user-meta {
        display: none;
    }
    .main-nav .avatar-row {
        justify-content: center;
        padding: 14px 0;
    }
    .main-container {
        padding: 16px;
    }
    .toolbar .search-box {
        width: 100%;
    }
    .stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    .stat-card .stat-value {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .card {
        padding: 16px;
        border-radius: var(--radius-md);
    }
    .main-container {
        padding: 12px;
    }
    .page-title {
        font-size: 18px;
    }
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .stat-card {
        padding: 12px;
    }
    .stat-card .stat-value {
        font-size: 18px;
    }
    .stat-card .stat-head {
        margin-bottom: 6px;
    }
    .stat-card .stat-ico {
        width: 24px;
        height: 24px;
    }
    .modal-footer {
        flex-direction: column-reverse;
    }
    .modal-footer .btn {
        width: 100%;
    }
}

/* ==================== 打印样式 ==================== */
@media print {
    .main-nav,
    .sub-nav,
    .toolbar,
    .no-print,
    .btn {
        display: none !important;
    }
    body {
        background: #fff;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
