@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --sidebar-bg: #f8fafc;
    --sidebar-hover: #eef1f4;
    --sidebar-active: #1e3a8a;
    --sidebar-width: 240px;
    --sidebar-collapsed: 70px;
    --topbar-bg: rgba(255,255,255,0.85);
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --card-bg: rgba(255,255,255,0.75);
    --card-border: rgba(255,255,255,0.3);
    --glass-blur: blur(20px);
    --text-light: #e2e8f0;
    --text-muted-sidebar: #334155;
    --shadow-card: 0 8px 32px rgba(0,0,0,0.08);
    --shadow-hover: 0 16px 48px rgba(99,102,241,0.15);
    --radius-card: 16px;
    --radius-sm: 8px;

    /* Dashboard design tokens */
    --dash-card-radius: 16px;
    --dash-card-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --dash-grid-gap: 1.25rem;
    --dash-stat-font: 1.5rem;
    --dash-stat-weight: 700;
    --dash-bg: #f0f2f5;
    --dash-text: #1f2937;
    --dash-text-muted: #6b7280;

    /* Core design tokens */
    --body-bg: #f0f2f5;
    --card-shadow-hover: 0 16px 48px rgba(99,102,241,0.15);
    --animation-duration: 0.3s;
    --animation-easing: cubic-bezier(0.4, 0, 0.2, 1);

    /* Module colors */
    --color-indigo: #6366f1;
    --color-blue: #3b82f6;
    --color-amber: #f59e0b;
    --color-orange: #f97316;
    --color-red: #ef4444;
    --color-emerald: #3b82f6;
    --color-cyan: #06b6d4;
    --color-purple: #8b5cf6;
    --color-violet: #7c3aed;
    --color-sky: #0ea5e9;
    --color-pink: #ec4899;
    --color-lime: #84cc16;
    --color-teal: #0ea5e9;
    --color-fuchsia: #a855f7;
    --color-red-600: #dc2626;
}

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: #f0f2f5;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(99,102,241,0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139,92,246,0.03) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* ===== TOP NAVBAR ===== */
.top-navbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: 64px;
    background: var(--topbar-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    z-index: 1020;
    display: flex;
    align-items: center;
    padding: 0 24px;
    transition: left 0.3s ease;
}

.top-navbar .brand-mobile {
    display: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-primary);
    margin-right: 16px;
}

.search-container {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.search-container .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.875rem;
    pointer-events: none;
}

.search-container input {
    width: 100%;
    padding: 8px 16px 8px 40px;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 100px;
    background: rgba(0,0,0,0.03);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    outline: none;
}

.search-container input:focus {
    background: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.search-container input::placeholder {
    color: #9ca3af;
}

.top-navbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.top-navbar-right .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.2s;
}

.top-navbar-right .user-info:hover {
    background: rgba(0,0,0,0.03);
}

.top-navbar-right .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.top-navbar-right .user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
}

/* ===== SIDEBAR / NAVIGATION RAIL (BCT-SIGSPA-UI-005) ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-collapsed);
    background: var(--sidebar-bg);
    z-index: 1030;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease, box-shadow 0.28s ease;
    display: flex;
    flex-direction: column;
}

/* Estado expandido: hover/foco (.is-open), fixado (.pinned) ou drawer mobile (.open).
   O menu sobrepõe o conteúdo — não há recuo, evitando "saltos" de layout. */
.sidebar.is-open,
.sidebar.pinned,
.sidebar.open {
    width: var(--sidebar-width);
}

.sidebar.is-open,
.sidebar.pinned {
    box-shadow: 8px 0 40px rgba(15, 23, 42, 0.12);
}

/* Rail recolhido: as legendas/setas (invisíveis) não podem ocupar espaço,
   senão o flex:1 delas seguraria o ícone à esquerda e a centralização falharia. */
.sidebar:not(.is-open):not(.pinned):not(.open) .nav-label,
.sidebar:not(.is-open):not(.pinned):not(.open) .nav-arrow {
    flex: 0 0 0;
    width: 0;
    max-width: 0;
    margin: 0;
    overflow: hidden;
}

.sidebar:not(.is-open):not(.pinned):not(.open) .brand-info {
    max-width: 0;
    margin-left: 0;
    overflow: hidden;
}

/* Ícones centralizados no painel enquanto recolhido */
.sidebar:not(.is-open):not(.pinned):not(.open) .nav-item-sidebar > a,
.sidebar:not(.is-open):not(.pinned):not(.open) .sidebar-brand,
.sidebar:not(.is-open):not(.pinned):not(.open) .btn-novo-cadastro {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    gap: 0;
}

.sidebar:not(.is-open):not(.pinned):not(.open) .nav-item-sidebar > a i:first-child {
    margin-right: 0;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(51,65,85,0.25);
    border-radius: 4px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 16px;
    min-height: 64px;
    border-bottom: 1px solid rgba(15,23,42,0.08);
    cursor: pointer;
    outline: none;
}

.sidebar-brand:focus-visible {
    box-shadow: inset 0 0 0 2px var(--accent-primary);
}

.sidebar-brand .brand-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.sidebar-brand .brand-info {
    margin-left: 12px;
    min-width: 0;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.25s ease 0.12s, transform 0.25s ease 0.12s;
}

.sidebar.is-open .brand-info,
.sidebar.pinned .brand-info,
.sidebar.open .brand-info {
    opacity: 1;
    transform: none;
}

.sidebar-brand .brand-text {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e3a8a;
    white-space: nowrap;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-brand .brand-sub {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(51,65,85,0.6);
    white-space: nowrap;
    margin-top: 2px;
}

/* Animação do peixe "nadando" ao expandir o menu */
.sidebar.is-open .brand-icon i,
.sidebar.pinned .brand-icon i {
    animation: fishSwim 0.75s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fishSwim {
    0%   { transform: translateX(-2px) rotate(-6deg); }
    35%  { transform: translateX(5px)  rotate(8deg); }
    65%  { transform: translateX(-2px) rotate(-4deg); }
    100% { transform: translateX(0)    rotate(0); }
}

.sidebar-nav {
    padding: 12px 0;
    flex: 1;
}

.sidebar-nav .nav-section {
    padding: 8px 20px 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: transparent;
    white-space: nowrap;
    overflow: hidden;
    transition: color 0.2s ease;
}

.sidebar.is-open .nav-section,
.sidebar.pinned .nav-section,
.sidebar.open .nav-section {
    color: rgba(51,65,85,0.6);
}

.nav-item-sidebar {
    position: relative;
}

.nav-item-sidebar > a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-muted-sidebar);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.nav-item-sidebar > a:hover {
    background: var(--sidebar-hover);
    color: #1f2937;
}

.nav-item-sidebar > a.active {
    background: var(--sidebar-active);
    color: #fff;
    border-left-color: rgba(255,255,255,0.35);
}

.nav-item-sidebar > a i:first-child {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.nav-item-sidebar > a .nav-label {
    flex: 1;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.nav-item-sidebar > a .nav-arrow {
    font-size: 0.65rem;
    transition: transform 0.3s ease, opacity 0.2s ease;
    opacity: 0;
}

.sidebar.is-open .nav-label,
.sidebar.pinned .nav-label,
.sidebar.open .nav-label {
    opacity: 1;
}

.sidebar.is-open .nav-arrow,
.sidebar.pinned .nav-arrow,
.sidebar.open .nav-arrow {
    opacity: 0.5;
}

.nav-item-sidebar > a .nav-arrow.open {
    transform: rotate(90deg);
}

/* Seções do menu (nível 1): grupos retráteis/expansíveis com estilo de rótulo */
.nav-item-sidebar.nav-section-group > a {
    padding: 8px 20px 6px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(51,65,85,0.65);
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.nav-item-sidebar.nav-section-group > a:hover {
    color: #111827;
    background: var(--sidebar-hover);
}

.nav-item-sidebar.nav-section-group > a i:first-child {
    width: 16px;
    font-size: 0.75rem;
    margin-right: 10px;
    opacity: 0.6;
}

.nav-item-sidebar.nav-section-group > a .nav-label {
    flex: 1;
    white-space: nowrap;
}

.nav-item-sidebar.nav-section-group > a .nav-arrow {
    font-size: 0.55rem;
    opacity: 0.45;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav-item-sidebar.nav-section-group > a .nav-arrow.open {
    transform: rotate(90deg);
    opacity: 0.9;
}

/* Itens diretos das seções: estilo de grupo intermediário (nível 2) */
.submenu > .nav-item-submenu > a {
    padding-left: 40px;
}

.submenu > .submenu > .nav-item-submenu > a {
    padding-left: 55px;
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 0;
    background: rgba(15,23,42,0.04);
}

.submenu.open {
    max-height: 500px;
    opacity: 1;
}

.submenu li a {
    display: flex;
    align-items: center;
    padding: 8px 20px 8px 55px;
    color: #475569;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.submenu li a:hover {
    color: #111827;
    background: rgba(15,23,42,0.05);
}

.submenu li a.active {
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
}

.submenu li a i {
    width: 16px;
    font-size: 0.7rem;
    margin-right: 8px;
}

/* Cabeçalhos de grupo dentro dos submenus (nível 3, retráteis/expansíveis) */
.submenu li.nav-item-submenu > a {
    display: flex;
    align-items: center;
    padding: 8px 20px 8px 40px;
    color: #334155;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.submenu li.nav-item-submenu > a:hover {
    color: #111827;
    background: rgba(15,23,42,0.05);
}

.submenu li.nav-item-submenu > a .nav-label {
    flex: 1;
    white-space: nowrap;
}

.submenu li.nav-item-submenu > a .nav-arrow {
    font-size: 0.6rem;
    opacity: 0.5;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.submenu li.nav-item-submenu > a .nav-arrow.open {
    transform: rotate(90deg);
    opacity: 0.9;
}

/* Itens do nível 3 (folhas aninhadas) */
.submenu .submenu {
    background: rgba(15,23,42,0.03);
}

.submenu .submenu li a {
    padding-left: 70px;
    font-size: 0.75rem;
}

/* Sidebar Footer (Novo Cadastro button) */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(15,23,42,0.08);
}

.btn-novo-cadastro .btn-novo-label {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transition: max-width 0.28s ease, opacity 0.2s ease;
}

.sidebar.is-open .btn-novo-label,
.sidebar.pinned .btn-novo-label,
.sidebar.open .btn-novo-label {
    max-width: 160px;
    opacity: 1;
}

.btn-novo-cadastro {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-novo-cadastro:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.35);
    color: #fff;
    text-decoration: none;
}

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

/* Sidebar Toggle (Mobile) */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: #1f2937;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px 8px;
}

/* ===== MAIN CONTENT ===== */
/* Área útil acompanha o rail recolhido; o hover apenas sobrepõe (não recua o conteúdo).
   Com o menu fixado (.pinned) o conteúdo cede espaço — ver bloco responsivo (só desktop). */
.main-content {
    margin-left: var(--sidebar-collapsed);
    margin-top: 64px;
    padding: 24px;
    min-height: calc(100vh - 64px);
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Atendente (permissão 3) não possui menu lateral — conteúdo ocupa a largura total */
body.sem-sidebar .main-content {
    margin-left: 0;
}

/* ===== FLOATING CARDS ===== */
.floating-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.floating-card .card-body {
    padding: 24px;
}

/* Dashboard main cards */
.dash-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 24px;
    height: 100%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dash-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.dash-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.dash-card .card-icon.purple {
    background: rgba(99,102,241,0.12);
    color: #6366f1;
}

.dash-card .card-icon.blue {
    background: rgba(59,130,246,0.12);
    color: #3b82f6;
}

.dash-card .card-icon.amber {
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
}

.dash-card .card-icon.orange {
    background: rgba(249,115,22,0.12);
    color: #f97316;
}

.dash-card .card-icon.rose {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
}

.dash-card .card-icon.emerald {
    background: rgba(59,130,246,0.12);
    color: #3b82f6;
}

.dash-card .card-icon.cyan {
    background: rgba(6,182,212,0.12);
    color: #06b6d4;
}

.dash-card .card-icon.indigo {
    background: rgba(139,92,246,0.12);
    color: #8b5cf6;
}

.dash-card .card-icon.slate {
    background: rgba(100,116,139,0.12);
    color: #64748b;
}

.dash-card .card-icon.pink {
    background: rgba(236,72,153,0.12);
    color: #ec4899;
}
.dash-card .card-icon.teal {
    background: rgba(20,184,166,0.12);
    color: #0ea5e9;
}
.dash-card .card-icon.fuchsia {
    background: rgba(168,85,247,0.12);
    color: #a855f7;
}
.dash-card .card-icon.lime {
    background: rgba(132,204,22,0.12);
    color: #84cc16;
}
.dash-card .card-icon.red-600 {
    background: rgba(220,38,38,0.12);
    color: #dc2626;
}

/* Card entry animation */
@keyframes dashCardIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.dash-card {
    animation: dashCardIn 0.4s var(--animation-easing) both;
}
.dash-card:nth-child(1) { animation-delay: 0.02s; }
.dash-card:nth-child(2) { animation-delay: 0.04s; }
.dash-card:nth-child(3) { animation-delay: 0.06s; }
.dash-card:nth-child(4) { animation-delay: 0.08s; }
.dash-card:nth-child(5) { animation-delay: 0.10s; }
.dash-card:nth-child(6) { animation-delay: 0.12s; }
.dash-card:nth-child(7) { animation-delay: 0.14s; }
.dash-card:nth-child(8) { animation-delay: 0.16s; }
.dash-card:nth-child(9) { animation-delay: 0.18s; }
.dash-card:nth-child(10) { animation-delay: 0.20s; }
.dash-card:nth-child(11) { animation-delay: 0.22s; }
.dash-card:nth-child(12) { animation-delay: 0.24s; }
.dash-card:nth-child(13) { animation-delay: 0.26s; }
.dash-card:nth-child(14) { animation-delay: 0.28s; }
.dash-card:nth-child(15) { animation-delay: 0.30s; }

.dash-card h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.dash-card p {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 16px;
}

.dash-card .card-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.dash-card .card-link:hover {
    gap: 8px;
}

.dash-card .card-bg-shape {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.04;
    pointer-events: none;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
    padding: 20px;
}

.login-page::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(99,102,241,0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(139,92,246,0.06) 0%, transparent 50%);
    z-index: 0;
}

.login-card {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

.login-card .login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-card .login-logo h1 {
    color: #fff;
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.login-card .login-logo p {
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
}

.login-card .form-control {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.login-card .form-control:focus {
    background: rgba(255,255,255,0.08);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
    color: #fff;
}

.login-card .form-control::placeholder {
    color: rgba(255,255,255,0.3);
}

.login-card .form-label {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    font-weight: 500;
}

.login-card .btn-login {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.login-card .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99,102,241,0.3);
}

.login-card .login-error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 12px;
    padding: 10px 16px;
    color: #fca5a5;
    font-size: 0.8rem;
    margin-bottom: 16px;
    display: none;
}

/* ===== PAGE TITLE ===== */
.page-title {
    margin-bottom: 24px;
}

.page-title h3 {
    font-weight: 700;
    font-size: 1.35rem;
    color: #1f2937;
    margin-bottom: 2px;
}

.page-title p {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0;
}

/* ===== OVERLAY ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1025;
}

/* ===== RESPONSIVE ===== */
/* Menu fixado empurra o conteúdo apenas no desktop; em telas menores ele sobrepõe. */
@media (min-width: 992px) {
    body:has(.sidebar.pinned) .main-content {
        margin-left: var(--sidebar-width);
    }
}

@media (max-width: 991.98px) {
    .top-navbar {
        left: 0;
    }

    .top-navbar .brand-mobile {
        display: block;
    }

    .sidebar-toggle {
        display: block;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        padding: 16px;
    }

    /* Dashboard cards - 2 columns on tablet */
    .row.g-4 > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Listagem filtrar bar wrap */
    .floating-card .card-body .d-flex.flex-wrap {
        flex-direction: column;
        align-items: stretch !important;
    }
    .floating-card .card-body .d-flex.flex-wrap select,
    .floating-card .card-body .d-flex.flex-wrap input {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* CA header responsive */
    #modalSocio .ca-assoc-header {
        flex-wrap: wrap;
        height: auto;
        min-height: auto;
        padding: 12px 16px;
        gap: 10px;
    }
    #modalSocio .ca-assoc-header .ca-assoc-meta {
        gap: 2px 10px;
    }
}

@media (max-width: 575.98px) {
    .top-navbar {
        padding: 0 12px;
    }

    .top-navbar-right .user-name {
        display: none;
    }

    .search-container {
        max-width: 200px;
    }

    .main-content {
        padding: 12px;
    }

    /* Dashboard cards - 1 column on mobile */
    .row.g-4 > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .dash-card {
        padding: 16px;
    }
    .dash-card .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 12px;
    }
    .dash-card h5 {
        font-size: 0.9rem;
    }
    .dash-stat {
        font-size: 1.25rem;
    }

    /* Pagination wrap on mobile */
    #glPaginacao {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Gl table scroll horizontal */
    .gl-tabela {
        font-size: 12px;
    }
    .gl-tabela th,
    .gl-tabela td {
        padding: 6px 8px;
    }

    /* CA sidebar smaller */
    .ca-sidebar {
        width: 48px;
        padding: 8px 0;
    }
    .ca-sidebar a,
    .ca-sidebar button {
        width: 36px;
        height: 36px;
        font-size: 14px;
        justify-content: center;
        padding: 0;
    }
    .ca-sidebar a::after,
    .ca-sidebar button::after,
    .ca-sidebar .ca-nav-label {
        display: none;
    }

    /* Card grid in CA */
    .ca-card-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
    --body-bg: #0f1117;
    --card-bg: rgba(30,32,42,0.9);
    --card-border: rgba(255,255,255,0.08);
    --topbar-bg: rgba(15,17,23,0.95);
    --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-hover: 0 16px 48px rgba(99,102,241,0.25);
    --dash-text: #e2e8f0;
    --dash-text-muted: #94a3b8;
    --dash-bg: #0f1117;
}
[data-theme="dark"] body {
    background: var(--body-bg);
}
[data-theme="dark"] .dash-card h5 {
    color: #e2e8f0;
}
[data-theme="dark"] .dash-card p {
    color: #94a3b8;
}
[data-theme="dark"] .dash-stat {
    color: #e2e8f0;
}
[data-theme="dark"] .floating-card {
    background: rgba(30,32,42,0.9);
    border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .gl-tabela th {
    background: #1e202a;
    color: #e2e8f0;
    border-bottom-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .gl-tabela td {
    color: #cbd5e1;
    border-bottom-color: rgba(255,255,255,0.05);
}
[data-theme="dark"] .gl-tabela tr:hover td {
    background: rgba(255,255,255,0.03);
}
[data-theme="dark"] #modalSocio .ca-assoc-header {
    background: linear-gradient(135deg, #1a1b2e 0%, #1e202a 100%);
    border-bottom-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] #modalSocio .ca-assoc-header .ca-assoc-name {
    color: #e2e8f0;
}
[data-theme="dark"] #modalSocio .ca-assoc-header .ca-meta-item {
    color: #94a3b8;
}
[data-theme="dark"] .ca-sidebar {
    background: #1a1b2e;
}
[data-theme="dark"] .ca-sidebar a {
    color: #94a3b8;
}
[data-theme="dark"] .ca-sidebar .ca-nav-section,
[data-theme="dark"] .ca-sidebar .ca-nav-group-header {
    color: #64748b;
}
[data-theme="dark"] .ca-sidebar a.active {
    background: rgba(99,102,241,0.2);
    color: #818cf8;
}
[data-theme="dark"] .gl-acao-select {
    background: #1e202a;
    border-color: rgba(255,255,255,0.12);
    color: #e2e8f0;
}
[data-theme="dark"] .gl-info-selecao {
    color: #94a3b8;
}

/* ===== FICHA DO ASSOCIADO — CPF em destaque + Tarefas Pendentes (BCT-SIGSPA-UI-002) ===== */
.cpf-destaque {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 14px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 100px;
    font-size: 0.8rem;
    color: #4338ca;
    font-weight: 500;
}

.cpf-destaque strong {
    font-size: 0.98rem;
    font-weight: 700;
    color: #312e81;
    letter-spacing: 0.02em;
}

.cpf-destaque.cpf-vazio {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.cpf-destaque.cpf-vazio strong { color: #b91c1c; }

.cpf-copiar {
    border: none;
    background: transparent;
    color: #6366f1;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.cpf-copiar:hover { background: rgba(99,102,241,0.12); }

/* Código interno passa a ser discreto (informação técnica) */
.meta .cod-tecnico {
    opacity: 0.55;
    font-size: 0.78rem;
}

.tarefas-pendentes-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 9px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.tarefas-pendentes-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99,102,241,0.35);
}

.tarefas-pendentes-btn .tp-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 100px;
    background: #ef4444;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tarefas-pendentes-btn .tp-badge.tp-ok { background: #3b82f6; }

/* ===== UTILITY ===== */
.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hide old view sidebars/navbars inside main content */
.main-content .navbar-dark.sticky-top,
.main-content #sidebarMenu {
    display: none !important;
}

/* Adjust main content div inside views */
#DIVPRINCIPALPARAMEDIA {
    margin-left: 0 !important;
    width: 100% !important;
}

/* Smooth sidebar collapse animation for submenus */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-down {
    animation: fadeInDown 0.3s ease;
}

/* ===== Central do Associado — neutraliza o reset legado do style.css ===== */
/* style.css declara `* { margin: 0 auto; }`, o que faz itens flex/grid dentro
   do modal encolherem para a largura do conteúdo e centralizarem (tela
   "espremida"). O :where() tem especificidade zero: vence o `*` apenas pela
   ordem do cascade e nunca atropela estilos de componentes. */
:where(#modalSocio, #modalSocio *) {
    margin-left: 0;
    margin-right: 0;
}

/* ============================================================
   BCT-SIGSPA-UI-009 — DESIGN COMPACTO E PADRONIZADO
   ============================================================ */

/* ----- Variáveis do Design System ----- */
:root {
    --ca-header-h: 64px;
    --ca-sidebar-w: 205px;
    --ca-primary: #6366f1;
    --ca-primary-light: #818cf8;
    --ca-bg: #f8fafc;
    --ca-card-bg: #ffffff;
    --ca-text: #1e293b;
    --ca-text-secondary: #64748b;
    --ca-border: #e2e8f0;
    --ca-radius: 8px;
    --ca-radius-sm: 6px;
    --ca-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --ca-shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
    --ca-font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --ca-transition: 0.2s ease;
}

/* ----- Modal Fullscreen Compacto ----- */
#modalSocio .modal-header {
    padding: 0 16px !important;
    height: var(--ca-header-h) !important;
    min-height: var(--ca-header-h) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    background: var(--ca-primary) !important;
}
#modalSocio .modal-header .modal-title {
    font-size: 14px;
    font-weight: 600;
    line-height: var(--ca-header-h);
    display: flex;
    align-items: center;
    gap: 6px;
}
#modalSocio .modal-header .close {
    font-size: 20px;
    line-height: 1;
    padding: 0 4px;
    opacity: 0.7;
}
#modalSocio .modal-header .close:hover {
    opacity: 1;
}

/* ----- Layout: Sidebar + Conteúdo ----- */
#modalSocio .ca-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    height: 100%;
}
#modalSocio .ca-sidebar {
    width: var(--ca-sidebar-w);
    flex-shrink: 0;
    background: #f1f5f9;
    border-right: 1px solid var(--ca-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    gap: 2px;
    overflow-y: auto;
}
#modalSocio .ca-sidebar a,
#modalSocio .ca-sidebar button {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 12px;
    border-radius: var(--ca-radius-sm);
    color: var(--ca-text-secondary);
    text-decoration: none;
    font-size: 16px;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    transition: all var(--ca-transition);
}
#modalSocio .ca-sidebar a:hover,
#modalSocio .ca-sidebar button:hover {
    background: #e2e8f0;
    color: var(--ca-primary);
}
#modalSocio .ca-sidebar a.active,
#modalSocio .ca-sidebar button.active {
    background: var(--ca-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
#modalSocio .ca-sidebar a::after,
#modalSocio .ca-sidebar button::after {
    content: none;
}
#modalSocio .ca-sidebar .ca-nav-label {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    text-align: left;
}
#modalSocio .ca-sidebar .ca-nav-section {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 12px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #94a3b8;
    text-align: left;
    flex-shrink: 0;
}
#modalSocio .ca-sidebar .ca-nav-section:first-child {
    padding-top: 4px;
}
#modalSocio .ca-sidebar .ca-nav-group {
    width: 100%;
    flex-shrink: 0;
}
#modalSocio .ca-sidebar .ca-nav-group-header {
    width: 100%;
    height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-radius: var(--ca-radius-sm);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #94a3b8;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    transition: all var(--ca-transition);
}
#modalSocio .ca-sidebar .ca-nav-group-header:hover {
    color: var(--ca-primary);
    background: #e2e8f0;
}
#modalSocio .ca-sidebar .ca-nav-group-header .ca-nav-arrow {
    font-size: 9px;
    width: 10px;
    flex-shrink: 0;
    transition: transform .2s;
}
#modalSocio .ca-sidebar .ca-nav-group.open .ca-nav-group-header .ca-nav-arrow {
    transform: rotate(90deg);
}
#modalSocio .ca-sidebar .ca-nav-group-items {
    display: none;
}
#modalSocio .ca-sidebar .ca-nav-group.open .ca-nav-group-items {
    display: block;
}
#modalSocio .ca-sidebar .ca-nav-group-items a {
    padding-left: 24px;
    height: 36px;
    font-size: 14px;
}
[data-theme="dark"] #modalSocio .ca-sidebar .ca-nav-group-header:hover {
    background: rgba(255,255,255,.06);
}
#modalSocio .ca-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

/* ----- Header Compacto do Associado ----- */
#modalSocio .ca-assoc-header {
    height: var(--ca-header-h);
    min-height: var(--ca-header-h);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
    border-bottom: 1px solid var(--ca-border);
    flex-shrink: 0;
}
#modalSocio .ca-assoc-header .ca-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg,var(--ca-primary),#818cf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(99,102,241,0.25);
    border: 2px solid #fff;
}
#modalSocio .ca-assoc-header .ca-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#modalSocio .ca-assoc-header .ca-assoc-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
#modalSocio .ca-assoc-header .ca-assoc-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--ca-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
#modalSocio .ca-assoc-header .ca-assoc-apelido {
    font-size: 11px;
    color: var(--ca-text-secondary);
    font-style: italic;
}
#modalSocio .ca-assoc-header .ca-assoc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 2px;
}
#modalSocio .ca-assoc-header .ca-meta-item {
    font-size: 11px;
    color: var(--ca-text-secondary);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
#modalSocio .ca-assoc-header .ca-meta-item i {
    font-size: 10px;
    color: var(--ca-primary);
    width: 12px;
    text-align: center;
}
#modalSocio .ca-assoc-header .ca-status-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
}
#modalSocio .ca-assoc-header .ca-status-badge.ativo {
    background: #dbeafe;
    color: #1e40af;
}
#modalSocio .ca-assoc-header .ca-status-badge.inativo {
    background: #fce4ec;
    color: #b71c1c;
}
#modalSocio .ca-assoc-header .ca-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
#modalSocio .ca-assoc-header .ca-pendencias {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border: 1px solid var(--ca-border);
    border-radius: var(--ca-radius-sm);
    padding: 4px 12px;
    font-size: 11px;
    color: var(--ca-text-secondary);
    white-space: nowrap;
}
#modalSocio .ca-assoc-header .ca-pendencias i {
    color: #f59e0b;
    font-size: 13px;
}
#modalSocio .ca-assoc-header .ca-pendencias-count {
    font-size: 16px;
    font-weight: 700;
    color: var(--ca-text);
}
#modalSocio .ca-assoc-header .ca-header-actions .ca-btn {
    height: 32px;
    width: 32px;
    padding: 0;
    font-size: 13px;
    border-radius: var(--ca-radius-sm);
    border: 1px solid var(--ca-border);
    background: #fff;
    color: var(--ca-text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ca-transition);
    text-decoration: none;
}
#modalSocio .ca-assoc-header .ca-header-actions .ca-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--ca-text);
}
#modalSocio .ca-assoc-header .ca-header-actions .ca-btn.ca-btn-primary {
    background: var(--ca-primary);
    border-color: var(--ca-primary);
    color: #fff;
}
#modalSocio .ca-assoc-header .ca-header-actions .ca-btn.ca-btn-primary:hover {
    background: var(--ca-primary-light);
    border-color: var(--ca-primary-light);
}
#modalSocio .ca-assoc-header .ca-header-actions .ca-btn.ca-btn-novo-doc {
    width: auto;
    padding: 0 14px;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: transparent;
    color: #fff;
    white-space: nowrap;
}
#modalSocio .ca-assoc-header .ca-header-actions .ca-btn.ca-btn-novo-doc:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: transparent;
    color: #fff;
}

/* ----- Body do Conteúdo (scroll) ----- */
#modalSocio .ca-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    background: var(--ca-bg);
    box-sizing: border-box;
    min-height: 0;
    scrollbar-gutter: stable;
}

/* ===== PADRONIZAÇÃO: CARDS ===== */
.ca-card {
    background: var(--ca-card-bg);
    border-radius: var(--ca-radius);
    border: 1px solid var(--ca-border);
    box-shadow: var(--ca-shadow);
    padding: 16px;
    transition: box-shadow var(--ca-transition);
}
.ca-card:hover {
    box-shadow: var(--ca-shadow-hover);
}
.ca-card .ca-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ca-text);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ca-card .ca-card-title .ca-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.ca-card .ca-card-body {
    font-size: 13px;
    color: var(--ca-text-secondary);
    line-height: 1.5;
}
.ca-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

/* ===== PADRONIZAÇÃO: TABELAS ===== */
.ca-table-wrap {
    overflow-x: auto;
    border-radius: var(--ca-radius);
    border: 1px solid var(--ca-border);
}
.ca-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.ca-table thead {
    background: #f1f5f9;
}
.ca-table th {
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--ca-text);
    border-bottom: 2px solid var(--ca-border);
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ca-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--ca-border);
    color: var(--ca-text-secondary);
    vertical-align: middle;
}
.ca-table tbody tr:hover {
    background: #f8fafc;
}
.ca-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== PADRONIZAÇÃO: FORMULÁRIOS ===== */
.ca-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.ca-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ca-form-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--ca-text-secondary);
}
.ca-form-group label .required {
    color: #ef4444;
}
.ca-form-group input,
.ca-form-group select,
.ca-form-group textarea {
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--ca-border);
    border-radius: var(--ca-radius-sm);
    font-size: 13px;
    color: var(--ca-text);
    background: #fff;
    transition: border-color var(--ca-transition);
    outline: none;
    font-family: var(--ca-font);
}
.ca-form-group input:focus,
.ca-form-group select:focus,
.ca-form-group textarea:focus {
    border-color: var(--ca-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.ca-form-group textarea {
    height: auto;
    padding: 8px 10px;
    resize: vertical;
}
.ca-form-group .ca-error {
    font-size: 11px;
    color: #ef4444;
    margin: 0;
}

/* ===== PADRONIZAÇÃO: BOTÕES ===== */
.ca-btn-action {
    height: 34px;
    padding: 0 16px;
    border-radius: var(--ca-radius-sm);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--ca-border);
    background: #fff;
    color: var(--ca-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--ca-transition);
    white-space: nowrap;
    text-decoration: none;
    font-family: var(--ca-font);
}
.ca-btn-action:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.ca-btn-primary {
    background: var(--ca-primary);
    border-color: var(--ca-primary);
    color: #fff;
}
.ca-btn-primary:hover {
    background: var(--ca-primary-light);
    border-color: var(--ca-primary-light);
    color: #fff;
}
.ca-btn-sm {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
}
.ca-btn-icon {
    width: 34px;
    padding: 0;
    justify-content: center;
}
.ca-btn-icon.ca-btn-sm {
    width: 28px;
}

/* ===== BADGES SEMÂNTICOS ===== */
.ca-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
}
.ca-badge-success {
    background: #dbeafe;
    color: #1e40af;
}
.ca-badge-warning {
    background: #fef3c7;
    color: #92400e;
}
.ca-badge-danger {
    background: #fce4ec;
    color: #b71c1c;
}
.ca-badge-info {
    background: #dbeafe;
    color: #1e40af;
}
.ca-badge-neutral {
    background: #f1f5f9;
    color: #475569;
}

/* ===== TAGS DE STATUS ===== */
.ca-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ===== CENTRAL DE TAREFAS COMPACTA ===== */
.ca-tarefas {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ca-tarefas .ca-tarefa-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--ca-card-bg);
    border: 1px solid var(--ca-border);
    border-radius: var(--ca-radius-sm);
    transition: all var(--ca-transition);
}
.ca-tarefas .ca-tarefa-item:hover {
    border-color: var(--ca-primary-light);
    box-shadow: var(--ca-shadow);
}
.ca-tarefas .ca-tarefa-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.ca-tarefas .ca-tarefa-info {
    flex: 1;
    min-width: 0;
}
.ca-tarefas .ca-tarefa-info .ca-tarefa-titulo {
    font-size: 13px;
    font-weight: 500;
    color: var(--ca-text);
}
.ca-tarefas .ca-tarefa-info .ca-tarefa-desc {
    font-size: 11px;
    color: var(--ca-text-secondary);
}
.ca-tarefas .ca-tarefa-action {
    flex-shrink: 0;
}

/* ===== PROGRESS BAR ===== */
.ca-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ca-text-secondary);
}
.ca-progress .ca-progress-bar {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 100px;
    overflow: hidden;
}
.ca-progress .ca-progress-bar .ca-progress-fill {
    height: 100%;
    border-radius: 100px;
    background: var(--ca-primary);
    transition: width 0.4s ease;
}

/* ===== EMPTY STATE ===== */
.ca-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    color: var(--ca-text-secondary);
}
.ca-empty .ca-empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.3;
}
.ca-empty .ca-empty-text {
    font-size: 14px;
    font-weight: 500;
}
.ca-empty .ca-empty-sub {
    font-size: 12px;
    margin-top: 4px;
}

/* ===== SCROLLBAR PADRONIZADA ===== */
#modalSocio .ca-body,
#modalSocio .ca-sidebar {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
#modalSocio .ca-body::-webkit-scrollbar,
#modalSocio .ca-sidebar::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
#modalSocio .ca-body::-webkit-scrollbar-track,
#modalSocio .ca-sidebar::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 100px;
}
#modalSocio .ca-body::-webkit-scrollbar-thumb,
#modalSocio .ca-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 100px;
    border: 3px solid transparent;
    background-clip: content-box;
    min-height: 40px;
}
#modalSocio .ca-body::-webkit-scrollbar-thumb:hover,
#modalSocio .ca-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
    border: 3px solid transparent;
    background-clip: content-box;
}

/* ===== GRID RESPONSIVO ===== */
.ca-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.ca-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}
.ca-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

/* ===== TRANSIÇÃO DE CONTEÚDO ===== */
.ca-content .ca-body {
    animation: caFadeIn 0.2s ease;
}
@keyframes caFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== OVERLAY DE CARREGAMENTO ===== */
.ca-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--ca-text-secondary);
    font-size: 13px;
    gap: 8px;
}

/* ===== HEADER FIXO COM SOMBRA ===== */
#modalSocio .ca-assoc-header {
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    z-index: 10;
}
#modalSocio .ca-sidebar {
    z-index: 5;
}
