/* pagat.konsulence.al — tokenat sipas kontratës KONSULENCE UI */
:root {
  --background: #f6f8f7;
  --foreground: #0f1f1a;
  --card: #ffffff;
  --card-foreground: #0f1f1a;
  --popover: #ffffff;
  --primary: #1a8547;            /* jeshilja e logos, e errësuar për tekst (≥ 4.5:1) */
  --primary-foreground: #ffffff;
  --brand: #33cc66;              /* jeshilja e logos */
  --muted: #eef2f0;
  --muted-foreground: #5b6b65;
  --accent: #e8f6ee;
  --accent-foreground: #12643a;
  --warning: #9a5b00;
  --warning-bg: #fff7e6;
  --border: #e1e7e4;
  --input: #c9d3cf;
  --ring: #1a8547;               /* fokusi: jeshile e errët, ≥ 3:1 në të bardhë */
  --radius: 12px;
  --gutter: clamp(16px, 3vw, 48px); /* hapësira anësore e njëjtë për logon, përmbajtjen dhe fundin */
  --shadow-xs: 0 1px 2px rgba(15, 31, 26, .06);
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-tight: "Inter Tight", var(--font-sans);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --background: #0b1311;
  --foreground: #e6efeb;
  --card: #121c19;
  --card-foreground: #e6efeb;
  --popover: #18241f;
  --primary: #3ccf73;
  --primary-foreground: #06200f;
  --muted: #1a2622;
  --muted-foreground: #98a9a2;
  --accent: #133022;
  --accent-foreground: #8ee6ad;
  --warning: #f2b54a;
  --warning-bg: #2a2010;
  --border: #23312c;
  --input: #34463f;
  --ring: #3ccf73;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--background);
  color: var(--foreground);
  font: 15px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--primary); }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Shiriti i sipërm */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px var(--gutter); background: var(--card); border-bottom: 1px solid var(--border);
}
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.home-btn { gap: 6px; padding: 0 10px; font-weight: 500; color: var(--foreground); text-decoration: none; }
.home-btn .ico { color: var(--primary); }
@media (max-width: 520px) { .home-btn span { display: none; } .home-btn { width: 40px; padding: 0; } }
.lang-btn { gap: 6px; padding: 0 10px; font-weight: 500; color: var(--foreground); }
.lang-btn .ico { color: var(--muted-foreground); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-home { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--foreground); border-radius: 8px; }
.brand-mark { flex-shrink: 0; border-radius: 22%; }
:root[data-theme="dark"] .brand-mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.brand-name { font: 700 19px/1 var(--font-tight); letter-spacing: -.02em; }
.brand-by { padding-left: 12px; border-left: 1px solid var(--border); color: var(--muted-foreground); font: 500 11px/1.2 var(--font-tight); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.brand-by:hover { color: var(--primary); }
@media (max-width: 420px) { .brand-by { display: none; } }

/* Butonat */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent;
  font: 600 14px/1 var(--font-tight); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline { background: var(--card); color: var(--foreground); border-color: var(--input); box-shadow: var(--shadow-xs); }
.btn-outline:hover { background: var(--muted); }
.btn-ghost { background: transparent; color: var(--muted-foreground); }
.btn-ghost:hover { background: var(--muted); color: var(--foreground); }
.btn-icon { width: 40px; padding: 0; }

/* Menuja e pamjes */
.menu { position: relative; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 190px;
  background: var(--popover); border: 1px solid var(--border); border-radius: 10px; padding: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
}
.menu-list button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--foreground); font: 500 14px var(--font-tight); cursor: pointer; text-align: left;
}
.menu-list button:hover { background: var(--muted); }
.menu-list .tick { margin-left: auto; visibility: hidden; color: var(--primary); }
.menu-list [aria-checked="true"] .tick { visibility: visible; }

/* Faqja */
.page { width: 100%; padding: 28px var(--gutter) 8px; flex: 1; }
.page-head h1 { font: 700 clamp(24px, 4vw, 32px)/1.15 var(--font-tight); margin: 0 0 6px; letter-spacing: -.01em; }
.lede { margin: 0 0 22px; color: var(--muted-foreground); }
.page-head .stale, .doc .stale { margin: -8px 0 20px; max-width: 960px; }

/* Brenda faqes pritëse (?embed=1): vetëm kalkulatori */
.embed body { min-height: 0; background: transparent; }
.embed .topbar, .embed .footer, .embed .cta, .embed .page-head h1, .embed .lede { display: none; }
.embed .page { padding: 2px 2px 4px; }
.embed .page-head .stale { margin: 0 0 16px; }

.grid { display: grid; gap: 16px; }
@media (min-width: 880px) { .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

.card {
  background: var(--card); color: var(--card-foreground); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-xs); min-width: 0;
}
.card-title { font: 600 16px var(--font-tight); margin: 0 0 14px; }

/* Bruto / Neto */
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; gap: 4px; background: var(--muted); border-radius: 10px; margin-bottom: 18px; }
.segmented button {
  height: 36px; border: 0; border-radius: 7px; background: transparent; color: var(--muted-foreground);
  font: 600 14px var(--font-tight); cursor: pointer;
}
.segmented [aria-checked="true"] { background: var(--card); color: var(--foreground); box-shadow: var(--shadow-xs); }

.field-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field-label-row { display: flex; align-items: center; gap: 6px; }
.field-label-row .info { margin-bottom: 6px; }
.keypad-toggle { margin: -6px -8px 0 auto; width: 36px; height: 36px; color: var(--muted-foreground); }
.keypad-toggle[aria-pressed="true"] { background: var(--accent); color: var(--accent-foreground); }

/* Tastiera numerike: 7–9, 4–6, 1–3, 0 / 000; djathtas fshirja dhe pastrimi */
.keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: -6px 0 16px; }
.keypad[hidden] { display: none; }
.key {
  height: 50px; border: 1px solid var(--input); border-radius: 10px; background: var(--card); color: var(--foreground);
  font: 600 20px/1 var(--font-tight); font-variant-numeric: tabular-nums; cursor: pointer; box-shadow: var(--shadow-xs);
  display: flex; align-items: center; justify-content: center; touch-action: manipulation; user-select: none;
}
.key:hover { background: var(--muted); }
.key:active { transform: scale(.97); }
.key .ico { width: 22px; height: 22px; }
.key-wide { grid-column: span 2; }
.key-tall { grid-row: span 2; height: auto; }
.key-muted { background: var(--muted); color: var(--muted-foreground); }
.key-muted:hover { color: var(--foreground); }
@media (max-width: 460px) { .key { height: 46px; } .key-tall { height: auto; } }
.amount {
  display: flex; align-items: center; border: 1px solid var(--input); border-radius: 10px;
  background: var(--card); padding: 0 14px; margin-bottom: 16px; transition: border-color .15s, box-shadow .15s;
}
.amount:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 25%, transparent); }
.amount input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--foreground);
  font: 700 28px/1 var(--font-tight); padding: 12px 0; font-variant-numeric: tabular-nums;
}
.amount-suffix { color: var(--muted-foreground); font-weight: 600; }


/* Ndërprerësit */
.switch-row { display: flex; align-items: center; gap: 6px; padding: 8px 0; border-top: 1px solid var(--border); }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--input); transition: background .2s; flex-shrink: 0; }
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--ring); outline-offset: 2px; }

/* (i) */
.info { position: relative; display: inline-flex; color: var(--muted-foreground); cursor: help; vertical-align: middle; border-radius: 50%; }
.info .ico { width: 16px; height: 16px; }
.info-pop {
  display: none; position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 15;
  width: min(280px, 80vw); padding: 10px 12px; border-radius: 8px; background: var(--popover); color: var(--foreground);
  border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
  font: 400 13px/1.45 var(--font-sans); text-align: left; white-space: normal;
}
.info:hover .info-pop, .info:focus .info-pop, .info.is-open .info-pop { display: block; }
.info.edge-left .info-pop { left: 0; transform: none; }
.info.edge-right .info-pop { left: auto; right: 0; transform: none; }

.alert { display: flex; gap: 10px; margin-top: 14px; padding: 12px; border-radius: 10px; font-size: 14px; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent); }
.alert[hidden] { display: none; }

/* Rezultati */
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: var(--muted); border-radius: 10px; padding: 12px; min-width: 0; }
.stat span { display: block; font-size: 12px; color: var(--muted-foreground); font-weight: 500; }
.stat strong { display: block; font: 700 clamp(17px, 2.6vw, 22px)/1.2 var(--font-tight); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-primary { background: var(--accent); }
.stat-primary span, .stat-primary strong { color: var(--accent-foreground); }
@media (max-width: 460px) {
  .summary { grid-template-columns: 1fr 1fr; }
  .stat-primary { grid-column: 1 / -1; }
  .stat-primary strong { font-size: 26px; }
}

.rows { margin: 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; font-size: 14px; }
.row + .row { border-top: 1px dashed var(--border); }
.row dt { color: var(--foreground); }
.row dt .info { margin-left: 5px; }
.row dd { margin: 0; font: 600 14px var(--font-tight); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-total dt, .row-total dd { font-weight: 700; }
.row-subtotal { border-top: 1px solid var(--border) !important; }
.row-subtotal dt, .row-subtotal dd { font-weight: 700; }
.row-note dt, .row-note dd { color: var(--muted-foreground); font-weight: 500; }
h3.row-group { margin: 0; }
.rows { margin: 0; }
.row-group { margin-top: 10px; padding: 6px 0 2px; font: 600 12px var(--font-tight); text-transform: uppercase; letter-spacing: .06em; color: var(--muted-foreground); }

.row-hint { margin: 4px 0 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted-foreground); font-weight: 500; }


/* Ndarja e kostos: neto e punonjësit dhe detyrimi ndaj shtetit */
.split { margin: 0 0 6px; }
.split-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--muted); }
.split-net { background: var(--primary); }
.split-state { background: var(--muted-foreground); opacity: .55; }
.split-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 0; font-size: 13.5px; }
.split-legend strong { font: 700 13.5px var(--font-tight); font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot-net { background: var(--primary); }
.dot-state { background: var(--muted-foreground); opacity: .55; }

/* Më shumë opsione: seksion i palosshëm për opsionet që përdoren rrallë */
.more { border-top: 1px solid var(--border); }
.more > summary { list-style: none; display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; cursor: pointer; border-radius: 8px; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary:hover .more-title { color: var(--primary); }
.more-chevron { margin-top: 2px; color: var(--muted-foreground); transition: transform .2s; }
.more[open] .more-chevron { transform: rotate(180deg); }
.more-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.more-title { font-weight: 600; font-size: 14px; }
.more-list { color: var(--muted-foreground); font-size: 12.5px; line-height: 1.4; }
.more[open] .more-list { display: none; }
.more-count { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-foreground); font: 600 12px var(--font-tight); }
.more-count[hidden] { display: none; }
.more-body { padding-bottom: 4px; }

/* Orët e punës: etiketa majtas, fushë e vogël djathtas */
.hours-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 2px; border-top: 1px solid var(--border); }
.hours-label { display: flex; align-items: center; gap: 6px; }
.hours-label .field-label { margin: 0; font-weight: 500; }
.amount-xs { width: 120px; margin-bottom: 0; flex-shrink: 0; }
.amount-xs input { font: 600 16px/1 var(--font-tight); padding: 8px 0; text-align: right; }
.amount-xs .amount-suffix { margin-left: 6px; font-size: 13px; }
.hours-hint { margin: 2px 0 8px; }

/* Ditët e punuara: dy fusha të vogla "15 nga 30 ditë" */
.days-inputs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted-foreground); }
.amount-days { width: 64px; margin-bottom: 0; padding: 0 10px; }
.amount-days input { font: 600 16px/1 var(--font-tight); padding: 8px 0; text-align: center; }

/* Paga te punëdhënësi tjetër */
.field-sub { padding: 2px 0 10px 52px; }
.amount-sm { margin-bottom: 0; }
.amount-sm input { font-size: 20px; padding: 9px 0; }
@media (max-width: 460px) { .field-sub { padding-left: 0; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.actions [data-reset] { margin-left: auto; }

.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.cta h2 { font: 600 17px var(--font-tight); margin: 0 0 4px; }
.cta p { margin: 0; color: var(--muted-foreground); font-size: 14px; }

.note { color: var(--muted-foreground); font-size: 12.5px; margin: 18px 0 0; max-width: 960px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-nav a { color: var(--muted-foreground); text-decoration: none; }
.footer-nav a:hover, .footer-nav a[aria-current="page"] { color: var(--primary); text-decoration: underline; }

/* Faqet informuese (baza ligjore, kushtet) */
.back { display: inline-flex; align-items: center; gap: 6px; font: 600 14px var(--font-tight); text-decoration: none; margin-bottom: 14px; }
.doc p { max-width: 960px; }
.doc h1 { font: 700 clamp(24px, 4vw, 30px)/1.2 var(--font-tight); margin: 0 0 6px; }
.doc h2 { font: 600 18px var(--font-tight); margin: 28px 0 10px; }
.doc p, .doc li { line-height: 1.6; }
.doc ul { padding-left: 20px; }
.doc .law-list { padding-left: 0; }
.doc .meta { color: var(--muted-foreground); font-size: 14px; margin: 0 0 18px; }
.law-list { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.law { padding: 16px 18px; }
.law h3 { font: 600 15.5px/1.35 var(--font-tight); margin: 0 0 4px; }
.law p { margin: 0 0 10px; color: var(--muted-foreground); font-size: 14px; }
.law-links { display: flex; flex-wrap: wrap; gap: 8px; }
.law-links a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--input); border-radius: 8px; background: var(--card); color: var(--foreground); font: 500 13px var(--font-tight); text-decoration: none; box-shadow: var(--shadow-xs); }
.law-links a:hover { background: var(--muted); }
.law-links .ico { width: 15px; height: 15px; }
.terms dt { font-weight: 600; margin-top: 10px; }
.terms dd { margin: 2px 0 0; color: var(--muted-foreground); }

.footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  width: 100%; margin: 24px 0 0; padding: 16px var(--gutter); color: var(--muted-foreground); font-size: 13px;
  border-top: 1px solid var(--border);
}

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px;
  background: var(--foreground); color: var(--background); font: 500 14px var(--font-tight);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}
.toast[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
