/* PC 端政务统一监管后台 - 亲民暖色民生主题变量 */
:root {
  --sidebar-bg: #5e2419;
  --sidebar-hover: rgba(255, 245, 235, 0.1);
  --sidebar-active: #d95d39;
  --sidebar-width: 236px;

  --brand-700: #b23a22;
  --brand-600: #cf4e2e;
  --brand-500: #e66b45;
  --brand-100: #fdebe2;
  --brand-50: #fff6f1;

  --success-600: #257a5c;
  --success-50: #eaf6f0;
  --warning-600: #c76f0a;
  --warning-50: #fff5e3;
  --danger-600: #c8332b;
  --danger-50: #fdeceb;
  --purple-600: #9b4d6f;
  --purple-50: #faedf3;

  --bg-page: #faf5ee;
  --bg-card: #ffffff;
  --border: #ecdccf;
  --border-light: #f4ebe1;

  --text-primary: #2d1e17;
  --text-secondary: #685245;
  --text-muted: #9c8678;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 2px 6px rgba(124, 58, 28, 0.05), 0 6px 16px rgba(124, 58, 28, 0.04);
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

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

html,
body {
  height: 100%;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button,
input,
select {
  font-family: inherit;
  outline: none;
}

/* 主双栏后台框架 */
.admin-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* 左侧导航栏 */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #562017 0%, #732c1e 58%, #5e2318 100%);
  color: #fffaf5;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 236, 218, 0.12);
}

.sidebar-brand {
  height: 64px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid rgba(255, 236, 218, 0.12);
  flex-shrink: 0;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e06338, #f2994a);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(224, 99, 56, 0.4);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.25;
}

.brand-text p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-group-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  padding: 12px 10px 4px;
  letter-spacing: 0.4px;
}

.nav-group-title:first-child {
  padding-top: 2px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(135deg, #d95a33, #eb7d4b);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(217, 90, 51, 0.36);
}

.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sync-status-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
}

.sync-status-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #fff;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.28);
  flex-shrink: 0;
}

.sync-status-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

/* 右侧主区 */
.main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* 顶部通栏 */
.topbar {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.breadcrumb {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb strong {
  color: var(--text-primary);
  font-weight: 700;
}

.project-pill {
  font-size: 12px;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid #f4d3c3;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.readonly-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--success-600);
  background: var(--success-50);
  border: 1px solid #bfead7;
  padding: 4px 10px;
  border-radius: 6px;
}

.btn-outline-sm {
  height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-outline-sm:hover {
  border-color: var(--brand-600);
  color: var(--brand-600);
  background: var(--brand-50);
}

.gov-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.gov-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #cf4e2e, #ea8b49);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gov-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.gov-user-info strong {
  font-size: 12.5px;
  color: var(--text-primary);
}

.gov-user-info small {
  font-size: 11px;
  color: var(--text-muted);
}

/* 主滚动区 */
.content-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 32px;
}

@media (max-width: 1120px) {
  .project-pill {
    display: none;
  }
}

@media (max-width: 960px) {
  .readonly-pill,
  .gov-user-info {
    display: none;
  }
}
