:root {
    --primary-color: #007bff;
    --primary-color-dark: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --text-color: #212529;
    --background-color: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #f0f0f1;
    color: var(--text-color);
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    position: relative;
    min-height: 100vh;
}

/* Sidebar */
#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: var(--dark-color);
    color: #fff;
    transition: all 0.3s;
    position: fixed;
    height: 100vh;
    z-index: 999;
    left: 0;
    top: 0;
}

#sidebar.active {
    margin-left: -250px;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    text-align: center;
}

#sidebar .sidebar-header h3 {
    margin: 0;
    font-size: 1.5em;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li a {
    padding: 10px 20px;
    font-size: 1.1em;
    display: block;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

#sidebar ul li a:hover {
    background: rgba(255, 255, 255, 0.1);
}

#sidebar ul li.active > a {
    background: var(--primary-color);
}

#sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Content */
#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    margin-left: 250px;
    background: var(--background-color);
    position: relative;
}

#content.active {
    margin-left: 0;
}

/* Navbar */
.navbar {
    padding: 15px 10px;
    background: #fff;
    border: none;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .btn-info {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.navbar .btn-info:hover {
    background: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Logo no cabeçalho */
.header-logo {
    max-height: 80px;
    max-width: 220px;
    margin: 20px auto 18px auto;
    display: block;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
}

.card-body {
    padding: 20px;
}

/* Tabelas */
.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    vertical-align: top;
    border-top: 1px solid var(--border-color);
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid var(--border-color);
    background: var(--light-color);
}

.table tbody + tbody {
    border-top: 2px solid var(--border-color);
}

/* Status badges */
.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.status-ativo {
    background: var(--success-color);
    color: white;
}

.status-inativo {
    background: var(--danger-color);
    color: white;
}

/* Botões de ação */
.action-buttons {
    display: flex;
    gap: 5px;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

/* Responsividade */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 9999;
        box-shadow: none;
    }

    #sidebar.mobile-active {
        margin-left: 0;
        box-shadow: 0 0 15px rgba(0,0,0,0.2);
    }

    #content {
        margin-left: 0 !important;
        width: 100%;
        position: relative;
        z-index: 1;
        min-height: 100vh;
    }

    .navbar {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #fff;
    }

    .content-wrapper {
        position: relative;
        z-index: 1;
        padding: 20px;
    }

    .user-info {
        font-size: 0.9rem;
    }

    #mobileMenuToggle {
        display: block !important;
        margin-right: 10px;
        position: relative;
        z-index: 2;
    }

    #sidebarCollapse {
        display: none !important;
    }
}

@media (max-width: 500px) {
    .table {
        min-width: 400px;
        font-size: 0.92em;
    }
    .page-header h2, .page-title {
        font-size: 1.1em;
    }
    .btn, .btn-add, .btn-action {
        font-size: 0.98em;
        padding: 10px 0;
    }
}

/* Tabela estilo mobile: células empilhadas (opcional, para tabelas críticas) */
@media (max-width: 600px) {
    .table thead {
        display: none;
    }
    .table, .table tbody, .table tr, .table td {
        display: block;
        width: 100%;
    }
    .table tr {
        margin-bottom: 18px;
        border-bottom: 2px solid var(--border-color);
        box-shadow: 0 1px 4px rgba(0,0,0,0.04);
        border-radius: 8px;
        background: #fff;
        padding: 8px 0;
    }
    .table td {
        text-align: left;
        padding: 8px 12px;
        position: relative;
    }
    .table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #888;
        display: block;
        margin-bottom: 2px;
        font-size: 0.95em;
    }
    .content-wrapper {
        padding: 8px 2px;
    }
    .card {
        width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden;
    }
    .action-buttons {
        flex-direction: column !important;
        gap: 6px !important;
        width: 100% !important;
    }
    .action-buttons .btn, .action-buttons a, .action-buttons button {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
    .table {
        width: 100% !important;
        min-width: 0 !important;
        overflow-x: auto;
        display: block;
    }
    body, html {
        overflow-x: hidden !important;
    }
}

/* Animações */
.fade-enter {
    opacity: 0;
}

.fade-enter-active {
    opacity: 1;
    transition: opacity 300ms;
}

.fade-exit {
    opacity: 1;
}

.fade-exit-active {
    opacity: 0;
    transition: opacity 300ms;
}

/* Welcome Section */
.welcome-section {
    padding: 30px;
    background: #fff;
    border-radius: 5px;
    margin: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.welcome-section h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Buttons */
.btn {
    padding: 8px 15px;
    border-radius: 3px;
    transition: all 0.3s;
}

.btn-danger {
    background: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

/* --- CSS customizado da página residentes/lista.php --- */
.content-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px 8px;
    box-sizing: border-box;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-add {
    background: var(--primary-color);
    color: white;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,123,255,0.08);
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-add:hover {
    background: var(--primary-color-dark);
    box-shadow: 0 4px 16px rgba(0,123,255,0.12);
    color: white;
}

.table-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 18px 14px;
    font-size: 1.05em;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: #f4f6fb;
    font-weight: 700;
}

.table tr {
    transition: background 0.2s;
}

.table tr:hover {
    background: #f0f4fa;
}

.btn-action {
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    margin-right: 5px;
}

.btn-edit {
    background: #28a745;
    color: white;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-action:hover {
    opacity: 0.9;
    color: white;
}

.btn-action i {
    color: white !important;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-ativo {
    background: #d4edda;
    color: #155724;
}

.status-inativo {
    background: #f8d7da;
    color: #721c24;
}

.btn-print {
    background: #6c757d;
    color: white;
}

.btn-print:hover {
    background: #495057;
    color: white;
}

/* --- MELHORIAS VISUAIS ILPI MANAGER --- */

/* Campo de busca centralizado e clean */
.search-box {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 24px auto;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 10px 18px;
    border: 1px solid var(--border-color);
}

.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1rem;
    background: transparent;
}

.search-box i {
    color: var(--secondary-color);
    margin-right: 10px;
    font-size: 1.2em;
}

/* Rodapé centralizado e discreto */
.footer {
    text-align: center;
    color: #888;
    font-size: 0.95em;
    margin-top: 40px;
    padding: 18px 0 8px 0;
    background: transparent;
}

.footer a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Espaçamento e sombras suaves */
.table-container, .card {
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    border-radius: 12px;
}

/* Ajuste de fontes e títulos */
.page-header h2, .page-title {
    font-size: 2.1em;
    font-weight: 700;
    color: #222;
    margin-bottom: 0;
}

/* --- RESPONSIVIDADE MOBILE ILPI MANAGER --- */
@media (max-width: 992px) {
    #sidebar {
        margin-left: -250px !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100vh !important;
        width: 250px !important;
        z-index: 1200 !important;
        background: var(--dark-color) !important;
        transition: margin-left 0.3s !important;
        box-shadow: 0 0 15px rgba(0,0,0,0.2) !important;
    }
    #sidebar.mobile-active {
        margin-left: 0 !important;
        z-index: 1200 !important;
    }
    #sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.35);
        z-index: 1199 !important;
    }
    #sidebar.mobile-active ~ #sidebar-overlay {
        display: block !important;
    }
    .menu-btn {
        z-index: 1300 !important;
        position: relative;
    }
    #content {
        margin-left: 0 !important;
        width: 100% !important;
        position: relative !important;
        z-index: 1 !important;
        min-height: 100vh !important;
        overflow-x: hidden !important;
    }
    body, html {
        overflow-x: hidden !important;
    }
}

/* Sidebar recolhível no desktop */
@media (min-width: 769px) {
    #sidebar.collapsed {
        min-width: 60px;
        max-width: 60px;
        overflow-x: hidden;
        transition: all 0.3s;
    }
    #sidebar.collapsed .sidebar-header h3,
    #sidebar.collapsed ul.components li a span,
    #sidebar.collapsed .sidebar-header img {
        display: none !important;
    }
    #content.collapsed {
        margin-left: 60px !important;
        transition: all 0.3s;
    }
    .content-wrapper {
        max-width: 1200px;
        padding: 32px 24px;
    }
}

#sidebarCollapse {
    position: relative;
    margin-left: 250px;
    margin-top: 10px;
    z-index: 1100;
    background: #2ee0e0;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: margin-left 0.3s;
    display: inline-block;
}

.content-wrapper, .content-wrapper * {
    box-sizing: border-box;
    max-width: 100%;
    word-break: break-word;
}

/* --- BOTÃO MENU MODERNO --- */
.menu-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.2s, box-shadow 0.2s;
    cursor: pointer;
    padding: 0;
    margin: 0 10px 0 0;
}
.menu-btn:hover, .menu-btn:focus {
    background: var(--primary-color-dark);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.menu-btn i {
    font-size: 22px;
    color: #fff;
}

/* Ajuste para o botão no mobile */
@media (max-width: 992px) {
    .menu-btn {
        margin: 0 8px 0 0;
        width: 42px;
        height: 42px;
    }
}

/* Esconde botões antigos para evitar conflito visual */
#sidebarCollapse, #mobileMenuToggle {
    display: none !important;
}

/* Overlay para menu mobile */
#sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.35);
    z-index: 998;
    transition: opacity 0.2s;
}
#sidebar.mobile-active + #sidebar-overlay {
    display: block;
}

@media (max-width: 992px) {
    #sidebar {
        margin-left: -250px !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100vh !important;
        width: 250px !important;
        z-index: 1200 !important;
        background: var(--dark-color) !important;
        transition: margin-left 0.3s !important;
        box-shadow: 0 0 15px rgba(0,0,0,0.2) !important;
    }
    #sidebar.mobile-active {
        margin-left: 0 !important;
        z-index: 1200 !important;
    }
    #content {
        margin-left: 0 !important;
        width: 100% !important;
        position: relative !important;
        z-index: 1 !important;
        min-height: 100vh !important;
        overflow-x: hidden !important;
    }
    .navbar {
        position: sticky;
        top: 0;
        z-index: 1200;
        background: #fff;
    }
    .menu-btn {
        z-index: 1300 !important;
        position: relative;
    }
    #sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.35);
        z-index: 1199 !important;
    }
    #sidebar.mobile-active ~ #sidebar-overlay {
        display: block !important;
    }
}

/* --- MENU HAMBURGUER CUSTOMIZADO --- */
.custom-hamburger {
  background: #0084ff !important;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  cursor: pointer;
  padding: 0;
}

.custom-hamburger .hamburger-line {
  display: block;
  width: 26px;
  height: 4px;
  background: #fff;
  border-radius: 2px;
  margin: 3px 0;
  transition: all 0.3s;
}

.menu-btn,
.menu-btn:focus,
.menu-btn:active,
.custom-hamburger,
.custom-hamburger:focus,
.custom-hamburger:active,
.menu-btn svg,
.menu-btn svg:focus,
.menu-btn svg:active {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

.menu-btn:focus-visible,
.custom-hamburger:focus-visible,
.menu-btn svg:focus-visible {
  outline: none !important;
}

button.menu-btn,
button.menu-btn:focus,
button.menu-btn:active,
button.menu-btn:focus-visible,
button.menu-btn:visited,
button.menu-btn:target,
button.menu-btn:focus-within,
button.menu-btn::-moz-focus-inner,
.custom-hamburger,
.custom-hamburger:focus,
.custom-hamburger:active,
.custom-hamburger:focus-visible,
.custom-hamburger:visited,
.custom-hamburger:target,
.custom-hamburger:focus-within,
.custom-hamburger::-moz-focus-inner {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  background-clip: padding-box !important;
} 