/* Professional operations console layer */
:root {
  --ops-primary: #2563eb;
  --ops-primary-hover: #1d4ed8;
  --ops-ink: #182230;
  --ops-muted: #667085;
  --ops-subtle: #98a2b3;
  --ops-bg: #f4f6f9;
  --ops-panel: #ffffff;
  --ops-line: #e4e9f0;
  --ops-line-strong: #d4dce8;
  --ops-success: #168a4a;
  --ops-warning: #b76e00;
  --ops-danger: #d92d20;
  --ops-sidebar: #111827;
  --ops-sidebar-soft: #1b2535;
  --sidebar-width: 216px;
  --sidebar-collapsed: 60px;
}

html, body { background: var(--ops-bg) !important; }
body { color: var(--ops-ink) !important; font-size: 13px; }
.main-content { background: var(--ops-bg); }

.sidebar {
  width: var(--sidebar-width) !important;
  background: var(--ops-sidebar) !important;
  border-right: 1px solid #263142 !important;
  box-shadow: none !important;
}
.sidebar-logo { padding: 18px 18px 15px !important; }
.sidebar-logo h2 { font-size: 20px !important; font-weight: 750 !important; }
.sidebar-logo h2 span { color: #5ba4ff !important; }
.sidebar-logo p { margin-top: 5px !important; color: #8b9bb1 !important; font-size: 11px !important; }
.sidebar-nav { padding: 9px 8px 64px !important; }
.sidebar .nav-section { margin-bottom: 3px !important; }
.sidebar .nav-section-title.nav-section-toggle {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 9px !important;
  color: #8999ae !important;
  font-size: 11px !important;
}
.sidebar .nav-section-title.nav-section-toggle::before { display: none !important; }
.sidebar .nav-section-body { padding-left: 4px !important; }
.sidebar .nav-section.expanded .nav-section-body { padding: 2px 0 4px 4px !important; }
.sidebar .nav-item {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  border-radius: 5px !important;
  color: #b8c3d2 !important;
  font-size: 12px !important;
}
.sidebar .nav-item:hover { background: #1b2535 !important; color: #fff !important; }
.sidebar .nav-item.active {
  background: #25344a !important;
  box-shadow: inset 3px 0 0 #4f8cff !important;
  color: #fff !important;
  font-weight: 650 !important;
}
.sidebar .nav-icon,
.sidebar .nav-icon svg {
  width: 16px !important;
  height: 16px !important;
  background-image: none !important;
  color: currentColor;
  opacity: 1 !important;
}
.sidebar-user {
  margin: auto 8px 8px !important;
  padding: 10px !important;
  border-radius: 6px !important;
  background: var(--ops-sidebar-soft) !important;
}
.sidebar-user .avatar {
  width: 30px !important;
  height: 30px !important;
  border-radius: 6px !important;
  background: #2563eb !important;
  box-shadow: none !important;
}
.sidebar-toggle {
  width: 26px !important;
  height: 26px !important;
  top: 17px !important;
  border-radius: 5px !important;
  box-shadow: 0 1px 3px rgba(16,24,40,.12) !important;
}
.sidebar-toggle svg { width: 14px; height: 14px; }

.page-header {
  min-height: 64px !important;
  padding: 12px 28px !important;
  background: #fff !important;
  border-bottom: 1px solid var(--ops-line) !important;
  backdrop-filter: none !important;
}
.page-header h1 { color: var(--ops-ink) !important; font-size: 18px !important; font-weight: 700 !important; }
.page-header p { color: var(--ops-muted) !important; }
.page-content { padding: 20px 28px 32px !important; }

.card, .stat-card, .filter-bar, .chart-container {
  border: 1px solid var(--ops-line) !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.035) !important;
  background: var(--ops-panel) !important;
}
.card-header { min-height: 52px; padding: 12px 16px !important; border-bottom-color: var(--ops-line) !important; }
.card-header h3 { color: var(--ops-ink) !important; font-size: 14px !important; }
.card-body { padding: 16px !important; }
.stat-cards { gap: 12px !important; margin-bottom: 16px !important; }
.stat-card { padding: 16px !important; transform: none !important; }
.stat-card:hover { box-shadow: 0 2px 6px rgba(16,24,40,.07) !important; }
.stat-card .stat-label { color: var(--ops-muted) !important; font-size: 12px !important; }
.stat-card .stat-value { color: var(--ops-ink) !important; font-size: 24px !important; }
.dashboard-stat-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}
.dashboard-stat-card {
  position: relative;
  min-height: 112px;
  overflow: hidden;
}
.dashboard-stat-card .dashboard-stat-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 18px;
  height: 18px;
  padding: 8px;
  box-sizing: content-box;
  border-radius: 6px;
  color: #5074a8;
  background: #eef4fc;
}
.dashboard-stat-card .stat-value { margin-top: 7px; }
.dashboard-stat-card .stat-change {
  margin-top: 7px;
  color: var(--ops-subtle);
  font-size: 11px;
  white-space: nowrap;
}
.dashboard-points-card {
  border-color: #b8cff5 !important;
  background: #f4f8ff !important;
}
.dashboard-points-card .dashboard-stat-icon {
  color: #fff;
  background: var(--ops-primary);
}
.dashboard-points-card .stat-value { color: var(--ops-primary) !important; }
.dashboard-points-card.is-low { border-color: #f1cf88 !important; background: #fffbf2 !important; }
.dashboard-points-card.is-low .stat-value { color: #b76e00 !important; }
.dashboard-points-card.is-empty { border-color: #efb5b0 !important; background: #fff7f6 !important; }
.dashboard-points-card.is-empty .stat-value { color: var(--ops-danger) !important; }
.dashboard-points-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
.dashboard-points-footer .stat-change {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-recharge-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid #9dbcf0;
  border-radius: 5px;
  color: #245db7;
  background: #fff;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.dashboard-recharge-btn:hover { border-color: #5e91df; background: #edf4ff; }
.dashboard-recharge-btn svg { width: 13px; height: 13px; }

.btn {
  min-height: 32px;
  padding: 6px 12px !important;
  border-radius: 5px !important;
  font-size: 12px !important;
  font-weight: 600;
  box-shadow: none !important;
}
.btn-primary { background: var(--ops-primary) !important; border: 1px solid var(--ops-primary) !important; }
.btn-primary:hover { background: var(--ops-primary-hover) !important; border-color: var(--ops-primary-hover) !important; }
.btn-default { color: #344054 !important; border: 1px solid var(--ops-line-strong) !important; background: #fff !important; }
.btn-default:hover { color: var(--ops-primary) !important; border-color: #9bb7e6 !important; background: #f8fbff !important; }
.btn-danger {
  color: var(--ops-danger) !important;
  border: 1px solid #f0b4ae !important;
  background: #fff !important;
}
.btn-danger:hover { background: #fff5f4 !important; border-color: #e78980 !important; }
.btn-success { background: var(--ops-success) !important; }
.btn-warning { background: #d97706 !important; }
.btn-sm { min-height: 28px; padding: 4px 9px !important; }
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.table-container { border-radius: 0 0 6px 6px; }
table th, table td { padding: 10px 14px !important; border-bottom: 1px solid var(--ops-line) !important; }
table th {
  height: 38px;
  color: #475467 !important;
  background: #f8fafc !important;
  font-size: 11px !important;
  font-weight: 650 !important;
}
table td { color: #475467 !important; font-size: 12px !important; }
table td strong { color: var(--ops-ink); }
table tbody tr:hover { background: #f8fbff !important; }
table tbody tr:last-child td { border-bottom: 0 !important; }
.table-actions { gap: 6px !important; flex-wrap: nowrap; align-items: center; }

.tag {
  padding: 2px 7px !important;
  border-radius: 4px !important;
  font-size: 11px !important;
  font-weight: 600;
}
.tag-green { background: #eaf7ef !important; color: #087443 !important; }
.tag-orange { background: #fff4df !important; color: #9a5b00 !important; }
.tag-red { background: #fff0ee !important; color: #c43228 !important; }
.tag-blue { background: #edf4ff !important; color: #245db7 !important; }

input, select, textarea, .form-control {
  border-color: var(--ops-line-strong) !important;
  border-radius: 5px !important;
  color: var(--ops-ink);
  background: #fff;
}
input:focus, select:focus, textarea:focus, .form-control:focus {
  border-color: #6f9de8 !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}
.form-group { margin-bottom: 16px !important; }
.form-group label { color: #344054 !important; font-size: 12px !important; }
.form-hint { color: var(--ops-subtle) !important; }

.modal-overlay { background: rgba(15,23,42,.42) !important; backdrop-filter: blur(2px); }
.modal {
  border: 1px solid var(--ops-line) !important;
  border-radius: 7px !important;
  box-shadow: 0 20px 50px rgba(16,24,40,.2) !important;
}
.modal-header, .modal-footer { padding: 13px 18px !important; border-color: var(--ops-line) !important; }
.modal-body { padding: 18px !important; }
.modal-close {
  width: 28px !important;
  height: 28px !important;
  border-radius: 5px !important;
  background: #f3f5f8 !important;
}

.empty-state {
  margin: 20px 28px;
  padding: 52px 20px !important;
  border: 1px dashed var(--ops-line-strong);
  border-radius: 6px;
  background: #fff;
}
.empty-state .empty-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #eef4fc;
  color: #4775b9;
  font-size: 22px !important;
  opacity: 1 !important;
}
.flash-message { border-radius: 5px !important; }

.customer-support-float {
  right: 18px !important;
  bottom: 18px !important;
  border-radius: 6px !important;
  padding: 9px 12px !important;
  background: #168a4a !important;
  box-shadow: 0 5px 14px rgba(16,120,68,.2) !important;
  font-size: 12px !important;
}
.customer-support-icon { background: transparent !important; color: #fff !important; width: 18px !important; height: 18px !important; }
.customer-support-icon svg { width: 18px; height: 18px; }

code { color: #344054; background: #f2f4f7; border-radius: 3px; padding: 2px 4px; }

@media (max-width: 900px) {
  .page-header { padding: 12px 18px !important; }
  .page-content { padding: 16px 18px 24px !important; }
  .table-actions { flex-wrap: wrap; }
  .dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (min-width: 901px) and (max-width: 1450px) {
  .dashboard-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

/* Login */
.ops-auth-body { margin: 0; min-height: 100vh; background: #eef2f6 !important; }
.ops-auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, 38%) 1fr; }
.ops-auth-context {
  display: flex;
  flex-direction: column;
  padding: 42px 48px;
  color: #e7edf5;
  background: #111827;
  border-right: 1px solid #263142;
}
.ops-auth-brand { display: flex; align-items: center; gap: 13px; }
.ops-auth-mark, .ops-auth-mobile-mark {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 7px; color: #fff; background: #2563eb;
}
.ops-auth-mark svg, .ops-auth-mobile-mark svg { width: 21px; height: 21px; }
.ops-auth-brand h1 { margin: 0; color: #fff; font-size: 20px; }
.ops-auth-brand p { margin: 4px 0 0; color: #91a0b5; font-size: 11px; }
.ops-auth-summary { display: grid; gap: 10px; margin: auto 0; }
.ops-auth-summary > div {
  display: grid; grid-template-columns: 30px 1fr; align-items: center; column-gap: 10px;
  padding: 13px 14px; border: 1px solid #2b3749; border-radius: 6px; background: #182233;
}
.ops-auth-summary svg { grid-row: span 2; width: 17px; height: 17px; color: #70a7ff; }
.ops-auth-summary strong { color: #f5f7fb; font-size: 12px; }
.ops-auth-summary small { margin-top: 3px; color: #91a0b5; font-size: 11px; }
.ops-auth-version { margin: 0; color: #75859a; font-size: 11px; }
.ops-auth-main { display: flex; align-items: center; justify-content: center; padding: 36px; background: #f7f9fc; }
.ops-auth-card.auth-card {
  width: min(390px, 100%); max-width: none; padding: 28px; border: 1px solid var(--ops-line);
  border-radius: 7px; box-shadow: 0 8px 24px rgba(16,24,40,.08); background: #fff;
}
.ops-auth-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.ops-auth-heading h2 { margin: 0 0 4px; text-align: left; color: var(--ops-ink); font-size: 19px; }
.ops-auth-heading .subtitle { margin: 0; text-align: left; color: var(--ops-muted); font-size: 11px; }
.ops-auth-mobile-mark { display: none; }
.ops-auth-card .form-group { margin-bottom: 15px !important; }
.ops-auth-input { position: relative; }
.ops-auth-input > svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: #98a2b3; pointer-events: none;
}
.ops-auth-card .ops-auth-input input { height: 39px; padding: 8px 11px 8px 34px !important; }
.ops-auth-card .remember-checkbox { margin: 2px 0 17px; }
.ops-auth-card .remember-checkbox label { color: var(--ops-muted); font-size: 12px; }
.ops-auth-card .btn { width: 100%; height: 38px; gap: 8px; }
.ops-auth-card .btn svg { width: 15px; height: 15px; }
.ops-auth-card .alert { border-radius: 5px; font-size: 12px; }

/* 2026-06-08 左侧菜单字号调整：普通用户和管理员共用侧栏 */
.sidebar .nav-item {
  font-size: 14px !important;
  font-weight: 600 !important;
}
.sidebar .nav-text {
  font-size: 14px !important;
}
.sidebar .nav-section-title.nav-section-toggle {
  font-size: 13px !important;
}
.sidebar-user .user-name {
  font-size: 14px !important;
}
.sidebar-user .user-role {
  font-size: 12px !important;
}
@media (max-width: 780px) {
  .ops-auth-shell { display: block; }
  .ops-auth-context { display: none; }
  .ops-auth-main { min-height: 100vh; padding: 20px; }
  .ops-auth-mobile-mark { display: flex; flex-shrink: 0; }
}
