:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #f3f6f8;
  color: #18313c;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
header {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 28px max(24px, calc((100vw - 1240px) / 2)); color: white;
  background: linear-gradient(120deg, #0d596f, #158366);
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(28px, 4vw, 44px); }
.eyebrow { margin-bottom: 5px; font-size: 11px; font-weight: 800; letter-spacing: .17em; }
.pill { padding: 9px 14px; border: 1px solid #ffffff66; border-radius: 999px; background: #ffffff18; }
main { width: min(1240px, calc(100% - 32px)); margin: 24px auto 60px; }
.card, .subcard, details, .dashboard-grid article {
  background: white; border: 1px solid #dce5e9; border-radius: 14px;
  box-shadow: 0 8px 22px #1739460b;
}
.card { margin-bottom: 20px; padding: 22px; }
.subcard, details, .dashboard-grid article { padding: 16px; }
.connection { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }
.auth-heading, .wide-row { grid-column: 1 / -1; }
.bootstrap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 14px; }
.session-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.session-bar[hidden] { display: none; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
input, select, textarea, button {
  min-height: 40px; border: 1px solid #bdccd2; border-radius: 8px;
  padding: 8px 11px; font: inherit; background: white; color: inherit;
}
input[type="radio"], input[type="checkbox"] { min-height: auto; }
.inline-choice { display: inline-flex; grid-auto-flow: column; align-items: center; gap: 8px; margin: 4px 18px 4px 0; }
textarea { resize: vertical; }
button { cursor: pointer; font-weight: 700; }
button:hover { border-color: #13806a; }
button.primary { color: white; background: #117c67; border-color: #117c67; }
button.warning { color: #70460f; background: #fff7e6; border-color: #e7ba66; }
button.danger { color: #8a2b27; background: #fff0ef; border-color: #e5aaa6; }
button:disabled { cursor: not-allowed; opacity: .48; }
.hint { color: #657b84; font-size: 13px; }
#message { min-height: 0; margin: 0 0 18px; padding: 0; border-radius: 8px; }
#message.show { padding: 11px 14px; background: #e9f7f1; color: #17634e; }
#message.error { background: #fff0ef; color: #9b3029; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; color: #6c7d84; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px; border-bottom: 1px solid #e4ebee; text-align: left; white-space: nowrap; }
th { color: #60747d; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.two-column { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.tool-access-card { grid-column: span 2; }
.three-column { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(200px, 1fr)); gap: 8px; margin: 12px 0 18px; }
.check-grid.compact { grid-template-columns: repeat(4, minmax(180px, 1fr)); margin-bottom: 0; }
.check-grid label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check-grid input { min-height: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 2fr 1fr 1fr auto; gap: 10px; align-items: end; }
.team-form { grid-template-columns: 1fr 1fr 1fr auto; margin-top: 14px; }
.team-form .wide-field { grid-column: 1 / -1; }
.operator-panel { margin: 14px 0 18px; }
.create-license-grid {
  display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px; align-items: end; margin-top: 14px;
}
.create-license-grid .wide-field { grid-column: 1 / -1; }
fieldset { border: 1px solid #dce5e9; border-radius: 10px; padding: 12px; }
legend { padding: 0 6px; font-size: 13px; font-weight: 800; }
.sensitive-output {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  margin-top: 14px; padding: 14px; border: 1px solid #e7ba66; border-radius: 10px;
  background: #fff9e9;
}
.sensitive-output[hidden] { display: none; }
.sensitive-output code { display: block; margin-top: 8px; font-size: 17px; font-weight: 800; word-break: break-all; }
.button-row, .license-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.tool-toolbar { display: flex; gap: 8px; margin: 12px 0; }
.tool-toolbar input { flex: 1; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 7px; max-height: 330px; overflow: auto; padding: 10px; border: 1px solid #dce5e9; border-radius: 9px; margin-bottom: 12px; }
.tool-grid label { display: flex; align-items: center; gap: 7px; padding: 6px; font-weight: 600; border-radius: 6px; }
.tool-grid label:hover { background: #f0f8f5; }
.tool-group { grid-column: 1 / -1; margin-top: 8px; color: #0d6c59; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.permission-badge { display: inline-block; margin: 2px; padding: 3px 6px; border-radius: 999px; background: #edf4f6; font-size: 11px; }
.license-actions { margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px solid #e4ebee; }
.stack { display: grid; gap: 10px; margin-top: 12px; }
summary { cursor: pointer; font-weight: 800; }
.project-picker { margin-top: 18px; max-width: 520px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.dashboard-grid ul { margin: 0; padding-left: 20px; }
.dashboard-grid li { margin-bottom: 9px; }
@media (max-width: 900px) {
  .connection, .two-column, .three-column, .dashboard-grid, .form-grid, .create-license-grid, .bootstrap-grid, .team-form { grid-template-columns: 1fr; }
  .create-license-grid .wide-field { grid-column: 1; }
  .check-grid { grid-template-columns: 1fr; }
  .check-grid.compact { grid-template-columns: 1fr; }
  .sensitive-output { align-items: stretch; flex-direction: column; }
  .session-bar { align-items: stretch; flex-direction: column; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-access-card { grid-column: auto; }
  header { align-items: flex-start; flex-direction: column; }
}
