/* Grohy Cloud – černo-červený tmavý motiv */
:root {
  --bg: #08080a;
  --bg2: #0e0e11;
  --panel: #131317;
  --panel2: #1a1a20;
  --panel3: #222229;
  --line: #24242c;
  --line2: #30303a;
  --text: #f1f1f4;
  --text2: #c4c4cc;
  --muted: #84848f;
  --red: #e11d2e;
  --red2: #ff3b4b;
  --red-dim: rgba(225, 29, 46, .14);
  --red-glow: rgba(225, 29, 46, .38);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, .14);
  --amber: #f5a524;
  --amber-dim: rgba(245, 165, 36, .14);
  --gray-dim: rgba(132, 132, 143, .16);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --side: 256px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --tb: 64px;
  --font: "Inter", "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--red2); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace; font-size: 12.5px; }
code { background: var(--panel3); padding: 2px 6px; border-radius: 6px; color: var(--text2); }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--red); color: #fff; }

/* scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; border: 2px solid var(--bg); }

/* ---------- logo ---------- */
.logo {
  width: 34px; height: 34px; border-radius: 10px; flex: none; position: relative;
  background: radial-gradient(120% 120% at 20% 10%, #ff4b5a 0%, #e11d2e 45%, #7a0b16 100%);
  box-shadow: 0 6px 20px var(--red-glow), inset 0 1px 0 rgba(255,255,255,.25);
}
.logo::after {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 19H8a5 5 0 1 1 1.1-9.88A6 6 0 0 1 20 11.5a3.75 3.75 0 0 1-2.5 7.5z'/%3E%3C/svg%3E") center/62% no-repeat;
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.brand b { color: var(--red2); font-weight: 750; }
.brand.big { font-size: 22px; margin-bottom: 22px; }
.brand.big .logo { width: 42px; height: 42px; border-radius: 12px; }
.boot-loader { height: 100vh; display: grid; place-items: center; }
.boot-loader .logo { width: 54px; height: 54px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.9); opacity: .7; } }

/* ---------- tlačítka & formuláře ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--line2); background: var(--panel2); color: var(--text);
  font: 500 13.5px var(--font); cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn:hover { background: var(--panel3); border-color: #3c3c48; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: linear-gradient(180deg, #f02a3b, #c8121f); border-color: #ff4554; color: #fff; box-shadow: 0 6px 18px var(--red-glow); }
.btn.primary:hover { background: linear-gradient(180deg, #ff3646, #d81726); }
.btn.danger { color: var(--red2); border-color: rgba(225,29,46,.4); background: var(--red-dim); }
.btn.danger:hover { background: rgba(225,29,46,.24); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text2); }
.btn.ghost:hover { background: var(--panel2); color: var(--text); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; }
.btn.icon { width: 38px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn.block { width: 100%; }
.btn .i { width: 17px; height: 17px; }

input, select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line2); background: var(--bg2); color: var(--text);
  font: 14px var(--font); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-dim); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--red); cursor: pointer; flex: none; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2384848f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 34px; }
.form { display: grid; gap: 14px; }
.form label, label.f { display: grid; gap: 6px; font-size: 12.5px; color: var(--text2); font-weight: 500; }
.form .check, label.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); cursor: pointer; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13.5px; border: 1px solid; }
.alert.error { background: var(--red-dim); border-color: rgba(225,29,46,.4); color: #ffb3ba; }
.alert.info { background: var(--panel2); border-color: var(--line2); color: var(--text2); }
.alert.ok { background: var(--green-dim); border-color: rgba(34,197,94,.35); color: #a7f3c4; }

/* ---------- přihlášení ---------- */
.auth-body, .auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(800px 500px at 85% -10%, rgba(225,29,46,.22), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(225,29,46,.12), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 400px; background: rgba(19,19,23,.88); backdrop-filter: blur(20px);
  border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow);
}
.auth-card.wide { max-width: 560px; }
.auth-card h2 { margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin: 0 0 22px; }
.checks { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 6px; font-size: 13px; }
.checks .ok { color: #86efac; }
.checks .bad { color: #fda4af; }

/* ---------- rozvržení ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side); flex: none; position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, #0d0d10, #0a0a0c);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40;
}
.sidebar .brand { padding: calc(20px + var(--safe-t)) 20px 16px; }
.nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.nav-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 16px 10px 6px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.nav-sec button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 6px; display: flex; }
.nav-sec button:hover { color: var(--text); background: var(--panel2); }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px;
  color: var(--text2); font-weight: 500; margin: 1px 0; position: relative; text-decoration: none;
}
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.active { background: var(--red-dim); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); box-shadow: 0 0 12px var(--red); }
.nav a.active .i { color: var(--red2); }
.nav a .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a .dot { margin-left: auto; }
/* kategorie složek */
.nav-grp { position: relative; display: flex; align-items: center; }
.nav-gt { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; color: var(--text); font: inherit; font-weight: 600; font-size: 13px; padding: 7px 34px 7px 10px; border-radius: 10px; text-align: left; }
.nav-gt:hover { background: var(--panel); }
.nav-gt .i { width: 14px; height: 14px; color: var(--muted); transition: transform .15s; flex: none; }
.nav-grp.closed .nav-gt .i { transform: rotate(-90deg); }
.nav-gt .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-sub { margin-left: 14px; padding-left: 8px; border-left: 1px solid var(--line); }
.nav-row { position: relative; }
.nav-row a { padding-right: 34px; }
.nav a.noacc { opacity: .45; text-decoration: line-through; cursor: default; }
.nav-more { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 7px; display: flex; opacity: 0; transition: opacity .12s; }
.nav-more .i { width: 16px; height: 16px; }
.nav-more:hover { color: var(--text); background: var(--panel2); }
.nav-row:hover .nav-more, .nav-grp:hover .nav-more, .nav-more:focus-visible { opacity: 1; }
@media (hover: none) { .nav-more { opacity: .8; } }
.nav-hint { font-size: 12px; color: var(--muted); padding: 4px 10px 8px; line-height: 1.4; }
/* využité místo uživatele */
.side-quota { margin: 0 12px 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.sq-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text2); font-weight: 600; }
.sq-top .i { width: 16px; height: 16px; color: var(--red2); }
.sq-top span { flex: 1; }
.sq-top b { color: var(--text); font-size: 12.5px; }
.side-quota .bar { margin: 9px 0 7px; height: 6px; }
.side-quota .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--red2)); border-radius: inherit; }
.sq-val { font-size: 13px; font-weight: 650; color: var(--text); }
.side-quota.warn .sq-top b { color: #ffb020; }
.side-quota.full { border-color: rgba(225, 29, 46, .5); }
.side-quota.full .sq-top b { color: var(--red2); }
.side-foot { border-top: 1px solid var(--line); padding: 12px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: linear-gradient(135deg, #3a0a10, #e11d2e); color: #fff; flex: none; }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who span { font-size: 12px; color: var(--muted); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: calc(var(--tb) + var(--safe-t)); display: flex; align-items: center; gap: 12px; padding: var(--safe-t) 28px 0;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
  background: rgba(8,8,10,.82); backdrop-filter: blur(16px);
}
.topbar h1 { font-size: 19px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .menu-btn { display: none; }
.content { padding: 26px 28px 60px; max-width: 1400px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.section { margin-top: 32px; }
.section > .page-head { margin-bottom: 14px; }

/* ---------- karty ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card.pad { padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.grid > * { min-width: 0; }
.stat { padding: 18px 20px; display: flex; gap: 14px; align-items: center; position: relative; overflow: hidden; }
.stat .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--red-dim); color: var(--red2); flex: none; }
.stat .ico .i { width: 22px; height: 22px; }
.stat .v { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 12.5px; }
.stat::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(225,29,46,.10), transparent 70%); }

/* karta úložiště / zařízení */
.scard { padding: 18px; display: flex; flex-direction: column; gap: 14px; transition: border-color .15s, transform .15s; }
.scard:hover { border-color: var(--line2); }
.scard.offline { opacity: .82; }
.scard-top { display: flex; gap: 13px; align-items: flex-start; }
.sicon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--panel2); border: 1px solid var(--line2); }
.sicon .i { width: 22px; height: 22px; }
.sicon.gdrive { color: #34a853; } .sicon.onedrive { color: #3b9cff; } .sicon.dropbox { color: #3d8bff; }
.sicon.local { color: var(--red2); } .sicon.webdav { color: #c084fc; } .sicon.device, .sicon.external, .sicon.folder { color: #f1f1f4; } .sicon.icloud { color: #7dd3fc; }
.scard-title { flex: 1; min-width: 0; }
.scard-title b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scard-title span { color: var(--muted); font-size: 12.5px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; min-width: 0; }
.metric .k { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.metric .k .i { width: 13px; height: 13px; }
.metric .v { font-weight: 650; font-size: 14px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.scard-foot .grow { flex: 1; }
.spark { width: 100%; height: 38px; display: block; }

/* stav */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.online { background: var(--green-dim); color: #4ade80; }
.badge.offline { background: var(--gray-dim); color: #a1a1aa; }
.badge.error { background: var(--red-dim); color: var(--red2); }
.badge.unknown, .badge.pending { background: var(--amber-dim); color: var(--amber); }
.badge.role { background: var(--panel3); color: var(--text2); font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #6b6b75; flex: none; display: inline-block; }
.dot.online { background: var(--green); box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.dot.error { background: var(--red); box-shadow: 0 0 0 3px rgba(225,29,46,.2); }
.dot.unknown { background: var(--amber); }
.badge.online .dot { animation: live 2s infinite; }
@keyframes live { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); } 50% { box-shadow: 0 0 0 5px rgba(34,197,94,0); } }

.bar { height: 6px; border-radius: 6px; background: var(--panel3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #b10f1c, var(--red2)); transition: width .3s ease; }
.bar.green > i { background: linear-gradient(90deg, #15803d, #22c55e); }
.bar.warn > i { background: linear-gradient(90deg, #b45309, var(--amber)); }
.quota-line { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- prohlížeč souborů ---------- */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.search { position: relative; min-width: 200px; }
.search .i { position: absolute; left: 11px; top: 11px; color: var(--muted); width: 17px; height: 17px; }
.search input { padding-left: 36px; height: 38px; }
.crumbs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; margin-bottom: 14px; font-size: 14px; }
.crumbs a { color: var(--text2); padding: 4px 8px; border-radius: 8px; text-decoration: none; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs a:hover { background: var(--panel2); color: var(--text); }
.crumbs a:last-child { color: var(--text); font-weight: 600; }
.crumbs .sep { color: var(--muted); }
.selbar {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; margin-bottom: 12px;
  background: var(--red-dim); border: 1px solid rgba(225,29,46,.35); border-radius: 12px; flex-wrap: wrap;
}
.selbar b { margin-right: auto; }

/* bez overflow:hidden – jinak by se karta stala posuvným rámem a přilepená hlavička by zakryla soubory */
.files > :first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.files > :last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.frow {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) 100px 150px 150px 150px 44px;
  align-items: center; gap: 10px; padding: 0 12px; min-height: 54px; border-bottom: 1px solid var(--line);
  cursor: default; user-select: none; transition: background .1s;
}
.frow:last-child { border-bottom: 0; }
.frow.head { min-height: 42px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: var(--bg2); position: sticky; top: calc(var(--tb) + var(--safe-t)); z-index: 5; }
.frow.head span[data-sort] { cursor: pointer; }
.frow.head span[data-sort]:hover { color: var(--text); }
.frow:not(.head):hover { background: var(--panel2); }
.frow.sel { background: var(--red-dim) !important; }
.frow.drop { outline: 2px dashed var(--red); outline-offset: -4px; }
.fname { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.fname .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.fname .sub { display: none; font-size: 12px; color: var(--muted); }
.ficon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--panel2); color: var(--text2); overflow: hidden; }
.ficon .i { width: 19px; height: 19px; }
.ficon.dir { background: var(--red-dim); color: var(--red2); }
.ficon.img { color: #f0abfc; } .ficon.vid { color: #fca5a5; } .ficon.aud { color: #fdba74; }
.ficon.pdf { color: #f87171; } .ficon.doc { color: #93c5fd; } .ficon.xls { color: #86efac; } .ficon.zip { color: #fcd34d; } .ficon.code { color: #a5b4fc; }
.ficon img { width: 100%; height: 100%; object-fit: cover; }
.fcol { font-size: 13px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcol .t { display: block; font-size: 12px; color: var(--muted); }
.fcol.user { display: flex; align-items: center; gap: 7px; }
.mini-av { width: 22px; height: 22px; border-radius: 50%; font-size: 10px; font-weight: 700; display: grid; place-items: center; background: var(--panel3); color: var(--text2); flex: none; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty .big { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--red-dim); color: var(--red2); }
.empty .big .i { width: 30px; height: 30px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }

/* mřížka */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 14px; }
.gitem { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; position: relative; user-select: none; }
.gitem:hover { border-color: var(--line2); }
.gitem.sel { border-color: var(--red); background: var(--red-dim); }
.gitem .thumb { aspect-ratio: 4/3; border-radius: 8px; background: var(--bg2); display: grid; place-items: center; overflow: hidden; margin-bottom: 8px; }
.gitem .thumb img { width: 100%; height: 100%; object-fit: cover; }
.gitem .thumb .i { width: 36px; height: 36px; color: var(--muted); }
.gitem .thumb.dir .i { color: var(--red2); }
.gitem .nm { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gitem .sub { font-size: 11.5px; color: var(--muted); }
.gitem input[type=checkbox] { position: absolute; top: 16px; left: 16px; opacity: 0; transition: opacity .1s; }
.gitem:hover input[type=checkbox], .gitem.sel input[type=checkbox] { opacity: 1; }

.dropzone {
  position: fixed; inset: 0; z-index: 90; display: none; place-items: center; pointer-events: none;
  background: rgba(8,8,10,.75); backdrop-filter: blur(4px);
}
.dropzone.on { display: grid; }
.dropzone div { border: 2px dashed var(--red); border-radius: 24px; padding: 50px 70px; text-align: center; background: var(--red-dim); font-size: 18px; font-weight: 600; }
.dropzone .i { width: 48px; height: 48px; color: var(--red2); margin-bottom: 10px; }

/* ---------- tabulky ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 12px 14px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--panel2); }
.table .act { text-align: right; white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }
.cell-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.cell-main b { display: block; font-weight: 600; }
.cell-main span { font-size: 12px; color: var(--muted); }
.copybox { display: flex; gap: 6px; align-items: center; }
.copybox input { height: 34px; font-size: 12.5px; font-family: ui-monospace, Consolas, monospace; }

/* ---------- modální okna ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(0,0,0,.66); backdrop-filter: blur(6px); animation: fade .15s ease;
}
.modal {
  width: 100%; max-width: 520px; max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow);
  animation: pop .18s cubic-bezier(.2,.9,.3,1.2);
}
.modal.wide { max-width: 760px; }
.modal.xl { max-width: 1100px; }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-h h2 { flex: 1; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-b { padding: 20px; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.tabs { display: flex; gap: 4px; background: var(--bg2); padding: 4px; border-radius: 12px; margin-bottom: 18px; border: 1px solid var(--line); }
.tabs button { flex: 1; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--text2); font: 500 13.5px var(--font); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; }
.tabs button.on { background: var(--panel3); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { background: var(--bg2); border: 1px solid var(--line2); border-radius: 14px; padding: 16px 12px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; color: var(--text); font: inherit; }
.tile:hover { border-color: var(--red); background: var(--red-dim); }
.tile:active { transform: scale(.98); }
.tile .sicon { margin: 0 auto 10px; }
.tile b { display: block; font-size: 13.5px; }
.tile span { font-size: 11.5px; color: var(--muted); }
.steps { counter-reset: s; display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; color: var(--text2); }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; background: var(--red-dim); color: var(--red2); border: 1px solid rgba(225,29,46,.4); }
.pair-code { font: 700 34px ui-monospace, Consolas, monospace; letter-spacing: .14em; text-align: center; padding: 18px; border-radius: 14px; background: var(--bg2); border: 1px dashed var(--red); color: #fff; margin: 14px 0 6px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

/* náhled */
.preview { display: grid; place-items: center; min-height: 300px; background: #000; border-radius: 12px; overflow: hidden; }
.preview img, .preview video { max-width: 100%; max-height: 72vh; display: block; }
.preview audio { width: 90%; margin: 40px 0; }
.preview iframe { width: 100%; height: 72vh; border: 0; background: #fff; }
.preview pre { width: 100%; max-height: 72vh; overflow: auto; margin: 0; padding: 16px; background: var(--bg2); color: var(--text2); font-size: 12.5px; white-space: pre-wrap; align-self: stretch; }

/* výběr složky */
.picker { border: 1px solid var(--line); border-radius: 12px; max-height: 340px; overflow-y: auto; }
.picker .pi { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.picker .pi:hover { background: var(--panel2); }
.picker .pi:last-child { border-bottom: 0; }

/* kontextové menu */
.menu {
  position: fixed; z-index: 120; min-width: 220px; padding: 6px; border-radius: 12px;
  background: var(--panel2); border: 1px solid var(--line2); box-shadow: var(--shadow); animation: fade .1s;
}
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; color: var(--text); font: 13.5px var(--font); border-radius: 8px; cursor: pointer; text-align: left; }
.menu button:hover { background: var(--panel3); }
.menu button.danger { color: var(--red2); }
.menu button.danger:hover { background: var(--red-dim); }
.menu hr { border: 0; border-top: 1px solid var(--line2); margin: 5px 4px; }

/* ---------- panel nahrávání (vysouvací karta) ---------- */
.uploads {
  position: fixed; right: 22px; bottom: 22px; z-index: 80; width: 400px; max-width: calc(100vw - 24px);
  background: rgba(19,19,23,.96); backdrop-filter: blur(18px); border: 1px solid var(--line2);
  border-radius: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.65), 0 0 0 1px rgba(225,29,46,.08);
  transform: translateY(calc(100% + 40px)); opacity: 0; transition: transform .35s cubic-bezier(.2,.9,.25,1), opacity .25s;
  overflow: hidden; display: flex; flex-direction: column;
}
.uploads.open { transform: none; opacity: 1; }
.up-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px 16px; cursor: pointer; }
.up-ring { width: 40px; height: 40px; flex: none; position: relative; }
.up-ring svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.up-ring circle { fill: none; stroke-width: 4; }
.up-ring .bg { stroke: var(--panel3); }
.up-ring .fg { stroke: var(--red); stroke-linecap: round; transition: stroke-dashoffset .3s; filter: drop-shadow(0 0 4px var(--red-glow)); }
.up-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; }
.up-ring.done .fg { stroke: var(--green); filter: none; }
.up-title { flex: 1; min-width: 0; }
.up-title b { display: block; font-size: 14px; }
.up-title span { font-size: 12px; color: var(--muted); }
.up-head .btn { flex: none; }
.up-head .chev { transition: transform .25s; }
.uploads.collapsed .up-head .chev { transform: rotate(180deg); }
.up-list { max-height: min(52vh, 420px); overflow-y: auto; border-top: 1px solid var(--line); transition: max-height .3s ease; }
.uploads.collapsed .up-list { max-height: 0; border-top-color: transparent; }
.up-item { padding: 12px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.up-item:last-child { border-bottom: 0; }
.up-item .ficon { grid-row: span 3; align-self: start; }
.up-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-pct { font-weight: 700; font-size: 13px; color: var(--red2); text-align: right; }
.up-item .bar { grid-column: 2 / 4; height: 5px; }
.up-meta { grid-column: 2 / 4; display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.up-meta .eta { white-space: nowrap; }
.up-item.done .up-pct { color: #4ade80; }
.up-item.done .bar > i { background: linear-gradient(90deg, #15803d, #22c55e); }
.up-item.error .up-pct { color: var(--red2); }
.up-item.error .up-meta { color: #fda4af; }
.up-item.saving .bar > i { background: linear-gradient(90deg, #b10f1c, var(--red2), #b10f1c); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.up-x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 6px; display: flex; }
.up-x:hover { color: var(--text); background: var(--panel3); }

/* toast */
.toasts { position: fixed; top: calc(16px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 24px); }
.toast { padding: 11px 16px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 13.5px; display: flex; gap: 10px; align-items: center; animation: pop .2s; }
.toast.error { border-color: rgba(225,29,46,.5); background: #2a0d11; }
.toast.ok .i { color: #4ade80; }
.toast.error .i { color: var(--red2); }

/* veřejné sdílení */
.share-top { height: calc(64px + var(--safe-t)); display: flex; align-items: center; justify-content: space-between; padding: var(--safe-t) 28px 0; border-bottom: 1px solid var(--line); background: rgba(8,8,10,.85); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 30; }
.share-main { max-width: 1100px; margin: 0 auto; padding: 28px 20px 80px; }
.share-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.share-hero .ficon { width: 56px; height: 56px; border-radius: 16px; }
.share-hero .ficon .i { width: 28px; height: 28px; }
.share-hero > div { flex: 1; min-width: 200px; }
.single { max-width: 520px; margin: 40px auto; text-align: center; padding: 34px; }
.single .ficon { width: 80px; height: 80px; border-radius: 22px; margin: 0 auto 16px; }
.single .ficon .i { width: 38px; height: 38px; }

.mobile-nav { display: none; }
.overlay { display: none; }

/* ---------- tablet ---------- */
@media (max-width: 1180px) {
  .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .frow { grid-template-columns: 34px minmax(0, 1fr) 90px 140px 130px 44px; }
  .frow .c-mod { display: none; }
}
@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .28s cubic-bezier(.2,.9,.3,1); box-shadow: var(--shadow); }
  .layout.nav-open .sidebar { transform: none; }
  .layout.nav-open .overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 35; animation: fade .2s; }
  .topbar { padding: var(--safe-t) calc(16px + var(--safe-r)) 0 calc(16px + var(--safe-l)); }
  .content { overflow-x: clip; }
  .topbar .menu-btn { display: inline-flex; }
  .content { padding: 20px 16px 110px; }
  .frow { grid-template-columns: 34px minmax(0, 1fr) 90px 140px 44px; }
  .frow .c-user { display: none; }
  .mobile-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: rgba(13,13,16,.94); backdrop-filter: blur(16px); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + var(--safe-b));
  }
  .mobile-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 10.5px; color: var(--muted); text-decoration: none; border-radius: 10px; }
  .mobile-nav a.active { color: var(--red2); }
  .mobile-nav a .i { width: 22px; height: 22px; }
  .uploads { bottom: calc(76px + var(--safe-b)); right: 12px; }
}

/* ---------- mobil ---------- */
@media (max-width: 640px) {
  body { font-size: 15px; }
  h1 { font-size: 21px; }
  :root { --tb: 58px; }
  .topbar h1 { font-size: 17px; }
  .frow.head { display: none; }
  .frow { grid-template-columns: 30px minmax(0, 1fr) 40px; min-height: 64px; padding: 0 8px 0 10px; }
  .frow .fcol { display: none; }
  .fname .sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fname { gap: 11px; }
  .fname > div { min-width: 0; }
  .ficon { width: 40px; height: 40px; }
  .grid.stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; gap: 10px; }
  .stat .ico { width: 36px; height: 36px; }
  .stat .v { font-size: 18px; }
  .grid.cards { grid-template-columns: minmax(0, 1fr); }
  .row2 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .toolbar .btn .lbl { display: none; }
  .toolbar .btn { padding: 0 11px; }
  .search { min-width: 0; flex: 1 1 100%; order: 10; }
  .modal-back { padding: 0; align-items: end; }
  .modal { max-width: none !important; border-radius: 20px 20px 0 0; max-height: 92vh; padding-bottom: var(--safe-b); animation: sheet .28s cubic-bezier(.2,.9,.3,1); }
  @keyframes sheet { from { transform: translateY(100%); } }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  /* panel nahrávání jako spodní list */
  .uploads { left: 8px; right: 8px; width: auto; max-width: none; border-radius: 18px; bottom: calc(72px + var(--safe-b)); }
  .up-list { max-height: 45vh; }
  .table.resp thead { display: none; }
  .table.resp tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 4px; }
  .table.resp td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 5px 10px; }
  .table.resp td::before { content: attr(data-l); color: var(--muted); font-size: 12.5px; }
  .table.resp td.act { justify-content: flex-end; }
  .table.resp td.act::before, .table.resp td.first::before { display: none; }
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .share-top { padding: var(--safe-t) 14px 0; }
  .auth-card { padding: 24px; }
}
@media (hover: none) {
  .gitem input[type=checkbox] { opacity: 1; }
}

.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
