/* ============================================================
   Malameran — app surfaces (auth, project intake, dashboard)
   Loaded after styles.css, which owns the tokens and shared UI.
   ============================================================ */

/* ---------- auth: split screen ------------------------------ */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.02fr 1fr;
}

.auth-brand {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(600px 420px at 20% 10%, rgba(21, 94, 239, .55) 0, transparent 70%),
    linear-gradient(160deg, #081A31, #0D3270 60%, #123C86);
  color: #C8D5E8;
  padding: 44px 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
}
.auth-brand::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -140px;
  width: 420px; height: 420px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
}
.auth-brand .brand { color: #fff; position: relative; z-index: 1; }
.auth-brand .brand-mark { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); }

.auth-pitch { position: relative; z-index: 1; max-width: 460px; }
.auth-pitch h2 { color: #fff; font-size: clamp(28px, 3vw, 40px); margin-top: 18px; }
.auth-pitch > p { margin-top: 16px; font-size: 16.5px; }
.auth-points { margin-top: 32px; display: grid; gap: 12px; }
.auth-points span {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}
.auth-points span::before {
  content: "";
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/13px no-repeat;
}
.auth-foot { position: relative; z-index: 1; font-size: 13.5px; color: #8FA6C4; }

.auth-main {
  display: grid;
  place-items: center;
  padding: 48px 24px;
  background: var(--white);
}
.auth-card { width: min(430px, 100%); }
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 26px;
}
.auth-back:hover { color: var(--blue); }
.auth-card h1 { font-size: clamp(28px, 3.4vw, 34px); margin-top: 0; }
.auth-card > p.auth-sub { margin-top: 10px; font-size: 15.5px; }
.auth-form { display: grid; gap: 16px; margin-top: 28px; }
.auth-form .btn { margin-top: 4px; }
.auth-alt {
  margin-top: 24px;
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
}
.auth-alt a { color: var(--blue); font-weight: 700; }
.auth-alt a:hover { text-decoration: underline; }

/* The prototype stores accounts in this browser only — say so plainly
   rather than implying a real account system. */
.auth-disclaimer {
  margin-top: 26px;
  padding: 12px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* auth pages have no site header, so the brand panel collapses first */
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; min-height: 0; }
  .auth-brand { padding: 32px 24px 36px; gap: 28px; }
  .auth-brand::after { display: none; }
  .auth-pitch { max-width: none; }
  .auth-points, .auth-foot { display: none; }
  .auth-pitch h2 { font-size: 26px; }
  .auth-main { padding: 40px 20px 64px; }
}

/* ---------- app page shell (project intake + dashboard) ----- */
.app-page { background: var(--light); min-height: calc(100vh - 76px); }
.app-head { padding: 44px 0 32px; }
.app-head h1 { font-size: clamp(30px, 3.6vw, 42px); margin-top: 14px; }
.app-head p { margin-top: 14px; font-size: 17px; max-width: 620px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 20px;
}
.back-link:hover { color: var(--blue); }

/* ---------- project intake --------------------------------- */
.intake-grid {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 54px;
  align-items: start;
  padding-bottom: 96px;
}
.intake-grid > div > p { margin-top: 16px; font-size: 17.5px; }

.success-panel {
  background: #fff;
  border: 1px solid var(--success-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: 40px;
  text-align: center;
}
.success-panel[hidden] { display: none; }
.success-mark {
  width: 62px; height: 62px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--success-bg);
  display: grid; place-items: center;
  color: var(--success);
}
.success-panel h2 { font-size: 26px; }
.success-panel p { margin-top: 12px; font-size: 16px; }
.success-actions { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- dashboard -------------------------------------- */
.dash {
  display: grid;
  grid-template-columns: 258px 1fr;
  gap: 30px;
  align-items: start;
  padding: 36px 0 96px;
}

.dash-side {
  position: sticky;
  top: 100px;
  background: var(--navy);
  border-radius: var(--r-lg);
  padding: 22px 18px;
  color: #C8D5E8;
}
.dash-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.dash-user .avatar { width: 40px; height: 40px; font-size: 14px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .2); }
.dash-user-id { display: grid; gap: 1px; min-width: 0; }
.dash-user-id strong { color: #fff; font-size: 14.5px; letter-spacing: -.01em; }
.dash-user-id span { font-size: 12.5px; color: #8FA6C4; overflow-wrap: anywhere; }

.dash-nav { display: grid; gap: 4px; }
.dash-nav-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #7D97B8;
  padding: 6px 12px 8px;
}
.dash-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 15px;
  color: #C8D5E8;
  transition: background-color .16s ease, color .16s ease;
}
.dash-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.dash-nav a.is-active { background: var(--blue); color: #fff; }
.dash-nav .count {
  margin-left: auto;
  background: rgba(255, 255, 255, .16);
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 12.5px;
  font-weight: 700;
}

.dash-main { min-width: 0; }
.dash-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.dash-bar h1 { font-size: 30px; margin-top: 0; }
.dash-bar p { margin-top: 6px; font-size: 15px; }

/* project list */
.project-list { display: grid; gap: 12px; }
.project-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 22px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.project-row:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--blue-100); }
.project-row h3 { font-size: 17px; }
.project-meta {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 500;
}
.project-meta span { display: inline-flex; align-items: center; gap: 6px; }
.project-go { color: var(--muted); flex: 0 0 auto; }
.project-row:hover .project-go { color: var(--blue); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--blue-50);
  color: var(--blue);
  border: 1px solid var(--blue-100);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* empty state */
.empty-state {
  background: #fff;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  padding: 56px 32px;
  text-align: center;
}
.empty-mark {
  width: 58px; height: 58px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue);
  display: grid; place-items: center;
}
.empty-state h3 { font-size: 19px; }
.empty-state p { margin: 10px auto 24px; max-width: 380px; font-size: 15px; }

/* project detail */
.detail-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 30px;
}
.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.detail-head h2 { font-size: 24px; }
.detail-head .project-meta { margin-top: 10px; }

.detail-fields {
  margin: 0;
  padding-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 40px;
}
.detail-fields > div { padding: 18px 0; border-bottom: 1px solid var(--border); }
.detail-fields > div.is-wide { grid-column: 1 / -1; }
.detail-fields dt {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.detail-fields dd {
  margin: 7px 0 0;
  color: var(--heading);
  font-size: 15.5px;
  font-weight: 600;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-fields dd.is-empty { color: #98A2B3; font-weight: 500; font-style: italic; }

/* placeholder for the file-upload feature coming in a later stage */
.detail-attachments {
  margin-top: 24px;
  padding: 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: var(--light);
  display: flex;
  align-items: center;
  gap: 14px;
}
.detail-attachments svg { color: var(--muted); flex: 0 0 auto; }
.detail-attachments strong { display: block; color: var(--heading); font-size: 15px; }
.detail-attachments span { font-size: 14px; }

@media (max-width: 980px) {
  .intake-grid { grid-template-columns: 1fr; gap: 40px; }
  .dash { grid-template-columns: 1fr; gap: 22px; }
  .dash-side { position: static; }
  .dash-nav { grid-auto-flow: column; grid-auto-columns: max-content; }
  .dash-nav-label { display: none; }
  .app-page { min-height: 0; }
}

@media (max-width: 640px) {
  .app-head { padding: 32px 0 24px; }
  .detail-card, .success-panel { padding: 24px; }
  .detail-fields { grid-template-columns: 1fr; }
  .project-row { padding: 18px; }
  .dash-bar h1 { font-size: 26px; }
}
