/* GT SYSTEMS — vzhľad pod brand */
:root {
  --navy:        #0E2A4A;   /* hlavná značková farba (tmavomodrá z loga) */
  --navy-dark:   #091B30;
  --navy-light:  #1F4670;
  --accent:      #EF5B1F;   /* oranžová z loga (blesk) */
  --accent-dark: #C7421A;
  --accent-soft: #FFF4ED;
  --teal:        #19BFB7;   /* tyrkysová z loga (päsť) */
  --teal-dark:   #128A86;
  --teal-soft:   #E5FAF8;
  --bg:          #F4F7FB;
  --bg-soft:     #EAF1F7;
  --bg-card:     #FFFFFF;
  --border:      #DCE3EC;
  --border-soft: #EAEEF4;
  --text:        #0F1B2D;
  --text-muted:  #64748B;
  --green:       #16A34A;
  --green-bg:    #DCFCE7;
  --red:         #DC2626;
  --red-bg:      #FEE2E2;
  --yellow:      #F59E0B;
  --yellow-bg:   #FEF3C7;

  /* Design tokens */
  --radius:      14px;
  --radius-lg:   18px;
  --radius-sm:   10px;
  --shadow-sm:   0 1px 2px rgba(14, 42, 74, .06);
  --shadow:      0 1px 3px rgba(14, 42, 74, .06), 0 4px 12px rgba(14, 42, 74, .04);
  --shadow-md:   0 2px 6px rgba(14, 42, 74, .08), 0 12px 28px rgba(14, 42, 74, .07);
  --shadow-lg:   0 6px 14px rgba(14, 42, 74, .10), 0 24px 48px rgba(14, 42, 74, .12);
  --transition:  all .18s cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* Topbar — biely s logom; oranžový akcentový pruh hore (referencia na blesk z loga) */
.topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.75rem; background: #fff;
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 20;
}
.topbar .brand a {
  display: flex; align-items: center; gap: .6rem;
  color: var(--navy); font-weight: 700; text-decoration: none;
}
.topbar .brand-logo { height: 40px; width: auto; display: block; }
.topbar .brand-sub  {
  font-size: .82rem; color: var(--text-muted); font-weight: 500;
  border-left: 1px solid var(--border); padding-left: .6rem;
  letter-spacing: .03em;
}
.topbar nav { display: flex; gap: .25rem; flex: 1; margin-left: 1.5rem; flex-wrap: wrap; }
.topbar nav a {
  color: var(--text); padding: .5rem .85rem; border-radius: 8px;
  font-weight: 500; font-size: .92rem;
  transition: var(--transition);
}
.topbar nav a:hover { background: var(--bg-soft); color: var(--navy); text-decoration: none; }
.topbar nav a.nav-external { margin-left: auto; background: var(--teal); color: #fff; box-shadow: 0 2px 6px rgba(25, 191, 183, .25); }
.topbar nav a.nav-external:hover { background: var(--teal-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(25, 191, 183, .35); }

/* Embed iframe for sub-projects (Skoly SWAN) */
.embed-frame { width: 100%; height: calc(100vh - 230px); min-height: 600px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.topbar .user { display: flex; align-items: center; gap: .75rem; }
.topbar .user span { color: var(--text-muted); font-size: .88rem; }

.container { max-width: 1240px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
.bottombar { text-align: center; padding: 1.6rem 1rem 1.4rem; color: var(--text-muted); font-size: .85rem; border-top: 1px solid var(--border); background: #fff; margin-top: 2rem; position: relative; }
.bottombar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent 0%, var(--accent) 30%, var(--teal) 70%, transparent 100%); opacity: .5; }
.bottombar a { color: var(--navy); font-weight: 600; }
.bottombar a:hover { color: var(--accent); }
.footer-info { display: flex; justify-content: center; gap: 2rem; margin-bottom: .5rem; flex-wrap: wrap; align-items: center; }
.footer-brand strong { color: var(--navy-dark); font-size: 1rem; letter-spacing: .05em; }
.footer-contact { color: var(--text); }
.footer-contact a { color: var(--navy); }

/* Headings */
h1 { margin-top: 0; color: var(--navy-dark); font-weight: 700; font-size: 1.75rem; letter-spacing: -.01em; line-height: 1.25; }
h2 { color: var(--navy-dark); font-weight: 650; font-size: 1.18rem; letter-spacing: -.005em; }
h3 { color: var(--navy-dark); font-weight: 600; }

/* Cards */
.card {
  background: var(--bg-card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 1.45rem 1.6rem; margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.card h2 { margin-top: 0; }

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* Forms */
form.grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem 1rem; align-items: end; }
form.grid .span2 { grid-column: 1/-1; }
form label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; color: var(--text-muted); font-weight: 500; }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  font: inherit; padding: .6rem .8rem; border: 1px solid var(--border);
  border-radius: 10px; background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) {
  border-color: #c2d1de;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(239, 91, 31, .14);
}
textarea { resize: vertical; min-height: 80px; }
small { color: var(--text-muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.05rem; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font: inherit; color: var(--text);
  font-weight: 550; transition: var(--transition);
  box-shadow: 0 1px 0 rgba(14, 42, 74, .03);
}
.btn:hover { background: var(--bg-soft); border-color: #c2d1de; transform: translateY(-1px); box-shadow: 0 2px 6px rgba(14, 42, 74, .08); }
.btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(14, 42, 74, .08); }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: 0 2px 6px rgba(14, 42, 74, .18); }
.btn.primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); box-shadow: 0 4px 12px rgba(14, 42, 74, .25); }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 2px 6px rgba(239, 91, 31, .25); }
.btn.accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); box-shadow: 0 4px 12px rgba(239, 91, 31, .35); }
.btn.danger { background: #fff; color: var(--red); border-color: #fca5a5; }
.btn.danger:hover { background: var(--red-bg); border-color: var(--red); color: #991b1b; box-shadow: 0 2px 6px rgba(220, 38, 38, .15); }
.btn.small { padding: .32rem .7rem; font-size: .85rem; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* Alerts */
.alert { padding: .8rem 1.1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .92rem; border-left-width: 4px; border-left-style: solid; }
.alert.ok    { background: var(--green-bg); border: 1px solid #86efac; border-left-color: var(--green);  color: #166534; }
.alert.error { background: var(--red-bg);   border: 1px solid #fca5a5; border-left-color: var(--red);    color: #991b1b; }
.alert.info  { background: #E0EAF4;         border: 1px solid #A8C2DC; border-left-color: var(--navy);   color: var(--navy-dark); }
.pool-preview { border-left: 4px solid var(--navy); }
.pool-detail { margin-top: .5rem; padding: .5rem .75rem; background: #F8FAFC; border-radius: 6px; border-left: 3px solid var(--border); }
.empty { color: var(--text-muted); font-style: italic; padding: 1.25rem .5rem; text-align: center; font-size: .92rem; }
.muted { color: var(--text-muted); }

/* Auth — login page */
.auth {
  max-width: 460px; margin: 4.5rem auto; padding: 2.5rem 2.25rem 2.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-soft);
  position: relative; overflow: hidden;
}
.auth::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 50%, var(--teal) 50%, var(--teal) 100%);
}
.auth-logo { display: block; max-width: 260px; margin: .5rem auto 1.25rem; }
.auth h1 { text-align: center; font-size: 1.4rem; margin-bottom: 1.5rem; color: var(--navy-dark); font-weight: 700; }
.auth form { display: flex; flex-direction: column; gap: 1rem; }
.auth form label { font-weight: 600; color: var(--text); font-size: .85rem; }
.auth .btn { justify-content: center; padding: .7rem 1rem; font-size: .98rem; margin-top: .25rem; }
.hint { font-size: .82rem; color: var(--text-muted); margin-top: 1rem; text-align: center; }

/* Tables */
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data thead th { background: #EEF2F7; font-size: .82rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
table.data tbody tr:hover { background: var(--bg); }
table.data .sum { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 500; }

/* Badges */
.badge { display: inline-block; padding: .25rem .65rem; border-radius: 999px; font-size: .73rem; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; line-height: 1.4; }
.b-zadana       { background: #DDE8F2; color: var(--navy-light); }
.b-rozpracovana { background: var(--yellow-bg); color: #92400E; }
.b-hotova       { background: var(--green-bg);  color: #166534; }
.b-payable      { background: var(--teal-soft); color: var(--teal-dark); }
.b-pay-pending  { background: #FEF9C3; color: #854D0E; }
.b-paid         { background: #CFFAFE; color: #155E75; }
.b-pending      { background: #FEF9C3; color: #854D0E; }
.b-cancelled    { background: #F1F5F9; color: var(--text-muted); }

/* Navbar badge */
.navbadge {
  display: inline-block; min-width: 18px; padding: 0 .4rem; height: 18px; line-height: 18px;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: .72rem; font-weight: 700; text-align: center; margin-left: .25rem;
}
.navbadge.nb-blue  { background: var(--navy); }
.navbadge.nb-amber { background: var(--yellow); color: #5A3D02; }

/* tasks_new — checkbox label */
.checkbox-label {
  display: flex !important; flex-direction: row !important; align-items: center;
  gap: .6rem; padding: .65rem .9rem; background: #FFF7ED;
  border: 1px dashed var(--accent); border-radius: 8px; color: #92400E;
}
.checkbox-label input { width: auto; }
select:disabled { opacity: .5; background: #F1F5F9; }

/* pool actions */
.pool-actions form.inline { margin-bottom: .25rem; }

/* Payouts */
.payout-block {
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 1.25rem 1.35rem; margin-bottom: 1rem; background: #fff;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.payout-block:hover { box-shadow: var(--shadow); }
.payout-block h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.payout-block h3 small { font-weight: 400; font-size: .82rem; color: var(--text-muted); }
.payout-actions { display: flex; flex-direction: column; gap: .4rem; align-items: flex-end; }
.payout-total { font-size: 1.15rem; color: var(--navy-dark); }
.payout-note {
  background: #FFFBEB; border-left: 3px solid var(--accent);
  padding: .45rem .75rem; margin: .5rem 0; border-radius: 4px; font-size: .9rem;
}
tr.total-row { background: var(--bg); font-weight: 600; }
tr.row-unassigned td { background: #FFFBEB; border-top: 2px solid var(--accent); }
.mt1 { margin-top: 1rem; display: block; }

.row-stav-hotova { opacity: .8; }

/* Inline forms */
form.inline { display: inline-flex; gap: .35rem; align-items: center; margin-top: .35rem; flex-wrap: wrap; }
details summary { cursor: pointer; color: var(--navy); font-weight: 500; }
details[open] summary { margin-bottom: .5rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.stats > div {
  background: #fff;
  border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 1.25rem 1rem 1.1rem;
  text-align: center; position: relative; overflow: hidden;
  transition: var(--transition);
}
.stats > div::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  opacity: .85;
}
.stats > div:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stats .num { display: block; font-size: 2rem; font-weight: 750; color: var(--navy-dark); letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats .lbl { display: block; color: var(--text-muted); font-size: .8rem; margin-top: .4rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }

/* Weekly view */
table.week { table-layout: fixed; }
table.week td { vertical-align: top; min-height: 80px; }
.taskcell {
  background: #EAF1F7; border-left: 3px solid var(--navy-light);
  padding: .4rem .55rem; margin-bottom: .35rem; border-radius: 4px; font-size: .82rem;
}
.taskcell .d-popis { display: block; }
.taskcell .d-suma  { display: block; font-weight: 600; color: var(--text-muted); margin-top: .2rem; font-size: .78rem; }
.taskcell.stav-hotova       { background: var(--green-bg); border-color: var(--green); }
.taskcell.stav-rozpracovana { background: var(--yellow-bg); border-color: #D97706; }
.daysum { margin-top: .4rem; font-size: .76rem; color: var(--text-muted); border-top: 1px dashed var(--border); padding-top: .3rem; }
.weeksum { background: var(--bg); font-weight: 600; }

.weeknav { display: flex; gap: .35rem; }
.filter { display: flex; gap: 1rem; align-items: end; }

/* Progress bar — gradient v brand farbách (oranžová → tyrkysová) */
.progressbar { width: 100%; height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(14, 42, 74, .06); }
.progressbar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--teal) 100%);
  border-radius: 999px;
  transition: width .35s cubic-bezier(.4, 0, .2, 1);
}
.progressbar.mini { height: 5px; margin: .15rem 0; }
.progresscell small { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.inline-quick { display: inline-flex; gap: .25rem; margin-top: .25rem; }
.quick-select { padding: .15rem .35rem; font-size: .8rem; min-width: 60px; }
.note-form { display: flex; gap: .25rem; align-items: center; width: 100%; }
.note-input { flex: 1; min-width: 100px; padding: .35rem .5rem; font-size: .85rem; }

/* Compact week strip on technik dashboard */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: .5rem; margin-top: .5rem; }
.ws-day { padding: .55rem .35rem; text-align: center; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.ws-day .ws-name { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.ws-day .ws-date { font-size: .9rem; color: var(--navy-dark); font-weight: 600; margin: .15rem 0; }
.ws-day .ws-count { font-size: .85rem; color: var(--text); }
.ws-day .ws-count.muted { color: var(--text-muted); }
.ws-day.day-done    { background: var(--green-bg); border-color: #86efac; }
.ws-day.day-pending { background: var(--red-bg);   border-color: #fca5a5; }
.ws-day.today       { outline: 2px solid var(--navy); outline-offset: -2px; }
@media (max-width: 600px) {
  .week-strip { grid-template-columns: repeat(7, 1fr); gap: .25rem; }
  .ws-day { padding: .35rem .15rem; }
  .ws-day .ws-date { font-size: .8rem; }
}
.progressform { display: flex; align-items: center; gap: .35rem; }
.inline-label { display: flex; align-items: center; gap: .35rem; color: var(--text-muted); font-size: .85rem; }
.inline-label select { padding: .25rem .4rem; }

/* Mesačný kalendár */
table.month { table-layout: fixed; }
table.month th { text-align: center; }
table.month td { vertical-align: top; min-height: 100px; padding: .4rem; height: 110px; }
table.month td.today        { outline: 2px solid var(--navy); outline-offset: -2px; }
table.month td.muted-cell   { background: #F8FAFC; }
table.month td.day-done     { background: var(--green-bg); }
table.month td.day-pending  { background: var(--red-bg); }
table.month td.day-done.today    { background: #BBF7D0; }
table.month td.day-pending.today { background: #FECACA; }

.legend { display: flex; gap: .8rem; align-items: center; font-size: .82rem; color: var(--text-muted); flex-wrap: wrap; }
.legend .lg { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--border); vertical-align: middle; margin-right: .25rem; }
.legend .lg-done    { background: var(--green-bg); }
.legend .lg-pending { background: var(--red-bg); }
.legend .lg-today   { background: #fff; outline: 2px solid var(--navy); outline-offset: -2px; }

/* Mini kalendár na dashboarde */
table.month.mini td { height: 64px; min-height: 64px; padding: .25rem; }
table.month.mini .daylink { display: block; height: 100%; color: inherit; text-decoration: none; padding: .15rem; border-radius: 4px; }
table.month.mini .daylink:hover { background: rgba(14, 42, 74, .07); }
table.month.mini .daynum { font-size: .85rem; font-weight: 600; }
table.month.mini .daydots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: .25rem; }
table.month.mini .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
table.month.mini .dot.done    { background: var(--green); }
table.month.mini .dot.pending { background: var(--red); }
.daynum { font-size: .8rem; color: var(--text-muted); font-weight: 600; margin-bottom: .25rem; }

/* Expenses block (in task details) */
.exp-block { margin-top: .8rem; padding: .7rem .85rem; background: #FFFCF2; border: 1px solid #F0E5C0; border-radius: 8px; }
.exp-title { font-weight: 600; font-size: .85rem; color: #92400E; margin-bottom: .5rem; }
.exp-list { list-style: none; padding: 0; margin: 0 0 .5rem; display: flex; flex-direction: column; gap: .3rem; }
.exp-item { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border-radius: 4px; background: #fff; border: 1px solid var(--border); font-size: .88rem; }
.exp-item .exp-sum { font-weight: 600; min-width: 70px; }
.exp-item .exp-popis { flex: 1; color: var(--text-muted); }
.exp-item.exp-approved { background: #F0FDF4; border-color: #BBF7D0; }
.exp-item.exp-rejected { background: #FEF2F2; border-color: #FECACA; opacity: .7; }
.b-approved { background: var(--green-bg); color: #166534; }
.b-rejected { background: var(--red-bg); color: #991B1B; }
.exp-form { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.exp-form .exp-suma { width: 80px; }
.exp-form .exp-popis-inp { flex: 1; min-width: 200px; }

/* Task title + description */
.task-title { color: var(--navy-dark); font-weight: 600; }
.task-desc  { font-size: .82rem; color: var(--text-muted); margin-top: .2rem; line-height: 1.35; }
.task-meta  { font-size: .8rem; color: var(--navy); margin-top: .25rem; font-weight: 500; }

/* Collaborators */
.collab-block { margin-top: .8rem; padding: .7rem .85rem; background: #EDF3FA; border: 1px solid #B0CCE3; border-radius: 8px; }
.collab-title { font-weight: 600; font-size: .85rem; color: var(--navy-dark); margin-bottom: .5rem; }
.collab-title small { font-weight: 400; color: var(--text-muted); }
.collab-list { list-style: none; padding: 0; margin: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.collab-item { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: .25rem .65rem; font-size: .85rem; display: flex; align-items: center; gap: .35rem; }
.collab-add { display: flex; gap: .35rem; flex-wrap: wrap; }
.collab-chip { display: inline-flex; align-items: center; gap: .15rem; margin-right: .5rem; }
.collab-shares { flex-direction: column; gap: .35rem; }
.collab-row { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; padding: .4rem .6rem; }
.collab-row .collab-who { min-width: 160px; display: flex; align-items: center; gap: .35rem; }
.collab-row .collab-share { min-width: 130px; }
.collab-row.is-locked { background: #ECFCCB; border-color: #65A30D; }
.inline-details { display: inline-block; }
.inline-details summary { display: inline-block; }
.inline-details[open] { display: inline-flex; flex-wrap: wrap; gap: .35rem; align-items: center; }

/* Attachments */
.att-block { margin-top: .8rem; padding: .7rem .85rem; background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 8px; }
.att-title { font-weight: 600; font-size: .85rem; color: #166534; margin-bottom: .5rem; }
.att-list  { list-style: none; padding: 0; margin: 0 0 .5rem; display: flex; flex-direction: column; gap: .35rem; }
.att-item  { display: flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: .35rem .55rem; font-size: .88rem; }
.att-icon  { font-size: 1.2rem; }
.att-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
.att-name  { flex: 1; color: var(--navy); }
.att-form  { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.att-source { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; padding: .15rem .55rem; border-radius: 999px; font-weight: 600; }
.att-source-admin { background: #FEF3C7; color: #92400E; }
.att-source-tech  { background: #DBEAFE; color: var(--navy); }
.att-locked       { color: var(--text-muted); margin-left: .35rem; }
.att-by-admin     { background: #FFFBEB; }   /* veľmi jemné odlíšenie pozadia */
.att-by-technik   { background: #fff; }

/* Realizácia (poznámka pri dokončení) */
.realizacia-block { background: var(--accent-soft); border-left: 3px solid var(--accent); padding: .65rem .85rem; border-radius: 8px; font-size: .9rem; margin: .55rem 0; }

/* Archive of done tasks */
.archive-task { border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: .85rem; background: #fff; box-shadow: var(--shadow-sm); transition: var(--transition); }
.archive-task:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.archive-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .5rem; flex-wrap: wrap; }
.archive-sum { text-align: right; display: flex; flex-direction: column; gap: .15rem; align-items: flex-end; font-size: 1rem; }
.archive-sum small { font-size: .78rem; }

/* Done form (povinná realizácia) */
.done-form summary { list-style: none; cursor: pointer; }
.done-form summary::-webkit-details-marker { display: none; }
.done-content { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; padding: .6rem .8rem; background: #FEF9C3; border: 1px solid #FCD34D; border-radius: 8px; }
.done-content textarea { font: inherit; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 6px; }

/* Sub-sums in tasks table */
.sub-sum { font-size: .76rem; line-height: 1.2; margin-top: .15rem; font-weight: 500; }
.sub-sum.approved { color: var(--green); }
.sub-sum.pending  { color: var(--yellow); }
.sub-sum.total    { color: var(--navy-dark); font-weight: 700; border-top: 1px solid var(--border); padding-top: .15rem; }

/* Chart card */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: stretch; }
.chart-box  { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 1rem; }
.chart-box h3 { margin: 0 0 .75rem; font-size: 1rem; color: var(--navy-dark); }
.chart-canvas-wrap { position: relative; height: 260px; }
.chart-legend { display: grid; gap: .35rem; margin-top: .75rem; font-size: .85rem; }
.chart-legend .row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.chart-legend .swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: .4rem; }
.chart-empty { color: var(--text-muted); font-style: italic; padding: 1rem; text-align: center; }

/* Mapa */
.taskmap { height: 500px; border-radius: 10px; border: 1px solid var(--border); margin-top: .5rem; }
.leaflet-popup-content { font-size: .9rem; }
.taskmap-pin { background: transparent; border: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.map-legend { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: .6rem; padding: .55rem .75rem; background: var(--bg); border-radius: 8px; font-size: .85rem; }
.map-legend strong { color: var(--navy-dark); margin-right: .25rem; }
.map-leg-item { display: inline-flex; align-items: center; gap: .15rem; }

/* Approval row in tasks_approvals.php */
.approve-row { display: flex; gap: .6rem; align-items: end; flex-wrap: wrap; margin-top: .8rem; padding-top: .6rem; border-top: 1px dashed var(--border); }
.task-info { margin-top: .3rem; }
.task-info .task-meta { margin-left: .6rem; }

.big-sum { color: var(--navy-dark); font-size: 1.05rem; }
.form-actions { display: flex; gap: .6rem; margin-top: .5rem; }

/* User color chip */
.user-chip { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; margin-right: .35rem; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.user-chip-lg { width: 18px; height: 18px; }
.technik-name { white-space: nowrap; }

/* Activity strip */
.activity-strip { border-left: 4px solid var(--accent); background: linear-gradient(90deg, var(--accent-soft) 0%, transparent 60%); }
table.activity td { padding: .5rem .6rem; border-bottom: 1px dashed var(--border); }
table.activity .act-time { width: 100px; color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: .85rem; }
table.activity .act-who  { width: 160px; color: var(--navy-dark); }
table.activity .act-what { color: var(--text); }

@media (max-width: 980px) {
  .chart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; padding: .6rem .9rem; }
  .topbar nav { order: 3; flex-basis: 100%; margin-left: 0; }
  .topbar .brand-sub { display: none; }
  .container { padding: 1rem .75rem 2rem; }
  form.grid { grid-template-columns: 1fr; }
  .card { padding: 1.1rem; }
  table.week, table.week thead, table.week tbody, table.week tr, table.week td, table.week th { display: block; }
  table.week td { border-bottom: 1px solid var(--border); }
  table.month, table.month thead, table.month tbody, table.month tr, table.month td, table.month th { display: block; }
  table.month td { border-bottom: 1px solid var(--border); height: auto; }
  h1 { font-size: 1.35rem; }
}
