/* KroyTech Client Portal — public-facing theme.
   Loaded after crm.css; reuses its components (.card, .btn, .tbl, .field, .alert, .stat-*).
   All portal shell classes are prefixed kp- to avoid collisions. */

body.kp { background: var(--paper-alt); }

.kp-topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 6px rgba(18, 38, 63, 0.06);
}
.kp-topbar-in {
  max-width: 1120px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 18px;
}
.kp-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.kp-brand img { height: 40px; width: auto; display: block; }
.kp-brand span { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 15px; line-height: 1.2; }
.kp-brand small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.kp-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.kp-nav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 14px;
  padding: 8px 12px; border-radius: 8px; white-space: nowrap;
}
.kp-nav a:hover { background: #eef2f5; color: var(--ink); }
.kp-nav a.is-active { background: var(--navy-band); color: #fff; }
.kp-userchip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted); font-weight: 600;
}
.kp-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy-band); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}

.kp-main { max-width: 1120px; margin: 0 auto; padding: 28px 20px 60px; }
.kp-pagehead { margin: 0 0 20px; }
.kp-pagehead h1 { font-family: var(--font-head); color: var(--ink); font-size: 26px; margin: 0 0 6px; }
.kp-pagehead p { color: var(--muted); margin: 0; font-size: 14px; }

/* Landing page */
.kp-hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-band) 60%, #1d3a5f 100%);
  border-radius: 16px; color: #fff; padding: 56px 48px; margin-bottom: 28px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kp-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px;
  border-radius: 50%; background: radial-gradient(circle, rgba(121,182,43,.35) 0%, transparent 70%);
}
.kp-hero h1 { font-family: var(--font-head); font-size: 34px; margin: 0 0 12px; line-height: 1.2; }
.kp-hero h1 .accent { color: var(--green); }
.kp-hero p { color: #c4d2e0; font-size: 16px; max-width: 560px; margin: 0 0 24px; line-height: 1.6; }
.kp-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.kp-cta .btn { padding: 12px 26px; font-size: 15px; border-radius: 10px; }
.kp-cta .btn-ghost {
  background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff;
}
.kp-cta .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

.kp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-bottom: 28px; }
.kp-feature {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 12px;
  padding: 22px; box-shadow: var(--shadow);
}
.kp-feature .ic {
  width: 44px; height: 44px; border-radius: 12px; background: #eef5e4; color: var(--green-dark);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.kp-feature .ic svg { width: 22px; height: 22px; }
.kp-feature h3 { font-family: var(--font-head); font-size: 16px; color: var(--ink); margin: 0 0 8px; }
.kp-feature p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.55; }

.kp-how { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 28px; box-shadow: var(--shadow); }
.kp-how h2 { font-family: var(--font-head); color: var(--ink); font-size: 20px; margin: 0 0 18px; }
.kp-how h3 { font-family: var(--font-head); color: var(--ink); font-size: 16px; margin: 22px 0 8px; }
.kp-how p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 10px; }
.kp-how ul.guide { margin: 0 0 10px; padding-left: 22px; }
.kp-how ul.guide li { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 6px; padding: 0; }
.kp-how ul.guide li::before { display: none; }
.kp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.kp-steps li { position: relative; padding-top: 40px; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.kp-steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.kp-steps li strong { display: block; color: var(--ink); margin-bottom: 4px; }

.kp-foot {
  border-top: 1px solid var(--rule); background: var(--paper); margin-top: 40px;
}
.kp-foot-in {
  max-width: 1120px; margin: 0 auto; padding: 22px 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.kp-foot-in .spacer { flex: 1; }
.kp-foot-in a { color: var(--blue-dark); text-decoration: none; font-weight: 600; }
.kp-foot-in a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .kp-hero { padding: 36px 26px; }
  .kp-hero h1 { font-size: 26px; }
  .kp-nav a { padding: 8px 9px; font-size: 13px; }
  .kp-brand span { display: none; }
}
