@font-face {
  font-family: 'PP Hatton';
  src: url('assets/PPHatton-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  font-family: 'Outfit', sans-serif;
  color: #f3eddf;
  background: #181a10;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
  --surface: #21231a;
  --gold: #d6c181;
  --muted: #b4b3a5;
  --border: rgba(195, 194, 110, 0.21);
  --focus: #e2eaa2;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-weight: 300;
  min-width: 320px;
  background: radial-gradient(ellipse at 5% 0%, rgba(143, 101, 56, 0.08), transparent 45%), #181a10;
}
button,
input,
textarea,
select {
  font: inherit;
}
strong,
b {
  font-weight: 500;
}
th {
  font-weight: 500;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.62;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
a {
  outline-offset: 4px;
}
:focus-visible {
  outline: 2px solid var(--focus);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: 'PP Hatton', Georgia, serif;
  font-weight: 500;
}
em {
  color: var(--gold);
  font-style: normal;
}
.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  margin-bottom: 15px;
}
.muted {
  color: var(--muted);
  line-height: 1.65;
}
.brand-logo {
  display: block;
  width: 114px;
  height: 80px;
  object-fit: contain;
}
.brand-logo--large {
  width: 156px;
  height: 116px;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  padding: 11px 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  color: #f3eddf;
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  transition:
    background 0.18s,
    border-color 0.18s;
}
.button:where(:hover):where(:not(:disabled)):where(:not([aria-disabled='true'])) {
  background: #2b2e20;
  border-color: #827952;
}
.button--primary {
  color: #202015;
  background: #d6c181;
  border-color: #d6c181;
}
.button--primary:hover:not(:disabled) {
  background: #e5d49e;
}
.button--secondary {
  background: rgba(195, 194, 110, 0.06);
  border-color: #827952;
  color: var(--gold);
}
.button--quiet {
  background: rgba(195, 194, 110, 0.035);
  border-color: var(--border);
  color: #e5d7ab;
}
.button--secondary:hover:not(:disabled):not([aria-disabled='true']),
.button--quiet:hover:not(:disabled):not([aria-disabled='true']) {
  background: rgba(195, 194, 110, 0.1);
  border-color: #827952;
}
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  flex-shrink: 0;
  border: 1px solid rgba(195, 194, 110, 0.26);
  border-radius: 12px;
  color: var(--gold);
  background: rgba(195, 194, 110, 0.05);
}
.icon-box--large {
  width: 54px;
  height: 54px;
  border-radius: 15px;
}
.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ccb77c;
}
.error-notice {
  border: 1px solid #bc777080;
  color: #f6c3bc;
  background: #3b2622;
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 0.87rem;
  line-height: 1.5;
}
.error-notice p {
  margin: 0;
}
.error-notice .button {
  margin-top: 12px;
}
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
  min-height: 220px;
}
.spinner {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.access-state {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
}
.access-state .error-notice {
  max-width: 480px;
  margin-top: 28px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.login-story {
  padding: 42px 10% 30px;
  display: flex;
  flex-direction: column;
  min-height: 720px;
  background: radial-gradient(ellipse at 65% 45%, #41422a55, transparent 64%);
  border-right: 1px solid var(--border);
}
.login-story__copy {
  margin: auto 0;
  padding: 56px 0;
}
.login-story h1 {
  font-size: clamp(2.65rem, 4.25vw, 4.5rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
}
.login-story__copy > p:last-child {
  color: var(--muted);
  font-size: 1.01rem;
  line-height: 1.75;
  margin: 20px 0 0;
}
.gold-rule {
  width: 53px;
  height: 1px;
  background: linear-gradient(to right, #d6c181, #d6c18122);
}
.login-story__signature {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #999d85;
  font-size: 0.59rem;
}
.login-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 50px 9%;
}
.login-card {
  width: 100%;
  max-width: 382px;
}
.login-card > .icon-box {
  margin-bottom: 32px;
}
.login-card .eyebrow {
  font-size: 0.61rem;
  margin-bottom: 12px;
}
.login-card h2 {
  font-size: 2.1rem;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.login-card > .muted {
  font-size: 0.91rem;
  margin-bottom: 30px;
}
.field {
  display: grid;
  gap: 9px;
  margin-bottom: 20px;
}
.field label {
  font-size: 0.85rem;
  color: #dbd8c9;
}
.field input {
  display: block;
  width: 100%;
  border: 1px solid #5e62434d;
  border-radius: 7px;
  min-height: 47px;
  padding: 11px 14px;
  background: #22251a;
  color: #f3eddf;
}
.field input:focus {
  border-color: var(--gold);
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 49px;
}
.password-toggle {
  position: absolute;
  right: 1px;
  top: 1px;
  min-height: 44px;
  min-width: 44px;
  border: none;
  border-radius: 5px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #b0b19b;
}
.password-toggle:hover {
  color: var(--gold);
}
.login-submit {
  width: 100%;
  margin-top: 10px;
  min-height: 48px;
}
.login-submit {
  justify-content: center;
}
.login-submit svg {
  margin: 0;
  flex-shrink: 0;
}
.access-help {
  text-align: center;
  color: #adaf9e;
  font-size: 0.75rem;
  margin: 24px 0 0;
}
.construction-note {
  border-top: 1px solid var(--border);
  max-width: 382px;
  width: 100%;
  margin-top: 48px;
  padding-top: 21px;
  font-size: 0.69rem;
  letter-spacing: 0.025em;
  color: var(--gold);
}
.construction-note > .status-dot {
  margin: 0 8px 1px 0;
}
.construction-note p {
  font-size: 0.76rem;
  line-height: 1.5;
  letter-spacing: 0;
  color: #a9ac97;
  margin: 9px 0 0;
}

.app-shell {
  max-width: 1280px;
  margin: auto;
  padding: 22px 48px 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.skip-link {
  position: fixed;
  top: 15px;
  left: 20px;
  z-index: 5;
  background: var(--gold);
  color: #181a10;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border-radius: 6px;
}
.skip-link:focus {
  width: auto;
  height: auto;
  max-width: calc(100vw - 40px);
  padding: 12px;
  overflow: visible;
  clip-path: none;
  white-space: normal;
}
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 86px;
  gap: 20px;
}
.site-header > a {
  justify-self: start;
}
.header-brand {
  text-align: center;
}
.header-brand > span {
  font-family: 'PP Hatton', Georgia, serif;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 1.2rem;
}
.header-brand small {
  display: block;
  margin-top: 8px;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #aaad96;
}
.user-menu {
  text-align: right;
  justify-self: end;
  min-width: 0;
}
.user-name {
  display: block;
  font-size: 0.79rem;
  margin-top: 7px;
  margin-bottom: 0;
  max-width: 230px;
  overflow-wrap: anywhere;
  margin-left: auto;
}
.user-menu > div {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  align-items: center;
}
.user-menu .header-actions {
  flex-wrap: wrap;
}
.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: transparent;
  color: var(--gold);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}
.header-action:hover {
  border-color: #a2955f;
}
.role-label,
.logout-button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 11px;
  background: transparent;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 0.59rem;
  letter-spacing: 0.055em;
}
.logout-button {
  min-height: 44px;
  min-width: 44px;
}
.logout-button:hover {
  border-color: #a2955f;
}
.header-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 15px 0 22px;
  color: #9c9c56;
  font-size: 9px;
}
.header-divider:before,
.header-divider:after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border));
}
.header-divider:after {
  transform: rotate(180deg);
}
.environment-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #bab79d;
  font-size: 0.72rem;
  padding: 10px 13px;
  border: 1px solid #a0935533;
  border-radius: 7px;
  background: #a0935508;
  margin-bottom: 38px;
  line-height: 1.5;
}
.environment-banner strong {
  font-weight: 500;
  color: #d6c181;
}
.app-shell > .error-notice {
  margin-bottom: 24px;
}
#main-content {
  flex: 1;
}
#main-content:focus {
  outline: none;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 33px;
}
.page-heading h1 {
  margin-bottom: 12px;
  font-size: clamp(1.65rem, 2.3vw, 2.3rem);
  letter-spacing: -0.025em;
  line-height: 1.3;
}
.page-heading .eyebrow {
  font-size: 0.62rem;
  margin-bottom: 12px;
}
.page-heading > div > p:last-child {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 0;
}
.heading-ornament {
  color: #999456;
  font-size: 35px;
  padding-right: 12px;
}
.modules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 207px;
  padding: 22px;
  border: 1px solid var(--border);
  background: radial-gradient(ellipse at 90% 0%, #68674010, transparent 65%), #1f2116;
  border-radius: 15px;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
.module-card:hover {
  background-color: #292c1c;
  border-color: #c3c26e66;
  transform: translateY(-2px);
}
.module-card--crm {
  background-color: #2a2c1b;
  border-color: #b4ab5a66;
}
.module-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
  margin-bottom: 20px;
}
.module-status {
  color: #c2bea1;
  border: 1px solid #8f906030;
  background: #bdb17608;
  border-radius: 100px;
  padding: 4px 8px;
  font-size: 0.54rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.module-status--foundation {
  color: #d6c181;
  background: #d6c1810d;
}
.module-card h3 {
  font-size: 1.18rem;
  line-height: 1.3;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.module-card > p {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 21px;
}
.module-card__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--gold);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.085em;
  margin-top: auto;
}
.journey-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 36px 0 10px;
  color: #bdbba7;
}
.portal-management-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: 1rem;
}
.portal-management-links > a {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.small-ornament {
  color: #9d975d;
}
.journey-note p {
  font-size: 0.77rem;
  line-height: 1.75;
  margin: 0;
}
.journey-note p > span {
  font-size: 0.72rem;
  color: #a2a68f;
}
@media (min-width: 1550px) {
  .login-panel {
    padding-left: 16%;
    padding-right: 16%;
  }
}
@media (max-width: 1100px) {
  .app-shell {
    padding-right: 30px;
    padding-left: 30px;
  }
  .modules-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .login-story {
    padding-left: 11%;
    padding-right: 9%;
  }
}
@media (max-width: 760px) {
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-story {
    min-height: auto;
    padding: 24px 28px 27px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .login-story__copy {
    padding: 25px 0 0;
  }
  .login-story h1 {
    font-size: 2.4rem;
  }
  .login-story h1 br {
    display: none;
  }
  .login-story__copy > p:last-child,
  .login-story__signature,
  .gold-rule {
    display: none;
  }
  .brand-logo--large {
    height: 75px;
    width: 114px;
  }
  .login-panel {
    padding: 35px 28px;
  }
  .login-card {
    max-width: 440px;
  }
  .login-card > .icon-box {
    display: none;
  }
  .construction-note {
    max-width: 440px;
    margin-top: 30px;
  }
  .app-shell {
    padding: 15px 22px 0;
  }
  .header-brand {
    display: none;
  }
  .site-header {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .user-menu > div {
    flex-wrap: wrap;
  }
  .modules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .environment-banner {
    flex-wrap: wrap;
    margin-bottom: 30px;
    font-size: 0.78rem;
  }
  .field input {
    font-size: 1rem;
  }
  .module-card > p {
    font-size: 0.875rem;
  }
  .module-card__link {
    font-size: 0.72rem;
  }
  .module-status,
  .role-label,
  .logout-button {
    font-size: 0.65rem;
  }
  .site-footer,
  .access-help,
  .construction-note {
    font-size: 0.75rem;
  }
  .environment-banner > span:last-child {
    flex-basis: 100%;
    margin-left: 14px;
  }
  .page-heading {
    margin-bottom: 25px;
  }
  .heading-ornament {
    display: none;
  }
  .planned-panel,
  .foundation-panel {
    padding: 27px;
  }
  .status-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 450px) {
  .modules-grid {
    grid-template-columns: 1fr;
  }
  .module-card {
    min-height: 190px;
  }
  .site-footer {
    flex-direction: column;
    gap: 8px;
  }
  .role-label {
    max-width: 105px;
    padding: 5px 8px;
  }
  .status-grid {
    grid-template-columns: 1fr;
  }
  .journey-note {
    align-items: flex-start;
  }
  .brand-logo {
    width: 95px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .module-card:hover {
    transform: none;
  }
}
