body.portal-body,
body.login-body {
  background: #eee8df;
  color: #22211f;
  font-family: Inter, "Segoe UI", sans-serif;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 50;
  padding: 8px 10px;
  border: 1px solid #5b5248;
  border-radius: 6px;
  background: #fbf8f3;
  color: #22211f;
  transform: translateX(-160%);
}

.skip-link:focus {
  transform: translateX(0);
}

body.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: #171716;
}

body.login-body .login-shell {
  width: min(100% - 32px, 480px);
}

body.login-body .login-panel {
  padding: 28px;
  border: 1px solid #3a3630;
  border-radius: 8px;
  background: #2b2925;
  color: #e9e4dd;
  box-shadow: none;
}

body.login-body .login-brand {
  display: none;
}

body.login-body .eyebrow,
body.login-body h1,
body.login-body label,
body.login-body .dev-note,
body.login-body .login-copy {
  color: #e9e4dd;
}

body.login-body h1 {
  margin-bottom: 8px;
  font-size: 3.1rem;
  line-height: 0.98;
}

body.login-body .eyebrow {
  margin-bottom: 8px;
  color: #b7aea3;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.login-body .login-copy {
  margin-bottom: 18px;
  color: #c8bfb3;
}

body.login-body .login-form {
  gap: 12px;
}

body.login-body label {
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 650;
}

body.login-body input {
  border: 1px solid #3a3630;
  border-radius: 6px;
  min-height: 44px;
  padding: 10px 12px;
  background: #22211f;
  color: #e9e4dd;
}

body.login-body input::placeholder {
  color: #8f877e;
}

body.login-body input:focus {
  outline: 2px solid #9ba48f;
  outline-offset: 2px;
}

body.login-body .primary-button,
body.login-body .secondary-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #a6ac98;
  color: #22211f;
  font-weight: 700;
}

body.login-body .auth-divider {
  position: relative;
  margin: 18px 0;
  text-align: center;
}

body.login-body .auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid #3a3630;
}

body.login-body .auth-divider span {
  position: relative;
  padding: 0 10px;
  background: #2b2925;
  color: #b7aea3;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
}

body.login-body .alert {
  border: 1px solid #5f3430;
  background: #422c28;
  color: #f6d8d1;
}

body.login-body .dev-note {
  border: 1px solid #4d473f;
  background: rgba(166, 172, 152, 0.08);
  color: #d8d0c5;
}

body.portal-body .app-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

body.portal-body .sidebar {
  gap: 18px;
  border-right: 1px solid #d8d0c5;
  background: #f7f2eb;
  padding: 18px 16px;
}

body.portal-body .sidebar-brand {
  gap: 10px;
  padding: 4px 4px 18px;
  color: #22211f;
  font-size: 1rem;
  font-weight: 800;
}

body.portal-body .sidebar-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #22211f;
  color: #fbf8f3;
  font-size: 0.85rem;
  font-weight: 900;
}

body.portal-body .sidebar-nav {
  gap: 6px;
}

body.portal-body .sidebar-nav a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #746d64;
  text-decoration: none;
}

body.portal-body .sidebar-nav a > span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #d8d0c5;
  border-radius: 6px;
  background: #fbf8f3;
  color: #746d64;
  font-size: 0.75rem;
  font-weight: 900;
}

body.portal-body .sidebar-nav a:hover,
body.portal-body .sidebar-nav a:focus,
body.portal-body .sidebar-nav a.active {
  border-color: #d8d0c5;
  background: #fbf8f3;
  color: #22211f;
}

body.portal-body .sidebar-nav a.active > span,
body.portal-body .sidebar-nav a:hover > span,
body.portal-body .sidebar-nav a:focus > span {
  border-color: #a6ac98;
  background: #dde2d6;
  color: #22211f;
}

body.portal-body .logout-form {
  margin-top: auto;
}

body.portal-body .logout-form button,
body.portal-body .calendar-today,
body.portal-body .calendar-nav-button,
body.portal-body .icon-action,
body.portal-body .icon-close,
body.portal-body .icon-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid #d8d0c5;
  border-radius: 6px;
  background: #fbf8f3;
  color: #22211f;
  font-weight: 700;
  text-decoration: none;
}

body.portal-body .main-panel {
  padding: 24px;
  background: #eee8df;
}

body.portal-body .topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 0;
  border: 0;
  background: transparent;
}

body.portal-body .topbar h1,
body.portal-body .topbar h2,
body.portal-body .main-panel h1,
body.portal-body .main-panel h2,
body.portal-body .main-panel h3 {
  color: #22211f;
}

body.portal-body .topbar h1 {
  font-size: 2rem;
}

body.portal-body .eyebrow {
  color: #746d64;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

body.portal-body .topbar-icon-button,
body.portal-body .account-chip,
body.portal-body .summary-band,
body.portal-body .stat-card,
body.portal-body .table-panel,
body.portal-body .work-panel,
body.portal-body .drawer-shell,
body.portal-body .assistant-drawer,
body.portal-body .calendar-toolbar,
body.portal-body .week-calendar,
body.portal-body .assistant-answer,
body.portal-body .drawer-section {
  border: 1px solid #d8d0c5;
  border-radius: 8px;
  background: #fbf8f3;
  color: #22211f;
  box-shadow: none;
}

body.portal-body table th {
  background: #f1ebe3;
  color: #746d64;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.portal-body table th,
body.portal-body table td {
  border-bottom: 1px solid #e6ddd1;
}

body.portal-body .client-row:hover,
body.portal-body .client-row:focus {
  background: #f7f2eb;
}

body.portal-body .contact-link,
body.portal-body .client-name-link {
  color: #4f5a4a;
}

body.portal-body .assistant-backdrop {
  background: rgba(23, 23, 22, 0.42);
}

@media (max-width: 960px) {
  body.portal-body .app-shell {
    grid-template-columns: 1fr;
  }

  body.portal-body .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #d8d0c5;
  }
}

@media (max-width: 640px) {
  body.login-body .login-panel {
    padding: 22px;
  }

  body.login-body h1 {
    font-size: 2.35rem;
  }

  body.portal-body .main-panel {
    padding: 16px;
  }

  body.portal-body .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
