/* =============================================================================
ARQUIVO: style.css
VERSÃO: v3.0 (DESIGN SYSTEM - PADRONIZAÇÃO INTELIGENTE)
ORIGEM: style.css + custom.css + updates.css (consolidado)
============================================================================= */

/* -----------------------------------------------------------------------------
1. DESIGN TOKENS (VARIÁVEIS GLOBAIS)
----------------------------------------------------------------------------- */
:root {
    /* ═══ CORE BRAND ═══ */
    --brand: #99DE1E;
    --brand-dark: #77AE12;
    --brand-light: #abeb3d;
    --brand-icon: #8EC32D;
    
    /* ═══ SEMÂNTICAS ═══ */
    --success: #10B981;
    --success-bg: #D1FAE5;
    --success-text: #065F46;
    --error: #DC2626;
    --error-bg: #FEE2E2;
    --error-text: #991B1B;
    --warning: #F59E0B;
    --warning-bg: #FEF3C7;
    --warning-text: #92400E;
    --info: #3B82F6;
    --info-bg: #DBEAFE;
    --info-text: #1E40AF;
    
    /* ═══ NEUTROS ═══ */
    /* ~30% mais claro que o tom anterior */
    --bg-app: #F7F8FB;
    --bg-surface: #FFFFFF;
    --bg-input: #F8FAFC;
    --bg-hover: #F1F5F9;
    
    /* ═══ BORDAS ═══ */
    --border-light: #E2E8F0;
    --border-medium: #CBD5E1;
    --border-dark: #94A3B8;
    
    /* ═══ TEXTO ═══ */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-tertiary: #64748B;
    --text-inverse: #FFFFFF;
    
    /* ═══ SOMBRAS ═══ */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.05);
    
    /* ═══ RAIO DAS BORDAS ═══ */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;
    
    /* ═══ TIPOGRAFIA ═══ */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* ═══ TRANSIÇÕES ═══ */
    --transition-fast: 0.1s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
    
    /* ═══ Z-INDEX ═══ */
    --z-dropdown: 100;
    --z-modal-overlay: 9999;
    --z-toast: 10000;
}

/* -----------------------------------------------------------------------------
2. RESET & BASE
----------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

html {
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-app);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    overflow: hidden;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

/* Ícones Material */
.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-size: 18px;
    line-height: 1;
    font-variation-settings: 'wght' 300;
    font-weight: normal;
    vertical-align: middle;
    display: inline-block;
}

/* -----------------------------------------------------------------------------
3. LAYOUT PRINCIPAL (SHELL)
----------------------------------------------------------------------------- */
aside {
    width: 236px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    z-index: var(--z-dropdown);
}

.brand-box {
    padding: 30px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: var(--brand);
    border-radius: var(--radius-md);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-text {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    color: var(--text-primary);
}

.brand-text span {
    font-size: 10px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

nav {
    flex: 1;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-cat {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 20px 0 8px 12px;
    opacity: 0.7;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-tertiary);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: background var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid transparent;
}

.nav-btn:hover:not(.active) {
    background: transparent;
    color: var(--text-tertiary);
    border-color: transparent;
}

.nav-btn.active:hover {
    background: var(--bg-hover);
    border-color: transparent;
}

.nav-btn.active {
    background: var(--bg-hover);
    color: var(--text-primary);
    font-weight: 600;
}

.nav-btn.active span {
    color: var(--brand-icon);
    font-weight: bold;
}

main {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    scroll-behavior: smooth;
    position: relative;
}

/* Sidebar Footer */
.sidebar-footer-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    padding: 20px;
}

.nav-btn-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    border: 1px solid transparent;
}

.privacy-btn-sidebar {
    background: var(--bg-hover);
    color: var(--text-tertiary);
    border-color: var(--border-light);
}

.privacy-btn-sidebar:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.logout-btn-sidebar {
    background: var(--error-bg);
    color: var(--error);
    border-color: var(--error-bg);
}

.logout-btn-sidebar:hover {
    background: var(--error);
    color: var(--text-inverse);
    border-color: var(--error);
}

/* -----------------------------------------------------------------------------
4. COMPONENTES: CONTAINERS & CARDS
----------------------------------------------------------------------------- */
.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 35px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-glass);
}

/* -----------------------------------------------------------------------------
5. COMPONENTES: FORMULÁRIOS & INPUTS
----------------------------------------------------------------------------- */
.ui-label, .input-label, .modern-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
}

.ui-input, .clean-input, .modern-input, textarea, select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 13px;
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    appearance: none;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

.ui-input:focus, .clean-input:focus, .modern-input:focus, select:focus, textarea:focus {
    border-color: var(--brand);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px rgba(153, 222, 30, 0.1);
}

.clean-input.mono {
    font-family: var(--font-mono);
    color: var(--brand-dark);
}

/* -----------------------------------------------------------------------------
6. COMPONENTES: BOTÕES
----------------------------------------------------------------------------- */
.btn-process, .btn-primary, .btn-login-hero {
    background: var(--brand);
    color: #000000 !important;
    height: 44px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    transition: background 0.2s ease;
    text-decoration: none;
    font-family: var(--font-primary);
}

.btn-process:hover, .btn-primary:hover, .btn-login-hero:hover {
    background: #8BCC1B;
    color: #000000 !important;
}

.btn-login-hero {
    width: 100%;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(153, 222, 30, 0.25);
    margin-top: 10px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-base);
    background: transparent;
    border: 1px solid transparent;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-icon.danger:hover {
    background: var(--error-bg);
    color: var(--error);
}

.btn-icon.action:hover {
    background: var(--info-bg);
    color: var(--info);
}

/* -----------------------------------------------------------------------------
7. COMPONENTES: BADGES & ALERTS
----------------------------------------------------------------------------- */
.badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-active, .bg-green {
    background: var(--success-bg);
    color: var(--success-text);
}

.badge-blocked, .bg-red {
    background: var(--error-bg);
    color: var(--error-text);
}

.badge-expired, .bg-gray {
    background: var(--bg-hover);
    color: var(--text-tertiary);
}

.badge-test, .bg-purple {
    background: #F3E8FF;
    color: #9333EA;
    border: 1px solid #E9D5FF;
}

/* Badges de Plano */
.badge-plan {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    margin-left: 6px;
    border: 1px solid transparent;
    text-transform: uppercase;
}

.badge-plan.test {
    background: #F3E8FF;
    color: #9333EA;
    border-color: #E9D5FF;
}

.badge-plan.monthly {
    background: var(--info-bg);
    color: var(--info-text);
    border-color: var(--info-bg);
}

.badge-plan.annual {
    background: #F0FDF4;
    color: #166534;
    border-color: #DCFCE7;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 500;
    font-size: 13px;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid #FECACA;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid #BBF7D0;
}

/* -----------------------------------------------------------------------------
8. COMPONENTES: MODAIS & TOASTS
----------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-overlay);
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.modal-overlay.show {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    padding: 30px;
    border-radius: var(--radius-xl);
    width: 480px;
    max-width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

#copyToast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #111;
    color: var(--text-inverse);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    opacity: 0;
    transition: opacity var(--transition-base), transform var(--transition-base);
    transform: translateY(20px);
    pointer-events: none;
    z-index: var(--z-toast);
    display: flex;
    align-items: center;
    gap: 8px;
}

#copyToast.show {
    opacity: 1;
    transform: translateY(0);
}

/* -----------------------------------------------------------------------------
9. MÓDULO: LOGIN
----------------------------------------------------------------------------- */
.login-split-container {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background: var(--bg-surface);
}

.login-brand-side {
    flex: 1.2;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    position: relative;
    overflow: hidden;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.login-brand-side::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 60%);
    top: -25%;
    left: -25%;
    pointer-events: none;
}

.brand-logo-large {
    font-size: 64px;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    width: 120px;
    height: 120px;
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255,255,255,0.3);
}

.brand-title {
    font-size: 42px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.brand-tagline {
    font-size: 15px;
    opacity: 0.9;
    max-width: 320px;
    text-align: center;
    line-height: 1.6;
    font-weight: 400;
}

.login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    position: relative;
}

.login-wrapper {
    width: 100%;
    max-width: 380px;
    padding: 40px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.welcome-header {
    margin-bottom: 35px;
}

.welcome-title {
    font-size: 26px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.welcome-desc {
    color: var(--text-tertiary);
    font-size: 14px;
}

.modern-input-group {
    margin-bottom: 20px;
    position: relative;
}

@media (max-width: 900px) {
    .login-brand-side {
        display: none;
    }
    .login-form-side {
        background: var(--bg-hover);
    }
    .login-wrapper {
        background: var(--bg-surface);
        border-radius: var(--radius-2xl);
        box-shadow: var(--shadow-lg);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.emergency-overlay {
    position: fixed;
    inset: 0;
    background: #0F172A;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-overlay);
}

.emergency-box {
    background: var(--bg-surface);
    width: 400px;
    padding: 30px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
    border-top: 6px solid var(--warning);
}

.emergency-icon {
    font-size: 48px;
    color: var(--warning);
    margin-bottom: 15px;
}

/* -----------------------------------------------------------------------------
10. MÓDULO: DASHBOARD
----------------------------------------------------------------------------- */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.dashboard-stats-card {
    display: flex;
    align-items: center;
    padding: 25px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dashboard-stats-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
}

.dashboard-stats-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-right: 20px;
    flex-shrink: 0;
    background: var(--bg-hover);
    color: var(--text-tertiary);
}

.dashboard-stats-icon.success {
    background: var(--success-bg);
    color: var(--success-text);
}

.dashboard-stats-icon.info {
    background: var(--info-bg);
    color: var(--info-text);
}

.dashboard-stats-icon.warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.dashboard-stats-icon.error {
    background: var(--error-bg);
    color: var(--error-text);
}

.dashboard-stats-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.025em;
}

.stat-value.text-success {
    color: var(--success-text);
}

.stat-value.text-info {
    color: var(--info-text);
}

.stat-value.text-error {
    color: var(--error);
}

@media (max-width: 1200px) {
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* -----------------------------------------------------------------------------
11. MÓDULO: PRODUTOS
----------------------------------------------------------------------------- */
.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.module-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-bar {
    display: flex;
    gap: 5px;
    background: var(--bg-hover);
    padding: 4px;
    border-radius: var(--radius-md);
}

.filter-pill {
    text-decoration: none;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    transition: all var(--transition-base);
}

.filter-pill.active {
    background: var(--bg-surface);
    color: #8EC32D;
    box-shadow: var(--shadow-sm);
}

.filter-pill:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.prod-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
}

.prod-card:hover {
    box-shadow: none;
    border-color: var(--border-light);
}

.prod-card--nav {
    cursor: pointer;
}

.prod-card--nav:focus {
    outline: 2px solid var(--border-medium);
    outline-offset: 2px;
}

.prod-cover-tool {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: var(--bg-surface);
    color: var(--text-tertiary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: none;
}

.prod-cover-tool:hover,
.prod-cover-tool:focus {
    background: var(--bg-hover);
    color: var(--text-secondary);
    outline: none;
    border-color: var(--border-light);
}

.prod-cover-tool .material-symbols-rounded {
    font-size: 20px;
    line-height: 1;
}

.am-po-page-head {
    margin-bottom: 16px;
}

.am-po-back-row {
    margin-bottom: 10px;
}

.am-po-head-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, auto);
    gap: 16px 20px;
    align-items: center;
}

.am-po-title {
    margin-bottom: 6px;
}

.am-po-lede {
    margin: 0;
}

.am-po-head-grid__pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    justify-content: center;
}

.am-po-pager-total {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.am-po-pager-meta {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
}

.am-po-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-surface);
    color: var(--text-secondary);
    text-decoration: none;
    box-shadow: none;
}

.am-po-pager-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-medium);
    outline: none;
}

.am-po-pager-btn--disabled {
    opacity: 0.45;
    pointer-events: none;
}

.am-po-head-grid__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.am-po-edit-prod {
    white-space: nowrap;
}

/* Botão "Editar programa" dentro do contexto do programa (diferenciar do restante) */
.btn-process.am-po-edit-prod{
    background:var(--bg-surface);
    color:var(--text-secondary);
    border:1px solid var(--border-medium);
}
.btn-process.am-po-edit-prod:hover{
    background:var(--bg-hover);
    color:var(--text-primary);
    border-color:var(--border-dark);
}

@media (max-width: 1024px) {
    .am-po-head-grid {
        grid-template-columns: 1fr;
    }

    .am-po-head-grid__pager {
        justify-content: flex-start;
    }

    .am-po-head-grid__actions {
        justify-content: flex-start;
    }
}

.prod-cover {
    height: 260px;
    background-color: var(--bg-hover);
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
}

.prod-cover.no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border-medium);
}

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    cursor: pointer;
    user-select: none;
    transition: var(--transition-base);
}

.badge-paid {
    background: #0F172A;
    color: var(--text-inverse);
}

.badge-free {
    background: var(--success);
    color: var(--text-inverse);
}

.version-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: var(--text-inverse);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    z-index: 2;
}

.prod-body {
    padding: 35px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prod-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.prod-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--text-tertiary);
    align-items: center;
}

.prod-desc {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 34px;
}

.prod-footer {
    padding: 15px 35px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-status-box {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
}

.file-ok {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #15803D;
}

.file-err {
    background: var(--error-bg);
    border: 1px solid #FECACA;
    color: #B91C1C;
}

/* -----------------------------------------------------------------------------
12. MÓDULO: LICENÇAS & CRM
----------------------------------------------------------------------------- */
.controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-tabs {
    display: flex;
    gap: 5px;
    background: var(--bg-hover);
    padding: 4px;
    border-radius: var(--radius-md);
    height: 36px;
    box-sizing: border-box;
    align-items: center;
}

.view-tab {
    text-decoration: none;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
}

.view-tab.active {
    background: var(--bg-surface);
    color: var(--brand-icon);
    box-shadow: var(--shadow-sm);
}

.filter-select {
    padding: 0 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--text-tertiary);
    outline: none;
    height: 36px;
    box-sizing: border-box;
    cursor: pointer;
    background: var(--bg-surface);
}

.form-grid {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1.2fr;
    gap: 20px;
    align-items: end;
}

.validity-selector {
    display: flex;
    background: var(--bg-hover);
    padding: 4px;
    border-radius: var(--radius-md);
    gap: 5px;
    height: 42px;
    box-sizing: border-box;
}

.validity-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.validity-option input[type="radio"] {
    display: none;
}

.validity-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    transition: all var(--transition-base);
}

.validity-option input[type="radio"]:checked + span {
    background: var(--bg-surface);
    color: var(--brand-icon);
    box-shadow: var(--shadow-sm);
}

.am-po-issue-validity .validity-option {
    flex: 0 0 auto;
    min-width: 88px;
}

.am-po-issue-validity .validity-option span {
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-tertiary);
    box-shadow: none;
}

.am-po-issue-validity .validity-option input[type="radio"]:checked + span {
    background: var(--bg-surface);
    color: var(--brand-icon);
    border-color: var(--brand-icon);
    box-shadow: 0 0 0 1px rgba(185, 230, 3, 0.12);
}

.am-po-issue-validity .validity-option:hover span {
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.am-po-validity-date {
    flex: 1.5;
    min-width: 120px;
    height: 35px !important;
    min-height: 35px !important;
    padding: 0 12px;
    box-sizing: border-box;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

.am-po-bulk-checkbox-wrap {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
    user-select: none;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
    z-index: 2;
}

.am-po-bulk-checkbox-wrap:hover {
    border-color: var(--border-medium);
    color: var(--text-primary);
    background: #F8FAFC;
}

.am-po-bulk-checkbox-wrap input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.am-po-bulk-checkbox-icon {
    width: 16px;
    height: 16px;
    border-radius: 5px;
    border: 1px solid var(--border-medium);
    background: var(--bg-hover);
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.am-po-bulk-checkbox-icon .material-symbols-rounded {
    font-size: 13px;
    line-height: 1;
    font-variation-settings: 'wght' 700;
}

.am-po-bulk-checkbox-wrap input[type="checkbox"]:checked ~ .am-po-bulk-checkbox-icon {
    background: var(--brand-icon);
    border-color: var(--brand-icon);
    color: #0A0A0C;
    box-shadow: 0 0 0 1px rgba(185, 230, 3, 0.16);
}

.am-po-bulk-checkbox-wrap input[type="checkbox"]:checked ~ .am-po-bulk-checkbox-text {
    color: var(--text-primary);
}

.license-table-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.license-row {
    display: grid;
    grid-template-columns: 40px 1.5fr 1.2fr 80px 160px 100px 140px 120px;
    gap: 15px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    align-items: center;
    font-size: 13px;
    color: var(--text-primary);
}

.license-row:hover {
    background: var(--bg-hover);
}

.license-row:last-child {
    border-bottom: none;
}

.table-header {
    background: var(--bg-hover);
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.key-display {
    font-family: var(--font-mono);
    background: var(--bg-hover);
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    color: #166534;
    font-size: 11px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-base);
}

.key-display:hover {
    border-color: var(--border-medium);
    background: var(--bg-surface);
}

/* User Summary Grid */
.user-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Licenças: barra de filtros em linha (evita empilhar ao lado do título) */
.am-licencas-intro {
    margin-bottom: 14px;
}

.am-licencas-intro .module-title {
    margin-bottom: 4px;
}

.am-licencas-filter-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.am-licencas-filter-form {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.am-licencas-filter-search {
    height: 38px;
    flex: 0 1 200px;
    min-width: 140px;
    max-width: 240px;
}

.am-licencas-filter-select {
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border-medium);
    font-weight: 500;
    flex-shrink: 0;
    background: var(--bg-surface);
    color: var(--text-primary);
}

.am-licencas-filter-select--prod {
    min-width: 168px;
    max-width: 280px;
}

.am-licencas-filter-select--sort {
    min-width: 158px;
    max-width: 220px;
}

.am-licencas-view-toggle {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    background: var(--bg-hover);
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
    height: 38px;
    box-sizing: border-box;
    border: 1px solid var(--border-light);
}

.am-licencas-view-toggle__btn {
    padding: 0 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
}

.am-licencas-view-toggle__btn:hover {
    color: var(--text-primary);
}

.am-licencas-view-toggle__btn.is-active {
    background: var(--bg-surface);
    color: var(--brand-icon);
    box-shadow: var(--shadow-sm);
}

.am-licencas-view-toggle__btn.is-active.is-archive {
    color: var(--error);
}

.am-licencas-page-shell .user-summary-grid--licencas {
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.am-licencas-page-shell .user-summary-grid--licencas .user-card {
    max-width: none;
    width: 100%;
    justify-self: stretch;
}

.cat-item {
  display: flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 0;
  background: #fff;
  border: 1px solid transparent;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: transparent;
  transition: all 0.2s;
  margin-bottom: 5px;
  border-bottom: 1px solid #eee;
}

.cat-item-id {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
  margin-top: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
    .am-licencas-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .am-licencas-filter-form {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .am-licencas-filter-search {
        flex: 1 1 100%;
        max-width: none;
    }

    .am-licencas-filter-select--prod,
    .am-licencas-filter-select--sort {
        flex: 1 1 calc(50% - 6px);
        max-width: none;
    }

    .am-licencas-view-toggle {
        justify-content: center;
    }
}

.user-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.user-card:hover {
    border-color: var(--border-light);
    box-shadow: none;
    background: var(--bg-surface);
}

.user-card.banned {
    background: var(--error-bg);
    border-color: #FECACA;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 20px;
    border: 1px solid var(--border-light);
    margin-bottom: 12px;
}

.user-card.banned .user-avatar {
    background: var(--error);
    color: var(--text-inverse);
    border-color: var(--error);
}

.user-email {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-all;
    line-height: 1.2;
    margin-bottom: 15px;
}

.user-card.banned .user-email {
    color: var(--error-text);
    text-decoration: line-through;
}

.user-stats-pill {
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.user-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.user-card-meta__sep {
    color: var(--border-medium);
    font-weight: 400;
    user-select: none;
}

.user-card-meta__item--ok {
    color: var(--success-text);
}

.user-card-meta__item--warn {
    color: var(--warning-text);
}

.user-card-meta__item--bad {
    color: var(--error-text);
}

.user-card.banned .user-stats-pill {
    background: transparent;
    border-color: #FECACA;
    color: var(--error-text);
}

.user-health-good {
    color: var(--success);
}

.user-health-bad {
    color: var(--error);
}

.btn-open-modal {
    margin-top: 10px;
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    padding: 8px 0;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
    cursor: pointer;
}

.user-card:hover .btn-open-modal {
    background: var(--bg-hover);
    border-color: var(--border-medium);
    color: var(--brand-icon);
}

.user-card.banned:hover .btn-open-modal {
    border-color: var(--error);
    color: var(--error);
    background: #FFF5F5;
}

/* Paginação */
.pagination-standard {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 15px 25px;
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.am-licencas-page-shell {
    display: block;
}

.page-limit-select {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-medium);
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    outline: none;
    cursor: pointer;
    background: var(--bg-hover);
}

/* Deep Dive Modal */
.deep-dive-modal {
    max-width: 1200px;
    width: 96%;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.dd-header {
    padding: 20px 25px;
    background: var(--bg-hover);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.dd-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.dd-header-ban-btn {
    height: 40px;
    min-height: 40px;
    padding: 0 16px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.dd-body {
    padding: 25px;
    overflow-y: auto;
    background: var(--bg-surface);
}

.dd-lic-row {
    display: grid;
    grid-template-columns:
        minmax(100px, 1.3fr)
        minmax(80px, 0.7fr)
        minmax(200px, 1.6fr)
        minmax(100px, 0.9fr)
        minmax(220px, max-content);
    gap: 12px 14px;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    margin-bottom: 15px;
    background: var(--bg-hover);
}

.dd-lic-row:last-child {
    margin-bottom: 0;
}

.dd-lic-row__actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    padding: 4px 2px;
}

.dd-lic-row__actions .btn-action-rounded {
    flex-shrink: 0;
}

.dd-col--strikes {
    text-align: center;
}

.dd-col--strikes .dd-strikes-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dd-strikes-num {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.dd-hwid-ic {
    font-size: 16px;
    line-height: 1;
}

/* Limite de dispositivos (1|2) — CRM + Operação de programas */
.am-maxhwid-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.am-maxhwid-pill {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    padding: 2px 8px;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.am-maxhwid-form {
    margin: 0;
    display: inline;
}

.am-maxhwid-seg {
    display: inline-flex;
    border-radius: 6px;
    border: 1px solid var(--border-medium);
    overflow: hidden;
    background: var(--bg-surface);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.am-maxhwid-seg__btn {
    border: none;
    background: transparent;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: inherit;
    line-height: 1.2;
    min-width: 34px;
    transition: background 0.15s ease, color 0.15s ease;
}

.am-maxhwid-seg__btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.am-maxhwid-seg__btn.is-on {
    background: var(--brand);
    color: #fff;
}

.am-maxhwid-seg__btn + .am-maxhwid-seg__btn {
    border-left: 1px solid var(--border-medium);
}

.am-maxhwid-seg__btn.is-on + .am-maxhwid-seg__btn,
.am-maxhwid-seg__btn + .am-maxhwid-seg__btn.is-on {
    border-left-color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 720px) {
    .dd-lic-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "prod prod"
            "stat strikes"
            "valid valid"
            "actions actions";
    }

    .dd-lic-row > div:nth-child(1) {
        grid-area: prod;
    }

    .dd-lic-row > div:nth-child(2) {
        grid-area: stat;
    }

    .dd-lic-row > div:nth-child(3) {
        grid-area: strikes;
    }

    .dd-lic-row > div:nth-child(4) {
        grid-area: valid;
    }

    .dd-lic-row > div:nth-child(5) {
        grid-area: actions;
    }

    .dd-lic-row__actions {
        justify-content: flex-start;
        flex-wrap: nowrap;
    }
}

.dd-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.dd-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.key-box-mini {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    cursor: pointer;
    background: var(--bg-surface);
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    font-size: 11px;
    border: 1px solid var(--border-medium);
    display: inline-block;
    font-weight: 500;
    transition: var(--transition-base);
}

.key-box-mini:hover {
    background: var(--bg-hover);
    color: var(--brand-icon);
    border-color: var(--border-medium);
}

.btn-action-rounded {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    transition: var(--transition-base);
    text-decoration: none;
    cursor: pointer;
}

.btn-action-rounded:hover {
    background: var(--brand);
    color: var(--text-inverse);
    border-color: var(--border-medium);
}

.btn-action-rounded.danger:hover {
    background: var(--error);
    border-color: var(--error);
}

.btn-action-rounded .material-symbols-rounded {
    font-size: 20px;
    line-height: 1;
}

.bulk-actions-bar {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--error-bg);
    border: 1px solid #FECACA;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.confirm-modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.btn-cancel-modal {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
}

.btn-danger-modal {
    background: var(--error);
    color: var(--text-inverse);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
}

/* CRM Cards */
.crm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.crm-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-slow);
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 15px;
}

.crm-card:hover {
    border-color: var(--border-light);
    transform: none;
    box-shadow: none;
    background: var(--bg-surface);
}

.crm-card.banned {
    background: var(--error-bg);
    border-color: #FECACA;
}

.crm-avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-tertiary);
}

.crm-card.banned .crm-avatar {
    background: var(--error);
    color: var(--text-inverse);
}

/* -----------------------------------------------------------------------------
13. MÓDULO: SCRIPTS & LOGS
----------------------------------------------------------------------------- */
.script-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.script-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 35px;
    transition: var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.script-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-glass);
}

.script-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 5px;
}

.log-container {
    max-height: 700px;
    overflow-y: auto;
    padding-right: 15px;
}

.logs-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.log-line {
    padding: 6px 0;
    border-bottom: 1px dashed var(--border-light);
    display: flex;
    gap: 15px;
    align-items: baseline;
    font-family: var(--font-primary), sans-serif;
    font-size: 12px;
    line-height: 1.45;
}

.log-line:last-child {
    border-bottom: none;
}

.log-line-date {
    color: var(--text-tertiary);
    min-width: 100px;
}

.log-line-type {
    font-weight: 600;
    min-width: 80px;
}

.log-line-msg {
    font-weight: 500;
    color: var(--text-secondary);
}

@media (max-width: 1200px) {
    .logs-two-cols {
        grid-template-columns: 1fr;
    }
}

.error-text {
    color: var(--error);
}

.success-text {
    color: var(--success);
}

/* -----------------------------------------------------------------------------
14. MÓDULO: SISTEMA & DOCS
----------------------------------------------------------------------------- */
.clock-card-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 25px;
    height: 100%;
}

.clock-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.clock-desc {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.clock-big-time {
    font-size: 42px;
    font-weight: 700;
    color: var(--brand);
    font-family: var(--font-mono);
    line-height: 1;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.clock-date {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.clock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-hover);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    color: var(--text-tertiary);
    font-weight: 600;
}

.cron-split-container {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 30px;
    align-items: center;
}

.cron-desc-box {
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1.5;
    background: var(--bg-hover);
    padding: 10px 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.config-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.system-split-grid {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 24px;
}

@media (max-width: 1300px) {
    .system-split-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 900px) {
    .config-grid-3,
    .system-split-grid,
    .cron-split-container {
        grid-template-columns: 1fr;
    }
}

.panel-card {
    padding: 0;
    overflow: hidden;
    height: 100%;
}

.panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
}

.panel-header h3 {
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-primary);
}

.panel-body {
    max-height: 300px;
    overflow-y: auto;
    padding: 0;
}

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

.system-table th {
    text-align: left;
    background: var(--bg-hover);
    padding: 8px 20px;
    font-size: 10px;
    color: var(--text-tertiary);
    font-weight: 700;
    text-transform: uppercase;
}

.system-table td {
    padding: 8px 20px;
    border-bottom: 1px solid var(--bg-hover);
    font-size: 12px;
    text-align: left;
    vertical-align: middle;
}

.health-row-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.health-msg-inline {
    font-size: 11px;
    color: var(--text-tertiary);
    padding-left: 8px;
    border-left: 1px solid var(--border-light);
    line-height: 1;
}

.status-val {
    font-weight: 700;
    font-size: 12px;
}

.status-val.ok {
    color: var(--success);
}

.status-val.error {
    color: var(--error);
}

.status-val.info {
    color: var(--text-tertiary);
}

.status-icon {
    font-size: 18px;
    display: block;
}

.status-icon.ok {
    color: var(--success);
}

.status-icon.error {
    color: var(--error);
}

.status-icon.info {
    color: var(--text-tertiary);
}

.docs-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: start;
}

@media (max-width: 1200px) {
    .docs-container {
        grid-template-columns: 1fr;
    }
}

.highlight-box {
    background: #EEF0F3;
    color: #4c4c4d;
    padding: 15px;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 12px;
    margin: 10px 0;
    word-break: break-all;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checklist-item {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.checklist-icon {
    color: var(--success);
    font-weight: bold;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guide-card {
    margin-top: 25px;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
}

@media (max-width: 1000px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .arrow-divider {
        transform: rotate(90deg);
        margin: 10px 0;
    }
}

.step-item {
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    height: 100%;
    box-sizing: border-box;
}

.step-badge {
    position: absolute;
    top: -12px;
    left: 15px;
    background: var(--brand);
    color: #000000;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.step-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.step-desc {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.6;
}

.arrow-divider {
    color: var(--border-medium);
    display: flex;
    justify-content: center;
    font-size: 24px;
}

/* -----------------------------------------------------------------------------
15. UTILITÁRIOS: PRIVACIDADE & FILTROS
----------------------------------------------------------------------------- */
/* Modo Privacidade (Blur) */
body.privacy-active .sensitive {
    filter: blur(6px);
    user-select: none;
    cursor: default;
    transition: filter var(--transition-fast);
}

body.privacy-active input.sensitive,
body.privacy-active textarea.sensitive {
    color: transparent;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

/* Filtro Pílula */
.segmented-pills {
    display: flex;
    background: var(--bg-hover);
    padding: 4px;
    border-radius: var(--radius-md);
    gap: 4px;
    align-items: center;
    border: 1px solid var(--border-light);
    height: 36px;
    box-sizing: border-box;
}

.pill-option {
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    user-select: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 100%;
}

.pill-option:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.5);
}

.pill-option.active {
    background: var(--bg-surface);
    color: var(--brand-icon);
    box-shadow: var(--shadow-sm);
    font-weight: 700;
}

/* -----------------------------------------------------------------------------
16. RESPONSIVIDADE GERAL
----------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    aside {
        width: 180px;
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
    main {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    aside {
        display: none;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* -----------------------------------------------------------------------------
17. REGRA GLOBAL IMUTAVEL (SEM EFEITOS)
Sistema administrativo sem animacoes/transicoes/movimentos visuais.
So alterar essa regra mediante decisao explicita do administrador.
----------------------------------------------------------------------------- */
*, *::before, *::after {
    animation: none !important;
    transition: none !important;
}

html, body {
    scroll-behavior: auto !important;
}
