/* Login pages: white paper, black ink lines. Student = split layout, admin = single restricted card. */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }

/* ----- Left: ruled-paper showcase ----- */
.showcase {
  position: relative; overflow: hidden; color: var(--text);
  padding: 40px 56px; display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 31px, rgba(20, 20, 20, .55) 31px, rgba(20, 20, 20, .55) 32px, transparent 32px),  /* margin rule */
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(20, 20, 20, .07) 31px 32px);                           /* ruled lines */
}
.showcase::before { /* fade the ruling toward the bottom so it reads as texture, not a notebook */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 40%, color-mix(in srgb, var(--paper) 85%, transparent) 100%);
}
.showcase > * { position: relative; z-index: 1; }
.showcase-body { max-width: 470px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); margin-bottom: 22px; }
.showcase h1 {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(42px, 4.4vw, 64px);
  line-height: 1.0; letter-spacing: -.02em; margin: 0 0 20px;
}
.showcase h1 em { position: relative; white-space: nowrap; }
.showcase h1 em::after { /* hand-inked underline */
  content: ""; position: absolute; left: -2%; right: -2%; bottom: .04em; height: .14em; z-index: -1;
  background: var(--accent); opacity: .22; border-radius: 2px; transform: rotate(-1.2deg);
}
.showcase p { color: var(--text-2); font-size: 16px; margin: 0 0 28px; max-width: 420px; }
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.points li { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.points li::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2 6.6 10.8 12 5.4' fill='none' stroke='%23141414' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* The floating page: a hint of the product */
.page-card {
  position: absolute; z-index: 1; right: -30px; bottom: 7%; transform: rotate(-5deg);
  width: 210px; aspect-ratio: 1 / 1.414; background: #fff; border: 1px solid var(--line); border-radius: 4px;
  padding: 24px 20px; box-shadow: 7px 7px 0 var(--line); overflow: hidden;
}
.page-card .pc-title { font-family: "Times New Roman", serif; font-weight: 700; font-size: 10px; text-align: center; margin-bottom: 12px; }
.page-card .pc-line { height: 4px; border-radius: 2px; background: #e4e3de; margin: 7px 0; }
.page-card .pc-line.s { width: 70%; }
.page-card .pc-chart { display: flex; align-items: flex-end; gap: 6px; height: 58px; margin: 14px 0; padding: 0 10px; border-bottom: 1px solid var(--line); }
.page-card .pc-chart span { flex: 1; background: var(--line); }
.page-card .pc-chart span.a { background: var(--accent); }
.page-card .pc-mark {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font-family: var(--font-display); font-style: italic; font-size: 32px; color: rgba(20, 20, 20, .07); transform: rotate(-30deg);
}
.showcase-foot { font-size: 12px; color: var(--text-2); }
.showcase .brand-logo { height: 52px; }
.admin-card .brand-logo { height: 40px; }

/* ----- Right: form ----- */
.panel { display: flex; flex-direction: column; padding: 32px 24px; }
.panel-top { display: flex; justify-content: flex-end; }
.panel-top .brand { display: none; margin-right: auto; }
.form-wrap { width: 100%; max-width: 380px; margin: auto; padding: 32px 0; }
.form-wrap h2 { font-size: 30px; font-weight: 600; letter-spacing: -.025em; margin: 0 0 6px; }
.form-wrap .lede { color: var(--text-2); margin: 0 0 28px; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 24px; position: relative; }
.tabs button { position: relative; z-index: 1; height: 38px; border: 0; background: transparent; border-radius: 999px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: color .25s; }
.tabs button[aria-selected="true"] { color: #fff; }
.tabs .pill { position: absolute; top: 3px; left: 3px; bottom: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--text); transition: transform .3s var(--ease); }
.tabs[data-mode="signup"] .pill { transform: translateX(100%); }

.stack { display: grid; gap: 16px; }
.google-btn svg { width: 18px; height: 18px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; height: 34px; padding: 0 10px; border: 0; background: transparent; color: var(--text-2); font-size: 13px; border-radius: var(--radius-sm); cursor: pointer; }
.pw-toggle:hover { background: var(--surface-2); color: var(--text); }
.link-btn { border: 0; background: none; color: var(--text); font-size: 13px; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--text-3); }
.link-btn:hover { text-decoration-color: var(--text); }
.only-signup { display: none; }
[data-mode="signup"] .only-signup { display: grid; }
[data-mode="signup"] .only-signin { display: none; }
.fine { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 4px; }
.fine a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.ref-chip { display: none; align-items: center; gap: 8px; font-size: 13px; padding: 8px 12px; border-radius: var(--radius); border: 1px dashed var(--line); background: var(--surface); }
.ref-chip.show { display: flex; }

.panel-foot { text-align: center; font-size: 12px; color: var(--text-3); }
.panel-foot a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1240px), (max-height: 760px) {
  .page-card { display: none; }
}

@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .showcase { display: none; }
  .panel { min-height: 100vh; padding: 20px 16px; }
  .panel-top .brand { display: inline-flex; }
}

/* ----- Admin ----- */
.admin-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.admin-card {
  width: 100%; max-width: 400px; padding: 36px 32px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-ink);
}
.admin-card .brand { margin-bottom: 28px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); margin-bottom: 14px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #e0a100; }
.admin-card h2 { font-size: 26px; font-weight: 600; letter-spacing: -.025em; margin: 0 0 6px; }
.admin-card .lede { color: var(--text-2); margin: 0 0 24px; font-size: 14px; }

@media (max-width: 480px) {
  .admin-card { padding: 28px 20px; box-shadow: 3px 3px 0 var(--line); }
}

/* Google-only sign-in */
.btn-ink { background: var(--text); color: #fff; border: 1px solid var(--text); }
.btn-ink:hover { box-shadow: 4px 4px 0 var(--accent); transform: translate(-2px, -2px); }
.btn-lg { height: 54px; font-size: 16px; }
.g-badge { width: 28px; height: 28px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.g-badge svg { width: 18px; height: 18px; }
.g-why { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; font-size: 14px; color: var(--text-2); }
.g-why li::before { content: "✓  "; color: var(--text); }

/* Phone verification (uses the admin card shell, in student colours) */
.phone-card { box-shadow: 6px 6px 0 var(--line); }
.phone-card .brand { margin-bottom: 22px; }
.phone-card .brand-logo { height: 40px; }
.phone-row { display: flex; gap: 8px; }
.phone-row .cc { display: grid; place-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); font-weight: 500; }
.phone-row .input { flex: 1; letter-spacing: .04em; }
.code-input { font-size: 22px; letter-spacing: .5em; text-align: center; }
