html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #FFFFFF;
}

.page-container {
    margin-left: 250px;
    padding: 20px;
    min-height: 100vh;
    width: calc(100% - 250px);
    box-sizing: border-box;
}

.page-wrapper {
    padding-top: 10px;
    max-width: 100%;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #29285B;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #F4A02F;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-title .icon {
    font-size: 1.25rem;
}

.page-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #29285B;
    margin-bottom: 1rem;
}

.card-default {
    background-color: #ffffff;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.card-default:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.card-default .card-body {
    padding: 1.25rem;
}

.card-default .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #29285B;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-default .card-text {
    color: #29285B;
    line-height: 1.5;
    font-size: 0.9rem;
}

.card-toggle {
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-toggle:hover {
    transform: translateY(-2px);
}

.card-toggle .toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.card-toggle.expanded .toggle-icon {
    transform: rotate(180deg);
}

.card-toggle .card-content {
    display: none;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #d8d8e8;
}

.card-toggle.expanded .card-content {
    display: block;
}

.table-container {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    margin-bottom: 1.25rem;
}

.table-container .table {
    margin-bottom: 0;
}

.table-container .table thead th {
    background-color: #29285B;
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border: none;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-container .table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    color: #4a4a7a;
    font-size: 0.9rem;
}

.table-container .table tbody tr:hover {
    background-color: #FBE0BB !important;
}

.table-container .table tbody tr:nth-child(2n+1),
.table-container .table tbody tr:nth-of-type(2n+1) {
    background-color: #FBE0BB !important;
}

.table-container .table tbody tr:nth-child(2n+1):hover,
.table-container .table tbody tr:nth-of-type(2n+1):hover {
    background-color: #FBE0BB !important;
}

#tabela-contatos thead tr {
    background-color: #29285B !important;
    color: #fff !important;
}

#tabela-contatos thead tr>* {
    background-color: #29285B !important;
    color: #fff !important;
}

#tabela-contatos tbody tr:nth-child(2n+1) {
    background-color: #FBE0BB !important;
}

#tabela-contatos tbody tr:nth-child(2n+1)>* {
    --bs-table-accent-bg: transparent !important;
    background-color: transparent !important;
}

#tabela-contatos tr:nth-child(2n) {
    background-color: #fff !important;
}

#tabela-contatos tr:hover {
    background-color: #FBE0BB !important;
}

#tabela-contatos tr:nth-child(2n) {
    background-color: #fff !important;
}

#tabela-contatos tr:hover {
    background-color: #FBE0BB !important;
}

.table-container .table .actions {
    white-space: nowrap;
}

.form-container {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.form-container .form-label {
    font-weight: 600;
    color: #29285B;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-container .form-control,
.form-container .form-select {
    border: 1px solid #d8d8e8;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-container .form-control:focus,
.form-container .form-select:focus {
    border-color: #F4A02F;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
    outline: none;
}

.form-container textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-container .btn {
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.form-container .btn-primary {
    background-color: #F4A02F;
    border-color: #F4A02F;
}

.form-container .btn-primary:hover {
    background-color: #3182ce;
    border-color: #3182ce;
}

.search-container {
    margin-bottom: 1.25rem;
}

.search-container .form-control {
    border: 1px solid #d8d8e8;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-container .form-control:focus {
    border-color: #F4A02F;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

.alert-message {
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    border: none;
}

.alert-message.alert-success {
    background-color: #c6f6d5;
    color: #22543d;
}

.alert-message.alert-info {
    background-color: #bee3f8;
    color: #2a4365;
}

.alert-message.alert-warning {
    background-color: #fefcbf;
    color: #744210;
}

.alert-message.alert-danger {
    background-color: #fed7d7;
    color: #742a2a;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.cards-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.iframe-container {
    width: 100%;
    margin-bottom: 1.25rem;
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.iframe-container iframe {
    display: block;
    width: 100%;
}

.text-meta {
    font-size: 0.8rem;
    color: #8888a8;
    margin-top: 0.5rem;
}

.text-timestamp {
    font-size: 0.8rem;
    color: #a8a8c8;
    margin-top: 0.5rem;
}

.btn-sm-custom {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 0.375rem;
}

.attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #F4A02F;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.attachment-link:hover {
    text-decoration: underline;
}

.link-primary-custom {
    color: #F4A02F;
    text-decoration: none;
    font-weight: 500;
}

.link-primary-custom:hover {
    color: #d68f28;
    text-decoration: underline;
}

.login-body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #29285B;
    margin: 0;
    padding: 0;
}

.login-box {
    max-width: 400px;
    width: 100%;
    padding: 40px 30px;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 20px;
}

.login-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 25px;
    color: #29285B;
}

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
    margin-right: 0.25rem;
}

.action-icon:hover {
    background-color: #f4f4f8;
}

.action-icon.edit {
    color: #F4A02F;
}

.action-icon.delete {
    color: #e53e3e;
}

.action-icon.view {
    color: #48bb78;
}

@media (max-width: 768px) {
    .page-container {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 1.25rem;
    }
}

.menu-sidebar {
    width: 250px;
    background-color: #29285B;
    color: #fff;
    padding: 20px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1000;
}

.menu-sidebar.collapsed {
    overflow-y: hidden;
}

.menu-sidebar::-webkit-scrollbar {
    width: 6px;
}

.menu-sidebar::-webkit-scrollbar-track {
    background: #1e1e4a;
}

.menu-sidebar::-webkit-scrollbar-thumb {
    background: #F4A02F;
    border-radius: 3px;
}

.menu-sidebar a {
    color: #fff;
    text-decoration: none;
    padding: 8px 0;
    display: block;
    transition: all 0.2s ease-in-out;
    font-size: 0.9rem;
}

.menu-sidebar a:hover {
    background-color: #F4A02F;
    color: #29285B;
    border-radius: 4px;
    padding-left: 8px;
}

.menu-sidebar img.logo {
    width: 150px;
    height: auto;
    padding: 4px;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.menu-sidebar .nav-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    color: #F4A02F;
}

.menu-sidebar .menu-group-header {
    margin-top: 8px;
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.menu-sidebar .menu-group-header:hover {
    background-color: #3d3663;
}

.menu-sidebar .menu-group-header i:first-child {
    font-size: 1.1rem;
    color: #F4A02F;
}

.menu-sidebar .menu-group-header .bi-chevron-down,
.menu-sidebar .menu-group-header .bi-chevron-up {
    margin-left: auto;
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.menu-sidebar .menu-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 10px;
}

.menu-sidebar .menu-accordion-content a {
    color: #fff;
    text-decoration: none;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 2px 0;
    padding-left: 20px;
}

.menu-sidebar .menu-accordion-content a i {
    font-size: 0.9rem;
    color: #a8a8c8;
}

.menu-sidebar .menu-accordion-content a:hover {
    background-color: #F4A02F;
    color: #29285B;
    padding-left: 25px;
}

.menu-sidebar .menu-accordion-content a:hover i {
    color: #29285B;
}

.menu-sidebar .menu-search input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: none;
    outline: none;
    background-color: #1e1e4a;
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.menu-sidebar .menu-search input::placeholder {
    color: #a8a8c8;
}

.menu-sidebar .menu-search input:focus {
    background-color: #3d3663;
}

.mb-1\.25 {
    margin-bottom: 1.25rem;
}

.mt-1\.25 {
    margin-top: 1.25rem;
}

.w-full {
    width: 100%;
}

.text-muted-custom {
    color: #8888a8;
}

.text-gray-700 {
    color: #29285B;
}

.text-gray-600 {
    color: #4a4a7a;
}

.text-gray-500 {
    color: #8888a8;
}

@media (max-width: 768px) {
    .menu-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .menu-sidebar.mobile-open {
        transform: translateX(0);
    }

    .page-container.mobile-shifted {
        margin-left: 0;
        width: 100%;
    }
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive .table {
    min-width: 600px;
}

.table-responsive .table th,
.table-responsive .table td {
    white-space: nowrap;
    min-width: 100px;
}

.table-responsive .table th:first-child,
.table-responsive .table td:first-child {
    left: 0;
    background-color: #fff;
    z-index: 1;
}

.table-responsive .table thead th:first-child {
    background-color: #29285B;
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #e8e8f0;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #a8a8c8;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #F4A02F;
}
