/* Střih Diti — projects home + login (light theme). Shared by projects.html and login.html. */
:root {
  --ink: #090c14;
  --ink-2: #3d4452;
  --ink-3: #6b7280;
  --ink-4: #9ca3af;
  --line: #eceef1;
  --fill: #f2f4f6;
  --fill-2: #e9ecef;
  --surface: #ffffff;
  --cyan: #22c3d6;
  --cyan-2: #16b8cc;
  --create: linear-gradient(90deg, #a6e6f3 0%, #7fd0ee 100%);
  --banner: linear-gradient(100deg, #6dd6e3 0%, #54b8e4 100%);
  --blue-grad: linear-gradient(90deg, #4d7ef7 0%, #5fb8ea 100%);
  --danger: #e5484d;
  --shadow: 0 8px 24px rgba(15, 23, 42, .08), 0 1px 3px rgba(15, 23, 42, .05);
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font: 14px/1.45 var(--font); color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; display: block; }
i[data-icon] { display: inline-flex; font-style: normal; }

/* ── layout ── */
.home { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 20px 16px 16px;
  display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line); background: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 12px 18px; font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.brand .ic { width: 30px; height: 30px; stroke-width: 1.9; }
.brand small { font-size: 11px; font-weight: 600; color: var(--ink-4); letter-spacing: .2px; margin-left: auto; }
.create-btn {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; margin-bottom: 14px;
  border: 0; border-radius: 10px; background: var(--create); color: var(--ink); font-weight: 700; font-size: 15px; cursor: pointer;
}
.create-btn:hover { filter: brightness(1.03) saturate(1.1); }
.nav-item {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px;
  border: 0; border-radius: 10px; background: none; cursor: pointer; font-size: 15px; font-weight: 500; text-align: left; color: var(--ink);
}
.nav-item:hover { background: var(--fill); }
.nav-item.on { background: var(--fill); font-weight: 600; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 4px; }
.nav-label { padding: 8px 14px 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.side-foot b { display: block; font-size: 13.5px; }
.side-foot small { display: block; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.side-foot .icon-btn { margin-left: auto; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 5; height: 72px; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px);
}
.top h1 { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.top-right { display: flex; align-items: center; gap: 10px; }
.search {
  display: flex; align-items: center; gap: 8px; height: 40px; width: min(320px, 40vw); padding: 0 12px;
  border-radius: 10px; background: var(--fill); color: var(--ink-3);
}
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font-size: 14px; }
.search .ic { width: 18px; height: 18px; }
.icon-btn {
  width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
}
.icon-btn:hover { background: var(--fill); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #22c3d6, #4d7ef7); color: #fff; font-size: 13px; font-weight: 700;
  position: relative;
}
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }
.content { padding: 4px 32px 48px; }

/* ── create banner ── */
.create-row { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(260px, 1fr); gap: 14px; margin-bottom: 36px; }
.banner {
  position: relative; overflow: hidden; height: 132px; border: 0; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--banner); color: #fff; font-size: 20px; font-weight: 700;
}
.banner .plus { width: 22px; height: 22px; border-radius: 4px; background: rgba(255, 255, 255, .92); color: #43b6dc; display: inline-flex; align-items: center; justify-content: center; }
.banner .plus .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.banner small { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 12.5px; font-weight: 500; opacity: .9; }
.banner:hover { filter: brightness(1.04); }
.banner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .25), transparent 40%), radial-gradient(circle at 10% 110%, rgba(255, 255, 255, .18), transparent 45%);
}
.formats { border-radius: 10px; background: #4fb3dd; color: #fff; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.formats b { font-size: 16px; }
.format-list { display: flex; gap: 8px; margin-top: auto; }
.format {
  flex: 1; height: 64px; border: 0; border-radius: 8px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: rgba(255, 255, 255, .18); color: #fff; font-size: 12px; font-weight: 600;
}
.format:hover { background: rgba(255, 255, 255, .3); }
.format.on { background: #fff; color: #238fb8; }
.format .shape { border: 1.6px solid currentColor; border-radius: 3px; }

/* ── projects ── */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 26px; }
.tab { border: 0; background: none; padding: 0 2px 12px; font-size: 17px; font-weight: 700; color: var(--ink-3); cursor: pointer; position: relative; }
.tab.on { color: var(--ink); }
.tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--cyan); border-radius: 2px; }
.section-tools { display: flex; gap: 8px; padding-bottom: 8px; align-items: center; color: var(--ink-3); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px 18px; }
.card { position: relative; cursor: pointer; border-radius: 12px; outline: none; }
.thumb {
  position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden;
  background: var(--fill) center/contain no-repeat; display: flex; align-items: center; justify-content: center;
  color: var(--ink-4); border: 1px solid var(--line);
  transition: box-shadow .15s, border-color .15s;
}
.thumb .ic { width: 34px; height: 34px; stroke-width: 1.3; }
.thumb .ratio-art { border-radius: 4px; background: linear-gradient(160deg, #cfeff6, #a9d6f0); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); display: flex; align-items: center; justify-content: center; color: #4a9ec2; }
.thumb .ratio-art .ic { width: 22px; height: 22px; }
.card:hover .thumb, .card:focus-visible .thumb { box-shadow: var(--shadow); border-color: #d8dde3; }
.badge {
  position: absolute; padding: 2px 6px; border-radius: 4px; font-size: 11.5px; font-weight: 600;
  background: rgba(0, 0, 0, .55); color: #fff; font-variant-numeric: tabular-nums;
}
.badge.dur { right: 8px; bottom: 8px; }
.badge.ratio { left: 8px; bottom: 8px; background: rgba(255, 255, 255, .9); color: var(--ink-2); }
.card-presence { position: absolute; top: 8px; left: 8px; display: flex; }
.card-presence .avatar { border: 2px solid #fff; margin-left: -6px; width: 26px; height: 26px; font-size: 10px; }
.card-presence .avatar:first-child { margin-left: 0; }
.card-menu-btn {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 8px; border: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: var(--ink); opacity: 0; transition: opacity .12s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.card:hover .card-menu-btn, .card:focus-within .card-menu-btn, .card-menu-btn[aria-expanded="true"] { opacity: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; padding: 10px 2px 0; }
.card-meta > div { min-width: 0; flex: 1; }
.card-name { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-name[contenteditable="true"] { outline: 1.5px solid var(--cyan); border-radius: 4px; padding: 0 3px; text-overflow: clip; }
.card-sub { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 56px 20px; border: 1.5px dashed #dfe3e8; border-radius: 16px; color: var(--ink-3);
}
.empty .ic { width: 40px; height: 40px; color: #b6bdc6; stroke-width: 1.3; }
.empty b { color: var(--ink); font-size: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 600;
}
.btn:hover { background: var(--fill-2); }
.btn.primary { background: var(--blue-grad); color: #fff; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { background: #fdecec; color: #b42318; }
.btn .ic { width: 18px; height: 18px; }
.notice { padding: 14px 16px; border-radius: 12px; background: #fff7e6; color: #92400e; font-size: 13.5px; margin-bottom: 20px; }
.skeleton .thumb { background: linear-gradient(90deg, #f2f4f6, #e9ecef, #f2f4f6); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* menus */
.menu {
  position: fixed; z-index: 50; min-width: 190px; padding: 6px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
}
.menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px;
  border: 0; border-radius: 8px; background: none; cursor: pointer; font-size: 13.5px; text-align: left;
}
.menu button:hover { background: var(--fill); }
.menu button .ic { width: 18px; height: 18px; color: var(--ink-2); }
.menu button.danger { color: #b42318; }
.menu button.danger .ic { color: #b42318; }

/* team */
.team-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.team-head p { color: var(--ink-3); font-size: 13.5px; }
.invite {
  display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center;
  padding: 14px; margin-bottom: 20px; border-radius: 12px; background: #eefafc; border: 1px solid #c9eef4;
}
.invite p { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); }
.invite input { height: 40px; padding: 0 12px; border: 1px solid #cfe7ec; border-radius: 10px; background: #fff; font-size: 13px; min-width: 0; }
.users { display: grid; gap: 2px; border-top: 1px solid var(--line); }
.user-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.user-row b { display: block; font-size: 14.5px; }
.user-row small { display: block; color: var(--ink-3); font-size: 12.5px; }
.pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--fill); color: var(--ink-3); white-space: nowrap; }
.pill.online { background: #e7f8ee; color: #15803d; }
.settings-card { max-width: 560px; padding: 20px; border-radius: 14px; border: 1px solid var(--line); display: grid; gap: 14px; }
.settings-card .row { display: flex; align-items: center; gap: 14px; }
.settings-card .row b { display: block; }
.settings-card .row small { color: var(--ink-3); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); z-index: 60;
  padding: 10px 16px; border-radius: 10px; background: #1d2129; color: #fff; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── login ── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: #f5f7f9; position: relative; overflow: hidden; }
.auth-page::before, .auth-page::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none;
}
.auth-page::before { width: 520px; height: 520px; left: -140px; top: -160px; background: #bdeff6; }
.auth-page::after { width: 480px; height: 480px; right: -120px; bottom: -180px; background: #cfe0ff; }
.auth-card {
  position: relative; z-index: 1; width: min(420px, 100%); padding: 34px 32px 28px;
  border-radius: 20px; background: #fff; box-shadow: 0 24px 64px rgba(15, 23, 42, .1), 0 1px 3px rgba(15, 23, 42, .06);
}
.auth-card .brand { justify-content: center; padding: 0 0 6px; font-size: 22px; }
.auth-sub { text-align: center; color: var(--ink-3); font-size: 13.5px; margin-bottom: 22px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--fill); margin-bottom: 20px; }
.auth-tabs button { height: 36px; border: 0; border-radius: 9px; background: none; cursor: pointer; font-weight: 600; color: var(--ink-3); }
.auth-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.field { display: grid; gap: 6px; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .input { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 10px; background: var(--fill); border: 1.5px solid transparent; }
.field .input:focus-within { border-color: var(--cyan); background: #fff; }
.field .input .ic { width: 18px; height: 18px; color: var(--ink-4); }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14.5px; font-weight: 400; color: var(--ink); }
.auth-card .btn.primary { width: 100%; height: 46px; font-size: 15px; margin-top: 6px; }
.auth-card .btn.primary:disabled { opacity: .6; cursor: progress; }
.auth-error { min-height: 20px; margin-top: 10px; color: #b42318; font-size: 13px; text-align: center; }
.auth-info { padding: 10px 12px; border-radius: 10px; background: #eefafc; color: #0e6d7a; font-size: 13px; margin-bottom: 16px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--ink-4); }

@media (max-width: 860px) {
  .home { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-foot { display: none; }
  .create-row { grid-template-columns: 1fr; }
  .top, .content { padding-left: 16px; padding-right: 16px; }
}

/* server disk usage (Tým, admins) */
.disk-card { margin-top: 22px; max-width: 640px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); display: grid; gap: 10px; }
.disk-card[hidden] { display: none; }
.disk-head { display: flex; align-items: center; gap: 10px; }
.disk-head .ic { width: 20px; height: 20px; color: var(--ink-2); }
.disk-head b { flex: 1; font-size: 14.5px; }
.disk-bar { position: relative; height: 10px; border-radius: 5px; background: #eef1f4; overflow: hidden; }
.disk-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: linear-gradient(90deg, #4d7ef7, #5fb8ea); }
.disk-bar em { position: absolute; right: 0; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, rgba(229, 72, 77, .28) 0 4px, transparent 4px 8px); }
.disk-card[data-level="warn"] .disk-bar i { background: linear-gradient(90deg, #f5a524, #f7c948); }
.disk-card[data-level="warn"] .pill { background: #fff4e0; color: #9a5b00; }
.disk-card[data-level="critical"] .disk-bar i { background: #e5484d; }
.disk-card[data-level="critical"] .pill { background: #fdeceb; color: #b42318; }
.disk-card[data-level="ok"] .pill { background: #e7f8ee; color: #15803d; }
.disk-text { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
