.input-wrap select {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 10px;
  background: #fff;
  color: #19253a;
  font: inherit;
  cursor: pointer;
}

.status-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}

.status-badge.active { background: #e8f8f1; color: #16865f; }
.status-badge.deleted { background: #f2f3f5; color: #7b8492; }
.deleted-meta { display: block; margin-top: 4px; color: #9ba3af; font-size: 9px; }
.deleted-row { background: #fafbfc; }
.deleted-row .user-cell, .deleted-row .role-badge { opacity: .58; }
.row-actions { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.danger-text { color: #cc3f50; }
.danger-button {
  margin-top: 24px;
  border: 0;
  border-radius: 8px;
  background: #c93e50;
  color: #fff;
  font-weight: 700;
}
.danger-note { background: #fff2f3; color: #9c3a47; }

.account-area { gap: 12px; }
.topbar-tools { display: flex; align-items: center; gap: 8px; }
.account-separator { width: 1px; height: 28px; background: #e3e4e6; }
.account-menu { position: relative; }
.account-menu-button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 164px;
  min-height: 48px;
  padding: 5px 8px 5px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  color: inherit;
  text-align: left;
  transition: background .18s, border-color .18s, box-shadow .18s;
}
.account-menu-button:hover { border-color: #e4e5e7; background: #fafafa; }
.account-menu-button[aria-expanded="true"] { border-color: #dedfe1; background: #f7f7f7; box-shadow: 0 2px 7px #1111110d; }
.account-chevron { width: 20px; height: 20px; margin-left: auto; fill: none; stroke: #777c82; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s, stroke .18s; }
.account-menu-button:hover .account-chevron, .account-menu-button[aria-expanded="true"] .account-chevron { stroke: var(--navi-accent); }
.account-menu-button[aria-expanded="true"] .account-chevron { transform: rotate(180deg); }
.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: 242px;
  padding: 9px;
  border: 1px solid #e2e7ef;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 16px 42px #142c4c24;
}
.dropdown-identity { padding: 10px 12px 12px; border-bottom: 1px solid #edf0f4; }
.dropdown-identity b, .dropdown-identity span { display: block; }
.dropdown-identity b { font-size: 13px; }
.dropdown-identity span { margin-top: 3px; color: #8b96a7; font-size: 10px; }
.account-dropdown > button {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 9px;
  align-items: center;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #425169;
  text-align: left;
}
.account-dropdown > button:hover { background: #f3f7fd; color: var(--navi-accent); }
.account-dropdown > button b, .account-dropdown > button small { display: block; }
.account-dropdown > button b { font-size: 12px; }
.account-dropdown > button small { margin-top: 2px; color: #96a0ae; font-size: 9px; }
.account-dropdown hr { margin: 7px 3px; border: 0; border-top: 1px solid #edf0f4; }
.account-dropdown > .dropdown-logout:hover { background: #fff2f3; color: #c43d4e; }

.notification-center { position: relative; }
.portal-language, .notification-button { width: 42px; height: 38px; margin: 0; padding: 0; display: grid; place-items: center; border: 1px solid #d5d7d9; border-radius: 4px; background: #fff; color: #51565c; transition: border-color .18s, background .18s, color .18s; }
.portal-language { min-width: 42px; }
.portal-language:hover, .notification-button:hover, .notification-button[aria-expanded="true"] { border-color: var(--navi-accent); background: #fff8f7; color: var(--navi-accent); }
.bell-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-unread { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 9px; background: var(--navi-accent); color: #fff; font-size: 8px; font-style: normal; font-weight: 800; }
.notification-panel { position: absolute; top: calc(100% + 14px); right: -10px; width: min(390px, calc(100vw - 28px)); overflow: hidden; border: 1px solid #dfe2e6; border-radius: 6px; background: #fff; box-shadow: 0 18px 50px #16181b26; z-index: 45; }
.notification-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px 14px; border-bottom: 1px solid #eceef0; }
.notification-panel h2 { margin: 0; color: #202328; font-size: 16px; }
.notification-panel header p { margin: 4px 0 0; color: #8a8f96; font-size: 10px; }
.notification-panel header button { border: 0; background: transparent; color: #c52a22; font-size: 10px; font-weight: 700; }
.notification-list { max-height: 430px; overflow-y: auto; }
.notification-item { position: relative; display: grid; grid-template-columns: 31px minmax(0,1fr); gap: 11px; padding: 15px 17px; border-bottom: 1px solid #f0f1f2; background: #fff; cursor: pointer; }
.notification-item.unread { background: #fff9f8; }
.notification-item.unread::after { content: ""; position: absolute; top: 17px; right: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--navi-accent); }
.notification-state { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #f1f2f3; color: #777c82; font-size: 12px; font-weight: 800; }
.notification-item.success .notification-state { background: #e9f7ef; color: #238a50; }
.notification-item.failed .notification-state { background: #fdebea; color: #c62c24; }
.notification-item.in-progress .notification-state { background: #fff3dd; color: #a96908; }
.notification-copy { min-width: 0; padding-right: 8px; }
.notification-copy b { display: block; overflow: hidden; color: #2b2e32; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.notification-copy p { margin: 5px 0 7px; color: #6f747a; font-size: 10px; line-height: 1.5; }
.notification-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #9a9ea3; font-size: 9px; }
.notification-status { font-weight: 700; }
.notification-item.success .notification-status { color: #238a50; }
.notification-item.failed .notification-status { color: #c62c24; }
.notification-item.in-progress .notification-status { color: #a96908; }
.notification-empty { min-height: 180px; display: grid; place-items: center; color: #999da2; font-size: 11px; }

.profile-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.profile-tabs { display: flex; gap: 6px; margin: -8px 0 20px; padding-bottom: 10px; border-bottom: 1px solid #e6e9ed; }
.profile-tabs button { display: inline-flex; gap: 8px; align-items: center; padding: 10px 16px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #717b89; font-weight: 700; cursor: pointer; }
.profile-tabs button:hover { color: #20242a; }
.profile-tabs button.active { border-bottom-color: #d92d20; color: #c4251b; }
.password-page-card { max-width: 820px; }
.profile-summary { padding: 30px 22px; text-align: center; }
.profile-avatar { width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(145deg,#eaf2ff,#dce9ff); color: var(--navi-accent); font-size: 27px; font-weight: 800; }
.profile-summary h2 { margin: 0; font-size: 20px; }
.profile-summary > p { margin: 5px 0 12px; color: #8d98a8; font-size: 11px; }
.profile-summary-details { margin-top: 26px; border-top: 1px solid #edf0f4; text-align: left; }
.profile-summary-details div { padding: 13px 2px; border-bottom: 1px solid #edf0f4; }
.profile-summary-details span, .profile-summary-details b { display: block; }
.profile-summary-details span { color: #96a0ae; font-size: 9px; }
.profile-summary-details b { margin-top: 4px; overflow-wrap: anywhere; color: #4d5a6d; font-size: 11px; }
.profile-content { display: grid; gap: 20px; }
.profile-card { overflow: hidden; }
.settings-form { padding: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-form .field { margin-top: 0; }
.settings-form .field.full { grid-column: 1 / -1; }
.input-wrap.readonly { background: #f5f7fa; }
.input-wrap.readonly input { background: transparent; color: #8a95a6; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 4px; }

.admin-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-navigation { padding: 18px 12px; }
.admin-navigation > div { padding: 5px 10px 15px; }
.admin-navigation > div small { color: #8e99a9; font-size: 9px; letter-spacing: 1px; }
.admin-navigation > div h3 { margin-top: 5px; }
.admin-navigation > button { width: 100%; display: grid; grid-template-columns: 25px 1fr; gap: 8px; align-items: center; padding: 11px; border: 0; border-radius: 8px; background: #eaf2ff; color: var(--navi-accent); text-align: left; }
.admin-navigation > button b, .admin-navigation > button small { display: block; }
.admin-navigation > button b { font-size: 12px; }
.admin-navigation > button small { margin-top: 2px; color: #7794c2; font-size: 9px; }
.admin-navigation > p { margin: 18px 10px 4px; padding-top: 15px; border-top: 1px solid #edf0f4; color: #9aa4b2; font-size: 9px; line-height: 1.6; }
.admin-content { min-width: 0; }
.invitation-management-panel { margin-top: 20px; }
.invitation-table { min-width: 820px; }
.invitation-status.active { background: #e8f8f1; color: #16865f; }
.invitation-status.used { background: #e9f1ff; color: var(--navi-accent); }
.invitation-status.expired { background: #f2f3f5; color: #7b8492; }
.invitation-status.revoked { background: #fff0f0; color: #c73c48; }
.invitation-status-detail { display: block; margin-top: 5px; color: #8d96a3; font-size: 9px; white-space: nowrap; }
.empty-state.compact { min-height: 100px; }
.page-heading.compact { margin: 0 0 18px; }
.page-heading.compact h2 { margin: 0; font-size: 20px; }

@media (max-width: 900px) {
  .profile-layout, .admin-layout { grid-template-columns: 1fr; }
  .profile-summary { display: grid; grid-template-columns: 76px 1fr auto; gap: 5px 15px; align-items: center; text-align: left; }
  .profile-avatar { grid-row: 1 / 4; margin: 0; }
  .profile-summary-details { grid-column: 1 / -1; }
  .admin-navigation > p { display: none; }
}
@media (max-width: 600px) {
  .notification-button { display: grid; }
  .notification-panel { position: fixed; top: 66px; right: 10px; left: 10px; width: auto; }
  .account-separator { display: none; }
  .account-menu-button { min-width: auto; padding: 5px; }
  .account-chevron { display: none; }
  .account-dropdown { position: fixed; top: 68px; right: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .settings-form .field.full { grid-column: auto; }
  .profile-summary { grid-template-columns: 64px 1fr; }
  .profile-avatar { width: 64px; height: 64px; }
}
