/* eComplyPak app pages: login, signup, dashboard, wizard, facility.
   Reuses the color and type tokens defined in css/app.css, so this
   file must always be loaded after app.css. */

.app-header {
  background: var(--pak-green);
  padding: 1rem 0;
}
.app-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-header .brand-logo { height: 40px; }
.app-header-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.app-header-actions span {
  font-size: 0.9rem;
  color: rgba(254, 250, 224, 0.85);
}
.link-button {
  background: none;
  border: none;
  color: var(--cornsilk);
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0;
}

.app-main {
  min-height: calc(100vh - 200px);
  padding: 3rem 0 4rem;
}

/* Auth pages */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pak-green-deep);
  padding: 2rem 1.5rem;
}
.auth-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 2.4rem 2.2rem;
  width: 100%;
  max-width: 400px;
}
.auth-card .brand-logo {
  height: 40px;
  margin-bottom: 1.8rem;
}
.auth-card h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--pak-green);
  margin-bottom: 0.4rem;
}
.auth-card p.auth-sub {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 1.6rem;
}
.auth-card label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pak-green);
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}
.auth-card label:first-of-type { margin-top: 0; }
.auth-card input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-sm);
  background: var(--cornsilk);
  color: var(--ink);
}
.auth-card input:focus {
  outline: none;
  border-color: var(--tigers-eye);
}
.auth-card button { margin-top: 1.6rem; }
.auth-switch {
  margin-top: 1.4rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-align: center;
}
.auth-switch a {
  color: var(--tigers-eye);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-note {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  min-height: 1.2em;
}
.auth-note.is-error { color: var(--tigers-eye); }
.auth-note.is-ok { color: var(--moss); }

/* Dashboard */

.dashboard-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.dashboard-head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.8rem;
  color: var(--pak-green);
}

.facility-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.facility-card {
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  display: block;
}
.facility-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--pak-green);
  margin-bottom: 0.4rem;
}
.facility-card p {
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.facility-card .facility-meta {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--tigers-eye);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.empty-state {
  background: var(--paper);
  border: 1px dashed var(--line-light);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
}
.empty-state p {
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}

/* Wizard */

.wizard-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 2.2rem;
  max-width: 520px;
  margin: 0 auto;
}
.wizard-card h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--pak-green);
  margin-bottom: 0.5rem;
}
.wizard-card p.wizard-sub {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 1.8rem;
}
.wizard-card label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pak-green);
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
}
.wizard-card label:first-of-type { margin-top: 0; }
.wizard-card input,
.wizard-card select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-sm);
  background: var(--cornsilk);
  color: var(--ink);
}
.wizard-card button { margin-top: 1.8rem; }
.wizard-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--tigers-eye);
  min-height: 1.2em;
}

/* Facility checklist view */

.facility-head {
  margin-bottom: 2rem;
}
.facility-head p.eyebrow { margin-bottom: 0.5rem; }
.facility-head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.8rem;
  color: var(--pak-green);
}

.checklist-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
}
.checklist-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--line-light);
}
.checklist-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line-light);
  font-size: 0.92rem;
  vertical-align: top;
}
.checklist-table tr:last-child td { border-bottom: none; }

.status-select {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-light);
  background: var(--cornsilk);
  color: var(--ink);
}

.tag-category {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--moss);
  border: 1px solid var(--line-light);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

@media (max-width: 760px) {
  .facility-grid { grid-template-columns: 1fr; }
  .checklist-table thead { display: none; }
  .checklist-table, .checklist-table tbody, .checklist-table tr, .checklist-table td {
    display: block;
    width: 100%;
  }
  .checklist-table tr { padding: 1rem 0; border-bottom: 1px solid var(--line-light); }
  .checklist-table td { border-bottom: none; padding: 0.3rem 1.2rem; }
}
