:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #eef3f0;
  --text: #17201b;
  --muted: #69736e;
  --line: #dce2de;
  --accent: #0f8b6d;
  --accent-dark: #09664f;
  --danger: #b84242;
  --income: #0f8b6d;
  --expense: #9d4f14;
  --shadow: 0 16px 45px rgba(19, 28, 24, 0.09);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

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

button,
.link-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
}

button {
  cursor: pointer;
}

.link-button {
  text-decoration: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.login-card,
.modal-panel {
  width: min(430px, 100%);
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.brand div h2 {
  margin: 0;
}

.brand-mark {
  /* width: 44px; */
  height: 44px;
  display: block;
  object-fit: contain;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 28px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 16px;
  font-size: 22px;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.muted {
  color: var(--muted);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 139, 109, 0.14);
}

.primary {
  width: 100%;
  background: var(--accent);
  color: white;
}

.primary:hover {
  background: var(--accent-dark);
}

.auth-switch {
  width: 100%;
  margin-top: 10px;
  background: transparent;
  color: var(--accent);
}

.admin-link {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.primary.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.compact {
  width: auto;
  padding: 0 16px;
}

.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8eee9;
  color: var(--text);
  padding: 0 14px;
}

.danger {
  background: #f5e6e6;
  color: var(--danger);
  padding: 0 14px;
}

.error {
  min-height: 22px;
  color: var(--danger);
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
  padding-left: 232px;
}

.app-header {
  background: transparent;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 42px);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.topbar > div:first-child {
  min-width: 0;
}

.topbar h1 {
  font-size: 22px;
}

.topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  background: #edf4f0;
  color: var(--text);
}

.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  min-width: 156px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.account-dropdown a,
.account-dropdown button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  font-weight: 800;
}

.account-dropdown a:hover,
.account-dropdown button:hover {
  background: #edf4f0;
}

.app-nav {
  position: fixed;
  left: 16px;
  top: 16px;
  bottom: 16px;
  z-index: 25;
  width: 200px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid #26312c;
  border-radius: 8px;
  background: #151b18;
  box-shadow: var(--shadow);
}

.app-nav::before {
  content: "Menu";
  display: block;
  padding: 4px 8px 10px;
  color: #9faea6;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.app-nav a {
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #d7ded9;
  text-decoration: none;
  font-weight: 900;
}

.app-nav a small {
  display: none;
}

.app-nav a:hover {
  background: #202b25;
}

.app-nav a.active {
  border-color: rgba(159, 240, 216, 0.35);
  background: var(--accent);
  color: white;
}

.avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.avatar.large {
  width: 54px;
  height: 54px;
  font-size: 18px;
}

.layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  min-height: calc(100vh - 82px);
}

.sidebar {
  padding: 20px;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.content {
  padding: 22px clamp(16px, 4vw, 42px);
}

.mobile-section-title {
  display: none;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.client-list {
  display: grid;
  gap: 10px;
}

.client-row {
  width: 100%;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  text-align: left;
}

.client-row.active {
  border-color: var(--accent);
  background: var(--panel-2);
}

.client-row strong,
.operation strong {
  display: block;
}

.client-row span,
.operation span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.client-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.mobile-back {
  display: none;
  margin-bottom: 14px;
}

.client-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pill {
  padding: 6px 9px;
  border-radius: 999px;
  background: #e8eee9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.operations {
  display: grid;
  gap: 10px;
}

.operation {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.amount {
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.amount.income {
  color: var(--income);
}

.amount.expense {
  color: var(--expense);
}

.empty {
  padding: 34px 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: white;
  text-align: center;
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 18, 15, 0.45);
}

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

.modal-actions .primary {
  width: auto;
  padding: 0 18px;
}

.profile-grid {
  width: min(1180px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 12px;
  margin: 18px auto 32px;
}

.profile-column {
  display: grid;
  align-content: start;
  gap: 12px;
}

.profile-card {
  padding: 18px;
  border: 1px solid #26312c;
  border-radius: 8px;
  background: #151b18;
  color: #f4f7f5;
}

.profile-card h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

.profile-card h3 {
  margin-bottom: 10px;
  font-size: 14px;
}

.profile-card .field {
  color: #b9c5bf;
}

.profile-card input {
  border-color: #34423b;
  background: #101512;
  color: #f4f7f5;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 0;
  color: #d7ded9;
}

.info-row span {
  color: #f4f7f5;
  font-weight: 800;
}

.info-row strong {
  max-width: 58%;
  color: #d7ded9;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.card-copy,
.hint {
  color: #9faea6;
  font-size: 13px;
}

.profile-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.profile-edit-form .field {
  margin-bottom: 0;
}

.profile-edit-form .form-actions,
.profile-edit-form h3 {
  grid-column: 1 / -1;
}

.emergency-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #34423b;
}

.emergency-limit {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid #34423b;
}

.emergency-list {
  display: grid;
  gap: 12px;
}

.emergency-contact {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #34423b;
  border-radius: 8px;
  background: #101512;
}

.remove-contact {
  justify-self: end;
}

.dark-empty {
  border-color: #34423b;
  background: #101512;
  color: #9faea6;
}

.profile-card-summary {
  min-height: 104px;
}

.employee-summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.employee-summary h2 {
  margin-bottom: 4px;
}

.employee-summary p {
  margin-bottom: 4px;
  color: #d7ded9;
  font-size: 13px;
}

.profile-photo {
  position: relative;
  width: 64px;
  height: 64px;
  min-height: 64px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 900;
  overflow: hidden;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.avatar-status {
  min-height: 17px;
  margin: 3px 0 0;
  color: var(--accent);
  font-size: 12px;
}

.photo-badge {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 3px 5px;
  border-radius: 6px 0 0 0;
  background: #0b6f57;
  color: white;
  font-size: 10px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.dashboard-page {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 32px;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.dashboard-stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid #26312c;
  border-radius: 8px;
  background: #151b18;
  color: #f4f7f5;
  text-decoration: none;
}

.dashboard-card h2 {
  margin-bottom: 8px;
  font-size: 20px;
}

.dashboard-card p {
  margin-bottom: 0;
  color: #b9c5bf;
}

.dashboard-card span {
  color: #9ff0d8;
  font-size: 13px;
  font-weight: 900;
}

.banks-page {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 32px;
}

.banks-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.bank-filter {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #26312c;
  border-radius: 8px;
  background: #151b18;
}

.bank-filter button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 0;
  background: transparent;
  color: #d7ded9;
}

.bank-filter button.active {
  background: var(--accent);
  color: white;
}

.banks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bank-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid #26312c;
  border-radius: 8px;
  background: #151b18;
  color: #f4f7f5;
}

.bank-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.bank-type {
  color: #9ff0d8;
  font-weight: 900;
}

.bank-logo {
  min-width: 58px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #edf4f0;
  color: #17201b;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.bank-address {
  min-height: 22px;
  margin-bottom: 0;
  color: #d7ded9;
}

.bank-number,
.routing-grid > div {
  display: grid;
  gap: 5px;
}

.bank-number span,
.routing-grid span {
  color: #9faea6;
  font-size: 12px;
  font-weight: 800;
}

.bank-number strong,
.routing-grid strong {
  overflow-wrap: anywhere;
  font-size: 17px;
}

.routing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bank-delete {
  justify-self: end;
}

.bank-form {
  width: min(560px, 100%);
}

.scheduler-page {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 32px;
}

.scheduler-card {
  padding: 18px;
  border: 1px solid #26312c;
  border-radius: 8px;
  background: #151b18;
  color: #f4f7f5;
}

.scheduler-alert {
  padding: 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(67, 186, 255, 0.35);
  border-radius: 8px;
  background: rgba(67, 186, 255, 0.1);
  color: #cdefff;
}

.scheduler-alert strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.scheduler-alert p {
  margin-bottom: 0;
  color: #a9c8d8;
  font-size: 14px;
}

.scheduler-toolbar {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 320px) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}

.scheduler-toolbar h2 {
  margin-bottom: 9px;
  font-size: 17px;
}

.scheduler-week {
  margin-bottom: 0;
  color: #b9c5bf;
}

.scheduler-week select {
  border-color: #34423b;
  background: #101512;
  color: #f4f7f5;
}

.scheduler-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.scheduler-grid {
  display: grid;
  gap: 8px;
}

.scheduler-row {
  display: grid;
  grid-template-columns: 96px repeat(9, minmax(64px, 1fr));
  gap: 7px;
  align-items: center;
}

.scheduler-day,
.hour-slot {
  min-height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-weight: 800;
}

.scheduler-day {
  background: #101512;
  color: #d7ded9;
}

.hour-slot {
  border: 1px solid #34423b;
  background: #101512;
  color: #d7ded9;
}

.hour-slot.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.hour-slot small {
  margin-left: 2px;
  font-size: 10px;
}

.mobile-day {
  display: none;
}

.scheduler-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: #9ff0d8;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 820px) {
  body.mobile-keyboard-open .app-shell {
    padding-bottom: env(safe-area-inset-bottom);
  }

  body.mobile-keyboard-open .app-nav {
    display: none;
  }

  .app-shell {
    padding-right: 0;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
    padding-left: 0;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding:
      calc(12px + env(safe-area-inset-top))
      calc(14px + env(safe-area-inset-right))
      12px
      calc(14px + env(safe-area-inset-left));
  }

  .topbar h1 {
    overflow: hidden;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar p {
    display: none;
  }

  .topbar-actions {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .profile-button {
    width: auto;
    justify-content: center;
    padding: 0 10px;
  }

  .profile-button span:not(.avatar) {
    display: none;
  }

  .app-nav {
    top: auto;
    right: calc(10px + env(safe-area-inset-right));
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: calc(10px + env(safe-area-inset-left));
    width: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }

  .app-nav::before {
    display: none;
  }

  .app-nav a {
    min-height: 52px;
    justify-items: center;
    padding: 0 4px;
    font-size: 0;
  }

  .app-nav a span {
    display: none;
  }

  .app-nav a small {
    display: block;
    font-size: 11px;
  }

  .account-dropdown {
    right: 0;
  }

  .layout {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 67px);
  }

  .sidebar {
    padding: 14px;
    border-right: 0;
    border-bottom: 0;
  }

  .content {
    padding: 14px;
  }

  .mobile-section-title {
    display: block;
    margin-bottom: 12px;
  }

  .mobile-section-title h2 {
    margin-bottom: 0;
    font-size: 20px;
  }

  .mobile-list .content,
  .mobile-detail .sidebar {
    display: none;
  }

  .mobile-detail .stats {
    display: none;
  }

  .mobile-back {
    display: inline-flex;
    width: 100%;
  }

  .toolbar {
    margin-bottom: 12px;
  }

  .client-row {
    min-height: 68px;
  }

  .client-row.active {
    border-color: var(--line);
    background: white;
  }

  .client-head {
    margin-bottom: 14px;
  }

  .client-head h2 {
    font-size: 20px;
  }

  .panel {
    padding: 14px;
  }

  .operation {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .amount {
    font-size: 17px;
  }

  .client-head,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-panel {
    padding: 20px;
  }

  .profile-grid {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
    margin-top: 12px;
  }

  .profile-card {
    padding: 14px;
  }

  .employee-summary {
    grid-template-columns: auto 1fr;
  }

  .employee-summary .primary {
    grid-column: 1 / -1;
    width: 100%;
  }

  .profile-edit-form {
    grid-template-columns: 1fr;
  }

  .dashboard-page {
    width: calc(100% - 24px);
    margin-top: 12px;
  }

  .dashboard-summary,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .banks-page {
    width: calc(100% - 24px);
    margin-top: 12px;
  }

  .banks-header {
    align-items: stretch;
    flex-direction: column;
  }

  .bank-filter {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .bank-filter button {
    padding: 0 8px;
  }

  .banks-grid {
    grid-template-columns: 1fr;
  }

  .routing-grid {
    grid-template-columns: 1fr;
  }

  .info-row {
    align-items: flex-start;
  }

  .info-row strong {
    max-width: 55%;
  }

}

@media (max-width: 920px) {
  .scheduler-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .scheduler-actions {
    justify-content: stretch;
  }

  .scheduler-actions button {
    flex: 1;
  }

  .scheduler-row {
    grid-template-columns: 54px repeat(3, minmax(68px, 1fr));
  }

  .desktop-day {
    display: none;
  }

  .mobile-day {
    display: inline;
  }
}

@media (max-width: 520px) {
  .scheduler-page {
    width: calc(100% - 24px);
    margin-top: 12px;
  }

  .scheduler-card {
    padding: 14px;
  }

  .scheduler-row {
    grid-template-columns: 48px repeat(2, minmax(0, 1fr));
  }

  .scheduler-day {
    grid-row: span 5;
    min-height: 100%;
  }

  .hour-slot {
    min-height: 48px;
  }
}

/* Modern workspace refresh */
:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --text: #111827;
  --muted: #667085;
  --line: #e2e8f0;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --danger: #dc2626;
  --income: #059669;
  --expense: #d97706;
  --nav: #101828;
  --nav-soft: #1d2939;
  --shadow: 0 14px 34px rgba(16, 24, 40, 0.08);
}

body {
  background:
    linear-gradient(180deg, #f8fafc 0, #f3f5f8 280px),
    var(--bg);
}

button,
.link-button,
input,
select,
textarea,
.client-row,
.stat,
.dashboard-stat,
.dashboard-card,
.profile-card,
.bank-card,
.scheduler-card,
.panel,
.modal-panel {
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.login-card,
.modal-panel,
.stat,
.dashboard-stat,
.panel,
.client-row {
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.primary {
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.secondary {
  border: 1px solid #d0d5dd;
  background: white;
  color: #344054;
}

.secondary:hover {
  border-color: #98a2b3;
  background: #f9fafb;
}

.danger {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: var(--danger);
}

input,
select,
textarea {
  border-color: #d0d5dd;
  background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(14px);
}

.topbar h1 {
  color: #101828;
  font-size: 24px;
  letter-spacing: 0;
}

.profile-button {
  border: 1px solid #d0d5dd;
  background: #ffffff;
  color: #344054;
}

.profile-button:hover {
  border-color: #98a2b3;
  background: #f9fafb;
}

.avatar,
.profile-photo {
  background: linear-gradient(135deg, #2563eb, #0f766e);
}

.account-dropdown {
  border-color: #d0d5dd;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.14);
}

.app-nav {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    var(--nav);
  box-shadow: 0 22px 60px rgba(16, 24, 40, 0.18);
}

.app-nav::before {
  content: "Workspace";
  color: #98a2b3;
}

.app-nav a {
  color: #d0d5dd;
}

.app-nav a:hover {
  background: var(--nav-soft);
}

.app-nav a.active {
  border-color: rgba(255, 255, 255, 0.08);
  background: #ffffff;
  color: #101828;
}

.sidebar,
.content {
  background: transparent;
}

.sidebar {
  border-right: 1px solid var(--line);
}

.client-row:hover,
.dashboard-card:hover,
.bank-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.client-row.active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.stat,
.dashboard-stat,
.panel,
.client-row,
.operation,
.empty {
  border-color: var(--line);
  background: #ffffff;
}

.stat strong,
.dashboard-stat strong {
  color: #101828;
}

.pill {
  background: #eef2ff;
  color: #475467;
}

.dashboard-card,
.profile-card,
.bank-card,
.scheduler-card {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.dashboard-card h2,
.profile-card h2,
.bank-number strong,
.routing-grid strong,
.scheduler-toolbar h2 {
  color: #101828;
}

.dashboard-card p,
.bank-address,
.employee-summary p,
.card-copy,
.hint,
.scheduler-alert p {
  color: var(--muted);
}

.dashboard-card span,
.bank-type,
.scheduler-status {
  color: var(--accent);
}

.profile-card .field,
.scheduler-week {
  color: #475467;
}

.profile-card input,
.scheduler-week select {
  border-color: #d0d5dd;
  background: #ffffff;
  color: var(--text);
}

.info-row {
  border-bottom: 1px solid #f1f5f9;
  color: var(--muted);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row span {
  color: #344054;
}

.info-row strong {
  color: #101828;
}

.emergency-form,
.emergency-limit {
  border-top-color: var(--line);
}

.emergency-contact,
.dark-empty {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--muted);
}

.bank-filter {
  border-color: #d0d5dd;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.bank-filter button {
  color: #475467;
}

.bank-filter button.active {
  background: #101828;
  color: white;
}

.bank-logo {
  background: #eff6ff;
  color: #1d4ed8;
}

.scheduler-alert {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.scheduler-day,
.hour-slot {
  background: #f8fafc;
  color: #344054;
}

.hour-slot {
  border-color: #e2e8f0;
}

.hour-slot:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.hour-slot.selected {
  border-color: #2563eb;
  background: #2563eb;
  color: white;
}

.modal {
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
}

@media (max-width: 820px) {
  body {
    background: #f8fafc;
  }

  .topbar {
    min-height: 62px;
  }

  .app-nav {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(16, 24, 40, 0.94);
    box-shadow: 0 18px 44px rgba(16, 24, 40, 0.22);
    backdrop-filter: blur(12px);
  }

  .app-nav a.active {
    background: #ffffff;
    color: #101828;
  }

  .mobile-detail .content {
    background: transparent;
  }
}

/* Administrator panel */
.admin-body {
  background: #f4f6f8;
}

.admin-shell {
  min-height: 100dvh;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding:
    calc(18px + env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    18px
    max(20px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.admin-header h1 {
  margin-bottom: 3px;
}

.admin-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-header-actions {
  display: flex;
  gap: 8px;
}

.admin-content {
  width: min(1120px, calc(100% - 32px));
  margin: 22px auto 50px;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-summary-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.admin-summary-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-summary-card strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.admin-user-list {
  display: grid;
  gap: 12px;
}

.admin-user-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: hidden;
}

.admin-user-card > summary {
  min-height: 84px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.admin-user-card > summary::-webkit-details-marker {
  display: none;
}

.admin-user-card[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.admin-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  color: white;
  font-weight: 900;
  overflow: hidden;
}

.admin-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-user-title {
  min-width: 0;
}

.admin-user-title strong,
.admin-user-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-title small {
  margin-top: 5px;
  color: var(--muted);
}

.admin-expand {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.admin-user-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.admin-data-section {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.admin-data-section h2 {
  margin-bottom: 12px;
  font-size: 17px;
}

.admin-data-section h2 span {
  color: var(--muted);
  font-size: 13px;
}

.admin-data-grid,
.admin-collection {
  display: grid;
  gap: 8px;
}

.admin-data-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.4fr) minmax(0, 1fr);
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
}

.admin-data-row:last-child {
  border-bottom: 0;
}

.admin-data-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-data-row strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.admin-collection article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.admin-collection h3 {
  margin-bottom: 8px;
  color: #344054;
}

.admin-collection p {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.admin-loading,
.admin-error {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  text-align: center;
}

.admin-error {
  color: var(--danger);
}

@media (max-width: 760px) {
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-header-actions {
    width: 100%;
  }

  .admin-header-actions button {
    flex: 1;
  }

  .admin-content {
    width: calc(100% - 24px);
    margin-top: 12px;
  }

  .admin-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .admin-summary-card {
    padding: 12px 8px;
  }

  .admin-summary-card strong {
    font-size: 22px;
  }

  .admin-user-card > summary {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 12px;
  }

  .admin-expand {
    display: none;
  }

  .admin-user-details {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .admin-data-row {
    grid-template-columns: minmax(90px, 0.42fr) minmax(0, 1fr);
  }
}
