/* GRFEH Phase 23. Safe compatibility layer between the existing Razor UI and Tabler.
   Kept separately for incremental migration: this does not replace the existing tokens. */
:root {
  --grfeh-radius: 10px;
  --grfeh-action-height: 38px;
  --grfeh-spacing: 12px;
  --tblr-primary: var(--app-primary, #235a90);
  --tblr-primary-rgb: 35, 90, 144;
  --tblr-border-radius: var(--grfeh-radius);
  --tblr-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.app-authenticated .app-content { max-width: 100%; }
.app-authenticated .app-content :is(.page-header,.hero) { border-radius: var(--grfeh-radius); }
.app-authenticated .app-content :is(.panel,.profile-panel) { border-radius: var(--grfeh-radius); }
.app-authenticated .app-content :is(.app-btn,.btn,.btn-secondary,.btn-danger-secondary,.app-btn-primary,.app-btn-secondary,.app-btn-danger,.app-btn-ghost) {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  box-sizing: border-box; min-height: var(--grfeh-action-height);
  padding: 8px 14px; border-radius: 8px; font-family: inherit;
  font-size: 0.84rem; font-weight: 600; line-height: 1.2;
  text-align: center; text-decoration: none; vertical-align: middle;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.app-authenticated .app-content :is(.app-btn,.btn,.btn-secondary,.btn-danger-secondary,.app-btn-primary,.app-btn-secondary,.app-btn-danger,.app-btn-ghost):focus-visible {
  outline: 3px solid #80baf2; outline-offset: 2px;
}
.app-authenticated .app-content .table :is(th,td) { vertical-align: middle; }
.app-authenticated .app-content .table > :not(caption) > * > * { border-bottom: 1px solid var(--app-border,#e2e7ef); }
.app-authenticated .app-content .table tbody tr:hover { background: #f5f8fc; }
.app-authenticated .app-security-form textarea { box-sizing:border-box; width:100%; max-width:100%; border:1px solid #bdcde0; border-radius:8px; padding:10px; min-height:85px; }
.app-authenticated .app-security-form textarea:focus-visible { outline:3px solid #c9e0fb; outline-offset:1px; }
@media (prefers-reduced-motion: reduce) {
  .app-authenticated .app-content :is(.app-btn,.btn,.btn-secondary,.app-btn-primary,.app-btn-secondary) { transition: none; }
}
.grfeh-role-editor{margin-top:1rem}
.grfeh-role-editor-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}
.grfeh-role-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem 1.25rem;margin:1rem 0}
.grfeh-role-span{grid-column:1/-1}
.grfeh-role-editor [hidden]{display:none!important}
.grfeh-role-editor .field select,.grfeh-role-editor .field input{width:100%;min-height:2.6rem}
.grfeh-role-editor select[size]{min-height:11rem;padding:.4rem;overflow:auto}
.grfeh-role-editor select[size] option{padding:.6rem .7rem;white-space:normal;border-radius:.4rem}
.grfeh-role-editor select[size] option:checked{background:#dceafb;color:#163e68}
.grfeh-role-search-feedback{min-height:1.4rem;font-size:.85rem;color:var(--app-text-muted,#5c7086);padding:.25rem 0}
.grfeh-role-count{font-size:.8rem;font-weight:600;color:var(--app-color-primary,#285f9b)}
.grfeh-role-status{display:inline-block;padding:.2rem .6rem;border-radius:10rem;font-size:.8rem}
.grfeh-role-status.is-active{background:#e0f5e8;color:#19663a}
.grfeh-role-status.is-inactive{background:#f1f2f4;color:#606b78}
.grfeh-role-notice,.grfeh-role-warning{border:1px solid #efc0b9;border-radius:.65rem;background:#fff2ef;color:#8d2c24;padding:.8rem 1rem;margin:1rem 0}
.grfeh-role-notice{display:flex;justify-content:space-between;gap:1rem;align-items:center}
@media(max-width:700px){.grfeh-role-form-grid{grid-template-columns:minmax(0,1fr)}.grfeh-role-notice{flex-wrap:wrap}}

.grfeh-role-notice{position:fixed;z-index:1100;top:5rem;right:1rem;max-width:min(32rem,calc(100vw - 2rem));box-shadow:0 10px 28px rgba(0,0,0,.13)}
