/* ============================================================
   СИМЕОНОВ АДВОКАТИ — Клиентски портал (svp_*)
   Самостоятелна кожа: порталните страници НЕ зареждат style.css,
   затова тук има всичко — шрифтове, променливи, базов reset.
   Дизайн-език: винено (#8e1d2c) + тъмно синьо (#232f5d), топло
   бяло, Playfair Display за заглавия, Sofia Sans за текст.
   ============================================================ */

/* ------------------------------------------------------------
   Шрифтове (self-hosted, от assets/fonts на темата)
   ------------------------------------------------------------ */

/* Playfair Display 600 — кирилица */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/playfair-600-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Playfair Display 600 — latin-ext */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/playfair-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Playfair Display 600 — latin */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/playfair-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Playfair Display 600 italic — кирилица (за девиза и цитатите) */
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/playfair-600-italic-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Playfair Display 600 italic — latin-ext */
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/playfair-600-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Playfair Display 600 italic — latin */
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/playfair-600-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Playfair Display 700 — кирилица */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/playfair-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Playfair Display 700 — latin-ext */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/playfair-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Playfair Display 700 — latin */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/playfair-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Sofia Sans 400 — cyrillic-ext */
@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/sofia-400-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* Sofia Sans 400 — кирилица */
@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/sofia-400-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Sofia Sans 400 — latin-ext */
@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/sofia-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Sofia Sans 400 — latin */
@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/sofia-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Sofia Sans 600 — cyrillic-ext */
@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/sofia-600-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* Sofia Sans 600 — кирилица */
@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/sofia-600-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Sofia Sans 600 — latin-ext */
@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/sofia-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Sofia Sans 600 — latin */
@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/sofia-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Sofia Sans 700 — cyrillic-ext */
@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/sofia-700-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* Sofia Sans 700 — кирилица */
@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/sofia-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Sofia Sans 700 — latin-ext */
@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/sofia-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Sofia Sans 700 — latin */
@font-face {
  font-family: "Sofia Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/sofia-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------
   Дизайн-променливи (същите стойности като style.css на темата)
   ------------------------------------------------------------ */
:root {
  --wine: #8e1d2c;
  --wine-bright: #a32236;
  --wine-deep: #6f1522;
  --navy: #232f5d;
  --navy-deep: #182043;
  --navy-night: #101631;

  --ink: #1b2036;
  --body: #4c5165;
  --muted: #63697f;
  --paper: #faf9f6;
  --ivory: #f2efe8;
  --sand: #e9e4d8;
  --line: #e3dfd4;
  --line-dark: rgba(255, 255, 255, 0.14);
  --white: #ffffff;

  --ok-bg: #eaf4ec;
  --ok-line: #bfdcc6;
  --ok-ink: #1e5c2e;

  --font-display: "Playfair Display", "Georgia", serif;
  --font-body: "Sofia Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --radius: 6px;
  --radius-card: 14px;
  --shadow-soft: 0 18px 45px -18px rgba(24, 32, 67, 0.18);
  --shadow-card: 0 10px 30px -12px rgba(24, 32, 67, 0.12);
  --shadow-deep: 0 34px 90px -28px rgba(6, 10, 28, 0.65);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------------------------------------------------
   Базово
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.svp-body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* hidden печели винаги — скриптът разчита на атрибута */
.svp-body [hidden] {
  display: none !important;
}

.svp-body img,
.svp-body svg {
  max-width: 100%;
}

.svp-body a {
  color: var(--wine);
  text-decoration: none;
  transition: color 0.25s ease;
}

.svp-body a:hover {
  color: var(--wine-bright);
}

.svp-body h1,
.svp-body h2,
.svp-body h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.18;
  margin: 0 0 0.5em;
  font-weight: 600;
  text-wrap: balance;
}

.svp-body p {
  margin: 0 0 1em;
}

.svp-body ::selection {
  background: rgba(142, 29, 44, 0.85);
  color: var(--white);
}

.svp-svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* ------------------------------------------------------------
   Карти, бутони, полета — общият речник
   ------------------------------------------------------------ */
.svp-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(22px, 3vw, 34px);
}

.svp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), background 0.25s ease,
    color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.svp-btn:hover {
  transform: translateY(-1px);
}

.svp-btn:active {
  transform: translateY(0);
}

.svp-btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.svp-btn-primary {
  background: var(--wine);
  color: var(--white);
  box-shadow: 0 12px 26px -12px rgba(142, 29, 44, 0.55);
}

.svp-btn-primary:hover {
  background: var(--wine-bright);
  color: var(--white);
}

/* Бутон, който е връзка <a>: общото .svp-body a е по-специфично от
   .svp-btn-* и боядисва текста винен. Тук връщаме цветовете на бутона. */
.svp-body a.svp-btn-primary,
.svp-body a.svp-btn-primary:hover {
  color: var(--white);
}

.svp-body a.svp-btn-ghost {
  color: var(--ink);
}

.svp-body a.svp-btn-danger {
  color: var(--wine);
}

.svp-body a.svp-btn-danger:hover {
  color: var(--white);
}

.svp-btn-ghost {
  border-color: rgba(27, 32, 54, 0.28);
  color: var(--ink);
}

.svp-btn-ghost:hover {
  border-color: var(--ink);
  background: rgba(27, 32, 54, 0.04);
  color: var(--ink);
}

.svp-btn-danger {
  border-color: rgba(142, 29, 44, 0.45);
  color: var(--wine);
}

.svp-btn-danger:hover {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--white);
}

/* Компактен бутон „Изтегли“ в картата на файла */
.svp-file-dl {
  padding: 9px 16px;
  font-size: 0.72rem;
  flex: none;
}

/* Големият primary „Изтегли всички (ZIP)“ на витрината */
.svp-btn-zip {
  width: 100%;
  padding: 17px 26px;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  margin: 0 0 20px;
  box-shadow: 0 16px 34px -14px rgba(142, 29, 44, 0.6);
}

/* Гола икона (изтриване на файл) */
.svp-iconbtn {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.svp-iconbtn:hover {
  color: var(--wine);
  background: rgba(142, 29, 44, 0.07);
}

.svp-iconbtn .svp-svg {
  width: 16px;
  height: 16px;
}

/* Полета */
.svp-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
}

.svp-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.svp-body input[type="text"],
.svp-body input[type="password"],
.svp-body select,
.svp-body textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.svp-body textarea {
  resize: vertical;
  min-height: 84px;
}

.svp-body input[type="text"]:focus,
.svp-body input[type="password"]:focus,
.svp-body select:focus,
.svp-body textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(35, 47, 93, 0.12);
}

.svp-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.svp-hint {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 8px 0 0;
}

/* Известия */
.svp-notice {
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.96rem;
  margin: 0 0 20px;
}

.svp-notice-error {
  background: #f9ecee;
  border: 1px solid rgba(142, 29, 44, 0.3);
  color: var(--wine-deep);
}

.svp-notice-ok {
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
  color: var(--ok-ink);
}

/* Празно състояние */
.svp-empty {
  margin: 0;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
  background: rgba(250, 249, 246, 0.6);
}

/* ------------------------------------------------------------
   Файлови карти (навсякъде еднакви)
   ------------------------------------------------------------ */
.svp-files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.svp-file {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease,
    transform 0.25s var(--ease-out);
}

.svp-file:hover {
  border-color: rgba(35, 47, 93, 0.22);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.svp-file-icon {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--ivory);
  color: var(--muted);
}

.svp-file-icon .svp-svg {
  width: 22px;
  height: 22px;
}

.svp-file-icon-pdf   { background: rgba(142, 29, 44, 0.09);  color: var(--wine); }
.svp-file-icon-doc   { background: rgba(35, 47, 93, 0.09);   color: var(--navy); }
.svp-file-icon-xls   { background: var(--ok-bg);             color: var(--ok-ink); }
.svp-file-icon-img   { background: rgba(43, 103, 119, 0.1);  color: #2b6777; }
.svp-file-icon-zip   { background: #fbf3dc;                  color: #7a5c00; }
.svp-file-icon-audio { background: rgba(109, 59, 142, 0.09); color: #6d3b8e; }
.svp-file-icon-video { background: rgba(163, 77, 34, 0.1);   color: #a34d22; }
.svp-file-icon-file  { background: var(--ivory);             color: var(--muted); }

.svp-file-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.svp-file-name {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.svp-file-meta {
  font-size: 0.83rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.svp-file-badge {
  flex: none;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--ivory);
  color: var(--muted);
  white-space: nowrap;
}

.svp-file-badge.is-downloaded {
  background: var(--ok-bg);
  color: var(--ok-ink);
}

.svp-file-del {
  display: flex;
  margin: 0;
}

/* ------------------------------------------------------------
   Зона за качване + прогрес + избраните файлове
   ------------------------------------------------------------ */
.svp-upload-form {
  position: relative;
}

.svp-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: clamp(36px, 5vw, 56px) 24px;
  border: 2px dashed rgba(35, 47, 93, 0.28);
  border-radius: 12px;
  background: rgba(242, 239, 232, 0.45);
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.svp-drop:hover,
.svp-drop:focus-within,
.svp-drop.is-drag {
  border-color: var(--wine);
  background: rgba(142, 29, 44, 0.04);
}

.svp-drop.is-drag {
  border-style: solid;
}

.svp-drop > .svp-svg {
  width: 44px;
  height: 44px;
  color: var(--navy);
  transition: color 0.25s ease, transform 0.25s var(--ease-out);
}

.svp-drop:hover > .svp-svg,
.svp-drop.is-drag > .svp-svg {
  color: var(--wine);
  transform: translateY(-3px);
}

.svp-drop-text {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

.svp-drop-browse {
  color: var(--wine);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

/* Полето за файлове покрива цялата зона — работи и без скрипт */
.svp-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}

/* Списък с избраните файлове (пълни се от скрипта) */
.svp-picked {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 264px;
  overflow-y: auto;
}

.svp-picked-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.93rem;
}

.svp-picked-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
  color: var(--ink);
}

.svp-picked-size {
  flex: none;
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.svp-picked-x {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.svp-picked-x:hover {
  color: var(--wine);
  background: rgba(142, 29, 44, 0.08);
}

/* Прогрес на качването */
/* Избор на файлове в обикновена форма (нов клиент) */
.svp-file-plain {
  font-size: 0.9rem;
  color: var(--body);
  padding: 6px 0;
}
.svp-file-plain::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ivory);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

/* Отметка (еднократен линк) */
.svp-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 2px;
  font-size: 0.92rem;
  color: var(--body);
  cursor: pointer;
}
.svp-check input { margin-top: 3px; flex: none; }

/* Потвърждение при изпратен имейл */
.svp-success-emailed {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--ok-bg);
  color: var(--ok-ink);
  font-size: 0.9rem;
}

/* Бележка „еднократен“ на витрината (тъмен фон) */
.svp-share-once {
  margin: 0 0 5px;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

/* Квота на клиента */
.svp-quota {
  margin: 16px 0 4px;
}
.svp-quota-track {
  height: 8px;
  border-radius: 999px;
  background: var(--sand);
  overflow: hidden;
}
.svp-quota-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--wine-deep), var(--wine-bright));
  transition: width 0.3s var(--ease-out);
}
.svp-quota.is-full .svp-quota-fill {
  background: linear-gradient(90deg, #8a2f2f, #b0413f);
}
.svp-quota-text {
  display: block;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
}
.svp-quota-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px;
  margin: 16px 0 4px;
}
.svp-quota-row .svp-quota { flex: 1 1 220px; margin: 0; }
.svp-quota-form { flex: none; margin: 0; }
.svp-quota-label .svp-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 5px;
}
.svp-quota-form select {
  font-family: var(--font-body);
  font-size: 0.86rem;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}

.svp-progress {
  position: relative;
  height: 12px;
  margin: 34px 0 6px;
  border-radius: 999px;
  background: var(--sand);
}

.svp-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--wine-deep), var(--wine-bright));
  box-shadow: 0 4px 14px -4px rgba(142, 29, 44, 0.6);
  transition: width 0.2s ease;
}

.svp-progress-pct {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

/* Докато качването тече, зоната и списъкът са замразени */
.svp-upload-form.is-uploading .svp-drop,
.svp-upload-form.is-uploading .svp-picked,
.svp-upload-form.is-uploading .svp-mode,
.svp-upload-form.is-uploading .svp-mode-fields {
  pointer-events: none;
  opacity: 0.55;
}

/* Бутонът „Изпрати“ */
.svp-send {
  margin-top: 20px;
  min-width: 190px;
}

/* ------------------------------------------------------------
   Административният портал — split layout
   ------------------------------------------------------------ */
.svp-app {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
}

/* Лявата брандова лента */
.svp-side {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vh, 44px) 26px 26px;
  color: var(--white);
  background:
    radial-gradient(480px 320px at 110% -10%, rgba(142, 29, 44, 0.35), transparent 65%),
    linear-gradient(165deg, var(--navy-deep) 0%, var(--navy-night) 100%);
  scrollbar-width: thin;
}

.svp-side::after {
  content: "";
  position: fixed;
  left: -110px;
  bottom: -160px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 56px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.svp-side-brand {
  position: relative;
  z-index: 1;
}

.svp-side-name {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--white);
  margin: 0 0 6px;
  line-height: 1.25;
}

.svp-side-motto {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: #d8a9b0;
  margin: 0 0 22px;
}

.svp-side-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 8px;
}

.svp-side-label::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

/* Разделите */
.svp-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 26px;
  position: relative;
  z-index: 1;
}

.svp-tab {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  transition: color 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.svp-tab:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}

.svp-tab.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--wine-bright);
}

/* Долният край на лентата */
.svp-side-foot {
  margin-top: auto;
  padding-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.svp-side-link {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
}

.svp-side-link:hover {
  color: var(--white);
}

.svp-side .svp-logout {
  margin: 0;
}

.svp-side .svp-btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
  padding: 10px 18px;
}

.svp-side .svp-btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

/* Работната зона */
.svp-main {
  min-width: 0;
  padding: clamp(28px, 4.5vw, 56px) clamp(20px, 4vw, 56px) 72px;
  background: var(--paper);
}

.svp-main > .svp-notice {
  max-width: 860px;
}

.svp-panel {
  display: none;
  max-width: 860px;
}

.svp-panel.is-active {
  display: block;
}

.svp-panel-title {
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  margin: 0 0 24px;
}

/* ------------------------------------------------------------
   Раздел „Изпращане“
   ------------------------------------------------------------ */

/* Превключвателят линк / клиент — сегментиран контрол */
.svp-mode {
  display: flex;
  gap: 4px;
  margin: 24px 0 18px;
  padding: 4px;
  border: 0;
  border-radius: 10px;
  background: var(--ivory);
  width: max-content;
  max-width: 100%;
}

.svp-mode-opt {
  position: relative;
  display: block;
}

.svp-mode-opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.svp-mode-opt span {
  display: block;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.svp-mode-opt input:checked + span {
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 4px 12px -4px rgba(24, 32, 67, 0.25);
}

.svp-mode-opt input:focus-visible + span {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
}

.svp-mode-fields {
  display: grid;
  gap: 14px;
}

/* Екраните за успех */
.svp-success {
  display: grid;
  gap: 18px;
}

.svp-success-title {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 14px;
}

.svp-success-link,
.svp-success-client {
  border-left: 3px solid var(--wine);
}

.svp-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 6px;
}

/* Целият линк — едро, „копирай ме“ */
.svp-share-url {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--navy);
  background: var(--ivory);
  border: 1px dashed rgba(35, 47, 93, 0.25);
  border-radius: 10px;
  padding: 15px 18px;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}

.svp-share-text {
  font-family: var(--font-body);
  background: var(--paper);
}

/* ------------------------------------------------------------
   Раздел „Клиенти“
   ------------------------------------------------------------ */
.svp-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}

/* Еднократните данни за вход */
.svp-creds {
  border-left: 3px solid var(--wine);
  margin: 0 0 22px;
}

.svp-creds-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}

.svp-creds-warn {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--wine-deep);
  background: rgba(142, 29, 44, 0.06);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 16px;
}

.svp-creds-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.svp-creds-label {
  flex: none;
  width: 108px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.svp-creds-value {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: var(--navy);
  background: var(--ivory);
  border-radius: 8px;
  padding: 9px 14px;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}

.svp-creds-where {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Формата „Нов клиент“ */
.svp-new-client {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
}

.svp-new-client .svp-btn {
  justify-self: start;
}

/* Картите на клиентите */
.svp-clients {
  display: grid;
  gap: 14px;
}

.svp-client-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.svp-client-card[open] {
  box-shadow: var(--shadow-soft);
}

.svp-client-card.is-off {
  background: rgba(250, 249, 246, 0.7);
}

.svp-client-card.is-off .svp-client-name {
  color: var(--muted);
}

.svp-client-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 48px 18px 22px;
  cursor: pointer;
  position: relative;
  list-style: none;
  user-select: none;
  -webkit-user-select: none;
}

.svp-client-head::-webkit-details-marker {
  display: none;
}

/* Стрелка на разгъването */
.svp-client-head::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.3s var(--ease-out);
}

.svp-client-card[open] > .svp-client-head::after {
  transform: translateY(-30%) rotate(225deg);
}

.svp-client-name {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
}

.svp-client-meta {
  margin-left: auto;
  font-size: 0.86rem;
  color: var(--muted);
  text-align: right;
}

.svp-client-state {
  flex: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wine);
  background: rgba(142, 29, 44, 0.08);
  border-radius: 999px;
  padding: 5px 12px;
}

.svp-client-body {
  padding: 20px 22px 24px;
  border-top: 1px solid var(--line);
}

.svp-client-note {
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 16px;
}

.svp-client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 8px;
}

.svp-inline-form {
  display: inline-flex;
  margin: 0;
}

.svp-group-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 26px 0 12px;
}

.svp-group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ------------------------------------------------------------
   Раздел „Линкове“
   ------------------------------------------------------------ */
.svp-linkbox {
  border-left: 3px solid var(--wine);
  margin: 0 0 22px;
}

.svp-shares {
  display: grid;
  gap: 12px;
}

.svp-share-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 18px 22px;
  transition: box-shadow 0.25s ease;
}

.svp-share-item:hover {
  box-shadow: var(--shadow-soft);
}

.svp-share-item.is-new {
  border-left: 3px solid var(--wine);
}

.svp-share-item.is-expired {
  opacity: 0.6;
}

.svp-share-info {
  min-width: 0;
}

.svp-share-name {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 3px;
}

.svp-share-files {
  font-size: 0.9rem;
  color: var(--body);
  margin: 0 0 3px;
  overflow-wrap: anywhere;
}

.svp-share-status {
  font-size: 0.83rem;
  color: var(--muted);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.svp-share-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ------------------------------------------------------------
   Сцените (share / login / client / dead) — тъмният брандов фон
   ------------------------------------------------------------ */
.svp-scene {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 6vh, 72px) 20px;
  color: var(--white);
  background:
    radial-gradient(840px 540px at 84% -10%, rgba(142, 29, 44, 0.32), transparent 62%),
    radial-gradient(620px 420px at 8% 112%, rgba(142, 29, 44, 0.14), transparent 60%),
    linear-gradient(160deg, var(--navy-deep) 0%, var(--navy-night) 100%);
  overflow: hidden;
}

/* Дискретен декоративен пръстен, като на сайта */
.svp-scene::before {
  content: "";
  position: absolute;
  right: -140px;
  top: -170px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 66px solid rgba(255, 255, 255, 0.045);
  pointer-events: none;
}

.svp-scene > * {
  position: relative;
  z-index: 1;
}

/* Превключвателят БГ/EN */
.svp-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.svp-scene > .svp-lang-switch {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 2;
}

.svp-lang {
  display: inline-block;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.22s ease, border-color 0.22s ease;
}

.svp-lang:hover {
  color: var(--white);
}

.svp-lang.is-active {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Белите карти върху тъмната сцена */
.svp-scene .svp-card {
  border: 0;
  border-radius: 16px;
  box-shadow: var(--shadow-deep);
  padding: clamp(30px, 5vw, 50px);
}

.svp-share-main {
  width: min(640px, 100%);
}

.svp-login-card {
  width: min(440px, 100%);
  text-align: center;
}

.svp-dead-card {
  width: min(520px, 100%);
  text-align: center;
}

/* Името на кантората върху картата */
/* Лого на кантората (словната марка е само в alt) */
.svp-logo {
  display: block;
  margin: 0 0 16px;
}
.svp-logo img {
  display: block;
  height: 50px;
  width: auto;
  max-width: min(240px, 100%);
}
/* На тъмни повърхности логото стои върху светла плочка — цветовете му
   се запазват (никакво обезцветяване). */
.svp-logo--light {
  display: inline-block;
  background: var(--white);
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 100%;
}
.svp-logo--light img {
  height: 40px;
  max-width: 190px;
}
.svp-side .svp-logo {
  margin-bottom: 12px;
}
.svp-client-top .svp-logo {
  margin: 0;
}
.svp-dead-card .svp-logo img,
.svp-login-card .svp-logo img {
  margin: 0 auto;
}

.svp-brand-name {
  position: relative;
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--navy);
  margin: 0 0 18px;
  padding-bottom: 10px;
}

.svp-brand-name::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 2px;
  background: var(--wine);
}

.svp-dead-card .svp-brand-name::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ------------------------------------------------------------
   Витрината /f/{token}
   ------------------------------------------------------------ */
.svp-share-title {
  font-size: clamp(1.45rem, 3.4vw, 2rem);
  margin: 0 0 18px;
}

.svp-note {
  margin: 0 0 22px;
  padding: 6px 0 6px 20px;
  border-left: 3px solid var(--wine);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--ink);
}

.svp-share-foot {
  margin-top: 26px;
  text-align: center;
  animation-delay: 0.12s;
}

.svp-share-valid {
  margin: 0 0 5px;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.svp-share-secure {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ------------------------------------------------------------
   Входът
   ------------------------------------------------------------ */
.svp-login-title {
  font-size: 1.7rem;
  margin: 0 0 8px;
}

.svp-login-lead {
  font-size: 0.97rem;
  color: var(--muted);
  margin: 0 0 22px;
}

.svp-login-form {
  display: grid;
  gap: 16px;
}

.svp-login-form .cf-turnstile {
  margin: 2px auto;
  min-height: 65px;
}

.svp-login-btn {
  width: 100%;
  padding: 15px 24px;
  font-size: 0.86rem;
}

.svp-login-help {
  margin: 20px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.svp-reset-email {
  margin: 0 0 18px;
  font-size: 0.95rem;
  color: var(--body);
}
.svp-reset-email strong { color: var(--ink); }

/* Поле за парола с вграден бутон „Покажи“. */
.svp-pass-wrap {
  position: relative;
  display: block;
}
.svp-pass-wrap input {
  padding-right: 92px;
}
.svp-pass-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  line-height: 1;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.svp-pass-toggle:hover,
.svp-pass-toggle:focus-visible {
  color: var(--wine);
  border-color: var(--wine);
}

.svp-login-alt {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.svp-login-alt a {
  color: var(--wine);
  font-weight: 600;
}

.svp-login-alt a:hover {
  color: var(--wine-deep);
}

.svp-login-help a {
  font-weight: 700;
  white-space: nowrap;
}

/* ------------------------------------------------------------
   Изгледът за влязъл клиент
   ------------------------------------------------------------ */
.svp-scene-client {
  justify-content: flex-start;
  align-items: stretch;
  padding: 0 clamp(16px, 3vw, 32px) 56px;
}

.svp-client-top {
  width: min(1060px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 26px 4px 24px;
}

.svp-client-top .svp-brand-name {
  color: var(--white);
  margin: 0;
  padding-bottom: 8px;
}

.svp-userbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.svp-user-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
}

.svp-userbar .svp-logout {
  margin: 0;
}

.svp-userbar .svp-btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
  padding: 9px 16px;
  font-size: 0.72rem;
}

.svp-userbar .svp-btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.svp-client-cols {
  width: min(1060px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: start;
}

.svp-client-cols > .svp-notice {
  grid-column: 1 / -1;
  margin: 0;
}

.svp-section-title {
  font-size: 1.32rem;
  margin: 0 0 18px;
}

.svp-upload-done {
  margin: 16px 0 0;
  padding: 14px 18px;
  border-radius: 8px;
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
  color: var(--ok-ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.svp-section-upload .svp-send {
  width: 100%;
}

/* ------------------------------------------------------------
   Изтекъл линк / 404
   ------------------------------------------------------------ */
.svp-dead-title {
  font-size: 1.5rem;
  margin: 0 0 8px;
}

.svp-dead-text {
  color: var(--muted);
  margin: 0 0 24px;
}

.svp-dead-phone {
  margin: 0;
}

.svp-dead-phone .svp-btn {
  width: 100%;
  padding: 15px 24px;
}

/* ------------------------------------------------------------
   Достъпност
   ------------------------------------------------------------ */
.svp-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.svp-body :focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}

/* Върху тъмни фонове виненият контур е невидим — там фокусът е бял */
.svp-side :focus-visible,
.svp-scene > .svp-lang-switch :focus-visible,
.svp-client-top :focus-visible {
  outline-color: var(--white);
}

/* Полето за файлове само по себе си не рисува контур — зоната го поема */
.svp-file-input:focus-visible {
  outline: none;
}

/* ------------------------------------------------------------
   Микро-анимации
   ------------------------------------------------------------ */
@keyframes svpCardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.svp-scene .svp-card,
.svp-scene .svp-share-foot {
  animation: svpCardIn 0.4s var(--ease-out) both;
}

.svp-scene .svp-share-foot {
  animation-delay: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
  .svp-scene .svp-card,
  .svp-scene .svp-share-foot {
    animation: none;
  }

  .svp-btn:hover,
  .svp-file:hover,
  .svp-drop:hover > .svp-svg,
  .svp-drop.is-drag > .svp-svg {
    transform: none;
  }

  .svp-progress-bar,
  .svp-client-head::after {
    transition: none;
  }
}

/* ------------------------------------------------------------
   Отзивчивост
   ------------------------------------------------------------ */
@media (max-width: 960px) {
  .svp-client-cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  /* Брандовата лента става тънка горна ивица */
  .svp-app {
    display: block;
  }

  .svp-side {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    overflow: visible;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding: 14px 18px 12px;
    box-shadow: 0 12px 30px -18px rgba(16, 22, 49, 0.6);
  }

  .svp-side::after {
    display: none;
  }

  .svp-side-brand {
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
  }

  .svp-side-name {
    font-size: 1.05rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .svp-side-motto,
  .svp-side-label {
    display: none;
  }

  .svp-side-foot {
    margin: 0 0 0 auto;
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }

  .svp-side-foot .svp-btn {
    padding: 8px 14px;
    font-size: 0.7rem;
  }

  .svp-tabs {
    order: 3;
    width: 100%;
    flex-direction: row;
    gap: 6px;
    margin: 10px 0 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .svp-tab {
    flex: 1;
    text-align: center;
    padding: 10px 14px;
    border-left: 0;
    border-radius: 8px;
    white-space: nowrap;
  }

  .svp-tab.is-active {
    background: rgba(255, 255, 255, 0.12);
  }

  .svp-main {
    padding: 24px 16px 56px;
  }
}

@media (max-width: 640px) {
  /* Картите на сцените — 95vw; отгоре място за БГ/EN */
  .svp-scene {
    padding-left: 2.5vw;
    padding-right: 2.5vw;
    padding-top: 64px;
  }

  .svp-scene > .svp-lang-switch {
    top: 14px;
    right: 12px;
  }

  .svp-share-main,
  .svp-login-card,
  .svp-dead-card {
    width: 95vw;
    max-width: 95vw;
  }

  .svp-scene-client {
    padding-left: 2.5vw;
    padding-right: 2.5vw;
  }

  /* Основните бутони — пълна ширина */
  .svp-send,
  .svp-login-btn,
  .svp-btn-zip,
  .svp-success-actions .svp-btn,
  .svp-client-actions .svp-btn,
  .svp-client-actions .svp-inline-form,
  .svp-share-actions .svp-btn,
  .svp-share-actions .svp-inline-form,
  .svp-toolbar .svp-btn,
  .svp-new-client .svp-btn,
  .svp-dead-phone .svp-btn {
    width: 100%;
  }

  .svp-inline-form .svp-btn {
    width: 100%;
  }

  /* Файловата карта се пренарежда */
  .svp-file {
    flex-wrap: wrap;
  }

  /* Място за бутона за изтриване само когато той съществува */
  .svp-file:has(.svp-file-del) {
    padding-right: 52px;
  }

  .svp-file-info {
    flex: 1 1 55%;
  }

  .svp-file-name {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .svp-file-badge {
    order: 4;
  }

  .svp-file-dl {
    order: 5;
    flex: 1 1 100%;
  }

  .svp-file-del {
    position: absolute;
    top: 10px;
    right: 10px;
  }

  /* Линковете — една колона */
  .svp-share-item {
    flex-direction: column;
    align-items: stretch;
  }

  .svp-share-actions {
    flex-direction: column;
    align-items: stretch;
  }

  /* Полетата — една колона */
  .svp-field-row {
    grid-template-columns: 1fr;
  }

  /* Сегментираният контрол — на цялата ширина */
  .svp-mode {
    width: 100%;
  }

  .svp-mode-opt {
    flex: 1;
  }

  .svp-mode-opt span {
    text-align: center;
    padding: 10px 12px;
  }

  /* Данните за вход */
  .svp-creds-row {
    flex-wrap: wrap;
  }

  .svp-creds-label {
    width: 100%;
  }

  .svp-creds-row .svp-btn {
    width: 100%;
  }

  /* Клиентската карта */
  .svp-client-head {
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  .svp-client-meta {
    margin-left: 0;
    width: 100%;
    text-align: left;
  }
}

/* Подзаглавие в клиентската зона („Изпратени от вас“) */
.svp-section-sub {
  margin: 30px 0 12px;
  font-size: 1.02rem;
}

/* ------------------------------------------------------------
   Папки в „Вашите документи“ (клиентът само ги отваря)
   ------------------------------------------------------------ */
.svp-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: -6px 0 16px;
  font-size: 0.88rem;
}

.svp-crumbs a { text-decoration: none; opacity: 0.72; }
.svp-crumbs a:hover { opacity: 1; text-decoration: underline; }
.svp-crumbs-sep { opacity: 0.4; }
.svp-crumbs-here { font-weight: 600; }

.svp-folder-link {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.svp-folder .svp-file-name { font-weight: 600; }

/* Посоката на файла: ↓ дошло от кантората, ↑ изпратено от клиента */
.svp-dir-arrow {
  display: inline-block;
  margin-right: 7px;
  font-weight: 700;
  opacity: 0.55;
}

.svp-dir-arrow.is-out { opacity: 0.75; }

/* ------------------------------------------------------------
   Дневник на портала
   ------------------------------------------------------------ */
.svp-log-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 18px;
}

.svp-log-filters .svp-field { margin: 0; min-width: 150px; }
.svp-log-actions { display: flex; gap: 8px; }
.svp-log-total { margin: 0 0 14px; font-size: 0.92rem; }

.svp-log-wrap { overflow-x: auto; }

.svp-log {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 640px;
}

.svp-log th,
.svp-log td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.svp-log thead th {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}

.svp-log tbody tr + tr { border-top: 1px solid rgba(128, 128, 128, 0.16); }
.svp-log-when { white-space: nowrap; opacity: 0.75; }
.svp-log-what { opacity: 0.85; }

.svp-log-role {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.5;
}

.svp-log-row--login_fail .svp-log-what,
.svp-log-row--login_fail td { color: #b3261e; }

.svp-log-pages { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.svp-log-pages a,
.svp-log-pages .is-here { padding: 5px 11px; border-radius: 7px; font-size: 0.9rem; }
.svp-log-pages .is-here { font-weight: 700; background: rgba(128, 128, 128, 0.14); }

/* Папки в работния екран на адвоката */
.svp-folder-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }

.svp-folder-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(128, 128, 128, 0.2);
  border-radius: 10px;
}

.svp-folder-path { font-weight: 600; }
.svp-folder-n { font-size: 0.82rem; opacity: 0.6; }
.svp-folder-item .svp-inline-form { margin-left: auto; }
.svp-folder-item input[type="text"] { max-width: 190px; }

.svp-folder-new { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.svp-file-move { display: flex; gap: 6px; align-items: center; }
.svp-file-move select { max-width: 160px; }
