:root {
  --bg: #070b14;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --panel-hover: rgba(30, 41, 59, 0.88);
  --panel2: #141f36;
  --line: rgba(255, 255, 255, 0.08);
  --line-bright: rgba(99, 102, 241, 0.35);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #6366f1;
  --indigo: #818cf8;
  --aqua: #22d3ee;
  --emerald: #10b981;
  --orange: #f59e0b;
  --red: #ef4444;
  --purple: #a855f7;
  --pink: #ec4899;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.08);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 45px rgba(99, 102, 241, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 85% -10%, rgba(99, 102, 241, 0.18) 0, transparent 32rem),
    radial-gradient(circle at 10% 40%, rgba(34, 211, 238, 0.12) 0, transparent 35rem),
    radial-gradient(circle at 90% 90%, rgba(168, 85, 247, 0.1) 0, transparent 30rem),
    var(--bg);
  background-attachment: fixed;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  color: inherit;
}

.hidden {
  display: none !important;
}

/* Login Screen */
.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.25) 0, transparent 30rem),
    radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.2) 0, transparent 30rem),
    var(--bg);
}

.login-card {
  width: min(440px, 100%);
  padding: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  font-weight: 900;
  color: #fff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
}

.login-card .brand-mark {
  width: 52px;
  height: 52px;
  font-size: 24px;
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--indigo);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-card h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.04em;
  font-weight: 800;
  background: linear-gradient(135deg, #f8fafc, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.muted {
  color: var(--muted);
  line-height: 1.55;
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

label {
  display: grid;
  gap: 7px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 650;
}

input,
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--indigo);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 0 15px rgba(99, 102, 241, 0.15);
}

/* Button System */
.primary,
.accent,
.secondary,
.quiet {
  border: 0;
  border-radius: 10px;
  padding: 11px 18px;
  font-weight: 750;
  font-size: 13px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.accent {
  background: linear-gradient(135deg, #22d3ee, #06b6d4);
  color: #042723;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(34, 211, 238, 0.3);
}

.accent:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.45);
}

.secondary {
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #ffffff;
  border-color: rgba(99, 102, 241, 0.4);
}

.quiet {
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
}

.quiet:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 20px 0 0;
}

.hint code {
  color: var(--indigo);
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
}

/* App Shell Layout */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}

.sidebar {
  display: flex;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-direction: column;
  padding: 22px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 16, 30, 0.82);
  backdrop-filter: blur(20px);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 9px 28px;
}

.brand strong {
  display: block;
  letter-spacing: -0.03em;
  font-size: 16px;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.navigation {
  display: grid;
  gap: 4px;
}

.navigation button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #94a3b8;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.18s ease;
}

.navigation button span {
  width: 16px;
  text-align: center;
  font-size: 16px;
}

.navigation button:hover {
  background: rgba(30, 41, 59, 0.6);
  color: #f8fafc;
}

.navigation button.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.25), rgba(99, 102, 241, 0.08));
  color: #ffffff;
  border-left: 3px solid var(--aqua);
  box-shadow: inset 0 0 15px rgba(99, 102, 241, 0.12);
  font-weight: 750;
}

.navigation b {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  font-size: 11px;
  font-weight: 800;
}

.sidebar-bottom {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: 16px 9px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.health,
.connection {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}

.health i,
.connection i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 10px var(--aqua);
}

.workspace {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 16px 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 16, 30, 0.65);
  backdrop-filter: blur(14px);
}

.topbar h2 {
  margin: 0;
  letter-spacing: -0.035em;
  font-size: 24px;
  font-weight: 800;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.compact {
  padding: 9px 14px;
  font-size: 13px;
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #f8fafc;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.view {
  max-width: 1560px;
  margin: auto;
  padding: 32px 36px 60px;
}

.flash {
  position: fixed;
  z-index: 99;
  right: 24px;
  bottom: 24px;
  max-width: 400px;
  padding: 14px 20px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 600;
}

.flash.error {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(40, 15, 20, 0.95);
  color: #fca5a5;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.page-heading h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.page-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* Metric Cards Grid */
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric {
  min-height: 128px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.75));
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.metric:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 20px rgba(99, 102, 241, 0.1);
}

.metric .metric-label {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 32px;
  letter-spacing: -0.05em;
  font-weight: 900;
  color: #f8fafc;
}

.metric small {
  display: block;
  margin-top: 6px;
  color: var(--indigo);
  font-size: 11px;
  font-weight: 600;
}

.metric.warning strong {
  color: var(--orange);
}

.metric.alert strong {
  color: var(--red);
}

.metric.review strong {
  color: var(--purple);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 20px;
  margin-top: 22px;
}

/* Master Panel Component Layout & Aesthetics */
.panel {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(16, 24, 45, 0.82), rgba(11, 17, 32, 0.92));
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
}

.panel-head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-head h4::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 14px;
  background: linear-gradient(180deg, var(--indigo), var(--aqua));
  border-radius: 2px;
}

.panel-head a,
.text-button {
  border: 0;
  background: none;
  color: var(--indigo);
  font-size: 12px;
  font-weight: 750;
  transition: color 0.15s ease;
}

.panel-head a:hover,
.text-button:hover {
  color: var(--aqua);
}

.list {
  display: grid;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}

.list-item:hover {
  background: rgba(30, 41, 59, 0.4);
}

.list-item:last-child {
  border: 0;
}

.list-main {
  min-width: 0;
  flex: 1;
}

.list-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 13px;
  color: #f1f5f9;
}

.list-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

/* Status Badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.6);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-transform: uppercase;
}

.status:before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
}

.status.RUNNING:before,
.status.TESTING:before,
.status.STARTING:before {
  background: var(--aqua);
  box-shadow: 0 0 8px var(--aqua);
}

.status.HUMAN_REVIEW {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.15);
  color: #e9d5ff;
}

.status.HUMAN_REVIEW:before {
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple);
}

.status.FAILED,
.status.REJECTED {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.status.FAILED:before,
.status.REJECTED:before {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.status.COMPLETED,
.status.DEPLOYED,
.status.COMMITTED {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.status.COMPLETED:before,
.status.DEPLOYED:before,
.status.COMMITTED:before {
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.status.PUSHED {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.status.PUSHED:before {
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
}

.status.RATE_LIMITED {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.2);
  color: #e9d5ff;
}

.status.RATE_LIMITED:before {
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple);
}

.status.QUEUED:before {
  background: var(--orange);
  box-shadow: 0 0 8px var(--orange);
}

.empty {
  padding: 32px 20px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  font-weight: 500;
}

/* Tables */
.table-wrap {
  overflow: auto;
}

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

.table th {
  padding: 13px 16px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.85);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.th-sort-btn {
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 800;
  transition: color 0.15s ease;
}

.th-sort-btn:hover {
  color: #f8fafc;
}

.th-sort-btn.active {
  color: #60a5fa;
}

.sort-dir-indicator {
  font-size: 10px;
  color: #60a5fa;
}

.table td {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.table tr[data-task],
.table tbody tr {
  transition: background 0.15s ease;
}

.table tr[data-task]:hover,
.table tbody tr:hover {
  background: rgba(30, 41, 59, 0.5);
}

.table .task-name {
  font-weight: 750;
  color: #f8fafc;
}

.table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.risk {
  font-size: 11px;
  font-weight: 800;
}

.risk.HIGH,
.risk.CRITICAL {
  color: #fca5a5;
}

.risk.MEDIUM {
  color: var(--orange);
}

.risk.LOW {
  color: var(--aqua);
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.priority-badge.URGENT {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.priority-badge.HIGH {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.priority-badge.NORMAL {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.priority-badge.LOW {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.toolbar input,
.toolbar select {
  width: auto;
  min-width: 160px;
  padding: 10px 14px;
  font-size: 13px;
}

.spacer {
  flex: 1;
}

/* Project Cards Grid & Agent Cards */
.project-grid,
.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.project-card,
.agent-card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(16, 24, 45, 0.85), rgba(11, 17, 32, 0.95));
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.project-card:hover,
.agent-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.12);
}

.card-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-card h4,
.agent-card h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
}

.path {
  overflow: hidden;
  margin: 6px 0 14px;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(8, 14, 26, 0.6);
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
}

.card-stats {
  display: flex;
  gap: 18px;
  margin: 16px 0;
  color: #94a3b8;
  font-size: 11px;
}

.card-stats strong {
  display: block;
  margin-top: 3px;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 800;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button-small {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 750;
  transition: all 0.18s ease;
}

.button-small:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(51, 65, 85, 0.9);
  color: #ffffff;
}

.button-small.primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  border: none;
}

.button-small.primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.button-small.danger {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.button-small.danger:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ffffff;
}

/* Modals & Dialog Windows */
.dialog {
  width: min(800px, calc(100% - 32px));
  padding: 0;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 20px;
  background: rgba(12, 19, 36, 0.95);
  backdrop-filter: blur(24px);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.dialog::backdrop {
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(6px);
}

.dialog.small {
  width: min(540px, calc(100% - 32px));
}

.dialog-header,
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}

.dialog-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
}

.dialog-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
}

.dialog-body {
  padding: 24px;
}

.dialog-footer {
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
}

.close {
  border: 0;
  background: none;
  color: #94a3b8;
  font-size: 26px;
  transition: color 0.15s;
}

.close:hover {
  color: #f8fafc;
}

.grid-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.wide {
  grid-column: 1 / -1;
}

/* Task Layout */
.task-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}

.task-header {
  padding: 22px;
}

.task-header h3 {
  margin: 8px 0;
  font-size: 24px;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.task-header p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.6;
  font-size: 13px;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tabbar {
  display: flex;
  overflow: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.8);
}

.tabbar button {
  padding: 13px 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tabbar button:hover {
  color: #f8fafc;
}

.tabbar button.active {
  border-color: var(--aqua);
  color: #ffffff;
  background: rgba(99, 102, 241, 0.1);
}

.terminal {
  min-height: 360px;
  max-height: 580px;
  overflow: auto;
  padding: 16px;
  background: #060a12;
  color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.6;
  border-radius: 0 0 14px 14px;
}

.log-line {
  display: grid;
  grid-template-columns: 80px 76px 1fr;
  gap: 10px;
  padding: 3px 0;
}

.log-time {
  color: #64748b;
}

.log-source {
  color: var(--indigo);
  font-weight: 700;
}

.log-line.ERROR .log-message {
  color: #fca5a5;
}

.diff {
  overflow: auto;
  max-height: 580px;
  padding: 0;
  background: #060a12;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  border-radius: 0 0 14px 14px;
}

.diff pre {
  margin: 0;
  padding: 16px;
  white-space: pre-wrap;
}

.diff .add {
  color: #6ee7b7;
}

.diff .del {
  color: #fca5a5;
}

.detail-list {
  display: grid;
  gap: 0;
}

.detail-row {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row:last-child {
  border: 0;
}

.detail-row span {
  display: block;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-row strong,
.detail-row code {
  display: block;
  margin-top: 5px;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 650;
  word-break: break-word;
}

.timeline {
  padding: 8px 18px;
}

.timeline-item {
  position: relative;
  padding: 10px 0 10px 18px;
  border-left: 1px solid rgba(99, 102, 241, 0.3);
  color: #cbd5e1;
  font-size: 12px;
}

.timeline-item:before {
  position: absolute;
  left: -4px;
  top: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--indigo);
  content: '';
}

.timeline-item strong {
  color: #f8fafc;
}

.review-callout {
  padding: 18px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(41, 32, 72, 0.8), rgba(26, 20, 46, 0.9));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.review-callout h4 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #f8fafc;
}

.review-callout p {
  margin: 0 0 14px;
  color: #d8b4fe;
  font-size: 12px;
  line-height: 1.5;
}

.validation-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.validation-row:last-child {
  border: 0;
}

.validation-icon {
  font-weight: 800;
}

.validation-icon.pass {
  color: var(--aqua);
}

.validation-icon.fail {
  color: var(--red);
}

.validation-command {
  margin-left: auto;
  max-width: 45%;
  overflow: hidden;
  color: #94a3b8;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-form {
  max-width: 800px;
  padding: 22px;
}

.settings-form .grid-form {
  margin-top: 16px;
}

.activity {
  font-size: 12px;
}

.activity td:nth-child(2) {
  font-weight: 750;
  color: #f8fafc;
}

.zero-margin {
  margin: 0 !important;
}

.search-input {
  min-width: 320px;
}

.mt-17 {
  margin-top: 17px !important;
}

.mt-19 {
  margin-top: 19px !important;
}

/* Chat & Threads */
.chat-thread-container {
  display: flex;
  flex-direction: column;
  min-height: 380px;
  background: rgba(12, 19, 36, 0.9);
}

.chat-messages-box {
  flex: 1;
  max-height: 480px;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-card {
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.chat-card.change-req-card {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(26, 20, 46, 0.7);
}

.chat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.chat-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.25);
  color: var(--indigo);
  font-size: 11px;
  font-weight: 800;
}

.chat-author strong {
  color: #f8fafc;
  font-size: 13px;
}

.chat-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.chat-tag {
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
}

.chat-tag.tag-comment {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.chat-tag.tag-change-req {
  background: rgba(168, 85, 247, 0.2);
  color: #e9d5ff;
}

.chat-card-body {
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}

.chat-form {
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 17, 32, 0.95);
  display: grid;
  gap: 12px;
}

.chat-input-wrap textarea {
  min-height: 68px;
  max-height: 160px;
  font-size: 13px;
  background: rgba(6, 10, 18, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.chat-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-type-select label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #94a3b8;
}

.chat-type-select select {
  width: auto;
  padding: 6px 12px;
  font-size: 12px;
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

/* Live Activity Bar */
.live-activity-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.3);
  padding: 12px 16px;
  border-radius: 10px;
  margin-top: 14px;
  font-size: 12px;
  color: #cffaff;
}

.activity-pulse {
  width: 8px;
  height: 8px;
  min-width: 8px;
  background-color: var(--aqua);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.7);
  animation: pulse-ring 1.6s infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(34, 211, 238, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 211, 238, 0);
  }
}

.activity-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #e0f2fe;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-activity-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #93c5fd;
}

.star-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: all 0.18s ease;
}

.star-btn:hover {
  transform: scale(1.25);
  color: #f59e0b;
}

.star-btn.favorited {
  color: #f59e0b;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

.group-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.project-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-group-header .group-icon {
  color: var(--indigo);
}

.project-card.is-favorite {
  border-left: 3px solid #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(16, 24, 45, 0.85) 65%);
}

.folder-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

.folder-section {
  background: rgba(13, 22, 41, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.folder-section:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.folder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(20, 34, 61, 0.7);
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s ease;
}

.folder-header:hover {
  background: rgba(30, 48, 82, 0.85);
}

.folder-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 14px;
  color: #e2e8f0;
}

.folder-caret {
  font-size: 11px;
  color: var(--indigo);
  width: 14px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.folder-icon {
  font-size: 16px;
}

.folder-name {
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.folder-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  margin-left: 8px;
}

.folder-body {
  padding: 18px;
}

.folder-body.hidden {
  display: none;
}

.view-mode-toggle {
  display: inline-flex;
  background: rgba(13, 22, 41, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.view-mode-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.view-mode-btn:hover {
  color: #ffffff;
}

.view-mode-btn.active {
  background: rgba(30, 41, 59, 0.9);
  color: var(--indigo);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.project-card[draggable="true"] {
  cursor: grab;
}

.project-card.dragging {
  opacity: 0.35;
  cursor: grabbing;
  border: 2px dashed var(--indigo);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.project-card.drag-over-target {
  border: 2px dashed var(--aqua) !important;
  background: rgba(34, 211, 238, 0.12) !important;
  transform: scale(1.02);
  transition: all 0.15s ease;
}

.folder-section.folder-drag-over {
  border: 2px dashed var(--indigo) !important;
  background: rgba(99, 102, 241, 0.15) !important;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.attachments-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.task-attached-header {
  padding: 10px 18px;
  background: rgba(17, 27, 49, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-card-attachments {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(25, 39, 66, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: #d1e2ff;
}

.attachment-chip.image-chip {
  padding: 4px 8px;
}

.attachment-thumb {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.attachment-link {
  color: #93c5fd;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.attachment-link:hover {
  text-decoration: underline;
}

.attachment-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-remove-btn {
  background: transparent;
  border: none;
  color: #fca5a5;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.bulk-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow);
  font-size: 13px;
  color: #e0f2fe;
}

.bulk-actions-bar strong {
  color: #ffffff;
  font-weight: 800;
}

.bulk-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-cb-col {
  width: 36px;
  text-align: center;
}

.task-select-cb {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--blue);
}

.logs-container-with-chat {
  display: flex;
  flex-direction: column;
  background: #060a12;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}

.live-logs-chat-box {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 20, 38, 0.9);
}

.live-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(16, 25, 46, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.live-chat-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f8fafc;
  font-weight: 700;
}

.rate-limit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(168, 85, 247, 0.5);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(15, 23, 42, 0.95));
  box-shadow: var(--shadow);
  color: #ede9fe;
}

.cli-auth-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(19, 30, 54, 0.8), rgba(15, 23, 42, 0.9));
  margin-top: 14px;
}

.cli-auth-card .cli-info h5 {
  margin: 0;
  font-size: 15px;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.cli-auth-card .cli-info p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Dedicated Project SEO Control Panel Aesthetics */
#seo-dialog {
  width: min(940px, calc(100% - 32px));
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(12, 20, 39, 0.96), rgba(8, 14, 28, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 50px rgba(99, 102, 241, 0.18);
}

#seo-dialog .dialog-header {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  padding: 22px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

#seo-dialog .dialog-header h3 {
  font-size: 23px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#seo-dialog .dialog-body {
  padding: 26px;
}

.seo-nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  padding-bottom: 14px;
  margin-bottom: 22px;
  overflow-x: auto;
}

.seo-nav-tab {
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.7);
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.seo-nav-tab:hover {
  background: rgba(30, 41, 59, 0.85);
  color: #f8fafc;
  border-color: rgba(99, 102, 241, 0.4);
}

.seo-nav-tab.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  border-color: #818cf8;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.45);
}

.seo-health-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  margin-bottom: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.seo-score-box {
  text-align: center;
  padding: 14px 22px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
}

.seo-score-num {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}

.seo-score-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.seo-subscores-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}

.seo-subscore-card {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 14px 10px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.seo-subscore-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(30, 41, 59, 0.75);
}

.seo-subscore-val {
  font-size: 19px;
  font-weight: 800;
  color: #f8fafc;
  margin-top: 4px;
}

.seo-subscore-title {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 650;
}

.seo-rule-card {
  padding: 14px 18px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  transition: background 0.18s ease;
}

.seo-rule-card:hover {
  background: rgba(30, 41, 59, 0.7);
}

.seo-pill-checkbox {
  font-size: 12px;
  padding: 7px 14px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  transition: all 0.18s ease;
}

.seo-pill-checkbox:hover {
  background: rgba(51, 65, 85, 0.85);
  color: #ffffff;
}

.seo-pill-checkbox input:checked+span {
  color: #818cf8;
  font-weight: 800;
}

/* Responsiveness */
@media (max-width: 1050px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .task-layout {
    grid-template-columns: 1fr;
  }

  .section-grid {
    grid-template-columns: 1fr;
  }

  .seo-subscores-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
    flex-direction: row;
    align-items: center;
    overflow: auto;
  }

  .brand {
    padding: 0 12px 0 0;
  }

  .navigation {
    display: flex;
  }

  .navigation button {
    width: auto;
    padding: 8px;
    white-space: nowrap;
  }

  .navigation button span {
    display: none;
  }

  .sidebar-bottom {
    display: none;
  }

  .topbar {
    padding: 14px 18px;
  }

  .top-actions .connection {
    display: none;
  }

  .view {
    padding: 22px 18px;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .metric {
    min-height: 108px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid-form {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
  }

  .toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .toolbar input,
  .toolbar select {
    flex: 1;
    min-width: 0;
  }

  .topbar h2 {
    font-size: 20px;
  }

  .seo-subscores-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 450px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .top-actions {
    gap: 8px;
  }

  .avatar {
    display: none;
  }

  .navigation button {
    font-size: 0;
  }

  .navigation button span {
    display: block;
    font-size: 15px;
  }

  .navigation button.active {
    font-size: 0;
  }

  .quota-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
  }

  .quota-pill-badge.normal {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
  }

  .quota-pill-badge.normal:hover {
    background: rgba(16, 185, 129, 0.25);
    transform: translateY(-1px);
  }

  .quota-pill-badge.limited {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    animation: pulse-border 2s infinite;
  }

  .quota-pill-badge.limited:hover {
    background: rgba(239, 68, 68, 0.28);
    transform: translateY(-1px);
  }

  .quota-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
  }

  .quota-dot.green {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
  }

  .quota-dot.red {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
  }

}