/* Identity Management local UI extensions over shared 4Apps style */
.hero { display: block; }
.hero-content { display: flex; flex-direction: column; gap: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-start; align-items: center; width: 100%; }
.hero-actions form { margin: 0; }
.link-button { background: rgba(255,255,255,0.12); padding: 10px 16px; }
.link-button:hover { background: rgba(255,255,255,0.22); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
h3 { margin-top: 28px; color: var(--teal-dark); }
table { width: 100%; border-collapse: collapse; margin-top: 16px; background: white; border-radius: 14px; overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { background: #f6fafb; color: var(--teal-dark); }
tr:last-child td { border-bottom: 0; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; margin-top: 16px; }
.filter-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; margin-top: 18px; }
.filter-form label { margin: 0; }
select { width: 100%; padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px; font-size: 14px; background: white; }
.check { display: flex; align-items: center; gap: 8px; margin: 0; }
.check input, td input[type="checkbox"] { width: auto; }
.danger { background: var(--bad); }
.danger:hover { background: #9f1f1f; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 13px; }
.table-scroll { overflow-x: auto; margin-bottom: 18px; }
.alert.ok { background: #e7f6ee; color: var(--ok); }
.button-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.button-like { display: inline-block; text-align: center; text-decoration: none; border-radius: 12px; background: #dfe8ea; color: var(--teal-dark); padding: 14px 20px; font-weight: bold; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--text); }

.permissions-wrapper { overflow-x: auto; width: 100%; margin-top: 18px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 14px; }
.permissions-table { margin-top: 0; min-width: max-content; border-radius: 0; }
.permissions-table th.app-col,
.permissions-table td.app-col { width: 150px; min-width: 150px; max-width: 150px; text-align: center; white-space: normal; word-break: break-word; }
.permissions-table th.user-col,
.permissions-table td.user-col { width: 300px; min-width: 300px; max-width: 300px; text-align: left; position: sticky; left: 0; background: white; z-index: 2; box-shadow: 1px 0 0 var(--border); }
.permissions-table th.user-col { background: #f6fafb; z-index: 3; }
.permissions-table input[type="checkbox"] { transform: scale(1.1); }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 16px; }
.app-tile { background: #fafafa; border: 1px solid var(--border); border-radius: 16px; padding: 18px; border-left: 8px solid var(--ok); }
.app-tile.bad { border-left-color: var(--bad); }
.app-tile-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.app-tile-head strong { color: var(--teal-dark); font-size: 18px; word-break: break-word; }
.app-tile-head span { font-size: 12px; color: var(--muted); background: #eef3f4; padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.app-meta { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; margin: 10px 0; }
.pill { display: inline-block; padding: 5px 10px; border-radius: 999px; font-weight: bold; font-size: 12px; }
.pill.ok { color: var(--ok); background: #e7f6ee; }
.pill.bad { color: var(--bad); background: #fdeaea; }
.purge-box { margin: 22px 0; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: #fafafa; }
.purge-box form { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(220px, 1fr) auto; gap: 12px; align-items: end; }

@media (max-width: 900px) {
  .brand { flex-direction: row; align-items: center; }
  .hero-actions { flex-wrap: wrap; }
  table { min-width: 760px; }
  .permissions-table { min-width: max-content; }
  .purge-box form { grid-template-columns: 1fr; }
}
