:root {
  color-scheme: light;
  --md-sys-color-primary: #7b1e34;
  --md-sys-color-on-primary: #fff;
  --md-sys-color-primary-container: #f7e5e9;
  --md-sys-color-on-primary-container: #571326;
  --md-sys-color-surface: #fcfaf9;
  --md-sys-color-surface-container: #f4edee;
  --md-sys-color-on-surface: #211b1d;
  --md-sys-color-on-surface-variant: #64595d;
  --md-sys-color-outline: #88787d;
  --md-sys-color-outline-variant: #e1d7da;
  --md-sys-color-error: #9c2531;
  --md-sys-color-error-container: #ffedf0;
  --md-sys-color-success-container: #e8f3ea;
  --md-sys-color-on-success-container: #245332;
  --md-sys-color-secondary: #82601d;
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-full: 9999px;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--md-sys-color-primary); text-underline-offset: 4px; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--md-sys-color-primary); outline-offset: 4px; }
h1:focus, #notice:focus { outline: none; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 2; background: #fff; padding: 16px; }
.skip-link:focus { top: 16px; }
.auth-layout { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(340px, 1fr) minmax(480px, 1.08fr); }
.brand-panel { display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: 48px clamp(32px, 5vw, 80px); background: var(--md-sys-color-surface-container); border-top: 6px solid var(--md-sys-color-primary); }
.brand { display: inline-flex; align-items: center; gap: 16px; align-self: flex-start; color: inherit; text-decoration: none; }
.brand img { object-fit: contain; }
.brand strong { display: block; font-size: 20px; line-height: 1.4; letter-spacing: -.4px; }
.brand small { display: block; color: var(--md-sys-color-on-surface-variant); font-size: 13px; margin-top: 2px; }
.brand-story { max-width: 450px; padding: 24px 0 48px; }
.eyebrow { color: var(--md-sys-color-secondary); text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: 1.8px; margin: 0 0 16px; line-height: 1.5; }
.brand-story h2 { font-size: clamp(36px, 3.5vw, 54px); line-height: 1.14; font-weight: 600; letter-spacing: -1.9px; margin: 0 0 24px; }
.brand-story > p:not(.eyebrow) { color: var(--md-sys-color-on-surface-variant); font-size: 16px; line-height: 1.7; }
.brand-rule { display: block; width: 48px; height: 3px; background: var(--md-sys-color-secondary); margin: 40px 0 24px; }
.brand-story .brand-note { font-size: 13px !important; line-height: 1.8; }
.back-link { font-size: 13px; font-weight: 600; width: fit-content; padding: 12px 0; }
.form-panel { display: flex; flex-direction: column; min-width: 0; padding: 64px 48px 24px; }
.auth-card { width: 100%; max-width: 400px; margin: auto; padding: 24px 0 48px; }
h1 { font-size: 32px; line-height: 1.2; font-weight: 600; letter-spacing: -1px; margin: 0 0 16px; overflow-wrap: anywhere; }
.intro { color: var(--md-sys-color-on-surface-variant); line-height: 1.65; margin: 0 0 32px; font-size: 15px; }
form { display: flex; flex-direction: column; }
form > label:not(.checkbox-label) { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
form > input { border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-small); min-height: 56px; width: 100%; min-width: 0; padding: 14px 16px; background: transparent; color: inherit; margin-bottom: 24px; font-size: 16px; }
form > input:focus { outline: 2px solid var(--md-sys-color-primary); outline-offset: -2px; border-color: var(--md-sys-color-primary); }
form > input:disabled { opacity: .65; }
.checkbox-label { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--md-sys-color-on-surface-variant); min-height: 48px; width: fit-content; cursor: pointer; margin: -16px 0 16px; }
.checkbox-label input { width: 18px; height: 18px; margin: 0; accent-color: var(--md-sys-color-primary); }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 12px 24px; border-radius: var(--md-sys-shape-corner-full); border: 1px solid transparent; font-size: 14px; line-height: 1.5; font-weight: 600; cursor: pointer; transition: background .15s ease; }
.primary { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.primary:hover:enabled { background: var(--md-sys-color-on-primary-container); }
.secondary { color: var(--md-sys-color-primary); background: transparent; border-color: var(--md-sys-color-outline); }
.secondary:hover:enabled { background: var(--md-sys-color-primary-container); }
.button:disabled, .text-button:disabled { opacity: .55; cursor: wait; }
.button + .button { margin-top: 12px; }
.help { font-size: 13px; line-height: 1.7; text-align: center; color: var(--md-sys-color-on-surface-variant); margin: 24px 0 0; }
.field-hint { margin: -16px 0 24px; font-size: 12px; line-height: 1.6; color: var(--md-sys-color-on-surface-variant); }
.account-tag { font-size: 13px; background: var(--md-sys-color-surface-container); border-radius: var(--md-sys-shape-corner-small); padding: 12px 16px; margin: -12px 0 24px; overflow-wrap: anywhere; }
.text-button { display: block; min-height: 48px; margin: 12px auto 0; padding: 12px 16px; border: 0; border-radius: var(--md-sys-shape-corner-full); background: transparent; color: var(--md-sys-color-primary); font-weight: 600; font-size: 13px; cursor: pointer; }
.text-button:hover:enabled { background: var(--md-sys-color-primary-container); }
.notice { border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-small); padding: 16px; margin: 0 0 24px; color: var(--md-sys-color-on-surface); background: var(--md-sys-color-surface-container); font-size: 14px; line-height: 1.65; }
.notice[data-tone="error"] { background: var(--md-sys-color-error-container); color: var(--md-sys-color-error); border-color: var(--md-sys-color-error); }
.notice[data-tone="success"] { background: var(--md-sys-color-success-container); color: var(--md-sys-color-on-success-container); }
.preparation-note { background: var(--md-sys-color-surface-container); border-radius: var(--md-sys-shape-corner-large); padding: 24px; margin-bottom: 32px; }
.status-label { display: inline-block; font-size: 11px; font-weight: 600; color: var(--md-sys-color-primary); background: var(--md-sys-color-primary-container); border-radius: var(--md-sys-shape-corner-full); padding: 6px 12px; }
.preparation-note h2 { font-size: 20px; font-weight: 600; line-height: 1.4; margin: 16px 0 8px; }
.preparation-note p { color: var(--md-sys-color-on-surface-variant); font-size: 14px; line-height: 1.7; margin: 0; }
.account-actions { display: flex; flex-direction: column; }
footer { display: flex; justify-content: space-between; gap: 16px; color: var(--md-sys-color-on-surface-variant); font-size: 11px; padding-top: 24px; border-top: 1px solid var(--md-sys-color-outline-variant); }
footer div { display: flex; gap: 20px; }
footer a { color: inherit; }
#loading { font-size: 14px; color: var(--md-sys-color-on-surface-variant); }
.loading-dot { display: inline-block; height: 8px; width: 8px; border-radius: 50%; background: var(--md-sys-color-primary); margin-right: 8px; }
@media (min-width: 1500px) { .auth-layout { max-width: 1680px; margin: auto; border-inline: 1px solid var(--md-sys-color-outline-variant); } }
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: minmax(280px, .9fr) minmax(380px, 1.1fr); }
  .brand-panel { padding-inline: 32px; }
  .brand-story h2 { font-size: 36px; }
  .form-panel { padding-inline: 32px; }
}
@media (max-width: 680px) {
  .auth-layout { display: block; }
  .brand-panel { padding: 20px 24px; gap: 0; border-top-width: 4px; border-bottom: 1px solid var(--md-sys-color-outline-variant); }
  .brand img { width: 40px; height: 40px; }
  .brand { gap: 12px; }
  .brand strong { font-size: 18px; }
  .brand small { font-size: 12px; }
  .brand-story, .back-link { display: none; }
  .form-panel { min-height: calc(100dvh - 85px); padding: 32px 24px 24px; }
  .auth-card { margin-block: auto; padding: 16px 0 40px; }
  h1 { font-size: 30px; }
  footer { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Photo treatment and readable type match the full PWA workspace. */
:root {
  --besakih-color-on-photo: #fff;
  --besakih-color-photo-muted: #f5eef0;
  --besakih-photo-scrim: linear-gradient(180deg, #17141577 0%, #17141522 35%, #171415e6 100%);
}
body { font-size: 1rem; line-height: 1.6; }
h1 { font-size: 2.25rem; font-weight: 700; }
.intro { font-size: 1rem; }
form > label:not(.checkbox-label) { font-size: .9375rem; font-weight: 600; }
.checkbox-label, .help, .account-tag, .text-button { font-size: .9375rem; }
.button { font-size: 1rem; font-weight: 650; min-height: 52px; }
.eyebrow, .field-hint, footer { font-size: .875rem; }
.notice, .preparation-note p { font-size: 1rem; }
.preparation-note h2 { font-size: 1.375rem; font-weight: 700; }
.brand-panel-photo { position: relative; isolation: isolate; overflow: hidden; color: var(--besakih-color-on-photo); gap: 24px; }
.brand-panel-photo::before { content: ''; position: absolute; inset: 0; background: var(--besakih-photo-scrim); z-index: -1; }
.brand-panel-photo .brand small, .brand-panel-photo .brand-story > p:not(.eyebrow) { color: var(--besakih-color-photo-muted); }
.brand-panel-photo .eyebrow, .brand-panel-photo .back-link { color: var(--besakih-color-on-photo); }
.brand-panel-photo .brand strong { font-size: 1.5rem; font-weight: 700; }
.brand-panel-photo .brand-story { margin-top: auto; padding-bottom: 0; }
.brand-panel-photo .brand-story h2 { font-weight: 700; }
.brand-panel-photo .brand-story .brand-note { font-size: .9375rem !important; }
.brand-panel-photo .back-link { font-size: .9375rem; }
.brand-panel-photo .brand-rule { background: var(--besakih-color-on-photo); opacity: .7; margin-block: 24px 16px; }
footer { flex-wrap: wrap; }
@media (max-width: 680px) {
  .brand-panel-photo { min-height: 320px; padding: 24px; gap: 20px; }
  .brand-panel-photo .brand-story { display: block; padding: 0; }
  .brand-panel-photo .brand-story h2 { font-size: 1.875rem; line-height: 1.2; letter-spacing: -.7px; margin-bottom: 12px; }
  .brand-panel-photo .brand-story .eyebrow, .brand-panel-photo .brand-story .brand-note, .brand-panel-photo .brand-rule { display: none; }
  .brand-panel-photo .brand-story > p:not(.eyebrow) { font-size: .9375rem; margin: 0; }
  .form-panel { min-height: 0; padding-top: 24px; }
  h1 { font-size: 2rem; }
}
