/* ==========================================================================
   SURICATO — Identidade Visual & Tema do Painel Administrativo
   ========================================================================== */

/* 1. Página de Autenticação / Login */
body.fi-panel-admin .fi-simple-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% -10%, rgba(14, 165, 233, 0.12) 0%, rgba(248, 250, 252, 0.98) 60%, #f1f5f9 100%) !important;
    position: relative;
    padding: 1.5rem;
}

html.dark body.fi-panel-admin .fi-simple-layout {
    background: radial-gradient(ellipse at 50% -10%, rgba(14, 165, 233, 0.18) 0%, rgba(15, 23, 42, 0.98) 60%, #0b0f19 100%) !important;
}

/* Card Central do Login */
body.fi-panel-admin .fi-simple-main-ctn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

body.fi-panel-admin .fi-simple-main {
    width: 100% !important;
    max-width: 440px !important;
    background: #ffffff !important;
    border-radius: 1.25rem !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05),
                0 20px 40px -15px rgba(14, 165, 233, 0.1) !important;
    padding: 2.25rem 2rem !important;
    transition: all 0.25s ease-in-out;
}

html.dark body.fi-panel-admin .fi-simple-main {
    background: #111827 !important;
    border: 1px solid rgba(30, 41, 59, 0.9) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4),
                0 20px 40px -15px rgba(14, 165, 233, 0.12) !important;
}

/* Cabeçalho do Card */
body.fi-panel-admin .fi-simple-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.75rem !important;
}

body.fi-panel-admin .fi-simple-header .fi-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.75rem;
    height: 2.5rem !important;
    text-align: left !important;
}

body.fi-panel-admin .fi-simple-header .fi-logo * {
    text-align: left !important;
}

.fi-logo {
    display: inline-flex !important;
    align-items: center !important;
    height: 2.5rem !important;
    max-height: 2.5rem !important;
    text-align: left !important;
}

.fi-sidebar-header .fi-logo,
.fi-topbar .fi-logo {
    height: 2.25rem !important;
    max-height: 2.25rem !important;
}

.fi-logo svg {
    max-height: 22px !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

body.fi-panel-admin .fi-simple-header-heading {
    font-size: 1.375rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: -0.02em !important;
    margin-top: 0.25rem !important;
}

html.dark body.fi-panel-admin .fi-simple-header-heading {
    color: #f8fafc !important;
}

/* Campos de Formulário no Login */
body.fi-panel-admin .fi-input-wrp {
    border-radius: 0.625rem !important;
    transition: all 0.15s ease-in-out !important;
}

body.fi-panel-admin .fi-input-wrp:focus-within {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25) !important;
    border-color: #0284c7 !important;
}

/* Botão de Acesso Primário */
body.fi-panel-admin .fi-simple-main form button[type="submit"],
body.fi-panel-admin .fi-btn-color-primary {
    border-radius: 0.625rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.fi-panel-admin .fi-simple-main form button[type="submit"] {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px 0 rgba(2, 132, 199, 0.35) !important;
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
    border: none !important;
}

body.fi-panel-admin .fi-simple-main form button[type="submit"]:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
    box-shadow: 0 6px 20px 0 rgba(2, 132, 199, 0.45) !important;
    transform: translateY(-1px);
}

body.fi-panel-admin .fi-simple-main form button[type="submit"]:active {
    transform: translateY(0);
}

/* Rodapé e Badge de Segurança */
.suricato-login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(241, 245, 249, 1);
    font-size: 0.75rem;
    color: #64748b;
}

html.dark .suricato-login-footer {
    border-top: 1px solid rgba(30, 41, 59, 1);
    color: #94a3b8;
}

/* 2. Painel Autenticado */
body.fi-panel-admin .fi-sidebar {
    border-right: 1px solid rgba(226, 232, 240, 0.8) !important;
}

html.dark body.fi-panel-admin .fi-sidebar {
    border-right: 1px solid rgba(30, 41, 59, 0.8) !important;
}

body.fi-panel-admin .fi-sidebar-header {
    padding: 1.25rem 1rem !important;
}

body.fi-panel-admin .fi-sidebar-item-active > a,
body.fi-panel-admin .fi-sidebar-item-active > button {
    background-color: rgba(14, 165, 233, 0.1) !important;
    color: #0284c7 !important;
    font-weight: 600 !important;
    border-radius: 0.625rem !important;
}

html.dark body.fi-panel-admin .fi-sidebar-item-active > a,
html.dark body.fi-panel-admin .fi-sidebar-item-active > button {
    background-color: rgba(14, 165, 233, 0.15) !important;
    color: #38bdf8 !important;
}

/* 3. Layout e Aproveitamento Total de Espaço das Tabelas */
body.fi-panel-admin .fi-width-full {
    width: 100% !important;
    max-width: 100% !important;
}

body.fi-panel-admin .fi-resource-list-records-page {
    width: 100% !important;
    max-width: 100% !important;
}

/* Card da Tabela */
.fi-ta-ctn {
    border-radius: 1rem !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
}

html.dark .fi-ta-ctn {
    background: #0f172a !important;
    border-color: #1e293b !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.25) !important;
}

/* Toolbar e Barra de Busca Aprimorada */
.fi-ta-header-toolbar {
    padding: 1rem 1.25rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

html.dark .fi-ta-header-toolbar {
    background: #0f172a !important;
    border-bottom-color: #1e293b !important;
}

.fi-ta-search-field {
    width: 100% !important;
    max-width: 480px !important;
    min-width: 320px !important;
}

.fi-ta-search-field .fi-input-wrp {
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding-left: 0.25rem !important;
}

.fi-ta-search-field .fi-input-wrp:hover {
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
}

.fi-ta-search-field .fi-input-wrp:focus-within {
    background: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18), 0 2px 5px rgba(0, 0, 0, 0.05) !important;
}

html.dark .fi-ta-search-field .fi-input-wrp {
    background: #1e293b !important;
    border-color: #334155 !important;
}

html.dark .fi-ta-search-field .fi-input-wrp:hover {
    background: #1e293b !important;
    border-color: #475569 !important;
}

html.dark .fi-ta-search-field .fi-input-wrp:focus-within {
    background: #0b1120 !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
}

.fi-ta-search-field input {
    font-size: 0.875rem !important;
    padding-top: 0.55rem !important;
    padding-bottom: 0.55rem !important;
    color: #0f172a !important;
}

html.dark .fi-ta-search-field input {
    color: #f8fafc !important;
}

.fi-ta-search-field input::placeholder {
    color: #94a3b8 !important;
    font-size: 0.8125rem !important;
}

.fi-ta-search-field .fi-input-wrp-icon {
    color: #0284c7 !important;
}

/* Cabeçalho da Tabela */
.fi-ta-header-cell {
    background: #f8fafc !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: #64748b !important;
    padding: 0.85rem 1rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
    white-space: nowrap !important;
}

html.dark .fi-ta-header-cell {
    background: #111827 !important;
    color: #94a3b8 !important;
    border-bottom-color: #1e293b !important;
}

/* Células e Linhas */
.fi-ta-cell {
    padding: 0.8rem 1rem !important;
}

.fi-ta-record {
    transition: background-color 0.15s ease !important;
}

.fi-ta-record:hover {
    background-color: rgba(2, 132, 199, 0.03) !important;
}

html.dark .fi-ta-record:hover {
    background-color: rgba(56, 189, 248, 0.04) !important;
}

/* Abas (Tabs) do ListRecords */
.fi-tabs {
    margin-bottom: 1rem !important;
}
