body.log {
    min-height: 100vh;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #833F91 0%, #5d2d68 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c2133;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 32px 16px;
}

.login-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 45px rgba(20, 8, 30, 0.25);
    padding: 40px 36px 48px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 1px solid rgba(131, 63, 145, 0.25);
    pointer-events: none;
}

.login-brand {
    text-align: center;
    margin-bottom: 32px;
}

.login-brand img {
    width: 200px;
    height: auto;
    margin-bottom: 16px;
}

.login-brand h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #411b4a;
}

.login-brand p {
    margin: 6px 0 0;
    font-size: 14px;
    color: #7a6c8d;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: #5d2d68;
    margin-bottom: 8px;
}

.login-form .form-control {
    background-color: #f7f4f9;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    color: #2c2133;
    transition: border 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.login-form .form-control:focus {
    background-color: #ffffff;
    border-color: #833F91;
    box-shadow: 0 0 0 3px rgba(131, 63, 145, 0.18);
    outline: none;
}

.login-form .form-control::placeholder {
    color: #a89cb3;
}

.btn-login {
    width: 100%;
    padding: 14px 16px;
    background: #833F91;
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-login:hover {
    background: #73367f;
    box-shadow: 0 12px 24px rgba(131, 63, 145, 0.35);
    transform: translateY(-2px);
}

.btn-login:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(131, 63, 145, 0.3);
}

.alert-error {
    background: rgba(255, 90, 95, 0.12);
    border-left: 4px solid #ff5a5f;
    border-radius: 12px;
    padding: 12px 16px;
    color: #b03b40;
    font-size: 14px;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px 40px;
    }

    .login-brand h1 {
        font-size: 24px;
    }
}

/* ============================================
   BACKOFFICE MODERN DESIGN
   ============================================ */

/* Layout Principal */
body.backoffice {
    font-family: 'Roboto', sans-serif;
    background: #f5f7fa;
    margin: 0;
    padding: 0;
    color: #2c2133;
}

.backoffice-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f5f5f5;
}

body.backoffice {
    background: #f5f5f5;
}

/* Sidebar */
.backoffice-sidebar {
    width: 240px;
    background: linear-gradient(180deg, #833F91 0%, #5d2d68 100%);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    transition: all 0.3s ease;
}

.backoffice-sidebar.collapsed {
    width: 70px;
}

.backoffice-sidebar.collapsed .sidebar-brand {
    padding: 20px 10px;
}

.backoffice-sidebar.collapsed .sidebar-brand img {
    max-width: 50px;
    margin-bottom: 0;
}

.backoffice-sidebar.collapsed .sidebar-nav span {
    display: none;
}

.backoffice-sidebar.collapsed .sidebar-nav a {
    justify-content: center;
    padding: 14px;
}

.backoffice-sidebar.collapsed .sidebar-nav a i {
    margin-right: 0;
}

.backoffice-sidebar.collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

.backoffice-sidebar::-webkit-scrollbar {
    width: 6px;
}

.backoffice-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.backoffice-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.backoffice-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Logo/Brand na Sidebar */
.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    position: relative;
}

.sidebar-toggle-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-toggle-btn i {
    transition: transform 0.3s ease;
}

.sidebar-brand img {
    max-width: 180px;
    height: auto;
    margin-bottom: 8px;
}

.sidebar-brand h1 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Menu Navigation */
.sidebar-nav {
    padding: 16px 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 4px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-left-color: rgba(255, 255, 255, 0.5);
}

.sidebar-nav li.active > a {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-left-color: #ffffff;
    font-weight: 600;
}

.sidebar-nav a i {
    width: 24px;
    margin-right: 12px;
    font-size: 18px;
    text-align: center;
    flex-shrink: 0;
}

.backoffice-sidebar.collapsed .sidebar-nav a {
    justify-content: center;
    padding: 14px;
}

.backoffice-sidebar.collapsed .sidebar-nav a i {
    margin-right: 0;
    width: auto;
}

/* User Section na Sidebar */
.sidebar-user {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-user a {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.sidebar-user a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.sidebar-user a i {
    margin-right: 10px;
    font-size: 16px;
}

/* Main Content Area */
.backoffice-main {
    flex: 1;
    margin-left: 240px;
    background: #f5f5f5;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.backoffice-sidebar.collapsed ~ .backoffice-main {
    margin-left: 70px;
}

/* Top Header */
.backoffice-header {
    background: #ffffff;
    padding: 0 32px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c2133;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Notifications */
.notification-bell {
    position: relative;
    color: #5d2d68;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.notification-bell:hover {
    background: #f7f4f9;
}

/* Header Icon Button (Logout) */
.header-icon-btn {
    color: #5d2d68;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-icon-btn:hover {
    background: #f7f4f9;
    color: #5d2d68;
    text-decoration: none;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ff5a5f;
    color: #ffffff;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

/* Dropdown Notifications */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.notification-dropdown.show {
    display: block;
}

.notification-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    color: #2c2133;
    font-size: 14px;
}

.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: background 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.notification-item:hover {
    background: #f7f4f9;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f7f4f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon img {
    width: 24px;
    height: 24px;
}

.notification-icon i {
    font-size: 20px;
    color: #833F91;
}

.notification-content {
    flex: 1;
}

.notification-type {
    font-weight: 600;
    color: #5d2d68;
    font-size: 14px;
    margin-bottom: 4px;
}

.notification-date {
    font-size: 12px;
    color: #8a8a8a;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: #6a6a6a;
}

/* Content Area */
.backoffice-content {
    padding: 32px;
}

/* Page Header com Botões */
.page-header-section {
    margin-bottom: 32px;
}

.page-header-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c2133;
    margin: 0 0 24px 0;
}

.page-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.btn-modern {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-modern-primary {
    background: #833F91;
    color: #ffffff;
}

.btn-modern-primary:hover {
    background: #73367f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(131, 63, 145, 0.3);
    color: #ffffff;
}

.btn-modern-success {
    background: #28a745;
    color: #ffffff;
}

.btn-modern-success:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    color: #ffffff;
}

.btn-modern-info {
    background: #17a2b8;
    color: #ffffff;
}

.btn-modern-info:hover {
    background: #138496;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
    color: #ffffff;
}

.btn-modern-purple {
    background: #833F91;
    color: #ffffff;
}

.btn-modern-purple:hover {
    background: #73367f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(131, 63, 145, 0.3);
    color: #ffffff;
    text-decoration: none;
}

/* Cards de Estatísticas */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.stat-card-link {
    text-decoration: none;
    display: block;
}

.stat-card-link:hover {
    text-decoration: none;
}

.stat-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    border-left: 3px solid #833F91;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.stat-card-number {
    font-size: 16px;
    font-weight: 700;
    color: #2c2133;
    margin: 0;
    transition: color 0.2s ease;
}

.stat-card-icon {
    font-size: 16px;
    color: #833F91;
    opacity: 0.8;
    transition: color 0.2s ease;
}

.stat-card-label {
    font-size: 12px;
    color: #6a6a6a;
    font-weight: 500;
    margin: 0;
    transition: color 0.2s ease;
}

/* Hover com cor de fundo da borda */
.stat-card.warning {
    border-left-color: #ffc107;
}

.stat-card.warning:hover {
    background: #ffc107;
}

.stat-card.warning:hover .stat-card-number,
.stat-card.warning:hover .stat-card-label {
    color: #ffffff;
}

.stat-card.warning:hover .stat-card-icon {
    color: #ffffff;
    opacity: 1;
}

.stat-card.warning .stat-card-icon {
    color: #ffc107;
}

.stat-card.success {
    border-left-color: #28a745;
}

.stat-card.success:hover {
    background: #28a745;
}

.stat-card.success:hover .stat-card-number,
.stat-card.success:hover .stat-card-label {
    color: #ffffff;
}

.stat-card.success:hover .stat-card-icon {
    color: #ffffff;
    opacity: 1;
}

.stat-card.success .stat-card-icon {
    color: #28a745;
}

.stat-card.danger {
    border-left-color: #dc3545;
}

.stat-card.danger:hover {
    background: #dc3545;
}

.stat-card.danger:hover .stat-card-number,
.stat-card.danger:hover .stat-card-label {
    color: #ffffff;
}

.stat-card.danger:hover .stat-card-icon {
    color: #ffffff;
    opacity: 1;
}

.stat-card.danger .stat-card-icon {
    color: #dc3545;
}

.stat-card.info {
    border-left-color: #17a2b8;
}

.stat-card.info:hover {
    background: #17a2b8;
}

.stat-card.info:hover .stat-card-number,
.stat-card.info:hover .stat-card-label {
    color: #ffffff;
}

.stat-card.info:hover .stat-card-icon {
    color: #ffffff;
    opacity: 1;
}

.stat-card.info .stat-card-icon {
    color: #17a2b8;
}

/* Default hover para cards sem classe específica */
.stat-card:not(.warning):not(.success):not(.danger):not(.info):hover {
    background: #833F91;
}

.stat-card:not(.warning):not(.success):not(.danger):not(.info):hover .stat-card-number,
.stat-card:not(.warning):not(.success):not(.danger):not(.info):hover .stat-card-label {
    color: #ffffff;
}

.stat-card:not(.warning):not(.success):not(.danger):not(.info):hover .stat-card-icon {
    color: #ffffff;
    opacity: 1;
}

/* Filter Form Styles */
.custom-filter-wrapper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.custom-filter-content {
    padding: 20px;
}

.filter-form {
    width: 100%;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.filter-field {
    flex: 1;
    min-width: 200px;
}

/* Campo Registado com largura limitada */
.filter-field.filter-field-limited {
    flex: 0 0 auto !important;
    max-width: 400px !important;
    min-width: 300px !important;
}

.filter-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #5d2d68;
    margin-bottom: 8px;
}

.filter-field label i {
    margin-right: 6px;
    color: #833F91;
}

.filter-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #2c2133;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    height: 42px !important;
    line-height: 22px;
}

/* Select2 dentro do filtro - garantir altura consistente */
.custom-filter-wrapper .select2-container {
    width: 100% !important;
}

.custom-filter-wrapper .select2-container .select2-selection--single {
    height: 42px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
}

.custom-filter-wrapper .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 42px !important;
    padding-left: 12px !important;
    padding-right: 20px !important;
}

.custom-filter-wrapper .select2-container .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
    right: 8px !important;
    top: 1px !important;
}

/* Inputs de data */
input[type="date"].filter-input {
    padding-right: 10px;
}

/* Selects normais */
select.filter-input:not(.select2-hidden-accessible) {
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.filter-input:focus {
    outline: none;
    border-color: #833F91;
    box-shadow: 0 0 0 3px rgba(131, 63, 145, 0.1);
}

.filter-input::placeholder {
    color: #999;
}

.filter-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-filter {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-filter i {
    font-size: 14px;
}

.btn-filter-primary {
    background: #833F91;
    color: #ffffff;
}

.btn-filter-primary:hover {
    background: #6a2f75;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(131, 63, 145, 0.3);
}

.btn-filter-secondary {
    background: #f7f4f9;
    color: #5d2d68;
}

.btn-filter-secondary:hover {
    background: #e8e0ed;
    color: #5d2d68;
    text-decoration: none;
}

/* Ocultar botão padrão do Grocery CRUD */
.add-anchor.add_button,
a.add-anchor.add_button {
    display: none !important;
}

/* Table Container */
.table-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Grocery CRUD Table Styling */
.gc-container {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

.gc-container table {
    margin-bottom: 0;
}

.gc-container .table {
    border-collapse: separate;
    border-spacing: 0;
}

.gc-container .table thead th {
    background: #f7f4f9;
    color: #5d2d68;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    padding: 16px;
}

.gc-container .table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.gc-container .table tbody tr:hover {
    background: #f7f4f9;
}

/* Action Buttons */
.gc-container .btn {
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.gc-container .btn-primary {
    background: #833F91;
    border-color: #833F91;
}

.gc-container .btn-primary:hover {
    background: #73367f;
    border-color: #73367f;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(131, 63, 145, 0.3);
}

.gc-container .btn-success {
    background: #28a745;
    border-color: #28a745;
}

.gc-container .btn-danger {
    background: #dc3545;
    border-color: #dc3545;
}

.gc-container .btn-warning {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

/* Pagination */
.pagination {
    margin: 20px 0;
}

.pagination > li > a,
.pagination > li > span {
    color: #833F91;
    border-color: #e0e0e0;
    border-radius: 6px;
    margin: 0 4px;
}

.pagination > li > a:hover,
.pagination > li > span:hover {
    background: #f7f4f9;
    border-color: #833F91;
    color: #73367f;
}

.pagination > .active > a,
.pagination > .active > span {
    background: #833F91;
    border-color: #833F91;
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 10px 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #833F91;
    box-shadow: 0 0 0 3px rgba(131, 63, 145, 0.1);
    outline: none;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 14px 18px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Responsive */
@media (max-width: 768px) {
    .backoffice-sidebar {
        transform: translateX(-100%);
    }

    .backoffice-sidebar.mobile-open {
        transform: translateX(0);
    }

    .backoffice-main {
        margin-left: 0 !important;
    }
    
    .backoffice-sidebar.collapsed ~ .backoffice-main {
        margin-left: 0 !important;
    }

    .backoffice-header {
        padding: 0 16px;
    }

    .backoffice-content {
        padding: 16px;
    }

    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stat-card {
        padding: 10px;
    }
    
    .stat-card-number {
        font-size: 14px;
    }
    
    .stat-card-icon {
        font-size: 14px;
    }
    
    .stat-card-label {
        font-size: 10px;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-field {
        min-width: 100%;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .btn-filter {
        width: 100%;
        justify-content: center;
    }
    
    .page-actions {
        flex-direction: column;
    }
    
    .btn-modern {
        width: 100%;
        text-align: center;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: #833F91;
    color: #ffffff;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* Overlay para mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

/* ============================================
   READ PAGES TABLE STYLING
   Baseado no flexigrid.css para consistência
   ============================================ */

/* Container de tabelas nas páginas read/ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Estilização moderna das tabelas nas páginas read/ */
.table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-family: "Roboto", "Open Sans", sans-serif;
    font-size: 14px;
    color: #2c2133;
    background: #ffffff;
}

/* Cabeçalho das tabelas - estilo flexigrid */
.table thead th {
    background: #833F91;
    color: #ffffff;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 8px 10px !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 0px !important;
    text-align: left;
    vertical-align: middle;
    position: relative;
    overflow: hidden;
    height: 36px;
}

.table thead th:first-child {
    border-top-left-radius: 8px;
}

.table thead th:last-child {
    border-top-right-radius: 8px;
    border-right: none;
}

/* Células do corpo da tabela */
.table tbody td {
    padding: 8px 10px !important;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f5f5f5;
    font-size: 12px;
    color: #2c2133;
    line-height: 1.4;
    vertical-align: middle;
}

.table tbody td:last-child {
    border-right: none;
}

/* Linhas alternadas (striped) */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafafa;
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: #ffffff;
}

/* Bordas nas tabelas */
.table-bordered {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.table-bordered thead th {
    border-bottom: 0px !important;
}

.table-bordered tbody td {
    border: 1px solid #f0f0f0;
}

.table-bordered tbody tr:last-child td {
    border-bottom: none;
}

/* Hover effect nas linhas */
.table-hover tbody tr {
    transition: all 0.15s ease;
}

.table-hover tbody tr:hover {
    background: #f7f4f9 !important;
    border-left: 2px solid #833F91;
    cursor: pointer;
}

.table-hover tbody tr:hover td {
    border-left-color: transparent;
}

/* Linha selecionada */
.table tbody tr.trSelected,
.table tbody tr.trSelected:hover {
    background: #e8e0eb !important;
    border-left: 2px solid #833F91;
}

/* Labels dentro das tabelas */
.table .label {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.table .label-warning {
    background-color: #ffc107;
    color: #212529;
}

.table .label-warning:hover {
    background-color: #e0a800;
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.table .label-danger {
    background-color: #dc3545;
    color: #ffffff;
}

.table .label-danger:hover {
    background-color: #c82333;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.table .label-sm {
    padding: 3px 6px;
    font-size: 10px;
}

/* Links dentro das tabelas */
.table a {
    color: #833F91;
    text-decoration: none;
    transition: color 0.15s ease;
}

.table a:hover {
    color: #5d2d68;
    text-decoration: underline;
}

.table a i {
    margin-right: 4px;
}

/* Ícones de ação nas tabelas */
.table .fa-download,
.table .fa-check,
.table .fa-edit,
.table .fa-pencil,
.table .fa-trash {
    color: #833F91;
    transition: all 0.15s ease;
    padding: 4px 6px;
    border-radius: 4px;
    background: #f7f4f9;
    font-size: 14px !important;
}

.table .fa-download:hover {
    background-color: #833F91;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(131, 63, 145, 0.3);
}

.table .fa-check:hover {
    background-color: #5bb75b;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(91, 183, 91, 0.3);
}

/* Inputs e selects dentro das tabelas */
.table input[type="text"],
.table input[type="number"],
.table input[type="date"],
.table select,
.table textarea {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    background: #f7f4f9;
    font-size: 12px;
    color: #2c2133;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.table input[type="text"]:focus,
.table input[type="number"]:focus,
.table input[type="date"]:focus,
.table select:focus,
.table textarea:focus {
    border-color: #833F91;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(131, 63, 145, 0.1);
    outline: none;
}

/* Checkboxes dentro das tabelas */
.table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #833F91;
}

/* Botões dentro das tabelas */
.table .btn,
.table button {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.table .btn-modern {
    padding: 6px 12px;
    font-size: 12px;
}

/* Alerts dentro das tabelas ou próximos */
.table-container + .alert,
.panel-body .alert {
    margin-top: 15px;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
}

/* Responsive para tabelas */
@media (max-width: 768px) {
    .table {
        font-size: 11px;
    }
    
    .table thead th {
        padding: 6px 8px !important;
        font-size: 10px !important;
        height: 32px !important;
    }
    
    .table tbody td {
        padding: 6px 8px !important;
        font-size: 11px !important;
    }
    
    .table-responsive {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }
}

/* Estilos para botões btn-modern-danger e btn-modern-warning */
.btn-modern-danger {
    background: #dc3545;
    color: #ffffff;
}

.btn-modern-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    color: #ffffff;
    text-decoration: none;
}

.btn-modern-warning {
    background: #ffc107;
    color: #212529;
}

.btn-modern-warning:hover {
    background: #e0a800;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    color: #212529;
    text-decoration: none;
}

.btn-modern-secondary {
    background: #6c757d;
    color: #ffffff;
}

.btn-modern-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    color: #ffffff;
    text-decoration: none;
}