/* DUK Fier — paneli i menaxhimit */
:root {
  --sun: #F5C342;
  --sun-tint: #FDF0C8;
  --blue: #0B5A8E;
  --blue-dark: #0A3D63;
  --ink: #0A2E4A;
  --text: #1E2830;
  --muted: #56636D;
  --line: #DDE3E7;
  --soft: #F3F5F7;
  --bg: #F6F7F8;
  --ok: #1D6B3A;   --ok-bg: #DDF1E4;
  --warn: #6E4E00; --warn-bg: #FFEFC2;
  --err: #9B2C1F;  --err-bg: #FBE3DE;
  --font: "Source Sans 3", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--font); }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
h1, h2 { color: var(--blue-dark); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 28px; }
h2 { font-size: 19px; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 50; }
.skip:focus { top: 12px; }

/* ---------- top bar ---------- */
.a-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: #fff; border-bottom: 4px solid var(--sun); padding: 10px 24px;
}
.a-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.a-brand span { display: flex; flex-direction: column; line-height: 1.15; }
.a-brand strong { font-size: 17px; }
.a-brand small { font-size: 13px; color: var(--muted); }
.a-brand-center { justify-content: center; margin-bottom: 24px; }
.a-user { display: flex; align-items: center; gap: 18px; font-size: 15px; flex-wrap: wrap; }
.a-user a { color: var(--text); }
.a-user form { margin: 0; }

/* ---------- shell ---------- */
.a-shell { display: flex; flex-wrap: wrap; min-height: calc(100vh - 62px); }
.a-nav {
  flex: 1 1 220px; max-width: 240px; background: var(--ink); padding: 18px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.a-nav a { color: #DCE7EF; text-decoration: none; padding: 10px 12px; border-radius: 4px; font-weight: 600; }
.a-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.a-nav a[aria-current="page"] { background: var(--sun); color: var(--ink); }
.a-nav-label { color: #8FA6B8; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 18px 12px 6px; }
.a-main { flex: 999 1 600px; min-width: 0; padding: 28px 32px 64px; max-width: 1200px; }

/* ---------- headings, cards ---------- */
.a-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.a-head h1 { margin: 0; }
.a-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.a-crumbs { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.a-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 20px 22px; margin-bottom: 20px; }
.a-note { background: var(--sun-tint); border-left: 0; padding: 12px 16px; border-radius: 4px; font-size: 15px; }
.a-muted { color: var(--muted); font-size: 14px; }
.a-block { display: block; }
.a-empty { color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: 6px; padding: 28px; text-align: center; }
.a-right { text-align: right; }
.a-mt { margin-top: 24px; }

.a-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.a-stat { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; text-decoration: none; color: var(--text); }
.a-stat:hover { border-color: var(--blue); color: var(--text); }
.a-stat strong { display: block; font-size: 30px; color: var(--blue-dark); line-height: 1.1; }
.a-stat span { color: var(--muted); font-size: 15px; }
.a-list { list-style: none; margin: 0; padding: 0; }
.a-list li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.a-list li:first-child { border-top: 0; }

/* ---------- flash ---------- */
.a-flash { background: var(--ok-bg); color: var(--ok); padding: 12px 16px; border-radius: 4px; margin-bottom: 18px; font-weight: 600; }
.a-flash-error { background: var(--err-bg); color: var(--err); }
.a-flash-action { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.a-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 18px;
  font: inherit; font-weight: 600; font-size: 15px; border: 1px solid var(--line); border-radius: 4px;
  background: #fff; color: var(--ink); text-decoration: none; cursor: pointer;
}
.a-btn:hover { border-color: var(--blue); color: var(--ink); }
.a-btn-primary { background: var(--sun); border-color: var(--sun); }
.a-btn-primary:hover { background: #E9AE14; border-color: #E9AE14; }
.a-btn-quiet { background: transparent; border-color: transparent; color: var(--blue); }
.a-btn-quiet:hover { background: var(--soft); border-color: transparent; }
.a-btn-danger { background: #fff; border-color: #E2A79D; color: var(--err); }
.a-btn-danger:hover { background: var(--err-bg); border-color: var(--err); color: var(--err); }
.a-btn-small { min-height: 34px; padding: 4px 12px; font-size: 14px; }
.a-btn-block { width: 100%; margin-top: 8px; }
.a-link-danger { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 14px; color: var(--err); cursor: pointer; text-decoration: underline; }

/* ---------- forms ---------- */
.a-form { display: flex; flex-direction: column; gap: 16px; }
.a-form-narrow { max-width: 620px; }
.a-form-wide { max-width: none; }
.a-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; color: var(--blue-dark); flex: 1 1 200px; min-width: 0; }
.a-field-inline { flex: 0 1 auto; }
.a-hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.a-field input[type="text"], .a-field input[type="email"], .a-field input[type="password"], .a-field input[type="search"],
.a-field input[type="tel"], .a-field input[type="number"], .a-field input[type="date"], .a-field input[type="url"],
.a-field input:not([type]), .a-field select, .a-field textarea, .a-inline-form input {
  font: inherit; font-size: 15px; font-weight: 400; color: var(--text); background: #fff;
  border: 1px solid #B6C1C9; border-radius: 4px; padding: 9px 11px; width: 100%; min-height: 42px;
}
.a-field textarea { resize: vertical; line-height: 1.5; }
.a-field input[type="file"] { font-weight: 400; font-size: 14px; }
.a-field input:focus, .a-field select:focus, .a-field textarea:focus { border-color: var(--blue); outline: 2px solid rgba(11,90,142,.25); outline-offset: 0; }
.a-check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; padding: 6px 0; flex-wrap: wrap; }
.a-check input { width: 20px; height: 20px; accent-color: var(--blue); }
.a-row { display: flex; flex-wrap: wrap; gap: 16px; }
.a-fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.a-fieldset legend { font-weight: 700; color: var(--blue-dark); padding: 0 6px; }
.a-readonly { margin: 0; font-weight: 400; color: var(--text); }
.a-err { color: var(--err); font-weight: 600; font-size: 14px; }
.a-err:empty { display: none; }
.a-errors { background: var(--err-bg); color: var(--err); padding: 12px 16px; border-radius: 4px; font-weight: 600; font-size: 15px; }
.a-errors ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }
.input-validation-error { border-color: var(--err) !important; }

/* In a column, fields take their natural height (flex-basis would otherwise become their height). */
.a-col-main > .a-field, .a-form > .a-field, .a-stack > .a-field, .a-fieldset > .a-field { flex: 0 0 auto; }

.a-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.a-col-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.a-col-side { flex: 1 1 260px; min-width: 0; position: sticky; top: 16px; }
.a-col-side .a-card { display: flex; flex-direction: column; gap: 12px; }

.a-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.a-filters input[type="search"] { min-width: 240px; }

.a-danger-zone { margin-top: 32px; padding: 18px 20px; border: 1px solid #EBC3BB; border-radius: 6px; background: #fff; }
.a-danger-zone p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }

/* ---------- image picker ---------- */
.a-picker { border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px 16px; margin: 0; background: #fff; display: flex; flex-direction: column; gap: 14px; }
.a-picker legend { font-weight: 700; color: var(--blue-dark); padding: 0 6px; }
.a-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; max-height: 300px; overflow: auto; padding: 2px; }
.a-pick { position: relative; cursor: pointer; display: block; }
.a-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.a-pick img, .a-pick-none { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; border: 3px solid transparent; background: var(--soft); }
.a-pick-none { display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.a-pick input:checked + img, .a-pick input:checked + .a-pick-none { border-color: var(--blue); box-shadow: 0 0 0 2px #fff inset; }
.a-pick input:focus-visible + img, .a-pick input:focus-visible + .a-pick-none { outline: 3px solid var(--sun); outline-offset: 1px; }

/* ---------- tables ---------- */
.a-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.a-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.a-table th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
.a-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.a-table tr:last-child td { border-bottom: 0; }
.a-row-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.a-row-title a { font-weight: 600; }
.a-thumb { width: 56px; height: 40px; object-fit: cover; border-radius: 3px; flex: none; }
.a-thumb-empty { display: inline-block; background: var(--soft); border: 1px dashed var(--line); }

.a-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 3px; white-space: nowrap; background: var(--soft); color: var(--muted); }
.a-tag-ok, .a-status-perfunduar { background: var(--ok-bg); color: var(--ok); }
.a-tag-draft { background: #E6E9EC; color: #4A5560; }
.a-tag-warn, .a-status-ne-zbatim { background: var(--warn-bg); color: var(--warn); }
.a-tag-featured { background: var(--sun-tint); color: var(--warn); }
.a-status-planifikuar { background: #E2EDF6; color: var(--blue); }

/* ---------- media library ---------- */
.a-upload .a-row { margin-bottom: 14px; }
.a-media { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.a-media-item { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.a-media-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft); }
.a-media-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.a-media-body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-media-body form { margin: 0; }
.a-inline-form { display: flex; gap: 6px; margin-top: 6px !important; }
.a-inline-form input { min-height: 34px; padding: 4px 8px; font-size: 14px; }

.a-dl { margin: 0; }
.a-dl div { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.a-dl div:first-child { border-top: 0; }
.a-dl dt { width: 90px; color: var(--muted); }
.a-dl dd { margin: 0; font-weight: 600; }

/* ---------- login ---------- */
.a-auth { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; background: var(--ink); }
.a-auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 8px; padding: 38px 32px 28px; box-shadow: inset 0 6px 0 var(--sun); }
.a-auth-card h1 { font-size: 24px; text-align: center; }

/* ---------- site content editors (Përmbajtja e faqes) ---------- */
html:not(.js) .js-only { display: none !important; }
.js .no-js-only { display: none !important; }

.a-lead { font-size: 17px; color: var(--muted); max-width: 780px; margin: -6px 0 22px; }
.a-note-block { margin: -8px 0 22px; max-width: 780px; }
.a-content-form { gap: 20px; }
.a-errors-title { margin: 0 0 6px; }
.a-errors:focus { outline: 3px solid var(--err); outline-offset: 2px; }
.a-sec { padding: 22px 24px 24px; margin-bottom: 0; }
.a-sec > h2 { margin-bottom: 4px; }
.a-sec-hint { margin: 0 0 18px; color: var(--muted); font-size: 15px; max-width: 760px; }
.a-stack { display: flex; flex-direction: column; gap: 16px; }
.a-field > label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.a-field > .a-hint { margin-top: -3px; }
.a-opt { font-weight: 600; font-size: 12px; color: var(--muted); background: var(--soft); border-radius: 3px; padding: 0 6px; }
.a-check-field { display: flex; flex-direction: column; gap: 2px; }
.a-check-field .a-hint { padding-left: 30px; }
.a-field input[aria-invalid="true"], .a-field textarea[aria-invalid="true"], .a-field select[aria-invalid="true"] { border-color: var(--err); }

/* repeater rows */
.a-rep { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.a-rep > .a-hint, .a-rep > .a-err { margin: 0; }
.a-rep-rows { display: flex; flex-direction: column; gap: 12px; }
.a-rep-row {
  margin: 0; min-width: 0; padding: 10px 14px 16px;
  border: 1px solid var(--line); border-radius: 6px; background: #FBFCFD;
}
.a-rep-row > legend {
  float: left; padding: 0; margin: 0; max-width: calc(100% - 156px);
  font-weight: 700; color: var(--blue-dark); line-height: 36px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html:not(.js) .a-rep-row > legend { max-width: 100%; }
.a-rep-peek { font-weight: 400; color: var(--muted); }
.a-rep-peek:not(:empty)::before { content: "· "; }
.a-rep-tools { float: right; display: flex; gap: 4px; }
.a-rep-body { clear: both; padding-top: 10px; }
.a-rep-empty { margin: 0; padding: 14px; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); text-align: center; font-size: 15px; background: #fff; }
.a-rep-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.a-rep-add { border-style: dashed; border-color: #9FB3C2; color: var(--blue); background: #fff; }
.a-rep-add:disabled { opacity: .5; cursor: not-allowed; }
.a-rep-nested { padding-left: 2px; }
.a-rep-nested .a-rep-row { border-left: 1px solid var(--line); background: #fff; padding-bottom: 12px; }
.a-rep-nested .a-rep-row > legend { font-weight: 600; font-size: 15px; }
.a-rep-flash { animation: a-rep-flash 1.4s ease-out; }
@keyframes a-rep-flash { from { background: var(--sun-tint); } }

.a-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 36px; height: 36px; padding: 0 9px;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 4px; cursor: pointer;
}
.a-icon-btn svg { width: 16px; height: 16px; flex: none; }
.a-icon-btn:hover { border-color: var(--blue); }
.a-icon-btn[aria-disabled="true"] { opacity: .35; cursor: default; }
.a-icon-btn[aria-disabled="true"]:hover { border-color: var(--line); }
.a-icon-btn-danger { color: var(--err); border-color: #E2A79D; }
.a-icon-btn-danger:hover { background: var(--err-bg); border-color: var(--err); }

/* image fields */
.a-imgfield { margin: 0; min-width: 0; padding: 12px 16px 16px; border: 1px solid var(--line); border-radius: 6px; background: #fff; display: flex; flex-direction: column; gap: 12px; }
.a-imgfield > legend { font-weight: 600; font-size: 15px; color: var(--blue-dark); padding: 0 6px; }
.a-imgfield > .a-hint { margin: -4px 0 0; }
.a-imgfield-invalid { border-color: var(--err); }
.a-imgfield-now { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.a-imgfield-frame {
  flex: none; width: 176px; aspect-ratio: 4 / 3; overflow: hidden; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 4px; background: var(--soft);
}
.a-imgfield-frame img { width: 100%; height: 100%; object-fit: cover; }
.a-imgfield-logo { width: 88px; aspect-ratio: 1; background: #fff; }
.a-imgfield-logo img { object-fit: contain; padding: 10px; }
.a-imgfield-none { font-size: 13px; font-weight: 600; color: var(--muted); }
.a-imgfield-meta { display: flex; flex-direction: column; gap: 2px; flex: 1 1 160px; min-width: 0; font-size: 15px; }
.a-imgfield-meta strong { overflow-wrap: anywhere; }
.a-imgfield-note { font-size: 13px; color: var(--warn); background: var(--warn-bg); border-radius: 3px; padding: 2px 8px; align-self: flex-start; }
.a-imgfield-pick { border-top: 1px solid var(--line); padding-top: 4px; }
.a-imgfield-pick > summary {
  display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; list-style: none;
  font-weight: 600; color: var(--blue);
}
.a-imgfield-pick > summary::-webkit-details-marker { display: none; }
.a-imgfield-pick > summary::before {
  content: ""; width: 7px; height: 7px; margin-left: 2px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s;
}
.a-imgfield-pick[open] > summary::before { transform: rotate(45deg); }
.a-imgfield-pick > summary:hover { color: var(--blue-dark); }
.a-imgfield-group { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 12px; }
.a-imgfield-group p { margin: 0; }
.a-imgfield-sub { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.a-pick-cap { display: block; margin-top: 4px; font-size: 12px; line-height: 1.25; text-align: center; color: var(--muted); }
.a-pick input:checked ~ .a-pick-cap { color: var(--blue-dark); font-weight: 700; }

/* save bar */
.a-savebar {
  position: sticky; bottom: 0; z-index: 5; display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 12px 16px; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 -6px 18px rgba(10,46,74,.08);
}
.a-savebar-note { color: var(--muted); font-size: 14px; }
.a-danger-zone h2 { font-size: 17px; margin-bottom: 6px; }

/* overview */
.a-subhead { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 0 12px; }
.a-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 28px; }
.a-section-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.a-section-card:hover { border-color: #B6C1C9; }
.a-section-card h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.a-section-card h3 a { color: var(--blue-dark); text-decoration: none; }
.a-section-card h3 a:hover { text-decoration: underline; }
.a-section-card p { margin: 0; flex: 1; font-size: 15px; color: var(--muted); }
.a-section-card .a-actions { margin-top: 6px; }
.a-quick { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  .a-rep-flash { animation: none; }
  .a-imgfield-pick > summary::before { transition: none; }
}

@media (max-width: 760px) {
  .a-nav { max-width: none; flex-direction: row; flex-wrap: wrap; padding: 8px; }
  .a-nav-label { display: none; }
  .a-main { padding: 20px 16px 48px; }
  .a-top { padding: 10px 16px; }
  .a-col-side { position: static; }
  .a-filters input[type="search"] { min-width: 0; width: 100%; }
  .a-auth-card { padding: 24px 20px; }
  .a-sec { padding: 18px 16px 20px; }
  .a-rep-row { padding: 8px 10px 14px; }
  .a-imgfield { padding: 10px 12px 14px; }
  .a-imgfield-frame { width: 128px; }
  .a-picker-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .a-savebar { padding: 10px 12px; }
  .a-savebar .a-btn { flex: 1 1 auto; }
  .a-savebar-note { display: none; }
}

@media (max-width: 420px) {
  .a-icon-btn-danger span { display: none; }
  .a-rep-row > legend { max-width: calc(100% - 122px); }
}
