.navbar-brand {
    margin-right: 1.25rem;
}

/* Custom styles layered on top of Tabler */
.navbar-brand-image {
    width: 32px;
    height: 32px;
    margin-right: 0.25rem;
    display: inline-block;
}

/* Navbar: reduzir espaçamento ícone-texto em 50% */
.navbar .nav-link-icon {
    margin-right: 0 !important;
    /* Tabler default ~0.5rem */
}

/* Keep the brand logo visible (and in color) when the theme switches to dark */
[data-bs-theme="dark"] .navbar-brand-autodark .navbar-brand-image {
    display: inline-block !important;
    filter: none !important;
}

/* Match the theme toggle button size to the header avatar */
#themeToggle.btn-icon {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
    line-height: 2rem;
    --tblr-btn-icon-size: 2rem;
    font-size: 1rem;
    padding: 0;
    border-radius: 0.375rem;
    /* alinhado ao avatar */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Normalize page headers across views */
.page-header {
    margin: 0 0 1.5rem 0 !important;
    padding: 0 !important;
}

.page-header .page-title {
    margin: 0;
}

.page-body .container-xl>div[class$="-container"] {
    padding: 0 !important;
}

/* Workspace logo preview */
.logo-preview {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 8px;
}

/* Landing page */
.landing-hero {
    position: relative;
}

.landing-hero-card {
    border: 0;
    background: linear-gradient(135deg, rgba(33, 95, 190, 0.95), rgba(90, 46, 184, 0.95));
    color: #fff;
    box-shadow: 0 24px 40px -30px rgba(0, 0, 0, 0.65);
}

.landing-title {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.landing-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.landing-section .section-title {
    font-size: 1.35rem;
    font-weight: 700;
}

.landing-features .landing-feature-card {
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.18);
    text-align: center;
}

.landing-features .landing-feature-card .card-body {
    padding: 1.5rem;
}

.landing-features .landing-feature-icon,
.landing-role-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1.75rem;
    /* maior ícone, mesmo box */
    line-height: 1;
}

/* Dashboard: ícones maiores sem alterar o box das avatars */
.dashboard-page .avatar i,
.backoffice-page .avatar i,
.admin-page .avatar i {
    font-size: 1.4rem;
    line-height: 1;
}

/* Ícones maiores para o atalho de usuários (sem alterar o box) */
.users-avatar i {
    font-size: 1.75rem;
    line-height: 1;
}

/* Usuários: ícones maiores nos cards do topo */
.users-stats-icon i {
    font-size: 1.6rem;
    line-height: 1;
}

/* Workspaces: ícones maiores nos cards do topo */
.workspace-stats-icon i {
    font-size: 1.6rem;
    line-height: 1;
}

/* Roles styling */
.role-card.card-inactive {
    opacity: 0.75;
}

.permission-card code {
    font-size: 0.8rem;
}

.permission-card .permission-meta {
    color: var(--bs-secondary-color, #6c757d);
}

/* User detail labels */
.detail-label {
    font-size: 0.85rem;
    color: var(--bs-secondary-color, #6c757d);
    margin-bottom: 2px;
}
.detail-value {
    font-weight: 600;
}

.landing-features .landing-feature-card .text-muted {
    color: rgba(255, 255, 255, 0.6);
}

.landing-role-icon {
    margin-right: 0.75rem;
    margin-bottom: 0;
}

.landing-hero .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.landing-hero .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* PWA Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #1f2937);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.08));
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-width: 400px;
    width: calc(100% - 40px);
    z-index: 2000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.install-prompt-actions {
    display: flex;
    gap: 0.5rem;
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ef4444;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 2000;
    font-weight: 600;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Logo upload and cropper styles */
.logo-upload-preview {
    position: relative;
    width: 140px;
    height: 140px;
    border: 1px dashed var(--bs-border-color, #cbd5e1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(17, 94, 247, 0.06), rgba(17, 94, 247, 0.02));
    cursor: pointer;
    transition: all 0.25s ease;
}

.logo-upload-preview:hover {
    border-color: var(--bs-primary, #206bc4);
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.12);
}

.logo-upload-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-upload-empty {
    text-align: center;
    color: var(--bs-secondary-color, #999);
}

.logo-upload-empty i {
    font-size: 24px;
    display: block;
    margin-bottom: 5px;
}

.logo-upload-empty small {
    font-size: 11px;
}

.logo-upload-helper {
    display: block;
    margin-top: 10px;
}

.cropper-modal-image {
    max-width: 100%;
    max-height: 400px;
}

.cropper-controls {
    margin-top: 20px;
}

.cropper-control-group {
    margin-bottom: 15px;
}

.cropper-control-label {
    margin-bottom: 10px;
}

.cropper-control-value {
    min-width: 40px;
}

.cropper-control-span {
    min-width: 60px;
}

.cropper-container {
    max-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bs-tertiary-bg, #f5f5f5);
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Install and offline indicators */
.install-prompt {
    display: none;
}

.offline-indicator {
    display: none;
}

@media print {
    .install-prompt,
    .offline-indicator {
        display: none;
    }
}

/* From module/Workspaces/view/workspaces/workspaces/view.phtml */
.cropper-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cropper-controls label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cropper-controls input[type="range"] {
    width: 150px;
}

/* Workspaces visual refresh */
.workspace-filter-card .card-body {
    padding-top: 1.25rem;
}

.workspace-table tbody tr.inactive {
    opacity: 0.65;
}

.workspace-table tbody tr.inactive .badge,
.workspace-table tbody tr.inactive .status {
    opacity: 1;
}

.workspace-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--bs-light, #f8f9fa);
    color: var(--bs-body-color, #1f2937);
    font-size: 0.875rem;
    border: 1px solid var(--bs-border-color, #e9ecef);
    white-space: nowrap;
}

.workspace-side-list li {
    margin-bottom: 10px;
    line-height: 1.4;
}

.workspace-expiring-card .list-group-item {
    border: 0;
    border-top: 1px solid var(--bs-border-color, #e9ecef);
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.workspace-impact-list li {
    margin-bottom: 6px;
}

.workspace-delete-card .card-status-top {
    height: 4px;
}