/* Aneksi A: sistem dizajni minimalist, i gjere dhe i njejte ne cdo faqe.
   Eshte stili i vetem i aplikacionit (app.css perdoret vetem nga kodi i vjeter MySQL). */

:root {
    --bg: #f7f8fa; --surface: #fff; --subtle: #f9fafb;
    --line: #e7e9ee; --line-strong: #d5d9e0;
    --text: #0f172a; --soft: #667085; --faint: #98a2b3;
    --primary: #0b5cab; --primary-dark: #084a8c; --primary-tint: #eef5fd;
    --ok: #067647; --ok-tint: #ecfdf3; --warn: #93590a; --warn-tint: #fef6e7; --bad: #b42318; --bad-tint: #fef3f2;
    --radius: 14px; --radius-s: 9px; --gap: 20px; --wide: 1560px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, figure, ul { margin: 0; padding: 0; }
h1 { font-size: 28px; line-height: 1.2; font-weight: 650; letter-spacing: -.022em; }
h2 { font-size: 15px; line-height: 1.4; font-weight: 650; letter-spacing: -.005em; }
h3 { font-size: 14px; font-weight: 650; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
i[data-lucide], svg.lucide { width: 16px; height: 16px; flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
small { font-size: 12px; }
[hidden], .is-hidden { display: none !important; }
.muted { color: var(--soft); }
.negative { color: var(--bad); }
.positive { color: var(--ok); }
:is(a, button, summary):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Format ---------- */
label { display: grid; gap: 6px; align-content: start; min-width: 0; font-size: 13px; font-weight: 550; color: #344054; }
:is(input, select, textarea):not([type="checkbox"], [type="radio"], [type="hidden"]) { width: 100%; min-width: 0; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: #fff; font-size: 14px; font-weight: 400; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; }
:is(input, select, textarea):focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 92, 171, .14); }
:is(input, textarea)[readonly] { background: var(--subtle) !important; color: var(--soft); }
::placeholder { color: var(--faint); }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: #fff; color: var(--text); font-size: 13.5px; font-weight: 550; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--subtle); border-color: #c2c7d0; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--subtle); }
.btn.small { min-height: 32px; padding: 4px 11px; font-size: 12.5px; }
.btn.danger-button { color: var(--bad); border-color: #fbd5d1; }
.btn.danger-button:hover { background: var(--bad-tint); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Korniza ---------- */
.ui-top { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); }
.ui-top-in { max-width: var(--wide); margin: 0 auto; padding: 0 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; column-gap: 20px; }
.ui-brand { display: flex; align-items: center; gap: 14px; flex: none; min-height: 64px; }
.ui-brand img { width: 104px; height: auto; }
.ui-brand span { padding-left: 14px; border-left: 1px solid var(--line); font-size: 13px; font-weight: 650; white-space: nowrap; }
.ui-nav { order: 3; display: flex; flex-basis: 100%; gap: 4px; height: 46px; min-width: 0; overflow-x: auto; scrollbar-width: thin; border-top: 1px solid var(--line); }
.ui-nav a { display: flex; flex: none; align-items: center; gap: 7px; padding: 0 12px; border-bottom: 2px solid transparent; color: var(--soft); font-size: 13.5px; font-weight: 550; white-space: nowrap; }
.ui-nav a:first-child { padding-left: 0; }
.ui-nav a:hover { color: var(--text); }
.ui-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--primary); }
.ui-nav a[aria-current="page"] svg { color: var(--primary); }
.ui-meta { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ui-year { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border: 1px solid var(--line); border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ui-user { display: flex; align-items: center; gap: 10px; }
.ui-user-name { display: grid; text-align: right; line-height: 1.3; max-width: 320px; min-width: 0; }
.ui-user-name :is(strong, small) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-user-name strong { font-size: 13px; font-weight: 600; }
.ui-user-name small { color: var(--soft); }
.avatar-mini { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--primary-tint); color: var(--primary); font-size: 13px; font-weight: 650; }
.ui-content { max-width: var(--wide); margin: 0 auto; padding: 32px 32px 72px; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-content: start; }
.ui-content > * { min-width: 0; }
.ui-guest { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

/* ---------- Titujt, panelet, treguesit ---------- */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 4px; }
.page-head > div:first-child { min-width: 0; }
.page-head p { margin-top: 6px; color: var(--soft); max-width: 80ch; }
.page-head .eyebrow, .eyebrow { margin: 0 0 6px; color: var(--soft); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.back-link { display: inline-block; margin-bottom: 14px; color: var(--soft); font-size: 13px; font-weight: 550; }
.back-link:hover { color: var(--primary); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.panel-head > span, .panel-head > strong { color: var(--soft); font-size: 13px; font-weight: 550; }
.panel-head a { color: var(--primary); font-size: 13px; font-weight: 550; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { display: grid; gap: 2px; align-content: start; padding: 20px 24px; background: var(--surface); }
.stat > span { color: var(--soft); font-size: 12.5px; font-weight: 550; }
.stat > strong { font-size: 30px; line-height: 1.25; font-weight: 650; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.stat > small { color: var(--faint); }
.stat .progress-line { margin-top: 8px; }
.stat.warn > strong { color: var(--warn); }
.stat.ok > strong { color: var(--ok); }

.columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
.columns.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.progress-line { height: 6px; border-radius: 99px; background: #eceff3; overflow: hidden; }
.progress-line i { display: block; height: 100%; border-radius: 99px; background: var(--primary); transition: width .3s; }

/* Shiritat horizontale */
.bar-list { display: grid; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(80px, 1fr) 72px; gap: 18px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.bar-row:first-child { border-top: 0; padding-top: 0; }
.bar-row > div:first-child { display: grid; min-width: 0; }
.bar-row > div:first-child :is(strong, small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row strong { font-size: 13.5px; font-weight: 600; }
.bar-row small { color: var(--soft); }
.bar-row > b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
a.bar-row:hover strong, a.professor-link:hover { color: var(--primary); }

.columns-chart { display: flex; align-items: flex-end; gap: 14px; height: 200px; overflow-x: auto; padding-top: 4px; }
.columns-chart > div { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 6px; flex: 1 0 44px; max-width: 76px; height: 100%; }
.columns-chart :is(b, small) { color: var(--soft); font-size: 11.5px; font-weight: 550; white-space: nowrap; }
.columns-chart span { display: flex; align-items: flex-end; width: 28px; height: 100%; }
.columns-chart i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: var(--primary); }

.status-list { display: grid; }
.status-row { display: grid; grid-template-columns: 8px 1fr auto; gap: 4px 12px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.status-row:first-child { border-top: 0; padding-top: 0; }
.status-row i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.status-row strong { font-weight: 650; font-variant-numeric: tabular-nums; }
.status-row small { grid-column: 2 / -1; color: var(--soft); }
.status-row.status-approved i { background: var(--ok); }
.status-row:is(.status-submitted, .status-corrected) i { background: #dc8b0c; }
.status-row.status-rejected i { background: var(--bad); }
.status-row.status-draft i { background: var(--faint); }

/* Shenjat */
.status-pill, .pending-pill, .badge { display: inline-flex; align-items: center; justify-self: start; padding: 2px 10px; border-radius: 99px; background: var(--primary-tint); color: var(--primary); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.status-approved:is(.status-pill, .badge), .badge.is-open { background: var(--ok-tint); color: var(--ok); }
:is(.status-submitted, .status-corrected, .status-pending):is(.status-pill, .badge), .pending-pill { background: var(--warn-tint); color: var(--warn); }
.status-rejected:is(.status-pill, .badge), .badge.is-closed { background: var(--bad-tint); color: var(--bad); }
.status-draft:is(.status-pill, .badge), .pending-pill.is-zero { background: #f2f4f7; color: var(--soft); }
.section-code { display: inline-flex; align-items: center; justify-content: center; justify-self: start; padding: 2px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--subtle); color: #344054; font-size: 11.5px; font-weight: 650; white-space: nowrap; }

/* Butonat e filtrimit dhe skedat */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--soft); font-size: 13px; font-weight: 550; }
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.is-active { background: var(--text); border-color: var(--text); color: #fff; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { padding: 0 0 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--soft); font-weight: 600; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--primary); }
.tab-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.toolbar input[type="search"] { max-width: 420px; }

/* Tabelat */
.table-scroll { overflow-x: auto; }
.table-panel { padding-bottom: 8px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--soft); font-size: 12px; font-weight: 550; text-align: left; white-space: nowrap; }
.data-table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr > :first-child { padding-left: 0; }
.data-table tr > :last-child { padding-right: 0; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--subtle); }
.data-table td small { display: block; color: var(--soft); }
.data-table td strong { font-weight: 600; }
.data-table input[type="number"] { width: 110px; min-height: 36px; padding: 5px 10px; }
.data-table .progress-line { width: 140px; margin-bottom: 3px; }
.merged-subject-display { color: var(--warn) !important; font-weight: 550; }

.empty-state { padding: 48px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--soft); text-align: center; }
.empty-state .btn { margin-top: 16px; }
.empty-state p { margin-top: 6px; }
.notice { padding: 12px 16px; border: 1px solid; border-radius: var(--radius-s); font-weight: 550; }
.notice.success { background: var(--ok-tint); border-color: #bbecd0; color: var(--ok); }
.notice.danger { background: var(--bad-tint); border-color: #fbd5d1; color: var(--bad); }

/* ---------- Plotesimi ---------- */
.annex { display: grid; grid-template-columns: 280px minmax(0, 1fr) 300px; gap: var(--gap); align-items: start; }
.annex > * { min-width: 0; }
.annex-nav { position: sticky; top: 128px; display: grid; gap: 14px; max-height: calc(100vh - 148px); padding: 16px; overflow-y: auto; }
.annex-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(30px, 1fr)); gap: 4px; padding: 4px; border-radius: 11px; background: #f2f4f7; }
.annex-blocks a { display: grid; place-items: center; height: 32px; border-radius: 8px; color: var(--soft); font-size: 13px; font-weight: 650; }
.annex-blocks a:hover { color: var(--text); }
.annex-blocks a[aria-current] { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.annex-block-note { color: var(--soft); font-size: 12px; line-height: 1.45; padding: 0 4px; }
.annex-subs { display: grid; gap: 2px; }
.annex-subs a { display: grid; gap: 1px; padding: 9px 10px; border-radius: var(--radius-s); line-height: 1.35; }
.annex-subs a:hover { background: var(--subtle); }
.annex-subs a[aria-current] { background: var(--primary-tint); }
.annex-subs b { color: var(--faint); font-size: 11px; font-weight: 650; }
.annex-subs span { font-size: 13px; color: #344054; }
.annex-subs a[aria-current] :is(b, span) { color: var(--primary); }

.autosave-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 4px; padding-bottom: 0; }
.autosave-form > :is(.activity-block, .form-grid, .detail-grid, .teaching-block, .targets) { padding: 22px 0; border-bottom: 1px solid var(--line); }
.autosave-form > :nth-last-child(1 of :not([type="hidden"])) { border-bottom: 0; }
.activity-block-head, .teaching-block-head, .target-section-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 16px; margin-bottom: 16px; }
.activity-block-head span, .teaching-block-head span { display: block; color: var(--primary); font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.activity-block-head strong, .teaching-block-head strong, .target-section-title span { display: block; font-size: 16px; font-weight: 650; }
.activity-block-head p, .teaching-block-head p, .target-section-title small { display: block; max-width: 48ch; color: var(--soft); font-size: 12.5px; }
.activity-picker { display: grid; gap: 10px; }
.activity-options { display: grid; align-content: start; max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-s); }
.activity-options button { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line); text-align: left; }
.activity-options button:first-child { border-top: 0; }
.activity-options button:hover { background: var(--subtle); }
.activity-code { grid-column: 1; grid-row: 1; justify-self: start; padding: 2px 8px; border-radius: 6px; background: #f2f4f7; color: #344054; font-size: 11.5px; font-weight: 650; }
.activity-options button > :is(strong, .search-result-title) { grid-column: 2 / -1; grid-row: 1; font-size: 13.5px; font-weight: 550; }
.activity-options button > :is(small, .search-result-meta) { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; color: var(--soft); font-size: 12px; }
.activity-options button > .search-result-meta span { padding: 0; background: none; color: inherit; font-size: 12px; font-weight: 400; }
.activity-options button.is-selected { background: var(--primary-tint); box-shadow: inset 3px 0 0 var(--primary); }
.activity-options button.is-selected > :is(strong, .search-result-title) { grid-column: 2; font-weight: 650; }
.activity-options button.is-selected .activity-code { background: var(--primary); color: #fff; }
.activity-selected-badge { grid-column: 3; grid-row: 1; color: var(--primary); font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.activity-card-details { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 8px; padding-top: 10px; border-top: 1px solid #d3e4f6; }
.activity-card-details-title { display: none; }
.activity-card-details > div { display: grid; gap: 2px; align-content: start; overflow-wrap: anywhere; }
.activity-card-details > div > span { color: var(--soft); font-size: 11px; font-weight: 550; }
.activity-card-details > div > strong { font-size: 12.5px; font-weight: 550; }
.activity-card-details > div > small { color: var(--soft); }
.activity-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.activity-unit { margin-top: 10px; color: var(--soft); font-size: 12.5px; }

.form-grid.form-start { display: grid; gap: 10px; }
.form-step-callout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; align-items: center; }
.form-step-callout > span { grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-tint); color: var(--primary); font-size: 12.5px; font-weight: 650; }
.form-step-callout strong { font-size: 14px; font-weight: 650; }
.form-step-callout small { color: var(--soft); }
.start-field { position: relative; }
.start-field input { min-height: 48px !important; font-size: 15px !important; }
.start-field.is-guided input { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 92, 171, .14); }
.field-coachmark { display: inline-flex; align-items: center; gap: 6px; justify-self: start; color: var(--primary); font-size: 12px; font-weight: 550; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; align-items: start; }
.detail-grid label:has(textarea) { grid-column: 1 / -1; }
.teaching-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; align-items: end; }
.hours input { text-align: right; font-variant-numeric: tabular-nums; }

.target-row { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)) minmax(90px, auto) 40px; gap: 12px; align-items: start; padding: 14px 0; border-top: 1px dashed var(--line-strong); }
.target-row > .target-remove { grid-column: -2; margin-top: 25px; }
.target-remove { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius-s); color: var(--soft); }
.target-remove:hover { border-color: #fbd5d1; background: var(--bad-tint); color: var(--bad); }
.search-box { position: relative; }
.search-results { display: none; position: absolute; z-index: 25; top: calc(100% + 6px); left: 0; right: 0; max-height: 280px; padding: 6px; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; box-shadow: 0 16px 40px rgba(16, 24, 40, .14); }
.search-results.open { display: grid; gap: 2px; }
.search-results button { padding: 9px 11px; border-radius: 8px; text-align: left; }
.search-results button:hover { background: var(--primary-tint); }
.search-result-title { display: block; font-weight: 550; line-height: 1.35; }
.search-result-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; color: var(--soft); font-size: 12px; font-weight: 400; }
.selected-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.selected-chips:empty { margin: 0; }
.selected-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border: 1px solid #d3e4f6; border-radius: 99px; background: var(--primary-tint); color: var(--primary); font-size: 12px; font-weight: 550; text-align: left; }
.selected-chip strong { font-weight: 700; }

dialog { margin: auto; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--text); box-shadow: 0 24px 64px rgba(16, 24, 40, .24); max-height: calc(100vh - 32px); overflow: auto; }
dialog::backdrop { background: rgba(15, 23, 42, .4); }
.plan-dialog { width: min(980px, calc(100vw - 32px)); min-height: min(520px, calc(100vh - 32px)); }
.inline-edit-dialog { width: min(600px, calc(100vw - 32px)); }
.inline-edit-panel { display: grid; gap: 14px; }
.inline-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline-edit-state { color: var(--soft); font-size: 13px; }
.inline-edit-state:empty { display: none; }
.plan-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.plan-dialog-head span { display: block; color: var(--soft); font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.plan-dialog-head strong { display: block; margin-top: 4px; font-size: 17px; font-weight: 650; }
.plan-dialog > p { color: var(--soft); }
.plan-dialog .targets { padding-top: 18px; }
.plan-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.merged-subject-picker { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--subtle); }
.merged-subject-picker > :is(label, .search-results, small) { display: none; }
.merged-subject-picker.is-open > :is(label, small) { display: grid; margin-top: 12px; }
.merged-subject-picker.is-open > label { font-size: 0; }
.merged-subject-picker.is-open > .search-results.open { display: grid; position: static; margin-top: 6px; }
.merged-subject-picker > small { color: var(--soft); }
.merged-subject-toggle { width: 100%; }
.plan-open { margin-top: 14px; }

.form-actions { position: sticky; bottom: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 -24px; padding: 14px 24px; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); background: #fff; }
.autosave-state { margin-right: auto; color: var(--soft); font-size: 12.5px; font-weight: 550; }
.autosave-state::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--faint); vertical-align: 1px; }
.autosave-state.is-ok { color: var(--ok); }
.autosave-state.is-ok::before { background: var(--ok); }
.autosave-state.is-error { color: var(--bad); }
.autosave-state.is-error::before { background: var(--bad); }

.annex-aside { position: sticky; top: 128px; display: grid; gap: 14px; max-height: calc(100vh - 148px); overflow-y: auto; }
.annex-total { display: grid; gap: 4px; }
.annex-total > span, .annex-total > small { color: var(--soft); font-size: 12.5px; }
.annex-total > strong { font-size: 36px; line-height: 1.15; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.annex-total .progress-line { margin: 8px 0 4px; }
.annex-total hr { width: 100%; margin: 10px 0 6px; border: 0; border-top: 1px solid var(--line); }
.annex-total div.row { display: flex; justify-content: space-between; gap: 10px; }
.mini-entry { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
.panel-head + .mini-entry { padding-top: 0; border-top: 0; }
.mini-entry strong { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.mini-entry > span { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--soft); font-size: 12.5px; }
.mini-entry a { color: var(--primary); font-size: 12.5px; font-weight: 550; }

/* ---------- Te dhenat e mia ---------- */
.submission-sections { display: grid; gap: var(--gap); }
.submission-section { padding: 0; }
.section-summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.section-summary > div:first-child { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: center; flex: 1 1 340px; }
.section-summary p { grid-column: 2; color: var(--soft); font-size: 12.5px; }
.section-totals, .submission-hours { display: flex; gap: 28px; text-align: right; }
:is(.section-totals, .submission-hours) > div { display: grid; min-width: 64px; }
:is(.section-totals, .submission-hours) span { color: var(--soft); font-size: 11.5px; }
:is(.section-totals, .submission-hours) strong { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.submission-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; padding: 18px 24px; border-top: 1px solid var(--line); }
.submission-item:first-child { border-top: 0; }
.submission-main { display: grid; gap: 4px; align-content: start; flex: 1 1 420px; min-width: 0; overflow-wrap: anywhere; }
.submission-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.target-summary { font-size: 13px; color: #344054; }
.detail-preview { color: var(--soft); font-size: 12.5px; }
.review-note { justify-self: start; padding: 6px 12px; border-radius: 8px; background: var(--warn-tint); color: var(--warn); font-size: 12.5px; }
.submission-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.locked-entry-note { color: var(--faint); font-size: 12px; }
.submission-hours { flex-wrap: wrap; justify-content: flex-end; align-content: start; }
.submission-hours small { flex-basis: 100%; color: var(--faint); }

/* ---------- Aprovimet ---------- */
.review-board { display: grid; gap: 10px; }
.professor-review { padding: 0; }
.professor-review > summary { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 150px 20px; gap: 24px; align-items: center; padding: 16px 24px; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
:is(.professor-review, .dept, .secretary-faculty, .secretary-professor) > summary::after { content: ""; justify-self: end; flex: none; width: 7px; height: 7px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg); transition: transform .2s; }
:is(.professor-review, .dept, .secretary-faculty, .secretary-professor)[open] > summary::after { transform: rotate(225deg); }
.professor-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.professor-main > div { display: grid; min-width: 0; }
.professor-main strong { font-weight: 600; }
.professor-main small, .professor-hours span { color: var(--soft); font-size: 12px; }
.professor-hours { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.professor-hours strong { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.professor-hours .progress-line { grid-column: 1 / -1; }
.professor-review[open] > summary { border-bottom: 1px solid var(--line); }
.review-empty { margin: 18px 24px; }
.review-entry-card { display: grid; gap: 14px; padding: 22px 24px; border-top: 1px solid var(--line); }
.review-entry-card:first-child { border-top: 0; }
.review-entry-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.review-entry-head > div { display: grid; gap: 4px; min-width: 0; }
.review-entry-head p { color: var(--soft); font-size: 12.5px; }
.review-facts { display: flex; flex-wrap: wrap; gap: 14px 40px; }
.review-facts > div { display: grid; max-width: 520px; }
.review-facts span, .review-places span { color: var(--soft); font-size: 11.5px; }
.review-facts strong { font-weight: 600; }
.review-places { display: grid; }
.review-details { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--subtle); color: #344054; font-size: 12.5px; overflow-wrap: anywhere; }
.review-details strong { color: var(--soft); font-weight: 550; }
.audit-diff { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; }
.audit-diff .old-value { color: var(--bad); text-decoration: line-through; }
.audit-diff .new-value { color: var(--ok); font-weight: 650; }
.audit-diff small { color: var(--soft); }
.review-actions { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.review-actions textarea { height: 42px; }
.review-buttons { display: flex; gap: 8px; }
.review-buttons .btn { min-height: 42px; padding-inline: 18px; }

/* ---------- Menaxhimi ---------- */
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 14px; align-items: end; }
.filters .page-actions { flex-wrap: nowrap; }
.rank { counter-reset: rank; }
.verification-ticket { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 28px; padding: 14px 0; border-top: 1px solid var(--line); }
.verification-ticket > div:first-child { display: grid; gap: 3px; flex: 1 1 280px; }
.verification-ticket small { color: var(--soft); }
.ticket-comparison { display: flex; align-items: center; gap: 18px; }
.ticket-comparison span { display: grid; color: var(--soft); font-size: 11.5px; }
.ticket-comparison strong { color: var(--text); font-size: 15px; }
.ticket-comparison > b { color: var(--faint); font-size: 11px; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Sekretaria ---------- */
.secretary-faculties { display: grid; gap: 12px; }
.secretary-faculty { padding: 0; }
.secretary-faculty > summary, .secretary-professor > summary { display: flex; align-items: center; gap: 14px; cursor: pointer; list-style: none; }
.secretary-faculty > summary { padding: 16px 24px; }
.secretary-faculty > summary > div { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.secretary-faculty > summary b { color: var(--soft); font-size: 12.5px; font-weight: 550; }
.secretary-professors { border-top: 1px solid var(--line); padding: 0 24px; }
.secretary-professor { border-top: 1px solid var(--line); }
.secretary-professor:first-child { border-top: 0; }
.secretary-professor > summary { padding: 14px 0; }
.secretary-professor > summary span { margin-left: auto; color: var(--soft); font-size: 12.5px; }
.secretary-list { display: grid; gap: 10px; padding-bottom: 16px; }
.secretary-entry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 210px; gap: 14px 24px; align-items: end; padding: 16px; border: 1px solid var(--line); border-radius: 11px; }
.secretary-entry-title { display: grid; gap: 6px; align-self: center; }
.secretary-entry-title small { color: var(--soft); }
.secretary-hours { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.secretary-actions { display: grid; gap: 8px; justify-items: end; text-align: right; }
.secretary-actions span { color: var(--soft); font-size: 12px; }

/* ---------- Super Admin ---------- */
.split { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.form-stack { display: grid; gap: 14px; }

/* ---------- Departamentet ---------- */
.dept-search { max-width: 420px; }
.dept-list { display: grid; gap: 10px; }
.dept { padding: 0; }
.dept > summary { display: flex; align-items: center; gap: 16px; padding: 15px 24px; cursor: pointer; list-style: none; }
.dept > summary .section-code { min-width: 64px; }
.dept-name { flex: 1; min-width: 0; display: grid; }
.dept-name strong { font-weight: 600; }
.dept-name small { color: var(--soft); }
.dept[open] > summary { border-bottom: 1px solid var(--line); }
.dept > .notice { margin: 16px 24px 0; }
.dept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; padding: 22px 24px; align-items: start; }
.dept-box { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 11px; }
.dept-box form { display: grid; gap: 12px; }
.dept-box select[size] { min-height: 160px; padding: 6px; }

/* ---------- Zerat e Aneksit ---------- */
.annex-admin { display: grid; gap: 10px; }
.annex-row { display: grid; grid-template-columns: 64px minmax(220px, 1fr) 190px 120px 80px auto; gap: 14px; align-items: end; padding: 14px 24px; border-top: 1px solid var(--line); }
.annex-row:first-of-type { border-top: 0; }
.annex-row > .section-code { align-self: center; }
.annex-row .check { min-height: 42px; }
.annex-row textarea { min-height: 42px; }
.annex-row.is-off { background: var(--subtle); }
.annex-row.is-off :is(textarea, input[name]) { color: var(--soft); }
.annex-new { grid-template-columns: 110px minmax(220px, 1fr) 190px 120px auto; background: var(--primary-tint); border-radius: 0 0 var(--radius) var(--radius); }
.annex-single { grid-template-columns: 180px auto; justify-content: start; }
.annex-note { padding: 18px 24px; color: var(--soft); }

/* ---------- Personeli ---------- */
.personnel { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap); align-items: start; }
.personnel > * { min-width: 0; }
.personnel .panel-head input { max-width: 380px; }
.personnel-side { position: sticky; top: 128px; display: grid; gap: var(--gap); max-height: calc(100vh - 148px); overflow-y: auto; }
.data-table tr.is-current { background: var(--primary-tint); }

/* ---------- Vleresimet ---------- */
.notice.warning { background: var(--warn-tint); border-color: #f6dfae; color: var(--warn); }
.inline-label { display: flex; align-items: center; gap: 10px; }
.inline-label select { width: auto !important; }
.panel-head input[data-eval-search] { max-width: 380px; }
.map-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr) auto; gap: 14px; align-items: center; padding: 12px 24px; border-top: 1px solid var(--line); }
.map-row:first-of-type { border-top: 0; }
.map-selects { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.bar-row.eval-question > div:first-child strong { white-space: normal; }
.eval-comment { margin: 0; padding: 14px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.eval-comment:first-of-type { border-top: 0; padding-top: 0; }
.eval-comment small { color: var(--soft); }
input[type="file"] { padding: 8px 10px !important; }

/* ---------- Dosja ---------- */
.page-actions form select { width: auto; }
.dossier-block, [id^="blloku-"] { scroll-margin-top: 128px; }
.dossier-section { padding: 16px 0; border-top: 1px solid var(--line); }
.dossier-section:first-of-type { border-top: 0; padding-top: 0; }
.dossier-section h3 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.dossier-entry { display: grid; gap: 4px; margin-top: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; font-size: 13px; overflow-wrap: anywhere; break-inside: avoid; }
.dossier-entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dossier-entry-head strong { font-size: 14px; }
.dossier-entry-head b { margin-left: auto; font-variant-numeric: tabular-nums; }
.dossier-target { color: #344054; }
.dossier-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 20px; margin: 4px 0; padding: 10px 12px; border-radius: var(--radius-s); background: var(--subtle); }
.dossier-details dt { color: var(--soft); font-size: 11.5px; }
.dossier-details dd { margin: 0; }
.dossier-note { color: var(--warn); }
.dossier-entry small { color: var(--faint); }
.dossier-eval { margin: 16px 0; }
.dossier-comments { margin: 20px 0 12px; }
.dossier-signatures { display: none; }

/* ---------- Hyrja ---------- */
.auth-card { width: min(400px, 100%); display: grid; gap: 24px; }
.auth-brand { display: grid; justify-items: center; gap: 14px; text-align: center; }
.auth-brand img { width: 150px; height: auto; }
.auth-brand p { color: var(--soft); }
.auth-form { display: grid; padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.auth-form h2 { font-size: 20px; }
.auth-hint { margin-top: 4px; color: var(--soft); }
.auth-form label { margin: 18px 0 6px; }
.auth-form input:not([type="hidden"]) { min-height: 46px; }
.auth-password { position: relative; }
.auth-password input { padding-right: 76px !important; }
.auth-password button { position: absolute; top: 6px; right: 6px; height: 34px; padding: 0 11px; border-radius: 7px; color: var(--primary); font-size: 12.5px; font-weight: 600; }
.auth-password button:hover { background: var(--primary-tint); }
.auth-caps { margin-top: 8px; color: var(--warn); font-size: 12.5px; }
.auth-error { margin-top: 16px; padding: 11px 13px; border: 1px solid #fbd5d1; border-radius: var(--radius-s); background: var(--bad-tint); color: var(--bad); font-weight: 550; }
.auth-submit { min-height: 46px; margin-top: 24px; border-radius: var(--radius-s); background: var(--primary); color: #fff; font-weight: 600; }
.auth-submit:hover { background: var(--primary-dark); }
.auth-foot { margin-top: 18px; color: var(--faint); font-size: 12.5px; text-align: center; }
.auth-foot a { color: var(--primary); font-weight: 550; }

/* ---------- Njoftimet ---------- */
.ui-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; max-width: min(360px, calc(100vw - 40px)); }
.ui-toast { padding: 12px 16px; border-radius: 10px; background: var(--text); color: #fff; font-size: 13px; font-weight: 550; box-shadow: 0 12px 32px rgba(16, 24, 40, .22); }
.ui-toast.is-error { background: var(--bad); }
.ui-toast.is-ok { background: var(--ok); }

/* ---------- Permasat ---------- */
@media (max-width: 1360px) {
    .annex { grid-template-columns: 250px minmax(0, 1fr); }
    .annex-aside { grid-column: 2; position: static; max-height: none; }
}
@media (max-width: 1100px) {
    .columns, .columns.even, .split { grid-template-columns: minmax(0, 1fr); }
    .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .secretary-entry { grid-template-columns: minmax(0, 1fr); }
    .secretary-actions { justify-items: start; text-align: left; }
}
@media (max-width: 900px) {
    .annex { grid-template-columns: minmax(0, 1fr); }
    .annex-nav { position: static; max-height: none; }
    .annex-subs { max-height: 240px; overflow-y: auto; }
    .annex-aside { grid-column: auto; }
    .professor-review > summary { grid-template-columns: minmax(0, 1fr) auto 16px; gap: 12px; }
    .professor-hours { grid-column: 1 / -1; grid-row: 2; }
    .review-actions { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
    .annex-row, .annex-new { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .annex-row > label:has(textarea) { grid-column: 1 / -1; }
    .personnel { grid-template-columns: minmax(0, 1fr); }
    .personnel-side { position: static; order: -1; max-height: none; }
}
@media (max-width: 640px) {
    .map-row { grid-template-columns: minmax(0, 1fr); }
    h1 { font-size: 23px; }
    .ui-top-in { padding-inline: 16px; }
    .ui-brand span, .ui-year strong, .ui-user .avatar-mini, .ui-user-name { display: none; }
    .ui-meta { gap: 10px; }
    .ui-nav { scrollbar-width: none; }
    .ui-content { padding: 20px 14px 56px; }
    .panel { padding: 18px 16px; }
    .professor-review, .dept, .submission-section, .secretary-faculty { padding: 0; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats > :last-child:nth-child(odd) { grid-column: 1 / -1; }
    .stat { padding: 14px 16px; }
    .stat > strong { font-size: 24px; }
    .filters, .inline-edit-grid, .target-row { grid-template-columns: minmax(0, 1fr); }
    .target-row > .target-remove { grid-column: 1; margin-top: 0; }
    .form-actions { margin-inline: -16px; padding-inline: 16px; }
    .autosave-state { flex-basis: 100%; }
    .bar-row { grid-template-columns: minmax(0, 1fr) 60px 60px; gap: 10px; }
}
.autosave-form.panel { padding-bottom: 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
@media print {
    body { background: #fff; }
    .ui-top, .ui-toasts, .page-actions, .toolbar, .chips, .submission-actions, .tabs, .back-link { display: none !important; }
    .ui-content { max-width: none; padding: 0; }
    .panel, .stats { break-inside: avoid-page; }
    .table-scroll { overflow: visible; }
    .page-actions { display: none !important; }
    .dossier-block, .panel:has(.dossier-eval) { break-inside: auto; }
    .dossier-signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px; break-inside: avoid; }
    .dossier-signatures div { padding-top: 40px; border-bottom: 1px solid #000; font-weight: 600; }
    .dossier-signatures span { display: block; margin-bottom: 4px; font-weight: 400; }
    .data-table { font-size: 11px; }
}
