/* === BeeCMS Admin v2 === */

/* Theme variables */
:root {
  --bg: #ffffff;
  --bg-card: #f8fafc;
  --bg-input: #ffffff;
  --bg-hover: #f1f5f9;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-soft: rgba(59,130,246,.1);
  --green: #16a34a;
  --green-soft: rgba(22,163,74,.1);
  --yellow: #ca8a04;
  --yellow-soft: rgba(202,138,4,.1);
  --red: #dc2626;
  --red-soft: rgba(220,38,38,.1);
  --accent: #f59e0b;
  --hover-bg: rgba(0,0,0,.03);
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.1);
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-card: #0a0a0a;
  --bg-input: #111111;
  --bg-hover: #1a1a1a;
  --border: #222222;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-soft: rgba(59,130,246,.15);
  --green: #22c55e;
  --green-soft: rgba(34,197,94,.15);
  --yellow: #eab308;
  --yellow-soft: rgba(234,179,8,.15);
  --red: #ef4444;
  --red-soft: rgba(239,68,68,.15);
  --accent: #f59e0b;
  --hover-bg: rgba(255,255,255,.04);
  --shadow: 0 1px 3px rgba(0,0,0,.6);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Global icon sizing */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  vertical-align: middle;
}
.icon svg {
  width: 100%;
  height: 100%;
}

/* === Layout === */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 0;
  flex-shrink: 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 50;
}

.main {
  margin-left: 260px;
  flex: 1;
  padding: 24px 32px;
  min-height: 100vh;
  max-width: 1400px;
}

.sidebar-logo {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.sidebar-logo span { color: var(--accent); }

.sidebar-nav { padding: 8px 0; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  color: var(--text-muted);
  font-size: 13px;
  transition: all .15s;
  border-left: 2px solid transparent;
}
.sidebar-nav a:hover {
  background: var(--hover-bg);
  color: var(--text);
  text-decoration: none;
}
.sidebar-nav a.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 500;
}
.sidebar-nav a .icon { width: 16px; height: 16px; opacity: .7; flex-shrink: 0; }
.sidebar-nav a.active .icon { opacity: 1; }

.section-label {
  padding: 16px 20px 6px;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: .08em;
  font-weight: 600;
}

.sidebar-domains a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 20px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
  transition: all .15s;
  border-left: 2px solid transparent;
}
.sidebar-domains a:hover {
  background: var(--hover-bg);
  color: var(--text);
  text-decoration: none;
}
.sidebar-domains a.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-left-color: var(--primary);
}
.sidebar-domains .domain-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0 6px;
  border-radius: 10px;
  min-width: 24px;
  text-align: center;
}

.sidebar-bottom {
  padding: 16px 20px;
  margin-top: auto;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* === Theme Toggle === */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.theme-toggle input { display: none; }
.theme-toggle .toggle-track {
  width: 36px;
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}
.theme-toggle .toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform .2s;
}
.theme-toggle input:checked + .toggle-track { background: var(--primary); }
.theme-toggle input:checked + .toggle-track::after { transform: translateX(16px); }

/* === Cards === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.card-link {
  text-decoration: none !important;
  color: inherit !important;
  display: block;
}
.card-link:hover .card {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .cards-grid { grid-template-columns: 1fr; }
}

/* Bottom panels (history + scheduled) */
.bottom-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
@media (max-width: 900px) {
  .bottom-panels { grid-template-columns: 1fr; }
}
.upcoming-list { max-height: 300px; overflow-y: auto; }
.upcoming-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.upcoming-entry:last-child { border-bottom: none; }
.upcoming-entry-domain {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  min-width: 140px;
}
.upcoming-entry-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upcoming-entry-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--yellow);
  white-space: nowrap;
}

/* Domain card */
.domain-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.domain-card-name {
  font-size: 14px;
  font-weight: 600;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
}
.domain-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.domain-stat {
  text-align: center;
  padding: 6px 2px;
  background: var(--bg);
  border-radius: 6px;
}
.domain-stat-value {
  font-size: 16px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.domain-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: .05em;
}
.domain-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.domain-card-footer .next-post {
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Ping dot */
.ping-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.ping-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.ping-dot.offline { background: var(--red); box-shadow: 0 0 6px var(--red); }
.ping-dot.unknown { background: var(--text-muted); }
.ping-dot.loading {
  background: var(--yellow);
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* === Stats bar === */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}
.stat-value {
  font-size: 22px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
}
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: .04em;
  margin-top: 4px;
}
.stat-value.green { color: var(--green); }
.stat-value.yellow { color: var(--yellow); }
.stat-value.red { color: var(--red); }
.stat-value.blue { color: var(--primary); }

/* === Table === */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  letter-spacing: .04em;
  font-weight: 600;
}
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
tr:hover td { background: var(--hover-bg); }
tr { cursor: pointer; transition: background .1s; }
.post-title { font-weight: 500; }
.post-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
td .actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity .15s;
}
tr:hover td .actions { opacity: 1; }

/* === Badges === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-yellow { background: var(--yellow-soft); color: var(--yellow); }
.badge-blue { background: var(--primary-soft); color: var(--primary); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-green { background: var(--green); color: white; }
.btn-green:hover:not(:disabled) { opacity: .9; }
.btn-red { background: var(--red); color: white; }
.btn-red:hover:not(:disabled) { opacity: .9; }
.btn-yellow { background: var(--yellow); color: white; }
.btn-yellow:hover:not(:disabled) { opacity: .9; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--text-muted);
  background: var(--hover-bg);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 6px 10px;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--hover-bg);
  color: var(--text);
}
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-xs { padding: 2px 8px; font-size: 11px; border-radius: 4px; }
.btn-icon { padding: 6px; border-radius: 6px; }
.btn-icon .icon { width: 18px; height: 18px; }

/* === Forms === */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* === Login === */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}
.login-box { width: 400px; }
.login-box h1 {
  font-size: 28px;
  margin-bottom: 4px;
  text-align: center;
  font-weight: 800;
  letter-spacing: -.02em;
}
.login-box h1 span { color: var(--accent); }
.login-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 24px;
}

/* === Page Header === */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.page-header .header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === Action bar (below header) === */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.action-bar-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.action-bar-right { display: flex; align-items: center; gap: 8px; }

/* === Deploy Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 720px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.log-output {
  background: #0a0a0a;
  color: #22c55e;
  border-radius: 8px;
  padding: 16px;
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  line-height: 1.7;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid #222;
}
.log-output .log-error { color: var(--red); }
.log-output .log-success { color: var(--green); }
.log-output .log-info { color: var(--primary); }

/* === Build History === */
.build-history {
  max-height: 300px;
  overflow-y: auto;
}
.build-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.build-entry:last-child { border-bottom: none; }
.build-entry-domain {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  min-width: 180px;
}
.build-entry-time { color: var(--text-muted); min-width: 140px; }
.build-entry-duration {
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* === Bulk Date Modal === */
.bulk-modal-content { max-width: 500px; margin: 0 auto; }
.bulk-modal-content .form-row { margin-bottom: 12px; }
.selected-count {
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 6px;
  margin-bottom: 16px;
}

/* === Content Stats Panel === */
.content-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  padding: 16px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 16px;
}
.content-stat {
  text-align: center;
}
.content-stat-value {
  font-size: 20px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.content-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* === Toast UI Editor overrides === */
.toastui-editor-defaultUI { border-color: var(--border) !important; border-radius: 8px !important; overflow: hidden; }
.toastui-editor-defaultUI .toastui-editor-md-container,
.toastui-editor-defaultUI .toastui-editor-ww-container { background: var(--bg-input) !important; }
.ProseMirror { color: var(--text) !important; background: var(--bg-input) !important; min-height: 400px; }
.ProseMirror p, .ProseMirror h1, .ProseMirror h2, .ProseMirror h3, .ProseMirror h4, .ProseMirror li, .ProseMirror td, .ProseMirror th, .ProseMirror blockquote { color: var(--text) !important; }
.toastui-editor-contents p, .toastui-editor-contents h1, .toastui-editor-contents h2, .toastui-editor-contents h3, .toastui-editor-contents h4, .toastui-editor-contents li { color: var(--text) !important; }
.toastui-editor-toolbar { background: var(--bg-card) !important; border-color: var(--border) !important; }
.toastui-editor-defaultUI-toolbar button { color: var(--text-muted) !important; }
.toastui-editor-mode-switch { background: var(--bg-card) !important; border-color: var(--border) !important; }
.toastui-editor-mode-switch .tab-item { background: var(--bg-card) !important; color: var(--text-muted) !important; border-color: var(--border) !important; }
.toastui-editor-mode-switch .tab-item.active { color: var(--text) !important; }
.toastui-editor-popup { background: var(--bg-card) !important; border-color: var(--border) !important; }
.toastui-editor-popup * { color: var(--text) !important; }
.toastui-editor-md-splitter { background: var(--border) !important; }
.toastui-editor-md-preview { background: var(--bg-input) !important; color: var(--text) !important; }
.toastui-editor-md-preview p, .toastui-editor-md-preview h1, .toastui-editor-md-preview h2, .toastui-editor-md-preview h3 { color: var(--text) !important; }
.toastui-editor-contents { color: var(--text) !important; }
[data-theme="dark"] .toastui-editor-ww-container .toastui-editor-contents { color: #e4e4e7 !important; }
[data-theme="dark"] .ProseMirror * { color: #e4e4e7 !important; }
[data-theme="dark"] .ProseMirror code { color: #f59e0b !important; background: #222 !important; }
[data-theme="dark"] .ProseMirror a { color: #3b82f6 !important; }
[data-theme="dark"] .ProseMirror blockquote { border-color: #444 !important; color: #aaa !important; }

/* === Tags Input === */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 38px;
  transition: border-color .15s;
}
.tags-container:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.tags-container .tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--primary);
  color: white;
  border-radius: 4px;
  font-size: 12px;
}
.tags-container .tag button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  opacity: .7;
}
.tags-container .tag button:hover { opacity: 1; }
.tags-container input {
  flex: 1;
  min-width: 80px;
  background: none;
  border: none;
  color: var(--text);
  outline: none;
  font-size: 14px;
}

/* === FAQ Pairs === */
.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}
.faq-item textarea { margin-bottom: 6px; }

/* === Checkbox for table rows === */
.row-check {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* === Utility === */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-mono { font-family: 'JetBrains Mono', 'Consolas', monospace; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.font-mono { font-family: 'JetBrains Mono', 'Consolas', monospace; }

/* === Responsive === */
@media (max-width: 1024px) {
  .sidebar { width: 220px; }
  .main { margin-left: 220px; padding: 20px; }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
  .modal { width: 95vw; }
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* === Loading spinner === */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Tooltip === */
[data-tooltip] {
  position: relative;
}
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

/* ============================================================
   SLIM SIDEBAR
   ============================================================ */
.sidebar--slim { width: 200px; }
.sidebar--slim + .main { margin-left: 200px; }
@media (max-width: 1024px) {
  .sidebar--slim { width: 180px; }
  .sidebar--slim + .main { margin-left: 180px; }
}
@media (max-width: 768px) {
  .sidebar--slim { display: none; }
  .sidebar--slim + .main { margin-left: 0; }
}

/* ============================================================
   SECTION HEADERS (dashboard sections)
   ============================================================ */
.section-header {
  margin-bottom: 16px;
  margin-top: 32px;
}
.section-header:first-of-type { margin-top: 0; }
.section-header h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-header .section-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   ALERT BANNER (pending moderation)
   ============================================================ */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  animation: alertSlideIn .3s ease;
}
.alert-banner--warning {
  background: var(--yellow-soft);
  border-color: color-mix(in srgb, var(--yellow) 30%, transparent);
  color: var(--yellow);
}
.alert-banner--success {
  background: var(--green-soft);
  border-color: color-mix(in srgb, var(--green) 30%, transparent);
  color: var(--green);
}
.alert-banner a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.alert-banner a:hover { opacity: .8; }
@keyframes alertSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   CATALOG GRID & CARDS
   ============================================================ */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1400px) {
  .catalog-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .catalog-grid { grid-template-columns: 1fr; }
}

.catalog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s, transform .2s;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.catalog-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-soft);
  transform: translateY(-2px);
}
.catalog-card:active {
  transform: translateY(0);
}

.catalog-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
}
.catalog-card-header .domain-name {
  font-size: 14px;
  font-weight: 600;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  display: flex;
  align-items: center;
  gap: 8px;
}
.catalog-card-header .ext-link {
  color: var(--text-muted);
  transition: color .15s;
  padding: 4px;
  border-radius: 4px;
}
.catalog-card-header .ext-link:hover {
  color: var(--primary);
  background: var(--primary-soft);
  text-decoration: none;
}

.catalog-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  padding: 4px 16px 12px;
}
.catalog-card-stat {
  text-align: center;
  padding: 6px 2px;
  background: var(--bg);
  border-radius: 6px;
}
.catalog-card-stat-value {
  font-size: 18px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.2;
}
.catalog-card-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: .04em;
}

.catalog-card .alert-line {
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.catalog-card .alert-line--warning {
  background: var(--yellow-soft);
  color: var(--yellow);
}
.catalog-card .alert-line--ok {
  background: var(--green-soft);
  color: var(--green);
}

.catalog-card-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   TAB NAVIGATION
   ============================================================ */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.tab-btn {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color .15s, background .15s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.tab-btn:hover {
  color: var(--text);
  background: var(--hover-bg);
}
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.tab-btn .tab-count {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}
.tab-btn.active .tab-count {
  background: var(--primary-soft);
  color: var(--primary);
}
.tab-btn .tab-count--alert {
  background: var(--yellow);
  color: #000;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   DETAIL PAGE — Back link & page header
   ============================================================ */
.breadcrumb-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 0;
  transition: color .15s;
  margin-bottom: 4px;
}
.breadcrumb-back:hover {
  color: var(--primary);
  text-decoration: none;
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.detail-header h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.detail-header .detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  transition: all .15s;
}
.detail-header .detail-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

/* Detail stats row */
.detail-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.detail-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}
.detail-stat-chip .chip-label {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 2px;
}

/* ============================================================
   LOADING SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   FADE-IN animation for grid items
   ============================================================ */
.fade-in {
  animation: fadeIn .3s ease forwards;
  opacity: 0;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.catalog-grid .catalog-card:nth-child(1) { animation-delay: 0s; }
.catalog-grid .catalog-card:nth-child(2) { animation-delay: .04s; }
.catalog-grid .catalog-card:nth-child(3) { animation-delay: .08s; }
.catalog-grid .catalog-card:nth-child(4) { animation-delay: .12s; }
.catalog-grid .catalog-card:nth-child(5) { animation-delay: .16s; }
.catalog-grid .catalog-card:nth-child(6) { animation-delay: .2s; }
.catalog-grid .catalog-card:nth-child(7) { animation-delay: .24s; }
.catalog-grid .catalog-card:nth-child(8) { animation-delay: .28s; }
.catalog-grid .card-link:nth-child(1) .card { animation-delay: 0s; }
.catalog-grid .card-link:nth-child(2) .card { animation-delay: .04s; }
.catalog-grid .card-link:nth-child(3) .card { animation-delay: .08s; }
.catalog-grid .card-link:nth-child(4) .card { animation-delay: .12s; }
.catalog-grid .card-link:nth-child(5) .card { animation-delay: .16s; }
.catalog-grid .card-link:nth-child(6) .card { animation-delay: .20s; }
.catalog-grid .card-link:nth-child(7) .card { animation-delay: .24s; }
.catalog-grid .card-link:nth-child(8) .card { animation-delay: .28s; }
.catalog-grid .card-link:nth-child(9) .card { animation-delay: .32s; }
.catalog-grid .card-link:nth-child(10) .card { animation-delay: .36s; }
.catalog-grid .card-link:nth-child(11) .card { animation-delay: .40s; }
.catalog-grid .card-link:nth-child(12) .card { animation-delay: .44s; }

/* Domain cards in catalog-grid (reuse existing card style with enhancements) */
.catalog-grid .card-link .card {
  transition: border-color .2s, box-shadow .2s, transform .2s;
  animation: fadeIn .3s ease forwards;
  opacity: 0;
}
.catalog-grid .card-link:hover .card {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-soft);
}
