:root {
  --primary: #08697A;
  --primary-dark: #054854;
  --primary-light: #0D8296;
  --accent: #14B8A6;
  --bg-body: #F3F7F8;
  --bg-card: #FFFFFF;
  --text-main: #1F2937;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --radius: 12px;
  --danger: #EF4444;
  --success: #10B981;
  --warning: #F59E0B;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
}

/* 登录遮罩 */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 105, 122, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.login-box {
  background: white;
  width: 90%;
  max-width: 400px;
  padding: 32px 28px;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.logo-circle {
  width: 56px;
  height: 56px;
  background: #E0F2F1;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--primary);
}

.logo-circle svg {
  width: 30px;
  height: 30px;
}

.login-header h2 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 4px;
}

.login-header p {
  color: var(--text-muted);
  font-size: 13px;
}

/* 通用按钮与表单 */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 105, 122, 0.1);
}

.form-group .tip {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary, .btn-teal {
  background: var(--primary);
  color: white;
}

.btn-primary:hover, .btn-teal:hover {
  background: var(--primary-dark);
}

.btn-block {
  width: 100%;
  padding: 12px;
}

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

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-outline:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
  color: var(--text-main);
}

.err-text {
  color: var(--danger);
  font-size: 12px;
  margin-top: 8px;
  text-align: center;
}

.hidden {
  display: none !important;
}

/* 控制台布局 */
.top-nav {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-badge {
  font-size: 20px;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: #ECFDF5;
  color: var(--success);
}

.main-content {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 20px 60px;
}

/* 审核横幅 */
.audit-banner {
  background: white;
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  border-left: 6px solid var(--primary);
  transition: all 0.3s;
}

.audit-banner.audit-active {
  background: #FEF3C7;
  border-left-color: var(--warning);
}

.banner-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 78%;
}

.banner-icon {
  font-size: 32px;
  line-height: 1;
}

.banner-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.status-highlight {
  color: var(--primary);
}

.audit-banner.audit-active .status-highlight {
  color: #B45309;
}

.banner-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.text-teal { color: var(--primary); }
.text-blue { color: #2563EB; }
.text-orange { color: #EA580C; }
.text-purple { color: #7C3AED; }
.text-danger { color: var(--danger); font-weight: 700; }

/* 标签页 */
.tab-header {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 18px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* 卡片与表格 */
.panel-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tip-text {
  font-size: 12px;
  font-weight: normal;
  color: var(--text-muted);
  margin-left: 10px;
}

.import-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}

.import-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.input-note {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table th {
  background: #F9FAFB;
  padding: 12px 14px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #F3F4F6;
  vertical-align: middle;
}

.data-table tr:hover {
  background: #F9FAFB;
}

.code-badge {
  font-family: monospace;
  background: #E0F2F1;
  color: var(--primary);
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-block;
}

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.status-unused { background: #ECFDF5; color: #047857; }
.status-assigned { background: #EFF6FF; color: #1D4ED8; }
.status-pending { background: #FEF3C7; color: #B45309; }
.status-approved { background: #ECFDF5; color: #047857; }
.status-rejected { background: #FEE2E2; color: #B91C1C; }

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.full-width {
  grid-column: 1 / -1;
}

.btn-filter {
  background: #F3F4F6;
  color: var(--text-muted);
}

.btn-filter.active {
  background: var(--primary);
  color: white;
}

.mt-4 { margin-top: 24px; }
.ml-2 { margin-left: 8px; }
.text-center { text-align: center; }
.py-4 { padding-top: 24px; padding-bottom: 24px; }
