/*
  Golden Hub Main UI
  Used for normal app/admin/center pages:
  Operations, Staff Center, Resident Center, Dining Center, Activities Center,
  Device Center, Reports Center, Admin Center.

  Do NOT create per-page CSS files.
*/

:root {
  --gh-primary: #15b8a6;
  --gh-accent: #d7b24d;
  --gh-bg: #f6f8fb;
  --gh-card: #ffffff;
  --gh-text: #10202a;
  --gh-muted: #5d6b76;
  --gh-border: #d8e1e8;
  --gh-danger: #b42318;
  --gh-success: #067647;
  --gh-radius: 18px;
  --gh-shadow: 0 14px 35px rgba(16, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--gh-bg);
  color: var(--gh-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.gh-page,
.gh-center-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.gh-hero,
.gh-center-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.gh-hero h1,
.gh-center-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.gh-hero p,
.gh-center-hero p,
.gh-muted {
  color: var(--gh-muted);
}

.gh-actions,
.gh-center-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.gh-card,
.gh-center-card {
  background: var(--gh-card);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  box-shadow: var(--gh-shadow);
  padding: 20px;
}

.gh-grid,
.gh-center-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.gh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--gh-border);
  background: #fff;
  color: var(--gh-text);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.gh-btn-primary {
  background: var(--gh-primary);
  border-color: var(--gh-primary);
  color: #fff;
}

.gh-btn-secondary {
  background: #fff;
}

.gh-btn-danger {
  background: var(--gh-danger);
  border-color: var(--gh-danger);
  color: #fff;
}

.gh-tabs,
.gh-center-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.gh-tab {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--gh-border);
  background: #fff;
  font-weight: 800;
  text-decoration: none;
}

.gh-tab-active {
  background: var(--gh-primary);
  border-color: var(--gh-primary);
  color: #fff;
}

.gh-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.gh-table {
  width: 100%;
  border-collapse: collapse;
}

.gh-table th,
.gh-table td {
  padding: 12px;
  border-bottom: 1px solid var(--gh-border);
  text-align: left;
  vertical-align: top;
}

.gh-table th {
  font-size: 13px;
  color: var(--gh-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.gh-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.gh-field label {
  display: block;
  margin: 0 0 6px;
  color: var(--gh-muted);
  font-size: 13px;
  font-weight: 800;
}

.gh-field input,
.gh-field select,
.gh-field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--gh-border);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

@media (max-width: 720px) {
  .gh-hero,
  .gh-center-hero {
    display: block;
  }

  .gh-actions,
  .gh-center-actions {
    justify-content: flex-start;
    margin-top: 14px;
  }
}

/* =========================================================
   Shared Center / Admin Components
========================================================= */

.gh-status {
  display:inline-flex;
  border-radius:999px;
  padding:7px 12px;
  font-size:.82rem;
  font-weight:900;
  letter-spacing:.01em;
  background:#e6f7f3;
  color:#0f766e;
  border:1px solid rgba(15,118,110,.18);
}

.gh-status.off {
  background:#fee2e2;
  color:#991b1b;
  border-color:#fecaca;
}

.gh-status.healthy {
  background:#dcfce7;
  color:#166534;
  border-color:#bbf7d0;
}

.gh-status.disabled {
  background:#e5e7eb;
  color:#374151;
  border-color:#d1d5db;
}

.gh-status.unlicensed {
  background:#fef3c7;
  color:#92400e;
  border-color:#fde68a;
}

.gh-module-grid,
.gh-role-grid,
.activity-list {
  display:grid;
  gap:20px;
}

.gh-module-grid {
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
}

.gh-role-grid {
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
}

.activity-list {
  gap:10px;
  margin-top:14px;
}

.activity-item,
.gh-role-card,
.form-card,
.list-card,
.profile-card {
  background:var(--gh-card);
  border:1px solid var(--gh-border);
  border-radius:var(--gh-radius);
  box-shadow:var(--gh-shadow);
  padding:22px;
}

.gh-role-card h3 {
  margin:0 0 14px;
}

.gh-permission-list {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.gh-permission,
.pill {
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:7px 12px;
  font-size:.82rem;
  font-weight:900;
}

.gh-permission {
  background:rgba(21,184,166,.12);
  color:var(--gh-primary);
}

.pill {
  background:#dcfce7;
  color:#166534;
  border:1px solid #bbf7d0;
}

.pill.off {
  background:#fee2e2;
  color:#991b1b;
  border-color:#fecaca;
}

.form-grid,
.gh-form-grid,
.gh-form-row {
  display:grid;
  gap:16px;
}

.form-grid {
  grid-template-columns:repeat(3,minmax(180px,1fr));
}

.gh-form-grid {
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
}

.gh-form-row {
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
}

.field,
.gh-field,
.gh-form-field {
  display:grid;
  gap:8px;
}

.field label,
.gh-field label,
.gh-form-field label {
  font-weight:800;
  color:var(--gh-muted);
  font-size:.82rem;
}

.field input,
.field select,
.field textarea,
.gh-field input,
.gh-field select,
.gh-form-field input,
.gh-form-row input,
.gh-form-row select,
.tools input,
.tools select {
  width:100%;
  border:1px solid var(--gh-border);
  border-radius:14px;
  padding:12px 13px;
  font-size:1rem;
  background:#fff;
}

.field textarea {
  min-height:74px;
  resize:vertical;
}

.span-3 {
  grid-column:1/-1;
}

.flag-row,
.action-row,
.tools {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
}

.flag-row {
  gap:22px;
  padding:14px 0;
}

.flag-row label {
  display:flex;
  gap:8px;
  align-items:center;
  font-weight:900;
}

.action-row {
  gap:8px;
}

.tools {
  gap:12px;
  justify-content:space-between;
  margin-bottom:12px;
}

.gh-login-wrap {
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
}

.gh-login-card {
  width:min(460px,100%);
  background:var(--gh-card);
  border:1px solid var(--gh-border);
  border-radius:var(--gh-radius);
  box-shadow:var(--gh-shadow);
  padding:32px;
}

.gh-login-error,
.gh-message {
  margin-top:14px;
  font-weight:800;
}

.gh-login-error {
  color:#b42318;
  min-height:22px;
}

.gh-login-actions {
  margin-top:22px;
}

.gh-login-actions button {
  width:100%;
  cursor:pointer;
}

@media (max-width: 900px) {
  .form-grid {
    grid-template-columns:1fr;
  }
}

/* Center page hero normalization */
.gh-hero {
  display:block;
}

.gh-hero .gh-title {
  margin:10px 0 12px;
}

/* Staff employee form stabilization */
.form-card,
.list-card,
.profile-card {
  margin-top: 22px;
}

.form-grid {
  align-items: end;
}

.pay-field {
  display: none;
}

.pay-field.is-visible {
  display: grid;
}

.gh-form-footer {
  margin-top: 18px;
}

.gh-table {
  margin-top: 18px;
}

.gh-hero {
  display: block;
}

.gh-hero .gh-title,
.gh-title {
  text-align: left;
}

/* Tenant hero branding */
.gh-hero-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.gh-hero-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--gh-border);
  box-shadow: var(--gh-shadow);
  padding: 8px;
}

.gh-hero-copy {
  min-width: 0;
}

@media (max-width: 720px) {
  .gh-hero-brand {
    align-items: flex-start;
  }

  .gh-hero-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
}

/* Lookup manager tables */
.gh-lookup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

.gh-lookup-card {
  overflow-x: auto;
}

.gh-lookup-card .gh-table {
  width: 100%;
  table-layout: auto;
}

.gh-lookup-card .gh-table th:last-child,
.gh-lookup-card .gh-table td:last-child {
  width: 120px;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .gh-lookup-grid {
    grid-template-columns: 1fr;
  }
}

/* Shared modal */
.gh-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.48);
  z-index: 9999;
  padding: 24px;
}

.gh-modal-backdrop.open {
  display: flex;
}

.gh-modal {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid var(--gh-border);
  border-radius: 24px;
  box-shadow: var(--gh-shadow);
  padding: 24px;
}

.gh-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.gh-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-weight: 800;
}

/* Staff profile tabs */
.gh-tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.gh-tab-button {
  border: 1px solid var(--gh-border);
  background: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 900;
  cursor: pointer;
}

.gh-tab-button.active {
  background: var(--gh-primary);
  color: #fff;
  border-color: var(--gh-primary);
}

.gh-tab-panel {
  display: none;
}

.gh-tab-panel.active {
  display: block;
}

.gh-btn-danger {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.gh-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.gh-card-title {
  margin-top: 14px;
}

.gh-module-meta {
  margin-top: 8px;
  color: var(--gh-muted);
}

.gh-module-actions {
  margin-top: 16px;
}

.gh-mt-16 {
  margin-top: 16px;
}

.gh-mt-22 {
  margin-top: 22px;
}


/* ============================================================
   Golden Hub Branding Single Source
   ============================================================ */

.gh-topbar{
  background:var(--gh-platform-nav, #12324a) !important;
}

.gh-brand-with-logo{
  display:flex;
  align-items:center;
  gap:12px;
  color:#fff;
  text-decoration:none;
  font-weight:900;
  font-size:18px;
}

.gh-brand-logo{
  width:48px;
  height:48px;
  object-fit:contain;
  border-radius:10px;
  background:#fff;
  padding:5px;
  flex:0 0 auto;
}

.gh-hero-logo{
  width:86px;
  height:86px;
  object-fit:contain;
  border-radius:18px;
  background:#fff;
  padding:10px;
}

.gh-topbar .gh-btn,
.gh-topbar .gh-btn-secondary,
.gh-topbar .gh-btn-primary{
  background:var(--gh-tenant-primary, #15b8a6) !important;
  color:#fff !important;
  box-shadow:none !important;
}

.gh-topbar a.gh-btn-primary,
.gh-topbar .gh-btn.active,
.gh-topbar a.active{
  background:transparent !important;
  color:#fff !important;
  box-shadow:none !important;
}

.gh-page .gh-kicker,
.gh-page .gh-eyebrow{
  color:var(--gh-tenant-primary, #15b8a6) !important;
}

.gh-page .gh-hero{
  border-left:0 !important;
  border-bottom:4px solid var(--gh-tenant-secondary, #d7b24d) !important;
}

.gh-page .gh-card{
  border-top:1px solid var(--gh-border, #d9e2ec) !important;
}

.gh-page .gh-btn-primary,
.gh-page button.gh-btn-primary,
.gh-page main .gh-btn-secondary,
.gh-page .gh-card .gh-btn-secondary{
  background:var(--gh-tenant-primary, #15b8a6) !important;
  color:#fff !important;
}


/* Final logo scope guard */
.gh-brand-logo{
  width:48px !important;
  height:48px !important;
  object-fit:contain !important;
  border-radius:10px !important;
  background:#fff !important;
  padding:5px !important;
}

.gh-hero-logo{
  width:86px !important;
  height:86px !important;
  object-fit:contain !important;
  border-radius:18px !important;
  background:#fff !important;
  padding:10px !important;
}


/* Shared topbar layout normalization */

.gh-topbar-actions{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}

.gh-dynamic-nav{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}

/* Shared spacing/layout utilities */
.gh-mt-12{ margin-top:12px; }
.gh-mt-16{ margin-top:16px; }
.gh-mt-18{ margin-top:18px; }
.gh-mt-20{ margin-top:20px; }
.gh-mt-22{ margin-top:22px; }

.gh-actions-inline{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.gh-actions-between{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.gh-grid-route-cards{
  display:grid;
  grid-template-columns:repeat(3,minmax(280px,1fr));
  gap:20px;
  margin-top:20px;
}

.gh-hidden{
  display:none;
}

.gh-strong-status{
  margin-left:12px;
  font-weight:900;
}

.gh-logo-preview{
  width:96px;
  height:96px;
  object-fit:contain;
  border:1px solid #d9e2ec;
  border-radius:18px;
  background:#fff;
  padding:10px;
}
.gh-m-0{ margin:0; }

/* Final template inline cleanup */
.gh-login-title-large{
  font-size:2.6rem;
}

.gh-inline-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

/* Alerts notification settings */
.gh-error-text{
  color:#b91c1c;
}

.gh-settings-panel{
  margin-top:16px;
  border-top:1px solid #dbe4ee;
  padding-top:14px;
}

.gh-settings-summary{
  cursor:pointer;
  font-weight:900;
  color:#172033;
}

/* Alerts generated markup utilities */
.gh-route-form-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin-top:16px;
}

.gh-two-column-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.gh-two-column-grid-spaced{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:12px;
}

.gh-settings-body{
  margin-top:14px;
}

.gh-updated-meta{
  margin-top:12px;
  font-size:13px;
}

.gh-alert-action-row{
  margin-top:12px;
}

.gh-alert-card-spaced{
  margin-top:12px;
}

/* Notification route test actions */
.gh-route-test-row{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top:14px;
}

/* Notification route delivery health */
.gh-route-health{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}

.gh-health-pill{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:4px 10px;
  font-size:12px;
  font-weight:900;
  background:#d8f8e4;
  color:#176b3a;
}


/* Navigation Centers */
.gh-topnav,
.gh-nav-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.gh-nav-menu {
  position: relative;
}

.gh-nav-menu summary {
  list-style: none;
  cursor: pointer;
}

.gh-nav-menu summary::-webkit-details-marker {
  display: none;
}

.gh-nav-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 275px;
  z-index: 100;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--gh-border, #d8dee8);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.gh-nav-menu-link {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--gh-text, #172033);
  text-decoration: none;
}

.gh-nav-menu-link:hover {
  background: rgba(15, 23, 42, 0.06);
}

.gh-nav-menu-link span {
  color: var(--gh-muted, #64748b);
  font-size: 0.9rem;
}

@media (max-width: 1100px) {
  .gh-topbar {
    align-items: flex-start;
  }

  .gh-topnav {
    justify-content: flex-end;
  }
}
