/* DAM Stavby — client portal */
.portal-body {
  margin: 0;
  min-height: 100svh;
  font-family: "Outfit", system-ui, sans-serif;
  color: #142018;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(0, 146, 63, 0.18), transparent),
    #eef3ef;
}

.portal-login {
  min-height: calc(100svh - 40px);
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.portal-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid rgba(20, 32, 24, 0.1);
  padding: 1.75rem 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.portal-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.portal-card h1 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.85rem;
  color: #0b3d24;
}

.portal-lead {
  margin: 0 0 0.5rem;
  color: #6b776f;
  font-size: 0.95rem;
}

.portal-error {
  margin: 0;
  padding: 0.55rem 0.7rem;
  background: #f8e8e4;
  color: #a43d3d;
  font-size: 0.84rem;
}

.portal-card label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #3d4a40;
}

.portal-card input,
.portal-reply textarea {
  border: 1px solid rgba(20, 32, 24, 0.14);
  padding: 0.7rem 0.8rem;
  background: #fbfcfb;
  color: #142018;
  font: inherit;
  width: 100%;
}

.portal-btn {
  border: none;
  background: #00923f;
  color: #fff;
  font-weight: 700;
  padding: 0.85rem 1rem;
  cursor: pointer;
  margin-top: 0.35rem;
}

.portal-btn:hover { background: #007a35; }

.portal-btn-sm {
  border: 1px solid rgba(20, 32, 24, 0.14);
  background: #fff;
  color: #0b3d24;
  font-weight: 700;
  font-size: 0.76rem;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  white-space: nowrap;
}

.portal-btn-sm:hover {
  border-color: #00923f;
  color: #007a35;
}

.portal-hint {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: #6b776f;
}

.portal-hint a { color: #007a35; }

.portal-logout {
  position: fixed;
  right: 1rem;
  top: 2.6rem;
  z-index: 50;
  border: 1px solid rgba(20, 32, 24, 0.14);
  background: #fff;
  padding: 0.45rem 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.portal-app { min-height: calc(100svh - 36px); }

.portal-chrome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.2rem;
  background: #0b3d24;
  color: #fff;
}

.portal-chrome__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.portal-chrome__brand img {
  object-fit: contain;
  background: #fff;
  padding: 2px;
}

.portal-chrome__brand strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.1rem;
}

.portal-chrome__brand span {
  display: block;
  font-size: 0.72rem;
  opacity: 0.7;
}

.portal-chrome__user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
}

.portal-chrome__logout {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-shell {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.portal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.portal-tab {
  border: 1px solid rgba(20, 32, 24, 0.12);
  background: #fff;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-weight: 700;
  color: #142018;
}

.portal-tab.is-active {
  background: #00923f;
  border-color: #00923f;
  color: #fff;
}

.portal-main {
  display: grid;
  gap: 1rem;
}

.portal-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.portal-head h1 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  color: #0b3d24;
}

.portal-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

.portal-panel {
  background: #fff;
  border: 1px solid rgba(20, 32, 24, 0.1);
  padding: 1.25rem;
}

.portal-panel h2 {
  margin: 0 0 0.85rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  color: #0b3d24;
}

.portal-panel--accent {
  background: #0b3d24;
  color: #fff;
  border-color: #0b3d24;
}

.portal-panel--accent h2 { color: #fff; }

.portal-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #007a35;
  font-weight: 800;
}

.portal-kicker--light { color: #8fd9ad; }

.portal-project-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #0b3d24;
}

.portal-muted {
  margin: 0.45rem 0 0;
  color: #6b776f;
}

.portal-note {
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(20, 32, 24, 0.08);
  color: #3d4a40;
  font-size: 0.92rem;
  line-height: 1.45;
}

.portal-accent-lead {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.45;
}

.portal-contact-links {
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.portal-contact-links a { color: #fff; }

.portal-cta {
  display: inline-flex;
  margin-top: 1rem;
  background: #00923f;
  color: #08301c;
  padding: 0.65rem 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.72rem;
}

.portal-timeline {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-timeline--phases {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.55rem;
}

.portal-timeline li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.7rem 0.65rem;
  border: 1px solid rgba(20, 32, 24, 0.1);
  background: #fff;
  color: #6b776f;
}

.portal-timeline li.is-done {
  color: #0b3d24;
  font-weight: 600;
  background: rgba(0, 146, 63, 0.08);
}

.portal-timeline li.is-current {
  color: #00923f;
  font-weight: 700;
  border-color: rgba(0, 146, 63, 0.45);
  background: rgba(0, 146, 63, 0.12);
}

.portal-timeline .dot {
  width: 10px;
  height: 10px;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: #c5d0c8;
  flex-shrink: 0;
}

.portal-timeline li.is-done .dot,
.portal-timeline li.is-current .dot { background: #00923f; }

.portal-phase-num {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.portal-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.portal-stats li {
  padding: 0.75rem;
  background: #f7fbf8;
  border: 1px solid rgba(20, 32, 24, 0.08);
}

.portal-stats strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  color: #0b3d24;
}

.portal-stats span {
  font-size: 0.78rem;
  color: #6b776f;
}

.portal-next {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: #3d4a40;
}

.portal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

.portal-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(20, 32, 24, 0.06);
  font-size: 0.92rem;
}

.portal-list strong { display: block; color: #142018; }
.portal-list span { display: block; color: #6b776f; font-size: 0.85rem; margin-top: 0.15rem; }

.portal-list--messages li {
  flex-direction: column;
  align-items: stretch;
}

.portal-list--messages p {
  margin: 0.35rem 0 0;
  color: #142018;
  line-height: 1.45;
}

.portal-list--messages .is-client {
  background: rgba(0, 146, 63, 0.06);
  padding: 0.75rem;
  border: 1px solid rgba(0, 146, 63, 0.12);
}

.portal-msg-channel {
  font-size: 0.68rem !important;
  font-weight: 800;
  color: #007a35 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.portal-offer-note { font-style: italic; }

.portal-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #e6f5ec;
  color: #007a35;
  white-space: nowrap;
}

.portal-pill--ok { background: #e6f5ec; }

.portal-reply {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(20, 32, 24, 0.08);
}

.portal-reply label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #3d4a40;
}

.portal-empty {
  margin: 0;
  color: #6b776f;
  font-size: 0.92rem;
}

@media (max-width: 800px) {
  .portal-grid { grid-template-columns: 1fr; }
  .portal-logout { top: auto; bottom: 1rem; }
  .portal-chrome { align-items: flex-start; }
  .portal-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .portal-tab { flex: 0 0 auto; }
  .portal-list li {
    flex-direction: column;
    align-items: stretch;
  }
  .portal-timeline--phases { grid-template-columns: 1fr 1fr; }
}
