/* ================================================================
   KP CORE UTILITIES (single source of truth)
   ------------------------------------------------
   Moved here in 1.0.7.31 to prevent duplicates across modules.
================================================================ */

.kp-hidden{ display:none; }

.kp-table{
  width:100%;
  border-collapse:collapse;
}

/* Main dashboard container (profile/dashboard pages) */
.kp-dashboard{
  width:100%;
  max-width:1100px;
  margin:0 auto;
  padding:var(--k-space-4);
  display:flex;
  flex-direction:column;
  gap:14px;
}


/* ==========================================================
   Unified Page Shell (Home-style)
   Goal: make all pages look like / (feed) for logged users
   ========================================================== */
/* If a template only wraps with kp-dashboard, force its first-level containers to look like cards.
   IMPORTANT: avoid styling bare headings/paragraphs as cards. */
.kp-dashboard > div:not(.kp-card),
.kp-dashboard > section:not(.kp-card),
.kp-dashboard > article:not(.kp-card),
.kp-dashboard > form:not(.kp-card),
.kp-dashboard > table:not(.kp-card),
.kp-dashboard > ul:not(.kp-card),
.kp-dashboard > ol:not(.kp-card){
  background: var(--k-bg-card, rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--k-radius-xl, 16px);
  padding: 16px 18px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
}

/* Ensure kp-cards follow the same rhythm */
.kp-dashboard .kp-card{ margin-bottom: 0; }

/* Typography */
.kp-dashboard h1,
.kp-dashboard h2,
.kp-dashboard h3{
  margin: 0 0 10px 0;
  line-height: 1.15;
}

.kp-dashboard .kp-page-title{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 800;
  letter-spacing: .2px;
}

.kp-dashboard .kp-page-subtitle{
  margin: -6px 0 0 0;
  opacity: .8;
}

.kp-dashboard .kp-page-title i{
  opacity:.9;
}

/* Forms */
.kp-dashboard input[type="text"],
.kp-dashboard input[type="email"],
.kp-dashboard input[type="password"],
.kp-dashboard input[type="number"],
.kp-dashboard input[type="url"],
.kp-dashboard select,
.kp-dashboard textarea{
  width: 100%;
  background: rgba(255,255,255,0.04);
  color: var(--k-text, #e7ecff);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}

.kp-dashboard input:focus,
.kp-dashboard select:focus,
.kp-dashboard textarea:focus{
  border-color: rgba(255,107,53,0.55);
  box-shadow: 0 0 0 4px rgba(255,107,53,0.10);
}

/* Buttons */
.kp-dashboard .kp-btn,
.kp-dashboard button,
.kp-dashboard input[type="submit"]{
  border-radius: 12px;
}

.kp-dashboard .kp-icon-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

/* Tables */
.kp-dashboard table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.02);
}

.kp-dashboard table th,
.kp-dashboard table td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.kp-dashboard table th{
  text-align: left;
  font-weight: 700;
  background: rgba(255,255,255,0.03);
}

.kp-dashboard table tr:last-child td{
  border-bottom: 0;
}

/* Alerts/messages */
.kp-dashboard .kp-alert{
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.kp-dashboard .kp-alert--ok{border-color: color-mix(in srgb, var(--success-primary) 55%, transparent);}
.kp-dashboard .kp-alert--warn{ border-color: rgba(255,107,53,0.45); }
.kp-dashboard .kp-alert--err{ border-color: rgba(239,68,68,0.45); }

/* Tabs (Home-style) */
.kp-dashboard .kp-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.kp-dashboard .kp-tab,
.kp-dashboard .kp-tabs a,
.kp-dashboard .kp-tabs button{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: inherit;
  text-decoration:none;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}

.kp-dashboard .kp-tab:hover,
.kp-dashboard .kp-tabs a:hover,
.kp-dashboard .kp-tabs button:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 10px 24px rgba(0,0,0,0.24);
}

.kp-dashboard .kp-tab.is-active,
.kp-dashboard .kp-tabs a.is-active{
  border-color: rgba(255,107,53,0.45);
  box-shadow: 0 0 0 4px rgba(255,107,53,0.10);
}

/* Icons */
.kp-dashboard .kp-icon{
  width: 18px;
  height: 18px;
  display:inline-block;
  vertical-align:-3px;
  opacity:.95;
}

.kp-dashboard .kp-page-title .kp-icon{
  width: 20px;
  height: 20px;
  vertical-align:-4px;
}

/* Toolbar helpers */
.kp-dashboard .kp-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:space-between;
}

/* Badges / counters */
.kp-dashboard .kp-badge,
.kp-dashboard .badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}

/* Links */
.kp-dashboard a{
  color: inherit;
  text-decoration: none;
}
.kp-dashboard a:hover{
  text-decoration: underline;
  text-decoration-color: rgba(255,107,53,0.55);
  text-underline-offset: 3px;
}

/* Form layout helpers */
.kp-dashboard label{ font-weight: 700; }
.kp-dashboard .form-row,
.kp-dashboard .kp-form-row{
  display:flex;
  flex-direction:column;
  gap: 8px;
  margin: 10px 0;
}
.kp-dashboard .kp-form-actions,
.kp-dashboard .form-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-top: 12px;
}

/* Misc */
.kp-dashboard hr{
  border:0;
  height:1px;
  background: rgba(255,255,255,0.08);
  margin: 14px 0;
}

.kp-dashboard ul,
.kp-dashboard ol{
  padding-left: 18px;
}

.kp-dashboard li{ margin: 6px 0; }

/* ── Theme System: alert variants (no inline colors) ── */
.kp-alert--warn{
  border-color: var(--k-warn-border);
  background: var(--k-warn-surface);
}

/* Theme System: active state for buttons without inline styles */
.kp-btn-active{
  box-shadow: 0 0 0 2px var(--k-green-glow) inset;
}

/* --- KP PERCENT WIDTH UTILS (0..100) --- */
.kp-pct-0{width:0%}
.kp-pct-1{width:1%}
.kp-pct-2{width:2%}
.kp-pct-3{width:3%}
.kp-pct-4{width:4%}
.kp-pct-5{width:5%}
.kp-pct-6{width:6%}
.kp-pct-7{width:7%}
.kp-pct-8{width:8%}
.kp-pct-9{width:9%}
.kp-pct-10{width:10%}
.kp-pct-11{width:11%}
.kp-pct-12{width:12%}
.kp-pct-13{width:13%}
.kp-pct-14{width:14%}
.kp-pct-15{width:15%}
.kp-pct-16{width:16%}
.kp-pct-17{width:17%}
.kp-pct-18{width:18%}
.kp-pct-19{width:19%}
.kp-pct-20{width:20%}
.kp-pct-21{width:21%}
.kp-pct-22{width:22%}
.kp-pct-23{width:23%}
.kp-pct-24{width:24%}
.kp-pct-25{width:25%}
.kp-pct-26{width:26%}
.kp-pct-27{width:27%}
.kp-pct-28{width:28%}
.kp-pct-29{width:29%}
.kp-pct-30{width:30%}
.kp-pct-31{width:31%}
.kp-pct-32{width:32%}
.kp-pct-33{width:33%}
.kp-pct-34{width:34%}
.kp-pct-35{width:35%}
.kp-pct-36{width:36%}
.kp-pct-37{width:37%}
.kp-pct-38{width:38%}
.kp-pct-39{width:39%}
.kp-pct-40{width:40%}
.kp-pct-41{width:41%}
.kp-pct-42{width:42%}
.kp-pct-43{width:43%}
.kp-pct-44{width:44%}
.kp-pct-45{width:45%}
.kp-pct-46{width:46%}
.kp-pct-47{width:47%}
.kp-pct-48{width:48%}
.kp-pct-49{width:49%}
.kp-pct-50{width:50%}
.kp-pct-51{width:51%}
.kp-pct-52{width:52%}
.kp-pct-53{width:53%}
.kp-pct-54{width:54%}
.kp-pct-55{width:55%}
.kp-pct-56{width:56%}
.kp-pct-57{width:57%}
.kp-pct-58{width:58%}
.kp-pct-59{width:59%}
.kp-pct-60{width:60%}
.kp-pct-61{width:61%}
.kp-pct-62{width:62%}
.kp-pct-63{width:63%}
.kp-pct-64{width:64%}
.kp-pct-65{width:65%}
.kp-pct-66{width:66%}
.kp-pct-67{width:67%}
.kp-pct-68{width:68%}
.kp-pct-69{width:69%}
.kp-pct-70{width:70%}
.kp-pct-71{width:71%}
.kp-pct-72{width:72%}
.kp-pct-73{width:73%}
.kp-pct-74{width:74%}
.kp-pct-75{width:75%}
.kp-pct-76{width:76%}
.kp-pct-77{width:77%}
.kp-pct-78{width:78%}
.kp-pct-79{width:79%}
.kp-pct-80{width:80%}
.kp-pct-81{width:81%}
.kp-pct-82{width:82%}
.kp-pct-83{width:83%}
.kp-pct-84{width:84%}
.kp-pct-85{width:85%}
.kp-pct-86{width:86%}
.kp-pct-87{width:87%}
.kp-pct-88{width:88%}
.kp-pct-89{width:89%}
.kp-pct-90{width:90%}
.kp-pct-91{width:91%}
.kp-pct-92{width:92%}
.kp-pct-93{width:93%}
.kp-pct-94{width:94%}
.kp-pct-95{width:95%}
.kp-pct-96{width:96%}
.kp-pct-97{width:97%}
.kp-pct-98{width:98%}
.kp-pct-99{width:99%}
.kp-pct-100{width:100%}

/* === Alerts semantic (v1.0.3.32) === */
.kp-alert--ok{border-color: color-mix(in srgb, var(--success-primary) 55%, transparent);}
.kp-alert--danger{border-color: color-mix(in srgb, var(--danger-primary) 55%, transparent); background: color-mix(in srgb, var(--danger-primary) 12%, transparent); color: var(--danger-primary);}
