/* IntraDesk – style uzupełniające do Metronic (demo10) */

.id-grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.25rem; }

.id-form-grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 640px) { .id-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .id-span-2 { grid-column: span 2 / span 2; } }
.id-field { display: flex; flex-direction: column; gap: .35rem; font-size: .875rem; }
.id-field > span { color: var(--color-secondary-foreground); font-weight: 500; }

/* marka w panelu bocznym */
.id-brand { color: #fff; font-size: 1.125rem; font-weight: 600; letter-spacing: .01em; }

/* aktualności */
.id-news { border-left: 3px solid transparent; transition: box-shadow .15s ease, transform .15s ease; }
.id-news:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .07); }
.id-news-pinned { border-left-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 4%, var(--color-background)); }
.id-news-body { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.id-news-title { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; color: var(--color-mono); }
.id-news-tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--color-primary); }
.id-news-text { font-size: .9rem; line-height: 1.65; color: var(--color-secondary-foreground); }
.id-news-meta { display: flex; align-items: center; gap: .5rem; font-size: .8rem; padding-top: .75rem; border-top: 1px solid var(--color-border); }

.id-news-input { min-height: 132px; height: auto; padding: .75rem 1rem; line-height: 1.6; resize: vertical; }

/* komunikaty */
.id-flash { display: flex; align-items: flex-start; gap: .6rem; padding: .75rem 1rem; border-radius: .5rem; margin-bottom: 1.25rem; font-size: .875rem; border: 1px solid transparent; }
.id-flash-ok { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .35); color: #15803d; }
.id-flash-error { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .35); color: #b91c1c; }
.dark .id-flash-ok { color: #4ade80; } .dark .id-flash-error { color: #f87171; }
.id-flash i { margin-top: .1rem; }

/* zakładki */
.id-tabs { display: flex; gap: 1.25rem; border-bottom: 1px solid var(--color-border); margin-bottom: 1.25rem; overflow-x: auto; }
.id-tab { padding: .7rem 0; font-size: .875rem; font-weight: 500; color: var(--color-secondary-foreground); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: .4rem; align-items: center; }
.id-tab:hover { color: var(--color-mono); }
.id-tab.active { color: var(--color-mono); border-bottom-color: var(--color-primary); }

/* tabele */
.id-table th { white-space: nowrap; }
.id-pager { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.id-pager:empty { display: none; }

/* kropki-ikony */
.id-dot { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 9999px; background: var(--color-muted); color: var(--color-secondary-foreground); font-size: 1.25rem; flex-shrink: 0; }
.id-dot-sm { width: 2rem; height: 2rem; font-size: 1rem; }

/* statusy grafiku */
.st-onsite { --st-bg: #dcfce7; --st-fg: #166534; }
.st-remote { --st-bg: #dbeafe; --st-fg: #1e40af; }
.st-leave { --st-bg: #fef3c7; --st-fg: #92400e; }
.st-other { --st-bg: #ede9fe; --st-fg: #5b21b6; }
.st-duty { --st-bg: #fee2e2; --st-fg: #991b1b; }
.st-training { --st-bg: #cffafe; --st-fg: #155e75; }
.dark .st-onsite { --st-bg: rgba(34, 197, 94, .22); --st-fg: #86efac; }
.dark .st-remote { --st-bg: rgba(59, 130, 246, .25); --st-fg: #93c5fd; }
.dark .st-leave { --st-bg: rgba(245, 158, 11, .25); --st-fg: #fcd34d; }
.dark .st-training { --st-bg: rgba(6, 182, 212, .25); --st-fg: #67e8f9; }
.dark .st-duty { --st-bg: rgba(239, 68, 68, .25); --st-fg: #fca5a5; }
.dark .st-other { --st-bg: rgba(139, 92, 246, .25); --st-fg: #c4b5fd; }
.id-dot.st-onsite, .id-dot.st-remote, .id-dot.st-leave, .id-dot.st-other, .id-dot.st-duty, .id-dot.st-training { background: var(--st-bg); color: var(--st-fg); }
.id-pill { display: inline-block; padding: .15rem .6rem; border-radius: 9999px; font-size: .75rem; font-weight: 500; background: var(--st-bg); color: var(--st-fg); white-space: nowrap; }

/* siatka grafiku */
.sched-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: .75rem; }
.sched-table th, .sched-table td { text-align: center; padding: 3px 2px; border-bottom: 1px solid var(--color-border); border-right: 1px solid var(--color-border); min-width: 30px; }
.sched-table thead th { font-weight: 600; color: var(--color-secondary-foreground); background: var(--color-background); position: sticky; top: 0; z-index: 1; }
.sched-dn { display: block; font-weight: 400; font-size: .65rem; text-transform: uppercase; color: var(--color-muted-foreground); }
.sched-table th.sched-name { position: sticky; left: 0; z-index: 2; background: var(--color-background); text-align: start; min-width: 200px; max-width: 200px; padding: 6px 10px; font-size: .8rem; font-weight: 500; color: var(--color-mono); }
.sched-we { background: var(--color-muted); }
.sched-table thead th.sched-we { background: var(--color-muted); }
.sched-today { box-shadow: inset 2px 0 0 var(--color-primary), inset -2px 0 0 var(--color-primary); }
.sched-cell { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; font-weight: 600; background: var(--st-bg); color: var(--st-fg); }
.sched-empty { background: transparent; opacity: 0; }
.sched-edit { cursor: pointer; }
.sched-edit:hover { outline: 2px solid var(--color-primary); opacity: 1; }
.sched-total { font-size: .7rem; line-height: 1.1; font-weight: 600; color: var(--color-mono); }

/* wiersze pozycji przepustki */
.id-row { display: grid; grid-template-columns: 1fr; gap: .5rem; padding: .6rem; border: 1px solid var(--color-border); border-radius: .5rem; }
@media (min-width: 900px) { .id-row { grid-template-columns: 2fr 2fr 70px 70px 1.4fr 40px; padding: 0; border: 0; align-items: center; } }

/* oś czasu historii */
.id-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.25rem; position: relative; }
.id-timeline li { display: flex; gap: .9rem; position: relative; }
.id-timeline li:not(:last-child)::before { content: ""; position: absolute; left: 1rem; top: 2.1rem; bottom: -1.25rem; width: 1px; background: var(--color-border); }

/* dokumenty do druku (A4) */
.id-doc { background: #fff; color: #111; max-width: 820px; margin: 0 auto 2rem; padding: 2.2rem 2.5rem; border: 1px solid var(--color-border); border-radius: .5rem; font-size: 13px; line-height: 1.45; }
.id-doc-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #111; padding-bottom: .8rem; }
.id-doc-org { font-size: 20px; font-weight: 700; }
.id-doc-muted { color: #666; font-size: 12px; }
.id-doc-no { font-size: 16px; font-weight: 700; }
.id-doc-title { text-align: center; font-size: 20px; font-weight: 700; letter-spacing: .05em; margin: 1.4rem 0; }
.id-doc-meta, .id-doc-items { width: 100%; border-collapse: collapse; margin-bottom: 1.2rem; }
.id-doc-meta th, .id-doc-meta td, .id-doc-items th, .id-doc-items td { border: 1px solid #999; padding: 6px 8px; text-align: left; vertical-align: top; }
.id-doc-meta th { background: #f2f2f2; width: 17%; font-weight: 600; }
.id-doc-items thead th { background: #f2f2f2; }
.id-doc-terms { font-size: 12px; color: #333; margin: 1rem 0 0; }
.id-doc-sign { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem; margin-top: 4rem; text-align: center; font-size: 12px; }
.id-doc-line { border-top: 1px solid #111; margin-bottom: .35rem; }
.id-doc-sign small { color: #666; }
.dark .id-doc { border-color: #444; }

@media print {
	@page { size: A4; margin: 12mm; }
	* { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	html, body { height: auto !important; overflow: visible !important; background: #fff !important; display: block !important; }
	.id-wrap { display: block !important; padding: 0 !important; width: auto !important; max-width: none !important; }
	#sidebar, #header, footer.footer, .id-no-print, .kt-modal, .id-flash { display: none !important; }
	.id-main { display: block !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; max-width: none !important; background: #fff !important; }
	#scrollable_content, main { display: block !important; height: auto !important; overflow: visible !important; padding: 0 !important; margin: 0 !important; }
	.kt-container-fixed { max-width: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; }
	.id-doc { max-width: none; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
}

/* przewijanie tabel: pasek poziomy zawsze widoczny na dole okna, nagłówek przyklejony */
.id-scroll { overflow: auto; max-height: calc(100vh - 300px); min-height: 200px; scrollbar-width: thin; scrollbar-color: var(--color-muted-foreground) var(--color-muted); }
.id-scroll::-webkit-scrollbar { height: 12px; width: 12px; }
.id-scroll::-webkit-scrollbar-track { background: var(--color-muted); }
.id-scroll::-webkit-scrollbar-thumb { background: var(--color-muted-foreground); border-radius: 6px; border: 2px solid var(--color-muted); }
.id-scroll table.id-table thead th { position: sticky; top: 0; z-index: 1; background: var(--color-background); box-shadow: 0 1px 0 var(--color-border); }

/* pozwól kartom z tabelami zwężać się do szerokości okna (zamiast rozpychać stronę) */
.id-main, #scrollable_content, main, .kt-container-fixed, .kt-card { min-width: 0; }
.id-main { max-width: 100%; }
.id-wrap { min-width: 0; max-width: 100%; width: 100%; }

/* dziennik zmian / wersje */
.id-revs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.id-revs > li { padding-bottom: 1rem; border-bottom: 1px solid var(--color-border); }
.id-revs > li:last-child { border-bottom: 0; padding-bottom: 0; }
.id-rev-table { margin-top: .5rem; font-size: .8125rem; border-collapse: collapse; }
.id-rev-table th { text-align: left; font-weight: 500; color: var(--color-secondary-foreground); padding: 2px 12px 2px 0; white-space: nowrap; vertical-align: top; }
.id-rev-table td { padding: 2px 6px; vertical-align: top; max-width: 340px; overflow-wrap: anywhere; }
.id-rev-old { color: #b91c1c; text-decoration: line-through; text-decoration-color: rgba(185, 28, 28, .45); }
.id-rev-new { color: #15803d; font-weight: 500; }
.dark .id-rev-old { color: #f87171; } .dark .id-rev-new { color: #4ade80; }
.id-rev-arrow { color: var(--color-muted-foreground); }
.id-rev-table em { color: var(--color-muted-foreground); }

/* pliki PDF */
.id-file { display: flex; align-items: center; gap: .75rem; padding: .75rem; border: 1px solid var(--color-border); border-radius: .5rem; }
.id-upload { display: grid; grid-template-columns: 1fr; gap: .5rem; padding-top: .75rem; border-top: 1px dashed var(--color-border); }
.id-replace { display: inline-flex; }

/* pulpit: kompaktowe liczniki w jednym rzędzie */
.id-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; }
.id-stat { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem; }
@media (max-width: 700px) { .id-stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); } }

/* grupy odbiorców */
.id-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem .75rem; max-height: 260px; overflow: auto; padding: .25rem; }

/* realizacja operacji */
.id-realization { padding: 0; border: 0; background: transparent; }

/* zadania na pulpicie */
.id-task { display: flex; align-items: center; gap: .85rem; padding: .85rem 1.25rem; border-top: 1px solid var(--color-border); }
.id-task:first-child { border-top: 0; }
.id-task-late { background: color-mix(in srgb, #ef4444 6%, var(--color-background)); }
.id-team-tasks { border-top: 1px solid var(--color-border); }
.id-team-tasks > summary { cursor: pointer; padding: .8rem 1.25rem; font-size: .875rem; font-weight: 500; color: var(--color-secondary-foreground); }
.id-task-group { display: flex; align-items: center; gap: .5rem; padding: .5rem 1.25rem; background: var(--color-muted); font-size: .8125rem; font-weight: 600; }

.id-empty { padding: 1.5rem 1.5rem; font-size: .875rem; color: var(--color-secondary-foreground); }

/* nagłówki kart: stały odstęp od góry i dołu (także gdy zawartość zawija się do kilku wierszy) */
.kt-card-header { padding-top: 1rem; padding-bottom: 1rem; row-gap: .75rem; }

/* zegar pracy zdalnej */
.id-clock { font-size: 2.25rem; font-weight: 600; line-height: 1.1; letter-spacing: .02em; color: var(--color-mono); font-variant-numeric: tabular-nums; margin-top: .25rem; }
.id-clock-sm { font-size: 1.75rem; }

/* status „na żywo” */
.id-live { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 600; color: #15803d; }
.dark .id-live { color: #4ade80; }
.id-live-dot { width: .5rem; height: .5rem; border-radius: 9999px; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: id-pulse 1.8s infinite; }
@keyframes id-pulse { 70% { box-shadow: 0 0 0 .45rem rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

/* status pracy na pulpicie */
.id-workstatus { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .9rem; border-radius: .5rem; font-size: .875rem; background: var(--st-bg, var(--color-muted)); color: var(--st-fg, var(--color-secondary-foreground)); }
.id-workstatus b { font-weight: 700; }

/* strona aktywności */
.id-act-day { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--color-muted-foreground); padding: 1rem 0 .5rem; border-bottom: 1px solid var(--color-border); margin-bottom: .5rem; }
.id-act-day:first-child { padding-top: 0; }
.id-act-row { display: flex; align-items: center; gap: .85rem; padding: .55rem 0; }

.id-invalid { border-color: #f59e0b !important; }
.id-inv { min-width: 0; }

/* zagnieżdżone pozycje menu (grupy) */
.id-menu-sub .kt-menu-link { font-size: .8125rem; }

/* lista pól szczegółów (etykieta nad wartością) */
.id-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem 2rem; font-size: .875rem; }
.id-kv-row { display: flex; flex-direction: column; gap: .15rem; padding-bottom: .6rem; border-bottom: 1px solid var(--color-border); min-width: 0; }
.id-kv-label { font-size: .75rem; color: var(--color-muted-foreground); }
.id-kv-val { color: var(--color-mono); overflow-wrap: anywhere; }
