/* ==========================================================================
   KIT LIBRARY - ADMIN PANEL STYLESHEET (ENHANCED SUITE)
   ========================================================================== */

.admin-app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- 1. Login Screen --- */
.admin-login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.admin-login-card {
  width: 100%;
  max-width: 440px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur-lg);
  -webkit-backdrop-filter: var(--glass-blur-lg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 2.75rem);
  box-shadow: var(--shadow-modal);
}

.login-brand-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-brand-header .brand-icon {
  margin: 0 auto 1rem;
  width: 3.2rem;
  height: 3.2rem;
  font-size: 1.5rem;
}

.login-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.login-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.admin-form .form-group {
  margin-bottom: 1.25rem;
}

.admin-form label, .drawer-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

.req {
  color: #ef4444;
}

.input-glass-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.input-glass-wrap:focus-within {
  border-color: var(--accent-primary);
  background: var(--glass-bg-hover);
}

.input-icon {
  padding-left: 0.9rem;
  font-size: 1rem;
  color: var(--text-muted);
  user-select: none;
}

.input-glass-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.75rem 0.9rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.password-toggle-btn {
  background: transparent;
  border: none;
  padding: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.admin-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 3.1rem;
  padding: 0 1.4rem;
  background: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.admin-btn-primary:hover {
  background: var(--accent-primary-hover);
}

.admin-btn-primary.full-width {
  width: 100%;
}

.admin-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 3.1rem;
  padding: 0 1.2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.admin-btn-secondary:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-strong);
}

.admin-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 3.1rem;
  padding: 0 1.4rem;
  background: #dc2626;
  border: 1px solid #dc2626;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.admin-btn-danger:hover {
  background: #b91c1c;
}

.admin-alert-error {
  padding: 0.75rem 1rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-md);
  color: #ef4444;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.login-footer {
  text-align: center;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--glass-border-subtle);
}

.back-to-site-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  text-decoration: none;
}

.back-to-site-link:hover {
  text-decoration: underline;
}

/* --- 2. Dashboard Navigation Header & Tabs --- */
.admin-header-glass {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.75rem 1.5rem;
}

.admin-header-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.admin-pill {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--accent-primary);
}

/* Central Tabs */
.admin-tabs-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 0.25rem;
}

.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.admin-tab-btn:hover {
  color: var(--text-primary);
  background: var(--glass-bg-subtle);
}

.admin-tab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.tab-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

.tab-badge.warning {
  background: #f59e0b;
  color: #000;
}

.tab-badge.accent {
  background: #06b6d4;
  color: #000;
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.admin-nav-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.admin-nav-action-link:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
  border-color: var(--glass-border-strong);
}

.admin-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.user-avatar-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #10b981;
}

.logout-btn {
  height: 2.3rem;
  padding: 0 0.85rem;
  font-size: 0.82rem;
}

/* --- 3. Main Container & KPI Cards --- */
.admin-main-container {
  max-width: var(--content-max-width);
  width: min(calc(100% - 3rem), var(--content-max-width));
  margin: 2rem auto 5rem;
}

.admin-banner-warning {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  color: #fbbf24;
  margin-bottom: 1.75rem;
}

.banner-link-btn {
  background: transparent;
  border: none;
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-kpi-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.kpi-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.kpi-footer {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.text-emerald { color: #10b981 !important; }
.text-amber { color: #f59e0b !important; }
.text-indigo { color: var(--accent-primary) !important; }
.text-cyan { color: #06b6d4 !important; }

/* --- 4. Analytics Dashboard Elements --- */
.analytics-grid-two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.analytics-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.analytics-card.highlight-border {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, var(--glass-bg) 100%);
}

.analytics-card-header {
  margin-bottom: 1.25rem;
}

.analytics-card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.analytics-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Click Breakdown Progress Bar */
.click-breakdown-box {
  padding: 1rem 0;
}

.progress-bar-stacked {
  height: 1.2rem;
  border-radius: var(--radius-full);
  background: var(--glass-bg-subtle);
  overflow: hidden;
  display: flex;
  margin-bottom: 1.25rem;
}

.bar-segment.regular {
  background: var(--accent-primary);
}

.bar-segment.affiliate {
  background: #10b981;
}

.click-stat-legend {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.legend-dot.regular { background: var(--accent-primary); }
.legend-dot.affiliate { background: #10b981; }

.analytics-split-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.mini-col-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.rank-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.rank-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.6rem;
  background: var(--glass-bg-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.rank-name {
  font-weight: 600;
  color: var(--text-primary);
}

.rank-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-primary);
  font-weight: 700;
}

/* Quick Add Button in Zero Search Table */
.btn-quick-add {
  padding: 0.25rem 0.65rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  color: #10b981;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-quick-add:hover {
  background: #10b981;
  color: #fff;
}

/* --- 5. Link Health & Quality Tab --- */
.health-summary-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.health-score-circle {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: var(--glass-bg-subtle);
  border: 3px solid #10b981;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-num {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #10b981;
  line-height: 1;
}

.score-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.health-metrics-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}

.health-metric-chip {
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
}

.health-metric-chip.error .chip-count { color: #ef4444; }
.health-metric-chip.warning .chip-count { color: #f59e0b; }
.health-metric-chip.info .chip-count { color: #06b6d4; }
.health-metric-chip.muted .chip-count { color: var(--text-muted); }

.chip-count {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.chip-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Health Subtabs */
.health-subtabs-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.health-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.health-subtab-btn.active {
  background: var(--glass-bg-active);
  color: var(--accent-primary);
  border-color: var(--glass-border-glow);
}

.subtab-count {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
}

.badge-error { background: rgba(239, 68, 68, 0.18); color: #ef4444; }
.badge-warning { background: rgba(245, 158, 11, 0.18); color: #f59e0b; }
.badge-info { background: rgba(6, 182, 212, 0.18); color: #06b6d4; }
.badge-muted { background: var(--glass-bg-subtle); color: var(--text-muted); }

/* Progress Bar */
.scan-progress-bar-wrap {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.scan-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.scan-progress-track {
  height: 0.4rem;
  background: var(--glass-bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.scan-progress-fill {
  height: 100%;
  background: var(--accent-primary);
  transition: width 0.2s ease;
}

/* Missing Field Chips */
.missing-fields-list {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.missing-pill {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-full);
  color: #ef4444;
  font-weight: 600;
}

/* --- 6. Tool Table, Inputs & Drawers --- */
.admin-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.toolbar-search-wrap {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0 1rem;
  height: 3.1rem;
}

.toolbar-search-wrap:focus-within {
  border-color: var(--accent-primary);
}

.admin-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.toolbar-filters-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.admin-select {
  height: 3.1rem;
  padding: 0 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
}

.toolbar-actions-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.admin-table-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 2rem;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  padding: 1rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-bg-subtle);
}

.admin-table td {
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--glass-border-subtle);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: var(--glass-bg-subtle);
}

.admin-table.mini-table th { padding: 0.65rem 0.9rem; font-size: 0.72rem; }
.admin-table.mini-table td { padding: 0.65rem 0.9rem; font-size: 0.82rem; }

.table-tool-cell {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.table-tool-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.table-tool-icon img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

.table-tool-info {
  min-width: 0;
}

.table-tool-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.table-tool-domain {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-subtle);
}

.status-badge-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.status-badge-toggle.status-published {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.status-badge-toggle.status-draft {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}

.table-actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.table-btn-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.table-btn-icon:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
  border-color: var(--glass-border-strong);
}

.table-btn-icon.btn-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.table-empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.table-pagination-footer {
  padding: 0.9rem 1.25rem;
  background: var(--glass-bg-subtle);
  border-top: 1px solid var(--glass-border-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Modals */
.modal-drawer-lg {
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-dialog-md { max-width: 480px; }
.modal-confirm-box { max-width: 420px; text-align: center; padding: 2.25rem; }
.confirm-icon-box { font-size: 2.5rem; margin-bottom: 0.75rem; }
.confirm-title { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 800; margin-bottom: 0.5rem; }
.confirm-desc { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 1.5rem; }
.confirm-actions { display: flex; align-items: center; justify-content: center; gap: 0.75rem; }

.modal-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.75rem 2rem 1.25rem;
  border-bottom: 1px solid var(--glass-border-subtle);
}

.drawer-title { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 800; margin-bottom: 0.2rem; }
.drawer-subtitle { font-size: 0.85rem; color: var(--text-muted); }
.drawer-form { padding: 1.75rem 2rem 2rem; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

.drawer-form input[type="text"],
.drawer-form input[type="url"],
.drawer-form input[type="password"],
.drawer-form select,
.drawer-form textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: all var(--transition-fast);
}

.drawer-form input:focus, .drawer-form select:focus, .drawer-form textarea:focus {
  border-color: var(--accent-primary);
  background: var(--glass-bg-hover);
}

.label-with-counter { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.45rem; }
.word-counter-badge { font-size: 0.75rem; font-family: var(--font-mono); font-weight: 700; color: var(--accent-primary); }
.btn-micro-helper { background: transparent; border: none; color: var(--accent-primary); font-size: 0.78rem; font-weight: 600; cursor: pointer; margin-top: 0.4rem; padding: 0; }
.btn-micro-helper:hover { text-decoration: underline; }

.tags-input-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  min-height: 3rem;
}

.tags-chips-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.tag-chip-editable {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  background: var(--glass-bg-active);
  border: 1px solid var(--glass-border-glow);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.tag-chip-editable button { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.8rem; line-height: 1; }
.tag-text-input { flex: 1; min-width: 180px; background: transparent !important; border: none !important; outline: none !important; padding: 0.3rem 0.4rem !important; font-size: 0.88rem !important; }
.suggested-tags-row { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.suggest-label { font-size: 0.75rem; color: var(--text-muted); }
.tag-suggest-pill { background: var(--glass-bg-subtle); border: 1px solid var(--glass-border-subtle); border-radius: var(--radius-full); padding: 0.15rem 0.5rem; font-size: 0.72rem; color: var(--text-secondary); cursor: pointer; }
.tag-suggest-pill:hover { background: var(--accent-primary); color: #ffffff; }

.drawer-actions-footer { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--glass-border-subtle); }

@media (max-width: 1024px) {
  .analytics-grid-two-col { grid-template-columns: 1fr; }
  .admin-header-inner { flex-wrap: wrap; }
  .admin-tabs-nav { order: 3; width: 100%; justify-content: center; }
}

@media (max-width: 768px) {
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
  .admin-toolbar-row { flex-direction: column; align-items: stretch; }
  .toolbar-filters-wrap { flex-direction: column; align-items: stretch; }
  .health-summary-banner { flex-direction: column; align-items: flex-start; }
}
