/* mondiqo files — самостоятельная тема в стиле сайта, но без общих стилей. */
@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/manrope-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f6f9ff;
  --card: #ffffff;
  --ink: #0b2040;
  --muted: #5b6b86;
  --line: #dfe7f5;
  --accent: #3568d4;
  --accent-strong: #2b5bc4;
  --accent-soft: #eaf1ff;
  --danger: #c0392b;
  --radius: 18px;
  --shadow: 0 12px 30px -18px rgba(11, 32, 64, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(1200px 500px at 15% -10%, #e8f0ff 0%, transparent 60%), var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}
.brand-text { font-weight: 600; letter-spacing: -0.01em; }
.brand-text b { color: var(--accent-strong); }

.nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--accent-strong); }
.who { color: var(--ink); font-weight: 600; }
.inline { display: inline; margin: 0; }
.link {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.link:hover { color: var(--accent-strong); }

.container {
  width: min(1040px, 100% - 32px);
  margin: 0 auto;
  padding: 28px 0 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 28px);
}
.card.narrow { width: min(440px, 100%); margin: 24px auto; }
h1 { margin: 0 0 6px; font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.02em; }
h1 + .muted { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error, .flash {
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
  margin-bottom: 14px;
}
.error { background: #fdecea; color: #8e241a; border: 1px solid #f3c5bf; }
.flash { background: #eaf6ee; color: #155c33; border: 1px solid #bfe3cb; }

.stack { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
input:not([type="file"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
input[type="file"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(53, 104, 212, 0.12); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--accent-strong); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--bg); }
.btn.danger { background: #fdecea; color: #8e241a; }
.btn.danger:hover { background: #f8d7d3; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 13px; }

.upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 16px 0 22px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--bg);
}
.upload .drop { flex: 1 1 260px; font-weight: 500; }
.upload input[type="file"] { border: 0; background: transparent; padding: 4px 0; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}
tbody td { border-bottom: 1px solid var(--line); padding: 12px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td.name { display: flex; align-items: center; gap: 10px; font-weight: 600; max-width: 380px; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.file-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 800;
}
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 11px; }
.empty { color: var(--muted); padding: 18px 0 4px; }

.foot { padding: 18px clamp(16px, 4vw, 40px); color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

@media (max-width: 720px) {
  thead { display: none; }
  tbody td { display: flex; justify-content: space-between; gap: 12px; }
  tbody td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
  td.name { max-width: none; }
  .actions { justify-content: flex-end; }
}


/* --- Drag&drop загрузка --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 28px 18px;
  border: 2px dashed var(--line);
  border-radius: 16px;
  background: #fbfdff;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}
.dropzone.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.005);
}
.dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}
.dropzone-title { font-size: 16px; font-weight: 700; }
.dropzone-hint { color: var(--muted); font-size: 13px; }
.upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.folder-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.folder-btn:hover { background: var(--bg); }
.upload-note { color: var(--muted); font-size: 13px; }
.progress {
  height: 8px;
  margin-top: 14px;
  border-radius: 999px;
  background: #e6edf9;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.2s ease;
}
.upload-error {
  margin-top: 12px;
  border-radius: 12px;
  padding: 10px 14px;
  background: #fdecea;
  border: 1px solid #f3c5bf;
  color: #8e241a;
  font-weight: 600;
  font-size: 13px;
}
