/* =====================================================================
   Careers Kenya — global stylesheet
   --------------------------------------------------------------------
   Brand:
     primary   #E15846  (coral)
     secondary #372101  (deep brown)
     bg        white
   Approach:
     - Mobile-first. On phones, the app fills the screen edge-to-edge.
     - On desktops the .app-frame becomes a centered "phone-like" card
       (max-width 460px) so the whole site feels like a native app.
     - Admin uses its own .portal-shell layout (full width, no frame).
===================================================================== */

:root {
  --ck-coral:        #E15846;
  --ck-coral-soft:   #FCE7E3;
  --ck-coral-deep:   #C03E2D;
  --ck-ink:          #372101;          /* secondary / deep brown */
  --ck-ink-soft:     #6B5746;
  --ck-bg:           #FFFFFF;
  --ck-cream:        #FAF7F2;          /* page bg accent */
  --ck-cream-soft:   #F5EFE6;
  --ck-line:         #E9E1D4;
  --ck-success:      #2E9E6E;
  --ck-warn:         #C8A20D;
  --ck-danger:       #C0392B;
  --ck-radius:       16px;
  --ck-shadow:       0 6px 20px rgba(55, 33, 1, 0.06);
  --ck-shadow-lg:    0 16px 40px rgba(55, 33, 1, 0.10);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--ck-cream);
  color: var(--ck-ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ck-coral); text-decoration: none; }
a:hover { color: var(--ck-coral-deep); }
hr { border-color: var(--ck-line); }

.text-coral     { color: var(--ck-coral) !important; }
.text-ink       { color: var(--ck-ink) !important; }
.text-ink-soft  { color: var(--ck-ink-soft) !important; }
.text-muted-2   { color: #9A8E7E !important; }
.bg-cream       { background: var(--ck-cream) !important; }
.bg-cream-soft  { background: var(--ck-cream-soft) !important; }

/* =====================================================================
   App shell / phone-like frame
===================================================================== */
.app-shell {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  background: var(--ck-cream);
}
.app-frame {
  width: 100%;
  min-height: 100dvh;
  background: var(--ck-bg);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* On wider screens, present like a phone */
@media (min-width: 720px) {
  .app-shell {
    padding: 32px 16px 60px;
    background: linear-gradient(180deg, #F1E8DA 0%, #FAF7F2 100%);
  }
  .app-frame {
    max-width: 460px;
    border-radius: 36px;
    box-shadow: var(--ck-shadow-lg);
    overflow: hidden;
    min-height: calc(100dvh - 80px);
    margin-bottom: 24px;
  }
}

/* =====================================================================
   Top bar
===================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 10px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--ck-line);
}
.topbar .topbar-title {
  flex: 1;
  font-weight: 700;
  font-size: .95rem;
  color: var(--ck-ink);
  text-align: left;
}
.topbar .topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.brand-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--ck-ink);
  letter-spacing: -0.01em;
}
.brand-mini img { height: 62px; width: auto; }
.icon-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--ck-line);
  background: #fff;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ck-ink);
}
.icon-btn:hover { background: var(--ck-cream); color: var(--ck-coral); }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ck-coral);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
}
.avatar:hover { color: #fff; background: var(--ck-coral-deep); }
.badge-wallet {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--ck-cream-soft);
  color: var(--ck-ink) !important;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}
.badge-wallet i { color: var(--ck-coral); }

/* =====================================================================
   Page padding / sections
===================================================================== */
.page { padding: 12px 16px 100px; }
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 2px 8px;
}
.section-title h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ck-ink);
}
.section-title a { font-size: .8rem; font-weight: 600; }

/* =====================================================================
   Bottom tab bar
===================================================================== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: #fff;
  border-top: 1px solid var(--ck-line);
  z-index: 30;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}

/* Inside the desktop phone-frame, tabbar should stay within the frame
   (not fixed to the browser viewport). The frame is position:relative. */
@media (min-width: 720px) {
  .tabbar {
    position: absolute;
    left: 0;
    right: 0;
  }
}
.tabbar .tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--ck-ink-soft);
  font-size: .68rem;
  font-weight: 600;
  padding: 8px 0;
  border-radius: 10px;
}
.tabbar .tab i { font-size: 1.05rem; }
.tabbar .tab.active {
  color: var(--ck-coral);
  background: var(--ck-coral-soft);
}

/* =====================================================================
   Buttons
===================================================================== */
.btn-coral {
  background: var(--ck-coral);
  border: 1px solid var(--ck-coral);
  color: #fff;
  font-weight: 700;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: .95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-coral:hover, .btn-coral:focus {
  background: var(--ck-coral-deep);
  border-color: var(--ck-coral-deep);
  color: #fff;
}
.btn-coral.btn-sm { padding: 8px 14px; font-size: .82rem; border-radius: 10px; }
.btn-coral:disabled { opacity: .55; cursor: not-allowed; }

.btn-pill {
  background: #fff;
  border: 1px solid var(--ck-line);
  color: var(--ck-ink);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-pill:hover, .btn-pill.active {
  border-color: var(--ck-coral);
  color: var(--ck-coral);
  background: var(--ck-coral-soft);
}
.btn-pill.btn-sm { padding: 6px 12px; font-size: .78rem; }

.btn-block-soft {
  width: 100%;
  background: var(--ck-cream-soft);
  border: 1px solid var(--ck-line);
  color: var(--ck-ink);
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: .88rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-block-soft:hover { background: var(--ck-coral-soft); border-color: var(--ck-coral); color: var(--ck-coral); }

/* =====================================================================
   Forms
===================================================================== */
.form-pretty .form-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--ck-ink-soft);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.form-control, .form-select {
  border: 1px solid var(--ck-line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: .92rem;
  background: #fff;
}
.form-control:focus, .form-select:focus {
  border-color: var(--ck-coral);
  box-shadow: 0 0 0 3px rgba(225, 88, 70, .15);
}
.input-icon {
  position: relative;
}
.input-icon i {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--ck-ink-soft);
}
.input-icon .form-control { padding-left: 38px; }

/* =====================================================================
   Cards (jobs, kits, profile, etc.)
===================================================================== */
.card-soft {
  background: #fff;
  border: 1px solid var(--ck-line);
  border-radius: var(--ck-radius);
  padding: 14px;
  box-shadow: var(--ck-shadow);
}

/* Job list item */
.job-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--ck-line);
  border-radius: var(--ck-radius);
  margin-bottom: 10px;
  align-items: flex-start;
}
.job-item:hover { border-color: var(--ck-coral); }
.job-item .logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--ck-cream-soft);
  color: var(--ck-coral);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.job-item h5 {
  margin: 0;
  font-size: .95rem;
  font-weight: 700;
  color: var(--ck-ink);
}
.job-item .company { font-size: .78rem; color: var(--ck-ink-soft); }
.job-item .meta {
  font-size: .72rem;
  color: var(--ck-ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.job-item .meta i { margin-right: 3px; }
.job-item .score {
  background: var(--ck-cream-soft);
  color: var(--ck-ink);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: .7rem;
  font-weight: 700;
}

/* Category card on home */
.cat-card {
  border-radius: 14px;
  padding: 14px;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 110px;
  cursor: pointer;
}
.cat-card .ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.22);
  display: inline-flex; align-items: center; justify-content: center;
}
.cat-card h6 { font-weight: 700; margin: 0; font-size: .9rem; }
.cat-card span { font-size: .72rem; opacity: .85; }

/* Kit chooser cards */
.kit-card {
  border: 1.5px solid var(--ck-line);
  background: #fff;
  border-radius: var(--ck-radius);
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
  cursor: pointer;
  transition: all .15s;
}
.kit-card:hover { border-color: var(--ck-coral); }
.kit-card:active {
  transform: scale(0.97);
  border-color: var(--ck-coral);
  background: var(--ck-coral-soft);
  transition: transform .06s;
}
.kit-card.featured {
  border-color: var(--ck-coral);
  background: linear-gradient(180deg, var(--ck-coral-soft) 0%, #fff 60%);
}
.kit-card .ribbon {
  position: absolute;
  top: -10px; right: 14px;
  background: var(--ck-coral);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 4px 10px;
  border-radius: 10px;
}
.kit-card .price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ck-ink);
}
.kit-card .price small { font-size: .7rem; font-weight: 600; color: var(--ck-ink-soft); }
.kit-card ul { padding-left: 18px; margin: 8px 0 0; font-size: .82rem; color: var(--ck-ink-soft); }
.kit-card ul li { margin-bottom: 4px; }

/* Wallet packs */
.wallet-pack-grid { display:grid; gap:10px; grid-template-columns:1fr 1fr; }
.wallet-pack {
  border:1.5px solid var(--ck-line); background:#fff; border-radius:var(--ck-radius);
  padding:18px 14px 14px; position:relative; cursor:pointer; transition:all .15s;
  text-align:left; overflow:hidden;
}
.wallet-pack:active {
  transform:scale(0.97); border-color:var(--ck-coral); background:var(--ck-coral-soft); transition:transform .06s;
}
.wallet-pack .pack-icon {
  width:36px;height:36px;border-radius:10px;background:var(--ck-coral-soft);color:var(--ck-coral);
  display:inline-flex;align-items:center;justify-content:center;font-size:1.05rem;margin-bottom:8px;
}
.wallet-pack .pack-label { font-size:.72rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ck-ink-soft); }
.wallet-pack .pack-price { font-size:1.45rem;font-weight:800;color:var(--ck-ink);line-height:1.1; }
.wallet-pack .pack-credit { font-size:.82rem;font-weight:700;color:#1F7867; }
.wallet-pack .pack-bonus {
  position:absolute; top:-1px; right:-1px; background:var(--ck-coral); color:#fff;
  font-size:.6rem; font-weight:700; letter-spacing:.06em; padding:3px 8px; border-radius:0 0 0 10px;
}
.wallet-pack .pack-arrow {
  position:absolute; bottom:14px; right:14px; color:var(--ck-line);
}
.wallet-pack:active .pack-arrow { color:var(--ck-coral); }

.wallet-custom {
  border:1.5px solid var(--ck-line); background:#fff; border-radius:var(--ck-radius);
  padding:14px; position:relative;
}
.wallet-custom .form-control {
  border:1.5px solid var(--ck-line); border-radius:10px; font-weight:600; font-size:1rem;
}
.wallet-custom .form-control:focus { border-color:var(--ck-coral); box-shadow:0 0 0 3px var(--ck-coral-soft); }

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--ck-cream-soft);
  color: var(--ck-ink);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .7rem;
  font-weight: 600;
}
.chip.coral  { background: var(--ck-coral-soft); color: var(--ck-coral); }
.chip.green  { background: #E1F4EA; color: var(--ck-success); }
.chip.yellow { background: #FBF1CC; color: #806404; }
.chip.red    { background: #FCE5E2; color: var(--ck-danger); }
.chip.teal   { background: #DEF1ED; color: #1F7867; }

/* Profile card */
.profile-card {
  background: #fff;
  border: 1px solid var(--ck-line);
  border-radius: var(--ck-radius);
  padding: 14px;
  margin-bottom: 10px;
}
.profile-card .card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.profile-card h6 {
  margin: 0; font-size: .85rem; font-weight: 700; display: flex; align-items: center; gap: 6px;
}
.profile-card .row-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  font-size: .85rem;
  color: var(--ck-ink-soft);
}
.profile-card .row-item i { color: var(--ck-coral); width: 18px; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ck-ink-soft);
}
.empty-state .emoji { font-size: 3rem; margin-bottom: 8px; }

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ck-cream-soft);
  border: 1px solid var(--ck-line);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 4px 0 8px;
}
.search-bar input {
  border: 0;
  background: transparent;
  outline: none;
  flex: 1;
  font-size: .9rem;
  color: var(--ck-ink);
}

/* =====================================================================
   M-Pesa modal / generation states
===================================================================== */
.mpesa-card {
  background: linear-gradient(160deg, #2E7D32, #1B5E20);
  color: #fff;
  border-radius: var(--ck-radius);
  padding: 18px;
  text-align: center;
  margin-bottom: 14px;
}
.mpesa-card .pulse {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 8px;
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.4); }
  70%  { box-shadow: 0 0 0 18px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.gen-step {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 6px;
  background: var(--ck-cream-soft);
}
.gen-step .ico {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ck-line);
  color: var(--ck-ink-soft);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .8rem;
}
.gen-step.done .ico   { background: var(--ck-success); color: #fff; }
.gen-step.active .ico { background: var(--ck-coral); color: #fff; animation: spin 1.2s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* =====================================================================
   ADMIN PORTAL
===================================================================== */
body.admin-body {
  background: #F7F6F2;
}
.portal-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.portal-side {
  background: var(--ck-ink);
  color: #fff;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
}
.portal-side .brand {
  font-weight: 800;
  font-size: 1.1rem;
  padding: 0 8px 6px;
}
.portal-side .brand .accent { color: var(--ck-coral); }
.portal-side .nav-link-side {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  margin-bottom: 2px;
  border-radius: 10px;
  color: rgba(255,255,255,.8);
  font-weight: 500;
  font-size: .9rem;
}
.portal-side .nav-link-side:hover { background: rgba(255,255,255,.06); color: #fff; }
.portal-side .nav-link-side.active {
  background: var(--ck-coral);
  color: #fff;
}
.portal-main {
  padding: 24px 28px 40px;
  background: #F7F6F2;
}
.portal-topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.portal-topbar h2 { font-size: 1.4rem; font-weight: 800; margin: 0; color: var(--ck-ink); }
.kpi-card {
  background: #fff;
  border: 1px solid var(--ck-line);
  border-radius: 12px;
  padding: 16px;
}
.kpi-card .label { font-size: .72rem; color: var(--ck-ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.kpi-card .value { font-size: 1.4rem; font-weight: 800; color: var(--ck-ink); margin-top: 4px; }
.kpi-card .delta { font-size: .72rem; color: var(--ck-ink-soft); margin-top: 4px; }
.kpi-card .delta.up   { color: var(--ck-success); }
.kpi-card .delta.down { color: var(--ck-danger); }

.health-strip {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.health-pill {
  background: #fff;
  border: 1px solid var(--ck-line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .76rem;
  display: inline-flex; align-items: center; gap: 6px;
}
.health-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ck-success);
}
.health-pill.warn .dot { background: var(--ck-warn); }
.health-pill.bad  .dot { background: var(--ck-danger); }

.event-feed {
  background: #fff;
  border: 1px solid var(--ck-line);
  border-radius: 12px;
  padding: 16px;
  height: 100%;
}
.event-feed .event {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px dashed var(--ck-line);
  font-size: .82rem;
}
.event-feed .event:last-child { border-bottom: 0; }
.event-feed .ts { color: var(--ck-ink-soft); font-weight: 600; min-width: 44px; }

.table-pretty {
  background: #fff;
  border: 1px solid var(--ck-line);
  border-radius: 12px;
  overflow: hidden;
}
.table-pretty .table { margin: 0; font-size: .88rem; }
.table-pretty thead th {
  background: var(--ck-cream-soft);
  color: var(--ck-ink-soft);
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--ck-line);
}
.table-pretty td { vertical-align: middle; }

/* =====================================================================
   Career Services Hub  (index.php / services.php / service_view.php)
===================================================================== */

/* Home hero strip */
.hero-strip {
  padding: 4px 2px 8px;
}
.hero-eyebrow {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ck-coral);
  font-weight: 700;
}
.hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 4px 0 2px;
  color: var(--ck-ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.hero-sub {
  font-size: .82rem;
  color: var(--ck-ink-soft);
  margin: 0;
}

/* 3 hub cards */
.hub-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}
.hub-card {
  position: relative;
  border-radius: 18px;
  padding: 16px 16px 14px;
  color: #fff !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 132px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(55,33,1,.12);
  transition: transform .15s, box-shadow .15s;
}
.hub-card:hover  { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(55,33,1,.16); color:#fff; }
.hub-card:active { transform: scale(.98); }
.hub-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 110% -10%, rgba(255,255,255,.18), transparent 50%);
  pointer-events: none;
}
.hub-card-head {
  display: flex; justify-content: space-between; align-items: center;
  position: relative; z-index: 1;
}
.hub-step {
  font-size: .68rem; font-weight: 800; letter-spacing: .12em;
  background: rgba(255,255,255,.18);
  padding: 4px 10px;
  border-radius: 999px;
}
.hub-ico {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,.22);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}
.hub-card-body { position: relative; z-index: 1; flex: 1; }
.hub-card-body h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hub-card-body p {
  margin: 4px 0 0;
  font-size: .82rem;
  opacity: .88;
  line-height: 1.35;
}
.hub-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  position: relative; z-index: 1;
}
.hub-count {
  font-size: .72rem; font-weight: 700;
  background: rgba(255,255,255,.18);
  padding: 4px 10px;
  border-radius: 999px;
}
.hub-go {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem;
}

/* Two-up grid on desktop frame width */
@media (min-width: 460px) {
  .hub-grid { display: grid; grid-template-columns: 1fr; }
}

/* services.php category hero */
.cat-hero {
  border-radius: 18px;
  padding: 16px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 10px;
  position: relative;
  overflow: hidden;
}
.cat-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 110% -10%, rgba(255,255,255,.2), transparent 55%);
  pointer-events: none;
}
.cat-hero-ico {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(255,255,255,.22);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  position: relative; z-index: 1;
}
.cat-hero-eyebrow {
  font-size: .65rem; text-transform: uppercase; letter-spacing: .12em;
  font-weight: 700; opacity: .82;
}
.cat-hero-title {
  margin: 2px 0 2px;
  font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em;
}
.cat-hero-sub {
  margin: 0; font-size: .82rem; opacity: .88;
}

/* Service icon grid */
.svc-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.svc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--ck-line);
  border-radius: 14px;
  color: var(--ck-ink) !important;
  transition: border-color .15s, transform .08s;
}
.svc-card:hover  { border-color: var(--ck-coral); }
.svc-card:active { transform: scale(.98); }
.svc-card-ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.svc-card-body { flex: 1; min-width: 0; }
.svc-card-title { font-weight: 700; font-size: .95rem; color: var(--ck-ink); }
.svc-card-tagline {
  font-size: .76rem;
  color: var(--ck-ink-soft);
  margin-top: 1px;
}
.svc-card-meta {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 6px;
}
.svc-card-arrow {
  color: var(--ck-line);
  font-size: .85rem;
  flex-shrink: 0;
}
.svc-card:hover .svc-card-arrow { color: var(--ck-coral); }

/* Payment breakdown rows */
.pay-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0;
  font-size: .85rem;
  color: var(--ck-ink-soft);
}
.pay-row strong { color: var(--ck-ink); }

/* Service output / library */
.svc-output {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
  color: var(--ck-ink);
  background: #fff;
  border: 1px solid var(--ck-line);
  border-radius: 12px;
  padding: 12px;
  max-height: 60vh;
  overflow-y: auto;
  margin: 0;
}

.lib-grid { display: flex; flex-direction: column; gap: 10px; }
.lib-card {
  background: #fff;
  border: 1px solid var(--ck-line);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}
.lib-card > summary {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  list-style: none;
  cursor: pointer;
}
.lib-card > summary::-webkit-details-marker { display: none; }
.lib-card .lib-ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.lib-card .lib-caret { color: var(--ck-ink-soft); transition: transform .2s; flex-shrink: 0; }
.lib-card[open] .lib-caret { transform: rotate(180deg); }
.lib-card .lib-body {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .76rem;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
  color: var(--ck-ink);
  background: var(--ck-cream-soft);
  margin: 0 14px 6px;
  padding: 12px;
  border-radius: 10px;
  max-height: 320px;
  overflow-y: auto;
}
.lib-card details > div.text-end { padding: 0 14px 12px; }

@media (max-width: 880px) {
  .portal-shell { grid-template-columns: 1fr; }
  .portal-side {
    flex-direction: row;
    overflow-x: auto;
    padding: 12px;
  }
  .portal-side .brand { white-space: nowrap; padding-right: 16px; }
  .portal-side .nav-link-side { white-space: nowrap; }
  .portal-main { padding: 16px; }
}
