/* TheCareerPaths — shared styles for the static portals
   Same token system as the Next.js build: paper background, deep-ink
   text, marigold accent, a verification-stamp signature motif. */

:root {
  --paper: #f7f8fa;
  --ink: #1b2a4a;
  --ink-light: #33456b;
  --marigold: #e8871e;
  --marigold-light: #f4a94d;
  --verified: #2f6f4e;
  --rule: #c9cdd6;
  --danger-bg: #fef2f2;
  --danger-text: #b91c1c;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 500;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}

/* ── Layout: split-screen auth shell ─────────────────────────── */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 880px) {
  .auth-shell {
    grid-template-columns: 1fr 1fr;
  }
}

.auth-shell__brand {
  display: none;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  border-right: 1px solid var(--rule);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 27px,
    rgba(201, 205, 214, 0.5) 28px
  );
  overflow: hidden;
}

@media (min-width: 880px) {
  .auth-shell__brand {
    display: flex;
  }
}

.auth-shell__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--marigold);
  margin-bottom: 0.75rem;
}

.auth-shell__heading {
  font-size: 2.25rem;
  line-height: 1.2;
  max-width: 22rem;
}

.auth-shell__sub {
  margin-top: 1rem;
  color: rgba(27, 42, 74, 0.7);
  max-width: 22rem;
}

.auth-shell__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.auth-shell__footer p {
  max-width: 14rem;
  font-size: 0.75rem;
  color: rgba(27, 42, 74, 0.5);
}

.auth-shell__form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-shell__form-inner {
  width: 100%;
  max-width: 24rem;
}

.mobile-brand {
  margin-bottom: 2rem;
}

@media (min-width: 880px) {
  .mobile-brand {
    display: none;
  }
}

/* ── Form elements ────────────────────────────────────────────── */

.field {
  margin-bottom: 1.25rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field--full {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(27, 42, 74, 0.6);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  height: 2.75rem;
  border: none;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--ink);
  padding: 0.5rem 0;
}

textarea {
  height: auto;
  min-height: 5rem;
  padding-top: 0.5rem;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.link-muted {
  font-size: 0.75rem;
  color: rgba(27, 42, 74, 0.5);
  text-decoration: none;
}

.link-muted:hover {
  color: var(--ink);
}

/* ── Buttons ──────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 10px;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover:not(:disabled) {
  background: var(--ink-light);
}

.btn--accent {
  background: var(--marigold);
  color: var(--ink);
}
.btn--accent:hover:not(:disabled) {
  background: var(--marigold-light);
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink);
}
.btn--outline:hover:not(:disabled) {
  border-color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover:not(:disabled) {
  background: rgba(27, 42, 74, 0.05);
}

.btn--full {
  width: 100%;
}

.btn--sm {
  height: 2.25rem;
  font-size: 0.8rem;
  padding: 0 0.9rem;
}

/* ── Misc components ──────────────────────────────────────────── */

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.divider span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: rgba(27, 42, 74, 0.4);
}

.alert {
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.alert--error {
  background: var(--danger-bg);
  color: var(--danger-text);
}
.alert--success {
  background: #ecfdf3;
  color: var(--verified);
}

.role-toggle {
  display: flex;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2rem;
}
.role-toggle a {
  flex: 1;
  text-align: center;
  padding-bottom: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: rgba(27, 42, 74, 0.4);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.role-toggle a.active {
  color: var(--ink);
  border-bottom-color: var(--marigold);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.75rem;
}

.chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 0.85rem;
  font-family: var(--font-body);
  color: var(--ink);
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
}
.chip:hover {
  background: rgba(27, 42, 74, 0.05);
}
.chip.active {
  background: var(--ink);
  color: var(--paper);
}
.chip__box {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  border: 1px solid var(--rule);
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chip.active .chip__box {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

/* ── App shell (dashboards) ──────────────────────────────────── */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--rule);
}

.app-main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card {
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.25rem;
}

.stat-card__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(27, 42, 74, 0.5);
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-top: 0.4rem;
  font-variant-numeric: tabular-nums;
}

.table-card {
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rule);
}

th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(27, 42, 74, 0.5);
  background: rgba(27, 42, 74, 0.02);
}

tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.badge--pending {
  background: #fef3c7;
  color: #92400e;
}
.badge--approved {
  background: #ecfdf3;
  color: var(--verified);
}
.badge--rejected,
.badge--blocked {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(27, 42, 74, 0.5);
}

.loading {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(27, 42, 74, 0.5);
}
