@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/googlesans/v71/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrwEIKli.ttf) format('truetype');
}
@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/googlesans/v71/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrw2IKli.ttf) format('truetype');
}
@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/googlesans/v71/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrzaJ6li.ttf) format('truetype');
}
@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/googlesans/v71/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrzjJ6li.ttf) format('truetype');
}

:root {
  color-scheme: light dark;
  --bg: #f8fafc;
  --paper: #ffffff;
  --surface: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --blue: #0284c7;
  --blue-hover: #0369a1;
  --blue-soft: #e0f2fe;
  --orange: #d97706;
  --orange-soft: #fef3c7;
  --green: #10b981;
  --green-soft: #d1fae5;
  --error: #ef4444;
  --error-soft: #fee2e2;
  --shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
}

a {
  color: var(--blue);
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

/* App Layout */
.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 270px;
  background-color: var(--paper);
  border-right: 1px solid var(--border);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  gap: 20px;
  z-index: 100;
  transition: transform 0.25s ease-in-out;
}

.brand {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 1.3rem;
  gap: 10px;
  letter-spacing: -0.02em;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border-radius: 8px;
  font-size: 1.15rem;
  font-weight: 900;
}

.brand-dot {
  color: var(--blue);
}

.tenant-selector-box {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tenant-selector-box label {
  font-size:14px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.tenant-selector-box select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background-color: var(--paper);
  padding: 8px 10px;
  font-size:14px;
  font-weight: 600;
  color: var(--text);
  outline: none;
}

/* Nav Menu */
nav.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size:14px;
  font-weight: 550;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background-color: var(--surface);
  color: var(--text);
}

.nav-item.active {
  background-color: var(--blue-soft);
  color: var(--blue);
  font-weight: 650;
}

.nav-item .icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.env-pill {
  font-size:14px;
  font-weight: 700;
  color: var(--green);
  background: var(--green-soft);
  padding: 4px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}

.env-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.profile-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size:14px;
}

.profile-info {
  line-height: 1.2;
}

.profile-info strong {
  font-size:14px;
  color: var(--text);
  display: block;
}

.profile-info small {
  font-size:14px;
  color: var(--muted);
}

.btn-logout {
  font-size:14px;
  color: var(--muted);
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 4px;
}

.btn-logout:hover {
  color: var(--error);
  background-color: var(--surface);
}

/* Main Area */
.workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 64px;
  background-color: var(--paper);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-mobile-menu {
  display: none;
  padding: 6px;
  border-radius: 6px;
  color: var(--text);
  border: 1px solid var(--border);
}

.breadcrumb-nav {
  font-size:14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb-active {
  color: var(--text);
  font-weight: 600;
}

.badge-dybs {
  font-size:14px;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(2, 132, 199, 0.2);
}

/* Content */
.content {
  padding: 28px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.heading-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.heading-title h1 {
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.heading-title p {
  font-size:14px;
  color: var(--muted);
  margin-top: 2px;
}

/* Metric Cards */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background-color: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--blue);
}

.metric-card.success::before { background-color: var(--green); }
.metric-card.warning::before { background-color: var(--orange); }

.metric-label {
  font-size:14px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.metric-number {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.metric-desc {
  font-size:14px;
  color: var(--muted);
}

/* Surface Cards & Tables */
.card-surface {
  background-color: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-bottom: 24px;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.card-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.card-header p {
  font-size:14px;
  color: var(--muted);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size:14px;
}

thead th {
  background-color: var(--surface);
  color: var(--muted);
  font-weight: 650;
  font-size:14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background-color: var(--surface);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size:14px;
  font-weight: 650;
}

.badge-success { background: var(--green-soft); color: var(--green); }
.badge-warning { background: var(--orange-soft); color: var(--orange); }
.badge-danger { background: var(--error-soft); color: var(--error); }
.badge-info { background: var(--blue-soft); color: var(--blue); }

.hash-badge {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size:14px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--muted);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size:14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--blue);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--blue-hover);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--border);
}

.btn-sm {
  padding: 4px 10px;
  font-size:14px;
  border-radius: 6px;
}

/* Toolbar & Search */
.toolbar {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size:14px;
  min-width: 260px;
  outline: none;
}

.search-box:focus {
  border-color: var(--blue);
}

/* Modal */
dialog {
  padding: 24px;
  background-color: var(--paper);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: min(580px, calc(100vw - 32px));
  max-height: 90vh;
  margin: auto;
}

dialog::backdrop {
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-head h3 {
  font-size: 1.15rem;
  font-weight: 750;
}

.modal-close {
  font-size: 1.3rem;
  color: var(--muted);
  cursor: pointer;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-field label {
  font-size:14px;
  font-weight: 650;
  color: var(--text);
}

.form-field input, .form-field select, .form-field textarea {
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 9px 12px;
  font-size:14px;
  background-color: var(--paper);
  outline: none;
}

.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--blue);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--text);
  color: var(--bg);
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size:14px;
  font-weight: 600;
  z-index: 300;
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translate(-50%, 10px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* Responsive / Mobile Drawer */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }

  .sidebar.open ~ .sidebar-backdrop {
    display: block;
  }

  .btn-mobile-menu {
    display: flex;
  }

  .content {
    padding: 16px;
  }

  .topbar {
    padding: 0 16px;
  }

  .metrics-row {
    grid-template-columns: 1fr;
  }
}
/* ==========================================================================
   Vault / Master PIN Login Screen (sifre-ismoz exact visual match)
   ========================================================================== */
.vault-login-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: #020617; /* Very dark navy / slate-950 */
  min-height: 100vh;
  box-sizing: border-box;
}

.vault-login-card {
  width: 100%;
  max-width: 440px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  padding: 36px 32px 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
  text-align: center;
  animation: vaultCardFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vaultCardFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.vault-icon-box {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.35);
}

.vault-header {
  margin-bottom: 24px;
}

.vault-title-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.vault-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.4px;
  margin: 0;
  line-height: 1.2;
}

.vault-badge-pill {
  font-size:14px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  background-color: #d1fae5;
  color: #047857;
  border: 1px solid #6ee7b7;
  letter-spacing: 0.04em;
}

.vault-subtitle {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 6px;
  line-height: 1.4;
}

.vault-form {
  display: flex;
  flex-direction: column;
}

.vault-label {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 10px;
  text-align: center;
}

.vault-pin-input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  background-color: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.35em;
  color: #0f172a;
  box-sizing: border-box;
  outline: none;
  transition: all 0.15s ease;
}

.vault-pin-input:focus {
  background-color: #ffffff;
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.vault-pin-input::placeholder {
  color: #cbd5e1;
  font-weight: 400;
}

.vault-error-box {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background-color: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
  font-size:14px;
  font-weight: 700;
  text-align: center;
}

.vault-submit-btn {
  margin-top: 16px;
  width: 100%;
  height: 52px;
  border-radius: 16px;
  background-color: #f59e0b;
  color: #080f20;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px -4px rgba(245, 158, 11, 0.4);
  transition: all 0.18s ease;
}

.vault-submit-btn:hover {
  background-color: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -4px rgba(245, 158, 11, 0.5);
}

.vault-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.vault-forgot-wrap {
  margin-top: 16px;
}

.vault-forgot-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  transition: color 0.15s ease;
}

.vault-forgot-link:hover {
  color: #d97706;
}

.vault-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size:14px;
  font-weight: 600;
  color: #94a3b8;
}

.vault-footer-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* DernekSaaS unified navy / amber design, shared with the public home page. */
:root{color-scheme:light;--bg:#f1f5f9;--paper:#fff;--surface:#f1f5f9;--text:#0f172a;--muted:#475569;--border:#d7e2f0;--border-strong:#b8c7da;--blue:#b45309;--blue-hover:#92400e;--blue-soft:#fff7e0;--orange:#f59e0b;--green:#047857;--error:#b91c1c}
body{font-family:'Google Sans','Segoe UI',Arial,sans-serif;font-size:16px;line-height:1.65}
.sidebar{background:#020617;color:#f8fafc;border-color:#1e293b}
.sidebar .brand,.sidebar .brand-text{color:#f8fafc}
.sidebar .nav-item{color:#cbd5e1;font-size:16px;min-height:48px}
.sidebar .nav-item:hover{background:#172033;color:#fff}
.sidebar .nav-item.active{background:#f59e0b;color:#080f20}
.sidebar select,.sidebar .tenant-selector{background:#0f172a;color:#f8fafc;border-color:#334155}
.sidebar .section-title,.sidebar small,.sidebar .user-meta{color:#cbd5e1}
h1{font-size:36px;line-height:1.2;letter-spacing:-.025em}h2{font-size:26px}h3{font-size:22px}
.heading-title p{font-size:18px;max-width:70ch;line-height:1.65}
.btn{font-size:16px;min-height:46px;padding:10px 18px;border-radius:10px;font-weight:600}
.btn-primary,.btn-primary:hover{background:#f59e0b;color:#080f20;border-color:#f59e0b}
.btn-primary:hover{background:#fbbf24}.btn:disabled{opacity:.6;cursor:wait}
.btn-sm{font-size:14px;min-height:40px;padding:8px 12px}
.card-surface,.metric-card{border-radius:16px;box-shadow:0 3px 12px #0f172a05}
.metric-card:nth-child(4n+1){border-top:3px solid #ff3864}.metric-card:nth-child(4n+2){border-top:3px solid #f59e0b}.metric-card:nth-child(4n+3){border-top:3px solid #8b5cf6}.metric-card:nth-child(4n+4){border-top:3px solid #10b981}
th,td{font-size:16px;padding:18px 20px}th{background:#f1f5f9;color:#475569}small,.badge,.metric-label{font-size:14px}
.tc-masked{font-variant-numeric:tabular-nums;white-space:nowrap}
.form-note{font-size:14px;color:#475569;line-height:1.7;padding:14px;background:#f1f5f9;border-radius:10px;margin-bottom:20px}
.member-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.member-form-grid .form-field{margin:0}.member-form-grid+ .form-note{margin-top:20px}
.form-field label{font-size:16px;font-weight:600}.form-field input,.form-field select,.form-field textarea{font-size:16px;min-height:48px;padding:10px 12px}.form-field small{font-size:14px;color:#475569}
dialog{width:min(680px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow-y:auto;border-radius:18px}dialog::backdrop{background:#020617a8;backdrop-filter:blur(3px)}
.modal-head{position:sticky;top:0;background:#fff;z-index:2}.modal-close{min-height:44px;min-width:44px;cursor:pointer}.modal-actions{position:sticky;bottom:0;background:#fff;padding-block:16px}
:focus-visible{outline:3px solid #2563eb;outline-offset:3px}
.vault-login-screen{background:radial-gradient(ellipse at top left,#1e293b,#020617 70%);padding:32px 18px}.vault-title{font-family:inherit;font-size:30px}.vault-subtitle{font-size:16px}.vault-label,.vault-forgot-link,.vault-footer-item{font-size:14px}.vault-submit-btn{background:#f59e0b;color:#080f20;font-size:16px;min-height:52px}
@media(max-width:900px){.sidebar{position:fixed;left:0;top:0;transform:translateX(-100%);width:min(300px,85vw);height:100dvh}.sidebar.open{transform:translateX(0)}h1{font-size:30px}.heading-title p{font-size:18px}.main-content{min-width:0}.table-wrap{max-width:100%;overflow-x:auto}.heading-bar,.toolbar{flex-wrap:wrap;gap:16px}.search-box{width:100%;min-width:0}th,td{font-size:14px;padding:14px}.member-form-grid{grid-template-columns:1fr}dialog{width:calc(100% - 24px);max-height:calc(100dvh - 24px)}.heading-bar .btn{white-space:normal}.modal-actions .btn{flex:1}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.brand-icon{background:linear-gradient(135deg,#f59e0b,#f97316);color:#fff}.sidebar .tenant-selector-box{background:#0f172a;border-color:#334155}.sidebar .tenant-selector-box label{color:#cbd5e1}.sidebar .profile-info strong{color:#f8fafc}.sidebar .btn-logout{color:#cbd5e1}.heading-title h1{font-size:36px}.table-wrap table{min-width:1050px}#tbody-members td:nth-child(3){min-width:220px}.badge{white-space:normal}.badge-warning{color:#92400e;background:#fffbeb}.workspace{min-width:0}
@media(max-width:900px){.heading-title h1{font-size:30px}.breadcrumb-nav{min-width:0;overflow-wrap:anywhere}.topbar{gap:10px}.badge-dybs{display:none}}

.member-details{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:0 0 20px}.member-details dt{font-size:14px;color:#475569}.member-details dd{margin:4px 0 0;font-size:16px;font-weight:600;overflow-wrap:anywhere}@media(max-width:600px){.member-details{grid-template-columns:1fr}}
.member-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.member-form-grid .form-field{min-width:0}.member-form-grid input,.member-form-grid select{width:100%;min-width:0;max-width:100%}#modal-body{min-width:0;padding-bottom:8px}
@media(max-width:900px){.member-form-grid{grid-template-columns:minmax(0,1fr)}}

.member-pager{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 20px;border-top:1px solid var(--border);font-size:14px;flex-wrap:wrap}.member-pager>div{display:flex;gap:8px}

.member-form-grid [hidden]{display:none!important}.member-form-grid textarea{width:100%;min-width:0;max-width:100%}#modal-body h3{margin:24px 0 16px;font-size:20px}

/* Body scrolls independently; actions never cover the last input. */
#modal[open]{display:flex;flex-direction:column;overflow:hidden;padding:0}
#modal .modal-head{position:static;flex:none;margin:0;padding:24px;border-bottom:1px solid var(--border)}
#modal-form{display:flex;flex-direction:column;min-height:0;overflow:hidden;padding:0}
#modal .modal-scroll{min-height:0;overflow-y:auto;padding:24px;scrollbar-gutter:stable}
#modal .modal-actions{position:static;flex:none;padding:16px 24px;margin:0;border-top:1px solid var(--border)}
@media(max-width:600px){#modal .modal-head{padding:20px}#modal .modal-scroll{padding:20px}#modal .modal-actions{padding:16px 20px}}
