:root {
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --muted: #86868b;
  --paper: #fbfbfd;
  --panel: #ffffff;
  --line: #d2d2d7;
  --blue: #0066cc;
  --blue-hover: #0077ed;
  --blue-soft: #a8c7fa;
  --danger: #d70015;
  --ok: #1f7a4c;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.06);
  --radius-card: 32px;
  --radius-control: 12px;
  /* Inter ≈ SF Pro Text metrics used on the reference page */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: var(--font-body);
  --theme-color-systemBlack: #1d1d1f;
  --teal: #0f6b5c;
  --teal-deep: #0a4a40;
  --sand: #e8c07a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47059;
  letter-spacing: -0.022em;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--blue-hover);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.is-hidden {
  display: none !important;
}

/* ========== AT Login (screenshot-style) ========== */

.at-auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  background: #fbfbfd;
  color: #1d1d1f;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.022em;
}

.at-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: rgba(251, 251, 253, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.at-topbar__brand {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.021em;
  color: #1d1d1f;
  text-decoration: none;
}

.at-topbar__brand:hover {
  text-decoration: none;
  color: #1d1d1f;
  opacity: 0.8;
}

.at-topbar__menu {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-content: center;
  gap: 3px;
  cursor: pointer;
  padding: 0;
}

.at-topbar__menu span {
  display: block;
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: #1d1d1f;
}

.at-stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 76px 16px 40px;
}

.at-card {
    width: min(100%, 640px);
    background: #fff;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
    padding: 48px 110px 32px;
    animation: at-rise 420ms ease-out both;
}
.privacy-icon {
    margin: 10px 0;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 50%;
    background-image: url(/img/privacy-icon.png);
    background-image: url(/img/privacy.svg);
    width: 37px;
    height: 29px;
    -webkit-mask-image: url(/img/privacy.svg);
    mask-image: url(/img/privacy.svg);
    -webkit-mask-size: cover;
    mask-size: cover;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}
.at-logo {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 20px;
}

.at-logo__ring {
  display: block;
  width: 160px;
  height: 160px;
}

.at-logo__mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.at-logo__mark span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1d1d1f;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.at-title {
    font-family: SF Pro Display, Helvetica Neue, sans-serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 36px;
    color: var(--theme-color-labelPrimary);
    -webkit-margin-before: 20px;
    margin-block-start: 20px;
    text-align: center;
}

.at-status {
  margin: -12px 0 18px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(31, 122, 76, 0.1);
  color: var(--ok);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.016em;
  text-align: center;
}

.at-form {
  display: grid;
  gap: 0;
}

.at-field {
  margin-bottom: 0;
}

.at-input {
  width: 100%;
  height: 3.3rem;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  padding: 1.1rem 1rem 0.9rem;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.022em;
  line-height: 1.23536;
  background: #fff;
  color: #1d1d1f;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.at-input::placeholder {
  color: #86868b;
  font-weight: 400;
  opacity: 1;
}

.at-input:focus {
  outline: none;
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0, 125, 250, 0.5);
}

.at-create {
  margin: 12px 0 0;
}

.at-link {
  color: #0066cc;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.016em;
  line-height: 1.42859;
  text-decoration: none;
}

.at-link:hover {
  color: #0077ed;
  text-decoration: underline;
}

.at-link--inline {
  font-size: inherit;
  letter-spacing: inherit;
  line-height: inherit;
}

.at-privacy {
  /*display: grid;*/
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  margin: 22px 0 36px;
}

.at-privacy__icon {
  margin-top: 1px;
  flex-shrink: 0;
}

.at-privacy__text {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.3333733333;
    font-weight: 400;
    letter-spacing: -.01em;
    font-family: SF Pro Text, SF Pro Icons, Helvetica Neue, Helvetica, Arial, sans-serif;
}

.at-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.at-actions--single {
  grid-template-columns: auto 1fr;
  margin-top: 22px;
}

.at-actions__secondary {
  display: grid;
  gap: 6px;
  justify-items: stretch;
}
.shared-icon {
    font-family: shared-icons;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    font-weight: 400;
    font-style: normal;
    speak: none;
    text-decoration: inherit;
    text-transform: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.iphone-icon {
    background-image: url(/img/iphone-icon-6.svg);
    background-size: inherit;
    background-repeat: no-repeat;
    background-size: contain;
    height: 15px;
    width: 15px;
}
.iphone-icon {
    background-image: url(/img/iphone-icon-dark.svg);
}
.at-btn {
  height: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.016em;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: filter 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.at-btn__icon {
  flex-shrink: 0;
}

.at-btn:hover:not(:disabled) {
  filter: brightness(1.05);
}

.at-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.at-btn--continue {
  background: #0071e3;
  color: #fff;
  width: 100%;
}

.at-btn--continue:disabled {
  background: #a8c7fa;
  color: #fff;
  cursor: default;
  opacity: 1;
  filter: none;
}

.at-btn--dark {
  width: 100%;
  background: #1d1d1f;
  color: #fff;
  padding: 0 12px;
  font-size: 12px;
  letter-spacing: -0.01em;
}
    .at-btn--dark:disabled {
        cursor: default;
        background: #1d1d1f;
        color: #fff;
        opacity:0.42;
    }

    .at-btn--ghost {
        background: #e8e8ed;
        color: #1d1d1f;
        min-width: 88px;
    }

.at-footnote {
  margin: 0;
  padding: 0 2px;
  color: #86868b;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: -0.008em;
  line-height: 1.3;
  text-align: center;
}

.at-account-chip {
  margin: 0 0 16px;
  text-align: center;
  color: #6e6e73;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.016em;
}

.at-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  color: #6e6e73;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.016em;
}

.at-validation,
.at-field-error {
  color: var(--danger);
  font-size: 12px;
  letter-spacing: -0.01em;
}

.at-validation ul {
  margin: 0 0 12px;
  padding-left: 1.1rem;
}

.at-field-error:empty {
  display: none;
}

/* Login page footer (additive only) */
.at-page-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  width: 100%;
  margin: 0;
  padding: 18px 28px max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid #d2d2d7;
  background: #f5f5f7;
  box-sizing: border-box;
}

.at-page-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.at-page-footer__links a {
  color: #6e6e73;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.33337;
  text-decoration: none;
}

.at-page-footer__links a:hover {
  text-decoration: underline;
  color: #1d1d1f;
}

.at-page-footer__sep {
  display: inline-block;
  width: 1px;
  height: 10px;
  margin: 0 12px;
  background: #d2d2d7;
  vertical-align: middle;
}

.at-page-footer__copy {
  margin: 0;
  color: #6e6e73;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.33337;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .at-page-footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 16px 20px max(16px, env(safe-area-inset-bottom));
    gap: 10px;
  }

  .at-page-footer__copy {
    white-space: normal;
  }
}

@keyframes at-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Desktop styles above stay unchanged. Mobile / narrow viewports only: */

@media (max-width: 734px) {
  .at-stage {
    padding: 68px 16px 32px;
  }

  .at-card {
    width: 100%;
    max-width: 100%;
    padding: 40px 48px 28px;
  }
}

@media (max-width: 560px) {
  .at-auth-body {
    font-size: 16px;
  }

  .at-topbar {
    height: 48px;
    padding: 0 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .at-topbar__brand svg,
  .at-topbar__brand .apple-icloud-logo {
    height: 31px;
    width: auto;
    display: block;
  }

    .at-stage {
        align-items: flex-start;
        justify-content: flex-start;
        min-height: 100dvh;
        padding: 56px max(12px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-right));
        padding-right: 0;
        padding-left: 0;
    }

  .at-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 28px 57px 24px;
    border-radius: 0px;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
  }
    .at-link {
        display: block;
    }

    .at-logo {
        width: 160px;
        height: 160px;
        margin: 0 auto 12px;
    }

  .at-logo svg,
  .at-logo .icon,
  .at-logo__ring {
    width: 100%;
    height: 100%;
    display: block;
  }

    .at-title {
        font-size: 32px;
        font-weight: 600;
        line-height: 36px;
        color: rgba(0, 0, 0, 0.88);
        -webkit-margin-before: 20px;
        margin-block-start: 20px;
        text-align: center;
        font-family: system-ui, Helvetica Neue, sans-serif;
        padding: 0 50px;
    }
  }

  .at-input {
    height: 3.1rem;
    font-size: 16px;
    padding: 0.95rem 0.9rem 0.8rem;
  }

  .at-privacy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 18px 0 28px;
  }

  .privacy-icon {
    margin: 4px 0 0;
  }

  .at-privacy__text {
    margin-top: 8px;
    width: 100%;
  }

  .at-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .at-actions__secondary {
    width: 100%;
  }

  .at-btn {
    width: 100%;
    min-height: 40px;
    height: 40px;
  }

  .at-btn--dark {
    font-size: 14px;
    padding: 0 14px;
  }

  .at-footnote {
    text-align: center;
    font-size: 11px;
  }

  .at-actions--single {
    grid-template-columns: 1fr 1.35fr;
    gap: 10px;
  }

  .at-actions--single .at-btn {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .at-card {
    padding: 24px 14px 20px;
    border-radius: 16px;
  }

  .at-logo {
    width: 96px;
    height: 96px;
  }

  .at-title {
    font-size: 22px;
    line-height: 26px;
  }

  .at-actions--single {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 700px) and (max-width: 560px) {
  .at-stage {
    align-items: flex-start;
    padding-top: 52px;
  }

  .at-logo {
    width: 88px;
    height: 88px;
    margin-bottom: 8px;
  }

  .at-title {
    font-size: 22px;
    line-height: 26px;
    margin-block-start: 8px;
  }

  .at-privacy {
    margin: 14px 0 20px;
  }
}
/* ========== Shared / dashboard leftovers ========== */

.brand {
  margin: 0;
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  color: var(--teal-deep);
}

.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(232, 192, 122, 0.28), transparent 55%),
    radial-gradient(900px 500px at 90% 80%, rgba(15, 107, 92, 0.18), transparent 50%),
    linear-gradient(160deg, #eef5f1 0%, #dfece6 45%, #c9ddd4 100%);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #f7fbf9;
  background:
    linear-gradient(145deg, rgba(10, 74, 64, 0.92), rgba(19, 36, 31, 0.88)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-opacity='0.08' d='M0 80h160M80 0v160'/%3E%3C/svg%3E");
  background-size: cover, 80px 80px;
}

.auth-visual__glow {
  position: absolute;
  inset: auto -20% -30% auto;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(232, 192, 122, 0.45), transparent 65%);
}

.auth-visual__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to top, black, transparent 80%);
}

.auth-visual__mark {
  position: relative;
  margin: 0;
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.auth-visual__tagline {
  position: relative;
  margin: 1rem 0 0;
  max-width: 18ch;
  font-size: 1.2rem;
  opacity: 0.9;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}

.auth-panel__header h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 650;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0.6rem 0 0;
  color: #3d534c;
  max-width: 36ch;
}

.auth-form {
  margin-top: 1.75rem;
  display: grid;
  gap: 1rem;
  max-width: 26rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
}

.field input {
  width: 100%;
  border: 1px solid #d5e0da;
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  background: #fff;
  color: #13241f;
}

.field input:focus {
  outline: none;
  border-color: #0f6b5c;
  box-shadow: 0 0 0 3px rgba(15, 107, 92, 0.18);
}

.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #3d534c;
  font-size: 0.95rem;
}

.btn-primary {
  margin-top: 0.35rem;
  border: 0;
  border-radius: 10px;
  padding: 0.95rem 1.1rem;
  background: linear-gradient(180deg, #14806e, #0a4a40);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn-ghost {
  border: 1px solid #d5e0da;
  background: transparent;
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: #13241f;
}

.auth-footer {
  margin-top: 1.5rem;
  color: #3d534c;
}

.status-banner {
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: rgba(31, 122, 76, 0.12);
  color: var(--ok);
  max-width: 26rem;
}

.validation-summary,
.field-error {
  color: var(--danger);
  font-size: 0.88rem;
}

.validation-summary ul {
  margin: 0;
  padding-left: 1.1rem;
}

.dash-body {
  min-height: 100vh;
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(15, 107, 92, 0.12), transparent 60%),
    linear-gradient(180deg, #f7faf8, #e8f0eb);
}

.dash-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid #d5e0da;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
}

.dash-top__brand {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.dash-top__sub {
  color: #3d534c;
  font-size: 0.9rem;
}

.dash-top__user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dash-top__user strong {
  display: block;
}

.dash-top__user span {
  color: #3d534c;
  font-size: 0.85rem;
}

.dash-main {
  padding: clamp(1.5rem, 4vw, 2.75rem);
}

.dash-intro h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
}

.dash-intro p {
  margin: 0.6rem 0 0;
  color: #3d534c;
  max-width: 58ch;
}

.audit-table-wrap {
  margin-top: 1.75rem;
  overflow: auto;
  border: 1px solid #d5e0da;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(19, 36, 31, 0.14);
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.audit-table th,
.audit-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #d5e0da;
  font-size: 0.92rem;
  white-space: nowrap;
}

.audit-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #3d534c;
  background: #f4f8f6;
}

.audit-table tr:last-child td {
  border-bottom: 0;
}

.empty {
  text-align: center !important;
  color: #3d534c;
  padding: 2rem !important;
}

.pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}

.pill--ok {
  background: rgba(31, 122, 76, 0.12);
  color: var(--ok);
}

.pill--fail {
  background: rgba(155, 44, 44, 0.12);
  color: var(--danger);
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 34vh;
    padding: 2rem;
  }

  .dash-top {
    flex-direction: column;
    align-items: flex-start;
  }
}
