#page-account[data-phase5-root]:not(.phase5-ready) {
  visibility: visible;
}

.tp-account-panel {
  margin-bottom: 1.25rem;
}

.tp-account-sso {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 1rem 1.15rem 0;
  padding: .8rem .9rem;
  border: 1px solid #dbe7fb;
  border-radius: 11px;
  background: linear-gradient(135deg, #f3f7ff, #f2fbfa);
  color: #475470;
}

.tp-account-sso__icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e5edfd;
  color: #2f6ae6;
}

.tp-account-sso > div { min-width: 0; flex: 1; }
.tp-account-sso strong { color: #1c2b4a; font-size: 12px; }
.tp-account-sso p { margin-top: .2rem; font-size: 10px; line-height: 1.55; }

.tp-account-sso__lock {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .55rem;
  border-radius: 999px;
  background: rgba(34, 165, 88, .1);
  color: #168046;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.tp-account-tabs {
  display: flex;
  gap: .35rem;
  margin: .85rem 1.15rem 0;
  padding-bottom: .7rem;
  overflow-x: auto;
  border-bottom: 1px solid #eef2f8;
}

.tp-account-tab {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: .38rem;
  padding: .45rem .7rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #64708c;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.tp-account-tab:hover { background: #f5f8fd; color: #2f6ae6; }
.tp-account-tab.is-active { border-color: #cbdafa; background: #edf3ff; color: #1e50c4; }
.tp-account-body { padding-top: .85rem; }

.tp-account-no-access {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1rem;
  border: 1px solid #e1e7f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #64708c;
}

.tp-account-no-access > i { color: #64708c; font-size: 22px; }
.tp-account-no-access strong { color: #1c2b4a; font-size: 12px; }
.tp-account-no-access p { margin-top: .2rem; font-size: 10px; }

.tp-account-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(130px, .7fr) auto;
  gap: .7rem;
  align-items: end;
  margin-bottom: .9rem;
  padding: .75rem;
  border: 1px solid #eef2f8;
  border-radius: 10px;
  background: #fafcff;
}

.tp-account-filters label {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  color: #64708c;
  font-size: 10px;
  font-weight: 800;
}

.tp-account-filters input,
.tp-account-filters select {
  width: 100%;
  min-height: 36px;
  padding: .5rem .62rem;
  border: 1px solid #dfe6f1;
  border-radius: 8px;
  outline: 0;
  background: #fff;
  color: #1c2b4a;
  font-size: 11px;
}

.tp-account-filters input:focus,
.tp-account-filters select:focus {
  border-color: #2f6ae6;
  box-shadow: 0 0 0 3px rgba(47, 106, 230, .1);
}

.tp-account-filters > div { display: flex; gap: .4rem; }
.tp-account-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tp-account-kpi-text { padding-top: .18rem; font-size: 13px; }
.tp-account-user-table { min-width: 980px; }

.tp-account-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.tp-account-role-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .45rem;
  border-radius: 6px;
  background: #eef3fd;
  color: #2857bb;
  font-size: 10px;
  font-weight: 800;
}

.tp-account-role-pill small {
  padding-left: .3rem;
  border-left: 1px solid #cbd8f2;
  color: #64708c;
  font-size: 9px;
}

.tp-account-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-top: .75rem;
  color: #64708c;
  font-size: 10px;
}

.tp-account-pagination > div { display: flex; gap: .4rem; }

.tp-account-footnote {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  margin-top: .75rem;
  padding-top: .7rem;
  border-top: 1px solid #eef2f8;
  color: #7a859d;
  font-size: 10px;
  line-height: 1.6;
}

.tp-account-detail__identity {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .8rem;
  padding: .75rem;
  border-radius: 10px;
  background: #f5f8fd;
}

.tp-account-detail__identity > span {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dfe9fd;
  color: #2f6ae6;
  font-size: 14px;
  font-weight: 900;
}

.tp-account-detail__identity > div { min-width: 0; flex: 1; }
.tp-account-detail__identity strong { color: #1c2b4a; font-size: 14px; }
.tp-account-detail__identity p { margin-top: .12rem; color: #7a859d; font-size: 10px; }

.tp-account-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin-bottom: .9rem;
}

.tp-account-detail-grid > div {
  padding: .6rem;
  border: 1px solid #eef2f8;
  border-radius: 8px;
}

.tp-account-detail-grid small { display: block; color: #7a859d; font-size: 9px; }
.tp-account-detail-grid strong { display: block; margin-top: .15rem; color: #273654; font-size: 11px; }
.tp-account-detail h3 { margin: .75rem 0 .45rem; color: #1c2b4a; font-size: 12px; font-weight: 900; }

.tp-account-modal-note {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  margin: .75rem 0;
  padding: .65rem .7rem;
  border-radius: 8px;
  background: #f1f6ff;
  color: #53617d;
  font-size: 10px;
  line-height: 1.6;
}

.tp-account-org-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(220px, .7fr);
  gap: 1rem;
}

.tp-account-org-layout h3 { margin-bottom: .55rem; color: #1c2b4a; font-size: 12px; font-weight: 900; }
.tp-account-org-tree, .tp-account-org-tree ul { margin: 0; padding: 0; list-style: none; }
.tp-account-org-tree ul { margin-left: 1.2rem; padding-left: .75rem; border-left: 1px dashed #cdd8e8; }
.tp-account-org-tree li { position: relative; }

.tp-account-org-node {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .38rem;
  padding: .55rem .65rem;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #fff;
}

.tp-account-org-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #edf3ff;
  color: #2f6ae6;
}

.tp-account-org-node > div { min-width: 0; flex: 1; }
.tp-account-org-node strong { display: block; color: #273654; font-size: 11px; }
.tp-account-org-node div span { display: block; margin-top: .1rem; color: #7a859d; font-size: 9px; }
.tp-account-org-node em { color: #64708c; font-size: 10px; font-style: normal; font-weight: 800; }

.tp-account-org-layout aside {
  align-self: start;
  padding: .85rem;
  border: 1px solid #dbe7fb;
  border-radius: 10px;
  background: #f5f8fe;
  color: #64708c;
}

.tp-account-org-layout aside > i { color: #2f6ae6; font-size: 18px; }
.tp-account-org-layout aside strong { display: block; margin-top: .4rem; color: #1c2b4a; font-size: 12px; }
.tp-account-org-layout aside p { margin-top: .45rem; font-size: 10px; line-height: 1.65; }

.tp-account-matrix-note {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-bottom: .8rem;
  padding: .7rem .8rem;
  border: 1px solid #dbe7fb;
  border-radius: 9px;
  background: #f6f9ff;
  color: #64708c;
}

.tp-account-matrix-note > i { color: #2f6ae6; font-size: 17px; }
.tp-account-matrix-note strong { color: #1c2b4a; font-size: 11px; }
.tp-account-matrix-note p { margin-top: .15rem; font-size: 10px; line-height: 1.55; }
.tp-account-matrix-wrap { max-height: 650px; overflow: auto; }
.tp-account-matrix { min-width: 900px; }
.tp-account-matrix thead { position: sticky; z-index: 2; top: 0; }
.tp-account-matrix th:not(:first-child), .tp-account-matrix td:not(:first-child) { text-align: center; }

.tp-account-role-head {
  display: flex;
  min-width: 115px;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
}

.tp-account-role-head small { color: #7a859d; font-size: 9px; font-weight: 500; }
.tp-account-role-save { padding: .2rem .48rem; border-radius: 6px; background: #2f6ae6; color: #fff; font-size: 9px; font-weight: 800; }
.tp-account-role-save:hover { background: #1e50c4; }
.tp-account-matrix-group th { padding: .45rem .7rem; background: #eaf1fe; color: #2857bb; text-align: left !important; }
.tp-account-matrix-check input { width: 16px; height: 16px; accent-color: #2f6ae6; }
.tp-account-matrix-check input:disabled { opacity: .65; }

.tp-account-assignment {
  display: grid;
  grid-template-columns: 1.1fr .85fr repeat(3, minmax(110px, .8fr)) 30px;
  gap: .45rem;
  align-items: end;
  margin-bottom: .55rem;
  padding: .65rem;
  border: 1px solid #e4eaf3;
  border-radius: 9px;
  background: #fafcff;
}

.tp-account-assignment label { display: flex; min-width: 0; flex-direction: column; gap: .25rem; color: #64708c; font-size: 9px; font-weight: 800; }
.tp-account-assignment label[hidden] { display: none; }
.tp-account-assignment select { width: 100%; min-height: 34px; padding: .42rem .48rem; border: 1px solid #dfe6f1; border-radius: 7px; background: #fff; color: #273654; font-size: 10px; }
.tp-account-assignment-remove { display: inline-flex; width: 30px; height: 34px; align-items: center; justify-content: center; border-radius: 7px; color: #d83d42; }
.tp-account-assignment-remove:hover { background: rgba(229, 72, 77, .08); }

.tp-account-integration {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .75rem;
  padding: .8rem;
  border: 1px solid #dfe6f1;
  border-radius: 10px;
  background: #fafcff;
}

.tp-account-integration > div:first-child { min-width: 0; }
.tp-account-integration > div:first-child > i { margin-right: .35rem; }
.tp-account-integration strong { color: #1c2b4a; font-size: 12px; }
.tp-account-integration p { margin-top: .2rem; color: #64708c; font-size: 10px; line-height: 1.55; }
.tp-account-integration.is-ready > div:first-child > i { color: #22a558; }
.tp-account-integration.is-blocked { border-color: #f1d6a7; background: #fffaf0; }
.tp-account-integration.is-blocked > div:first-child > i { color: #c67a0a; }

.tp-account-action-required {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: .75rem;
  padding: .7rem .8rem;
  border: 1px solid #f1c8ca;
  border-radius: 9px;
  background: #fff7f7;
  color: #845357;
}

.tp-account-action-required > i { color: #d83d42; }
.tp-account-action-required strong { color: #a92f34; font-size: 11px; }
.tp-account-action-required p { margin-top: .14rem; font-size: 10px; line-height: 1.5; }
.tp-account-action-required code { display: block; margin-top: .3rem; color: #8d3a3e; font-size: 9px; white-space: normal; }
.tp-account-sync-table { min-width: 850px; }
.tp-account-audit-table { min-width: 1050px; }
.tp-account-audit-table code { font-size: 9px; }

@media (max-width: 1000px) {
  .tp-account-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-account-org-layout { grid-template-columns: 1fr; }
  .tp-account-assignment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-account-assignment-remove { width: 100%; }
}

@media (max-width: 680px) {
  .tp-account-sso { align-items: flex-start; flex-wrap: wrap; }
  .tp-account-sso__lock { margin-left: 44px; }
  .tp-account-filters { grid-template-columns: 1fr; }
  .tp-account-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-account-integration { align-items: flex-start; flex-direction: column; }
  .tp-account-assignment { grid-template-columns: 1fr; }
}
