component-breadcrumb .filestash_copy_network_path {
    align-self: center;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    min-height: 32px;
    margin: 0 8px 0 4px;
    padding: 5px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

component-breadcrumb .filestash_copy_network_path:hover,
component-breadcrumb .filestash_copy_network_path:focus-visible {
    background: rgba(127, 127, 127, 0.15);
    outline: none;
}

component-breadcrumb .filestash_copy_network_path svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
    flex: 0 0 auto;
}

component-breadcrumb .filestash_copy_network_path.is-copied {
    font-weight: 600;
}

@media screen and (max-width: 760px) {
    component-breadcrumb .filestash_copy_network_path {
        width: 36px;
        min-width: 36px;
        padding: 5px 8px;
    }

    component-breadcrumb .filestash_copy_network_path span {
        display: none;
    }
}

/* ==============================
   LOGIN FILESTASH - DBPV
   ============================== */

body.common_response_page {
    min-height: 100vh !important;
    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.16), transparent 35%),
        linear-gradient(135deg, #0b1220 0%, #111827 50%, #020617 100%) !important;
    font-family: Arial, Helvetica, sans-serif !important;
    color: #f8fafc !important;
}

/* Caixa de login */
form[action*="/api/session/auth"] {
    width: 450px !important;
    max-width: calc(100vw - 40px) !important;
    padding: 38px 34px 32px 34px !important;
    margin: 0 auto !important;
    background: rgba(15, 23, 42, .82) !important;
    border: 1px solid rgba(148, 163, 184, .20) !important;
    border-radius: 22px !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, .48) !important;
    backdrop-filter: blur(10px);
}

/* DBPV dentro da box */
form[action*="/api/session/auth"]::before {
    content: "DBPV";
    display: block;
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 54px;
    font-weight: 700;
    letter-spacing: -1px;
    color: #f3f4f6;
    margin-bottom: 8px;
    text-shadow: 0 4px 14px rgba(0,0,0,.35);
}

/* Subtítulo abaixo do DBPV */
form[action*="/api/session/auth"] label:first-of-type::before {
    content: "Portal de Arquivos";
    display: block;
    text-align: center;
    color: rgba(226, 232, 240, .78);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 28px;
    pointer-events: none;
}

/* Labels/campos */
form[action*="/api/session/auth"] label {
    display: block !important;
    position: relative !important;
    margin: 14px 0 !important;
}

/* Campos */
form[action*="/api/session/auth"] input {
    width: 100% !important;
    height: 48px !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(148, 163, 184, .28) !important;
    border-radius: 12px !important;
    background: rgba(30, 41, 59, .92) !important;
    color: #f8fafc !important;
    font-size: 15px !important;
    padding: 14px 16px !important;
    outline: none !important;
    transition: all .18s ease !important;
}

form[action*="/api/session/auth"] input:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, .22) !important;
    background: rgba(15, 23, 42, .96) !important;
}

/* Esconde placeholders originais */
form[action*="/api/session/auth"] input[name="user"]::placeholder,
form[action*="/api/session/auth"] input[name="password"]::placeholder {
    color: transparent !important;
}

/* Placeholder visual PT-BR - usuário */
form[action*="/api/session/auth"] label:has(input[name="user"])::after {
    content: "Usuário";
    position: absolute;
    top: 15px;
    left: 16px;
    color: rgba(226, 232, 240, .55);
    pointer-events: none;
    font-size: 15px;
}

form[action*="/api/session/auth"] label:has(input[name="user"]:focus)::after,
form[action*="/api/session/auth"] label:has(input[name="user"]:not(:placeholder-shown))::after {
    display: none;
}

/* Placeholder visual PT-BR - senha */
form[action*="/api/session/auth"] label:has(input[name="password"])::after {
    content: "Senha";
    position: absolute;
    top: 15px;
    left: 16px;
    color: rgba(226, 232, 240, .55);
    pointer-events: none;
    font-size: 15px;
}

form[action*="/api/session/auth"] label:has(input[name="password"]:focus)::after,
form[action*="/api/session/auth"] label:has(input[name="password"]:not(:placeholder-shown))::after {
    display: none;
}

/* Botão */
form[action*="/api/session/auth"] button,
form[action*="/api/session/auth"] input[type="submit"] {
    width: 100% !important;
    height: 48px !important;
    margin-top: 16px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    letter-spacing: .4px !important;
    cursor: pointer !important;
    box-shadow: 0 12px 28px rgba(2, 132, 199, .28) !important;
    transition: all .18s ease !important;
}

/* Troca CONNECT por ENTRAR */
form[action*="/api/session/auth"] button {
    font-size: 0 !important;
}

form[action*="/api/session/auth"] button::after {
    content: "ENTRAR";
    font-size: 15px !important;
}

/* Hover */
form[action*="/api/session/auth"] button:hover,
form[action*="/api/session/auth"] input[type="submit"]:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

/* Texto inferior */
body.common_response_page::after {
    content: "Acesse com seu usuário e senha da rede.";
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(226, 232, 240, .50);
    font-size: 13px;
    pointer-events: none;
}

/* Mobile */
@media (max-width: 600px) {
    form[action*="/api/session/auth"] {
        padding: 32px 22px 26px 22px !important;
        border-radius: 18px !important;
    }

    form[action*="/api/session/auth"]::before {
        font-size: 44px;
    }
}
/* ======================================
   TRATAMENTO VISUAL DE ERROS - FILESTASH
   ====================================== */

/* Aplica só quando houver bloco de detalhe técnico */
body.common_response_page:has(pre) {
    min-height: 100vh !important;
    background:
        radial-gradient(circle at top, rgba(239, 68, 68, 0.12), transparent 35%),
        linear-gradient(135deg, #0b1220 0%, #111827 50%, #020617 100%) !important;
    color: #f8fafc !important;
    font-family: Arial, Helvetica, sans-serif !important;
}

/* Card central do erro */
body.common_response_page:has(pre) > div,
body.common_response_page:has(pre) main,
body.common_response_page:has(pre) section {
    background: rgba(15, 23, 42, .82) !important;
    border: 1px solid rgba(148, 163, 184, .20) !important;
    border-radius: 22px !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, .45) !important;
    backdrop-filter: blur(10px);
    padding: 28px 30px !important;
}

/* Título grande */
body.common_response_page:has(pre) h1 {
    font-size: 54px !important;
    line-height: 1 !important;
    color: #f8fafc !important;
    margin-bottom: 8px !important;
}

/* Subtítulo do erro */
body.common_response_page:has(pre) h2,
body.common_response_page:has(pre) h3,
body.common_response_page:has(pre) p {
    color: rgba(226, 232, 240, .88) !important;
}

/* Link "Início" */
body.common_response_page:has(pre) a[href="/"],
body.common_response_page:has(pre) a[href="./"],
body.common_response_page:has(pre) a {
    color: #93c5fd !important;
    text-decoration: none !important;
}

/* Botão de detalhes */
body.common_response_page:has(pre) button {
    border: 0 !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    color: #fff !important;
    padding: 10px 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: 0 10px 24px rgba(2, 132, 199, .22) !important;
}

/* Renomeia visualmente o botão */
body.common_response_page:has(pre) button {
    font-size: 0 !important;
}
body.common_response_page:has(pre) button::after {
    content: "Ver detalhes técnicos";
    font-size: 14px !important;
}

/* Caixa técnica */
body.common_response_page:has(pre) pre {
    background: rgba(2, 6, 23, .88) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(148, 163, 184, .18) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    overflow: auto !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
}

/* Mensagem amigável extra */
body.common_response_page:has(pre)::after {
    content: "Não foi possível concluir a operação. Verifique suas permissões de acesso ou tente novamente. Se o problema continuar, contate o suporte.";
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    width: min(700px, calc(100vw - 40px));
    text-align: center;
    color: rgba(226, 232, 240, .72);
    font-size: 14px;
    pointer-events: none;
}

/* Mobile */
@media (max-width: 600px) {
    body.common_response_page:has(pre) h1 {
        font-size: 42px !important;
    }

    body.common_response_page:has(pre)::after {
        font-size: 13px;
        bottom: 18px;
    }
}

/* ======================================
   PRODUÇÃO: NÃO MOSTRAR DETALHE TÉCNICO
   ====================================== */

body.common_response_page:has(pre) pre,
body.common_response_page:has(pre) button {
    display: none !important;
}

body.common_response_page:has(pre) h1 {
    font-size: 0 !important;
}

body.common_response_page:has(pre) h1::after {
    content: "Acesso não autorizado";
    font-size: 42px !important;
    display: block;
    color: #f8fafc;
}

body.common_response_page:has(pre) p,
body.common_response_page:has(pre) h2,
body.common_response_page:has(pre) h3 {
    font-size: 0 !important;
}

body.common_response_page:has(pre) p::after,
body.common_response_page:has(pre) h2::after,
body.common_response_page:has(pre) h3::after {
    content: "Verifique seu usuário, senha ou permissões de acesso.";
    font-size: 18px !important;
    display: block;
    color: rgba(226, 232, 240, .85);
}

component-breadcrumb .filestash-copy-network-path {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  margin: 0 8px 0 4px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-color);
  color: var(--color);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

component-breadcrumb .filestash-copy-network-path:hover,
component-breadcrumb .filestash-copy-network-path:focus-visible {
  background: var(--super-light);
}

component-breadcrumb .filestash-copy-network-path svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}

component-breadcrumb .filestash-copy-network-path.is-copied {
  font-weight: 600;
}

@media screen and (max-width: 760px) {
  component-breadcrumb .filestash-copy-network-path {
    width: 34px;
    min-width: 34px;
    padding: 5px 8px;
    justify-content: center;
  }

  component-breadcrumb .filestash-copy-network-path span {
    display: none;
  }
}
