/* Additional styles for ALEAS layout (keeps atlas/static/style.css untouched) */

.layout {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.sidebar {
  width: 240px;
  background: #f8f9fa;
  border-right: 1px solid #e9ecef;
  padding: 16px;
  box-sizing: border-box;
  border-radius: 8px;
  height: fit-content;
}

.sidebar a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: #064583;
  text-decoration: none;
  border: 1px solid transparent;
  margin-bottom: 8px;
  font-weight: 600;
}

.sidebar a.active {
  background: #00AEEF;
  color: #fff;
}

.sidebar a:hover {
  border-color: #00AEEF;
}

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

.card {
  background: #ffffff;
  border: 1px solid #e3f2fd;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.info-box {
  background: #f4f8fb;
  border-left: 4px solid #2196F3;
  padding: 12px 14px;
  border-radius: 6px;
}

.alert {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  padding: 12px 14px;
  border-radius: 6px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #D6F4FE;
  color: #064583;
  font-size: 0.85rem;
  border: 1px solid #00AEEF;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  border-bottom: 1px solid #e9ecef;
  padding: 10px;
  vertical-align: top;
}

.table th {
  background: #f8f9fa;
}

/* Phase1: ICNALE score tables */
.score-table th,
.score-table td {
  padding: 8px 10px;
}

/* Phase1: profile accordion + KPIs */
.profile-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 900px) {
  .profile-kpis { grid-template-columns: 1fr; }
}

.profile-kpi {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 10px 12px;
}

.profile-kpi-label {
  font-size: 0.85rem;
  color: #495057;
  font-weight: 700;
}

.profile-kpi-value {
  margin-top: 2px;
  font-size: 1.35rem;
  font-weight: 900;
  color: #064583;
  font-variant-numeric: tabular-nums;
}

.profile-kpi-suffix {
  font-size: 0.95rem;
  font-weight: 800;
  color: #495057;
  margin-left: 4px;
}

details.profile-group {
  border: 1px solid #e9ecef;
  border-radius: 10px;
  background: #fff;
  margin: 10px 0;
  overflow: hidden;
}

summary.profile-group-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 10px 12px;
  font-weight: 800;
  color: #064583;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

summary.profile-group-summary::-webkit-details-marker {
  display: none;
}

details.profile-group[open] summary.profile-group-summary {
  background: #eef7ff;
}

.profile-group-body {
  padding: 8px 10px;
}

/* Phase1: Prompting Questions quote */
.pq-quote {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1f2937;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-left: 4px solid #00AEEF;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.score-bar {
  height: 10px;
  background: #eef2f7;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00AEEF, #2196F3);
  border-radius: 999px;
}

/* Emphasize ALEAS initials in subtitle (same color as main title) */
.subtitle span {
  font-weight: 800;
  color: #064583;
}

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
}

/* difflib.HtmlDiff table tweaks */
table.diff {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.diff th,
table.diff td {
  border: 1px solid #e9ecef;
  padding: 6px 8px;
  vertical-align: top;
}

table.diff thead th {
  background: #f8f9fa;
}

.diff_header {
  background: #f8f9fa;
  color: #064583;
  font-weight: 700;
}

.diff_add {
  background: #f0fff4;
}

.diff_sub {
  background: #fff5f5;
}

.diff_chg {
  background: #fffbf0;
}

/* Phase2: word-level diff highlight */
.diff-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.diff-col {
  border: 1px solid #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.diff-col-title {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 10px 12px;
  font-weight: 700;
  color: #064583;
}

.diff-text {
  padding: 12px;
  font-family: 'Fira Mono', 'Consolas', 'Menlo', 'Monaco', 'Liberation Mono', monospace;
  font-size: 0.98rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

mark.diff-add {
  background: #c6f6d5 !important;
  border: 1px solid #38a169 !important;
  border-radius: 4px;
  padding: 0 1px;
  color: #1a202c;
}

mark.diff-del {
  background: #fed7d7 !important;
  border: 1px solid #e53e3e !important;
  border-radius: 4px;
  padding: 0 1px;
  color: #1a202c;
  text-decoration: line-through;
}

/* If there's no difference, marks won't appear; keep diff text readable */
.diff-text mark {
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
