/* ==========================================================================
   Sign-in, first-run setup and the account screens.
   A split page: the firm's crest on navy, the form on cream.
   ========================================================================== */

.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--cream-2);
}

/* ------------------------------------------------------------- left panel */

.auth-brand {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 3rem 3.2rem;
  background:
    radial-gradient(120% 90% at 15% 0%, #17324a 0%, transparent 60%),
    linear-gradient(165deg, #0D1F2D 0%, #0a1822 60%, #0D1F2D 100%);
  color: #cfd8e0;
  overflow: hidden;
}
/* a very quiet gold wash, so the navy is not flat */
.auth-brand::after {
  content: ""; position: absolute; inset: auto -30% -35% -30%; height: 70%;
  background: radial-gradient(closest-side, rgba(201,168,76,.16), transparent 70%);
  pointer-events: none;
}
.auth-brand > * { position: relative; z-index: 1; }

.auth-mark { display: flex; align-items: center; gap: .85rem; }
.auth-mark img { width: 46px; height: 46px; border-radius: 50%; background: #fff; padding: 3px; }
.auth-mark .n {
  font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: #fff;
  line-height: 1.1;
}
.auth-mark .s {
  font-size: .6rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin-top: 2px;
}

.auth-hero { max-width: 30rem; }
.auth-crest {
  width: 132px; height: 132px; object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,.4));
  margin-bottom: 1.6rem;
}
.auth-hero h1 {
  font-family: var(--serif); font-size: 2.6rem; font-weight: 600; color: #fff;
  line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .7rem;
}
.auth-hero h1 em { font-style: normal; color: var(--gold-light); }
.auth-hero p { margin: 0; color: #93a3b1; font-size: .95rem; line-height: 1.65; }

.auth-rule {
  width: 46px; height: 2px; background: var(--gold); margin: 1.5rem 0;
  border-radius: 2px;
}

.auth-foot { font-size: .76rem; color: #6b7b88; line-height: 1.7; }
.auth-foot b { color: #9fb0bd; font-weight: 600; }

/* ------------------------------------------------------------ right panel */

.auth-form-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 2rem;
}
.auth-card { width: 100%; max-width: 25.5rem; }

.auth-card > header { margin-bottom: 1.8rem; }
.auth-card h2 {
  font-family: var(--serif); font-size: 2rem; font-weight: 600;
  color: var(--navy); margin: 0 0 .3rem;
}
.auth-card header p { margin: 0; color: var(--muted); font-size: .9rem; }

.auth-field { margin-bottom: 1rem; }
.auth-field label {
  display: block; font-size: .72rem; font-weight: 650; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: .38rem;
}
.auth-field input {
  width: 100%; padding: .72rem .85rem; font-size: .95rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.auth-field input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.18);
}

/* a reveal toggle that does not shift the field */
.auth-pass { position: relative; }
.auth-pass input { padding-right: 3.1rem; }
.auth-reveal {
  position: absolute; right: .45rem; top: 50%; transform: translateY(-50%);
  border: 0; background: none; cursor: pointer; padding: .35rem .5rem;
  font: inherit; font-size: .72rem; font-weight: 650; letter-spacing: .04em;
  color: var(--muted); text-transform: uppercase; border-radius: 6px;
}
.auth-reveal:hover { color: var(--gold-dim); background: var(--cream); }

.auth-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin: .2rem 0 1.35rem;
}
.auth-row .check { font-size: .85rem; color: var(--ink-soft); }

.auth-submit {
  width: 100%; padding: .8rem 1rem; font-size: .95rem; font-weight: 650;
  border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--navy); background: var(--navy); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  transition: background .15s, transform .08s, box-shadow .15s;
}
.auth-submit:hover { background: var(--navy-700); box-shadow: 0 6px 18px rgba(13,31,45,.22); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit svg { width: 16px; height: 16px; }
.auth-submit:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.auth-hint {
  margin: 1.4rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line-soft);
  font-size: .8rem; color: var(--muted); line-height: 1.6;
}
.auth-hint b { color: var(--ink); }

.auth-flash {
  display: flex; align-items: flex-start; gap: .55rem;
  padding: .7rem .9rem; border-radius: var(--radius-sm);
  font-size: .86rem; line-height: 1.5; margin-bottom: 1.1rem; border: 1px solid;
}
.auth-flash svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; }
.auth-flash-error   { color: var(--danger);  border-color: #e9cfcf; background: #fdf4f4; }
.auth-flash-success { color: var(--success); border-color: #cfe5e0; background: #f2f9f7; }
.auth-flash-info    { color: var(--info);    border-color: #d3dff0; background: #f3f7fd; }

/* password strength meter, setup screen */
.auth-meter { display: flex; gap: 4px; margin-top: .45rem; }
.auth-meter i {
  height: 3px; flex: 1; border-radius: 2px; background: var(--line);
  transition: background .2s;
}
.auth-meter.s1 i:nth-child(1) { background: var(--danger); }
.auth-meter.s2 i:nth-child(-n+2) { background: var(--warn); }
.auth-meter.s3 i:nth-child(-n+3) { background: var(--gold); }
.auth-meter.s4 i { background: var(--success); }
.auth-meter-label { font-size: .74rem; color: var(--muted); margin-top: .3rem; }

.auth-captcha { margin: 0 0 1.1rem; display: flex; justify-content: center; }
.auth-captcha > div { max-width: 100%; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 940px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand {
    padding: 2rem 1.6rem;
    flex-direction: row; align-items: center; justify-content: flex-start; gap: 1rem;
  }
  .auth-brand .auth-hero, .auth-brand .auth-foot { display: none; }
  .auth-form-wrap { padding: 2.2rem 1.4rem 3rem; align-items: flex-start; }
}
@media (max-width: 480px) {
  .auth-card h2 { font-size: 1.7rem; }
  .auth-form-wrap { padding: 1.8rem 1.1rem 2.5rem; }
}

/* ------------------------------------------------------- account screens */

.acct-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 1rem; align-items: start; }
@media (max-width: 900px) { .acct-grid { grid-template-columns: 1fr; } }

.who {
  display: flex; align-items: center; gap: .7rem;
}
.avatar {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--gold-light), var(--gold));
  color: #3c2f0c; font-weight: 700; font-size: .88rem; letter-spacing: .02em;
  border: 1px solid var(--gold-dim);
}
.avatar.is-admin { background: linear-gradient(160deg, #24486a, var(--navy)); color: var(--gold-light); border-color: var(--navy); }
.avatar.lg { width: 54px; height: 54px; flex-basis: 54px; font-size: 1.1rem; }

/* the signed-in block at the foot of the sidebar */
.nav-user {
  display: flex; align-items: center; gap: .6rem;
  padding: .7rem .75rem; margin: 0 .7rem .6rem;
  border-radius: var(--radius-sm); background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.07);
}
.nav-user .avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: .72rem; }
.nav-user .meta { min-width: 0; flex: 1; }
.nav-user .avatar { text-decoration: none; }
.nav-user .nm {
  display: block; text-decoration: none;
  font-size: .82rem; font-weight: 600; color: #e6ecf1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-user .nm:hover { color: var(--gold-light); }
.nav-user .rl { font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.nav-user form { display: flex; }
.nav-user button {
  border: 0; background: none; cursor: pointer; padding: .3rem; border-radius: 6px;
  color: #7d8b98; display: grid; place-items: center;
}
.nav-user button:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-user button svg { width: 15px; height: 15px; }

/* ------------------------------------------------------ sign in with Google */

.gbtn {
  display: flex; align-items: center; justify-content: center; gap: .65rem;
  width: 100%; padding: .72rem 1rem; margin-bottom: 1.15rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font-size: .92rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.gbtn:hover {
  border-color: #cfc7b6; background: var(--cream); color: var(--ink);
  box-shadow: 0 2px 8px rgba(13,31,45,.07);
}
.gbtn svg { width: 18px; height: 18px; flex: 0 0 18px; }

.auth-or {
  display: flex; align-items: center; gap: .8rem;
  margin: 0 0 1.15rem; color: var(--muted); font-size: .74rem;
  letter-spacing: .12em; text-transform: uppercase;
}
.auth-or::before, .auth-or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* a Google profile photo sits on top of the initials, which stay as the
   fallback if the image cannot be fetched */
.avatar { position: relative; overflow: hidden; }
.avatar img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
}
.avatar.has-photo { background: var(--cream-2); border-color: var(--line); }
.avatar.has-photo i { font-style: normal; opacity: 0; }

/* ==========================================================================
   Your account
   ========================================================================== */

.acct-hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius); margin-bottom: 1rem;
  padding: 1.7rem 1.9rem;
  background:
    radial-gradient(130% 120% at 12% 0%, #17324a 0%, transparent 62%),
    linear-gradient(160deg, #0D1F2D 0%, #0a1822 62%, #0D1F2D 100%);
  color: #cfd8e0;
  display: flex; align-items: center; gap: 1.35rem; flex-wrap: wrap;
}
/* the firm's crest, ghosted into the corner */
.acct-hero::after {
  content: ""; position: absolute; right: -34px; top: -46px;
  width: 230px; height: 230px; opacity: .07; pointer-events: none;
  background: url("../img/crest.png") no-repeat center / contain;
}
.acct-hero::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), transparent);
}
.acct-hero > * { position: relative; z-index: 1; }

.acct-face {
  width: 84px; height: 84px; flex: 0 0 84px; border-radius: 50%;
  display: grid; place-items: center; position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--gold-light), var(--gold));
  color: #3c2f0c; font-size: 1.9rem; font-weight: 700; letter-spacing: .01em;
  border: 2px solid rgba(201,168,76,.55);
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
.acct-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.acct-id { flex: 1; min-width: 0; }
.acct-id h1 {
  font-family: var(--serif); font-size: 2rem; font-weight: 600; color: #fff;
  margin: 0 0 .2rem; line-height: 1.1; letter-spacing: -.01em;
}
.acct-id .handle { font-size: .88rem; color: #93a3b1; }
.acct-id .handle b { color: #cfd8e0; font-weight: 600; }
.acct-chips { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .7rem; }
.acct-chip {
  display: inline-flex; align-items: center; gap: .38rem;
  padding: .22rem .62rem; border-radius: 999px;
  font-size: .71rem; font-weight: 650; letter-spacing: .03em;
  border: 1px solid rgba(255,255,255,.16); color: #b9c6d2;
  background: rgba(255,255,255,.05);
}
.acct-chip svg { width: 12px; height: 12px; }
.acct-chip.is-gold { border-color: rgba(201,168,76,.5); color: var(--gold-light);
                     background: rgba(201,168,76,.12); }
.acct-chip.is-green { border-color: rgba(126,208,191,.4); color: #a8e6d8;
                      background: rgba(46,125,111,.16); }

/* the panels below */
.acct-panel .card-head { background: var(--cream-2); }
.acct-panel .card-head svg { color: var(--gold-dim); }

.acct-facts { display: grid; gap: 0; }
.acct-fact {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .62rem 0; border-bottom: 1px solid var(--line-soft);
}
.acct-fact:last-child { border-bottom: 0; }
.acct-fact dt {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 650; margin: 0;
}
.acct-fact dd { margin: 0; font-size: .88rem; color: var(--ink); text-align: right; }
.acct-fact dd .sub { font-size: .74rem; }

.acct-actions { display: grid; gap: .5rem; }

@media (max-width: 640px) {
  .acct-hero { padding: 1.35rem 1.2rem; gap: 1rem; }
  .acct-face { width: 62px; height: 62px; flex-basis: 62px; font-size: 1.4rem; }
  .acct-id h1 { font-size: 1.55rem; }
  .acct-hero::after { display: none; }
}
