:root {
  --bg: #f6f7f9; --card: #fff; --text: #1f2937; --muted: #6b7280; --border: #e5e7eb;
  --primary: #1d4ed8; --danger: #b91c1c; --ok: #047857; --warn: #b45309;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary); }
.topbar { display: flex; gap: 1.5rem; align-items: center; padding: .75rem 1.5rem; background: #0f172a; color: #fff; flex-wrap: wrap; }
.topbar a { color: #e2e8f0; text-decoration: none; }
.topbar nav { display: flex; gap: 1rem; flex: 1; }
.brand { font-weight: 700; color: #fff !important; }
.logout { display: flex; gap: .75rem; align-items: center; margin: 0; }
.who { color: #94a3b8; }
button.link { background: none; border: 0; color: #e2e8f0; cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
.container { max-width: 960px; margin: 2rem auto; padding: 0 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem; }
.card.narrow { max-width: 440px; margin: 0 auto; }
h1 { font-size: 1.4rem; margin-top: 0; }
.field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .25rem; }
.field input, .field select, .field textarea { padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 6px; font: inherit; width: 100%; }
.field textarea { min-height: 5rem; }
.field input:disabled, .field select:disabled { background: #f3f4f6; color: var(--muted); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }
.req { color: var(--danger); }
.help, .muted { color: var(--muted); font-size: .875rem; }
.error, .errors { color: var(--danger); }
.errors { background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px; padding: .5rem .75rem; margin-bottom: 1rem; }
.errors p { margin: .25rem 0; }
.btn { display: inline-block; background: var(--primary); color: #fff; border: 0; border-radius: 6px; padding: .55rem 1rem; font: inherit; cursor: pointer; text-decoration: none; }
.btn.secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn.small { padding: .25rem .6rem; font-size: .85rem; }
.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.msg { padding: .6rem .9rem; border-radius: 6px; background: #eff6ff; border: 1px solid #bfdbfe; margin-bottom: .5rem; }
.msg-success { background: #ecfdf5; border-color: #a7f3d0; }
.msg-error { background: #fef2f2; border-color: #fecaca; }
.msg-warning { background: #fffbeb; border-color: #fde68a; }
.preview { background: #f1f5f9; border-radius: 6px; padding: .5rem .75rem; margin-bottom: 1rem; }
table.list { width: 100%; border-collapse: collapse; background: var(--card); }
table.list th, table.list td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.list th { font-size: .8rem; text-transform: uppercase; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.badge-PENDING { background: #fef3c7; color: var(--warn); }
.badge-APPROVED { background: #d1fae5; color: var(--ok); }
.badge-REJECTED { background: #fee2e2; color: var(--danger); }
.badge-CANCELLED { background: #e5e7eb; color: var(--muted); }
.type-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.inline { display: inline; margin: 0; }
.btn.danger { background: var(--danger); }
.decision .btn { margin-right: .5rem; }
.card.stack { margin-bottom: 1rem; }
.card h2 { font-size: 1.1rem; margin-top: 0; }
.count { background: #ef4444; color: #fff; border-radius: 999px; padding: 0 .45rem; font-size: .75rem; margin-left: .2rem; }
/* Unseen decision on "Taleplerim" (KARAR-52) */
.dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: #ef4444; margin-left: .15rem; vertical-align: super; }
.badge-new { background: #ef4444; color: #fff; }
table.list tr.is-new td { background: #fef2f2; }
.filters { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-bottom: .75rem; }
.filters label { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); gap: .2rem; }
.filters select { padding: .4rem .5rem; border: 1px solid var(--border); border-radius: 6px; font: inherit; color: var(--text); min-width: 11rem; }
.filters label.check { flex-direction: row; align-items: center; align-self: flex-end; gap: .4rem; padding-bottom: .45rem; color: var(--text); }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .85rem; }
.legend-item { display: inline-flex; align-items: center; gap: .35rem; }
.swatch { display: inline-block; width: 1rem; height: .75rem; border-radius: 3px; }
.swatch-pending { border: 2px dashed #64748b; }
.swatch-holiday { background: #fde68a; }
.card.calendar { padding: .75rem; }
.fc .is-pending, .fc .is-cancel-pending { border: 2px dashed #334155 !important; opacity: .8; }
.fc .holiday { background: #fde68a; opacity: .55; }
.swatch-birthday { background: #db2777; }
.fc .birthday { font-weight: 600; }
.fc .holiday-half { background: repeating-linear-gradient(135deg, #fde68a, #fde68a 6px, #fff 6px, #fff 12px); }
.fc .fc-event { cursor: pointer; }
.popover { position: absolute; z-index: 50; background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 23, 42, .15); padding: .75rem 1rem; max-width: 300px; font-size: .9rem; }
.popover h3 { margin: 0 1.5rem .4rem 0; font-size: 1rem; }
.popover p { margin: .2rem 0; }
.popover a { display: inline-block; margin-top: .4rem; }
.popover-close { position: absolute; top: .3rem; right: .5rem; border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: var(--muted); }
.copy-row { display: flex; gap: .5rem; }
.copy-row input { flex: 1; font-family: ui-monospace, Menlo, monospace; font-size: .8rem; }
.steps li { margin-bottom: .4rem; }
a.who { color: #94a3b8; }
.fc a.fc-daygrid-day-number, .fc a.fc-col-header-cell-cushion, .fc a.fc-list-day-text, .fc a.fc-list-day-side-text { color: var(--text); text-decoration: none; }
.fc .fc-toolbar-title { font-size: 1.35rem; }
@media (max-width: 640px) {
  .fc .fc-toolbar { flex-wrap: wrap; gap: .5rem; }
  .fc .fc-toolbar-title { font-size: 1.1rem; }
  .filters select { min-width: 0; width: 100%; }
  .filters label { flex: 1 1 100%; }
}

/* ---- Request form (redesign) ---- */
.subtitle { margin: .2rem 0 0; color: var(--muted); }
.small { font-size: .8rem; }
.request-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .request-layout { grid-template-columns: 1fr; } }
.form-card { padding: 1.5rem 1.5rem 1.25rem; }
.form-section { border: 0; padding: 0; margin: 0 0 1.4rem; min-width: 0; }
.form-section legend, .form-section > .field > label, .date-row label { font-weight: 600; font-size: .9rem; margin-bottom: .45rem; padding: 0; }
.form-section.has-error .type-card, .form-section.has-error .segmented { border-color: var(--danger); }
.field input, .field select, .field textarea { padding: .6rem .7rem; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, .15); }

.type-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
@media (max-width: 640px) { .type-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.type-card { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: .55rem; align-items: center; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.type-card:hover { border-color: #cbd5e1; background: #f8fafc; }
.type-card input { position: absolute; opacity: 0; pointer-events: none; }
.type-card:has(input:checked) { border-color: var(--type-color); background: color-mix(in srgb, var(--type-color) 7%, #fff); box-shadow: 0 0 0 2px color-mix(in srgb, var(--type-color) 35%, transparent); }
.type-card:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.type-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--type-color); grid-row: span 2; }
.type-name { font-weight: 600; font-size: .92rem; }
.type-hint { grid-column: 2; font-size: .75rem; color: var(--muted); }

.date-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: .75rem; align-items: end; }
.date-row .field { margin-bottom: 0; }
.date-arrow { color: var(--muted); padding-bottom: .7rem; }
@media (max-width: 520px) { .date-row { grid-template-columns: 1fr; } .date-arrow { display: none; } }

.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; padding: 3px; gap: 3px; }
.segment { position: relative; cursor: pointer; }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment span { display: block; padding: .4rem .9rem; border-radius: 6px; font-size: .88rem; color: var(--text); }
.segment:has(input:checked) span { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.segment:has(input:focus-visible) span { outline: 2px solid var(--primary); }
.segment:has(input:disabled) { cursor: not-allowed; }
.segment:has(input:disabled) span { color: #9ca3af; }
.segmented + .help { display: block; margin-top: .35rem; }

.text-fields .field { margin-bottom: 1rem; }
.form-actions { display: flex; align-items: center; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.btn-lg { padding: .7rem 1.4rem; font-weight: 600; }
.link-muted { color: var(--muted); }

/* Summary card */
.request-summary { position: sticky; top: 1rem; padding: 1.25rem; }
.request-summary h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .5rem; }
.request-summary h3 { font-size: .78rem; font-weight: 600; color: var(--muted); margin: 0 0 .35rem; }
.summary-days { display: flex; align-items: baseline; gap: .4rem; }
.days-number { font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--text); }
.days-label { color: var(--muted); }
.summary-dates { margin: .35rem 0 0; font-weight: 600; }
.summary-holidays { margin: .3rem 0 0; font-size: .8rem; color: var(--warn); }
.summary-error { margin: .4rem 0 0; font-size: .85rem; color: var(--danger); }
.summary-block { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: .9rem; }
.summary-block p { margin: 0; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.announcement { margin: 0 0 .35rem; padding: .6rem .75rem; border-left: 3px solid var(--primary); background: #f8fafc; border-radius: 0 6px 6px 0; font-size: .9rem; }
.announcement.is-empty { border-left-color: var(--border); color: var(--muted); }

/* Avatars (summary + combobox) */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: #475569; color: #fff; font-size: .75rem; font-weight: 600; letter-spacing: .02em; }

/* Combobox */
.combobox { position: relative; }
.listbox { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40; margin: 0; padding: .3rem; list-style: none; max-height: 18rem; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 28px rgba(15, 23, 42, .14); }
.option { display: flex; align-items: center; gap: .65rem; padding: .45rem .55rem; border-radius: 7px; cursor: pointer; }
.option[aria-selected="true"] { background: #eff6ff; }
.option-text { display: flex; flex-direction: column; min-width: 0; }
.option-name { font-weight: 500; }
.option-name mark { background: #fef08a; color: inherit; border-radius: 2px; padding: 0 1px; }
.option-meta { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.option-empty { padding: .6rem .55rem; font-size: .85rem; color: var(--muted); }

/* ---- Approval cards (pending panel + emailed link) ---- */
.pending-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .45rem; margin-left: .35rem; border-radius: 999px; background: var(--primary); color: #fff; font-size: .85rem; font-weight: 600; vertical-align: middle; }
.approval-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 1rem; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.approval-head { display: flex; align-items: center; gap: .85rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); }
.avatar-lg { width: 2.6rem; height: 2.6rem; font-size: .9rem; }
.approval-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.approval-who strong { font-size: 1.05rem; }
.approval-who span { color: var(--muted); font-size: .9rem; }
.approval-chips { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.type-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .65rem; border-radius: 999px; font-size: .82rem; font-weight: 600; background: color-mix(in srgb, var(--type-color, #64748b) 12%, #fff); color: color-mix(in srgb, var(--type-color, #64748b) 70%, #000); }
.chip-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--type-color, #64748b); }
.type-chip.is-cancel { background: #fff7ed; color: #c2410c; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.5rem; margin: 0; padding: 1rem 1.25rem; }
.detail-list > div { min-width: 0; }
.detail-list dt { font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: .15rem; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.card .detail-list { padding: 0; margin: .75rem 0 0; }
.decision-bar { display: flex; align-items: flex-end; gap: 1rem; padding: 1rem 1.25rem; border-top: 1px solid var(--border); background: #f8fafc; border-radius: 0 0 12px 12px; }
.decision-note { flex: 1; display: flex; flex-direction: column; gap: .3rem; }
.decision-note label { font-size: .85rem; font-weight: 600; }
.decision-note label .muted { font-weight: 400; }
.decision-note textarea { padding: .5rem .65rem; border: 1px solid var(--border); border-radius: 6px; font: inherit; resize: vertical; min-height: 2.6rem; }
.decision-note textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, .15); }
.decision-buttons { display: flex; gap: .5rem; }
.btn-outline-danger { background: #fff; color: var(--danger); border: 1px solid #fca5a5; }
.btn-outline-danger:hover { background: #fef2f2; }
.empty-state { text-align: center; padding: 2rem 1rem; }
.empty-state p { margin: .25rem 0; }
@media (max-width: 640px) {
  .approval-head { flex-wrap: wrap; }
  .approval-chips { width: 100%; justify-content: flex-start; }
  .detail-list { grid-template-columns: 1fr; }
  .decision-bar { flex-direction: column; align-items: stretch; }
  .decision-buttons .btn { flex: 1; }
}

/* ---- Leave reports (KARAR-50) ---- */
:root {
  --viz-used: #256abf; --viz-planned: #86b6ef; --viz-pending-ink: #64748b; --viz-track: #e8eaee;
  --viz-cell: #eef0f3; --viz-off: #f8f9fa;
  --viz-pending: repeating-linear-gradient(135deg, #94a3b8 0 2px, #e2e8f0 2px 5px);
}
.year-nav { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; padding: 3px; gap: 3px; }
.year-nav a { padding: .3rem .8rem; border-radius: 6px; font-size: .88rem; color: var(--text); text-decoration: none; }
.year-nav a.is-current { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.section-title { font-size: 1.1rem; margin: 1.5rem 0 .75rem; }
.stack { margin-bottom: 1rem; }
td.num, th.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.tile { display: flex; flex-direction: column; gap: .15rem; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: .9rem 1rem; min-width: 0; }
.tile-label { font-size: .8rem; color: var(--muted); }
.tile-value { font-size: 1.9rem; font-weight: 600; line-height: 1.15; }
.tile-note { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.tile.is-over { border-color: #f3b4b4; }
.over-note { color: var(--danger); font-weight: 600; white-space: nowrap; }
.tile .over-note { white-space: normal; }
p.over-note { margin: .75rem 0 0; white-space: normal; }

.usage-bar { position: relative; height: 28px; margin: .25rem 0 .9rem; }
.usage-track { position: absolute; inset: 0 auto 0 0; background: var(--viz-track); border-radius: 4px; }
.usage-fill { position: absolute; inset: 0; display: flex; gap: 2px; }
.usage-seg { display: block; height: 100%; border-radius: 4px; min-width: 2px; }
.usage-seg.is-used { background: var(--viz-used); }
.usage-seg.is-planned { background: var(--viz-planned); }
.usage-seg.is-pending { background: var(--viz-pending); }
.usage-mark { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--text); box-shadow: 0 0 0 2px var(--card); }
.usage-bar.is-thin { height: 8px; margin: 0; min-width: 9rem; }
.usage-bar.is-thin .usage-track, .usage-bar.is-thin .usage-seg { border-radius: 4px; }
.usage-bar.is-thin .usage-mark { top: -4px; bottom: -4px; }
.viz-legend { margin-top: .75rem; color: var(--muted); }
.swatch.viz-used { background: var(--viz-used); }
.swatch.viz-planned { background: var(--viz-planned); }
.swatch.viz-approved { background: var(--viz-used); }
.swatch.viz-pending { background: var(--viz-pending); }
.swatch.viz-track { background: var(--viz-track); }
.swatch.viz-mark { width: 2px; height: 1rem; background: var(--text); border-radius: 0; margin: 0 .4rem; }

.report-split { display: grid; grid-template-columns: 3fr 2fr; gap: 1rem; align-items: start; }
@media (max-width: 760px) { .report-split { grid-template-columns: 1fr; gap: 0; } }
.chart-unit { margin: -.5rem 0 .5rem; font-size: .8rem; }
.cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 4px; border-bottom: 1px solid #c9ccd3; }
.col { display: flex; flex-direction: column; min-width: 0; position: relative; }
.col-plot { height: 150px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.col-bar { width: 100%; max-width: 24px; flex: none; }
.col-plot > div.col-bar:first-of-type { border-radius: 4px 4px 0 0; }
.col-bar.is-approved { background: var(--viz-used); }
.col-bar.is-pending { background: var(--viz-pending); }
.col-value { font-size: .75rem; color: var(--text); font-variant-numeric: tabular-nums; }
.col-label { position: absolute; top: 100%; left: 0; right: 0; padding-top: .3rem; text-align: center; font-size: .72rem; color: var(--muted); }
.cols { margin-bottom: 1.6rem; }
.col:hover .col-bar.is-approved { background: #184f95; }

.hbars { display: grid; grid-template-columns: max-content 1fr max-content; gap: .55rem .75rem; align-items: center; }
.hbar-row { display: contents; }
.hbar-label { font-size: .88rem; white-space: nowrap; }
.hbar-track { display: block; height: 12px; }
.hbar-fill { display: block; height: 100%; min-width: 3px; border-radius: 0 4px 4px 0; }
.hbar-value { font-size: .85rem; font-variant-numeric: tabular-nums; text-align: right; }

.year-grid-wrap { overflow-x: auto; }
.year-grid { display: grid; gap: 2px; min-width: 560px; }
.yg-row { display: grid; grid-template-columns: 2.4rem repeat(31, 1fr); gap: 2px; align-items: center; }
.yg-month, .yg-day { font-size: .72rem; color: var(--muted); }
.yg-day { text-align: center; }
.yg-cell { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--viz-cell); }
.yg-cell.is-blank { background: none; }
.yg-cell.is-off { background: var(--viz-off); }
.yg-cell.is-leave { background: var(--c); }
.yg-cell.is-leave.is-half { background: linear-gradient(135deg, var(--c) 50%, var(--viz-cell) 50%); }
.yg-cell.is-pending { background: color-mix(in srgb, var(--c) 22%, #fff); box-shadow: inset 0 0 0 1.5px var(--c); }
.yg-cell.is-today { outline: 2px solid var(--text); outline-offset: 1px; }
.yg-cell[title]:hover { filter: brightness(.9); }
.swatch.yg-swatch-pending { background: #fff; box-shadow: inset 0 0 0 1.5px var(--viz-pending-ink); }
.swatch.yg-swatch-today { background: var(--viz-cell); outline: 2px solid var(--text); outline-offset: -2px; }
.swatch.yg-swatch-off { background: var(--viz-off); box-shadow: inset 0 0 0 1px var(--border); }

.team-table .bar-col { width: 34%; min-width: 10rem; }
.team-table td { vertical-align: middle; }
.table-wrap.stack + .viz-legend { margin: -.25rem 0 1.25rem; }
.excess-warning { margin: 0; padding: .7rem 1.25rem; background: #fef2f2; border-bottom: 1px solid #fecaca; color: #7f1d1d; }

/* People directory and profile cards (KARAR-51) */
.person-head { display: flex; align-items: center; gap: .85rem; }
.person-name { margin: 0; font-size: 1.35rem; }
.person-title { margin: .1rem 0 0; }
.group-title { font-size: 1rem; margin: 1.25rem 0 .5rem; }
.person-link { display: inline-flex; align-items: center; gap: .55rem; }
.people-table { table-layout: fixed; }
.people-table th:first-child { width: 38%; }
.people-table th:last-child { width: 9.5rem; }
@media (max-width: 640px) { .people-table th:first-child { width: 50%; } .people-table th:last-child { width: 6.5rem; } }

/* ---- Home dashboard and "+ Talep" menu (KARAR-55) ---- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { flex: none; vertical-align: middle; }
.topbar nav a[aria-current="page"] { color: #fff; font-weight: 600; }
.topbar nav { flex-wrap: wrap; row-gap: .35rem; }
.topbar nav a { white-space: nowrap; }

.new-menu { position: relative; }
.new-menu-button { display: inline-flex; align-items: center; gap: .4rem; list-style: none; cursor: pointer; padding: .35rem .75rem; border-radius: 8px; background: var(--primary); color: #fff; font-weight: 600; user-select: none; }
.new-menu-button::-webkit-details-marker { display: none; }
.new-menu-button:hover { background: #1e40af; }
.new-menu-button:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.new-menu[open] .new-menu-caret { transform: rotate(180deg); }
.new-menu-list { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 15rem; margin: 0; padding: .4rem; list-style: none; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18); }
.new-menu-item { display: flex; align-items: center; gap: .85rem; padding: .6rem .75rem; border-radius: 8px; color: var(--text) !important; font-weight: 500; }
a.new-menu-item:hover, a.new-menu-item:focus-visible { background: #eff6ff; color: var(--primary) !important; outline: none; }
.new-menu-item .icon { color: #475569; }
a.new-menu-item:hover .icon { color: var(--primary); }
.new-menu-item.is-disabled { color: #9ca3af !important; cursor: not-allowed; }
.new-menu-item.is-disabled .icon { color: #cbd5e1; }
.soon { margin-left: auto; padding: .05rem .45rem; border-radius: 999px; background: #f1f5f9; color: var(--muted); font-size: .7rem; font-weight: 600; }

.container.wide { max-width: 1320px; margin-top: 1.5rem; }
.dash { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
@media (max-width: 1100px) { .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .dash { grid-template-columns: 1fr; gap: 1rem; } .dash-col { gap: 1rem; } }

.dash-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); min-width: 0; }
.dash-head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.dash-head-text { flex: 1; min-width: 0; }
.dash-head h2 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.dash-sub { margin: 0; font-size: .82rem; color: var(--muted); }
.dash-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 9px; color: #fff; }
.dash-icon.is-blue { background: #2a78d6; }
.dash-icon.is-slate { background: #475569; }
.dash-icon.is-amber { background: #b7791f; }
.dash-icon.is-violet { background: #6250d6; }
.dash-icon.is-pink { background: #c2417a; }
.dash-icon.is-teal { background: #0f8a6a; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 8px; color: var(--primary); }
.icon-btn:hover { background: #eff6ff; }
.dash-foot { display: flex; justify-content: flex-end; margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--border); }
.dash-foot.is-left { justify-content: flex-start; }
.more { display: inline-flex; align-items: center; gap: .2rem; font-weight: 500; font-size: .9rem; text-decoration: none; }
.more:hover { text-decoration: underline; }
.muted-link { color: var(--muted); gap: .4rem; }
.dash-empty { margin: 0; padding: .5rem 0; color: var(--muted); font-size: .9rem; }

/* profile */
.profile-top { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; }
.profile-text { min-width: 0; }
.profile-name { margin: 0 0 .35rem; font-size: 1.3rem; font-weight: 600; }
.profile-line { margin: 0; font-size: .92rem; }
.profile-avatar { width: 5.5rem; height: 5.5rem; border-radius: 14px; font-size: 1.6rem; background: linear-gradient(135deg, #1d4ed8, #475569); }
.kv { margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .5rem; }
.kv > div { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 500; }

/* my leave */
.dash-note { margin: 0; font-size: .85rem; color: var(--muted); }
.big-days { margin: .15rem 0 .5rem; font-size: 2.3rem; font-weight: 700; line-height: 1.1; color: var(--ok); font-variant-numeric: tabular-nums; }
.big-days span { font-size: 1.5rem; font-weight: 600; }
.big-days.is-over { color: var(--danger); }
.dash-card .over-note { margin: 0 0 .5rem; font-size: .85rem; }
.leave-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .75rem 0 0; padding: 0; list-style: none; font-size: .85rem; }
.leave-legend li { display: inline-flex; align-items: center; gap: .35rem; }
.ldot { width: .55rem; height: .55rem; border-radius: 50%; }
.ldot.is-used { background: var(--viz-used); }
.ldot.is-planned { background: var(--viz-planned); }
.ldot.is-pending { background: var(--viz-pending); }
.dash-list { list-style: none; margin: 0; padding: 0; }
.req-list { margin-top: 1rem; border-top: 1px solid var(--border); }
.req-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 4.2rem; align-items: center; gap: .65rem; padding: .6rem 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.req-row:last-child { border-bottom: 0; }
.req-state { display: inline-flex; color: #94a3b8; }
.req-state.is-done { color: var(--ok); }
.req-state.is-pending { color: var(--warn); }
.req-state.is-cancel { color: #c2410c; }
.req-state.is-ongoing { color: var(--primary); }
.req-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-days { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.req-date { text-align: right; font-weight: 500; white-space: nowrap; }

/* people split */
.donut-wrap { position: relative; width: 11rem; height: 11rem; margin: .25rem auto 1rem; }
.donut { width: 100%; height: 100%; transform: none; }
.donut-seg { transition: stroke-width .15s; }
.donut-seg:hover { stroke-width: 7.5; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-total { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.donut-label { font-size: .8rem; color: var(--muted); }
.split-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.split-table th { text-align: left; font-weight: 500; padding: .3rem 0; }
.split-name { display: flex; align-items: center; gap: .5rem; }
.split-table td { padding: .3rem 0 .3rem .75rem; }
.split-table .swatch { width: .7rem; height: .7rem; border-radius: 3px; flex: none; }

/* generic rows: holidays, events, birthdays, upcoming leave */
.row { display: flex; align-items: center; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
a.row-main { color: var(--text); text-decoration: none; }
a.row-main:hover { color: var(--primary); }
.row-stack { display: flex; flex-direction: column; min-width: 0; }
.row-sub { display: flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--muted); }
.row-meta { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.row-date { font-weight: 500; white-space: nowrap; text-align: right; }
.row-date.is-today { color: var(--primary); }
.mini-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; flex: none; }
.row .avatar { width: 1.9rem; height: 1.9rem; font-size: .7rem; }

@media (max-width: 640px) {
  .new-menu-list { position: fixed; left: 16px; right: 16px; top: auto; }
  .profile-avatar { width: 4rem; height: 4rem; font-size: 1.2rem; }
}

/* ---- Hesabım (KARAR-57) ---- */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.page-header h1 { margin: 0; font-size: 1.5rem; }
.actions-menu { position: relative; }
.btn.secondary.actions-button { display: inline-flex; align-items: center; gap: .4rem; list-style: none; cursor: pointer; border-color: #93c5fd; color: var(--primary); font-weight: 600; }
.actions-button::-webkit-details-marker { display: none; }
.actions-menu[open] .new-menu-caret { transform: rotate(180deg); }
.new-menu-list.is-right { left: auto; right: 0; }
.tabs { display: flex; gap: 1.75rem; margin: 0 0 1.5rem; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: .6rem 0 .7rem; color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--primary); }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .profile-layout { grid-template-columns: 1fr; } }
.profile-hero { padding: 1.5rem; }
.hero-name { margin: .25rem 0 .9rem; font-size: 1.6rem; font-weight: 600; }
.hero-title { margin: 0 0 .2rem; font-size: 1.05rem; }
.hero-avatar { width: 8rem; height: 8rem; border-radius: 16px; font-size: 2.2rem; background: linear-gradient(135deg, #1d4ed8, #475569); }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 2rem; margin: 1.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.info-grid dt { font-size: .85rem; color: var(--muted); margin-bottom: .15rem; }
.info-grid dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.profile-hero > .muted.small { margin: 1.25rem 0 0; }
.contact-card { padding: 0; overflow: hidden; }
.contact-title { margin: 0; padding: 1.1rem 1.25rem; font-size: 1.1rem; font-weight: 600; background: #f8fafc; border-bottom: 1px solid var(--border); }
.contact-card .dash-list { padding: .25rem 1.25rem .5rem; }
.contact-row { display: flex; align-items: center; gap: .9rem; padding: .85rem 0; border-bottom: 1px solid var(--border); }
.contact-row:last-child { border-bottom: 0; }
.contact-icon { display: inline-flex; color: var(--primary); flex: none; }
.contact-icon.is-private { color: #94a3b8; }
.contact-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.contact-label { font-size: .88rem; color: var(--muted); }
.contact-value { font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.contact-value:hover { text-decoration: underline; }
.contact-value.is-empty { color: var(--muted); }
.copy-btn { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; flex: none; border: 0; border-radius: 8px; background: none; color: var(--primary); cursor: pointer; }
.copy-btn:hover { background: #eff6ff; }
.copy-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.copy-btn.is-copied { color: var(--ok); background: #ecfdf5; }
.tab-panel { max-width: 860px; }
.tab-panel h2 { margin-top: 0; font-size: 1.15rem; }
@media (max-width: 640px) {
  .page-header { flex-wrap: wrap; }
  .hero-avatar { width: 5rem; height: 5rem; font-size: 1.4rem; }
  .info-grid { grid-template-columns: 1fr; gap: .9rem; }
}
.tab-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tab-head .subtitle { margin: 0; }
/* Dokümanlar (KARAR-58) */
.doc-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .75rem; }
.doc-item { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; }
.doc-text { flex: 1; min-width: 0; }
.doc-text h2 { font-size: 1rem; margin: 0 0 .2rem; }
.doc-text p { margin: 0; }
.doc-meta { margin-top: .2rem !important; font-size: .8rem; }
@media (max-width: 560px) {
  .doc-item { flex-wrap: wrap; }
  .doc-item .btn { width: 100%; text-align: center; }
}
/* Profil fotoğrafı (KARAR-59) */
img.avatar { object-fit: cover; padding: 0; background: #e2e8f0; }
/* Hesabım: avatarın üzerine gelince kamera katmanı; fotoğraf varsa köşede kaldır butonu. */
.avatar-edit { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.avatar-edit form { margin: 0; }
.avatar-edit-target { position: relative; display: block; border-radius: 16px; cursor: pointer; }
.avatar-edit-target .hero-avatar { display: flex; }
.avatar-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; border-radius: inherit; background: rgba(15, 23, 42, .55); color: #fff; opacity: 0; transition: opacity .18s ease; backdrop-filter: blur(1px); }
.avatar-overlay-text { font-size: .78rem; font-weight: 600; letter-spacing: .01em; text-align: center; padding: 0 .4rem; }
.avatar-edit-target:hover .avatar-overlay,
#id_photo:focus-visible + .avatar-edit-target .avatar-overlay,
.avatar-edit.is-uploading .avatar-overlay { opacity: 1; }
#id_photo:focus-visible + .avatar-edit-target { outline: 3px solid var(--primary); outline-offset: 3px; }
/* Initials fade out under the overlay so they don't ghost behind the camera icon. */
.avatar-edit-target span.avatar { transition: color .18s ease; }
.avatar-edit-target:hover span.avatar,
#id_photo:focus-visible + .avatar-edit-target span.avatar,
.avatar-edit.is-uploading span.avatar { color: transparent; }
.avatar-spinner { display: none; width: 1.6rem; height: 1.6rem; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: avatar-spin .8s linear infinite; }
.avatar-edit.is-uploading .avatar-spinner { display: block; }
.avatar-edit.is-uploading .avatar-overlay-icon,
.avatar-edit.is-uploading .avatar-overlay-text { display: none; }
.avatar-edit.is-uploading .avatar-edit-target { cursor: progress; }
@keyframes avatar-spin { to { transform: rotate(360deg); } }
.avatar-badge { display: none; position: absolute; right: -6px; bottom: -6px; width: 1.9rem; height: 1.9rem; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary); color: #fff; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .25); }
.avatar-remove-form { position: absolute; top: -8px; right: -8px; }
.avatar-remove { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: #475569; cursor: pointer; box-shadow: 0 1px 3px rgba(15, 23, 42, .18); opacity: 0; transform: scale(.85); transition: opacity .18s ease, transform .18s ease, color .15s, background .15s; }
.avatar-edit:hover .avatar-remove, .avatar-remove:focus-visible { opacity: 1; transform: scale(1); }
.avatar-remove:hover { color: var(--danger); background: #fef2f2; border-color: #fca5a5; }
.avatar-remove:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.avatar-error { margin: 0; max-width: 10rem; font-size: .8rem; color: var(--danger); text-align: center; }
.avatar-edit.js-photo .avatar-fallback-submit { display: none; }
@media (hover: none) {
  .avatar-badge { display: inline-flex; }
  .avatar-remove { opacity: 1; transform: none; }
}
@media (max-width: 640px) {
  .avatar-edit-target { border-radius: 16px; }
  .avatar-overlay-text { display: none; }
  .avatar-overlay .icon { width: 20px; height: 20px; }
}
