/* Emglare Tracker — vizuální styl převzatý z Emglare Workspace (public/style.css),
   aby obě aplikace vypadaly jako jeden produkt. Úpravy Trackeru jsou až na konci. */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
/* Emglare brand font — Gotham (fallback Poppins). url() relativní kvůli běhu pod /demo. */
@font-face { font-family: 'Gotham'; src: url('fonts/Gotham-Book.otf') format('opentype'); font-weight: 300 450; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('fonts/Gotham-Medium.otf') format('opentype'); font-weight: 500 550; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('fonts/Gotham-Bold.otf') format('opentype'); font-weight: 600 800; font-style: normal; font-display: swap; }

:root {
  --orange: #f18c15;
  --orange-dark: #db7713;
  --orange-soft: #fdf1e3;
  --ink: #17191c;
  --gray: #8a8f96;
  --gray-2: #b2b6bc;
  --line: #e6e7e9;
  --bg: #ededee;
  --card: #ffffff;
  --green: #1e7a4f;
  --green-soft: #e5f5ec;
  --red: #c02626;
  --red-soft: #fdeaea;
  --r-xl: 26px;
  --r-card: 14px;
  --r-l: 20px;
  --r-pill: 999px;
  --shadow: 0 6px 24px rgba(23, 25, 28, .06);
  --shadow-hover: 0 12px 32px rgba(23, 25, 28, .10);
  /* kategorické sloty grafů (validovaná paleta, pevné pořadí) */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --other: #b2b6bc;
  --grid: #ececf3;
  --axis: #d3d7dc;
  color-scheme: light;
  font-family: 'Gotham', Poppins, -apple-system, system-ui, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 13.5px; -webkit-font-smoothing: antialiased; }
a { color: var(--orange-dark); }
a.plain { color: inherit; text-decoration: none; }
a.plain:hover b { color: var(--orange-dark); }

/* ===== Levý tmavý sidebar (plovoucí, zaoblený) ===== */
.layout { display: flex; min-height: 100vh; padding: 12px; gap: 14px; }
#sidebar {
  width: 228px; flex-shrink: 0; background: var(--ink); border-radius: var(--r-xl);
  display: flex; flex-direction: column; padding: 18px 12px 12px;
  position: sticky; top: 12px; height: calc(100vh - 24px);
}
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 16px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 12px; }
.logo-chip {
  width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #f7a03c, #f18c15 55%, #db7713);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.logo-chip img { width: 24px; height: 24px; filter: brightness(0) invert(1); }
.sb-brand .t { font-weight: 600; font-size: 15px; line-height: 1.1; color: #fff; }
.sb-brand .t .wm { height: 22px; display: block; filter: brightness(0) invert(1); }
.sb-brand .t small { display: block; font-weight: 500; font-size: 9px; letter-spacing: .16em; color: #f18c15; padding-top: 2px; margin-left: 2px; }

#nav { flex: 1; overflow-y: auto; display: block; }
#nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-radius: 13px;
  color: #b9bdc3; text-decoration: none; font-size: 13px; font-weight: 500; margin-bottom: 3px;
  transition: background .15s, color .15s;
}
#nav a .ic { width: 19px; text-align: center; font-size: 14px; opacity: .9; display: inline-flex; justify-content: center; }
#nav a.active { background: var(--orange); color: #fff; font-weight: 600; box-shadow: 0 6px 16px rgba(241,140,21,.35); }
#nav a:hover:not(.active) { background: rgba(255,255,255,.07); color: #fff; }
#nav .nav-sep { display: block; font-size: 9.5px; font-weight: 600; text-transform: uppercase; color: #6c7178; margin: 16px 13px 7px; letter-spacing: .16em; }
#nav .nav-timer { margin: 4px 2px 12px; padding: 10px 12px; border-radius: 13px; background: rgba(255,255,255,.06); color: #fff; font-size: 12px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
#nav .nav-timer b { font-variant-numeric: tabular-nums; margin-left: auto; font-weight: 600; }
#nav .nav-timer .t-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: #b9bdc3; }

#content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#topbar { display: flex; align-items: flex-start; gap: 12px; padding: 14px 8px 10px; position: sticky; top: 0; z-index: 35; background: var(--bg); margin-top: -12px; border-radius: 0 0 14px 14px; }
#hdr-right { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.loading-box { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 70px 0; color: var(--gray); font-size: 13px; }
.spinner { width: 22px; height: 22px; border: 3px solid #e8ebf1; border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.sb-user {
  margin-top: 10px; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.06);
  border-radius: 16px; padding: 10px 12px; cursor: pointer; position: relative;
}
.sb-user:hover { background: rgba(255,255,255,.1); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12.5px; flex-shrink: 0;
}
.sb-user .u { min-width: 0; }
.sb-user .u b { font-size: 12.5px; display: block; font-weight: 600; line-height: 1.15; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: 4px; }
.sb-user .u span { color: #8b9097; font-size: 10.5px; text-transform: capitalize; }
#user-dropdown {
  position: absolute; left: 6px; bottom: 108%; background: #fff; border-radius: 16px;
  box-shadow: var(--shadow-hover); min-width: 170px; display: none; z-index: 30; overflow: hidden; padding: 6px;
}
#user-dropdown a { display: block; padding: 10px 14px; font-size: 12.5px; color: var(--ink); text-decoration: none; border-radius: 10px; font-weight: 500; }
#user-dropdown a:hover { background: var(--bg); }

/* ===== Obsah ===== */
main { flex: 1; max-width: none; padding: 8px 8px 0; width: 100%; }
#page-title { font-size: 23px; margin: 0 0 8px; font-weight: 600; letter-spacing: -.01em; }
#page-title .wave { margin-right: 6px; }
#page-title .wave .svgi { vertical-align: -2px; color: var(--orange); }
#page-title small { display: block; font-size: 14px; color: var(--gray); font-weight: 300; margin-top: 2px; }

.card {
  background: var(--card); border: 0; border-radius: var(--r-card);
  padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow);
}
h2 { margin: 0 0 16px; font-size: 15px; font-weight: 600; }
h3 { margin: 0 0 10px; font-size: 13.5px; font-weight: 600; }

/* KPI dlaždice */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: var(--card); border-radius: var(--r-card); padding: 18px 20px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; }
.kpi .n { font-size: 30px; font-weight: 300; letter-spacing: -.02em; line-height: 1; margin: 0; }
.kpi .l { font-size: 11.5px; color: var(--gray); font-weight: 500; margin-top: 4px; }

/* Formuláře */
label { display: block; font-size: 12px; font-weight: 500; margin: 12px 0 5px; color: #4a4e54; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=month], input[type=date], input[type=time], input[type=search], input[type=url], textarea, select {
  width: 100%; padding: 11px 14px; border: 1px solid #d3d7dc; border-radius: 12px; font-size: 13px;
  background: #fff; color: var(--ink); transition: border-color .12s, box-shadow .12s; font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 15%, transparent); }
input::placeholder, textarea::placeholder { color: #b2b6bc; }
textarea { min-height: 58px; resize: vertical; }
.card input[type=text], .card input[type=password], .card input[type=search], .card input[type=date], .card input[type=time], .card textarea, .card select { background: #f3f4f5; }
.hint { font-size: 11.5px; color: var(--gray); margin-top: 5px; line-height: 1.55; font-weight: 400; }

/* Tlačítka — pilulky */
button {
  background: var(--orange); color: #fff; border: 0; border-radius: var(--r-pill); padding: 10px 20px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background .12s, transform .1s, box-shadow .12s; box-shadow: 0 6px 18px rgba(241,140,21,.30);
}
button:hover { background: var(--orange-dark); transform: translateY(-1px); }
button:active { transform: translateY(0); }
button:disabled { opacity: .5; cursor: default; transform: none; }
button.secondary { background: #fff; color: #35404f; border: 1px solid #e2e2ec; box-shadow: none; }
button.secondary:hover { border-color: var(--orange); color: var(--orange); background: #fff; }
button.danger { background: var(--red); box-shadow: 0 6px 18px rgba(192,38,38,.25); }
button.small { padding: 6px 14px; font-size: 11.5px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.meta { font-size: 12px; color: var(--gray); line-height: 1.7; font-weight: 400; }

/* Tabulky */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #9a9daa; font-weight: 600; border-bottom: 1px solid #ececf3; padding: 8px 10px; }
table td { border-bottom: 1px solid #f1f1f6; padding: 11px 10px; vertical-align: middle; }
table tr:last-child td { border-bottom: 0; }
table tr:hover td { background: #fafafe; }

.badge { background: #f1f2f3; border-radius: var(--r-pill); padding: 3px 10px; font-size: 10.5px; color: var(--gray); font-weight: 600; }
.tag { border-radius: var(--r-pill); padding: 3px 12px; font-size: 11px; color: #fff; display: inline-block; font-weight: 600; background: var(--gray); }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; width: fit-content; flex-wrap: wrap; }
.tabs button { background: var(--card); color: var(--ink); box-shadow: var(--shadow); padding: 8px 18px; font-weight: 500; border: 0; }
.tabs button:hover { background: var(--card); color: var(--ink); }
.tabs button.active { background: var(--ink); color: #fff; font-weight: 600; }

/* ===== Footer ===== */
footer { padding: 16px 22px 14px; font-size: 11.5px; color: var(--gray-2); display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
footer a { color: var(--gray); text-decoration: none; }
footer a:hover { color: var(--orange-dark); }

/* ===== Login — tmavá centrovaná karta ===== */
body.auth-mode #sidebar, body.auth-mode #topbar, body.auth-mode #footer { display: none !important; }
body.auth-mode .layout { padding: 0; gap: 0; }
body.auth-mode main { max-width: none; padding: 0; background: none; }
#login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(1100px 600px at 12% -10%, #6b430f 0%, #141517 55%),
              radial-gradient(700px 500px at 105% 110%, #3d2607 0%, transparent 60%), #141517;
  position: relative;
}
@keyframes authIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.auth-card {
  width: 100%; max-width: 460px; background: #212427; border-radius: 26px; padding: 44px 42px 38px;
  box-shadow: 0 30px 90px rgba(0,0,0,.55); animation: authIn .5s cubic-bezier(.2,.8,.25,1) both; text-align: center;
}
.auth-logo {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 22px;
  background: linear-gradient(135deg, #f7a03c 0%, var(--orange) 55%, #e14a12 100%);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(241,140,21,.35);
}
.auth-logo img { width: 42px; height: 42px; filter: brightness(0) invert(1); }
.auth-brand { margin-bottom: 4px; }
.auth-brand .wm { height: 30px; display: block; margin: 0 auto; filter: brightness(0) invert(1); }
.auth-brand span { display: block; font-size: 10px; font-weight: 500; letter-spacing: .3em; color: var(--orange); text-transform: uppercase; margin-top: 2px; margin-left: 3px; }
.auth-card h2 { color: #9aa0a6; font-size: 14.5px; font-weight: 400; margin: 18px 0 26px; letter-spacing: 0; }
.field { position: relative; margin-bottom: 20px; text-align: left; }
.field label { position: absolute; top: -8px; left: 14px; background: #212427; padding: 0 7px; font-size: 11px; color: #9aa0a6; margin: 0; font-weight: 400; z-index: 1; }
.field input {
  background: transparent; border: 1px solid #4a4f55; border-radius: 12px; color: #fff;
  padding: 14px 44px 14px 16px; font-size: 14px; width: 100%;
}
.field input:focus { background: transparent; border-color: var(--orange); box-shadow: none; }
.field input::placeholder { color: #5a6066; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none !important; box-shadow: none !important; color: #9aa0a6; padding: 8px 10px; font-size: 15px;
}
.eye:hover { color: #fff; transform: translateY(-50%); }
.eye svg { display: block; }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin: -6px 0 20px; font-size: 12.5px; }
.auth-row a { color: var(--orange); text-decoration: none; font-weight: 500; }
.auth-card button.w100 { width: 100%; padding: 15px; font-size: 15px; border-radius: 14px; margin-top: 2px; }
.auth-back { margin-top: 18px; font-size: 12.5px; }
.auth-back a { color: #9aa0a6; text-decoration: none; }
.auth-back a:hover { color: #fff; }
.auth-error { background: rgba(192,38,38,.18); color: #ff9b9b; border-radius: 12px; padding: 10px 14px; font-size: 12.5px; margin-bottom: 16px; display: none; text-align: left; }
.auth-sub { color: #9aa0a6; font-size: 12.5px; margin: -18px 0 22px; font-weight: 300; }
.auth-foot { position: absolute; bottom: 18px; left: 0; right: 0; font-size: 11px; color: #6c7178; text-align: center; }
.auth-foot a { color: #9aa0a6; }

/* ===== Toggle přepínač ===== */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; font-weight: 400; color: #4a4e54; margin: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .tr { width: 38px; height: 22px; background: #d6d9dd; border-radius: 99px; transition: background .15s; position: relative; flex-shrink: 0; }
.switch .tr::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .tr { background: var(--orange); }
.switch input:checked + .tr::after { left: 19px; }
.switch input:focus-visible + .tr { box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 30%, transparent); }
.switch.dark { color: #9aa0a6; }
.switch.dark .tr { background: #4a4f55; }
.switch.dark input:checked + .tr { background: var(--orange); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(17,19,22,.5); display: flex; align-items: center; justify-content: center;
  z-index: 85; padding: 20px; animation: authIn .15s both;
}
.modal { background: #fff; border-radius: 16px; padding: 30px 34px 28px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(0,0,0,.35); position: relative; }
.modal h3 { font-size: 16px; margin: 0 0 10px; text-align: center; width: 100%; }
.modal > .row:last-of-type { justify-content: center; margin-top: 20px; }
.modal .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
/* plovoucí popisky jako na loginu */
.modal label { display: inline-block; position: relative; z-index: 2; margin: 10px 0 0 12px; padding: 0 6px; background: #fff; font-size: 11px; color: var(--gray); font-weight: 500; }
.modal label + input, .modal label + select, .modal label + textarea,
.modal div > label + input, .modal div > label + select, .modal div > label + textarea { margin-top: -8px; }
.modal .switch { display: inline-flex; position: static; margin: 14px 16px 0 4px; padding: 0; background: none; font-size: 13px; color: #4a4e54; font-weight: 400; }
.modal .hint { margin: 6px 0 4px 4px; }
.modal .new-tag { margin-top: 8px; gap: 8px; flex-wrap: nowrap; }
.modal .new-tag input { flex: 1; min-width: 0; }
.modal .entry-history { margin: 18px 0 0; padding: 12px 14px; border: 1px solid var(--line, #e6e8eb); border-radius: 12px; font-size: 12.5px; }
.modal .entry-history .eh-title { font-size: 11px; color: var(--gray); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.modal .entry-history ul { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
.modal .entry-history li { padding: 6px 0; border-top: 1px solid var(--line, #eef0f2); color: #4a4e54; line-height: 1.5; }
.modal .entry-history li:first-child { border-top: 0; padding-top: 0; }
.modal .entry-history .eh-head { color: var(--gray); font-size: 11.5px; }

/* Toast */
#msg {
  position: fixed; bottom: 18px; right: 18px; background: var(--ink); color: #fff;
  padding: 13px 20px; border-radius: 18px; display: none; max-width: 440px; z-index: 99; font-size: 13px;
  box-shadow: var(--shadow-hover); animation: authIn .25s both;
}
.svgi { vertical-align: -3px; }

/* ===== Obsahový styl (Prodify-like) ===== */
main {
  background:
    linear-gradient(to right, rgba(120,120,160,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120,120,160,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  border-radius: 14px;
}
.card { border: 1px solid #e7e7f0; box-shadow: none; border-radius: 16px; }
.card:hover { box-shadow: 0 6px 24px rgba(30,30,60,.05); }
.kpi { border: 1px solid #e7e7f0; box-shadow: none; border-radius: 16px; }

.ui-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.ui-title { margin: 0; font-size: 15px; font-weight: 600; }
.ui-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ui-ic {
  width: 34px; height: 34px; border-radius: 10px; background: #f1f0fa; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0;
}
.ui-kpi { display: flex; align-items: center; gap: 12px; }
.ui-kpi .n { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.ui-kpi .l { font-size: 11.5px; color: var(--gray); font-weight: 500; margin-top: 2px; }
.ui-kpi .s { font-size: 11px; color: var(--gray-2); margin-top: 1px; }
.ui-kpi.tone-brand .ui-ic { background: #fdeeda; color: var(--orange); }
.ui-kpi.tone-ok .ui-ic { background: #e2f6ec; color: #1d9e63; }
.ui-kpi.tone-warn .ui-ic { background: #fdf3dc; color: #c78a12; }
.ui-kpi.tone-info .ui-ic { background: #e2edfd; color: #2760b8; }

.ui-chip {
  display: inline-block; padding: 4px 10px; border-radius: 9px; font-size: 11px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; background: #f0f0f6; color: #5a5e68;
}
.ui-chip.tone-ok { background: #d9f4e6; color: #157a4c; }
.ui-chip.tone-warn { background: #fdeecd; color: #a1730e; }
.ui-chip.tone-danger { background: #fddddd; color: #c03434; }
.ui-chip.tone-info { background: #e2edfd; color: #2760b8; }
.ui-chip.tone-brand { background: #fdeeda; color: #c56f0a; }

.ui-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ui-empty { display: flex; align-items: center; gap: 8px; color: var(--gray); font-size: 13px; padding: 22px 0; justify-content: center; }
.ui-empty span { font-size: 18px; opacity: .6; }

/* kompaktní filtry v hlavičce karty */
.flt-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card .flt-bar input[type=text], .card .flt-bar input[type=search], .card .flt-bar select {
  width: auto; padding: 9px 14px; border-radius: 99px; font-size: 12.5px;
  background: #f3f4f5; border: 1px solid transparent;
}
.card .flt-bar input[type=search] { max-width: 220px; }
.card .flt-bar select { max-width: 220px; cursor: pointer; }
.card .flt-bar input:focus, .card .flt-bar select:focus { border-color: var(--orange); background: #fff; }

/* ===================== Tracker ===================== */
.muted { color: var(--gray); }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
button.ghost { background: transparent; color: var(--gray); box-shadow: none; padding: 6px 9px; }
button.ghost:hover { background: #f3f4f5; color: var(--ink); transform: none; }
button.round { width: 46px; height: 46px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
button.round.stop { background: var(--red); box-shadow: 0 6px 18px rgba(192,38,38,.25); }

/* časovač nahoře v obsahu */
.timer-card { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 16px 14px 20px; }
.timer-card .desc { flex: 1 1 160px; width: auto; border: 0; background: transparent !important; font-size: 15px; padding: 10px 4px; }
.timer-card .desc:focus { box-shadow: none; }
.timer-card select { flex: 0 1 220px; width: auto; min-width: 140px; border-radius: 99px; }
.timer-card .elapsed { font-size: 22px; font-weight: 300; letter-spacing: -.01em; font-variant-numeric: tabular-nums; min-width: 104px; text-align: right; }
.timer-card .running-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.timer-card .running-info b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer-card .running-info .meta { margin: 0; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex-shrink: 0; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* záznamy po dnech */
.day + .day { margin-top: 18px; }
.day-head { display: flex; justify-content: space-between; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #9a9daa; font-weight: 600; padding: 0 10px 8px; border-bottom: 1px solid #ececf3; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 10px; border-bottom: 1px solid #f1f1f6; border-radius: 10px; }
.entry:last-child { border-bottom: 0; }
.entry:hover { background: #fafafe; }
.entry .what { min-width: 0; }
.entry .what b { font-weight: 500; }
.entry .what .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.entry .dur { font-weight: 600; }
.entry .actions { display: flex; gap: 2px; }
.pdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--other); }

.pchip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 4px 10px; border-radius: 99px; background: #f3f4f5; margin: 2px 4px 2px 0; font-weight: 500; }
.pchip.me { background: var(--orange-soft); }
.pchip button { background: none; color: var(--gray); padding: 0 2px; font-size: 13px; box-shadow: none; }
.pchip button:hover { color: var(--red); background: none; transform: none; }
.card select.pchip-add { width: auto; padding: 4px 10px; border-radius: 99px; font-size: 12px; background: #fff; border: 1px dashed #d3d7dc; }

/* statistiky */
.chart-box { position: relative; height: 280px; }
.chart-box.tall { height: 340px; }
.two-col { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); margin-bottom: 16px; }
.two-col > .card { margin-bottom: 0; }
.bar-cell { display: flex; align-items: center; gap: 8px; }
.bar-cell .bar { height: 8px; border-radius: 0 4px 4px 0; background: var(--orange); min-width: 2px; }

/* projekty */
.company-head { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #9a9daa; font-weight: 600; margin: 18px 0 8px; }
.company-head.first { margin-top: 4px; }
.project { border: 1px solid #ececf3; border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.project-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.project-head b { font-size: 14.5px; font-weight: 600; }
.project .line { margin-top: 9px; font-size: 12.5px; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.project .line > .lbl { color: var(--gray); min-width: 58px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* git */
.commit { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 12px; padding: 10px; border-bottom: 1px solid #f1f1f6; font-size: 13px; align-items: center; }
.commit:last-child { border-bottom: 0; }
.commit code { color: var(--gray); font-size: 12px; background: #f3f4f5; padding: 3px 7px; border-radius: 7px; }
.commit .msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commit .msg b { font-weight: 500; }
.assign-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid #f1f1f6; }
.assign-row:last-child { border-bottom: 0; }
.card .assign-row select { width: auto; min-width: 220px; }

.notice { background: var(--orange-soft); border-radius: 12px; padding: 12px 14px; font-size: 13px; margin-bottom: 12px; }
ol.steps { padding-left: 18px; margin: 12px 0 0; line-height: 1.8; font-size: 12.5px; color: #4a4e54; }

/* demo režim */
.demo-banner { background: #4a3aa7; color: #fff; text-align: center; font-size: 12.5px; padding: 7px 12px; }
.demo-banner a { color: #fff; font-weight: 600; margin-left: 8px; }
.demo-pill { display: inline-block; margin-top: 14px; background: rgba(144,133,233,.18); color: #c9c2ff; font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 5px 12px; border-radius: 99px; }

/* HR moduly */
.day-ed-sec { margin-bottom: 4px; }
.work-row { display: grid; grid-template-columns: minmax(0,1fr) 150px 62px 10px 62px 26px; gap: 6px; align-items: center; margin-bottom: 6px; }
.work-row .dash { text-align: center; color: var(--gray-2); }
.work-row input, .work-row select { padding: 7px 9px; }
.pres-row { display: grid; grid-template-columns: auto 90px auto 90px 26px; gap: 8px; align-items: center; margin-bottom: 6px; }
.pres-row .lbl { font-size: 12px; color: var(--gray); }
.pres-row input { padding: 7px 9px; }
@media (max-width: 560px) { .work-row { grid-template-columns: 1fr 1fr; } .work-row .dash { display: none; } .pres-row { grid-template-columns: auto 1fr auto 1fr 26px; } }
.split-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; margin-bottom: 8px; background: #f0f0f6; }
.split-bar .p { background: #1baf7a; } .split-bar .o { background: #eb6834; }
.split-legend { display: flex; gap: 18px; font-size: 12px; color: var(--ink-2); margin-bottom: 12px; flex-wrap: wrap; }
.split-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.split-legend i.p { background: #1baf7a; } .split-legend i.o { background: #eb6834; }
button.ghost.pin { font-size: 16px; color: var(--gray-2); padding: 2px 6px; }
button.ghost.pin.on { color: var(--orange); }
.presence-bar { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid #e7e7f0; border-radius: 14px; padding: 8px 10px 8px 16px; margin-bottom: 10px; font-size: 13px; }
.presence-bar:empty { display: none; }
.presence-bar > span:nth-child(2) { flex: 1; min-width: 0; }
.presence-bar .pres-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.pres-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gray-2); flex-shrink: 0; }
.pres-dot.on { background: #35b96e; box-shadow: 0 0 0 4px rgba(53,185,110,.18); }
.pres-dot.pause { background: #f18c15; box-shadow: 0 0 0 4px rgba(241,140,21,.18); }
.pres-gap { margin: 2px 0 6px 4px; font-size: 12px; }
table.clickable tr:not(:first-child) { cursor: pointer; }
.timer-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; margin-left: auto; }
.ho-switch { display: flex; align-items: center; padding: 0 2px; }
.ho-switch .switch { font-size: 12.5px; white-space: nowrap; }
.nav-badge { margin-left: auto; background: #e02424; color: #fff; font-size: 10px; font-weight: 700; border-radius: 99px; padding: 1px 7px; min-width: 18px; text-align: center; }
#nav a.active .nav-badge { background: #fff; color: #e02424; }
.tab-badge { background: var(--orange); color: #fff; font-size: 10px; border-radius: 99px; padding: 1px 6px; margin-left: 4px; }
.tabs button.active .tab-badge { background: #fff; color: var(--ink); }
.month-nav { display: inline-flex; align-items: center; gap: 10px; }
.month-nav b { min-width: 130px; text-align: center; font-weight: 600; text-transform: capitalize; }
.month-nav button { padding: 5px 12px; font-size: 14px; }
.grid2c { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.att-table td, .att-table th { padding: 7px 8px; }
.att-table tr.off td { background: #fafafa; color: var(--gray); }
.att-table tr.today td { background: var(--orange-soft); }
.att-table td.desc { min-width: 260px; font-size: 12px; color: #4a4e54; }
.att-table .pchip { font-size: 11px; padding: 2px 8px; }
td.neg, .neg { color: var(--red); }
td.pos { color: #1d9e63; }
.team-cal { font-size: 12px; }
.team-cal th { text-align: center; padding: 4px 2px; min-width: 26px; }
.team-cal th:first-child { text-align: left; }
.team-cal th span { font-weight: 400; color: var(--gray-2); }
.team-cal td { text-align: center; padding: 6px 2px; border: 1px solid #f1f1f6; }
.team-cal td:first-child { text-align: left; padding-right: 10px; border-left: 0; }
.team-cal .we { background: #fafafa; }
.team-cal td.has { background: var(--orange-soft); }
.team-cal td.has.pending { opacity: .55; }
.notice.deadline { display: flex; align-items: center; gap: 8px; }
.notice.deadline.late { background: var(--red-soft); color: var(--red); }
.flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.flow-step { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid #e7e7f0; border-radius: 12px; padding: 8px 12px; }
.flow-step b { font-size: 16px; }
.flow-arrow { color: var(--gray-2); }
.modal textarea { width: 100%; }

/* reporty (Toggl styl) */
.rep-tabs { display: flex; gap: 22px; border-bottom: 1px solid #e2e2ec; margin: 0 4px 14px; overflow-x: auto; }
.rep-tabs button { background: none; box-shadow: none; color: var(--gray); border-radius: 0; padding: 10px 0; font-size: 13.5px; font-weight: 500; border-bottom: 2px solid transparent; }
.rep-tabs button:hover { background: none; color: var(--ink); transform: none; }
.rep-tabs button.active { color: var(--ink); border-bottom-color: var(--orange); font-weight: 600; }
.filters-card { padding: 14px 16px; }
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--card); border: 1px solid #e7e7f0; border-radius: 16px; margin-bottom: 16px; }
.kpi-strip > div { padding: 16px 20px; border-right: 1px solid #ececf3; }
.kpi-strip > div:last-child { border-right: 0; }
.kpi-strip span { display: block; font-size: 11.5px; color: var(--gray); font-weight: 500; }
.kpi-strip b { font-size: 22px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.two-col.wide-left { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
table.grp .grp-head { cursor: pointer; }
table.grp .grp-head b { font-weight: 500; }
.workload td.wl { border-radius: 6px; }
.wl.low { background: #f3f4f5; } .wl.mid { background: #e2edfd; } .wl.full { background: #d9f4e6; } .wl.over { background: #fddddd; }
.wl-l { display: inline-block; padding: 1px 8px; border-radius: 6px; margin-right: 4px; }
/* rozpočet projektu */
.budget { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.budget-bar { width: 140px; height: 8px; background: #f0f0f6; border-radius: 99px; overflow: hidden; }
.budget-bar i { display: block; height: 100%; background: #1d9e63; border-radius: 99px; }
.budget.warn .budget-bar i { background: #eda100; } .budget.over .budget-bar i { background: var(--red); }
/* časovač: upozornění, oblíbené, pohledy */
.alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.alerts:empty { display: none; }
.alert-item { display: flex; align-items: center; gap: 8px; background: var(--orange-soft); border-radius: 12px; padding: 10px 14px; font-size: 13px; color: var(--ink); text-decoration: none; }
.alert-item.warn { background: #fdeecd; } .alert-item.danger { background: var(--red-soft); color: var(--red); }
a.alert-item:hover { filter: brightness(.97); }
.favs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.favs:empty { display: none; }
.fav { display: inline-flex; align-items: center; }
.fav .ghost { padding: 4px 6px; }
.view-switch { display: inline-flex; background: #f3f4f5; border-radius: 99px; padding: 3px; }
.view-switch button { background: transparent; box-shadow: none; color: var(--gray); padding: 5px 12px; font-size: 12px; font-weight: 500; }
.view-switch button:hover { background: transparent; color: var(--ink); transform: none; }
.view-switch button.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
table.timesheet td, table.timesheet th { padding: 9px 10px; }
table.timesheet .today { background: var(--orange-soft); }
table.timesheet tr.tot td { border-top: 1px solid #ececf3; }
.cal-week { display: grid; grid-template-columns: 44px repeat(7, minmax(90px, 1fr)); gap: 4px; overflow-x: auto; }
.cal-hours { padding-top: 34px; font-size: 10.5px; color: var(--gray-2); }
.cal-hours div { border-top: 1px solid #f1f1f6; }
.cal-day-head { height: 34px; font-size: 12px; font-weight: 600; display: flex; flex-direction: column; justify-content: center; padding: 0 4px; line-height: 1.25; }
.cal-day-head span { font-weight: 400; color: var(--gray); font-size: 11px; }
.cal-day.today .cal-day-head { color: var(--orange-dark); }
.cal-col { position: relative; background: repeating-linear-gradient(to bottom, #fafafe 0, #fafafe 43px, #f1f1f6 43px, #f1f1f6 44px); border-radius: 8px; }
.cal-block { position: absolute; left: 3px; right: 3px; background: #fff; border: 1px solid #ececf3; border-left: 3px solid var(--orange); border-radius: 6px; padding: 3px 6px; font-size: 11px; overflow: hidden; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.cal-block b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-block span { color: var(--gray); font-size: 10.5px; }

/* Responsive — mobil: sidebar se změní na kompaktní horní lištu (jako Workspace) */
@media (max-width: 900px) {
  .layout { flex-direction: column; padding: 8px; gap: 10px; }
  #sidebar {
    width: 100%; height: auto; position: static; border-radius: 18px;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 10px; padding: 10px 12px;
  }
  .sb-brand { border: 0; margin: 0; padding: 0; }
  .sb-brand .t .wm { height: 18px; }
  #sb-user-slot { grid-column: 3; grid-row: 1; }
  .sb-user { margin: 0; padding: 4px; background: transparent; }
  .sb-user .u { display: none; }
  #nav { grid-column: 1 / -1; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 2px; }
  #nav a { flex-shrink: 0; padding: 8px 12px; margin: 0; font-size: 12.5px; }
  #nav .nav-sep, #nav .nav-timer { display: none; }
  #user-dropdown { left: auto; right: 0; bottom: auto; top: 110%; }
  #topbar { flex-wrap: wrap; padding: 4px 2px; position: static; margin-top: 0; }
  #page-title { font-size: 19px; }
  main { padding: 4px 2px 0; }
  .card { padding: 16px; border-radius: 18px; }
  .modal { padding: 22px 18px; border-radius: 18px; }
  .modal .grid2, .grid2c { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .ui-kpi .n { font-size: 21px; }
  .two-col, .two-col.wide-left { grid-template-columns: 1fr; }
  .kpi-strip > div { border-right: 0; border-bottom: 1px solid #ececf3; }
  .timer-card select { flex: 1 1 100%; }
  .entry { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
  .entry .when { display: none; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 4px; }
  .tabs > * { flex-shrink: 0; }
  .card canvas { max-width: 100%; }
  .auth-card { padding: 34px 22px 28px; }
}
@media print {
  #sidebar, #topbar, #footer, .no-print { display: none !important; }
  .layout { padding: 0; }
  main { background: none; }
  .card { border: 0; }
}
