/* ==========================================================================
   CSS架构优化
   ========================================================================== */

/* 1. 基础样式
   ========================================================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'SF Pro Display', sans-serif;
    background-color: #f1f5f9;
    color: #0f172a;
    line-height: 1.5;
    font-size: 14px;
    transition: all 0.2s ease;
    overflow-x: hidden;
}

/* 现代科技感颜色变量 */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #475569;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0284c7;
    --bg-light: #f1f5f9;
    --bg-white: #ffffff;
    --bg-dark: #1e293b;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-full: 9999px;
    --error-color: var(--danger-color);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* 2. 布局样式
   ========================================================================== */

/* 工字型布局 */
.app-container {
    display: grid;
    grid-template-areas: 
        "header header"
        "sidebar main"
        "footer footer";
    grid-template-columns: 250px 1fr;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    grid-area: header;
    background: var(--bg-white);
    color: var(--text-primary);
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    min-height: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* 侧边栏样式 */
.sidebar {
    grid-area: sidebar;
    background: var(--bg-white);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    height: calc(100vh - 90px);
    overflow-y: auto;
    position: sticky;
    top: 70px;
}

.sidebar-content {
    padding: 1rem 0;
}

/* 主内容区域 */
.main-content {
    grid-area: main;
    background: var(--bg-light);
    padding: 1.5rem 0 3rem 0;
    min-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* 页脚样式 */
.footer {
    grid-area: footer;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 0.45rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    opacity: 0.95;
}

.footer p {
    margin: 0;
}

/* 容器样式 */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 宽屏容器 */
.wide-container {
    max-width: 2000px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 超大宽屏容器 */
.xl-container {
    max-width: 2400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 3. 网格系统
   ========================================================================== */

/* 响应式网格容器 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    align-items: start;
}

/* 双列网格 */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 三列网格 */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* 四列网格 */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* 五列网格 */
.grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

/* 六列网格 */
.grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

/* 自适应网格 */
.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    align-items: start;
}

/* 4. 导航样式
   ========================================================================== */

/* 导航样式 - 现代化科技感 */
.navbar {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 0.4rem 0;
    position: sticky;
    top: 30px;
    z-index: 99;
    box-shadow: var(--shadow-sm);
}

.navbar-nav {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 0.5rem 1rem;
    position: relative;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
    margin: 0 0.125rem;
}

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

.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
    background-color: var(--bg-light);
    box-shadow: var(--shadow-sm);
}

.nav-item:hover > .nav-link.active {
    background-color: var(--bg-light);
}

/* 下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-white);
    min-width: 220px;
    width: 100%;
    max-width: 250px;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    padding: 0.375rem 0;
    margin: 0.25rem 0 0 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transition: all 0.2s ease;
    transform: translateY(0);
    display: block;
    white-space: nowrap;
}

/* 点击状态或悬停状态都显示下拉菜单 */
.nav-item.dropdown-open .dropdown-menu,
.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 点击状态下的菜单样式 */
.nav-item.dropdown-open > .nav-link {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-hover);
}

/* 确保下拉菜单项竖向排列 */
.dropdown-menu .dropdown-item {
    display: block;
    width: 100%;
    float: none;
    clear: both;
}

/* 下拉菜单项链接样式 */
.dropdown-menu .dropdown-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.625rem 1.25rem;
    white-space: nowrap;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.15s ease;
    text-decoration: none;
}

/* 下拉菜单项悬停效果 */
.dropdown-menu .dropdown-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding-left: 1.4rem;
}

/* 移除最后一个菜单项的边框 */
.dropdown-menu .dropdown-item:last-child .dropdown-link {
    border-bottom: none;
}

/* 5. 侧边栏菜单样式
   ========================================================================== */

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
    padding: 0;
}

.sidebar-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sidebar-menu a.active {
    background-color: var(--bg-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

/* 侧边栏下拉菜单 */
.sidebar-dropdown .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-dropdown .dropdown-icon {
    font-size: 0.5rem;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.collapsible-icon {
    font-size: 0.35rem;
    color: #cbd5e1;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.sidebar-dropdown.open .dropdown-icon {
    transform: rotate(180deg);
}

.sidebar-dropdown .dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--bg-light);
    display: none;
}

.sidebar-dropdown .dropdown-menu.show {
    display: block;
}

.sidebar-dropdown .dropdown-menu li a {
    padding-left: 2.5rem;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}

.sidebar-dropdown .dropdown-menu li a:hover {
    padding-left: 2.75rem;
}

.sidebar-dropdown .dropdown-menu li a.active {
    border-left-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

/* 6. 组件样式
   ========================================================================== */

/* 卡片样式 */
.card {
    background-color: var(--bg-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 0.875rem;
    margin-bottom: 0.875rem;
    box-shadow: none;
    transition: all var(--transition-normal);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2,
.card-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.card h2 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* 卡片内容布局 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.875rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 0.875rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    transition: all var(--transition-fast);
    background-color: var(--bg-white);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: var(--bg-white);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--bg-light);
    opacity: 0.8;
    cursor: not-allowed;
}

/* 选择框样式 */
.form-control-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px 14px;
    padding-right: 2.25rem;
}

/* 文本区域样式 */
.form-control-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* 表单组紧凑样式 */
.form-group.compact {
    margin-bottom: 0.75rem;
}

.form-group.compact .form-control {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
}

/* 内联表单样式 */
.form-inline {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
}

.form-inline .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 180px;
}

.form-inline .form-group label {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.form-inline .form-control {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.8rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    text-align: center;
    font-family: inherit;
    gap: 0.3rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    min-width: 70px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-normal);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(1px);
    box-shadow: var(--shadow-sm);
}

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

/* 按钮变体 */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

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

.btn-success:hover {
    background: var(--success-color);
    border-color: var(--success-color);
    box-shadow: var(--shadow-md);
}

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

.btn-danger:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    box-shadow: var(--shadow-md);
}

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

.btn-warning:hover {
    background: var(--warning-color);
    border-color: var(--warning-color);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}

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

.btn-info:hover {
    background: var(--info-color);
    border-color: var(--info-color);
    box-shadow: var(--shadow-md);
}

/* 按钮尺寸 */
.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    min-width: 50px;
}

.btn-md {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    min-width: 70px;
}

.btn-lg {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    min-width: 90px;
}

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

/* 按钮组 */
.btn-group {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    flex-wrap: nowrap;
}

/* 图标按钮 */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    min-width: auto;
}

.btn-icon-sm {
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    min-width: auto;
}

/* 幽灵按钮 */
.btn-ghost {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: none;
    min-width: auto;
}

.btn-ghost:hover {
    background: rgba(37, 99, 235, 0.1);
    box-shadow: none;
}

/* 链接按钮 */
.btn-link {
    background: transparent;
    color: var(--primary-color);
    border-color: transparent;
    box-shadow: none;
    padding: 0.2rem 0.5rem;
    min-width: auto;
}

.btn-link:hover {
    background: rgba(37, 99, 235, 0.1);
    box-shadow: none;
    text-decoration: underline;
}

/* 表格样式 */
.table-wrapper {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 0.875rem;
    overflow: hidden;
    box-shadow: none;
    transition: all var(--transition-normal);
}

.table-wrapper:hover {
    box-shadow: var(--shadow-sm);
}

.table-container {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-light);
}

.table-container::-webkit-scrollbar {
    height: 5px;
}

.table-container::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    background-color: var(--bg-white);
    font-size: 0.85rem;
    table-layout: fixed;
}

.table th, .table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all var(--transition-fast);
    line-height: 1.4;
}

/* 数字列右对齐 */
.table td.numeric, .table th.numeric {
    text-align: right;
}

/* 日期列居中对齐 */
.table td.date, .table th.date {
    text-align: center;
}

/* 状态列居中对齐 */
.table td.status, .table th.status {
    text-align: center;
}

.table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid var(--primary-color);
    padding: 0.6rem 0.75rem;
    font-weight: 700;
}

.table th:first-child, .table td:first-child {
    padding-left: 1rem;
}

.table th:last-child, .table td:last-child {
    padding-right: 1rem;
}

/* 表格行样式 */
.table tr {
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
}

.table tr:hover {
    background-color: #f8fafc;
    transform: none;
}

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

.table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.01);
}

/* 表格操作列 */
.table-actions, .action-buttons {
    display: flex;
    gap: 0.125rem;
    justify-content: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 表格状态样式 */
.table-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 500;
}

/* 紧凑表格样式 */
.table.compact th, .table.compact td {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

/* 无边框表格 */
.table.borderless {
    border: none;
}

.table.borderless th, .table.borderless td {
    border: none;
}

/* 表格标题样式 */
.table-caption {
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

/* 状态标签样式 */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 0.5rem;
    gap: 0.25rem;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.status-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: currentColor;
    opacity: 0.7;
}

.status-active,
.status-valid {
    background-color: rgba(5, 150, 105, 0.1);
    color: var(--success-color);
    border-color: rgba(5, 150, 105, 0.2);
}

.status-pending,
.status-unread {
    background-color: rgba(217, 119, 6, 0.1);
    color: var(--warning-color);
    border-color: rgba(217, 119, 6, 0.2);
}

.status-disabled,
.status-error,
.status-expired {
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--danger-color);
    border-color: rgba(220, 38, 38, 0.2);
}

.status-locked {
    background-color: rgba(67, 56, 202, 0.1);
    color: #4338ca;
    border-color: rgba(67, 56, 202, 0.2);
}

.status-unlocked {
    background-color: rgba(2, 132, 199, 0.1);
    color: var(--info-color);
    border-color: rgba(2, 132, 199, 0.2);
}

.status-read {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-color: rgba(37, 99, 235, 0.2);
}

/* 消息提示样式 */
.alert {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
    border: 1px solid transparent;
    gap: 0.75rem;
    animation: slideIn 0.2s ease-out, fadeOut 0.3s ease-in 2s forwards;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    width: 3px;
    height: 24px;
    border-radius: 2px;
    background-color: currentColor;
}

.alert-success {
    background-color: rgba(5, 150, 105, 0.1);
    color: var(--success-color);
    border-color: rgba(5, 150, 105, 0.2);
}

.alert-success::before {
    background-color: var(--success-color);
}

.alert-error {
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--danger-color);
    border-color: rgba(220, 38, 38, 0.2);
}

.alert-error::before {
    background-color: var(--danger-color);
}

.alert-info {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-color: rgba(37, 99, 235, 0.2);
}

.alert-info::before {
    background-color: var(--primary-color);
}

.alert-warning {
    background-color: rgba(217, 119, 6, 0.1);
    color: var(--warning-color);
    border-color: rgba(217, 119, 6, 0.2);
}

.alert-warning::before {
    background-color: var(--warning-color);
}

/* 页标题样式 */
.page-title {
    color: var(--text-primary);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.5px;
}

.page-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 28px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* 字段列表和字段项样式 */
.field-list {
    margin-top: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-item {
    background: var(--bg-white);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    transition: all var(--transition-fast);
}

.field-item:hover {
    box-shadow: var(--shadow-sm);
    transform: none;
}

.field-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.field-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 0;
}

.field-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 0;
}

.field-actions {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: var(--bg-white);
    margin: 10% auto;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 800px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.close {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.close:hover {
    color: var(--text-primary);
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    gap: 0.75rem;
}

.modal-footer .btn {
    margin-left: 0;
}

/* 7. 工具类
   ========================================================================== */

/* 文本工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.85rem; }
.text-md { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* 文本颜色工具类 */
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }

/* 间距工具类 */
/* Margin */
.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 0.75rem !important; }
.m-4 { margin: 1rem !important; }
.m-5 { margin: 1.25rem !important; }
.m-6 { margin: 1.5rem !important; }
.m-8 { margin: 2rem !important; }

/* Margin Top */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-5 { margin-top: 1.25rem !important; }
.mt-6 { margin-top: 1.5rem !important; }
.mt-8 { margin-top: 2rem !important; }

/* Margin Bottom */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.25rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-8 { margin-bottom: 2rem !important; }

/* Margin Left */
.ml-0 { margin-left: 0 !important; }
.ml-1 { margin-left: 0.25rem !important; }
.ml-2 { margin-left: 0.5rem !important; }
.ml-3 { margin-left: 0.75rem !important; }
.ml-4 { margin-left: 1rem !important; }
.ml-5 { margin-left: 1.25rem !important; }

/* Margin Right */
.mr-0 { margin-right: 0 !important; }
.mr-1 { margin-right: 0.25rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.mr-3 { margin-right: 0.75rem !important; }
.mr-4 { margin-right: 1rem !important; }
.mr-5 { margin-right: 1.25rem !important; }

/* Margin X (left + right) */
.mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
.mx-1 { margin-left: 0.25rem !important; margin-right: 0.25rem !important; }
.mx-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
.mx-3 { margin-left: 0.75rem !important; margin-right: 0.75rem !important; }
.mx-4 { margin-left: 1rem !important; margin-right: 1rem !important; }
.mx-5 { margin-left: 1.25rem !important; margin-right: 1.25rem !important; }

/* Margin Y (top + bottom) */
.my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
.my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }
.my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.my-3 { margin-top: 0.75rem !important; margin-bottom: 0.75rem !important; }
.my-4 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.my-5 { margin-top: 1.25rem !important; margin-bottom: 1.25rem !important; }

/* Padding */
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }
.p-5 { padding: 1.25rem !important; }
.p-6 { padding: 1.5rem !important; }
.p-8 { padding: 2rem !important; }

/* Padding Top */
.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 0.75rem !important; }
.pt-4 { padding-top: 1rem !important; }
.pt-5 { padding-top: 1.25rem !important; }

/* Padding Bottom */
.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 0.75rem !important; }
.pb-4 { padding-bottom: 1rem !important; }
.pb-5 { padding-bottom: 1.25rem !important; }

/* Padding Left */
.pl-0 { padding-left: 0 !important; }
.pl-1 { padding-left: 0.25rem !important; }
.pl-2 { padding-left: 0.5rem !important; }
.pl-3 { padding-left: 0.75rem !important; }
.pl-4 { padding-left: 1rem !important; }
.pl-5 { padding-left: 1.25rem !important; }

/* Padding Right */
.pr-0 { padding-right: 0 !important; }
.pr-1 { padding-right: 0.25rem !important; }
.pr-2 { padding-right: 0.5rem !important; }
.pr-3 { padding-right: 0.75rem !important; }
.pr-4 { padding-right: 1rem !important; }
.pr-5 { padding-right: 1.25rem !important; }

/* Padding X (left + right) */
.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-5 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }

/* Padding Y (top + bottom) */
.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-5 { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }

/* 显示工具类 */
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-block { display: block; }
.d-none { display: none; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-inline-flex { display: inline-flex; }

/* Flex 工具类 */
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-row-reverse { flex-direction: row-reverse; }
.flex-column-reverse { flex-direction: column-reverse; }

.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }
.align-baseline { align-items: baseline; }
.align-stretch { align-items: stretch; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.flex-3 { flex: 3; }
.flex-4 { flex: 4; }
.flex-5 { flex: 5; }

.flex-grow-0 { flex-grow: 0; }
.flex-grow-1 { flex-grow: 1; }

.flex-shrink-0 { flex-shrink: 0; }
.flex-shrink-1 { flex-shrink: 1; }

/* 溢出控制 */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.overflow-visible { overflow: visible; }

/* 光标样式 */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-help { cursor: help; }
.cursor-text { cursor: text; }
.cursor-default { cursor: default; }

/* 边框工具类 */
.border { border: 1px solid var(--border-color); }
.border-0 { border: 0; }
.border-top { border-top: 1px solid var(--border-color); }
.border-right { border-right: 1px solid var(--border-color); }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.border-left { border-left: 1px solid var(--border-color); }

/* 圆角工具类 */
.rounded { border-radius: var(--radius-md); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* 阴影工具类 */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-none { box-shadow: none; }

/* 背景工具类 */
.bg-white { background-color: var(--bg-white); }
.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--bg-dark); }
.bg-primary { background-color: var(--primary-color); }
.bg-success { background-color: var(--success-color); }
.bg-danger { background-color: var(--danger-color); }
.bg-warning { background-color: var(--warning-color); }
.bg-info { background-color: var(--info-color); }

/* 文本工具类扩展 */
.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }
.text-underline { text-decoration: underline; }
.text-no-underline { text-decoration: none; }
.text-bold { font-weight: bold; }
.text-italic { font-style: italic; }

/* 过渡动画工具类 */
.transition-fast { transition: all var(--transition-fast); }
.transition-normal { transition: all var(--transition-normal); }
.transition-slow { transition: all var(--transition-slow); }

/* 定位工具类 */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-static { position: static; }

/* 尺寸工具类 */
.w-100 { width: 100%; }
.w-75 { width: 75%; }
.w-50 { width: 50%; }
.w-25 { width: 25%; }
.w-auto { width: auto; }

.h-100 { height: 100%; }
.h-75 { height: 75%; }
.h-50 { height: 50%; }
.h-25 { height: 25%; }
.h-auto { height: auto; }

.min-h-100 { min-height: 100%; }
.min-h-screen { min-height: 100vh; }

/* 文本溢出工具类 */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 可见性工具类 */
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* 8. 页面特定样式
   ========================================================================== */

/* 登录页面样式 */
.login-container {
    max-width: 480px;
    margin: 4rem auto;
    padding: 2.5rem;
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 600;
}

.login-container .form-group:last-child {
    margin-bottom: 1.5rem;
}

.login-container .btn {
    width: 100%;
    margin-top: 1rem;
}

/* 仪表盘样式 */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
}

.dashboard-card h3 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 600;
}

.dashboard-card .count {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.dashboard-card .subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 表单字段管理样式 */
.form-type-tabs {
    margin-bottom: 2rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.form-type-tab {
    padding: 0.7rem 1.4rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    color: var(--text-secondary);
}

.form-type-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.form-type-tab:hover:not(.active) {
    background: var(--bg-light);
    border-color: var(--border-light);
}

.required-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    margin-left: 0.5rem;
    vertical-align: middle;
    border: 1px solid var(--border-color);
}

.field-option {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.option-help {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* 数据库管理页面样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card .value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-card .sub-value {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.table-stats {
    margin-bottom: 2rem;
}

.table-stats table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-stats th,
.table-stats td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table-stats th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
}

.table-stats tr:hover {
    background-color: var(--bg-light);
}

.backup-list {
    margin-top: 1rem;
}

.backup-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 0.5rem;
    transition: all var(--transition-normal);
}

.backup-item:hover {
    background-color: var(--bg-light);
    border-color: var(--border-light);
}

.backup-info {
    flex: 1;
}

.backup-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.backup-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.backup-actions {
    display: flex;
    gap: 0.5rem;
}

.maintenance-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.operation-info {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1rem;
}

.operation-info h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.operation-info ul {
    line-height: 1.6;
    color: var(--text-secondary);
}

.operation-info li {
    margin-bottom: 0.5rem;
}

.operation-info strong {
    color: var(--text-primary);
}

/* 分页样式 */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.pagination .page-item {
    margin: 0 0.25rem;
}

.pagination .page-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 搜索表单样式 */
.search-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.search-form .form-group {
    flex: 1;
    min-width: 200px;
}

.search-form label {
    display: block;
    margin-bottom: 0.5rem;
}

.search-form .btn {
    align-self: flex-end;
}

/* 可签合同页面样式 */
.success-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* 报价卡片容器 */
.quotes-container {
    display: grid;
    gap: 1.5rem;
}

/* 报价卡片 */
.quote-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
    background: linear-gradient(135deg, var(--bg-white) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.quote-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px) scale(1.01);
    border-color: var(--primary-color);
}

/* 紧急报价 */
.quote-card.emergency {
    border-left: 6px solid var(--danger-color);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.03) 0%, var(--bg-white) 100%);
}

/* 报价头部 */
.quote-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

/* 卡片装饰元素 */
.quote-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), transparent);
    opacity: 0.05;
    border-radius: 0 0 0 50%;
    z-index: 0;
}

.quote-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.quote-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 状态标签 */
.quote-status {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.825rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.3s ease;
}

.status-badge:hover::before {
    left: 100%;
}

.status-badge.pending {
    background-color: var(--warning-color);
    color: white;
}

.status-badge.valid {
    background-color: var(--success-color);
    color: white;
}

.status-badge.expired {
    background-color: var(--danger-color);
    color: white;
}

.status-badge.emergency {
    background-color: var(--danger-color);
    color: white;
    animation: pulse-danger 1.5s infinite;
}

/* 报价元数据 */
.quote-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    position: relative;
    z-index: 1;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transition: all var(--transition-fast);
}

.meta-item:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.meta-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}

/* 报价内容 */
.quote-content {
    padding: 1.5rem;
}

/* 报价详情网格 */
.quote-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.detail-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.detail-item:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.detail-item:hover::before {
    opacity: 1;
}

.detail-item:hover .detail-label,
.detail-item:hover .detail-value {
    color: white;
}

.detail-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    transition: all var(--transition-fast);
}

.detail-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.detail-value.price {
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-item:hover .detail-value.price {
    color: white;
    -webkit-text-fill-color: white;
}

/* 价格标签特殊处理 */
.detail-item.price-item {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, var(--bg-white) 100%);
}

/* 审核区域 */
.audit-section {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* 审核表单 */
.audit-form {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* 9. 动画
   ========================================================================== */

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

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
        height: 0;
        padding: 0;
        margin: 0;
        border: 0;
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

@keyframes pulse-danger {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

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

@media (max-width: 1200px) {
    .container, .wide-container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .card {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .navbar-nav {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 0;
    }
    
    .navbar {
        position: static;
    }
    
    .header {
        position: static;
    }
    
    .sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .app-container {
        grid-template-areas: 
            "header"
            "main"
            "footer";
        grid-template-columns: 1fr;
    }
    
    .dashboard-cards, .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 {
        grid-template-columns: 1fr;
    }
    
    .quote-details {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table th, .table td {
        padding: 0.75rem 1rem;
    }
    
    .table th:first-child, .table td:first-child {
        padding-left: 0.75rem;
    }
    
    .table th:last-child, .table td:last-child {
        padding-right: 0.75rem;
    }
    
    .table-actions {
        gap: 0.25rem;
        flex-wrap: wrap;
    }
    
    .table-actions .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .field-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .field-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .form-type-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0.75rem;
    }
    
    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-inline .form-group {
        min-width: 100%;
    }
    
    .page-title {
        font-size: 1.6rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .alert {
        padding: 1rem 1.25rem;
    }
    
    .quote-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .quote-meta {
        gap: 1rem;
    }
    
    .audit-form {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 576px) {
    .container, .wide-container {
        padding: 0 16px;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    .page-title {
        font-size: 1.4rem;
    }
    
    .login-container {
        padding: 2rem 1.5rem;
        margin: 2rem 1rem;
    }
}

/* 11. 其他样式
   ========================================================================== */

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 3px;
}

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

/* 水印样式 */
.watermark {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.watermark-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
}

.watermark-item {
    position: absolute;
    transform: rotate(-45deg);
    font-size: 32px;
    font-weight: bold;
    color: #000;
    white-space: nowrap;
    letter-spacing: 2px;
    width: 500px;
    text-align: center;
}

.watermark-time {
    display: block;
    font-size: 24px;
    margin-top: 10px;
    font-weight: normal;
}

/* 响应式水印 */
@media (max-width: 768px) {
    .watermark-item {
        font-size: 24px;
        width: 300px;
    }
    
    .watermark-time {
        font-size: 18px;
        margin-top: 8px;
    }
}

/* Logo预览样式 */
.logo-preview {
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-preview img {
    max-width: 200px;
    max-height: 100px;
    object-fit: contain;
}

.logo-size-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.logo-size-controls .form-group {
    flex: 1;
    max-width: 150px;
}

.footer-preview {
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-align: center;
}

/* 表格悬停效果 */
.table-hover tbody tr {
    transition: all 0.3s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 235, 0.05);
}

/* 代管操作记录样式 */
.action-card {
    transition: all 0.3s ease;
}

.action-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state h3 {
    margin: 1.5rem 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.empty-state-icon svg {
    width: 64px;
    height: 64px;
    color: #94a3b8;
    margin-bottom: 1.5rem;
}