/* ========================================================
   AI PROJECT DASHBOARD — UNIFIED DESIGN SYSTEM
   Version 1.0 — April 2026
   ======================================================== */

/* ========== ROOT VARIABLES ========== */
:root {
  /* Primary Colors */
  --red: #E8192E;
  --teal: #00C8C8;
  --gold: #F9D030;
  --green: #7CFFB2;
  --blue-light: #5FA8E8;

  /* Backgrounds */
  --bg: #07090F;
  --bg2: #0D1117;
  --bg3: #131920;
  --surface: #1A2230;

  /* Text */
  --text: #F0F4FA;
  --text-dim: #B0BFCF;
  --text-faint: #6A7D90;

  /* Borders */
  --border: rgba(255, 255, 255, 0.10);
  --border-bright: rgba(255, 255, 255, 0.22);

  /* Typography */
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'IBM Plex Sans', sans-serif;
  --cond: 'IBM Plex Sans Condensed', sans-serif;
}

/* ========== RESET & BASE ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(180deg, var(--bg), var(--bg2));
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: all 0.15s;
}

a:hover {
  text-decoration: underline;
}

/* ========== ANIMATIONS ========== */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(0, 200, 200, 0.7);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 0 10px rgba(0, 200, 200, 0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 28px 64px;
  width: 100%;
}

/* ========== NAVIGATION ========== */
.topnav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: -20px -28px 16px;
  padding: 12px 28px;
  background: rgba(13, 17, 23, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.topnav-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

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

.topnav-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 11px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.15s;
}

.topnav-link:hover {
  border-color: var(--teal);
  color: var(--text);
  background: rgba(0, 200, 200, 0.05);
}

.topnav-link.active {
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 0 0 1px rgba(0, 200, 200, 0.2) inset;
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  opacity: 0.7;
  margin-bottom: 20px;
}

/* ========== HEADER ========== */
.header {
  border-bottom: 2px solid var(--red);
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.header-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.header-title {
  font-family: var(--cond);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  margin-bottom: 8px;
}

.header-title span {
  color: var(--teal);
}

.header-sub {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.65;
}

.badges {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 11px;
  border: 1px solid;
  display: inline-block;
}

.badge-red {
  border-color: var(--red);
  color: var(--red);
}

.badge-teal {
  border-color: var(--teal);
  color: var(--teal);
}

.badge-gold {
  border-color: var(--gold);
  color: var(--gold);
}

/* ========== POSITIONING STATEMENT ========== */
.positioning {
  background: linear-gradient(135deg, #0f1d2e 0%, #0d1520 100%);
  border-left: 3px solid var(--teal);
  padding: 18px 20px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.positioning-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--teal);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.positioning-text {
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.positioning-text em {
  color: var(--teal);
  font-style: normal;
}

/* ========== SECTION LABELS ========== */
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 24px 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ========== GRID LAYOUTS ========== */
.dashboard {
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  gap: 20px;
  margin-bottom: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 0;
  margin-bottom: 28px;
  border: 1px solid var(--border);
}

/* ========== CARDS ========== */
.card {
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--bg2), var(--bg3));
  padding: 18px 20px;
  transition: all 0.15s;
  animation: fade-in 0.3s ease-out;
}

.card:hover {
  border-color: var(--teal);
}

.card-title {
  font-family: var(--cond);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.card-sub {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 12px;
}

.card-list {
  list-style: none;
}

.card-list li {
  font-size: 13px;
  color: var(--text-dim);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.card-list li:last-child {
  border-bottom: none;
}

.card-list li::before {
  content: '→';
  color: var(--teal);
  flex-shrink: 0;
}

/* ========== META CELLS ========== */
.meta-cell {
  padding: 16px 16px 14px;
  border-right: 1px solid var(--border);
  background: linear-gradient(160deg, #0d1117 0%, #111824 100%);
}

.meta-cell:last-child {
  border-right: none;
}

.meta-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.meta-value {
  font-family: var(--cond);
  font-size: 18px;
  color: var(--text);
  margin-bottom: 4px;
  font-weight: 700;
}

.meta-sub {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ========== TABLES ========== */
.table {
  width: 100%;
  border: 1px solid var(--border);
  border-collapse: collapse;
  margin-bottom: 28px;
  background: var(--bg2);
}

.table th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface);
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-bright);
}

.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* ========== STATUS INDICATORS ========== */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.dot-active {
  background: var(--green);
}

.dot-emerging {
  background: var(--gold);
}

.dot-conditional {
  background: var(--blue-light);
}

.dot-blocked {
  background: var(--red);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

/* ========== STATUS ORB ========== */
.status-orb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 200, 200, 0.3), rgba(0, 200, 200, 0.1));
  border: 2px solid var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
  margin: 0 auto;
}

.status-dot-inner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s infinite;
}

/* ========== LEFT RAIL ========== */
.left-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rail-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  text-transform: uppercase;
  text-align: center;
  margin-top: -8px;
}

.quick-nav {
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--bg2), var(--bg3));
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-nav a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 10px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-align: center;
  transition: all 0.15s;
}

.quick-nav a:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(0, 200, 200, 0.05);
}

/* ========== RIGHT PANEL ========== */
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: fit-content;
  position: sticky;
  top: 80px;
}

.panel-card {
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--bg2), var(--bg3));
  padding: 14px 16px;
}

.panel-title {
  font-family: var(--cond);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}

.panel-list {
  list-style: none;
}

.panel-list li {
  font-size: 12px;
  color: var(--text-dim);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.5;
}

.panel-list li:last-child {
  border-bottom: none;
}

/* ========== MAIN CONTENT ========== */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fade-in 0.3s ease-out;
}

/* ========== TEXT BLOCKS ========== */
.text-block {
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #0d1117 0%, #111824 100%);
  padding: 20px 22px;
  margin-bottom: 28px;
}

.text-block p {
  color: var(--text-dim);
  margin-bottom: 12px;
}

.text-block p:last-child {
  margin-bottom: 0;
}

.text-block strong {
  color: var(--text);
}

/* ========== LOG ITEMS ========== */
.log-list {
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #0d1117 0%, #111824 100%);
  padding: 0;
  margin-bottom: 28px;
}

.log-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  animation: row-in 0.3s ease-out;
}

.log-item:last-child {
  border-bottom: none;
}

.log-date {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.log-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ========== FOOTER ========== */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  margin-top: 28px;
}

.footer-left, .footer-right {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  line-height: 1.7;
}

.footer-right {
  text-align: right;
}

/* ========================================================
   RESPONSIVE DESIGN
   ======================================================== */

/* Tablet (768px - 1200px) */
@media (max-width: 1200px) {
  .dashboard {
    grid-template-columns: 180px 1fr 240px;
    gap: 16px;
    padding: 16px;
  }

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

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

  .header-title {
    font-size: 36px;
  }
}

/* Tablet Portrait (768px - 980px) */
@media (max-width: 980px) {
  body {
    padding: 16px 20px 40px;
  }

  .topnav {
    margin: -16px -20px 12px;
    padding: 12px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .topnav-links {
    width: 100%;
    order: 3;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

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

  .left-rail {
    display: none;
  }

  .right-panel {
    position: static;
    order: 3;
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

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

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

  .positioning-label {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .header-title {
    font-size: 32px;
  }
}

/* Mobile (480px - 768px) */
@media (max-width: 768px) {
  body {
    padding: 12px 16px 32px;
    font-size: 13px;
  }

  .topnav {
    margin: -12px -16px 12px;
    padding: 12px 16px;
  }

  .topnav-label {
    font-size: 9px;
  }

  .topnav-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .topnav-link {
    font-size: 9px;
    padding: 8px 6px;
    text-align: center;
  }

  .header-title {
    font-size: 28px;
  }

  .card {
    padding: 14px 16px;
  }

  .meta-cell {
    padding: 12px 12px 10px;
  }

  .table th, .table td {
    padding: 9px 11px;
    font-size: 12px;
  }

  .positioning-text {
    font-size: 16px;
  }
}

/* Small Mobile (320px - 480px) */
@media (max-width: 480px) {
  body {
    padding: 10px 12px 24px;
    font-size: 12px;
  }

  .topnav {
    margin: -10px -12px 10px;
    padding: 10px 12px;
  }

  .topnav-label {
    display: none;
  }

  .topnav-link {
    font-size: 8px;
    padding: 5px 8px;
    flex: 1;
  }

  .header-title {
    font-size: 24px;
  }

  .header-eyebrow {
    font-size: 10px;
  }

  .header-sub {
    font-size: 13px;
  }

  .badge {
    font-size: 9px;
    padding: 4px 8px;
  }

  .section-label {
    font-size: 10px;
    margin: 16px 0 10px;
  }

  .card {
    padding: 12px 14px;
  }

  .card-title {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .card-sub {
    font-size: 12px;
  }

  .meta-cell {
    padding: 10px 10px 8px;
  }

  .meta-value {
    font-size: 16px;
  }

  .meta-sub {
    font-size: 11px;
  }

  .table th, .table td {
    padding: 8px 9px;
    font-size: 11px;
  }

  .positioning-text {
    font-size: 14px;
  }

  .panel-title {
    font-size: 12px;
  }

  .panel-list li {
    font-size: 11px;
  }
}

.main-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(13, 17, 23, 0.96);
  border-bottom: 1px solid #2f6f73;
  backdrop-filter: blur(6px);
}

.main-nav a {
  color: #d0d7da;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
}

.main-nav a:hover {
  color: #ffffff;
  border-color: #6fc3c8;
}

.main-nav a.active {
  color: #a6ce39;
  border-color: #a6ce39;
  background: rgba(166, 206, 57, 0.12);
}
