:root {
  --portal-bg: #07101d;
  --portal-surface: rgba(255,255,255,.075);
  --portal-surface-strong: rgba(255,255,255,.11);
  --portal-border: rgba(255,255,255,.12);
  --portal-text: #eff7ff;
  --portal-muted: #95aac3;
  --portal-brand: #67e8f9;
  --portal-purple: #8b5cf6;
  --portal-green: #60d394;
  --portal-yellow: #facc15;
  --portal-red: #fb7185;
  --portal-radius: 22px;
}

.portal-modern-bg {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(103,232,249,.20), transparent 30%),
    radial-gradient(circle at 90% 0%, rgba(139,92,246,.18), transparent 35%),
    var(--portal-bg);
  color: var(--portal-text);
}

.login-modern {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
}

.login-showcase {
  padding: clamp(28px, 6vw, 76px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--portal-border);
  background:
    linear-gradient(135deg, rgba(103,232,249,.10), rgba(139,92,246,.10)),
    rgba(255,255,255,.025);
}

.login-brand,
.client-brand {
  font-size: 1.55rem;
  font-weight: 950;
  letter-spacing: -.05em;
}

.login-brand span,
.client-brand span {
  color: var(--portal-brand);
}

.showcase-copy {
  max-width: 760px;
}

.showcase-copy h1 {
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  margin-bottom: 20px;
}

.showcase-copy p {
  max-width: 650px;
  font-size: 1.08rem;
}

.modern-eyebrow {
  color: var(--portal-brand);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .72rem;
  font-weight: 950;
  margin: 0 0 8px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.showcase-grid article,
.login-card-modern,
.client-panel,
.client-stat-card,
.client-sidebar-card {
  border: 1px solid var(--portal-border);
  background: linear-gradient(180deg, var(--portal-surface), rgba(255,255,255,.045));
  border-radius: var(--portal-radius);
  box-shadow: 0 26px 80px rgba(0,0,0,.28);
}

.showcase-grid article {
  padding: 16px;
}

.showcase-grid strong,
.showcase-grid span {
  display: block;
}

.showcase-grid span {
  margin-top: 6px;
  color: var(--portal-muted);
  font-size: .9rem;
}

.login-panel {
  padding: clamp(24px, 6vw, 70px);
  display: grid;
  place-items: center;
}

.login-card-modern {
  width: min(500px, 100%);
  padding: 28px;
}

.login-card-header h2 {
  font-size: 2rem;
  margin: 0 0 8px;
}

.login-card-header p {
  margin-top: 0;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--portal-border);
  padding: 6px;
  border-radius: 16px;
  margin: 22px 0;
}

.auth-tab {
  border: 0;
  border-radius: 12px;
  padding: 11px 10px;
  background: transparent;
  color: var(--portal-muted);
  cursor: pointer;
  font-weight: 900;
}

.auth-tab.active {
  background: linear-gradient(135deg, var(--portal-brand), var(--portal-purple));
  color: #06101d;
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: block;
}

.modern-form {
  display: grid;
  gap: 13px;
}

.modern-form label {
  color: var(--portal-text);
  font-weight: 850;
  display: grid;
  gap: 7px;
}

.modern-form input,
.modern-form select,
.modern-form textarea,
#client-search {
  background: rgba(255,255,255,.075);
  border: 1px solid var(--portal-border);
  border-radius: 15px;
  color: var(--portal-text);
  padding: 12px 13px;
  outline: none;
}

.modern-form select option {
  color: #06101d;
}

.modern-form textarea {
  min-height: 130px;
}

.modern-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modern-primary-button,
.modern-soft-button {
  border: 0;
  border-radius: 15px;
  padding: 12px 15px;
  cursor: pointer;
  font-weight: 950;
}

.modern-primary-button {
  background: linear-gradient(135deg, var(--portal-brand), var(--portal-purple));
  color: #06101d;
  box-shadow: 0 16px 42px rgba(103,232,249,.18);
}

.modern-primary-button.secondary {
  background: linear-gradient(135deg, var(--portal-purple), var(--portal-brand));
}

.modern-soft-button {
  background: rgba(255,255,255,.075);
  color: var(--portal-text);
  border: 1px solid var(--portal-border);
}

.modern-message {
  min-height: 22px;
  color: var(--portal-brand);
  font-weight: 850;
  margin: 14px 0 0;
}

.login-links {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.login-links a {
  color: var(--portal-muted);
  font-weight: 850;
}

/* Client portal */

.client-modern-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px 1fr;
  background:
    radial-gradient(circle at 10% 0%, rgba(103,232,249,.15), transparent 28%),
    radial-gradient(circle at 95% 5%, rgba(139,92,246,.16), transparent 35%),
    var(--portal-bg);
  color: var(--portal-text);
}

.client-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--portal-border);
  background: linear-gradient(180deg, rgba(8,21,35,.98), rgba(8,21,35,.82));
  display: flex;
  flex-direction: column;
}

.client-brand {
  margin: 6px 10px 26px;
}

.client-nav {
  display: grid;
  gap: 8px;
}

.client-nav-item {
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--portal-muted);
  padding: 12px 13px;
  cursor: pointer;
  text-align: left;
  font-weight: 900;
}

.client-nav-item:hover,
.client-nav-item.active {
  background: linear-gradient(135deg, rgba(103,232,249,.15), rgba(139,92,246,.13));
  color: var(--portal-text);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.client-sidebar-card {
  padding: 15px;
  margin-top: 22px;
}

.client-sidebar-card p {
  margin-bottom: 0;
  font-size: .92rem;
}

.client-sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding: 12px 10px;
}

.client-sidebar-footer a,
.client-sidebar-footer button {
  color: var(--portal-muted);
  border: 1px solid var(--portal-border);
  background: rgba(255,255,255,.045);
  border-radius: 13px;
  padding: 10px 12px;
  text-align: center;
  cursor: pointer;
  font-weight: 850;
}

.client-main {
  padding: 22px;
  min-width: 0;
}

.client-topbar {
  min-height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.client-topbar h1 {
  margin: 0;
  font-size: 2.1rem;
}

.client-topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

#client-search {
  width: min(360px, 42vw);
}

.client-view {
  display: none;
}

.client-view.active {
  display: block;
}

.client-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.client-stat-card {
  padding: 18px;
}

.client-stat-card span {
  color: var(--portal-muted);
  font-weight: 850;
}

.client-stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
  letter-spacing: -.04em;
}

.client-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 16px;
  min-height: calc(100vh - 206px);
}

.client-panel {
  padding: 16px;
  min-width: 0;
}

.client-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.client-panel-header h2,
.client-panel h2 {
  margin: 0 0 8px;
}

.client-project-list,
.client-feed {
  display: grid;
  gap: 10px;
}

.client-project-row,
.client-feed-item {
  border: 1px solid var(--portal-border);
  background: rgba(255,255,255,.055);
  border-radius: 16px;
  padding: 13px;
}

.client-project-row {
  cursor: pointer;
  transition: .18s ease;
}

.client-project-row:hover,
.client-project-row.active {
  background: var(--portal-surface-strong);
  border-color: rgba(103,232,249,.32);
  transform: translateY(-1px);
}

.client-project-row h3,
.client-feed-item h3 {
  margin: 0 0 5px;
  font-size: .98rem;
}

.client-project-row p,
.client-feed-item p {
  margin: 0;
  color: var(--portal-muted);
  font-size: .88rem;
}

.portal-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: .72rem;
  font-weight: 950;
  background: rgba(103,232,249,.13);
  color: var(--portal-brand);
  border: 1px solid rgba(103,232,249,.23);
}

.portal-pill.green { background: rgba(96,211,148,.12); color: var(--portal-green); border-color: rgba(96,211,148,.24); }
.portal-pill.yellow { background: rgba(250,204,21,.12); color: var(--portal-yellow); border-color: rgba(250,204,21,.24); }
.portal-pill.red { background: rgba(251,113,133,.12); color: var(--portal-red); border-color: rgba(251,113,133,.24); }

.client-pill-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.client-empty-state {
  min-height: 430px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--portal-muted);
}

.client-empty-state h2 {
  color: var(--portal-text);
}

.client-project-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.client-project-hero h2 {
  font-size: 1.8rem;
  margin: 0 0 8px;
}

.client-project-hero p {
  margin: 0;
  color: var(--portal-muted);
}

.client-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.client-meta {
  border: 1px solid var(--portal-border);
  background: rgba(255,255,255,.055);
  border-radius: 15px;
  padding: 12px;
}

.client-meta span {
  display: block;
  color: var(--portal-muted);
  font-size: .75rem;
  font-weight: 900;
}

.client-meta strong {
  display: block;
  margin-top: 4px;
}

.client-progress-line {
  height: 10px;
  background: rgba(255,255,255,.10);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 16px;
}

.client-progress-line div {
  height: 100%;
  background: linear-gradient(135deg, var(--portal-brand), var(--portal-purple));
}

.client-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.client-subcard {
  border: 1px solid var(--portal-border);
  background: rgba(255,255,255,.045);
  border-radius: 16px;
  padding: 14px;
}

.client-subcard h3 {
  margin: 0 0 10px;
}

.client-subitem {
  border-top: 1px solid var(--portal-border);
  padding: 11px 0;
}

.client-subitem:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.client-subitem-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.client-subitem p {
  margin: 6px 0 0;
  color: var(--portal-muted);
  font-size: .9rem;
}

.client-form-grid {
  display: grid;
  grid-template-columns: minmax(360px, 640px) 1fr;
  gap: 16px;
  align-items: start;
}

.guidance-panel ul {
  color: var(--portal-muted);
  line-height: 1.8;
  margin-bottom: 0;
}

@media (max-width: 1100px) {
  .login-modern,
  .client-modern-shell,
  .client-workspace,
  .client-form-grid,
  .client-detail-grid {
    grid-template-columns: 1fr;
  }

  .login-showcase {
    min-height: 540px;
    border-right: 0;
    border-bottom: 1px solid var(--portal-border);
  }

  .client-sidebar {
    position: static;
    height: auto;
  }

  .client-nav {
    display: flex;
    overflow-x: auto;
  }

  .client-nav-item {
    min-width: max-content;
  }
}

@media (max-width: 760px) {
  .showcase-grid,
  .client-stats,
  .client-meta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .client-topbar,
  .client-topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #client-search {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .showcase-grid,
  .client-stats,
  .client-meta-grid,
  .modern-two-col {
    grid-template-columns: 1fr;
  }

  .login-panel,
  .login-showcase,
  .client-main {
    padding: 18px;
  }
}


/* -------------------------------------------------------
   PowerOps khaki / olive login + shared portal theme override
------------------------------------------------------- */

:root {
  --portal-bg: #10140f;
  --portal-surface: rgba(255,255,255,.075);
  --portal-surface-strong: rgba(255,255,255,.11);
  --portal-border: rgba(225,232,210,.15);
  --portal-text: #f5f4ea;
  --portal-muted: #b7b99f;
  --portal-brand: #c2c5aa;
  --portal-purple: #87986a;
  --portal-green: #87986a;
  --portal-yellow: #b8a05a;
  --portal-red: #b85c5c;
}

.portal-modern-bg {
  background:
    radial-gradient(circle at 12% 10%, rgba(194, 197, 170, .22), transparent 30%),
    radial-gradient(circle at 90% 0%, rgba(111, 127, 79, .22), transparent 35%),
    var(--portal-bg);
}

.login-showcase {
  background:
    linear-gradient(135deg, rgba(194,197,170,.12), rgba(111,127,79,.12)),
    rgba(255,255,255,.025);
}

.login-brand span,
.client-brand span,
.modern-eyebrow {
  color: var(--portal-brand);
}

.auth-tab.active,
.modern-primary-button,
.modern-primary-button.secondary {
  background: linear-gradient(135deg, #c2c5aa, #87986a);
  color: #10140f;
}

.modern-form input:focus,
.modern-form select:focus,
.modern-form textarea:focus {
  border-color: rgba(194, 197, 170, .56);
  box-shadow: 0 0 0 4px rgba(194, 197, 170, .10);
}

.modern-message {
  color: var(--portal-brand);
}
