/* AEGIS Passport Visual — the digital passport itself
   Designed to feel like a real travel document crossed with
   a futuristic cryptographic identity card. */

/* ============================================
   WELCOME DIALOG
   ============================================ */
.welcome-body {
  padding: 24px;
  background: linear-gradient(180deg, #f5f4ec 0%, #ece9d8 100%);
  width: 540px;
}
.welcome-shield {
  text-align: center;
  font-size: 42px;
  font-weight: bold;
  letter-spacing: 6px;
  background: linear-gradient(180deg, #6cb6ff 0%, #1f4fb8 50%, #6cb6ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: "Trebuchet MS", sans-serif;
  text-shadow: 0 0 20px rgba(108, 182, 255, 0.3);
}
.welcome-title {
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  color: #003c8c;
  margin: 10px 0 6px;
}
.welcome-sub {
  text-align: center;
  font-size: 11px;
  color: #333;
  margin-bottom: 16px;
  line-height: 1.5;
}
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.welcome-card {
  background: linear-gradient(180deg, #fff 0%, #ece9d8 100%);
  border: 1px solid #aaa;
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.welcome-card-num {
  font-size: 20px;
  font-weight: bold;
  color: #1f4fb8;
  font-family: "Trebuchet MS", sans-serif;
  flex-shrink: 0;
}
.welcome-card-title { font-weight: bold; color: #003c8c; margin-bottom: 2px; }
.welcome-card-text { font-size: 10px; color: #333; line-height: 1.4; }
.welcome-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}
.welcome-footnote {
  text-align: center;
  font-size: 10px;
  color: #666;
  font-style: italic;
  margin-top: 6px;
}

/* ============================================
   PASSPORT CARD — the hero visualization
   ============================================ */
.passport-card {
  width: 540px;
  height: 340px;
  background:
    linear-gradient(135deg, #1a4ba0 0%, #245edb 50%, #1a4ba0 100%);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 16px rgba(0,0,0,0.5),
    inset 0 0 0 2px #ffd700;
  font-family: "Tahoma", sans-serif;
  color: #fff;
  margin: 0 auto;
}
.passport-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 2px, transparent 2px, transparent 6px);
  pointer-events: none;
}
/* Holographic strip */
.passport-card::after {
  content: '';
  position: absolute;
  top: 20px; right: 20px;
  width: 100px; height: 100px;
  background: conic-gradient(from 0deg, #ffd700, #ff8c00, #ff0080, #8c00ff, #0080ff, #00ff80, #ffd700);
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(2px);
  animation: holoSpin 4s linear infinite;
}
@keyframes holoSpin {
  to { transform: rotate(360deg); }
}

.passport-header {
  position: relative;
  z-index: 2;
  padding: 16px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 215, 0, 0.4);
  padding-bottom: 8px;
}
.passport-emblem {
  display: flex;
  align-items: center;
  gap: 8px;
}
.passport-emblem-shield {
  width: 36px; height: 36px;
  background: linear-gradient(180deg, #ffd700 0%, #c89020 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4), inset 0 1px 0 #fff8;
}
.passport-emblem-text { font-weight: bold; font-size: 14px; letter-spacing: 1px; }
.passport-emblem-sub { font-size: 9px; opacity: 0.8; letter-spacing: 1px; }
.passport-class {
  background: linear-gradient(180deg, #ffd700 0%, #c89020 100%);
  color: #003;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 1px;
}

.passport-body {
  position: relative;
  z-index: 2;
  padding: 12px 20px;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  margin-top: 4px;
}
.passport-photo {
  width: 100px; height: 120px;
  background: linear-gradient(180deg, #fff 0%, #c0c0c0 100%);
  border: 2px solid #ffd700;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  position: relative;
  box-shadow: inset 0 0 0 1px #000;
}
.passport-photo::after {
  content: 'AI';
  position: absolute;
  bottom: 4px;
  font-size: 10px;
  font-weight: bold;
  color: #000;
  background: rgba(255,255,255,0.8);
  padding: 0 4px;
}

.passport-fields { display: flex; flex-direction: column; gap: 4px; }
.passport-field {
  display: flex;
  align-items: baseline;
  gap: 6px;
  border-bottom: 1px dotted rgba(255,255,255,0.3);
  padding-bottom: 2px;
}
.passport-field-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffd700;
  font-weight: bold;
  min-width: 70px;
}
.passport-field-value {
  font-size: 11px;
  font-weight: bold;
  color: #fff;
}

.passport-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.3);
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  border-top: 1px solid rgba(255, 215, 0, 0.3);
}
.passport-mrz {
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: #ffd700;
  line-height: 1.4;
}
.passport-qr {
  width: 50px; height: 50px;
  background: #fff;
  padding: 2px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
}
.qr-cell { background: #000; }
.qr-cell.on { background: #000; }
.qr-cell.off { background: #fff; }

/* Trust score gauge on passport */
.passport-trust {
  position: absolute;
  top: 50px;
  right: 20px;
  z-index: 3;
  text-align: center;
  background: rgba(0,0,0,0.4);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 215, 0, 0.5);
  display: none; /* holo is in its place */
}

/* ============================================
   AGENT CARDS
   ============================================ */
.agent-card {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: linear-gradient(180deg, #fff 0%, #f5f4ec 100%);
  border: 1px solid #aaa;
  margin-bottom: 6px;
  align-items: center;
  cursor: pointer;
  position: relative;
}
.agent-card:hover {
  background: linear-gradient(180deg, #e8f0fc 0%, #d0e0fc 100%);
}
.agent-card.selected {
  background: linear-gradient(180deg, #316ac5 0%, #1a4ba0 100%);
  color: #fff;
  border-color: #003c8c;
}
.agent-avatar {
  width: 48px; height: 48px;
  background: linear-gradient(180deg, #fff 0%, #b0d4ff 100%);
  border: 2px solid #1f4fb8;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.agent-card.selected .agent-avatar {
  background: linear-gradient(180deg, #ffd700 0%, #c89020 100%);
  border-color: #ffd700;
  color: #000;
}
.agent-info { flex: 1; min-width: 0; }
.agent-name { font-weight: bold; font-size: 12px; margin-bottom: 2px; }
.agent-purpose { font-size: 10px; opacity: 0.8; line-height: 1.3; }
.agent-meta { display: flex; gap: 6px; margin-top: 4px; font-size: 9px; }
.agent-meta-item { display: flex; align-items: center; gap: 2px; }
.trust-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: bold;
  background: linear-gradient(180deg, #6cd06c 0%, #2d8a2d 100%);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
.trust-badge.medium { background: linear-gradient(180deg, #e8b545 0%, #986810 100%); }
.trust-badge.low { background: linear-gradient(180deg, #e08585 0%, #801515 100%); }
.trust-badge.new { background: linear-gradient(180deg, #c0c0c0 0%, #888 100%); }

/* ============================================
   PERMISSIONS UI
   ============================================ */
.perm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.perm-card {
  background: linear-gradient(180deg, #fff 0%, #f5f4ec 100%);
  border: 1px solid #aaa;
  padding: 10px;
  position: relative;
}
.perm-card.enabled {
  background: linear-gradient(180deg, #e8f5e8 0%, #d0e8d0 100%);
  border-color: #2d8a2d;
}
.perm-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.perm-card-icon {
  width: 24px; height: 24px;
  background: linear-gradient(180deg, #6cb6ff 0%, #1f4fb8 100%);
  border: 1px solid #003c8c;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
}
.perm-card-title { font-weight: bold; font-size: 11px; color: #003c8c; flex: 1; }
.perm-card-desc { font-size: 10px; color: #333; line-height: 1.3; margin-bottom: 6px; }
.perm-card-controls { display: flex; align-items: center; gap: 6px; font-size: 10px; }

/* ============================================
   ACTIVITY LOG ENTRIES
   ============================================ */
.activity-entry {
  display: grid;
  grid-template-columns: 60px 80px 1fr 100px 100px;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 11px;
  align-items: center;
}
.activity-entry:hover { background: #f0f7ff; }
.activity-entry.approved { border-left: 3px solid #2d8a2d; }
.activity-entry.rejected { border-left: 3px solid #c02020; }
.activity-entry.pending { border-left: 3px solid #c89020; }
.activity-time { font-family: "Lucida Console", monospace; font-size: 10px; color: #666; }
.activity-icon { font-size: 16px; text-align: center; }
.activity-action { font-weight: bold; }
.activity-target { color: #1f4fb8; }
.activity-status {
  font-size: 9px;
  font-weight: bold;
  padding: 1px 6px;
  border-radius: 8px;
  text-align: center;
  text-transform: uppercase;
}
.activity-status.approved { background: #2d8a2d; color: #fff; }
.activity-status.rejected { background: #c02020; color: #fff; }
.activity-status.pending { background: #c89020; color: #fff; }

/* ============================================
   TRUST NETWORK GRAPH
   ============================================ */
.trust-graph {
  position: relative;
  width: 100%;
  height: 400px;
  background: radial-gradient(ellipse at center, #1a4ba0 0%, #003366 100%);
  border: 1px solid #0051d0;
  overflow: hidden;
}
.trust-graph::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108, 182, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 182, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
}
.trust-node {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  border: 2px solid;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 2;
}
.trust-node:hover { transform: scale(1.15); z-index: 3; }
.trust-node.center {
  background: radial-gradient(circle, #ffd700 0%, #c89020 100%);
  border-color: #fff;
  box-shadow: 0 0 20px #ffd700;
  width: 80px; height: 80px;
  font-size: 30px;
  z-index: 3;
}
.trust-node.trusted {
  background: radial-gradient(circle, #6cd06c 0%, #2d8a2d 100%);
  border-color: #aaffaa;
}
.trust-node.unknown {
  background: radial-gradient(circle, #c0c0c0 0%, #888 100%);
  border-color: #ddd;
}
.trust-node.untrusted {
  background: radial-gradient(circle, #e08585 0%, #801515 100%);
  border-color: #ffaaaa;
}
.trust-node-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  font-size: 9px;
  color: #fff;
  white-space: nowrap;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
}
.trust-edge {
  position: absolute;
  background: #6cb6ff;
  height: 1px;
  transform-origin: left center;
  opacity: 0.4;
  z-index: 1;
}
.trust-edge.trusted { background: #6cd06c; opacity: 0.6; }
.trust-edge.untrusted { background: #e08585; opacity: 0.6; }

/* ============================================
   GEMMA AI CONSOLE
   ============================================ */
.gemma-console {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #000;
  color: #6cb6ff;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 12px;
  padding: 12px;
  overflow: auto;
}
.gemma-line { display: flex; gap: 8px; margin-bottom: 4px; line-height: 1.5; }
.gemma-prompt { color: #6cd06c; font-weight: bold; }
.gemma-time { color: #888; }
.gemma-content { flex: 1; color: #fff; word-wrap: break-word; }
.gemma-content .ok { color: #6cd06c; }
.gemma-content .warn { color: #e8b545; }
.gemma-content .err { color: #e08585; }
.gemma-content .ai { color: #6cb6ff; }
.gemma-content .reasoning { color: #c0c0c0; font-style: italic; }
.gemma-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #6cb6ff;
  animation: gemmaBlink 1s steps(2) infinite;
  vertical-align: middle;
}
@keyframes gemmaBlink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.gemma-reasoning-card {
  background: linear-gradient(180deg, #1a1a2e 0%, #0a0a1e 100%);
  border: 1px solid #6cb6ff;
  border-radius: 4px;
  padding: 10px;
  margin: 8px 0;
  color: #fff;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  position: relative;
}
.gemma-reasoning-card::before {
  content: '🧠 Gemma Analysis';
  position: absolute;
  top: -8px; left: 8px;
  background: #0a0a1e;
  padding: 0 4px;
  color: #6cb6ff;
  font-size: 9px;
  font-weight: bold;
}
.gemma-risk-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
  font-size: 10px;
}
.gemma-risk-track {
  flex: 1;
  height: 10px;
  background: #222;
  border: 1px solid #444;
  position: relative;
  overflow: hidden;
}
.gemma-risk-fill {
  height: 100%;
  background: linear-gradient(90deg, #2d8a2d 0%, #e8b545 50%, #c02020 100%);
}
.gemma-decision {
  display: inline-block;
  padding: 3px 8px;
  font-weight: bold;
  font-size: 10px;
  border-radius: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}
.gemma-decision.approve { background: #2d8a2d; color: #fff; }
.gemma-decision.warn { background: #c89020; color: #fff; }
.gemma-decision.deny { background: #c02020; color: #fff; }
.gemma-decision.review { background: #1f4fb8; color: #fff; }

/* ============================================
   WIZARD / STEPPER
   ============================================ */
.wizard-steps {
  display: flex;
  background: linear-gradient(180deg, #0997ff 0%, #0666de 50%, #0160c8 100%);
  padding: 8px 12px;
  gap: 4px;
  color: #fff;
  font-size: 11px;
  border-bottom: 2px solid #003c8c;
  text-shadow: 0 1px 0 rgba(0,0,0,0.3);
  flex-shrink: 0;
}
.wizard-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.2);
}
.wizard-step.active {
  background: rgba(255, 215, 0, 0.9);
  color: #003c8c;
  font-weight: bold;
  border-color: #ffd700;
  text-shadow: none;
}
.wizard-step.done { background: rgba(45, 138, 45, 0.7); }
.wizard-step-num {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 10px;
}
.wizard-step.active .wizard-step-num { background: #003c8c; color: #fff; }
.wizard-step.done .wizard-step-num { background: #fff; color: #2d8a2d; }

/* ============================================
   STAT TILES
   Each tile lays out [label] [big value] [sub] in a single
   horizontal row. The grid below the tiles is fluid so tiles
   shrink gracefully without stacking label/value/sub.
   ============================================ */
.stat-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin-bottom: 10px;
  width: 100%;
}
.stat-tile {
  flex: 1 1 0;
  min-width: 0;
  background: linear-gradient(180deg, #f5f4ec 0%, #d6d2c2 100%);
  border: 1px solid #aaa;
  padding: 4px 6px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  height: 32px;
  box-sizing: border-box;
}
.stat-tile-blue {
  background: linear-gradient(180deg, #6cb6ff 0%, #1f4fb8 100%);
  color: #fff;
  border-color: #003c8c;
  text-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
.stat-tile-green {
  background: linear-gradient(180deg, #6cd06c 0%, #2d8a2d 100%);
  color: #fff;
  border-color: #1a4d1a;
  text-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
.stat-tile-amber {
  background: linear-gradient(180deg, #f0c560 0%, #986810 100%);
  color: #fff;
  border-color: #604005;
  text-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
.stat-tile-red {
  background: linear-gradient(180deg, #e08585 0%, #801515 100%);
  color: #fff;
  border-color: #501010;
  text-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
.stat-tile-label {
  font-size: 10px;
  opacity: 0.9;
  flex: 0 1 auto;
  text-overflow: ellipsis;
  overflow: hidden;
  min-width: 0;
}
.stat-tile-value {
  font-size: 18px;
  font-weight: bold;
  font-family: "Trebuchet MS", sans-serif;
  flex: 0 0 auto;
  line-height: 1;
}
.stat-tile-sub {
  font-size: 9px;
  opacity: 0.8;
  flex: 0 1 auto;
  text-overflow: ellipsis;
  overflow: hidden;
  min-width: 0;
}
.stat-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,0.4);
}
