:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fb;
  color: #172033;
}
* { box-sizing: border-box; }
/* Author display rules must not override the HTML hidden attribute. */
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: #f5f7fb; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(460px, 100%); background: #fff; border: 1px solid #dfe5ef; border-radius: 18px; padding: 32px; box-shadow: 0 20px 50px rgba(23,32,51,.08); }
.eyebrow { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 800; color: #5a6b88; }
h1, h2 { margin: 0; }
.muted { color: #66758f; line-height: 1.55; }
form { display: grid; gap: 10px; margin-top: 22px; }
label { font-weight: 700; font-size: 14px; }
input, select { width: 100%; border: 1px solid #cfd8e6; border-radius: 10px; padding: 12px 14px; background: #fff; color: #172033; }
input:focus, select:focus { outline: 3px solid rgba(38,99,235,.18); border-color: #2663eb; }
button { border: 0; border-radius: 10px; background: #1f5fe0; color: #fff; font-weight: 800; padding: 11px 14px; }
button.secondary { background: #eef2f8; color: #29364d; }
.error { min-height: 20px; color: #b42318; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 20px; background: #111827; color: #fff; display: flex; flex-direction: column; gap: 28px; }
.sidebar .eyebrow { color: #9fb1d0; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a { color: #cbd5e1; text-decoration: none; padding: 11px 12px; border-radius: 9px; font-weight: 700; }
.sidebar nav a:hover, .sidebar nav a.active { background: #24314a; color: #fff; }
.sidebar .secondary { margin-top: auto; background: #24314a; color: #fff; }
.env-badge, .status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; }
.env-badge { margin-top: 10px; background: #24314a; color: #cfe0ff; }
.status-pill { background: #eaf2ff; color: #2456a8; }
.content { padding: 30px; min-width: 0; }
.content-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.error-banner { margin-bottom: 18px; padding: 12px 14px; border: 1px solid #f3b7b0; background: #fff1ef; color: #9b2116; border-radius: 10px; }
.card { background: #fff; border: 1px solid #dfe5ef; border-radius: 14px; padding: 18px; margin-bottom: 18px; box-shadow: 0 8px 24px rgba(23,32,51,.04); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.metric { padding: 14px; background: #f8fafc; border: 1px solid #e6ebf2; border-radius: 10px; }
.metric strong { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; border-bottom: 1px solid #e6ebf2; padding: 12px 10px; vertical-align: top; }
th { color: #5f6e87; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
td a { color: #1f5fe0; font-weight: 800; text-decoration: none; }
.empty { padding: 34px; text-align: center; color: #6b778c; }
.loading { padding: 28px 0; color: #68758c; }
.tag { display: inline-block; border-radius: 999px; padding: 4px 8px; background: #eef2f8; font-size: 12px; font-weight: 800; }
.section-title { margin: 0 0 12px; }
@media (max-width: 840px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar nav { grid-template-columns: repeat(3, 1fr); }
  .sidebar .secondary { margin-top: 0; }
  .content { padding: 22px 16px; }
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.card-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-subtitle { margin: 4px 0 0; color: #6b778c; line-height: 1.45; }
.filters { display: grid; grid-template-columns: minmax(240px, 2fr) minmax(160px, 1fr) minmax(180px, 1fr); gap: 10px; margin-bottom: 14px; }
.action-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.detail-toolbar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
button.small { padding: 7px 10px; font-size: 12px; }
button.warning { background: #b54708; }
button.danger { background: #b42318; }
button.secondary-danger { background: #fff1ef; color: #9b2116; border: 1px solid #f3b7b0; }
button:disabled { cursor: not-allowed; opacity: .55; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 800; text-transform: capitalize; white-space: nowrap; }
.badge-success { background: #e8f7ee; color: #176b3a; }
.badge-progress { background: #eaf2ff; color: #2456a8; }
.badge-warning { background: #fff6e5; color: #8a4b08; }
.badge-danger { background: #fff0ee; color: #a1281c; }
.badge-neutral { background: #eef2f8; color: #526079; }
.copy-value { display: flex; align-items: center; gap: 8px; min-width: 220px; }
.copy-value code { overflow-wrap: anywhere; color: #334155; }
.progress-panel { display: grid; gap: 10px; padding: 14px; border: 1px solid #cfe0ff; background: #f5f9ff; border-radius: 10px; margin-bottom: 14px; }
.provisioning-outcome { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #dfe5ef; background: #f8fafc; border-radius: 10px; margin-bottom: 14px; }
.history-heading { font-size: 14px; margin: 18px 0 10px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #dce8fb; }
.progress-fill { width: 45%; height: 100%; border-radius: inherit; background: #1f5fe0; animation: progress-pulse 1.4s ease-in-out infinite alternate; }
@keyframes progress-pulse { from { transform: translateX(-20%); } to { transform: translateX(140%); } }
.inline-alert { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.danger-alert { border: 1px solid #f3b7b0; background: #fff1ef; color: #8f261d; }
.error-text { color: #9b2116; max-width: 420px; display: inline-block; }
.optional { color: #7b8799; font-weight: 500; }
.modal { width: min(720px, calc(100vw - 28px)); border: 0; padding: 0; border-radius: 16px; box-shadow: 0 28px 80px rgba(17,24,39,.26); }
.modal::backdrop { background: rgba(17,24,39,.55); }
.modal-card { display: grid; gap: 14px; padding: 24px; margin: 0; }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.icon-button { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; font-size: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid label { display: grid; gap: 7px; }
.form-grid label:first-child { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 20; width: min(380px, calc(100vw - 40px)); }
.toast { border-radius: 10px; padding: 12px 14px; box-shadow: 0 14px 34px rgba(17,24,39,.18); font-weight: 700; }
.toast-success { background: #e8f7ee; color: #176b3a; border: 1px solid #b9e5c9; }
.toast-danger { background: #fff0ee; color: #a1281c; border: 1px solid #f3b7b0; }
.compact-table { min-width: 560px; }
.customer-table { min-width: 1080px; }
@media (max-width: 840px) {
  .header-actions { align-items: stretch; flex-direction: column-reverse; }
  .filters { grid-template-columns: 1fr; }
  .detail-toolbar { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label:first-child { grid-column: auto; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions button { width: 100%; }
}
