/* Advancement Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f9f9f9;
  min-height: 100vh;
  padding: 20px;
  padding-top: max(64px, 20px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.screen {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  min-height: 400px;
}

#loading-screen, #auth-screen, #error-screen {
  text-align: center;
}

#loading-screen p {
  color: #666;
  font-size: 16px;
  margin-top: 20px;
}

/* The shared theme.css .screen centers text; the main screen is left-aligned. */
#main-screen {
  text-align: left;
}

#main-screen .subtitle {
  text-align: left;
  margin: 0 0 20px;
  color: #666;
}

.warning-card {
  text-align: center;
  padding: 20px;
}

.warning-card h1 {
  color: #d32f2f;
  margin-bottom: 20px;
}

.warning-card p {
  color: #666;
  margin-bottom: 30px;
}

/* Toolbar */
.controls {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 250px;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1em;
}

.status-filter {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1em;
  background: #fff;
}

.status-info {
  margin-bottom: 15px;
  padding: 10px;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 0.9em;
  color: #333;
}


/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid #02133e; margin-bottom: 18px; }
.tab { padding: 9px 14px; border: 1px solid #ddd; border-bottom: 0; border-radius: 6px 6px 0 0; background: #eee; font: inherit; cursor: pointer; color: #02133e; }
.tab.active { background: #02133e; color: #fff; border-color: #02133e; }
.count-pill { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: #d32f2f; color: #fff; font-size: 12px; text-align: center; }

select, input[type="text"], input[type="number"], textarea { padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; font: inherit; background: #fff; }
.muted { color: #666; font-size: 0.9em; }
.note { font-size: 0.88em; color: #555; margin: 4px 0; }
.warn-note { font-size: 0.88em; color: #7a5200; background: #fff6df; border-left: 4px solid #f0ad4e; padding: 6px 10px; margin: 6px 0; }
.section-title { color: #02133e; margin: 18px 0 8px; font-size: 1.1em; }
.group { border: 1px solid #ddd; border-radius: 8px; margin-bottom: 12px; background: #fff; }
.group-head { padding: 10px 14px; background: #f3f5fa; border-radius: 8px 8px 0 0; font-weight: 700; color: #02133e; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.group-head .muted { font-weight: 400; }
.finding { padding: 10px 14px; border-top: 1px solid #eee; }
.finding.resolved { background: #f6f6f6; color: #666; }
.finding-title { font-weight: 700; }
.finding-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.inline-form input[type="text"] { min-width: 260px; }
.evidence { margin: 6px 0 0 18px; font-size: 0.92em; }
.evidence li { margin: 2px 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: #0b57d0; text-decoration: underline; cursor: pointer; text-align: left; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; background: #e3e8f5; color: #02133e; }
.badge.resolved { background: #d4edda; color: #155724; }
.badge.dismissed { background: #eee; color: #555; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.93em; margin-bottom: 14px; }
table.data th, table.data td { border-bottom: 1px solid #e5e5e5; padding: 6px 8px; text-align: left; vertical-align: top; }
table.data th { background: #f3f5fa; color: #02133e; position: sticky; top: 0; }
.table-wrap { overflow-x: auto; }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.total-card { border: 1px solid #ddd; border-radius: 8px; padding: 10px 14px; background: #fafbfe; }
.total-card .big { font-size: 1.5em; font-weight: 700; color: #02133e; }
.preset { border: 1px solid #ddd; border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; background: #fff; }
.preset-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.preset-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.suggest { border: 1px solid #ddd; border-radius: 6px; background: #fff; max-width: 360px; }
.suggest button { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; background: #fff; font: inherit; cursor: pointer; }
.suggest button:hover { background: #eef2fb; }
.queue-item { padding: 10px 14px; border-top: 1px solid #eee; }
.detail-dump { font-size: 0.85em; color: #555; margin-top: 4px; }
.success-message { position: fixed; top: 74px; right: 20px; padding: 15px 20px; border-radius: 8px; color: white; font-weight: 600; background: #28a745; box-shadow: 0 4px 12px rgba(0,0,0,.2); z-index: 10000; max-width: 400px; }
.copy-confirm { color: #155724; font-weight: 700; font-size: 0.9em; }

/* Messages */
.error-message {
  position: fixed;
  top: 74px; /* clear the fixed beta-notice (top:0, ~64px) so it isn't obscured */
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  background: #d32f2f;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10000; /* above the beta-notice (z-index: 9999) */
  max-width: 400px;
}
