:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #28282d;
  background: #f5f5f5;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 760px; min-height: 100vh; background: #f5f5f5; }
button, input { font: inherit; }
button { cursor: pointer; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; display: flex; flex-direction: column; color: #f6f7ff; background: #191a2e; }
.brand { display: flex; align-items: center; gap: 14px; height: 106px; padding: 22px 24px; border-bottom: 1px solid #303149; }
.brand-mark { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 13px; background: #087cd0; font-size: 25px; font-weight: 800; }
.brand strong { display: block; font-size: 19px; }
.brand span, .security-card span { display: block; margin-top: 3px; color: #a7a9c6; font-size: 12px; }
nav { flex: 1; padding: 18px 9px; }
.nav-item { display: flex; width: 100%; align-items: center; gap: 15px; margin: 4px 0; padding: 15px 17px; border: 0; border-radius: 9px; color: #d8d9ec; background: transparent; font-size: 16px; text-align: left; }
.nav-item span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 6px; color: #b8bbda; background: #2a2c45; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.nav-item:hover { background: #24263d; }
.nav-item.active { color: #fff; background: #087cd0; font-weight: 700; }
.nav-item.active span { color: #087cd0; background: #fff; }
.security-card { display: flex; align-items: center; gap: 12px; padding: 18px 24px 10px; border-top: 1px solid #303149; }
.security-card strong { display: block; font-size: 13px; }
.shield { display: grid; width: 32px; height: 38px; place-items: center; border: 2px solid #5ab1f1; border-radius: 45% 45% 55% 55%; color: #dceeff; font-weight: 800; }
.role { padding: 8px 24px 22px; color: #a7a9c6; font-size: 11px; }
.role strong { color: #e4e5f4; }
.content { min-height: 100vh; margin-left: 270px; }
.topbar { display: flex; height: 108px; align-items: center; justify-content: space-between; padding: 0 38px; border-bottom: 1px solid #ddd; background: #fff; }
.topbar h1 { margin: 3px 0 0; font-size: 27px; font-weight: 650; }
.eyebrow { margin: 0; color: #0874c5; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.workspace { padding: 28px 38px 70px; }
.view { display: none; }
.view.active { display: block; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(200px, 1fr)); gap: 20px; }
.metric { min-height: 132px; display: grid; place-content: center; gap: 8px; border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(22, 27, 38, .08); text-align: center; }
.metric strong { color: #087cd0; font-size: 42px; line-height: 1; }
.metric.success strong { color: #138611; }
.metric span { color: #666; font-size: 14px; letter-spacing: .03em; text-transform: uppercase; }
.panel { margin-top: 28px; padding: 24px; border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(22, 27, 38, .08); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid #ddd; }
.panel h2 { margin: 0 0 4px; font-size: 19px; }
.panel p { margin: 0; color: #68707b; line-height: 1.5; }
.pill { padding: 5px 10px; border-radius: 999px; color: #176c2b; background: #e3f4e6; font-size: 11px; font-weight: 800; white-space: nowrap; }
.pill.warning { color: #785a00; background: #fff0bd; }
.session-list { min-height: 150px; padding: 16px 0 2px; }
.session-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 20px; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.session-row:last-child { border-bottom: 0; }
.session-identity strong, .session-identity span { display: block; }
.session-identity span { margin-top: 2px; color: #6d727b; font-size: 13px; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; color: #70757e; font-size: 13px; }
.status-dot::before { width: 10px; height: 10px; border-radius: 50%; background: #999; content: ""; }
.status-dot.active::before { background: #13920f; }
.status-dot.expired::before { background: #be3b31; }
.lifecycle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-top: 20px; }
.lifecycle-grid div { padding: 16px; border: 1px solid #e1e5eb; border-radius: 9px; background: #f8fafc; }
.lifecycle-grid strong, .lifecycle-grid span { display: block; }
.lifecycle-grid span { margin-top: 6px; color: #68707b; font-size: 12px; line-height: 1.45; }
.session-cards { display: grid; gap: 15px; padding-top: 20px; }
.session-card { padding: 20px; border: 1px solid #dfe4ea; border-radius: 10px; }
.session-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.session-card h3 { margin: 0 0 5px; }
.session-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 18px 0; }
.session-card dt { color: #767d87; font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.session-card dd { margin: 5px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.scopes { display: flex; flex-wrap: wrap; gap: 6px; }
.scope { padding: 4px 7px; border-radius: 5px; color: #075b9d; background: #e8f4fd; font-size: 11px; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
button { padding: 9px 13px; border: 1px solid #b8c2ce; border-radius: 7px; color: #292d33; background: #fff; font-weight: 650; }
button:hover { background: #f0f5fa; }
button:disabled { cursor: wait; opacity: .55; }
button.primary { border-color: #087cd0; color: #fff; background: #087cd0; }
button.primary:hover { background: #066eb9; }
button.danger { border-color: #e4b0ab; color: #b42318; }
.empty { padding: 42px 10px; color: #747b85; text-align: center; }
.table-wrap { overflow: auto; padding-top: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 10px; border-bottom: 1px solid #e7eaee; font-size: 13px; text-align: left; }
th { color: #69717c; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.audit-success { color: #157428; font-weight: 700; }
.audit-failed { color: #b42318; font-weight: 700; }
.settings-panel { max-width: 780px; }
.settings-panel > p { margin-bottom: 18px; }
.settings-panel hr { height: 1px; margin: 28px 0; border: 0; background: #e0e4e9; }
label { display: block; margin: 15px 0; font-size: 13px; font-weight: 700; }
input { width: 100%; margin-top: 7px; padding: 11px 12px; border: 1px solid #b9c3cf; border-radius: 7px; color: #292d33; background: #fff; }
input:focus { border-color: #087cd0; outline: 3px solid rgba(8, 124, 208, .14); }
.message { position: fixed; right: 25px; bottom: 20px; max-width: 460px; min-height: 0; margin: 0; padding: 11px 15px; border-radius: 7px; color: #075b9d; background: #e6f3fc; box-shadow: 0 4px 15px rgba(0, 0, 0, .12); font-size: 13px; font-weight: 700; }
.message:empty { display: none; }
.message.error { color: #8c1d15; background: #fde9e7; }
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 30px; background: rgba(12, 15, 27, .68); }
.modal[hidden] { display: none; }
.modal-card { width: min(500px, 100%); padding: 30px; border-radius: 13px; background: #fff; box-shadow: 0 20px 70px rgba(0, 0, 0, .35); }
.modal-card h2 { margin: 5px 0 12px; font-size: 25px; }
.modal-card code { display: block; margin: 20px 0; padding: 16px; border-radius: 8px; color: #fff; background: #191a2e; font-size: 27px; letter-spacing: .15em; text-align: center; }
.safe-note { margin-top: 18px; color: #69717c; font-size: 11px; line-height: 1.5; }

@media (max-width: 980px) {
  .sidebar { width: 220px; }
  .content { margin-left: 220px; }
  .topbar, .workspace { padding-left: 24px; padding-right: 24px; }
  .lifecycle-grid { grid-template-columns: repeat(2, 1fr); }
  .session-card dl { grid-template-columns: 1fr; }
}
