:root {
  --primary: #0f766e;
  --primary-light: #14b8a6;
  --primary-dark: #134e4a;
  --sidebar-bg: #0b1f1e;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-active: rgba(20, 184, 166, 0.18);
  --page-bg: #f4f7fb;
  --card-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e8edf5;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
  background: var(--page-bg) !important;
}

html {
  background: var(--page-bg);
}

/* ========== Admin Layout ========== */
.admin-body {
  overflow: hidden;
  height: 100vh;
}

.admin-body.is-page-loading .admin-content {
  opacity: 0.92;
}

.admin-content.is-loading {
  opacity: 0.75;
  pointer-events: none;
}

.admin-app {
  display: flex;
  min-height: 100vh;
  height: 100vh;
}

.admin-sidebar {
  width: 248px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0f2f2d 0%, var(--sidebar-bg) 100%) !important;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100%);
}

.sidebar-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  padding: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.sidebar-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  line-height: 1.2;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.22);
  border: 1px solid rgba(94, 234, 212, 0.35);
  color: #99f6e4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-brand-desc {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 0;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.sidebar-link .layui-icon {
  font-size: 18px;
}

.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar-link.is-active {
  background: var(--sidebar-active);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--primary-light);
}

.sidebar-group {
  margin-bottom: 0;
  flex-shrink: 0;
}

.sidebar-group-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  font: inherit;
  text-align: left;
}

.sidebar-group-main {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.sidebar-group-title:hover,
.sidebar-group.is-open > .sidebar-group-title {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar-group-arrow {
  font-size: 12px !important;
}

.sidebar-group.is-open .sidebar-group-arrow {
  transform: rotate(180deg);
}

.sidebar-subnav {
  display: none;
  padding: 2px 0 4px 18px;
  margin: 0;
}

.sidebar-group.is-open .sidebar-subnav {
  display: block;
}

.sidebar-sublink {
  display: block;
  padding: 8px 14px 8px 28px;
  margin-bottom: 2px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  font-size: 13px;
  position: relative;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-sublink::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%);
}

.sidebar-sublink:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sidebar-sublink.is-active {
  background: var(--sidebar-active);
  color: #fff;
}

.sidebar-sublink.is-active::before {
  background: var(--primary-light);
}

.sidebar-footer {
  padding: 18px 22px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-version {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.admin-main-wrap {
  flex: 1;
  margin-left: 248px;
  min-height: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 118, 110, 0.42) rgba(15, 23, 42, 0.04);
}

.admin-main-wrap::-webkit-scrollbar {
  width: 10px;
}

.admin-main-wrap::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.03) 0%, rgba(15, 23, 42, 0.06) 100%);
  border-left: 1px solid rgba(15, 23, 42, 0.04);
}

.admin-main-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.55) 0%, rgba(15, 118, 110, 0.72) 100%);
  border-radius: 999px;
  border: 2px solid rgba(244, 247, 251, 0.85);
  background-clip: padding-box;
  min-height: 48px;
}

.admin-main-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.75) 0%, rgba(15, 118, 110, 0.92) 100%);
  border-color: rgba(244, 247, 251, 0.65);
}

.admin-main-wrap::-webkit-scrollbar-thumb:active {
  background: var(--primary-dark);
}

.data-table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 118, 110, 0.35) rgba(15, 23, 42, 0.04);
}

.data-table-wrap::-webkit-scrollbar {
  height: 8px;
}

.data-table-wrap::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.03);
  border-radius: 999px;
}

.data-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(15, 118, 110, 0.32);
  border-radius: 999px;
}

.data-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 118, 110, 0.52);
}

.notify-panel,
.topbar-search-input {
  scrollbar-width: thin;
}

.notify-panel::-webkit-scrollbar,
.topbar-search-input::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.notify-panel::-webkit-scrollbar-thumb {
  background: rgba(15, 118, 110, 0.28);
  border-radius: 999px;
}

.admin-topbar {
  min-height: 72px;
  padding: 0 22px;
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.topbar-center {
  flex: 0 1 420px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 0;
  height: 40px;
  flex-shrink: 0;
}

.topbar-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 0;
  margin-right: 14px;
  border-right: 1px solid var(--border-color);
  white-space: nowrap;
}

.topbar-clock .layui-icon {
  font-size: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.datetime-sep {
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1;
}

.datetime-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.datetime-date {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.topbar-icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.topbar-icon-btn:hover {
  color: var(--primary);
  border-color: #99f6e4;
  background: #f0fdfa;
}

.sidebar-toggle {
  display: none;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
}

.breadcrumb-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s ease;
}

.breadcrumb-home:hover {
  color: var(--primary);
  background: #ecfdf5;
}

.breadcrumb-sep {
  color: #cbd5e1;
  font-size: 12px;
}

.breadcrumb-item {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}

.breadcrumb-item.is-current {
  color: var(--primary);
  background: #ecfdf5;
  font-weight: 600;
}

.breadcrumb-group {
  color: var(--text-muted);
  font-size: 12px;
}

.topbar-search {
  position: relative;
  display: flex;
  align-items: center;
}

.topbar-search .layui-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 16px;
}

.topbar-search-input {
  width: 100%;
  height: 40px;
  padding: 0 72px 0 40px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #f8fafc;
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.topbar-search-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.search-kbd {
  position: absolute;
  right: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.6;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-notify-wrap {
  position: relative;
}

.topbar-notify {
  position: relative;
}

.notify-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  transition: opacity 0.2s ease;
}

.notify-dot.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.notify-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  z-index: 1200;
  overflow: hidden;
}

.notify-panel.is-open {
  display: block;
}

.notify-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  background: #f8fafc;
}

.notify-panel-header strong {
  font-size: 14px;
  color: var(--text-primary);
}

.notify-mark-read {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.notify-list {
  max-height: 320px;
  overflow-y: auto;
}

.notify-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

.notify-item:hover {
  background: #f8fafc;
}

.notify-item.is-unread {
  background: #f0fdfa;
}

.notify-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.notify-icon-warning {
  background: #fff7ed;
  color: #ea580c;
}

.notify-icon-info {
  background: #eff6ff;
  color: #2563eb;
}

.notify-icon-success {
  background: #ecfdf5;
  color: #059669;
}

.notify-item-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.notify-item-body strong {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.3;
}

.notify-item-body em {
  font-style: normal;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notify-item-body time {
  font-size: 11px;
  color: var(--text-muted);
}

.notify-panel-footer {
  padding: 12px 16px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  background: #fafbfc;
}

.notify-panel-footer a {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}

.notify-panel-footer a:hover {
  text-decoration: underline;
}

.topbar-divider {
  width: 1px;
  height: 28px;
  background: var(--border-color);
  margin: 0 4px;
}

.topbar-user.layui-nav {
  background: transparent !important;
  padding: 0 !important;
}

.topbar-user > .layui-nav-item {
  line-height: normal;
  background: transparent !important;
}

.topbar-user > .layui-nav-item > a:hover {
  background: transparent !important;
}

.topbar-user .layui-nav-bar {
  display: none !important;
}

.topbar-user .layui-this:after {
  display: none !important;
}

.user-trigger {
  display: flex !important;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 4px 0 0 !important;
  border: none;
  border-radius: 10px;
  background: transparent;
  min-width: 0;
  transition: background-color 0.2s ease;
}

.user-trigger:hover {
  background: #f1f5f9 !important;
}

.user-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  min-width: 0;
  max-width: 160px;
}

.topbar-user .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.user-account {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.user-role-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  background: #ecfdf5;
  color: var(--primary);
  border: 1px solid #99f6e4;
}

.user-role-badge[data-role="super_admin"] {
  background: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
}

.user-role-badge[data-role="admin"] {
  background: #ecfdf5;
  color: var(--primary);
  border-color: #99f6e4;
}

.user-role-badge[data-role="operator"] {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

.user-role-badge[data-role="viewer"] {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

.user-arrow {
  font-size: 12px !important;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.topbar-user > .layui-nav-item.layui-this > a .user-arrow,
.topbar-user > .layui-nav-item > a:hover .user-arrow {
  color: var(--primary);
}

.topbar-user .layui-nav-child {
  top: 52px;
  min-width: 180px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff !important;
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.topbar-user .layui-nav-child dd a {
  color: var(--text-primary) !important;
}

.topbar-user .layui-nav-child dd a:hover {
  background: #f0fdfa !important;
  color: var(--primary) !important;
}

.nav-user-card {
  padding: 12px 16px !important;
  background: #f8fafc;
  pointer-events: none;
}

.nav-user-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-user-account {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.nav-divider {
  height: 1px;
  margin: 4px 0;
  background: var(--border-color);
  pointer-events: none;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.topbar-user > .layui-nav-item > a {
  padding: 0 !important;
}

.admin-content {
  flex: 1 0 auto;
  padding: 24px 24px 48px;
  overflow: visible;
}

.admin-footer {
  flex-shrink: 0;
  padding: 16px 24px 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 999;
}

/* ========== Page Header ========== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.page-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ecfdf5 0%, #ccfbf1 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.page-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.page-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.page-subtitle {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.page-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-header-actions .layui-btn {
  height: 36px;
  line-height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.page-header-actions .layui-btn-primary {
  border-color: var(--border-color);
  background: #fff;
  color: var(--text-secondary);
}

.page-header-actions .layui-btn-primary:hover {
  border-color: #99f6e4;
  color: var(--primary);
}

.page-header-actions .layui-btn:not(.layui-btn-primary) {
  background: var(--primary);
  border-color: var(--primary);
}

.page-toolbar-split {
  width: 1px;
  height: 28px;
  background: var(--border-color);
  flex-shrink: 0;
}

.page-toolbar-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
}

.page-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.page-nav-btn .layui-icon {
  font-size: 14px;
}

.page-nav-btn:hover {
  background: #fff;
  color: var(--primary);
}

.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s ease;
}

.page-back-link:hover {
  color: var(--primary);
  border-color: #99f6e4;
  background: #f0fdfa;
}

/* ========== Dashboard ========== */
.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0f766e 0%, #115e59 55%, #134e4a 100%);
  color: #fff;
}

.hero-text h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.hero-text p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
  white-space: nowrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-card-users .stat-icon { background: #ecfeff; color: #0891b2; }
.stat-card-merchants .stat-icon { background: #eef2ff; color: #4f46e5; }
.stat-card-products .stat-icon { background: #fff7ed; color: #ea580c; }
.stat-card-orders .stat-icon { background: #f0fdf4; color: #16a34a; }

.stat-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 30px;
  line-height: 1;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.panel-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: visible;
}

.panel-card-header {
  padding: 18px 22px 0;
}

.panel-card-header h3 {
  margin: 0;
  font-size: 16px;
}

.panel-card-body {
  padding: 18px 22px 22px;
  overflow: visible;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.quick-link:hover {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: var(--primary);
}

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.info-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 14px;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list span {
  color: var(--text-secondary);
}

.info-list code {
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  font-size: 12px;
}

/* ========== Dashboard V2 ========== */
.dashboard-v2 {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dash-hero {
  position: relative;
  display: flex;
  align-items: stretch;
  border-radius: 18px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.dash-hero-accent {
  width: 4px;
  flex-shrink: 0;
  background: var(--primary);
}

.dash-hero-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 28px;
}

.dash-hero-kicker {
  display: inline-block;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.dash-hero-main h1 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.25;
  color: var(--text-primary);
}

.dash-hero-desc {
  margin: 0;
  max-width: 520px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.dash-hero-metrics {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  gap: 0;
  padding: 4px 0;
}

.dash-hero-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 108px;
  padding: 0 20px;
  text-align: right;
}

.dash-hero-metric-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.dash-hero-metric-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.dash-hero-metric-highlight .dash-hero-metric-value {
  color: var(--primary);
}

.dash-hero-metric.is-alert .dash-hero-metric-value {
  color: #ea580c;
}

.dash-hero-metric-divider {
  width: 1px;
  align-self: stretch;
  background: var(--border-color);
  flex-shrink: 0;
}

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dash-kpi-card {
  position: relative;
  padding: 20px 20px 18px;
  border-radius: 18px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.dash-kpi-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  transform: translate(28%, -28%);
  opacity: 0.12;
}

.dash-kpi-users::after { background: #0891b2; }
.dash-kpi-merchants::after { background: #6366f1; }
.dash-kpi-products::after { background: #ea580c; }
.dash-kpi-orders::after { background: #16a34a; }

.dash-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dash-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.dash-kpi-users .dash-kpi-icon { background: #ecfeff; color: #0891b2; }
.dash-kpi-merchants .dash-kpi-icon { background: #eef2ff; color: #6366f1; }
.dash-kpi-products .dash-kpi-icon { background: #fff7ed; color: #ea580c; }
.dash-kpi-orders .dash-kpi-icon { background: #f0fdf4; color: #16a34a; }

.dash-kpi-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.dash-kpi-value {
  display: block;
  font-size: 32px;
  line-height: 1;
  margin-bottom: 8px;
}

.dash-kpi-label {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 13px;
}

.dash-kpi-foot {
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
}

.dash-chart-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 16px;
}

.dash-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dash-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.dash-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 0;
}

.dash-panel-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.dash-panel-head p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.dash-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

.dash-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dash-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dash-dot-teal { background: #0f766e; }
.dash-dot-blue { background: #2563eb; }

.dash-chart {
  height: 320px;
  padding: 8px 12px 12px;
}

.dash-chart-donut {
  height: 340px;
}

.dash-chart-bar {
  height: 280px;
}

.dash-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 20px 20px;
}

.dash-shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.dash-shortcut:hover {
  transform: translateY(-1px);
  border-color: #99f6e4;
  background: #f0fdfa;
  color: var(--primary);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.08);
}

.dash-shortcut .layui-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--primary);
  font-size: 18px;
}

.dash-todo-list {
  list-style: none;
  margin: 0;
  padding: 12px 20px 0;
}

.dash-todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border-color);
}

.dash-todo-item:last-child {
  border-bottom: none;
}

.dash-todo-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-todo-warning { background: #fff7ed; color: #ea580c; }
.dash-todo-info { background: #eff6ff; color: #2563eb; }
.dash-todo-success { background: #f0fdf4; color: #16a34a; }

.dash-todo-body {
  flex: 1;
  min-width: 0;
}

.dash-todo-body strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.dash-todo-body p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.dash-todo-link {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f0fdfa;
  color: var(--primary);
  font-size: 12px;
  text-decoration: none;
}

.dash-todo-link:hover {
  background: #ccfbf1;
}

.dash-system-meta {
  margin: 8px 20px 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px dashed var(--border-color);
}

.dash-system-meta div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
}

.dash-system-meta span {
  color: var(--text-secondary);
}

.dash-system-meta code {
  padding: 2px 8px;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
}

/* ========== Table & Filter Bar ========== */
.filter-bar,
.toolbar-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #f8fafc;
}

.filter-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.filter-field-grow {
  flex: 1 1 260px;
  max-width: 360px;
}

.filter-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-control {
  display: block;
  width: 160px;
  min-width: 120px;
  max-width: 200px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
  flex-shrink: 0;
}

.filter-field-grow .filter-input-wrap {
  flex: 1;
  min-width: 0;
}

.filter-field-grow .filter-control {
  width: 100%;
  max-width: none;
}

.filter-control:focus {
  border-color: var(--primary);
}

.filter-control::placeholder {
  color: var(--text-muted);
}

select.filter-control {
  padding-right: 28px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.filter-input-wrap {
  position: relative;
  width: 100%;
}

.filter-input-wrap .layui-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
}

.filter-input-wrap .filter-control {
  padding-left: 34px;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.filter-btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.filter-btn-primary:hover {
  opacity: 0.92;
}

.filter-btn-ghost {
  background: #fff;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.filter-btn-ghost:hover {
  border-color: #99f6e4;
  color: var(--primary);
}

.toolbar-input {
  position: relative;
  flex: 1;
  max-width: 360px;
}

.toolbar-input .layui-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.toolbar-input .layui-input {
  height: 40px;
  padding-left: 38px;
  border-radius: 10px;
  border-color: var(--border-color);
  background: #f8fafc;
}

.toolbar-btn {
  height: 40px;
  line-height: 40px;
  border-radius: 10px;
  background: var(--primary);
}

.toolbar-select {
  width: auto;
  min-width: 160px;
  max-width: 200px;
  height: 40px;
  border-radius: 10px;
  border-color: var(--border-color);
  background: #f8fafc;
  flex: 0 0 auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px 24px;
}

.detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-grid span {
  font-size: 13px;
  color: var(--text-muted);
}

.detail-grid strong {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 600;
}

.notify-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table thead th {
  text-align: left;
  padding: 14px 12px;
  background: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.data-table tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.data-table tbody tr:hover {
  background: #fafcff;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

.status-tag-approved,
.status-tag-paid,
.status-tag-completed {
  background: #ecfdf5;
  color: #047857;
}

.status-tag-pending,
.status-tag-pending_pay {
  background: #fff7ed;
  color: #c2410c;
}

.status-tag-disabled,
.status-tag-rejected {
  background: #fef2f2;
  color: #b91c1c;
}

.text-muted { color: var(--text-muted); }
.text-mono { font-family: Consolas, monospace; font-size: 13px; }

.empty-tip {
  text-align: center;
  color: var(--text-muted);
  padding: 28px 12px !important;
}

.placeholder-box {
  text-align: center;
  padding: 48px 24px;
}

.placeholder-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: #ecfdf5;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}

.placeholder-box h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.placeholder-box p {
  margin: 0 auto 18px;
  max-width: 520px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.placeholder-tips {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 420px;
  text-align: left;
}

.placeholder-tips li {
  position: relative;
  padding: 8px 0 8px 18px;
  color: var(--text-secondary);
  font-size: 14px;
  border-bottom: 1px dashed var(--border-color);
}

.placeholder-tips li:last-child {
  border-bottom: none;
}

.placeholder-tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-light);
}

.table-pager {
  margin-top: 0;
  text-align: right;
}

.table-pager-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  padding-bottom: 4px;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.pager-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.pager-summary-sep {
  color: #cbd5e1;
}

.pager-summary strong {
  color: var(--text-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pager-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pager-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pager-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding-left: 12px;
  border-left: 1px solid var(--border-color);
}

.pager-jump-label {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.pager-jump-box {
  display: inline-flex;
  align-items: center;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.pager-jump-box:focus-within {
  border-color: var(--primary);
}

.pager-jump-input {
  width: 42px;
  height: 100%;
  padding: 0 6px;
  border: none;
  outline: none;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

.pager-jump-input::-webkit-outer-spin-button,
.pager-jump-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pager-jump-unit {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 10px;
  border-left: 1px solid var(--border-color);
  background: #f8fafc;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.pager-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.pager-go:hover {
  opacity: 0.92;
}

.pager-btn,
.pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
  font-variant-numeric: tabular-nums;
}

.pager-btn:hover,
.pager-num:hover {
  border-color: #99f6e4;
  color: var(--primary);
  background: #f0fdfa;
}

.pager-num.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.pager-num.is-active:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pager-btn.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pager-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 32px;
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 640px) {
  .filter-bar,
  .toolbar-form {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .filter-field,
  .filter-field-grow {
    width: 100%;
    max-width: none;
  }

  .filter-control {
    flex: 1;
    width: auto;
    max-width: none;
  }

  .filter-actions {
    margin-left: 0;
    width: 100%;
  }

  .filter-btn {
    flex: 1;
  }

  .table-pager-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .pager-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .pager-nav {
    justify-content: center;
    flex-wrap: wrap;
  }

  .pager-jump {
    justify-content: center;
    padding-left: 0;
    border-left: none;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
  }
}

/* ========== Forms & Actions ========== */
.admin-form {
  max-width: 720px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-row.full {
  grid-column: 1 / -1;
}

.form-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.form-submit-btn {
  min-width: 100px;
}

.config-input {
  height: 36px;
  border-radius: 8px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-form {
  display: inline;
  margin: 0;
}

.link-btn {
  border: none;
  background: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
}

.link-btn.danger {
  color: #dc2626;
}

.link-btn:hover {
  text-decoration: underline;
}

.audit-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.audit-remark {
  width: 120px;
  height: 28px;
  font-size: 12px;
  border-radius: 6px;
}

.inline-add-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-add-form .form-row {
  margin-bottom: 0;
  min-width: 180px;
}

.inline-action-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  max-width: none;
}

.inline-action-form .form-row {
  margin-bottom: 0;
  min-width: 160px;
}

.action-btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thumb-preview {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.flash-messages {
  margin-bottom: 16px;
}

.flash-item {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 8px;
}

.flash-success,
.flash-info {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.flash-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.form-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.image-upload-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.upload-btn.is-uploading {
  opacity: 0.7;
  pointer-events: none;
}

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-preview {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  border: 1px dashed var(--border-color);
  overflow: hidden;
  background: #f8fafc;
}

.upload-preview.is-empty {
  display: none;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== Login Page ========== */
.login-page {
  min-height: 100vh;
  margin: 0;
  background: var(--page-bg);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 64px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(145deg, #0f766e 0%, #115e59 45%, #134e4a 100%);
  overflow: hidden;
}

.login-brand::before,
.login-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.login-brand::before {
  width: 280px;
  height: 280px;
  top: -80px;
  right: -60px;
}

.login-brand::after {
  width: 180px;
  height: 180px;
  bottom: 120px;
  left: -40px;
}

.login-brand .brand-content {
  position: relative;
  z-index: 1;
  max-width: 460px;
}

.login-brand .brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  margin-bottom: 28px;
  overflow: hidden;
}

.login-brand .brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.login-brand .brand-title {
  margin: 0 0 10px;
  font-size: 36px;
  line-height: 1.2;
  font-weight: 700;
}

.login-brand .brand-subtitle {
  margin: 0 0 24px;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.login-brand .brand-desc {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
}

.login-brand .brand-features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.login-brand .brand-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
}

.login-brand .brand-features .layui-icon {
  font-size: 18px;
  color: #fde68a;
}

.brand-footer {
  position: relative;
  z-index: 1;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.login-box {
  width: 100%;
  max-width: 420px;
  padding: 42px 40px;
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.login-header h2 {
  margin: 0 0 8px;
  font-size: 28px;
  color: var(--text-primary);
}

.login-header p {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--text-secondary);
}

.login-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
}

.login-alert-error,
.login-alert-danger {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.login-field {
  margin-bottom: 20px;
}

.login-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.input-wrap {
  position: relative;
}

.input-wrap .layui-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
  z-index: 2;
}

.input-wrap .layui-input {
  height: 46px;
  padding-left: 42px;
  border-radius: 12px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.input-wrap .layui-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.login-extra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 22px;
}

.login-tip {
  font-size: 12px;
  color: var(--text-muted);
}

.login-submit {
  width: 100%;
  height: 48px;
  line-height: 48px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-submit:hover {
  opacity: 0.94;
}

/* ========== Responsive ========== */
@media (max-width: 1200px) {
  .topbar-center {
    display: none;
  }

  .topbar-clock {
    display: none;
  }

  .user-trigger {
    padding: 0 8px 0 0 !important;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .dash-hero-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 22px;
  }

  .dash-hero-metrics {
    width: 100%;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
  }

  .dash-hero-metric {
    flex: 1;
    min-width: 0;
    padding: 0 12px;
    text-align: center;
  }

  .dash-chart-grid,
  .dash-bottom-grid,
  .dash-kpi-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-mask.is-visible {
    display: block;
  }

  .admin-main-wrap {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-hero-main h1 {
    font-size: 24px;
  }

  .dash-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: auto;
    padding: 36px 28px;
  }

  .brand-title {
    font-size: 28px;
  }

  .brand-desc,
  .brand-features {
    display: none;
  }
}

@media (max-width: 640px) {
  .admin-content {
    padding: 16px;
  }

  .stat-grid,
  .quick-links,
  .dash-kpi-grid,
  .dash-shortcuts {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .page-header-right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
  }

  .page-toolbar-split {
    display: none;
  }

  .page-nav-label {
    display: none;
  }

  .page-nav-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
  }

  .page-header-actions {
    flex: 1;
  }

  .topbar-breadcrumb {
    max-width: 180px;
    overflow: hidden;
  }

  .breadcrumb-group {
    display: none;
  }

  .dash-hero-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .dash-hero-metric-divider {
    display: none;
  }

  .dash-hero-metric {
    padding: 12px 14px;
    text-align: left;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #f8fafc;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}
