:root {
  --igap-navy: #102a43;
  --igap-blue: #1f5f99;
  --igap-surface: #ffffff;
  --igap-soft: #f4f7fb;
  --igap-border: #d9e2ec;
  --igap-text: #243b53;
  --igap-muted: #627d98;
  --igap-green: #16803a;
  --igap-orange: #b76000;
  --igap-red: #b42318;
  --igap-radius: 14px;
}

.igap-portal,
.igap-dashboard {
  color: var(--igap-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.igap-portal * { box-sizing: border-box; }

.igap-portal-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 28px;
  color: #fff;
  background: linear-gradient(135deg, #102a43 0%, #1f5f99 100%);
  border-radius: var(--igap-radius);
  margin-bottom: 18px;
}

.igap-portal-header h1 { margin: 4px 0 6px; color: #fff; font-size: clamp(28px, 4vw, 42px); }
.igap-portal-header p { margin: 0; opacity: .86; }
.igap-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; opacity: .82; }
.igap-user-box { display: flex; flex-direction: column; min-width: 220px; padding: 12px 16px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 12px; }
.igap-user-box span { font-size: 12px; opacity: .78; margin-top: 3px; }

.igap-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 7px;
  margin-bottom: 24px;
  background: var(--igap-soft);
  border: 1px solid var(--igap-border);
  border-radius: 12px;
}
.igap-nav a { white-space: nowrap; text-decoration: none; color: var(--igap-text); padding: 9px 13px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.igap-nav a:hover, .igap-nav a.is-active { background: #fff; color: var(--igap-blue); box-shadow: 0 2px 8px rgba(16,42,67,.08); }

.igap-kpis { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 12px; margin: 0 0 26px; }
.igap-kpi { padding: 18px; background: #fff; border: 1px solid var(--igap-border); border-radius: 12px; box-shadow: 0 5px 18px rgba(16,42,67,.05); }
.igap-kpi strong { display: block; font-size: 28px; line-height: 1; color: var(--igap-navy); }
.igap-kpi span { display: block; margin-top: 7px; color: var(--igap-muted); font-size: 13px; }

.igap-section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 20px 0 14px; }
.igap-section-head h2 { margin: 0; color: var(--igap-navy); font-size: 25px; }
.igap-section-head p { margin: 4px 0 0; color: var(--igap-muted); }

.igap-button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 9px; padding: 11px 16px; background: var(--igap-blue); color: #fff !important; text-decoration: none !important; font-weight: 700; cursor: pointer; }
.igap-button:hover { filter: brightness(.92); }
.igap-button-light { background: #e9f2fb; color: var(--igap-blue) !important; }

.igap-gtt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.igap-gtt-card { padding: 20px; background: #fff; border: 1px solid var(--igap-border); border-radius: var(--igap-radius); box-shadow: 0 7px 20px rgba(16,42,67,.05); }
.igap-gtt-card-large { min-height: 330px; }
.igap-gtt-card h3 { margin: 14px 0 9px; color: var(--igap-navy); font-size: 20px; }
.igap-card-top, .igap-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.igap-card-foot { margin-top: 9px; color: var(--igap-muted); font-size: 13px; }
.igap-code { display: inline-block; padding: 5px 9px; border-radius: 99px; background: #e9f2fb; color: var(--igap-blue); font-size: 12px; font-weight: 800; }
.igap-muted { color: var(--igap-muted); }
.igap-progress { height: 9px; overflow: hidden; background: #e8eef4; border-radius: 999px; }
.igap-progress span { display: block; height: 100%; background: var(--igap-blue); border-radius: 999px; }

.igap-rag { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; }
.igap-rag-vert { color: #0b5d2a; background: #dff7e8; }
.igap-rag-orange { color: #884600; background: #fff1d6; }
.igap-rag-rouge { color: #8c1d18; background: #ffe3e1; }

.igap-details { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; margin-top: 18px; }
.igap-details dt { font-weight: 800; color: var(--igap-navy); }
.igap-details dd { margin: 0; }

.igap-table-wrap { overflow-x: auto; border: 1px solid var(--igap-border); border-radius: 12px; background: #fff; }
.igap-table { width: 100%; border-collapse: collapse; min-width: 780px; }
.igap-table th, .igap-table td { padding: 13px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--igap-border); }
.igap-table th { color: var(--igap-navy); background: var(--igap-soft); font-size: 13px; }
.igap-table tr:last-child td { border-bottom: 0; }
.igap-table small { color: var(--igap-muted); }

.igap-two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.igap-panel { padding: 18px; background: #fff; border: 1px solid var(--igap-border); border-radius: 12px; }
.igap-panel h3 { margin: 0 0 12px; color: var(--igap-navy); }
.igap-panel p { padding: 10px 0; margin: 0; border-bottom: 1px solid var(--igap-border); }
.igap-panel p:last-child { border-bottom: 0; }

.igap-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 22px; background: #fff; border: 1px solid var(--igap-border); border-radius: 12px; }
.igap-field { display: flex; flex-direction: column; gap: 7px; }
.igap-field-full { grid-column: 1 / -1; }
.igap-field > span { color: var(--igap-navy); font-weight: 750; }
.igap-field input, .igap-field select, .igap-field textarea { width: 100%; padding: 11px 12px; color: var(--igap-text); background: #fff; border: 1px solid #bcccdc; border-radius: 8px; font: inherit; }
.igap-field input:focus, .igap-field select:focus, .igap-field textarea:focus { outline: 2px solid rgba(31,95,153,.18); border-color: var(--igap-blue); }

.igap-alert { padding: 13px 16px; margin: 0 0 16px; border-radius: 10px; font-weight: 650; }
.igap-alert-success { color: #0b5d2a; background: #dff7e8; border: 1px solid #a8e6bb; }
.igap-alert-error { color: #8c1d18; background: #ffe3e1; border: 1px solid #ffc2bd; }
.igap-empty { padding: 22px; color: var(--igap-muted); text-align: center; }
.igap-login-required { max-width: 520px; padding: 26px; margin: 30px auto; background: #fff; border: 1px solid var(--igap-border); border-radius: 14px; }
.igap-login-required input[type="text"], .igap-login-required input[type="password"] { width: 100%; }

@media (max-width: 1000px) {
  .igap-kpis { grid-template-columns: repeat(3, 1fr); }
  .igap-gtt-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .igap-portal-header, .igap-section-head { flex-direction: column; align-items: stretch; }
  .igap-user-box { min-width: 0; }
  .igap-kpis, .igap-gtt-grid, .igap-two-columns, .igap-form { grid-template-columns: 1fr; }
  .igap-field-full { grid-column: auto; }
  .igap-details { grid-template-columns: 1fr; }
}
.igap-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.igap-delay { display: inline-block; margin-top: 5px; padding: 3px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.igap-delay-ok { color: #0b5d2a; background: #dff7e8; }
.igap-delay-late { color: #8c1d18; background: #ffe3e1; }
