/* 云触角千机阁 - 淡蓝简洁风格 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body { min-height: 100%; font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #eef2ff; color: #333; }

:root {
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --bg-main: #eef2ff;
  --bg-card: #ffffff;
  --bg-hover: #e0e7ff;
  --bg-input: #f8faff;
  --border: #dbeafe;
  --border-focus: #2563eb;
  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(37,99,235,0.08);
}

/* ========== 按钮 ========== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border: none; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--bg-hover); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #c7d2fe; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: #d4a017; color: #fff; }
.btn-info { background: #60a5fa; color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: #eff6ff; }
.btn-danger-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-danger-outline:hover { border-color: #ef4444; color: #ef4444; background: #fee2e2; }
.badge-gray { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.btn { writing-mode: horizontal-tb !important; }
.btn-sm { writing-mode: horizontal-tb !important; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }

/* ========== 输入框（全局统一） ========== */
input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: all 0.2s;
}
input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="password"],
input[type="search"],
textarea,
select,
.input,
.form-input,
.form-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  -webkit-appearance: none;
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus,
.input:focus,
.form-input:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
  background: #fff;
}
input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}
textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.6;
}
select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
select option {
  background: #fff;
  color: var(--text);
}
/* 日期选择器 */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: opacity(0.6);
  cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
/* 数字去除箭头 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }
/* 自动填充修复 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 100px var(--bg-input) inset;
  -webkit-text-fill-color: var(--text);
  transition: background-color 9999s ease-out;
}

/* ========== 卡片 ========== */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ========== 表格 ========== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap .table { min-width: 700px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table thead th { padding: 12px 14px; text-align: left; font-size: 12px; font-weight: 600; color: var(--text-secondary); background: #eff6ff; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table tbody tr:hover { background: var(--bg-hover); }
.table tbody td { padding: 12px 14px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ========== 徽章 ========== */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge-cyan { background: #e0f2fe; color: #0369a1; }
.badge-purple { background: #ede9fe; color: #7c3aed; }
.badge-red { background: #fee2e2; color: #dc2626; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-yellow { background: #fef3c7; color: #b45309; }

/* ========== 登录页 ========== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eef2ff, #e0e7ff); padding: 20px; }
.login-card { width: 100%; max-width: 400px; padding: 40px; text-align: center; }
.login-card h2 { font-size: 24px; color: var(--primary); margin-bottom: 8px; }
.login-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 32px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .input-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; text-align: left; }
.login-btn { width: 100%; padding: 12px; font-size: 15px; font-weight: 600; }

/* ========== 主应用 ========== */
.app-desktop { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar { width: var(--sidebar-w); height: 100vh; position: fixed; top: 0; left: 0; background: var(--bg-card); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 100; overflow-y: auto; }
.sidebar-logo { padding: 20px; border-bottom: 1px solid var(--border); }
.sidebar-logo h1 { font-size: 18px; font-weight: 600; color: var(--primary); }
.sidebar-logo p { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-section-title { font-size: 11px; color: #94a3b8; padding: 12px 20px 6px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; font-size: 14px; color: var(--text-secondary); cursor: pointer; transition: all 0.15s; }
.nav-item:hover { color: var(--text); background: var(--bg-hover); }
.nav-item.active { color: var(--primary); background: #dbeafe; font-weight: 500; }
.nav-item i { width: 20px; text-align: center; }
.sidebar-user { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.sidebar-user .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: #fff; }
.sidebar-user .user-info .name { font-size: 14px; font-weight: 500; }
.sidebar-user .user-info .role { font-size: 11px; color: var(--text-muted); }
.sidebar-user .online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

/* 主区域 */
.main-area { flex: 1; margin-left: var(--sidebar-w); background: var(--bg-main); }

/* 顶栏 */
.topbar { height: var(--topbar-h); display: flex; align-items: center; padding: 0 24px; border-bottom: 1px solid var(--border); background: var(--bg-card); position: sticky; top: 0; z-index: 50; }
.topbar-title { font-size: 16px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.topbar-title i { color: var(--primary); }
.topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topbar-clock { font-family: monospace; font-size: 13px; color: var(--text-muted); }
.menu-btn { display: none; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg-hover); cursor: pointer; border: none; font-size: 18px; color: var(--text-secondary); }

/* 内容 */
.content { padding: 24px; padding-bottom: 40px; }
.page { display: none; }
.page.active { display: block; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 20px; background: linear-gradient(135deg, #fff, #eff6ff); }
.stat-card .stat-label { font-size: 13px; color: var(--text-secondary); }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--text); margin-top: 8px; }
.stat-card .stat-sub { font-size: 12px; color: var(--text-muted); }

/* 筛选栏 */
.filter-bar { display: flex; gap: 12px; padding: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-label { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }

/* 图表 */
.charts-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.chart-card { padding: 20px; background: linear-gradient(135deg, #fff, #eff6ff); }
.chart-title { font-size: 14px; font-weight: 600; margin-bottom: 16px; }

/* ========== 弹窗 ========== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.25s; }
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal { background: var(--bg-card); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(37,99,235,0.15); width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto; transform: scale(0.95) translateY(10px); transition: transform 0.25s; }
.modal-overlay.show .modal { transform: scale(1) translateY(0); }
.modal h3 { font-size: 16px; font-weight: 600; padding: 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; color: var(--text); }
.modal-close { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; border: none; background: var(--bg-hover); color: var(--text-muted); cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: #c7d2fe; color: var(--text); }
.modal-form { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.modal-form .form-group { display: flex; flex-direction: column; }
.modal-form .form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.modal-form .form-row { display: flex; gap: 12px; }
.modal-form .form-row .form-group { flex: 1; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--border); }

/* ========== Toast ========== */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px); padding: 12px 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 14px; z-index: 1001; transition: transform 0.3s; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

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

/* ========== 快捷入口 ========== */
.links-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.link-card { padding: 24px; text-align: center; cursor: pointer; }
.link-card:hover { border-color: var(--primary); background: #eff6ff; }
.link-card .link-icon { font-size: 36px; margin-bottom: 12px; color: var(--primary); }
.link-card .link-name { font-size: 14px; font-weight: 500; }

/* 快捷入口 - 列表卡片样式 */
.links-list { display: flex; flex-direction: column; gap: 12px; }
.link-item-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; transition: all 0.15s; }
.link-item-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(59,130,246,0.08); }
.link-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.link-item-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.link-item-actions { display: flex; gap: 8px; }
.link-item-body { display: flex; flex-direction: column; gap: 8px; }
.link-item-row { display: flex; align-items: center; gap: 12px; }
.link-item-label { font-size: 13px; color: var(--text-muted); min-width: 36px; flex-shrink: 0; }
.link-item-value { font-size: 13px; color: var(--text-secondary); word-break: break-all; }
.link-item-url { font-size: 13px; color: var(--primary); text-decoration: none; word-break: break-all; }
.link-item-url:hover { text-decoration: underline; }
.link-item-pwd-wrap { display: flex; align-items: center; gap: 8px; }
.link-item-pwd { font-size: 13px; color: var(--text-secondary); font-family: 'Courier New', monospace; letter-spacing: 1px; }
.btn-pwd-toggle { font-size: 12px; padding: 2px 10px; border-radius: 4px; border: 1px solid var(--border); background: var(--bg-hover); color: var(--text-secondary); cursor: pointer; }
.btn-pwd-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* ========== 排班 ========== */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.calendar-cell { background: var(--bg-card); min-height: 80px; padding: 8px; }
.calendar-cell .cal-day { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.time-slot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--bg-card); border: 1px solid var(--border); }
.slot-staff { font-size: 13px; font-weight: 500; }
.slot-time { font-size: 12px; color: #dc2626 !important; padding: 4px 10px; background: #fee2e2 !important; border-radius: 6px; }
.slot-shop { padding: 3px 10px; border-radius: 12px; font-size: 12px; background: #dcfce7; color: #15803d; border: 1px solid rgba(34,197,94,0.3); }
.slot-shop-blue { padding: 3px 10px; border-radius: 12px; font-size: 12px; background: #dbeafe; color: #1e40af; border: 1px solid rgba(59,130,246,0.3); margin-right: 6px; }

/* ========== 分页 ========== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px; }
.page-btn { min-width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 13px; transition: all 0.15s; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ========== 文件上传 ========== */
.file-upload, .upload-area, .drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px; text-align: center; cursor: pointer; transition: all 0.2s;
  background: var(--bg-input);
}
.file-upload:hover, .upload-area:hover, .drop-zone:hover {
  border-color: var(--primary);
  background: #dbeafe;
}
.file-preview img { max-width: 100%; max-height: 200px; border-radius: var(--radius-sm); }

/* ========== 苹果卡 ========== */
.applecard-list { display: flex; flex-direction: column; gap: 12px; }
.applecard-item { padding: 16px 20px; display: flex; align-items: center; gap: 16px; cursor: pointer; }
.applecard-item:hover { background: var(--bg-hover); }
.applecard-info { flex: 1; }
.applecard-info .name { font-size: 14px; font-weight: 500; }
.applecard-info .desc { font-size: 12px; color: var(--text-muted); }

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    z-index: 200;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sidebar.show { transform: translateX(0); }

  .main-area { margin-left: 0; }

  .menu-btn { display: flex; }

  .content { padding: 16px; }

  /* 顶栏标题居中 */
  .topbar { justify-content: center; position: relative; }
  .topbar-title { position: absolute; left: 50%; transform: translateX(-50%); }
  .topbar-actions { margin-left: auto; }

  /* 统计卡片 */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { padding: 12px; min-width: 0; flex: 1 1 45%; }
  .stat-card .stat-value { font-size: 18px; }
  .dashboard-stats { flex-wrap: wrap; gap: 8px; }
  .chart-card { padding: 12px; }
  .chart-row { flex-direction: column; }
  .chart-col { width: 100%; }

  /* 图表 */
  .charts-grid { grid-template-columns: 1fr; }

  /* 筛选栏 */
  .filter-bar { flex-direction: column; gap: 10px; padding: 12px; }
  .filter-group { width: 100%; flex-direction: column; align-items: flex-start; gap: 4px; }
  .filter-group select { width: 100%; }
  .filter-bar .btn { width: 100%; justify-content: center; }

  /* 表格 */
  .table-wrap {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
  }
  .table-wrap::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to right, transparent, rgba(37,99,235,0.1));
    pointer-events: none;
  }
  .table { min-width: 800px; }
  .table-actions { flex-wrap: wrap; }

  /* 链接 */
  .links-list { gap: 8px; }
  .link-item-card { padding: 12px 14px; }
  .link-item-title { font-size: 14px; }

  /* 弹窗 - 底部抽屉式 */
  .modal-overlay { align-items: flex-end; }
  .modal {
    max-width: 100%; width: 100%;
    margin: 0;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .modal-overlay.show .modal { transform: translateY(0); }
  .modal h3 { padding: 16px 20px; font-size: 16px; }
  .modal-form { padding: 16px 20px; gap: 14px; }
  .modal-form .form-row { flex-direction: column; gap: 14px; }
  .modal-actions {
    flex-direction: column; gap: 10px;
    padding: 12px 20px 24px;
    border-top: none;
  }
  .modal-actions .btn { width: 100%; }

  /* 日历 */
  .calendar-cell { min-height: 60px; padding: 4px; }
  .time-slot { flex-direction: column; align-items: flex-start; gap: 6px; }
  .time-slot .slot-time { width: auto; }

  /* 按钮 */
  .btn { padding: 10px 16px; }
  .btn-sm { padding: 6px 10px; font-size: 12px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card .stat-value { font-size: 20px; }
  .stat-card .stat-label { font-size: 12px; }
  .links-list { gap: 6px; }
  .link-item-card { padding: 10px 12px; }
  .link-item-header { flex-wrap: wrap; }
  .link-item-actions { margin-top: 6px; width: 100%; justify-content: flex-end; }
}

/* ========== 遮罩层 ========== */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 199; opacity: 0; pointer-events: none; transition: all 0.3s; }
.drawer-overlay.show { opacity: 1; pointer-events: auto; }

/* ========== 桌面/移动端切换 ========== */
.mobile-only { display: none; }
.desktop-only { display: block; }

/* ========== 统计小卡片 ========== */
.stat-mini { display: inline-flex; flex-direction: column; gap: 2px; padding: 6px 12px; background: var(--bg-input); border-radius: var(--radius-sm); }
.stat-mini .stat-label { font-size: 11px; color: var(--text-muted); }
.stat-mini .stat-value { font-size: 14px; font-weight: 600; color: var(--text); }
/* 苹果卡统计样式 */
.ac-stat { display: flex; flex-direction: column; align-items: center; padding: 16px 24px; border-radius: 16px; min-width: 120px; }
  @media (max-width: 768px) { .ac-stat { padding: 12px 16px; min-width: 80px; flex: 1 1 45%; } .ac-stat-row { flex-wrap: wrap; gap: 8px; } }
.ac-stat-label { font-size: 13px; margin-bottom: 4px; font-weight: 500; }
.ac-stat-value { font-size: 28px; font-weight: 700; }
/* 总计 - 蓝色 */
.ac-stat-total { background: #dbeafe; }
.ac-stat-total .ac-stat-label { color: #3b82f6; }
.ac-stat-total .ac-stat-value { color: #1e40af; }
/* 可用 - 绿色 */
.ac-stat-avail { background: #fee2e2; }
.ac-stat-avail .ac-stat-label { color: #dc2626; }
.ac-stat-avail .ac-stat-value { color: #b91c1c; }
/* 已用 - 灰色 */
.ac-stat-used { background: #dcfce7; }
.ac-stat-used .ac-stat-label { color: #22c55e; }
.ac-stat-used .ac-stat-value { color: #166534; }
/* 总余额 - 金色 */
.ac-stat-bal { background: #fff7ed; }
.ac-stat-bal .ac-stat-label { color: #ea580c; }
.ac-stat-bal .ac-stat-value { color: #c2410c; }

@media (max-width: 768px) {
  .mobile-only { display: block; }
  .desktop-only { display: none !important; }
  .stat-mini { display: flex; flex-direction: row; justify-content: space-between; align-items: center; padding: 8px 12px; width: 100%; }
  .stat-mini .stat-label { font-size: 12px; }
  .stat-mini .stat-value { font-size: 16px; }
  
  /* 筛选栏移动端适配 */
  .filter-bar > div,
  .card > div[style*="display:flex;gap:8px"] {
    flex-direction: column;
    gap: 8px;
  }
  .card input.input,
  .card select.select {
    width: 100%;
    min-width: 100%;
  }
  .card .btn-sm {
    width: 100%;
    justify-content: center;
  }
}

/* ========== 移动端订单卡片 ========== */
.order-card {
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 10px;
}
.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.order-id {
  font-family: monospace;
  font-size: 12px;
  color: var(--text);
  word-break: break-all;
  flex: 1;
  margin-right: 8px;
}
.order-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.order-row .label {
  color: var(--text-muted);
  font-size: 12px;
  flex-shrink: 0;
}
.order-row .value {
  color: var(--text);
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-row .value.profit-positive {
  color: var(--success);
  font-weight: 600;
}
.order-row .value.profit-negative {
  color: var(--danger);
  font-weight: 600;
}
.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  gap: 8px;
}
.screenshot-btn { display: flex; gap: 6px; }
.action-btns { display: flex; gap: 6px; }

/* ========== 移动端苹果卡卡片 ========== */
.applecard-card {
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 10px;
}
.applecard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.applecard-id {
  font-family: monospace;
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
  flex: 1;
  margin-right: 8px;
}
.applecard-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.applecard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.applecard-row .label {
  color: var(--text-muted);
  font-size: 12px;
  flex-shrink: 0;
}
.applecard-row .value {
  color: var(--text);
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.applecard-footer {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ========== 角色管理卡片 ========== */
.roles-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}
.role-card {
  padding: 20px;
}
.role-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.role-info strong {
  font-size: 16px;
}
.role-sort {
  display: flex;
  gap: 4px;
}
.role-desc {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}
.role-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.role-actions {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .roles-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== 排班班次+周选择面板 ========== */
.shift-week-panel {
  padding: 16px 20px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  border-left: 4px solid var(--primary);
}
.shift-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.shift-times {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shift-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}
.shift-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.shift-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 12px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.shift-item strong {
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 2px;
}
.shift-time {
  font-size: 11px;
  color: #ef4444;
  font-family: monospace;
  font-weight: 600;
  white-space: nowrap;
}
.week-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.week-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px;
  background: var(--primary);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  min-width: 120px;
}
.week-label strong {
  font-size: 16px;
}
.week-date {
  font-size: 11px;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .shift-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .shift-times {
    width: 100%;
  }
  .shift-list {
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }
  .shift-item {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding: 8px 12px;
  }
  .week-nav {
    width: 100%;
    gap: 6px;
    flex-wrap: wrap;
  }
  .week-arrow {
    padding: 8px 10px;
    font-size: 12px;
  }
  .week-label {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
  }
  .week-label strong {
    font-size: 14px;
  }
  .week-date {
    font-size: 10px;
  }
  .week-back-btn {
    margin-left: 8px;
  }
}

/* ========== 排班模块通用样式 ========== */
.schedule-topbar-right { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; min-width: 0; }
.schedule-topbar-right .btn, .schedule-topbar-right .select { writing-mode: horizontal-tb !important; white-space: nowrap !important; }
.schedule-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: nowrap;
  gap: 8px;
}
.schedule-topbar h3 {
  margin: 0;
}
.schedule-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.schedule-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.schedule-item {
  padding: 10px 0;
  border-bottom: 1px solid #e1e5eb;
}
.schedule-item:last-child {
  border-bottom: none;
}
.schedule-item-left { display: flex; flex-direction: column; gap: 4px; }
.schedule-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.schedule-item-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.schedule-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.schedule-type {
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}
.schedule-slot {
  font-size: 11px;
  padding: 2px 8px;
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border-radius: 4px;
  color: var(--primary);
}
.schedule-names {
  font-size: 13px;
}
.schedule-meta {
  font-size: 11px;
  color: #64748b;
  margin-left: auto;
}
.schedule-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.schedule-date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.schedule-date-label {
  font-weight: 600;
  font-size: 14px;
}
.today-tag {
  font-size: 12px;
  color: var(--primary);
  font-weight: 400;
}

/* 排班移动端适配 */
@media (max-width: 768px) {
  .schedule-topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .schedule-topbar-right {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .schedule-topbar-right .btn {
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
    width: auto !important;
    min-width: fit-content !important;
    max-width: none !important;
    flex: none !important;
    font-size: 12px !important;
    padding: 6px 10px !important;
  }
  .schedule-topbar-right .select {
    font-size: 12px !important;
  }
  .schedule-item-left { display: flex; flex-direction: column; gap: 4px; }
  .schedule-item-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .schedule-meta {
    margin-left: 0;
  }
  .schedule-item-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px dashed #e1e5eb;
  }
}

/* ========== 公告管理卡片 ========== */
.announcement-card {
  padding: 14px 16px;
  margin-bottom: 10px;
}
.announcement-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.announcement-card-title {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.announcement-card-title strong {
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.announcement-card-sort {
  display: flex;
  gap: 4px;
}
.announcement-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c7d2fe; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a5b4fc; }

/* ========== 向后兼容 ========== */
.glass-card { }
.neon-btn { }
.neon-btn-outline { }
.neon-btn-danger { }
.neon-btn-green { }
.neon-btn-sm { }
.neon-input { }
.neon-select { }
.neon-table { }
.neon-text { color: var(--primary); }

/* 移动端通用适配增强 */
@media (max-width: 768px) {
  /* Tab 切页适配 */
  .order-tabs { font-size: 12px; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; }
  .order-tab { padding: 8px 12px !important; font-size: 12px; white-space: nowrap; min-width: 0; }
  
  /* 每日排班 */
  .schedule-topbar { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; }
  .schedule-topbar h3 { margin-bottom: 8px; text-align: center; }
  .schedule-topbar-right { flex-wrap: wrap; gap: 6px; justify-content: center; width: 100%; }
  .schedule-topbar-right .select { flex: 1; min-width: 100px; }
  .schedule-topbar-right .btn { min-width: 80px; font-size: 11px; padding: 8px 12px; }
  
  /* 排班项按钮 */
  .schedule-item-top { flex-direction: column; align-items: stretch; gap: 8px; }
  .schedule-item-left { width: 100%; }
  .schedule-btn-row { width: 100%; justify-content: flex-end; flex-wrap: wrap; gap: 4px; }
  .schedule-btn-row .btn { font-size: 10px; padding: 4px 8px; }
  
  /* 表格适配 */
  .table { font-size: 11px; }
  .table th, .table td { padding: 8px 6px; font-size: 11px; white-space: nowrap; }
  .table-actions { flex-wrap: wrap; gap: 4px; }
  .table-actions .btn { font-size: 10px; padding: 3px 6px; }
  
  /* 角色管理 */
  .roles-grid { grid-template-columns: 1fr; }
  .role-card { padding: 12px; }
  .role-card-header { flex-direction: column; align-items: flex-start; }
  
  /* 数据看板 */
  .dashboard-stats { flex-wrap: wrap; gap: 8px; }
  .stat-card { min-width: 45%; flex: 1 1 45%; padding: 12px; }
  .chart-card { padding: 12px; }
  
  /* 苹果卡 */
  .ac-stat-row { flex-wrap: wrap; gap: 8px; }
  .ac-stat { min-width: 45%; flex: 1 1 45%; padding: 12px 16px; }
  .ac-stat-value { font-size: 18px !important; }
  
  /* 每日排班 */
  .schedule-topbar { flex-direction: column; align-items: stretch; }
  .schedule-topbar h3 { margin-bottom: 8px; }
}

/* 平板适配 */
@media (min-width: 769px) and (max-width: 1024px) {
  .stat-card { min-width: 22%; }
  .ac-stat { min-width: 100px; }
}

.link-item-remark { font-size: 13px; color: var(--text-secondary); word-break: break-word; white-space: pre-wrap; }
.link-item-remark a { color: var(--primary); text-decoration: none; }
.link-item-remark a:hover { text-decoration: underline; }

/* 快捷入口 - 置顶和排序样式 */
.link-item-pinned { border-left: 3px solid var(--primary); background: #eff6ff; }
.pin-badge { font-size: 11px; padding: 2px 6px; background: var(--primary); color: #fff; border-radius: 4px; margin-right: 6px; }
.btn-sort-btn { padding: 3px 6px; font-size: 10px; }
.btn-pinned-active { color: var(--primary); border-color: var(--primary); background: #eff6ff; }

/* 日历视图样式 */
#modalContent { max-width: 1100px !important; }
#modalOverlay .modal-box { max-width: 1100px; width: 95vw; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-header { text-align: center; font-size: 14px; font-weight: 600; color: #64748b; padding: 10px 0; }
.calendar-day { min-height: 120px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 6px; cursor: pointer; background: #fff; transition: all 0.15s; }
.calendar-day:hover { border-color: #3b82f6; background: #f8fafc; transform: scale(1.01); }
.calendar-day.empty { border-color: transparent; cursor: default; background: transparent; }
.calendar-day.empty:hover { transform: none; }
.calendar-day.today { border-color: #3b82f6; background: #eff6ff; box-shadow: 0 2px 8px rgba(59,130,246,0.2); }
.calendar-date { font-size: 15px; font-weight: 600; color: #334155; margin-bottom: 6px; text-align: center; }
.calendar-day.today .calendar-date { color: #3b82f6; }
.calendar-schedules { display: flex; flex-direction: column; gap: 3px; }
.calendar-item { font-size: 11px; padding: 3px 6px; border-radius: 5px; white-space: normal; word-break: break-all; line-height: 1.4; display: flex; align-items: center; gap: 4px; }
.calendar-slot { font-weight: 600; font-size: 10px; opacity: 0.8; flex-shrink: 0; }
