/* =====================================================
   Penasoft — Software UI Mockup Component Library
   -----------------------------------------------------
   Reusable, brand-consistent building blocks used to
   compose conceptual "software screenshots" (dashboards,
   sidebars, tables, KPI cards, charts, kanban, forms,
   calendars, CRM panels, phone mockups) entirely in
   HTML/CSS — no images, no JS libraries.

   NOTE: Phase-1 foundation only. The per-product dashboard
   compositions that use these classes are built in Phase 2.
   Static / CSS3 only — GoDaddy compatible.
===================================================== */

.mk {
  --mk-bg:      #f5f6f9;
  --mk-panel:   #ffffff;
  --mk-ink:     #1d1d1f;
  --mk-ink2:    #6e6e73;
  --mk-ink3:    #aeaeb2;
  --mk-line:    rgba(0,0,0,.08);
  --mk-accent:  #0071e3;
  --mk-green:   #30d158;
  --mk-orange:  #ff9500;
  --mk-violet:  #8b5cf6;
  --mk-radius:  12px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- window frame (browser chrome) ---------- */
.mk-window {
  background: var(--mk-panel);
  border: 1px solid var(--mk-line);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,.16);
  overflow: hidden;
}
.mk-window__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 14px; background: #f0f1f4; border-bottom: 1px solid var(--mk-line);
}
.mk-dot { width: 11px; height: 11px; border-radius: 50%; }
.mk-dot--r { background: #ff5f57; } .mk-dot--y { background: #febc2e; } .mk-dot--g { background: #28c840; }
.mk-window__url {
  margin-left: 10px; flex: 1; font-size: 11px; color: var(--mk-ink3);
  background: #fff; border: 1px solid var(--mk-line); border-radius: 7px; padding: 4px 12px;
}

/* ---------- app shell (sidebar + topbar + content) ---------- */
.mk-app { display: grid; grid-template-columns: 200px 1fr; background: var(--mk-bg); min-height: 420px; }
.mk-side {
  background: #131316; color: rgba(255,255,255,.75); padding: 18px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.mk-side__brand {
  display: flex; align-items: center; gap: 9px; padding: 4px 8px 16px;
  font-size: 14px; font-weight: 700; color: #fff; letter-spacing: -.3px;
}
.mk-side__brand .mk-logo {
  width: 26px; height: 26px; border-radius: 7px; background: var(--mk-accent);
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff;
}
.mk-nav {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px;
  font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,.6);
}
.mk-nav i { width: 15px; text-align: center; font-size: 12px; }
.mk-nav.active { background: rgba(255,255,255,.1); color: #fff; }
.mk-side__group { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.3); padding: 14px 11px 6px; }

.mk-main { display: flex; flex-direction: column; min-width: 0; }
.mk-top {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; background: var(--mk-panel); border-bottom: 1px solid var(--mk-line);
}
.mk-top__title { font-size: 15px; font-weight: 700; color: var(--mk-ink); letter-spacing: -.3px; }
.mk-top__search {
  margin-left: auto; font-size: 11.5px; color: var(--mk-ink3);
  background: var(--mk-bg); border: 1px solid var(--mk-line); border-radius: 8px; padding: 7px 14px; min-width: 150px;
}
.mk-top__icon {
  width: 30px; height: 30px; border-radius: 50%; background: var(--mk-bg);
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--mk-ink2);
}
.mk-avatar {
  width: 30px; height: 30px; border-radius: 50%; font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg,#0071e3,#30d158);
  display: flex; align-items: center; justify-content: center;
}
.mk-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- KPI cards ---------- */
.mk-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.mk-kpi { background: var(--mk-panel); border: 1px solid var(--mk-line); border-radius: var(--mk-radius); padding: 15px; }
.mk-kpi__label { font-size: 10.5px; color: var(--mk-ink2); text-transform: uppercase; letter-spacing: .06em; }
.mk-kpi__value { font-size: 24px; font-weight: 800; letter-spacing: -1px; color: var(--mk-ink); margin-top: 6px; }
.mk-kpi__trend { font-size: 11px; font-weight: 600; margin-top: 4px; }
.mk-up { color: var(--mk-green); } .mk-down { color: #ff3b30; }

/* ---------- generic panel ---------- */
.mk-panel { background: var(--mk-panel); border: 1px solid var(--mk-line); border-radius: var(--mk-radius); padding: 16px; }
.mk-panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mk-panel__title { font-size: 13px; font-weight: 700; color: var(--mk-ink); }
.mk-panel__sub { font-size: 11px; color: var(--mk-ink3); }
.mk-split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }

/* ---------- data table ---------- */
.mk-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.mk-table th {
  text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--mk-ink3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--mk-line);
}
.mk-table td { padding: 9px 10px; border-bottom: 1px solid var(--mk-line); color: var(--mk-ink); }
.mk-table tr:last-child td { border-bottom: none; }
.mk-pill { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; display: inline-block; }
.mk-pill--green { background: rgba(48,209,88,.14); color: #1d9d4b; }
.mk-pill--blue  { background: rgba(0,113,227,.12); color: #0071e3; }
.mk-pill--amber { background: rgba(255,149,0,.16); color: #b96b00; }
.mk-pill--gray  { background: rgba(0,0,0,.06); color: #6e6e73; }

/* ---------- bar chart ---------- */
.mk-bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 10px; }
.mk-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.mk-bar__fill { width: 100%; border-radius: 6px 6px 0 0; background: linear-gradient(180deg,#0071e3,#4da3ff); }
.mk-bar__label { font-size: 9.5px; color: var(--mk-ink3); }

/* ---------- donut (CSS conic) ---------- */
.mk-donut {
  width: 120px; height: 120px; border-radius: 50%;
  background: conic-gradient(#0071e3 0 60%, #30d158 60% 82%, #ff9500 82% 100%);
  display: flex; align-items: center; justify-content: center; margin: 0 auto;
}
.mk-donut__hole {
  width: 76px; height: 76px; border-radius: 50%; background: var(--mk-panel);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.mk-donut__n { font-size: 18px; font-weight: 800; color: var(--mk-ink); letter-spacing: -.5px; }
.mk-donut__l { font-size: 9px; color: var(--mk-ink3); text-transform: uppercase; }
.mk-legend { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.mk-legend span { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--mk-ink2); }
.mk-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ---------- line/area chart shell (for inline SVG) ---------- */
.mk-line { width: 100%; height: auto; display: block; }

/* ---------- kanban / pipeline ---------- */
.mk-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(130px,1fr); gap: 10px; overflow-x: auto; }
.mk-col { background: var(--mk-bg); border: 1px solid var(--mk-line); border-radius: 10px; padding: 10px; }
.mk-col__head { font-size: 10.5px; font-weight: 700; color: var(--mk-ink2); margin-bottom: 9px; display: flex; justify-content: space-between; }
.mk-col__head .mk-count { color: var(--mk-ink3); }
.mk-ticket { background: var(--mk-panel); border: 1px solid var(--mk-line); border-radius: 8px; padding: 9px; margin-bottom: 8px; }
.mk-ticket__t { font-size: 11px; font-weight: 600; color: var(--mk-ink); }
.mk-ticket__m { font-size: 10px; color: var(--mk-ink3); margin-top: 3px; }

/* ---------- form ---------- */
.mk-form { display: grid; gap: 12px; }
.mk-field { display: flex; flex-direction: column; gap: 5px; }
.mk-field label { font-size: 10.5px; font-weight: 600; color: var(--mk-ink2); }
.mk-field .mk-control { font-size: 11.5px; color: var(--mk-ink3); background: var(--mk-bg); border: 1px solid var(--mk-line); border-radius: 8px; padding: 9px 11px; }
.mk-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- calendar / scheduler ---------- */
.mk-cal { display: grid; grid-template-columns: repeat(7,1fr); gap: 5px; }
.mk-cal__d {
  aspect-ratio: 1; border: 1px solid var(--mk-line); border-radius: 7px;
  font-size: 10px; color: var(--mk-ink2); padding: 5px; position: relative;
}
.mk-cal__d.mk-has::after { content: ''; position: absolute; bottom: 5px; left: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--mk-accent); }
.mk-cal__d.mk-today { background: rgba(0,113,227,.1); border-color: rgba(0,113,227,.3); color: var(--mk-accent); font-weight: 700; }

/* ---------- phone mockup ---------- */
.mk-phone {
  width: 230px; border-radius: 34px; background: #131316; padding: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25); margin: 0 auto;
}
.mk-phone__screen { background: var(--mk-bg); border-radius: 24px; overflow: hidden; min-height: 430px; }
.mk-phone__top {
  background: var(--mk-accent); color: #fff; padding: 18px 16px 16px;
}
.mk-phone__top h5 { font-size: 14px; font-weight: 700; }
.mk-phone__top p { font-size: 11px; opacity: .8; }
.mk-phone__body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.mk-phone__tabbar {
  display: flex; justify-content: space-around; padding: 12px 0;
  background: var(--mk-panel); border-top: 1px solid var(--mk-line); color: var(--mk-ink3); font-size: 13px;
}
.mk-phone__tabbar .active { color: var(--mk-accent); }

/* ---------- gallery (tabs that swap a large preview) ---------- */
.mk-gallery__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.mk-gallery__tab {
  font-size: 12.5px; font-weight: 600; color: var(--mk-ink2);
  background: rgba(255,255,255,.65); border: 1px solid rgba(255,255,255,.9);
  padding: 8px 16px; border-radius: 20px; cursor: pointer; transition: all .15s;
}
.mk-gallery__tab.active { background: var(--mk-accent); color: #fff; border-color: transparent; }
.mk-gallery__panel { display: none; }
.mk-gallery__panel.active { display: block; animation: mk-fade .3s ease; }
@keyframes mk-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* subtle hover lift for any mockup card */
.mk-hover { transition: transform .25s, box-shadow .25s; }
.mk-hover:hover { transform: translateY(-4px); box-shadow: 0 18px 50px rgba(0,0,0,.14); }

/* ---------- screenshot figure + caption ---------- */
.mk-shot { position: relative; }
.mk-shot__cap { margin-top: 12px; font-size: 12.5px; color: #6e6e73; text-align: center; }
.mk-shot__cap b { color: #1d1d1f; font-weight: 600; }
.mk-tag {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #0071e3; background: rgba(0,113,227,.1); border: 1px solid rgba(0,113,227,.2);
  padding: 3px 9px; border-radius: 20px;
}

/* ---------- feature callout cards (point to UI areas) ---------- */
.mk-callout {
  display: flex; gap: 11px; align-items: flex-start;
  background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.85);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.mk-callout i { color: #0071e3; font-size: 14px; margin-top: 2px; flex-shrink: 0; }
.mk-callout b { font-size: 13.5px; color: #1d1d1f; display: block; margin-bottom: 1px; }
.mk-callout span { font-size: 12.5px; color: #6e6e73; line-height: 1.5; }

/* ---------- mini line/area chart (CSS only) ---------- */
.mk-trend { display: flex; align-items: flex-end; gap: 4px; height: 90px; }
.mk-trend > span { flex: 1; background: linear-gradient(180deg,#0071e3,#9ecbff); border-radius: 4px 4px 0 0; opacity: .9; }

/* ---------- grouped MIS table helpers ---------- */
.mk-table--mis th { text-align: center; white-space: nowrap; }
.mk-table--mis td { text-align: center; white-space: nowrap; }
.mk-table--mis .mk-grp { background: #eef2fb; font-weight: 700; color: #2a3a66; text-align: left; }
.mk-table--mis .mk-rowtot { background: #fff7e6; font-weight: 700; }
.mk-th-band { background: #3b4cca; color: #fff; }
.mk-th-band2 { background: #ff9f43; color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 768px) {
  .mk-app { grid-template-columns: 1fr; }
  .mk-side { display: none; }
  .mk-kpis { grid-template-columns: repeat(2,1fr); }
  .mk-split { grid-template-columns: 1fr; }
}
