/* Shared page shell used by /Account and /Projects. Both are simple
   full-height dark backgrounds with a centred card. Colours reuse the
   CSS custom properties defined in site.css. */

html, body {
  overflow: auto;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
  background: var(--bg);
}

.auth-card {
  background: rgba(20, 26, 33, 0.9);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px 32px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.auth-card h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.auth-sub {
  margin: 0 0 20px;
  color: var(--text-super-light);
  font-size: 13px;
}

.auth-empty {
  margin: 12px 0 20px;
  padding: 12px 14px;
  background: rgba(255, 200, 100, 0.08);
  border-left: 3px solid var(--core-green);
  border-radius: 4px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.auth-current {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: var(--core-green-light);
  color: #2a4413;
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-inline {
  display: inline-flex;
  margin: 0;
}

.auth-link {
  background: none;
  border: none;
  padding: 0;
  color: #567530;
  cursor: pointer;
  text-decoration: underline;
  font: inherit;
}

.auth-link:hover { color: #2a4413; }

.auth-form { margin: 0 0 12px; }

.auth-label {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-super-light);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.auth-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.auth-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: 14px var(--sans);
}

.auth-input:focus {
  outline: none;
  border-color: var(--core-green);
  box-shadow: 0 0 0 2px rgba(110, 149, 62, 0.2);
}

.auth-btn {
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: 600 13px var(--sans);
  cursor: pointer;
  white-space: nowrap;
}

.auth-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.auth-btn.primary {
  background: var(--core-green);
  border-color: var(--core-green);
  color: #fff;
}

.auth-btn.primary:hover  { background: var(--core-green-hover); }
.auth-btn.primary:active { background: var(--core-green-press); }

.auth-btn.danger {
  background: transparent;
  border-color: var(--error);
  color: var(--error);
}

.auth-btn.danger:hover {
  background: rgba(217, 83, 79, 0.12);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-super-light);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 22px 0 16px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---- Projects list ---- */

.project-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
}

.project-toolbar h1 {
  margin: 0;
  flex: 1;
  font-size: 22px;
  font-weight: 600;
}

.project-toolbar .signed-as {
  color: var(--text-super-light);
  font-size: 12px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 0 0 32px;
}

.project-tile {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 120ms, background 120ms;
}

.project-tile:hover {
  border-color: var(--core-green);
  background: rgba(110, 149, 62, 0.06);
}

.project-tile .name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.project-tile .meta {
  color: var(--text-super-light);
  font-size: 12px;
}

.project-tile .actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.project-tile .actions form {
  margin: 0;
}

.project-tile .actions .auth-btn {
  padding: 6px 12px;
  font-size: 12px;
}

.project-empty {
  padding: 26px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-super-light);
  text-align: center;
  margin: 0 0 20px;
}

.new-project-card {
  background: rgba(20, 26, 33, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
}

.new-project-card h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
}

.new-project-card .field {
  margin: 0 0 12px;
}

.new-project-card .field-inline {
  display: flex;
  gap: 10px;
  align-items: center;
}

.new-project-card input[type="file"] {
  color: var(--text);
  font: inherit;
}

.auth-optional {
  color: var(--text-super-light);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}

.auth-hint {
  margin-top: 6px;
  color: var(--text-super-light);
  font-size: 12px;
  line-height: 1.4;
}

/* Full-width sign-in / register submit button — the form has a
   single column, so stretching the CTA reads clearer than the
   inline "input + button" pattern used elsewhere on this page. */
.auth-btn-full {
  display: block;
  width: 100%;
  margin-top: 4px;
}

/* Vertical stack of stacked form fields (Name / Email / Password
   on the register + sign-in pages). Same look as .auth-row but
   grouped so labels sit above their inputs. */
.auth-form .field {
  margin: 0 0 14px;
}

/* Small inline "Create one" / "Sign in" links on the auth pages.
   Uses the CoreGreen accent so the affordance is obvious without
   competing with the primary CTA. */
.auth-alt {
  margin: 0;
  color: var(--text-super-light);
  font-size: 13px;
  text-align: center;
}

.auth-inline-link {
  color: var(--core-green);
  text-decoration: none;
  font-weight: 600;
}

.auth-inline-link:hover {
  color: var(--core-green-hover);
  text-decoration: underline;
}

.error-banner {
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(217, 83, 79, 0.14);
  border-left: 3px solid var(--error);
  color: #ffb7b4;
  font-size: 13px;
  margin: 0 0 16px;
}
