/* 恰好宴席 - 全局样式表 */
:root {
    --brand-orange: #FF6A1A;
    --brand-orange-light: #FF8A4A;
    --brand-orange-dark: #E55A0F;
    --brand-orange-bg: #FFF3EB;
    --success: #2BB673;
    --warning: #F5A623;
    --danger: #E74C3C;
    --info: #3498DB;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --bg-page: #F5F7FA;
    --bg-card: #FFFFFF;
    --border-color: #E5E7EB;
    --border-light: #F3F4F6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 24px rgba(0,0,0,0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --sidebar-width: 230px;
    --sidebar-collapsed: 60px;
    --header-height: 60px;
}

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-page);
    font-size: 14px;
    line-height: 1.5;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; outline: none; }
a { color: var(--brand-orange); text-decoration: none; }

/* ========== 登录页 ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06) 0%, transparent 50%);
    pointer-events: none;
}

.login-container {
    display: flex;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    max-width: 960px;
    width: 100%;
    min-height: 540px;
    position: relative;
    z-index: 1;
}

.login-brand {
    flex: 1;
    background: linear-gradient(135deg, var(--brand-orange) 0%, #FF8A4A 100%);
    color: #fff;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.login-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.15) 0%, transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(255,255,255,0.1) 0%, transparent 40%);
}

.login-logo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.login-logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.login-brand h1 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    letter-spacing: 2px;
}

.login-brand .pinyin {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

.login-brand .slogan {
    font-size: 18px;
    padding: 12px 28px;
    background: rgba(255,255,255,0.18);
    border-radius: 30px;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

.login-form-wrap {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-wrap h2 {
    font-size: 26px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.login-form-wrap .sub {
    color: var(--text-secondary);
    margin-bottom: 48px;
    font-size: 14px;
}

.login-form { display: flex; flex-direction: column; gap: 24px; }

.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
    z-index: 2;
    width: 24px;
    text-align: center;
    transition: opacity 0.15s ease;
}

/* 输入（聚焦）时隐藏图标，避免与输入内容重叠 */
.input-wrap:has(input:focus) .icon { opacity: 0; }

.input-wrap input {
    width: 100%;
    padding: 14px 16px 14px 58px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #F3F4F6;
}

/* 可搜索下拉组件 SearchSelect */
.search-select { position: relative; width: 100%; }
.search-select .ss-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: var(--radius-md); font-size: 14px; box-sizing: border-box; background: #fff; }
.search-select.open .ss-input, .search-select .ss-input:focus { border-color: var(--brand-orange); box-shadow: 0 0 0 3px rgba(255,106,26,0.12); outline: none; }
.search-select .ss-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; max-height: 260px; overflow-y: auto; background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: 0 6px 20px rgba(0,0,0,0.12); z-index: 60; margin: 0; padding: 4px; list-style: none; display: none; }
.search-select.open .ss-list { display: block !important; }
.search-select .ss-opt { padding: 8px 10px; cursor: pointer; border-radius: 6px; font-size: 14px; }
.search-select .ss-opt:hover { background: #FFF3E9; }
.search-select .ss-opt.active { background: #FFE0CC; color: var(--brand-orange); font-weight: 600; }
.search-select .ss-arrow { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); cursor: pointer; font-size: 12px; pointer-events: auto; z-index: 2; }
.search-select .ss-arrow:hover { color: var(--brand-orange); }
.search-select.open .ss-arrow { transform: translateY(-50%) rotate(180deg); }

.input-wrap input:hover {
    background: #E9ECEF;
}

.input-wrap input:focus {
    border-color: var(--brand-orange);
    background: #EEF2FF;
    box-shadow: 0 0 0 3px rgba(255,106,26,0.12);
    outline: none;
}

.input-wrap input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.btn-primary {
    background: var(--brand-orange);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary:hover { background: var(--brand-orange-dark); }
.btn-primary:active { transform: scale(0.98); }

.btn-primary.btn-lg {
    padding: 14px 20px;
    font-size: 16px;
    width: 100%;
    margin-top: 8px;
}

.login-tools {
    margin-top: 16px;
    text-align: right;
    font-size: 13px;
}

.login-tools a {
    color: var(--brand-orange);
    text-decoration: none;
}

.login-tools a:hover {
    text-decoration: underline;
}

.login-tip {
    margin-top: 18px;
    padding: 12px 14px;
    background: var(--brand-orange-bg);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.7;
}

.login-tip b { color: var(--brand-orange); }

/* ========== 主框架 ========== */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-page);
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: #FFFFFF;
    color: var(--text-primary);
    flex-shrink: 0;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width 0.3s;
    border-right: 1px solid var(--border-color);
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
    color: #fff;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-logo-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar.collapsed .sidebar-header { padding: 0; justify-content: center; }
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .menu-text,
.sidebar.collapsed .menu-arrow { display: none; }

.sidebar-title { font-size: 16px; letter-spacing: 1px; }

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

.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 2px; }

.menu-group { margin-bottom: 2px; }

.menu-item {
    display: flex;
    align-items: center;
    padding: 11px 16px;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-secondary);
    font-size: 14px;
    user-select: none;
    position: relative;
    white-space: nowrap;
}

.menu-item:hover { background: var(--brand-orange-bg); color: var(--brand-orange); }

.menu-item .menu-icon {
    width: 18px;
    text-align: center;
    margin-right: 10px;
    flex-shrink: 0;
    font-size: 15px;
}

.menu-item .menu-text { flex: 1; }
.menu-item .menu-arrow {
    font-size: 10px;
    transition: transform 0.2s;
    opacity: 0.6;
}

.menu-item.expanded .menu-arrow { transform: rotate(90deg); }

.menu-item.active {
    background: var(--brand-orange) !important;
    color: #fff !important;
    font-weight: 500;
}

.submenu {
    background: var(--bg-page);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s;
}

.submenu.expanded { max-height: 600px; }

.submenu-item {
    padding: 9px 16px 9px 44px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 13px;
    transition: all 0.15s;
    white-space: nowrap;
    position: relative;
}

.submenu-item:hover { background: var(--brand-orange-bg); color: var(--brand-orange); }
.submenu-item.active {
    background: var(--brand-orange) !important;
    color: #fff !important;
    font-weight: 500;
}

.submenu-item.active::before {
    content: '';
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 14px;
    background: #fff;
    border-radius: 2px;
}

/* 主内容区 */
.main-area {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s;
}

.sidebar.collapsed ~ .main-area { margin-left: var(--sidebar-collapsed); }

.top-bar {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.top-bar-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.top-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all 0.2s;
}
.top-toggle:hover { background: var(--bg-page); color: var(--brand-orange); }

.breadcrumb {
    flex: 1;
    color: var(--text-secondary);
    font-size: 14px;
}

.breadcrumb .sep { margin: 0 8px; color: var(--text-muted); }
.breadcrumb .current { color: var(--text-primary); font-weight: 500; }

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
}
.user-info:hover { background: var(--bg-page); }
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

/* 内容区 */
.page-content {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
    position: relative;
}

/* 自定义滚动条 */
.page-content::-webkit-scrollbar {
    width: 8px;
}
.page-content::-webkit-scrollbar-track {
    background: transparent;
}
.page-content::-webkit-scrollbar-thumb {
    background: rgba(255,106,26,0.3);
    border-radius: 4px;
}
.page-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,106,26,0.5);
}
.page-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,106,26,0.3) transparent;
}

/* 顶部滚动进度条 */
.scroll-progress {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    z-index: 100;
    pointer-events: none;
}
.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-orange), var(--brand-orange-dark));
    width: 0%;
    transition: width 0.1s ease-out;
    border-radius: 0 3px 3px 0;
}

.page-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--brand-orange);
    border-radius: 2px;
}

.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* 通用按钮 */
.btn {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-default {
    background: #fff;
    border-color: var(--border-color);
    color: var(--text-primary);
}
.btn-default:hover { border-color: var(--brand-orange); color: var(--brand-orange); }

.btn-orange {
    background: var(--brand-orange);
    color: #fff;
}
.btn-orange:hover { background: var(--brand-orange-dark); }

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

.btn-link {
    color: var(--brand-orange);
    padding: 2px 4px;
    background: none;
    font-size: 13px;
}
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--danger); }

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 20px; font-size: 15px; }

.btn-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: transparent;
    color: var(--text-secondary);
}
.btn-icon:hover { background: var(--bg-page); color: var(--brand-orange); }

/* 工具栏 */
.toolbar {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar .filter-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.toolbar input,
.toolbar select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
    min-width: 120px;
}

.toolbar input:focus,
.toolbar select:focus { border-color: var(--brand-orange); }

.toolbar input[type="date"] { min-width: 140px; }

.toolbar .spacer { flex: 1; }

/* 表格 */
.data-card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    overflow-x: auto;
}

.data-card::-webkit-scrollbar { height: 8px; }
.data-card::-webkit-scrollbar-track { background: #F3F4F6; border-radius: 4px; }
.data-card::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }
.data-card::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

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

.data-table thead th {
    background: #FAFAFA;
    color: var(--text-primary);
    font-weight: 600;
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.data-table tbody tr:hover { background: var(--bg-page); }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .actions { white-space: nowrap; }
.data-table .actions .btn-link { margin: 0 3px; }

.data-table .col-checkbox,
.data-table .col-index,
.data-table .col-actions { width: 60px; text-align: center; }
.data-table .col-checkbox { width: 40px; }

/* 标签/徽章 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    background: #F3F4F6;
    color: var(--text-secondary);
}
.tag-orange { background: var(--brand-orange-bg); color: var(--brand-orange); }
.tag-success { background: #D1FAE5; color: #065F46; }
.tag-warning { background: #FEF3C7; color: #92400E; }
.tag-danger { background: #FEE2E2; color: #991B1B; }
.tag-info { background: #DBEAFE; color: #1E40AF; }

/* 搜索可点选结果（套餐表单内菜品/酒水搜索） */
.pick-results { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; max-height: 132px; overflow-y: auto; }
.pick-chip {
    display: inline-block; padding: 4px 10px; border-radius: 14px; background: var(--brand-orange-bg);
    color: var(--brand-orange); font-size: 12px; cursor: pointer; border: 1px solid #FFE0CC;
    transition: background .15s;
}
.pick-chip:hover { background: var(--brand-orange); color: #fff; }

/* 状态 */
.status-pending { color: var(--warning); }
.status-confirmed { color: var(--info); }
.status-progress { color: var(--brand-orange); }
.status-done { color: var(--success); }
.status-cancel { color: var(--text-muted); text-decoration: line-through; }

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: 10px;
}

.pagination .info { color: var(--text-secondary); font-size: 13px; }

.pagination .controls { display: flex; gap: 4px; align-items: center; }

.page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.page-btn:hover { border-color: var(--brand-orange); color: var(--brand-orange); }
.page-btn.active { background: var(--brand-orange); border-color: var(--brand-orange); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* 空状态 */
.empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}
.empty .icon { font-size: 48px; margin-bottom: 10px; opacity: 0.5; }
.empty .text { font-size: 14px; }

/* 弹窗 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease-out;
}

.modal.modal-lg { max-width: 900px; }
.modal.modal-xl { max-width: 1100px; }
.modal.modal-sm { max-width: 400px; }

@keyframes modalIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FAFAFA;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 20px;
    background: transparent;
}
.modal-close:hover { background: var(--bg-page); color: var(--danger); }

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

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: #FAFAFA;
}

/* 表单 */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
}

.form-grid .form-field.full { grid-column: 1 / -1; }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.form-field label .req { color: var(--danger); margin-left: 2px; }

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 14px;
    transition: all 0.15s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(255,106,26,0.08);
}

.form-field textarea { resize: vertical; min-height: 70px; }

.form-field .hint { font-size: 12px; color: var(--text-muted); }
.form-field .err { font-size: 12px; color: var(--danger); }

/* 详情视图 */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
}

.detail-row {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    padding: 8px 0;
}

.detail-label {
    color: var(--text-secondary);
    width: 100px;
    flex-shrink: 0;
    font-size: 13px;
}

.detail-value { flex: 1; color: var(--text-primary); font-size: 14px; }

.detail-section {
    margin-bottom: 20px;
}

.detail-section h4 {
    font-size: 15px;
    color: var(--brand-orange);
    border-left: 3px solid var(--brand-orange);
    padding-left: 10px;
    margin-bottom: 12px;
}

/* 数据看板 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card .label { color: var(--text-secondary); font-size: 13px; }
.stat-card .value { font-size: 26px; font-weight: 700; color: var(--text-primary); margin: 6px 0; }
.stat-card .extra { font-size: 12px; color: var(--text-muted); }
.stat-card .icon-bg {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--brand-orange-bg);
    color: var(--brand-orange);
}
.stat-card.success .icon-bg { background: #D1FAE5; color: var(--success); }
.stat-card.warning .icon-bg { background: #FEF3C7; color: var(--warning); }
.stat-card.info .icon-bg { background: #DBEAFE; color: var(--info); }
.stat-card.danger .icon-bg { background: #FEE2E2; color: var(--danger); }

.dashboard-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.panel {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.panel-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.quick-btn {
    padding: 16px 12px;
    background: var(--brand-orange-bg);
    color: var(--brand-orange);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.quick-btn:hover {
    background: var(--brand-orange);
    color: #fff;
    transform: translateY(-2px);
}

.quick-btn .icon { font-size: 22px; display: block; margin-bottom: 4px; }

/* 警告提醒 */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.alert-warning { background: #FEF3C7; color: #92400E; border-left: 3px solid var(--warning); }
.alert-danger { background: #FEE2E2; color: #991B1B; border-left: 3px solid var(--danger); }
.alert-info { background: #DBEAFE; color: #1E40AF; border-left: 3px solid var(--info); }
.alert-success { background: #D1FAE5; color: #065F46; border-left: 3px solid var(--success); }

/* 选项卡（视图切换） */
.tab-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.tab-btn {
    padding: 7px 18px;
    border: 1px solid var(--border, #e2e8f0);
    background: #fff;
    color: var(--text-secondary, #64748b);
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    transition: all .15s;
}
.tab-btn:hover { border-color: var(--brand-orange, #f97316); color: var(--brand-orange, #f97316); }
.tab-btn.active { background: var(--brand-orange, #f97316); border-color: var(--brand-orange, #f97316); color: #fff; font-weight: 600; }

/* 进度条 */
.progress {
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: var(--brand-orange);
    transition: width 0.3s;
}
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger { background: var(--danger); }

/* Tab 切换 */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 16px;
    gap: 4px;
    overflow-x: auto;
}

.tab {
    padding: 10px 18px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    white-space: nowrap;
}

.tab:hover { color: var(--brand-orange); }
.tab.active {
    color: var(--brand-orange);
    border-bottom-color: var(--brand-orange);
    font-weight: 500;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    border-radius: var(--radius-md);
    z-index: 9999;
    font-size: 14px;
    animation: toastIn 0.3s;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

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

/* 图表占位 */
.chart {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-page);
    border-radius: var(--radius-md);
    color: var(--text-muted);
}

/* 打印样式 */
@media print {
    .sidebar, .top-bar, .toolbar, .page-actions, .pagination, .modal-header, .modal-footer { display: none !important; }
    .main-area { margin-left: 0 !important; }
    .page-content { padding: 0 !important; }
    body { background: #fff !important; }
    .data-card, .panel { box-shadow: none !important; border: 1px solid #ccc; }
    .modal-overlay { position: static !important; background: none !important; padding: 0 !important; display: block !important; }
    .modal { box-shadow: none !important; max-height: none !important; }
    .modal-body { padding: 0 !important; overflow: visible !important; }
    .print-header { display: block !important; }
}

.print-header { display: none; text-align: center; padding: 20px 0; border-bottom: 2px solid var(--brand-orange); margin-bottom: 20px; }
.print-header h1 { font-size: 22px; color: var(--brand-orange); }
.print-header .info { color: var(--text-secondary); font-size: 13px; margin-top: 6px; }
.print-header .print-logo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; display: block; }
.print-footer { display: none; text-align: center; margin-top: 30px; padding-top: 10px; border-top: 1px solid #ccc; color: var(--text-muted); font-size: 12px; }
@media print {
    .print-footer { display: block; }
    .print-watermark {
        display: block;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-30deg);
        font-size: 80px;
        font-weight: 700;
        color: rgba(255, 106, 26, 0.08);
        z-index: 0;
        pointer-events: none;
        white-space: nowrap;
    }
}
.print-watermark { display: none; }

/* 内容区顶部Logo */
.content-logo-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}
.content-logo-bar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.content-logo-bar .content-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-orange);
    letter-spacing: 2px;
}

/* 复选框 */
.checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    transition: all 0.15s;
}
.checkbox:checked {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
}
.checkbox:checked::after {
    content: '✓';
    color: #fff;
    position: absolute;
    top: -2px;
    left: 2px;
    font-size: 12px;
    font-weight: 700;
}

/* 选择器预览列表 */
.picker-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.picker-item {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s;
}

.picker-item:hover { background: var(--brand-orange-bg); }
.picker-item.selected { background: var(--brand-orange-bg); color: var(--brand-orange); }
.picker-item:last-child { border-bottom: none; }

/* 响应式 */
@media (max-width: 1100px) {
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-row { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
}

/* 条形统计图 */
.bar-chart { padding: 8px 0; }
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bar-label { width: 60px; text-align: right; font-size: 13px; color: var(--text-secondary); flex-shrink: 0; }
.bar-track { flex: 1; height: 28px; background: var(--bg-page); border-radius: 14px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--brand-orange) 0%, var(--brand-orange-light) 100%); border-radius: 14px; display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; min-width: 30px; transition: width 0.5s ease; }
.bar-fill-orange { background: linear-gradient(90deg, var(--brand-orange-dark) 0%, var(--brand-orange) 100%); }
.bar-value { color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.bar-amount { width: 90px; font-size: 13px; color: var(--text-primary); font-weight: 500; flex-shrink: 0; }

/* 日程列表（工作台） */
.schedule-list { padding: 4px 0; }
.schedule-item:last-child { border-bottom: none !important; }
.today-banner { background: linear-gradient(135deg, #fff5ed 0%, #fff 100%); }
