/* MaaP - Modern UI Styles */

:root {
    /* Paleta (jul/2026): azul mais profundo, sidebar quase-preta */
    --sidebar-bg: #12161f;
    --sidebar-hover: #1c2431;
    --sidebar-active: #2f6fb0;
    --primary-blue: #2f6fb0;
    --primary-blue-hover: #275c92;
    --bg-light: #f2f4f3;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-color: #e1e5e3;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --gold: #c9a227;
    --gold-soft: #e4c34f;
    /* Tipografia condensada: rótulos, títulos, cabeçalhos de tabela */
    --font-cond: 'Arial Narrow', 'Helvetica Neue Condensed', 'Roboto Condensed', sans-serif;
    /* Só os cards da Dashboard (números/rótulos de destaque) — ver dash-*/stat-* abaixo */
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Sidebar spacing calculations - FIXED HEIGHTS */
    --sidebar-logo-height: 96px;
    --sidebar-footer-height: 80px;
    --sidebar-nav-padding: 3rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* ========== SIDEBAR ========== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* Logo Section - FIXED HEIGHT */
.sidebar-logo {
    height: var(--sidebar-logo-height);
    min-height: var(--sidebar-logo-height);
    max-height: var(--sidebar-logo-height);
    /* 2rem = mesmo início horizontal dos itens do menu (1rem do .sidebar-nav + 1rem do .nav-link) */
    padding: 0 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    flex-shrink: 0;
}

.sidebar-logo-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    min-height: 40px;
    padding: 9px;
    box-sizing: border-box;
    flex-shrink: 0;
    background: linear-gradient(135deg, #2f6fb0 0%, #275c92 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.sidebar-logo-icon i {
    font-size: 22px;
    line-height: 1;
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 40px;
    gap: 2px;
}

.sidebar-logo-text h4 {
    color: white;
    font-size: 1.24rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.sidebar-logo-text small {
    color: #94a3b8;
    font-size: 0.76rem;
    line-height: 1;
    letter-spacing: 0.3px;
}

.maap-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.maap-logo-icon {
    font-size: 1.65rem;
    color: var(--primary-blue, #2f6fb0);
    line-height: 1;
}

.maap-logo-text {
    font-family: var(--font-cond);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
    line-height: 1;
}

/* Logo do app na sidebar */
.maap-logo-plano {
    height: auto;
    width: auto;
    max-width: 160px;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.maap-logo-dark .maap-logo-text {
    color: var(--text-dark);
}

/* Navigation Menu */
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    min-height: 0;
}

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

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

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.nav-item {
    /* No margin needed - using gap instead */
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    font-family: var(--font-cond);
    font-size: 1.045rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: var(--sidebar-hover);
    color: white;
}

.nav-link.active {
    background-color: var(--sidebar-active);
    color: white;
    box-shadow: 0 4px 6px rgba(47, 111, 176, 0.2);
}

/* Itens sem permissão: visíveis mas desabilitados */
.nav-item.perm-disabled .nav-link {
    opacity: 0.35;
    pointer-events: none;
    cursor: not-allowed;
}

.nav-item.perm-disabled .nav-link:hover {
    background-color: transparent;
    color: #cbd5e1;
}

/* Botões de ação sem permissão */
.perm-disabled {
    opacity: 0.35 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.nav-link i {
    font-size: 1.21rem;
    width: 22px;
    text-align: center;
}

/* User Profile Footer - FIXED HEIGHT (matches logo) */
.sidebar-footer {
    height: var(--sidebar-footer-height);
    padding: 0 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    height: 100%;
    padding: 0.5rem 0;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-profile.active {
    background: rgba(255, 255, 255, 0.08);
}

.user-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    flex-shrink: 0;
    background: #3a3f4b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.user-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 36px;
    gap: 2px;
    flex: 1;
}

.user-info h6 {
    font-family: var(--font-cond);
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.user-info small {
    color: #94a3b8;
    font-size: 0.6875rem;
    line-height: 1;
    letter-spacing: 0.3px;
}

#profileChevron {
    color: #94a3b8;
    font-size: 0.875rem;
    transition: transform 0.2s ease;
}

.user-profile.active #profileChevron {
    transform: rotate(180deg);
}

/* User Dropdown Menu */
.user-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0.75rem;
    right: 0.75rem;
    background: var(--sidebar-hover);
    border-radius: 8px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: #e2e8f0;
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.9375rem;
}

.user-dropdown .dropdown-item:first-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-dropdown .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.user-dropdown .dropdown-item i {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

/* ========== MAIN CONTENT ========== */
.main-wrapper {
    margin-left: 260px;
    min-height: 100vh;
}

/* Header - FIXED HEIGHT (matches sidebar logo) */
.main-header {
    height: var(--sidebar-logo-height);
    background: white;
    padding: 0 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.header-title h2 {
    font-family: var(--font-cond);
    font-size: 1.275rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.header-title p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0.25rem 0 0 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-btn:hover {
    background: #e2e8f0;
}

.notification-btn i {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger-color);
    border-radius: 50%;
    border: 2px solid white;
}

/* Config Dropdown */
.config-dropdown-wrapper {
    position: relative;
}

.config-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.config-btn:hover {
    background: #e2e8f0;
}

.config-btn i {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.config-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
    z-index: 1000;
}

.config-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.config-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.9375rem;
}

.config-dropdown-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.config-dropdown-item:hover {
    background: var(--bg-light);
}

.config-dropdown-item i {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
    color: var(--primary-blue);
}

/* Content Area */
.main-content {
    padding: 2rem;
}

/* ========== ACTION BAR (Search, Filters, Actions) ========== */
.action-bar {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-group {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(47, 111, 176, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dropdown-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-blue);
}

.dropdown-btn i {
    font-size: 0.875rem;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--text-dark);
    transition: all 0.15s ease;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
}

.dropdown-item i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

/* ========== CARDS ========== */
.card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.card-body {
    padding: 1.5rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
}

.card-title {
    font-family: var(--font-cond);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.site-editor {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.site-editor-nav {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: 1.25rem;
    background: #dde1df;
    border-right: 1px solid var(--border-color);
}
.site-editor-nav-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-dark);
    font-family: var(--font-cond);
    font-size: .95rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.site-editor-nav-item:hover {
    background: #fff;
}
.site-editor-nav-item.active {
    background: var(--primary-blue);
    color: #fff;
}
.site-editor-panels {
    flex: 1;
    min-width: 0;
    background: #fafbfa;
}
.site-editor-panel {
    display: none;
}
.site-editor-panel.active {
    display: block;
}
.site-editor-panel-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.site-editor-panel-body {
    padding: 1.5rem;
}
.site-field-group {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.site-field-group .form-group:last-child {
    margin-bottom: 0;
}

.site-field-group > h3 {
    padding-bottom: .75rem;
    margin: 0 0 1rem;
    border-bottom: 1px solid var(--border-color);
}

.servicos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}
.servico-card {
    margin-bottom: 0;
    border-color: #c3c9c6;
}
.servico-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}
.servico-ativo {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}
@media (max-width: 900px) {
    .servicos-grid {
        grid-template-columns: 1fr;
    }
}

.hero-bg-picker {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .6rem;
    width: 200px;
}
.hero-bg-picker .btn {
    width: 100%;
    justify-content: center;
}
.hero-bg-thumb {
    width: 200px;
    height: 130px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-bg-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-bg-thumb i {
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* Grade de miniaturas dentro da modal de seleção. */
.hero-bg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}
.hero-bg-option {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    text-align: left;
    transition: border-color .15s, box-shadow .15s;
}
.hero-bg-option:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
}
.hero-bg-option img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}
.hero-bg-option span {
    padding: .5rem .75rem;
    font-size: .8rem;
    color: var(--text-muted);
    word-break: break-all;
}
.hero-bg-option-wrap { position: relative; }
.btn-excluir-propria {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--border-color);
    color: #c0392b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: .8rem;
}
.btn-excluir-propria:hover {
    background: #fff;
    border-color: #c0392b;
}
.site-editor-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 760px) {
    .site-editor {
        flex-direction: column;
    }
    .site-editor-nav {
        flex-direction: row;
        flex-wrap: wrap;
        flex: 0 0 auto;
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
    }
}

.site-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
@media (max-width: 760px) {
    .site-preview-grid {
        grid-template-columns: 1fr;
    }
}
.site-preview-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.site-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .625rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.site-preview-head h4 {
    margin: 0;
    font-family: var(--font-cond);
    font-size: .95rem;
    font-weight: 600;
    color: var(--text-dark);
}
.site-preview-thumb {
    position: relative;
    display: block;
    height: 280px;
    overflow: hidden;
    background: var(--bg-light);
}
.site-preview-thumb iframe {
    width: 1280px;
    height: 1120px;
    border: 0;
    transform-origin: top left;
    pointer-events: none;
}
.template-mini-thumb {
    width: 200px;
    height: 130px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-light);
    overflow: hidden;
    position: relative;
}
.template-mini-thumb iframe {
    width: 1280px;
    height: 1120px;
    border: 0;
    transform-origin: top left;
    pointer-events: none;
}
.template-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.template-option {
    width: 300px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.template-option .template-mini-thumb {
    width: 300px;
    height: 195px;
}
.template-option-info {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .75rem .75rem .5rem;
}
.template-option-actions {
    display: flex;
    gap: .5rem;
    padding: 0 .75rem .75rem;
}
.template-option-actions form {
    flex: 1;
    display: flex;
}
.template-option-actions > .btn {
    flex: 1;
}
.template-option .btn {
    width: 100%;
    justify-content: center;
}

.cor-empresa-row {
    display: flex;
    gap: .6rem;
}
.cor-empresa-item {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.cor-empresa-item .form-label {
    margin: 0;
    text-align: center;
}
.cor-quadrado {
    width: 94px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: none;
    overflow: hidden;
}
.cor-quadrado::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 8px;
}
.cor-quadrado::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
}
.cor-quadrado::-moz-color-swatch {
    border: none;
    border-radius: 8px;
}
.cor-empresa-com-conta-gotas {
    display: flex;
    align-items: center;
    gap: .25rem;
}
.cor-empresa-com-conta-gotas .btn-icon-action {
    padding: .375rem;
}
.cor-quadrado:disabled {
    opacity: .6;
    cursor: not-allowed;
}
.site-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    color: var(--text-muted);
}
.site-preview-empty i {
    font-size: 2rem;
}
.site-preview-empty p {
    margin: 0;
    font-size: .875rem;
}
.site-preview-foot {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

/* Dashboard — card do plano (hero) + stat-cards (empresa/domínio/site/e-mail) */
.dash-plan-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.10), rgba(16, 185, 129, 0.04));
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.dash-plan-label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}
.dash-plan-info h3 {
    font-family: var(--font-display);
    color: var(--text-dark);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: normal;
    margin: 0 0 0.4rem 0;
}
.dash-plan-since {
    display: block;
    margin-top: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: var(--text-muted);
}
.dash-plan-since i {
    margin-right: 0.35rem;
}
.dash-plan-since--alerta {
    color: #991b1b;
    font-weight: 600;
}
.dash-plan-status {
    text-align: right;
    flex-shrink: 0;
}
.dash-plan-status .dash-badge {
    margin-top: 0.35rem;
}
.dash-badge {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    margin-top: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
}
.dash-badge-success { background: rgba(16, 185, 129, 0.14); color: #166534; }
.dash-badge-warning { background: rgba(245, 158, 11, 0.14); color: #92400e; }
.dash-badge-info    { background: rgba(6, 182, 212, 0.14); color: #155e75; }
.dash-badge-danger  { background: rgba(239, 68, 68, 0.14); color: #991b1b; }

/* Badge de avaliação (60 dias grátis) — destaque âmbar, contrasta com o verde do card */
.dash-trial {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.6rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.16);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.dash-trial i { font-size: 0.85rem; }
/* vermelho de urgência — últimos 5 dias e avaliação encerrada */
.dash-trial--alerta {
    background: rgba(239, 68, 68, 0.14);
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.35);
}

/* Stats Cards */
.stat-card {
    background: white;
    border: 1px solid rgba(225, 229, 227, 0.8);
    border-radius: 16px;
    padding: 1.1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 8px 16px rgba(16, 24, 40, .08);
    transform: translateY(-2px);
}

.stat-content {
    min-width: 0;
}

.stat-content h6 {
    font-family: var(--font-display);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.stat-content h3 {
    font-family: var(--font-display);
    color: #0f172a;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: normal;
    margin: 0;
    line-height: 1.2;
}

.stat-content h3.stat-value-text {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: normal;
    overflow-wrap: anywhere;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.stat-icon.primary {
    background: rgba(47, 111, 176, 0.1);
    color: var(--primary-blue);
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.stat-icon.info {
    background: rgba(6, 182, 212, 0.1);
    color: var(--info-color);
}

.stat-icon.danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-color);
}

/* Card inteiro tingido — status de destaque (ex.: Site publicado/em edição/
   em rascunho), diferente do .stat-icon colorido sozinho usado no resto. */
.stat-card-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
}
.stat-card-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
}
.stat-card-danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-blue-hover);
    box-shadow: 0 4px 12px rgba(47, 111, 176, 0.3);
    transform: translateY(-1px);
}

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

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid #c3c9c6;
    color: var(--text-dark);
}

.btn-outline:hover {
    background: var(--bg-light);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.btn-icon-action {
    background: transparent;
    border: none;
    padding: 0.375rem 0.5rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.btn-icon-action:hover {
    background: #f3f4f6;
    color: #374151;
}

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

.btn-success:hover {
    background: #059669;
}

.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.875rem;
}

/* ========== TABLES ========== */
.table-container {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* ── Extra Filters dropdown ── */
.filter-dropdown-menu {
    padding: .5rem 0 0;
}
.filter-compact-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .75rem;
    border-bottom: 1px solid var(--border-color);
}
.filter-compact-label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 100px;
}
.filter-compact-select {
    flex: 1;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    font-size: .8rem;
    color: var(--text-dark);
    padding: 0 .4rem;
    cursor: pointer;
    outline: none;
    transition: border-color .15s;
}
.filter-compact-select:focus {
    border-color: var(--primary-blue);
}
.filter-comb-section {
    padding: .5rem .75rem .45rem;
    border-bottom: 1px solid var(--border-color);
}
.filter-comb-grid {
    display: flex;
    gap: 5px;
}
.filter-comb-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.filter-comb-btn:hover {
    background: #f0f7ff;
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.filter-comb-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

/* Master clear-all button in action bar */
.btn-clear-all-filters {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1.5px solid #fca5a5;
    border-radius: 8px;
    background: #fff5f5;
    color: #dc2626;
    cursor: pointer;
    font-size: .8rem;
    flex-shrink: 0;
    transition: all .15s;
}
.btn-clear-all-filters:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

/* Active filter badges row */
.filter-active-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .65rem .2rem .55rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: .78rem;
    color: #1e40af;
    cursor: pointer;
    transition: background .15s;
    user-select: none;
}
.filter-active-badge:hover {
    background: #dbeafe;
}
.filter-active-badge i {
    font-size: .7rem;
    opacity: .7;
}
.filter-clear-all {
    padding: .2rem .65rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: white;
    font-size: .78rem;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    transition: all .15s;
}
.filter-clear-all:hover {
    border-color: #dc2626;
    color: #dc2626;
}
.filter-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    font-size: .65rem;
    font-weight: 700;
    margin-left: -.1rem;
}

/* Toolbar icon buttons (print, export) */
.btn-icon-toolbar {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.btn-icon-toolbar:hover {
    background: var(--bg-light);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

/* Align export dropdown trigger properly */
.action-buttons .dropdown {
    position: relative;
}
.action-buttons .dropdown-menu-end {
    right: 0;
    left: auto;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: white;
    border-radius: 0 0 12px 12px;
    margin-top: -1px;
}
.pagination-info {
    font-size: 0.875rem;
    color: var(--text-muted);
}
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.pagination-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.pagination-btn:hover:not(:disabled):not(.active) {
    background: var(--bg-light);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.pagination-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
    font-weight: 600;
}
.pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.pagination-ellipsis {
    padding: 0 0.25rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    user-select: none;
}
@media (max-width: 640px) {
    .pagination-wrapper {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
}

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

.table thead th {
    font-family: var(--font-cond);
    background: var(--bg-light);
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table tbody td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 0.9375rem;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: var(--bg-light);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.badge-success {
    background: var(--success-color);
    color: #fff;
}

.badge-warning {
    background: var(--warning-color);
    color: #fff;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.badge-secondary {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
}

.badge-info {
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
}

.badge-purple {
    background: rgba(139, 92, 246, 0.12);
    color: #6d28d9;
}

/* ========== FORMS ========== */
.form-control, .form-select {
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    background: #fff;
    border: 1px solid #c3c9c6;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(47, 111, 176, 0.1);
}

/* Campo travado (dado que vem do cadastro/WS, cliente só visualiza). */
.form-control[readonly] {
    background: #f1f3f2;
    color: #6b7280;
    cursor: default;
}
.form-control[readonly]:focus {
    box-shadow: none;
    border-color: #c3c9c6;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ========== MODALS ========== */

/* Base modal overlay — usado em users.html e outros partials */
/* Block background scroll when any modal is open */
body:has(.modal.show) {
    overflow: hidden;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.show {
    display: flex;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
}

.modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    margin: auto;
}

.modal-dialog.modal-xl {
    max-width: 896px;
}

.modal-dialog.modal-xxl {
    max-width: 1180px;
}

.modal-dialog.modal-fullscreen {
    width: 96vw;
    max-width: 96vw;
    height: 96vh;
    max-height: 96vh;
}

.modal-fullscreen .modal-content {
    height: 100%;
    max-height: 100%;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    width: 100%;
    /* Largura vem do .modal-dialog (pai) — aqui é só 100% dele. */
    max-height: 90vh;
    overflow: hidden;           /* border-radius preserved — body scrolls internally */
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: #fff;
    z-index: 1;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* form inside modal inherits the flex column so modal-body can scroll */
.modal-content > form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;           /* scroll is contained inside the rounded box */
    flex: 1;
    min-height: 0;
}

.preview-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0.5rem 1rem;
}
.preview-header h3 {
    justify-self: start;
}
.preview-header .btn-icon-action {
    justify-self: end;
}
.preview-toolbar {
    display: flex;
    gap: .5rem;
    justify-self: center;
}
.preview-size-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: .95rem;
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
}
.preview-toolbar-divisor {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    align-self: center;
    margin: 0 .25rem;
}
.preview-size-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.preview-size-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #fff;
}
.preview-frame-wrap {
    background: var(--bg-light);
    height: 100%;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    padding: 1rem;
    box-sizing: border-box;
}

.device-scale-box {
    position: relative;
    flex-shrink: 0;
}
.device-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: top left;
}
.device-screen {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #fff;
}
.device-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #fff;
}
.device-notch,
.device-home {
    display: none;
}

.preview-frame-wrap:not(.tamanho-tablet):not(.tamanho-celular) .device-scale-box,
.preview-frame-wrap:not(.tamanho-tablet):not(.tamanho-celular) .device-frame {
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
}

.preview-frame-wrap.tamanho-celular .device-frame {
    background: #16181c;
    border-radius: 46px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .08);
}
.preview-frame-wrap.tamanho-celular .device-screen {
    top: 40px;
    left: 10px;
    right: 10px;
    bottom: 26px;
    border-radius: 30px;
}
.preview-frame-wrap.tamanho-celular .device-notch {
    display: block;
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 24px;
    background: #16181c;
    border-radius: 14px;
    z-index: 2;
}
.preview-frame-wrap.tamanho-celular .device-home {
    display: block;
    position: absolute;
    bottom: 9px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 4px;
    background: rgba(255, 255, 255, .35);
    border-radius: 4px;
    z-index: 2;
}

.preview-frame-wrap.tamanho-tablet .device-frame {
    background: #1e2126;
    border-radius: 28px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .08);
}
.preview-frame-wrap.tamanho-tablet .device-screen {
    top: 34px;
    left: 24px;
    right: 24px;
    bottom: 34px;
    border-radius: 8px;
}
.preview-frame-wrap.tamanho-tablet .device-notch {
    display: block;
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4b4f57;
    z-index: 2;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: #fff;
    border-radius: 0 0 12px 12px;
    flex-shrink: 0;
}

/* Close button inside modal header */
.close-btn {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
}

/* Relatório de Veículos (impressão/preview) */
.print-modal-dialog {
    position: relative;
    width: 96%;
    max-width: 980px;
    max-height: 94vh;
    margin: auto;
    display: flex;
    flex-direction: column;
}
.print-modal-content { max-width: 980px !important; height: 92vh; }
.print-modal-header { border-bottom: 1px solid var(--border-color); }
@media (max-width: 768px) {
    .print-modal-dialog, .print-modal-content {
        max-width: 100% !important;
        width: 100%;
        height: 95vh;
    }
}

.close-btn:hover {
    color: var(--text-dark);
    background: var(--bg-light);
}

/* Form rows inside modals */
.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-ativo {
    background-color: #dcfce7;
    color: #166534;
}

.status-inativo {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Permissions badge in profiles table */
.permissions-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Action icon buttons inside tables */
.btn-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-size: 0.9rem;
    margin-right: 0.25rem;
}

.btn-icon-action:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

/* ========== UTILITIES ========== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    margin-right: 1rem;
}

.mobile-menu-btn:hover {
    background: var(--bg-light);
    border-radius: 8px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 2000;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .main-header {
        padding: 1rem;
    }
    
    .header-title h2 {
        font-size: 1.25rem;
    }
    
    .header-title p {
        display: none;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-content h6 {
        font-size: 0.7rem;
    }

    .stat-content h3 {
        font-size: 1.25rem;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
}

/* ========== MEDIA QUERIES - HEIGHT ========== */

/* Telas com altura reduzida - diminui espaçamento antes do scroll */
@media (max-height: 800px) {
    .sidebar-nav {
        gap: clamp(0.75rem, 2vh, 1.25rem);
        padding: 1rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.99rem;
    }
    
    :root {
        --sidebar-nav-padding: 2rem;
    }
}

@media (max-height: 650px) {
    .sidebar-nav {
        gap: clamp(0.5rem, 1.5vh, 1rem);
        padding: 0.75rem 1rem;
    }
    
    .nav-link {
        padding: 0.625rem 0.875rem;
        font-size: 0.9625rem;
    }
    
    /* Logo e footer mantêm altura fixa */
}

@media (max-height: 500px) {
    .sidebar-nav {
        gap: 0.5rem;
        padding: 0.5rem 1rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.935rem;
    }
    
    .nav-link i {
        font-size: 1.1rem;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ========== LOGIN PAGE - SPLIT SCREEN ========== */
.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow: hidden;
}

.login-split-container {
    display: flex;
    min-height: 100vh;
}

/* Lado Esquerdo - Branding Branco */
.login-left {
    flex: 1;
    position: relative;
    background: #0d0f14;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../img/login-fachada.webp') center / cover no-repeat;
    opacity: 0.35;
    filter: grayscale(0.3);
}

.login-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 50% at 50% 40%, rgba(231, 108, 5, 0.16) 0%, transparent 70%),
        linear-gradient(180deg, rgba(13, 15, 20, 0.55) 0%, rgba(13, 15, 20, 0.85) 100%);
}

.login-left-content {
    position: relative;
    z-index: 1;
    max-width: 460px;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

.login-emblema {
    display: block;
    width: clamp(96px, 12vw, 132px);
    height: auto;
    margin: 0 auto 1.6rem;
}

.login-marca {
    display: block;
    width: clamp(210px, 26vw, 300px);
    height: auto;
    margin: 0 auto;
}

.login-tagline {
    font-size: 1.02rem;
    font-weight: 500;
    margin: 1.9rem 0 0 0;
    color: rgba(203, 203, 203, 0.72);
    letter-spacing: 0.01em;
}


/* Lado Direito - Formulário */
.login-right {
    flex: 1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    min-height: 100vh;
}

.login-form-container {
    width: 100%;
    max-width: 440px;
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.login-form-header {
    margin-bottom: 2.5rem;
}

.login-form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
}

.login-form-header p {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
}

.login-form {
    margin-bottom: 2rem;
}

.login-form .form-group {
    margin-bottom: 1.75rem;
}

.login-form label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.625rem;
}

.login-form .form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: white;
}

.login-form .form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(47, 111, 176, 0.08);
}

.login-form .form-control::placeholder {
    color: #94a3b8;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 3rem;
}

.senha-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    max-width: 260px;
    background: var(--danger-color);
    color: #fff;
    font-size: .78rem;
    line-height: 1.35;
    padding: .5rem .75rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}
.senha-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 1rem;
    border: 5px solid transparent;
    border-bottom-color: var(--danger-color);
}
.senha-tooltip.show {
    display: block;
}

/* Campo de senha + botão "Gerar" lado a lado (módulo E-mail). */
.senha-gerador-row {
    display: flex;
    align-items: stretch;
    gap: .5rem;
}
.senha-gerador-row .password-input-wrapper {
    flex: 1;
}

.toggle-password {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 3rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--primary-blue);
}

.btn-block {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 8px;
}

.button-spinner i.spin,
.spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-form .alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    margin-bottom: 0;
}

/* Gate de aceite de Termos + Privacidade — o card nunca ultrapassa a altura
   da janela: só .aceite-doc-body cresce/rola (flex:1), o resto (logo,
   cabeçalho, checkbox, botões) tem altura fixa e fica sempre visível. */
.aceite-page {
    margin: 0;
    padding: 1.5rem 1rem;
    height: 100vh;
    background: #f4f6f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.aceite-card {
    width: 100%;
    max-width: 720px;
    max-height: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.aceite-logo-bar {
    flex-shrink: 0;
    background: #0a0a0c;
    padding: 14px 24px;
    text-align: center;
}

.aceite-logo {
    height: 34px;
    width: auto;
    display: inline-block;
}

.aceite-header {
    flex-shrink: 0;
    text-align: center;
    padding: 1.25rem 1.75rem 0;
}

.aceite-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.375rem 0;
}

.aceite-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.aceite-page .alert {
    flex-shrink: 0;
    margin: 1rem 1.75rem 0;
}

.aceite-doc-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fafafa;
    padding: 1.125rem 1.375rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 1.25rem 1.75rem 0;
}

.aceite-doc-body h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.75rem 0;
}

.aceite-doc-body h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 1rem 0 0.375rem 0;
}

.aceite-doc-body p {
    margin: 0 0 0.625rem 0;
}

.aceite-doc-divider {
    border: none;
    border-top: 1.5px solid #e2e8f0;
    margin: 1.75rem 0;
}

/* Referências cruzadas dentro do texto (ex.: "Política de Privacidade" citada
   dentro do Termos) — aqui os dois documentos já estão na mesma tela/scroll,
   então o botão é só destaque de texto, sem onclick funcional (o JS de
   abrir/fechar modal é exclusivo do site institucional). */
.aceite-doc-body .modal-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: default;
}

.aceite-form {
    flex-shrink: 0;
    padding: 1.25rem 1.75rem 0;
}

.aceite-check {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: var(--text-dark);
    cursor: pointer;
}

.aceite-check input {
    margin-top: 0.2rem;
}

.aceite-form + form {
    flex-shrink: 0;
    padding: 0.625rem 1.75rem 1.5rem;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.email-quota-bar {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-light);
    overflow: hidden;
    margin: .3rem 0 .2rem;
}
.email-quota-bar-fill {
    height: 100%;
    background: var(--primary-blue);
    border-radius: 4px;
}

.login-footer {
    text-align: center;
}

.login-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.login-hint i {
    color: var(--success-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .login-page {
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .login-split-container {
        flex-direction: column;
        min-height: 100vh;
    }
    
    .login-left {
        min-height: auto;
        flex: none;
        padding: 1.75rem 1.5rem;
        border-bottom: 1px solid #26262e;
    }
    
    .login-left-content {
        max-width: 100%;
    }
    
    .login-emblema {
        width: 72px;
        margin-bottom: 1rem;
    }

    .login-marca {
        width: 180px;
    }

    .login-tagline {
        font-size: 0.875rem;
        margin-top: 0.9rem;
    }

    .login-right {
        padding: 1.5rem 1.5rem 2rem;
        min-height: auto;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .login-form-header h2 {
        font-size: 1.25rem;
    }
    
    .login-form-header p {
        font-size: 0.875rem;
    }
}

/* ========== USER PERMISSIONS STYLES ========== */
.modal-large {
    max-width: 800px;
}

.permissions-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: #1e40af;
    font-size: 0.875rem;
}

.permissions-info i {
    font-size: 1.25rem;
    color: var(--primary-blue);
}

.permissions-container {
    max-height: 500px;
    overflow-y: auto;
}

.permission-module {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.permission-module-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.permission-module-title i {
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.permission-items {
    padding: 0.5rem;
}

.permission-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.permission-item:hover {
    background-color: var(--bg-light);
}

.permission-item input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.permission-info {
    flex: 1;
}

.permission-name {
    display: block;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.permission-desc {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.password-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Badge styles for user perfil */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background-color: #f1f5f9;
    color: #475569;
}

/* ========== LOGOUT BUTTON ========== */
.logout-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    margin-left: auto;
}

.logout-btn:hover {
    color: white;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ========== PAGE SECTIONS (Users & Profiles) ========== */
.page-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dark);
}

.section-title i {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.section-title h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.section-divider {
    height: 2px;
    background: linear-gradient(
        90deg, 
        transparent 0%, 
        var(--border-color) 10%, 
        var(--border-color) 90%, 
        transparent 100%
    );
    margin: 3rem 0;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Profile Modal Styles */
#profileDescription {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

/* Permissions Badge in Profiles Table */
.permissions-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    background-color: #f0f9ff;
    color: #0369a1;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.permissions-badge i {
    font-size: 0.875rem;
}

/* ========== VM MODAL SYSTEM (shared across vehicles, drivers, users) ========== */

.vm-modal-content {
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0,0,0,.22), 0 8px 16px rgba(0,0,0,.12) !important;
}
.vm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    background: linear-gradient(120deg, #1e3a5f 0%, #2f6fb0 100%);
    flex-shrink: 0;
}
.vm-header-left { display: flex; align-items: center; gap: .85rem; }
.vm-header-icon {
    width: 38px; height: 38px;
    background: rgba(255,255,255,.14);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; color: #fff; flex-shrink: 0;
}
.vm-header-title {
    margin: 0; font-family: var(--font-cond); font-size: 1.05rem; font-weight: 700;
    color: #fff; letter-spacing: .01em; text-transform: uppercase;
}
.vm-header-sub { margin: .15rem 0 0; font-size: .8rem; color: rgba(255,255,255,.75); }
.vm-close-btn {
    background: rgba(255,255,255,.12); border: none; border-radius: 8px;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem; cursor: pointer; transition: background .2s; flex-shrink: 0;
}
.vm-close-btn:hover { background: rgba(255,255,255,.22); }

.vm-body {
    padding: 1.25rem;
    display: flex; flex-direction: column; gap: 1rem;
    background: var(--bg-light);
    overflow-y: auto; flex: 1; min-height: 0;
}
.vm-section {
    background: #fff;
    border-radius: 12px;
    padding: 1.1rem 1.25rem 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.vm-section-header {
    display: flex; align-items: baseline; gap: .6rem;
    margin-bottom: .9rem; padding-bottom: .5rem;
    border-bottom: 1px solid var(--border-color);
}

.vm-section-label {
    font-family: var(--font-cond);
    font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    color: #1e293b; flex: 1;
}
.vm-section-required { font-size: .7rem; color: #94a3b8; font-style: italic; }

.vm-fields-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.vm-fields-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: .9rem; }
.vm-fields-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: .9rem; }
.vm-fields-grid-1 { display: grid; grid-template-columns: 1fr; gap: .9rem; }

.vm-fields-grid + .vm-fields-grid { margin-top: .9rem; }

.vm-field  { display: flex; flex-direction: column; }
.vm-label  {
    font-family: var(--font-cond);
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: #475569; margin-bottom: .35rem;
}
.vm-req { color: #ef4444; }

.vm-input-wrap { position: relative; display: flex; align-items: center; }
.vm-input-wrap:has(.vm-textarea) { align-items: flex-start; }
.vm-input-wrap:has(.vm-textarea) .vm-input-icon { top: .6rem; }
.vm-input-icon {
    position: absolute; left: .8rem;
    color: #64748b; font-size: .9rem; pointer-events: none; z-index: 1;
}
.vm-input {
    width: 100%;
    padding: .45rem .9rem .45rem 2.4rem;
    font-size: .9rem; font-weight: 500; color: #0f172a;
    background: #fff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    transition: border-color .18s, box-shadow .18s, background .18s;
    line-height: 1.4;
}
.vm-input:hover { border-color: #94a3b8; }
.vm-input::placeholder { color: #94a3b8; font-weight: 400; }
.vm-input:focus {
    outline: none; background: #fff;
    border-color: #2f6fb0;
    box-shadow: 0 0 0 3px rgba(47,111,176,.15);
}
.vm-input.is-invalid { border-color: #ef4444; background: #fef2f2; }
.vm-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.12); }
.vm-select {
    cursor: pointer; appearance: none; padding-right: 2.1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .85rem center;
}
.vm-textarea {
    width: 100%; padding: .5rem .9rem .5rem 2.4rem;
    font-size: .9rem; font-weight: 500; color: #0f172a;
    background: #fff; border: 1.5px solid #cbd5e1;
    border-radius: 8px; resize: vertical; min-height: 80px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    transition: border-color .18s, box-shadow .18s, background .18s;
    font-family: inherit; line-height: 1.5;
}
.vm-textarea:hover { border-color: #94a3b8; }
.vm-textarea:focus {
    outline: none; background: #fff;
    border-color: #2f6fb0; box-shadow: 0 0 0 3px rgba(47,111,176,.15);
}
.vm-mono { font-family: 'SFMono-Regular', Consolas, monospace; font-size: .85rem; letter-spacing: .5px; }

.vm-field:focus-within .vm-label { color: #275c92; }

/* validation */
.invalid-feedback { display: none; font-size: .75rem; color: #ef4444; margin-top: .3rem; }
.vm-field:has(.vm-input.is-invalid) .invalid-feedback,
.vm-field:has(.vm-textarea.is-invalid) .invalid-feedback { display: block; }
.vm-input-wrap:has(.vm-input.is-invalid) .vm-input-icon { color: #ef4444; }

/* footer */
.vm-footer {
    display: flex; align-items: center; justify-content: flex-end;
    gap: .75rem; padding: 1rem 1.5rem;
    background: #fff; border-top: 1px solid #e2e8f0; flex-shrink: 0;
}
.vm-btn-cancel {
    display: flex; align-items: center; gap: .4rem;
    padding: .6rem 1.25rem;
    font-size: .875rem; font-weight: 500; color: #64748b;
    background: #f1f5f9; border: 1.5px solid #e2e8f0;
    border-radius: 8px; cursor: pointer; transition: all .18s;
}
.vm-btn-cancel:hover { background: #e2e8f0; color: #1e293b; }
.vm-btn-save {
    display: flex; align-items: center; gap: .5rem;
    padding: .65rem 1.5rem;
    font-size: .875rem; font-weight: 600; color: #fff;
    background: linear-gradient(135deg, #2f6fb0, #1e4d7a);
    border: none; border-radius: 8px; cursor: pointer;
    box-shadow: 0 2px 8px rgba(47,111,176,.35);
    transition: all .18s;
}
.vm-btn-save:hover {
    background: linear-gradient(135deg, #1e4d7a, #163a5c);
    box-shadow: 0 4px 12px rgba(47,111,176,.45);
    transform: translateY(-1px);
}
.vm-btn-save:active { transform: translateY(0); }

/* plano display (users) */
.vm-plano-field {
    display: flex; align-items: center; gap: .75rem;
    padding: .65rem 1rem;
    background: #f8fafc; border: 1.5px solid #e2e8f0;
    border-radius: 8px; min-height: 42px;
}
.vm-plano-field .plano-icon { font-size: 1.1rem; }
.vm-plano-field .plano-label { font-size: .875rem; font-weight: 600; color: #1e293b; flex: 1; }
.vm-plano-field .plano-readonly-hint { font-size: .72rem; color: #94a3b8; display: flex; align-items: center; gap: .25rem; }

/* password hint */
.vm-password-hint { font-size: .7rem; color: #94a3b8; font-weight: 400; text-transform: none; letter-spacing: 0; }

/* permissions body */
.vm-permissions-body {
    padding: 1.25rem;
    background: #f1f5f9;
    overflow-y: auto; flex: 1; min-height: 0;
}
.vm-permissions-info {
    display: flex; align-items: center; gap: .5rem;
    padding: .75rem 1rem;
    background: #eff6ff; border: 1px solid #bfdbfe;
    border-radius: 8px; margin-bottom: 1rem;
    font-size: .85rem; color: #1e40af;
}

@media (max-width: 680px) {
    .vm-fields-grid, .vm-fields-grid-3, .vm-fields-grid-4 { grid-template-columns: 1fr !important; }
}

/* ========== BUTTON GROUP ========== */
.btn-group {
    display: inline-flex;
    gap: 0.25rem;
}

.btn-group-sm {
    gap: 0.25rem;
}

/* ========== RESPONSIVE - MOBILE ========== */
@media (max-width: 767px) {
    /* Coluna de ações: ícones empilhados verticalmente no mobile */
    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-icon-action {
        width: 100%;
        text-align: center;
    }
}

/* ========== MÓDULO TRÁFEGO ========== */
#trafego-painel.trf-carregando { opacity: .5; pointer-events: none; transition: opacity .15s; }

.trf-periodo {
    display: inline-flex;
    gap: .25rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: .25rem;
    margin-bottom: 1.25rem;
}
.trf-periodo-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: .82rem;
    font-weight: 600;
    padding: .4rem .9rem;
    border-radius: 7px;
    cursor: pointer;
    transition: all .15s ease;
}
.trf-periodo-btn:hover { color: var(--text-dark); }
.trf-periodo-btn.is-ativo { background: #fff; color: var(--primary-blue); box-shadow: 0 1px 2px rgba(16,24,40,.08); }

.trf-aviso {
    display: flex;
    align-items: center;
    gap: .85rem;
    background: rgba(47,111,176,.08);
    border: 1px solid rgba(47,111,176,.22);
    border-radius: 12px;
    padding: .9rem 1.1rem;
    margin-bottom: 1.25rem;
}
.trf-aviso i { font-size: 1.35rem; color: var(--primary-blue); flex-shrink: 0; }
.trf-aviso strong { display: block; font-size: .9rem; color: var(--text-dark); }
.trf-aviso span { font-size: .82rem; color: var(--text-muted); }

.trf-cards { margin-bottom: 1.5rem; }
.trf-delta {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    margin-top: .4rem;
    font-family: var(--font-display);
    font-size: .78rem;
    font-weight: 700;
    padding: .1rem .45rem;
    border-radius: 999px;
}
.trf-delta i { font-size: .7rem; }
.trf-delta--up   { background: rgba(16,185,129,.14); color: #166534; }
.trf-delta--down { background: rgba(239,68,68,.14); color: #991b1b; }
.trf-card-nota { display: block; margin-top: .4rem; font-size: .78rem; color: var(--text-muted); }

.trf-linha {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.trf-bloco { margin: 0; }
.trf-bloco-titulo {
    font-family: var(--font-display);
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.trf-bloco-tag {
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--success-color);
    background: rgba(16,185,129,.12);
    padding: .1rem .4rem;
    border-radius: 5px;
}

.trf-barras { display: flex; flex-direction: column; gap: .85rem; }
.trf-barra-topo {
    display: flex;
    justify-content: space-between;
    font-size: .82rem;
    margin-bottom: .3rem;
}
.trf-barra-topo span { color: var(--text-dark); }
.trf-barra-topo strong { color: var(--text-muted); font-family: var(--font-display); }
.trf-barra-trilho { height: 7px; background: var(--bg-light); border-radius: 999px; overflow: hidden; }
.trf-barra-fill { height: 100%; background: var(--primary-blue); border-radius: 999px; }

.trf-engaj { display: flex; gap: 1.5rem; margin-bottom: 1rem; }
.trf-engaj-item strong { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: #0f172a; }
.trf-engaj-item span { font-size: .8rem; color: var(--text-muted); }
.trf-engaj-barra { height: 8px; }

.trf-cidades { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.trf-cidades li {
    display: flex;
    justify-content: space-between;
    padding: .55rem 0;
    font-size: .85rem;
    border-bottom: 1px solid var(--border-color);
}
.trf-cidades li:last-child { border-bottom: none; }
.trf-cidades strong { font-family: var(--font-display); color: var(--text-dark); }

.trf-contato-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}
.trf-contato {
    text-align: center;
    padding: 1rem .5rem;
    background: var(--bg-light);
    border-radius: 12px;
}
.trf-contato i { font-size: 1.3rem; color: var(--primary-blue); }
.trf-contato strong { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: #0f172a; margin: .3rem 0 .1rem; }
.trf-contato span { font-size: .78rem; color: var(--text-muted); }

.trf-vazio { font-size: .85rem; color: var(--text-muted); margin: 0; }
.trf-rodape { font-size: .78rem; color: var(--text-muted); margin: 0; }
