/* Campos Salles UI - Login v3 seguro
   Escopo principal: login centralizado com efeito glass/blur.
   Sem dourado, sem sidebar escura e sem alteração estrutural agressiva. */
:root {
    --cs-red: #b00020;
    --cs-red-dark: #8f001a;
    --cs-red-soft: #fff1f2;
    --cs-bg: #fbf7f4;
    --cs-card: #ffffff;
    --cs-border: #eadfda;
    --cs-text: #241619;
    --cs-muted: #6b5e5a;
}

/* Base clara do painel administrativo */
.fi-body,
.fi-main {
    background: linear-gradient(180deg, #fffaf7 0%, #f8f5f2 100%);
}

/* Logo / marca no painel */
.fi-logo img,
.fi-sidebar-header img {
    max-height: 48px;
    width: auto;
    object-fit: contain;
}

.fi-sidebar-header {
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid var(--cs-border);
}

.fi-sidebar {
    background: rgba(255, 250, 247, 0.98);
    border-right: 1px solid var(--cs-border);
}

.fi-sidebar-group-label {
    color: var(--cs-muted);
    font-weight: 700;
    letter-spacing: .02em;
}

.fi-sidebar-item a {
    border-radius: 12px;
}

.fi-sidebar-item-active a,
.fi-sidebar-item a:hover {
    background: var(--cs-red-soft) !important;
    color: var(--cs-red) !important;
}

.fi-sidebar-item-active svg,
.fi-sidebar-item a:hover svg {
    color: var(--cs-red) !important;
}

/* Botões e links primários: vermelho institucional sem dourado */
.fi-btn-color-primary {
    background: var(--cs-red) !important;
    border-color: var(--cs-red) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(176, 0, 32, .14);
}

.fi-btn-color-primary:hover {
    background: var(--cs-red-dark) !important;
    border-color: var(--cs-red-dark) !important;
}

/* Cards/tabelas: refinamento leve */
.fi-section,
.fi-ta-ctn,
.fi-wi-widget > div {
    border-color: var(--cs-border) !important;
    box-shadow: 0 12px 34px rgba(36, 22, 25, .045);
}

.fi-header-heading {
    color: var(--cs-text);
}

/* LOGIN - fundo com imagem, card centralizado e glass blur */
.fi-simple-layout {
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 18% 28%, rgba(255, 255, 255, .70) 0%, rgba(255, 255, 255, .34) 32%, rgba(255, 255, 255, .08) 58%),
        linear-gradient(90deg, rgba(255, 250, 247, .25) 0%, rgba(255, 250, 247, .08) 45%, rgba(255, 250, 247, .05) 100%),
        url('/images/login-peruibe.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    padding: 2rem !important;
}

.fi-simple-main {
    width: min(100%, 470px);
    margin: 0 auto !important;
    background: rgba(255, 255, 255, .58) !important;
    border: 1px solid rgba(255, 255, 255, .66) !important;
    border-radius: 28px !important;
    box-shadow: 0 28px 80px rgba(36, 22, 25, .18) !important;
    backdrop-filter: blur(16px) saturate(135%);
    -webkit-backdrop-filter: blur(16px) saturate(135%);
}

.fi-simple-main::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,.52), rgba(255,255,255,.28));
}

.fi-simple-main .fi-logo img {
    max-height: 86px;
    width: auto;
    object-fit: contain;
}

.fi-simple-main .fi-header-heading {
    text-align: center;
    color: #1f2933;
}

.fi-simple-main input,
.fi-simple-main .fi-input-wrp {
    background-color: rgba(255, 255, 255, .82) !important;
}

.fi-simple-main .fi-input-wrp {
    border-color: rgba(255, 255, 255, .72) !important;
    box-shadow: 0 8px 20px rgba(36, 22, 25, .06);
}

@media (max-width: 640px) {
    .fi-simple-layout {
        padding: 1rem !important;
        background-position: center;
    }

    .fi-simple-main {
        width: 100%;
        border-radius: 22px !important;
        background: rgba(255, 255, 255, .74) !important;
    }
}

/* Full-width table for property listing (1920px+ optimization) */
.fi-main {
    max-width: 100% !important;
}

.fi-main-ctn {
    max-width: 100% !important;
}

/* Property table thumbnail sizing */
.fi-ta-image {
    flex-shrink: 0;
}

/* Sidebar collapsed: tooltip-friendly icon display */
.fi-sidebar-nav-collapsed .fi-sidebar-group-label {
    font-size: 0;
    padding: 0;
}

/* Smooth sidebar transition */
.fi-sidebar {
    transition: width 200ms ease-in-out;
}

/* Navigation group separator labels */
.fi-sidebar-group[data-group-label="Financeiro"]::before,
.fi-sidebar-group[data-group-label="Configurações"]::before {
    content: '';
    display: block;
    height: 1px;
    background: var(--cs-border);
    margin: 8px 16px;
}

/* ── Help Drawer ────────────────────────────────────── */

/* Topbar help button (sits next to notification bell) */
.cs-help-topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--cs-muted);
    cursor: pointer;
    transition: background 120ms, color 120ms;
}

.cs-help-topbar-btn:hover {
    background: var(--cs-red-soft);
    color: var(--cs-red);
}

.cs-help-topbar-icon {
    width: 20px;
    height: 20px;
}

/* Backdrop */
.cs-help-backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, .35);
}

/* Drawer panel */
.cs-help-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    width: 420px;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, .12);
    transform: translateX(100%);
    transition: transform 250ms ease;
}

.cs-help-drawer--open {
    transform: translateX(0);
}

/* Header */
.cs-help-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--cs-border);
    background: var(--cs-bg);
}

.cs-help-drawer-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--cs-text);
}

.cs-help-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--cs-muted);
    cursor: pointer;
    transition: background 120ms;
}

.cs-help-drawer-close:hover {
    background: var(--cs-red-soft);
    color: var(--cs-red);
}

/* Search */
.cs-help-drawer-search {
    padding: 12px 20px;
    border-bottom: 1px solid var(--cs-border);
}

.cs-help-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--cs-text);
    background: #fff;
    outline: none;
    transition: border-color 150ms;
}

.cs-help-search-input:focus {
    border-color: var(--cs-red);
    box-shadow: 0 0 0 2px rgba(176, 0, 32, .08);
}

/* Content area */
.cs-help-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Prose / article styles */
.cs-help-article h1 { font-size: 20px; font-weight: 700; margin: 0 0 16px; color: var(--cs-text); }
.cs-help-article h2 { font-size: 16px; font-weight: 700; margin: 24px 0 10px; color: var(--cs-text); }
.cs-help-article h3 { font-size: 14px; font-weight: 600; margin: 18px 0 8px; color: var(--cs-text); }
.cs-help-article p  { font-size: 13px; line-height: 1.65; color: var(--cs-muted); margin: 0 0 12px; }
.cs-help-article ul,
.cs-help-article ol { font-size: 13px; line-height: 1.65; color: var(--cs-muted); padding-left: 20px; margin: 0 0 12px; }
.cs-help-article li { margin-bottom: 4px; }
.cs-help-article code { font-size: 12px; background: #f4f0ed; padding: 2px 5px; border-radius: 4px; }
.cs-help-article pre { background: #f4f0ed; padding: 12px; border-radius: 8px; overflow-x: auto; margin: 0 0 12px; }
.cs-help-article pre code { background: none; padding: 0; }
.cs-help-article table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 0 0 12px; }
.cs-help-article th,
.cs-help-article td { padding: 6px 8px; border: 1px solid var(--cs-border); text-align: left; }
.cs-help-article th { background: var(--cs-bg); font-weight: 600; }
.cs-help-article a { color: var(--cs-red); text-decoration: none; }
.cs-help-article a:hover { text-decoration: underline; }
.cs-help-article strong { color: var(--cs-text); }

/* Section titles */
.cs-help-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--cs-muted);
    margin: 0 0 10px;
}

/* Search results */
.cs-help-search-results {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cs-help-search-item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--cs-text);
    transition: background 120ms;
}

.cs-help-search-item:hover {
    background: var(--cs-red-soft);
}

.cs-help-search-item strong {
    display: block;
    font-size: 13px;
    margin-bottom: 2px;
}

.cs-help-search-item p {
    margin: 0;
    font-size: 12px;
    color: var(--cs-muted);
    line-height: 1.5;
}

.cs-help-empty {
    font-size: 13px;
    color: var(--cs-muted);
    text-align: center;
    padding: 24px 0;
}

/* Related documents */
.cs-help-related {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--cs-border);
}

.cs-help-related ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cs-help-related a {
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--cs-red);
    text-decoration: none;
    text-transform: capitalize;
    transition: background 120ms;
}

.cs-help-related a:hover {
    background: var(--cs-red-soft);
}

/* Footer */
.cs-help-drawer-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--cs-border);
    background: var(--cs-bg);
}

.cs-help-footer-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cs-red);
    text-decoration: none;
    transition: background 120ms;
}

.cs-help-footer-link:hover {
    background: var(--cs-red-soft);
}

/* Mobile */
@media (max-width: 640px) {
    .cs-help-drawer {
        width: 100vw;
    }
}
