/* 
 * Quality Portal - Premium SaaS Theme
 * Modern, Vibrant, Intuitive
 */

 :root {
    /* Colors - Premium Light Theme */
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-card-bg: rgba(255, 255, 255, 0.8); /* For glass effect */
    
    --color-text-main: #0f172a;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;
    
    --color-border: #e2e8f0;
    --color-border-hover: #cbd5e1;
    
    --color-primary: #3b82f6; 
    --color-primary-grad: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    --color-primary-hover: #1d4ed8;
    
    --color-accent: #4f46e5;
    --color-accent-light: #e0e7ff;
    
    --color-success: #10b981;
    --color-success-light: #d1fae5;
    
    --color-error: #ef4444;
    --color-error-light: #fee2e2;

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.025);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-glow: 0 0 15px rgba(59, 130, 246, 0.3);
    
    --radius-xl: 1.25rem;
    --radius-lg: 1rem;
    --radius-md: 0.75rem;
    --radius-sm: 0.5rem;
    
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: radial-gradient(at 0% 0%, hsla(253,16%,7%,0.03) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,0.03) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,0.03) 0, transparent 50%);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

a:hover {
    color: var(--color-text-main);
}

/* Layout */
.app-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--color-text-main);
    background: var(--color-primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Wizard Card - Glassmorphism */
.wizard-card {
    background: var(--color-card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--qa-edge-255-255-255-500, rgba(255, 255, 255, 0.5));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: visible;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
}

@media (max-width: 640px) {
    .app-container {
        padding: 0;
    }
    .wizard-card {
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
    .dashboard-navbar {
        margin: 0 0 1.5rem 0 !important;
        top: 0 !important;
        padding: 0.25rem 0.5rem;
    }
}

.dashboard-navbar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 640px;
    z-index: 50;
    padding: 0.75rem 1.5rem;
}

#view-dashboard {
    animation: none !important;
    transform: none !important;
}

#bottom-tab-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    margin-top: auto;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 0.22rem 0 calc(0.26rem + env(safe-area-inset-bottom, 0px)) 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: color 0.18s ease, transform 0.15s ease;
    padding: 1px 14px;
    border-radius: 8px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.tab-item i {
    width: 0.95rem;
    height: 0.95rem;
    margin-bottom: 0.1rem;
    transition: transform 0.18s ease, color 0.18s ease;
}

.tab-item:hover {
    color: var(--color-primary);
}

.tab-item:active {
    transform: scale(0.95);
}

.tab-item.active {
    color: var(--color-primary);
}

.tab-item.active i {
    transform: scale(1.05);
}

@media (min-width: 641px) {
    #dashboard-navbar-container {
        border-top-left-radius: calc(var(--radius-xl) - 1px) !important;
        border-top-right-radius: calc(var(--radius-xl) - 1px) !important;
    }
    #bottom-tab-bar {
        border-bottom-left-radius: calc(var(--radius-xl) - 1px) !important;
        border-bottom-right-radius: calc(var(--radius-xl) - 1px) !important;
    }
}

.wizard-header {
    padding: 2.5rem 2rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: relative;
    background: linear-gradient(to bottom, var(--qa-bg-255-255-255-1000, rgba(255,255,255,1)), var(--qa-bg-255-255-255-500, rgba(255,255,255,0.5)));
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--color-primary-grad);
    width: 33%;
    transition: width var(--transition);
}

.header-text {
    text-align: left;
}

.step-indicator {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.wizard-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-main);
}

.wizard-header p {
    color: var(--color-text-muted);
    font-size: 1rem;
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 0.4rem 0.8rem;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.nav-pill:hover {
    background: var(--color-bg);
    border-color: var(--color-border-hover);
    color: var(--color-text-main);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.nav-pill i {
    width: 0.9rem;
    height: 0.9rem;
}

/* Views */
.wizard-body {
    padding: 1.5rem;
}

.view {
    display: none;
    animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view.active {
    display: block;
}

#view-dashboard.active {
    display: flex !important;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Grid Selection for Devices and Apps */
.grid-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.card-option {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.card-option i {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--color-text-muted);
    transition: all var(--transition);
}

.card-option .card-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text-main);
    transition: all var(--transition);
}

.card-option:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-3px);
}

.card-option:hover i {
    color: var(--color-primary);
    transform: scale(1.1);
}

.card-option:active {
    transform: translateY(-1px);
}

.badge-recommended {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--color-success);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-bottom-left-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Form Styles */
.selection-summary {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--color-border);
}
.summary-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.summary-item .label {
    color: var(--color-text-muted);
}

.summary-item .value {
    font-weight: 700;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.summary-item .value i {
    width: 1rem;
    height: 1rem;
    color: var(--color-accent);
}

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

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

.form-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-main);
    background: var(--color-surface);
    transition: all var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* Buttons */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--color-primary-grad);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--color-surface);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--color-border-hover);
    background-color: var(--color-bg);
    box-shadow: var(--shadow-md);
}

/* Utilities */
.spin {
    animation: spin 1s linear infinite;
}

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

.success-icon-container, .error-icon-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.success-icon-container {
    animation: bounceIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-icon {
    width: 4.5rem;
    height: 4.5rem;
    color: var(--color-success);
    filter: drop-shadow(0 4px 6px rgba(16, 185, 129, 0.2));
}

.error-icon {
    width: 4.5rem;
    height: 4.5rem;
    color: var(--color-error);
}

.credentials-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: var(--shadow-md);
}

.cred-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cred-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

.cred-value-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    transition: all var(--transition);
}

.cred-value-box:hover {
    border-color: var(--color-primary);
}

.cred-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    color: var(--color-text-main);
    word-break: break-all;
    font-size: 1.1rem;
}

.btn-copy {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-copy:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: scale(1.05);
}

/* PIN Input Styles */
.pin-input-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.pin-input {
    width: 3.5rem;
    height: 4.5rem;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 800;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text-main);
    transition: all var(--transition);
}

.pin-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

/* Dashboard App-like Navbar */
.dashboard-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: var(--qa-bg-255-255-255-900, rgba(255,255,255,0.9));
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-logo strong {
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    background: var(--color-primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.icon-btn {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    cursor: pointer;
    position: relative;
    padding: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* Status Cards */
.status-card {
    background: linear-gradient(135deg, var(--qa-bg-255-255-255-1000, rgba(255,255,255,1)) 0%, var(--qa-bg-248-250-252-1000, rgba(248,250,252,1)) 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.active {
    background: var(--color-success-light);
    color: var(--color-success);
}

.status-badge.expired {
    background: var(--color-error-light);
    color: var(--color-error);
}

/* Dashboard Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    gap: 0.75rem;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    color: var(--color-text-main);
    font-weight: 600;
    font-size: 0.9rem;
}

.action-btn i {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--color-primary);
    transition: all var(--transition);
}

.action-btn:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-btn:hover i {
    transform: scale(1.1);
}

/* --- New Dashboard Styles --- */


.client-account-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    overflow: hidden;
}



.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 480px) {
    .menu-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.menu-item {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    color: var(--color-text-main);
    box-shadow: var(--shadow-sm);
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    flex-shrink: 0;
}

.menu-item[data-tone="blue"] .menu-icon { color: var(--qa-ink-59-130-246-1000, #3b82f6); background: rgba(59, 130, 246, 0.1); }
.menu-item[data-tone="orange"] .menu-icon { color: var(--qa-ink-249-115-22-1000, #f97316); background: rgba(249, 115, 22, 0.1); }
.menu-item[data-tone="jade"] .menu-icon { color: var(--qa-ink-16-185-129-1000, #10b981); background: rgba(16, 185, 129, 0.1); }
.menu-item[data-tone="coral"] .menu-icon { color: var(--qa-ink-244-63-94-1000, #f43f5e); background: rgba(244, 63, 94, 0.1); }

.menu-item-copy {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.menu-item-copy strong {
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
    color: var(--color-text-main);
}

.menu-item-copy small {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.3;
}

.menu-chevron {
    font-size: 1.5rem;
    color: var(--color-border-hover);
    transition: transform var(--transition);
}

.menu-item:hover .menu-chevron {
    transform: translateX(4px);
    color: var(--color-primary);
}

/* ============================================================ */
/* NOVO FLUXO QUALITY: BOAS-VINDAS & ONBOARDING */
/* ============================================================ */
.welcome-hero-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.welcome-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #6366f1, #ec4899);
}

.welcome-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--qa-ink-79-70-229-1000, #4f46e5);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.welcome-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-text-main);
    letter-spacing: -0.03em;
    margin-bottom: 0.25rem;
}

.welcome-slogan {
    font-size: 0.95rem;
    color: var(--qa-ink-79-70-229-1000, #4f46e5);
    font-weight: 600;
    font-style: italic;
    margin-bottom: 1rem;
    display: block;
}

.welcome-desc {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.55;
    max-width: 480px;
    margin: 0 auto 1.5rem auto;
}

/* AVISO OBRIGATÓRIO SOBRE DURAÇÃO DE 6 HORAS */
.alert-notice-card {
    background: var(--qa-bg-255-251-235-1000, #fffbeb);
    border: 1px solid var(--qa-edge-253-230-138-1000, #fde68a);
    border-left: 4px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin: 1.5rem 0;
    text-align: left;
}

.alert-notice-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--qa-ink-180-83-9-1000, #b45309);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.alert-notice-header i {
    width: 1.2rem;
    height: 1.2rem;
    color: var(--qa-ink-217-119-6-1000, #d97706);
}

.alert-notice-list {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.82rem;
    color: var(--qa-ink-120-53-15-1000, #78350f);
    line-height: 1.6;
}

.alert-notice-list li {
    margin-bottom: 0.35rem;
}

.alert-notice-list strong {
    color: var(--qa-ink-146-64-14-1000, #92400e);
}

.btn-generate-hero {
    width: 100%;
    padding: 1.1rem;
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    transition: all 0.2s ease;
}

.btn-generate-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.btn-generate-hero:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================ */
/* PAINEL DO TESTE ATIVO ZEUS */
/* ============================================================ */
.portal-navbar-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 50;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: 0;
    padding: 0.75rem 1.25rem;
}

@media (max-width: 640px) {
    .portal-navbar-header {
        padding: 0.65rem 0.5rem;
    }
}

.portal-dashboard-content {
    padding: 1.25rem 1.25rem 2.5rem 1.25rem;
    flex: 1;
}

@media (max-width: 640px) {
    .portal-dashboard-content {
        padding: 0.65rem 0.35rem 2.5rem 0.35rem;
    }
}

.zeus-active-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.15rem;
    margin-bottom: 1.15rem;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 640px) {
    .zeus-active-box {
        padding: 0.75rem 0.6rem;
        margin-bottom: 0.75rem;
    }
}

.zeus-active-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--color-border);
}

.zeus-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--qa-ink-37-99-235-1000, #2563eb);
    border: 1px solid rgba(37, 99, 235, 0.25);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.zeus-screens-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--qa-ink-37-99-235-1000, #2563eb);
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
}

.zeus-connections-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(37, 99, 235, 0.04);
    border: 1px dashed rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.75rem;
    margin-bottom: 0.75rem;
}

.zeus-timer-wrapper {
    background: var(--qa-bg-248-250-252-1000, #f8fafc);
    border: 1px solid var(--qa-edge-226-232-240-1000, #e2e8f0);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.timer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timer-left i {
    transition: color 0.6s ease;
}

.timer-digits {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    transition: color 0.6s ease;
}

.timer-expiry-date {
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

/* Grid de Credenciais (2 Colunas Compactas) */
.creds-compact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.cred-compact-item {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.55rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.cred-compact-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.cred-compact-label {
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cred-compact-val {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cred-compact-item[style*="grid-column: 1 / -1"] .cred-compact-val {
    white-space: normal !important;
    word-break: break-all !important;
}

.btn-copy-chip {
    background: var(--qa-bg-255-255-255-1000, #ffffff);
    border: 1px solid var(--color-border);
    color: var(--qa-ink-79-70-229-1000, #4f46e5);
    padding: 2.5px 6px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
}

.btn-copy-chip:hover {
    background: var(--qa-bg-238-242-255-1000, #eef2ff);
    border-color: var(--qa-edge-199-210-254-1000, #c7d2fe);
}

/* ============================================================ */
/* CENTRAL DE APLICATIVOS QUALITY */
/* ============================================================ */
.apps-hub-container {
    margin-top: 1.5rem;
}

.apps-hub-header {
    margin-bottom: 1rem;
    text-align: left;
}

.apps-hub-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.apps-hub-subtitle {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* Carrossel Horizontal de Categorias de Dispositivos */
.device-tabs-carousel-wrapper {
    position: relative;
    margin-bottom: 1.25rem;
}

.device-tabs-carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 8px;
    width: 32px;
    background: linear-gradient(to right, transparent, var(--qa-bg-248-250-252-950, rgba(248, 250, 252, 0.95)));
    pointer-events: none;
    border-radius: 0 8px 8px 0;
}

.device-tabs-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    padding: 4px 16px 8px 4px;
    background: transparent;
    border: none;
    border-radius: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(37, 99, 235, 0.25) transparent;
    cursor: grab;
}

.device-tabs-bar.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.device-tabs-bar::-webkit-scrollbar {
    height: 4px;
}

.device-tabs-bar::-webkit-scrollbar-track {
    background: transparent;
}

.device-tabs-bar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 4px;
}

.device-tab-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    user-select: none;
}

.device-tab-btn:hover {
    color: var(--color-text-main);
    border-color: var(--qa-edge-203-213-225-1000, #cbd5e1);
    background: var(--qa-bg-248-250-252-1000, #f8fafc);
    transform: translateY(-1px);
}

.device-tab-btn.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    font-weight: 700;
}

.device-tab-btn.active i {
    color: #ffffff !important;
}

/* Lista de Cards de Aplicativos */
.apps-category-pane {
    display: none;
    flex-direction: column;
    gap: 0.85rem;
}

.apps-category-pane.active {
    display: flex;
}

.app-portal-tag.pending {
    background: rgba(245, 158, 11, 0.12);
    color: var(--qa-ink-217-119-6-1000, #d97706);
}

.app-portal-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.6rem 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.app-portal-card:hover {
    border-color: var(--qa-edge-203-213-225-1000, #cbd5e1);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.app-portal-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--qa-bg-241-245-249-1000, #f1f5f9);
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}

.app-portal-info {
    flex: 1;
    min-width: 0;
}

.app-portal-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    line-height: 1.3;
}

.app-portal-tag {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1.5px 5px;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--qa-ink-79-70-229-1000, #4f46e5);
    text-transform: uppercase;
}

.app-portal-tag.mac {
    background: rgba(16, 185, 129, 0.1);
    color: var(--qa-ink-5-150-105-1000, #059669);
}

.app-portal-desc {
    font-size: 0.73rem;
    color: var(--color-text-muted);
    margin-top: 2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-app-open {
    padding: 6px 11px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--qa-bg-248-250-252-1000, #f8fafc);
    color: var(--qa-ink-30-41-59-1000, #1e293b);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-app-open:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.btn-app-open.primary {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.btn-app-open.primary:hover {
    background: #1d4ed8;
}

/* MODAL DE INSTRUÇÕES DE APLICATIVO */
.app-instruction-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    padding: 1rem;
}

.app-instruction-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.app-instruction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: var(--color-surface);
    z-index: 2;
}

.app-instruction-body {
    padding: 1.25rem;
}

.step-instruction-box {
    background: var(--qa-bg-248-250-252-1000, #f8fafc);
    border: 1px solid var(--qa-edge-226-232-240-1000, #e2e8f0);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.step-instruction-box h4 {
    font-size: 0.9rem;
    color: var(--qa-ink-30-41-59-1000, #1e293b);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mac-confirm-notice {
    background: var(--qa-bg-255-251-235-1000, #fffbeb);
    border: 2px dashed #f59e0b;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    margin: 1rem 0;
}

.mac-big-display {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--qa-ink-180-83-9-1000, #b45309);
    letter-spacing: 0.08em;
    margin: 0.5rem 0;
    display: block;
}

/* --- Telas Independentes da Navegação --- */
.portal-screen {
    animation: portalScreenFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.portal-screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.65rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    gap: 0.5rem;
    width: 100%;
}

.btn-screen-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 5px 11px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--color-text-main);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.btn-screen-back:hover {
    border-color: #2563eb;
    color: var(--qa-ink-37-99-235-1000, #2563eb);
    background: rgba(37, 99, 235, 0.05);
}

.screen-header-center {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 0 4px;
}

.screen-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.btn-screen-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.btn-screen-home:hover {
    border-color: #2563eb;
    color: var(--qa-ink-37-99-235-1000, #2563eb);
    background: rgba(37, 99, 235, 0.05);
}

.screen-subtitle {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin: 0 0 0.85rem 0;
    line-height: 1.35;
}

/* Toast de Confirmação de Saída (Duplo Toque) */
.portal-exit-toast {
    position: fixed;
    bottom: 54px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: rgba(15, 23, 42, 0.94);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 90%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-exit-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Blocos Verticais Empilhados (Nível 1 - Menu Principal) */
.portal-vertical-blocks {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.portal-menu-block {
    display: flex;
    align-items: center;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    padding: 0.6rem 0.65rem;
    gap: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    text-decoration: none;
    position: relative;
}

.portal-menu-block:hover {
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.portal-menu-block:active {
    transform: translateY(0);
}

.portal-menu-block.primary {
    border-color: rgba(37, 99, 235, 0.35);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, var(--color-surface) 100%);
}

.portal-menu-block.primary:hover {
    border-color: #2563eb;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, var(--color-surface) 100%);
}

.menu-block-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.portal-menu-block:hover .menu-block-icon {
    transform: scale(1.06);
}

.menu-block-content {
    flex: 1;
    min-width: 0;
}

.portal-menu-block.compact {
    padding: 0.45rem 0.65rem;
}

.portal-menu-block.compact .menu-block-icon {
    width: 32px;
    height: 32px;
}

.menu-block-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    flex-wrap: nowrap;
}

.portal-menu-block.compact .menu-block-header {
    justify-content: space-between;
}

.config-options-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 0.75rem;
}

.config-option-tab {
    flex: 1;
    padding: 8px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1.5px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-text-muted);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.config-option-tab.active {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    color: var(--qa-ink-37-99-235-1000, #2563eb);
}

.menu-block-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.menu-block-badge {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1.5px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.menu-block-desc {
    font-size: 0.73rem;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.3;
}

.menu-block-arrow {
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.portal-menu-block:hover .menu-block-arrow {
    color: var(--qa-ink-37-99-235-1000, #2563eb);
    transform: translateX(3px);
}

/* Submenu de Dispositivos (Nível 2 - Lista Vertical de 11 Aparelhos) */
.portal-devices-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.portal-device-item {
    display: flex;
    align-items: center;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    gap: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.portal-device-item:hover {
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.07);
}

.portal-device-item:active {
    transform: translateY(0);
}

.device-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--qa-ink-37-99-235-1000, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.portal-device-item:hover .device-item-icon {
    transform: scale(1.06);
    background: #2563eb;
    color: white;
}

.device-item-info {
    flex: 1;
    min-width: 0;
}

.device-item-title {
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 1px;
}

.device-item-desc {
    display: block;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    line-height: 1.25;
}

.device-item-arrow {
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.portal-device-item:hover .device-item-arrow {
    color: var(--qa-ink-37-99-235-1000, #2563eb);
    transform: translateX(3px);
}

/* Submenu de Apps (Nível 3) */
.portal-apps-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

/* ============================================================
 * QUALITY PLANS & PIX CHECKOUT (ASAAS) STYLES
 * ============================================================ */

.plans-intro-box {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.35rem 0.5rem;
    margin-bottom: 0.65rem;
    text-align: center;
}

.plans-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.32);
    color: var(--qa-ink-16-185-129-1000, #10b981);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 16px;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.1);
}

.pending-payment-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(249, 115, 22, 0.08) 100%);
    border: 1px solid rgba(234, 179, 8, 0.35);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.65rem;
}

.pending-payment-banner-content {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.pending-payment-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eab308;
    color: var(--qa-ink-15-23-42-1000, #0f172a);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 11px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.pending-payment-banner-btn:hover {
    background: #ca8a04;
    transform: translateY(-1px);
}

.portal-plans-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
}

.portal-plan-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.85rem 0.95rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.portal-plan-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.portal-plan-card.featured {
    border: 2px solid #10b981;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.03) 0%, var(--color-surface) 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.1);
}

.plan-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.plan-title-wrapper {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.plan-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-text-main);
    margin: 0;
    line-height: 1.2;
}

.plan-period-badge {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.plan-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
}

.plan-badge.highlight {
    background: rgba(16, 185, 129, 0.12);
    color: var(--qa-ink-16-185-129-1000, #10b981);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.plan-badge.economy {
    background: rgba(37, 99, 235, 0.1);
    color: var(--qa-ink-37-99-235-1000, #2563eb);
    border: 1px solid rgba(37, 99, 235, 0.25);
}

.plan-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0.25rem 0 0.35rem 0;
    flex-wrap: wrap;
}

.plan-price-val-wrap {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.plan-price-currency {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--color-text-main);
}

.plan-price-val {
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--color-text-main);
    letter-spacing: -0.03em;
    line-height: 1;
}

.plan-price-period {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.plan-equiv-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--qa-ink-16-185-129-1000, #10b981);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 2px 7px;
    border-radius: 12px;
    white-space: nowrap;
}

.plan-specs-list {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    margin: 0 0 0.65rem 0;
    padding: 0.45rem 0.6rem;
    background: var(--qa-bg-0-0-0-20, rgba(0, 0, 0, 0.02));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

body.dark-theme .plan-specs-list {
    background: rgba(255, 255, 255, 0.025);
}

.plan-spec-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.75rem;
    color: var(--color-text-main);
    font-weight: 600;
    line-height: 1.3;
}

.plan-spec-item i {
    width: 14px;
    height: 14px;
    color: var(--qa-ink-16-185-129-1000, #10b981);
    flex-shrink: 0;
}

.btn-plan-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 800;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    background: #10b981;
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
    margin-top: auto;
}

.btn-plan-buy:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.portal-plan-card.featured .btn-plan-buy {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

/* Modal de Checkout Pix */
.pix-checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
}

.pix-checkout-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.pix-checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
    position: sticky;
    top: 0;
    z-index: 10;
}

.pix-checkout-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pix-summary-box {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pix-summary-plan {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-text-main);
}

.pix-summary-details {
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

.pix-summary-price {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--qa-ink-16-185-129-1000, #10b981);
}

.pix-qr-container {
    text-align: center;
    background: var(--qa-bg-255-255-255-1000, #ffffff);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pix-qr-img {
    width: 190px;
    height: 190px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--qa-edge-226-232-240-1000, #e2e8f0);
    margin-bottom: 0.5rem;
}

.pix-qr-caption {
    font-size: 0.74rem;
    color: var(--color-text-muted);
    line-height: 1.35;
    max-width: 280px;
}

.pix-copy-box {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.pix-copy-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

.pix-code-textarea {
    width: 100%;
    min-height: 54px;
    max-height: 70px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.6rem;
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--color-text-main);
    resize: none;
    outline: none;
    user-select: all;
}

.btn-copy-pix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 0.75rem;
    font-size: 0.85rem;
    font-weight: 800;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    background: #2563eb;
    color: #ffffff;
    border: none;
}

.btn-copy-pix:hover {
    background: #1d4ed8;
}

.btn-copy-pix.copied {
    background: #10b981;
}

.pix-status-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--qa-ink-180-83-9-1000, #b45309);
}

.pix-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    animation: pixPulse 1.8s infinite;
}

@keyframes pixPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 7px rgba(245, 158, 11, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

.pix-success-screen {
    text-align: center;
    padding: 1.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pix-success-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--qa-ink-16-185-129-1000, #10b981);
    animation: successBounce 0.5s ease-out;
}

@keyframes successBounce {
    0% { transform: scale(0.3); opacity: 0; }
    60% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); }
}

/* ============================================================
 * BOTÃO FLUTUANTE DE CHAT E WIDGET DE ATENDIMENTO WEB QUALITY
 * ============================================================ */

.portal-floating-chat-btn {
    position: fixed;
    bottom: 58px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 85;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-floating-chat-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.6);
}

.portal-floating-chat-btn:active {
    transform: scale(0.94);
}

.portal-chat-unread-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    border: 2px solid var(--color-bg, #ffffff);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.55);
    animation: pulseBadge 2s infinite;
}

.portal-chat-widget {
    position: fixed;
    bottom: 58px;
    right: 14px;
    width: 350px;
    height: 460px;
    max-height: calc(100vh - 75px);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
    z-index: 95;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: chatWidgetIn 0.22s ease-out;
}

@keyframes chatWidgetIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.portal-chat-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.portal-chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.portal-chat-header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.12);
    color: var(--qa-ink-37-99-235-1000, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.portal-chat-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0;
    line-height: 1.2;
}

.portal-chat-status {
    font-size: 0.68rem;
    color: var(--qa-ink-16-185-129-1000, #10b981);
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.chat-status-pulse {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px #10b981;
}

.portal-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.chat-action-btn.whatsapp {
    background: rgba(37, 211, 102, 0.12);
    border-color: rgba(37, 211, 102, 0.3);
    color: var(--qa-ink-37-211-102-1000, #25D366);
}

.chat-action-btn:hover {
    color: var(--color-text-main);
    border-color: var(--color-text-muted);
}

.portal-chat-whatsapp-banner {
    background: rgba(37, 211, 102, 0.08);
    border-bottom: 1px solid rgba(37, 211, 102, 0.18);
    padding: 5px 12px;
    font-size: 0.68rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-chat-whatsapp-banner a {
    color: var(--qa-ink-22-163-74-1000, #16a34a);
    font-weight: 700;
    text-decoration: underline;
}

.portal-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--color-bg);
}

.chat-empty-hint {
    margin: auto;
    text-align: center;
    padding: 1.5rem 1rem;
}

.chat-msg-row {
    display: flex;
    flex-direction: column;
    max-width: 82%;
}

.chat-msg-row.client {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-msg-row.admin {
    align-self: flex-start;
    align-items: flex-start;
}

.chat-msg-bubble {
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 0.82rem;
    line-height: 1.45;
    word-break: break-word;
    white-space: pre-wrap;
}

/* Card Especial de Confirmação de Assinatura no Chat */
.portal-sub-confirm-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border: 1px solid var(--qa-edge-59-130-246-400, rgba(59, 130, 246, 0.4));
    border-radius: 12px;
    padding: 12px 14px;
    margin: 4px 0;
    color: #f8fafc;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    max-width: 320px;
    white-space: normal;
    text-align: left;
}
.portal-sub-confirm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.portal-sub-confirm-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--qa-ink-56-189-248-1000, #38bdf8);
    display: flex;
    align-items: center;
    gap: 6px;
}
.portal-sub-confirm-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(16, 185, 129, 0.2);
    color: var(--qa-ink-52-211-153-1000, #34d399);
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
}
.portal-sub-confirm-intro {
    font-size: 0.78rem;
    color: var(--qa-ink-203-213-225-1000, #cbd5e1);
    margin-bottom: 10px;
    line-height: 1.35;
}
.portal-sub-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
}
.portal-sub-detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
}
.portal-sub-detail-label {
    color: var(--qa-ink-148-163-184-1000, #94a3b8);
    display: flex;
    align-items: center;
    gap: 5px;
}
.portal-sub-detail-value {
    color: #f1f5f9;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.portal-sub-detail-value code {
    background: rgba(0, 0, 0, 0.45);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.82rem;
    color: var(--qa-ink-56-189-248-1000, #38bdf8);
    border: 1px solid rgba(56, 189, 248, 0.2);
}
.portal-sub-copy-btn {
    background: none;
    border: none;
    color: var(--qa-ink-148-163-184-1000, #94a3b8);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 0.75rem;
    border-radius: 3px;
    transition: all 0.2s;
}
.portal-sub-copy-btn:hover {
    color: var(--qa-ink-56-189-248-1000, #38bdf8);
    background: rgba(56, 189, 248, 0.15);
}
.portal-sub-footer {
    font-size: 0.72rem;
    color: var(--qa-ink-148-163-184-1000, #94a3b8);
    line-height: 1.35;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.portal-sub-invoice-tag {
    font-size: 0.65rem;
    font-family: monospace;
    color: var(--qa-ink-100-116-139-1000, #64748b);
}

.chat-msg-row.client .chat-msg-bubble {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border-bottom-right-radius: 3px;
}

.chat-msg-row.admin .chat-msg-bubble {
    background: var(--color-surface);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
    border-bottom-left-radius: 3px;
}

.chat-sender-tag {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--qa-ink-59-130-246-1000, #3b82f6);
    margin-bottom: 2px;
    display: block;
}

.chat-msg-time {
    font-size: 0.62rem;
    color: var(--color-text-muted);
    margin-top: 3px;
    padding: 0 4px;
}

.chat-msg-bubble-media {
    padding: 6px !important;
}

.portal-chat-media-img {
    max-width: 220px;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    display: block;
    transition: opacity 0.2s ease;
}

.portal-chat-media-img:hover {
    opacity: 0.9;
}

.portal-chat-media-video {
    max-width: 240px;
    max-height: 180px;
    width: 100%;
    border-radius: 10px;
    background: #000000;
    display: block;
}

.portal-chat-media-audio {
    width: 210px;
    height: 38px;
    display: block;
    outline: none;
}

.portal-chat-media-caption {
    font-size: 0.8rem;
    line-height: 1.3;
    padding: 6px 4px 2px 4px;
    word-break: break-word;
}

.portal-chat-form {
    padding: 8px 10px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 8px;
    align-items: center;
}

.portal-chat-form input {
    flex: 1;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 0.82rem;
    color: var(--color-text-main);
    outline: none;
    transition: border-color 0.15s ease;
}

.portal-chat-form input:focus {
    border-color: #2563eb;
}

.portal-chat-form button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.portal-chat-form button:hover {
    transform: scale(1.08);
}

.portal-chat-form button:active {
    transform: scale(0.92);
}

/* Botões Auxiliares de Mídia e Áudio no Portal */
.portal-chat-btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: transparent !important;
    color: var(--color-text-muted) !important;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.portal-chat-btn-icon:hover {
    background: rgba(37, 99, 235, 0.1) !important;
    color: var(--qa-ink-37-99-235-1000, #2563eb) !important;
    transform: scale(1.06);
}

.portal-chat-btn-icon:active {
    transform: scale(0.94);
}

.portal-chat-btn-icon.mic {
    background: rgba(37, 99, 235, 0.12) !important;
    color: var(--qa-ink-37-99-235-1000, #2563eb) !important;
}

.portal-chat-btn-icon.mic:hover {
    background: #2563eb !important;
    color: #ffffff !important;
}

/* Barra de Gravação de Áudio do Portal */
.portal-recording-bar {
    padding: 8px 12px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    animation: popupSlideUp 0.18s ease-out;
}

.btn-portal-rec-cancel {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--qa-bg-254-226-226-1000, #fee2e2);
    color: var(--qa-ink-239-68-68-1000, #ef4444);
    border: 1px solid var(--qa-edge-252-165-165-1000, #fca5a5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.btn-portal-rec-cancel:hover {
    background: #ef4444;
    color: #ffffff;
}

.portal-rec-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.portal-rec-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    animation: pulseRed 1s infinite;
}

@keyframes pulseRed {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.portal-rec-timer {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-text-main);
    font-family: monospace;
}

.portal-rec-label {
    font-size: 0.74rem;
    color: var(--color-text-muted);
}

.btn-portal-rec-send {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.btn-portal-rec-send:hover {
    background: #15803d;
    transform: scale(1.08);
}

/* Menu Flutuante de Anexos no Portal */
.portal-attach-menu {
    position: absolute;
    bottom: 56px;
    left: 8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
    padding: 8px 10px;
    display: flex;
    gap: 10px;
    z-index: 1000;
    animation: popupSlideUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: calc(100% - 16px);
}

.portal-attach-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    padding: 4px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.portal-attach-item:hover,
.portal-attach-item:active {
    background: rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}

.portal-attach-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.14);
}

.portal-attach-icon.blue { background: linear-gradient(135deg, #0284c7, #2563eb); }
.portal-attach-icon.green { background: linear-gradient(135deg, #10b981, #059669); }
.portal-attach-icon.red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.portal-attach-icon.amber { background: linear-gradient(135deg, #f59e0b, #d97706); }

.portal-attach-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-text-muted);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .portal-chat-widget {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
        z-index: 99999;
        display: flex;
        flex-direction: column;
        overscroll-behavior: none;
    }

    .portal-chat-header {
        flex-shrink: 0;
        padding-top: max(10px, env(safe-area-inset-top));
    }

    .portal-chat-whatsapp-banner {
        flex-shrink: 0;
    }

    .portal-chat-form {
        flex-shrink: 0;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
}

body.portal-chat-locked,
html.portal-chat-locked {
    overflow: hidden !important;
    height: 100% !important;
    touch-action: pan-y;
}

/* ============================================================
 * TELA INFORMATIVA: PLANOS POR SERVIDOR (#screen-info-plans)
 * ============================================================ */

.server-info-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.server-info-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.server-info-card.highlighted-server {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.08);
}

.server-info-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.server-info-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-text-main);
    margin: 0;
}

.server-info-subtitle {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    display: block;
    margin-top: 2px;
}

.server-badge-screen {
    font-size: 0.64rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--qa-ink-16-185-129-1000, #10b981);
}

.server-badge-screen.blue {
    background: rgba(37, 99, 235, 0.12);
    color: var(--qa-ink-37-99-235-1000, #2563eb);
}

.server-badge-screen.orange {
    background: rgba(249, 115, 22, 0.12);
    color: var(--qa-ink-249-115-22-1000, #f97316);
}

.server-badge-online {
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--qa-ink-16-185-129-1000, #10b981);
    letter-spacing: 0.04em;
}

.server-features-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
}

.server-feat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    color: var(--color-text-main);
}

.server-feat-item svg {
    width: 13px;
    height: 13px;
    color: var(--qa-ink-16-185-129-1000, #10b981);
    flex-shrink: 0;
}

.server-plans-pricing-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px dashed var(--color-border);
    padding-top: 6px;
}

.server-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.76rem;
    padding: 3px 0;
}

.server-price-item.highlight-price {
    font-weight: 700;
    color: var(--qa-ink-16-185-129-1000, #10b981);
}

.server-price-name {
    color: var(--color-text-muted);
}

.server-price-val {
    color: var(--color-text-main);
    font-size: 0.78rem;
}

.server-price-val small {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    font-weight: normal;
}

/* ============================================================ */
/* AVISOS & NOTIFICAÇÕES DO PORTAL DO CLIENTE */
/* ============================================================ */
.header-notif-btn {
    position: relative !important;
    cursor: pointer;
    background: rgba(245, 158, 11, 0.14) !important;
    border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-notif-btn svg,
.header-notif-btn i {
    color: var(--qa-ink-245-158-11-1000, #f59e0b) !important;
    filter: drop-shadow(0 1px 2px rgba(245, 158, 11, 0.35));
}

.header-notif-btn:hover {
    transform: scale(1.08);
    background: rgba(245, 158, 11, 0.24) !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

.notifications-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ef4444 0%, #ea580c 100%);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.55);
    border: 1.5px solid var(--color-surface);
    line-height: 1;
    pointer-events: none;
    animation: notifBadgePulse 2.2s infinite ease-in-out;
}

@keyframes notifBadgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.12);
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
    }
}

/* Modal de Notificações do Portal */
.portal-modal-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.72) !important;
    z-index: 99999 !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 1rem;
    box-sizing: border-box;
}

.notif-modal-container {
    max-width: 480px;
    width: 95%;
    max-height: 84vh;
    border-radius: 18px;
    background: var(--color-surface);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 100000;
    animation: notifModalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
    flex-shrink: 0;
}

.portal-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.portal-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    padding: 0;
    flex-shrink: 0;
}

.portal-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--qa-ink-239-68-68-1000, #ef4444);
    transform: scale(1.05);
}

@keyframes notifModalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.notif-header-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--qa-ink-245-158-11-1000, #f59e0b);
}

.notif-header-icon-box svg,
.notif-header-icon-box i {
    color: var(--qa-ink-245-158-11-1000, #f59e0b) !important;
}

/* Barra de Ações: Marcar como Lido */
.notif-modal-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1.15rem;
    background: var(--qa-bg-0-0-0-20, rgba(0, 0, 0, 0.02));
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

body.dark-theme .notif-modal-action-bar {
    background: rgba(255, 255, 255, 0.02);
}

.notif-action-status {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.notif-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
    display: inline-block;
    animation: notifPulse 2s infinite;
}

@keyframes notifPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.btn-mark-all-read {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.1);
    color: var(--qa-ink-217-119-6-1000, #d97706);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.dark-theme .btn-mark-all-read {
    color: var(--qa-ink-251-191-36-1000, #fbbf24);
}

.btn-mark-all-read:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.7);
    transform: translateY(-1px);
}

.btn-mark-all-read.all-read,
.btn-mark-all-read:disabled {
    background: var(--qa-bg-0-0-0-30, rgba(0, 0, 0, 0.03));
    border-color: var(--color-border);
    color: var(--color-text-muted);
    cursor: default;
    transform: none;
    opacity: 0.65;
}

body.dark-theme .btn-mark-all-read.all-read,
body.dark-theme .btn-mark-all-read:disabled {
    background: rgba(255, 255, 255, 0.04);
}

.notif-pill-new {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.15);
    color: var(--qa-ink-239-68-68-1000, #ef4444);
    border: 1px solid rgba(239, 68, 68, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.notif-pill-read {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.62rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--qa-bg-0-0-0-40, rgba(0, 0, 0, 0.04));
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

body.dark-theme .notif-pill-read {
    background: rgba(255, 255, 255, 0.05);
}

.portal-notif-item.is-read {
    opacity: 0.75;
}

.portal-notif-item.is-read:hover {
    opacity: 1;
}

.notif-modal-body {
    padding: 1rem 1.15rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: calc(82vh - 120px);
}

.portal-notif-item {
    border-radius: 14px;
    padding: 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-left-width: 4px;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.portal-notif-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.portal-notif-item.type-info {
    border-left-color: var(--qa-edge-56-189-248-1000, #38bdf8);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.04) 0%, var(--color-bg) 100%);
}

.portal-notif-item.type-success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.04) 0%, var(--color-bg) 100%);
}

.portal-notif-item.type-warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.04) 0%, var(--color-bg) 100%);
}

.portal-notif-item.type-alert {
    border-left-color: var(--qa-edge-239-68-68-1000, #ef4444);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.04) 0%, var(--color-bg) 100%);
}

.notif-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.notif-item-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 6px;
    text-transform: uppercase;
}

.type-info .notif-item-badge {
    background: rgba(56, 189, 248, 0.15);
    color: var(--qa-ink-2-132-199-1000, #0284c7);
}

.type-success .notif-item-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--qa-ink-5-150-105-1000, #059669);
}

.type-warning .notif-item-badge {
    background: rgba(245, 158, 11, 0.15);
    color: var(--qa-ink-217-119-6-1000, #d97706);
}

.type-alert .notif-item-badge {
    background: rgba(239, 68, 68, 0.15);
    color: var(--qa-ink-220-38-38-1000, #dc2626);
}

.notif-item-date {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.notif-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-main);
    line-height: 1.3;
    margin: 0;
}

.notif-item-body {
    font-size: 0.84rem;
    color: var(--color-text-muted);
    line-height: 1.55;
    word-break: break-word;
}

.notif-item-body strong {
    color: var(--color-text-main);
    font-weight: 700;
}

.notif-item-body em {
    font-style: italic;
}

.notif-item-body u {
    text-decoration: underline;
}

.notif-empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--color-text-muted);
}

.notif-empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem auto;
    color: var(--color-text-muted);
}

/* Mídias em Comunicados (Áudio e Vídeo) */
.portal-notif-media {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.portal-notif-audio-wrap {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.portal-notif-media-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.portal-notif-audio-player {
    width: 100%;
    height: 36px;
    outline: none;
}
.portal-notif-video-wrap {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    max-height: 280px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.portal-notif-video-player {
    width: 100%;
    max-height: 280px;
    display: block;
    object-fit: contain;
    background: #000;
}
.notif-pill-forced {
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--qa-ink-239-68-68-1000, #ef4444);
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid var(--qa-edge-239-68-68-400, rgba(239, 68, 68, 0.4));
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    animation: pulse-forced 2s infinite ease-in-out;
}
@keyframes pulse-forced {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.98); }
}
.notif-item-footer-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}
.btn-notif-mark-single {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--qa-edge-59-130-246-400, rgba(59, 130, 246, 0.4));
    background: rgba(59, 130, 246, 0.12);
    color: var(--qa-ink-56-189-248-1000, #38bdf8);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-notif-mark-single:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* Modal de Comunicado Forçado Obrigatório */
.forced-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 14, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 999999;
}

.forced-modal-container {
    width: 100%;
    max-width: 500px;
    background: #0f172a;
    border: 1px solid var(--qa-edge-239-68-68-450, rgba(239, 68, 68, 0.45));
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 35px -5px rgba(239, 68, 68, 0.25);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: fadeInCard 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.forced-modal-header {
    padding: 1.25rem 1.5rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.12) 0%, transparent 100%);
}

.forced-header-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.forced-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--qa-ink-239-68-68-1000, #ef4444);
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid var(--qa-edge-239-68-68-400, rgba(239, 68, 68, 0.4));
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.forced-header-date {
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

.forced-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-text-main);
    line-height: 1.35;
}

.forced-modal-body {
    padding: 1.25rem 1.5rem;
    max-height: 55vh;
    overflow-y: auto;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--qa-ink-203-213-225-1000, #cbd5e1);
}

.forced-modal-body::-webkit-scrollbar {
    width: 4px;
}
.forced-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.forced-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    justify-content: stretch;
}

.btn-confirm-forced-read {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: 1px solid var(--qa-edge-56-189-248-400, rgba(56, 189, 248, 0.4));
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-confirm-forced-read:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.5);
    transform: translateY(-1px);
}

/* ============================================================
   CARTÃO PERSISTENTE DE RESUMO DA ASSINATURA NO CHAT WEB
   ============================================================ */
.portal-chat-pinned-card {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0.65rem 0.85rem;
    font-size: 0.78rem;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    z-index: 5;
}

.chat-pinned-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.chat-pinned-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.chat-pinned-badge.active {
    background: rgba(16, 185, 129, 0.12);
    color: var(--qa-ink-16-185-129-1000, #10b981);
}

.chat-pinned-badge.expired {
    background: rgba(239, 68, 68, 0.12);
    color: var(--qa-ink-239-68-68-1000, #ef4444);
}

.chat-pinned-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    background: var(--color-bg);
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    margin-bottom: 0.35rem;
}

.chat-pinned-item {
    display: flex;
    flex-direction: column;
}

.chat-pinned-label {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.chat-pinned-val {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--color-text-main);
    font-family: ui-monospace, SFMono-Regular, monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-pinned-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.chat-pinned-btn-faturas {
    background: transparent;
    border: none;
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.72rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* ============================================================
   CENTRAL DE FATURAS & TELAS DE CLIENTES ASSINANTES
   ============================================================ */
.invoices-summary-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.invoice-item-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.invoice-item-card:hover {
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.invoice-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.invoice-plan-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-text-main);
}

.invoice-amount {
    font-size: 1rem;
    font-weight: 800;
    color: var(--qa-ink-16-185-129-1000, #10b981);
}

.invoice-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.invoice-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.invoice-badge.confirmed {
    background: rgba(16, 185, 129, 0.12);
    color: var(--qa-ink-16-185-129-1000, #10b981);
}

.invoice-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--qa-ink-217-119-6-1000, #d97706);
}

.invoice-badge.cancelled {
    background: rgba(107, 114, 128, 0.12);
    color: var(--qa-ink-107-114-128-1000, #6b7280);
}

.invoice-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.btn-invoice-pix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.45rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-invoice-pix:hover {
    opacity: 0.9;
}

.btn-invoice-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: var(--color-bg);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.45rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.btn-invoice-receipt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--qa-ink-37-99-235-1000, #2563eb);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 6px;
    padding: 0.45rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-invoice-receipt:hover {
    background: #2563eb;
    color: #ffffff;
}

/* Visibilidade alternada Mobile / Desktop para Faturas */
.invoices-mobile-cards-list {
    display: block;
}

.invoices-desktop-table-wrapper {
    display: none;
}

/* Telas informativas (Conteúdos Adultos, Senha, Atualizações) */
.portal-info-section-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.portal-info-icon-hero {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
}

/* ============================================================ */
/* REGRAS BASE DE COMPATIBILIDADE RESPONSIVA (MOBILE FIRST)     */
/* Elementos exclusivos do desktop ficam ocultos por padrão     */
/* ============================================================ */
.portal-desktop-sidebar {
    display: none;
}
.desktop-header-back-btn {
    display: none;
}
#portal-chat-maximize-btn {
    display: none;
}

/* Badges e Acessos Diretos em Configurar Dispositivo */
.device-item-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.03em;
    display: inline-block;
}

.portal-device-item.special-connect-item {
    border-color: rgba(37, 99, 235, 0.2);
    background: var(--color-surface);
}

.portal-device-item.special-connect-item:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.devices-section-group {
    margin-bottom: 1.25rem;
}

/* ============================================================ */
/* LAYOUT DESKTOP AMPLO E RESPONSIVO (>= 1024px)                */
/* Preserva 100% da experiência mobile abaixo de 1024px         */
/* ============================================================ */
@media (min-width: 1024px) {
    :root {
        --sidebar-width: 260px;
        --sidebar-collapsed-width: 74px;
        --navbar-height: 64px;
    }

    /* 1. ESTADO DESLOGADO NO DESKTOP */
    body:not(.portal-logged-in) .portal-desktop-sidebar {
        display: none !important;
    }
    body:not(.portal-logged-in) .portal-navbar-header {
        display: none !important;
    }
    body:not(.portal-logged-in) .app-container {
        max-width: 460px !important;
        margin: 4rem auto !important;
        padding: 0 !important;
    }
    body:not(.portal-logged-in) .wizard-card {
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-xl);
        padding: 2.2rem 2rem;
    }

    /* 2. ESTADO LOGADO NO DESKTOP */
    body.portal-logged-in {
        overflow-x: hidden;
    }

    /* Menu Lateral Esquerdo Fixo */
    body.portal-logged-in .portal-desktop-sidebar {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: var(--sidebar-width);
        background: var(--color-surface);
        border-right: 1px solid var(--color-border);
        z-index: 100;
        transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
        user-select: none;
        box-shadow: 1px 0 10px rgba(0, 0, 0, 0.03);
    }

    body.portal-logged-in.sidebar-collapsed .portal-desktop-sidebar {
        width: var(--sidebar-collapsed-width);
    }

    /* Topo do Menu Lateral */
    .sidebar-header {
        height: var(--navbar-height);
        padding: 0 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid var(--color-border);
        flex-shrink: 0;
    }

    .sidebar-brand-box {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        overflow: hidden;
    }

    .sidebar-brand-logo {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        background: var(--color-bg);
        border: 1px solid var(--color-border);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        flex-shrink: 0;
    }

    .sidebar-brand-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .sidebar-brand-fallback {
        font-weight: 800;
        font-size: 0.85rem;
        color: var(--color-primary);
    }

    .sidebar-brand-text {
        display: flex;
        flex-direction: column;
        white-space: nowrap;
        transition: opacity 0.2s, width 0.2s;
    }

    .sidebar-brand-title {
        font-size: 1.05rem;
        font-weight: 800;
        color: var(--color-text-main);
        line-height: 1.1;
        letter-spacing: -0.02em;
    }

    .sidebar-brand-subtitle {
        font-size: 0.68rem;
        color: var(--color-text-muted);
        font-weight: 500;
    }

    .sidebar-toggle-btn {
        background: var(--color-bg);
        border: 1px solid var(--color-border);
        color: var(--color-text-muted);
        width: 30px;
        height: 30px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
        flex-shrink: 0;
    }

    .sidebar-toggle-btn:hover {
        color: var(--color-text-main);
        border-color: var(--color-border-hover);
        background: var(--color-surface);
    }

    body.portal-logged-in.sidebar-collapsed #sidebar-toggle-icon {
        transform: rotate(180deg);
    }

    /* Conteúdo com rolagem própria vertical */
    .sidebar-content {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 1rem 0.75rem;
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .sidebar-content::-webkit-scrollbar {
        width: 5px;
    }
    .sidebar-content::-webkit-scrollbar-track {
        background: transparent;
    }
    .sidebar-content::-webkit-scrollbar-thumb {
        background: var(--color-border);
        border-radius: 4px;
    }

    /* Grupos do Menu */
    .sidebar-group {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
    }

    .sidebar-group-title {
        font-size: 0.68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--color-text-light);
        padding: 0 0.65rem 0.25rem 0.65rem;
        white-space: nowrap;
        transition: opacity 0.2s;
    }

    .sidebar-menu-list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
    }

    .sidebar-menu-item {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.6rem 0.65rem;
        border-radius: 8px;
        border: 1px solid transparent;
        background: transparent;
        color: var(--color-text-muted);
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        text-align: left;
        transition: all 0.15s ease-in-out;
        white-space: nowrap;
        position: relative;
    }

    .sidebar-menu-item:hover {
        background: var(--color-bg);
        color: var(--color-text-main);
        border-color: var(--color-border);
    }

    .sidebar-menu-item.active {
        background: rgba(37, 99, 235, 0.08);
        color: var(--qa-ink-37-99-235-1000, #2563eb);
        border-color: rgba(37, 99, 235, 0.2);
        font-weight: 700;
    }

    .sidebar-item-icon {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

    .sidebar-item-label {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        transition: opacity 0.2s;
    }

    .sidebar-item-badge {
        font-size: 0.62rem;
        font-weight: 700;
        padding: 2px 6px;
        border-radius: 10px;
        background: var(--color-bg);
        color: var(--color-text-muted);
        border: 1px solid var(--color-border);
        flex-shrink: 0;
    }

    .sidebar-item-badge.badge-green {
        background: rgba(16, 185, 129, 0.1);
        color: var(--qa-ink-16-185-129-1000, #10b981);
        border-color: rgba(16, 185, 129, 0.2);
    }

    .sidebar-item-badge.badge-warn {
        background: rgba(245, 158, 11, 0.1);
        color: var(--qa-ink-245-158-11-1000, #f59e0b);
        border-color: rgba(245, 158, 11, 0.2);
    }

    /* Rodapé da Sidebar */
    .sidebar-footer {
        padding: 0.75rem;
        border-top: 1px solid var(--color-border);
        flex-shrink: 0;
    }

    .sidebar-logout-btn {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.6rem 0.65rem;
        border-radius: 8px;
        border: 1px solid transparent;
        background: transparent;
        color: var(--qa-ink-239-68-68-1000, #ef4444);
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.15s ease;
        white-space: nowrap;
    }

    .sidebar-logout-btn:hover {
        background: rgba(239, 68, 68, 0.08);
        border-color: rgba(239, 68, 68, 0.2);
    }

    /* Sidebar Recolhida (Collapsed) */
    body.portal-logged-in.sidebar-collapsed .sidebar-brand-text,
    body.portal-logged-in.sidebar-collapsed .sidebar-group-title,
    body.portal-logged-in.sidebar-collapsed .sidebar-item-label,
    body.portal-logged-in.sidebar-collapsed .sidebar-item-badge {
        display: none !important;
    }

    body.portal-logged-in.sidebar-collapsed .sidebar-header {
        justify-content: center;
        padding: 0 0.5rem;
    }

    body.portal-logged-in.sidebar-collapsed .sidebar-brand-box {
        display: none !important;
    }

    body.portal-logged-in.sidebar-collapsed .sidebar-menu-item,
    body.portal-logged-in.sidebar-collapsed .sidebar-logout-btn {
        justify-content: center;
        padding: 0.65rem 0;
    }

    /* Cabeçalho Fixo Desktop */
    body.portal-logged-in .portal-navbar-header {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: var(--sidebar-width) !important;
        width: calc(100% - var(--sidebar-width)) !important;
        height: var(--navbar-height) !important;
        max-width: none !important;
        transform: none !important;
        background: var(--color-surface) !important;
        border-bottom: 1px solid var(--color-border) !important;
        z-index: 90 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 2rem !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
        transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    body.portal-logged-in.sidebar-collapsed .portal-navbar-header {
        left: var(--sidebar-collapsed-width) !important;
        width: calc(100% - var(--sidebar-collapsed-width)) !important;
    }

    /* Botão Voltar no Cabeçalho Desktop */
    .desktop-header-back-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.45rem;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        background: var(--color-bg);
        color: var(--color-text-main);
        cursor: pointer;
        transition: all 0.2s;
        margin-right: 0.5rem;
    }

    .desktop-header-back-btn:hover {
        background: var(--color-surface);
        border-color: var(--color-border-hover);
    }

    /* Área Principal de Conteúdo Desktop */
    body.portal-logged-in .app-container {
        max-width: none !important;
        margin: 0 !important;
        margin-left: var(--sidebar-width) !important;
        width: calc(100% - var(--sidebar-width)) !important;
        padding: calc(var(--navbar-height) + 1.75rem) 2.5rem 3rem 2.5rem !important;
        min-height: 100vh !important;
        transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-sizing: border-box !important;
    }

    body.portal-logged-in.sidebar-collapsed .app-container {
        margin-left: var(--sidebar-collapsed-width) !important;
        width: calc(100% - var(--sidebar-collapsed-width)) !important;
    }

    body.portal-logged-in .wizard-card {
        max-width: 1400px;
        margin: 0 auto;
        width: 100%;
        border: none;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    /* Ocultar barra de abas inferior no Desktop */
    #bottom-tab-bar {
        display: none !important;
    }

    /* Reorganização de Grids no Desktop */
    .portal-dashboard-content {
        padding: 0 !important;
        max-width: 1280px;
        margin: 0 auto;
        width: 100%;
    }

    .zeus-active-box {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
    }

    .creds-compact-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
    }

    /* Blocos Verticais -> Grid Multi-Coluna */
    .portal-vertical-blocks {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)) !important;
        gap: 1rem !important;
    }

    .portal-vertical-block {
        margin-bottom: 0 !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s !important;
    }

    .portal-vertical-block:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md) !important;
        border-color: var(--qa-edge-59-130-246-1000, #3b82f6) !important;
    }

    /* Dispositivos -> Grid Multi-Coluna */
    .portal-devices-list {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
        gap: 1rem !important;
    }

    .portal-device-item {
        margin-bottom: 0 !important;
        height: 100% !important;
        transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s !important;
    }

    .portal-device-item:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md) !important;
        border-color: var(--qa-edge-59-130-246-1000, #3b82f6) !important;
    }

    /* Aplicativos -> Grid Multi-Coluna */
    .portal-apps-list {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
        gap: 1.25rem !important;
    }

    .portal-app-card {
        margin-bottom: 0 !important;
        height: 100% !important;
        transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s !important;
    }

    .portal-app-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md) !important;
    }

    /* Planos -> Grid Multi-Coluna */
    .portal-plans-list {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
        gap: 1.25rem !important;
    }

    .portal-plan-card {
        margin-bottom: 0 !important;
        height: 100% !important;
        transition: transform 0.2s, box-shadow 0.2s !important;
    }

    .portal-plan-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg) !important;
    }

    /* Faturas / Histórico no Desktop */
    .invoices-mobile-cards-list {
        display: none !important;
    }

    .invoices-desktop-table-wrapper {
        display: block !important;
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: 12px;
        overflow-x: auto;
        box-shadow: var(--shadow-sm);
        margin-top: 0.5rem;
    }

    .invoices-desktop-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.84rem;
        text-align: left;
    }

    .invoices-desktop-table thead th {
        background: var(--qa-bg-0-0-0-20, rgba(0, 0, 0, 0.02));
        color: var(--color-text-muted);
        font-weight: 700;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--color-border);
        white-space: nowrap;
    }

    .invoices-desktop-table tbody td {
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--color-border);
        vertical-align: middle;
        color: var(--color-text-main);
    }

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

    .invoices-desktop-table tbody tr:hover {
        background: rgba(37, 99, 235, 0.02);
    }

    .invoice-item-card {
        margin-bottom: 0 !important;
    }

    /* Telas internas no Desktop */
    .portal-screen {
        max-width: 1200px;
        margin: 0 auto;
    }

    /* Chat Flutuante no Desktop */
    .portal-chat-widget {
        bottom: 24px !important;
        right: 24px !important;
        width: 390px !important;
        height: 560px !important;
        max-height: calc(100vh - 100px) !important;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25) !important;
        border-radius: 16px !important;
        transition: width 0.25s ease, height 0.25s ease !important;
    }

    .portal-chat-widget.expanded {
        width: 520px !important;
        height: 700px !important;
        max-height: calc(100vh - 80px) !important;
    }

    #portal-chat-maximize-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .portal-floating-chat-btn {
        bottom: 24px !important;
        right: 24px !important;
    }
}

/* ============================================================
   IMPRESSÃO DE COMPROVANTE (RECEIPT PRINT / SAVE PDF)
   ============================================================ */
@media print {
    body * {
        visibility: hidden !important;
    }
    #printable-receipt, #printable-receipt * {
        visibility: visible !important;
    }
    #printable-receipt {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 24px !important;
        background: var(--qa-bg-255-255-255-1000, #ffffff) !important;
        color: var(--qa-ink-0-0-0-1000, #000000) !important;
        border: none !important;
        box-shadow: none !important;
    }
    .no-print {
        display: none !important;
    }
}

/* ============================================================
   RESTRIÇÃO DE SUPORTE VIA WHATSAPP (SEÇÃO 2 DO PROMPT)
   Exclusivo para assinantes ativos ou expirados.
   Oculto para testes ativos, testes expirados ou sem histórico.
   ============================================================ */
body.non-subscriber .support-channel-whatsapp,
.non-subscriber .support-channel-whatsapp {
    display: none !important;
}


/* Primeira entrada: saudação curta, duração e ações visíveis no celular. */
.welcome-hero-compact { max-width: 560px; margin: 0 auto; }
.welcome-hero-compact .alert-notice-card { margin: 1rem 0; padding: 1rem; }
.welcome-hero-compact .alert-notice-header { margin-bottom: .4rem; }
.welcome-duration-text { margin: 0; color: var(--qa-ink-120-53-15-1000, #78350f); font-size: .88rem; line-height: 1.5; }
.welcome-hero-compact .welcome-logout { width: 100%; margin-top: .65rem; border: 0; font-size: .9rem; min-height: 42px; }
@media (max-width: 640px) {
    .welcome-hero-compact { padding: 1.25rem 1rem; }
    .welcome-hero-compact .welcome-title { font-size: 1.45rem; line-height: 1.25; }
    .welcome-hero-compact .welcome-slogan { font-size: .9rem; line-height: 1.4; margin-bottom: .75rem; }
    .welcome-hero-compact .alert-notice-card { padding: .85rem; margin: .85rem 0; }
    .welcome-hero-compact .alert-notice-header { font-size: .9rem; line-height: 1.4; }
    .welcome-hero-compact .btn-generate-hero { min-height: 50px; padding: .85rem .65rem; font-size: 1rem; }
}
@media (max-width: 640px) and (max-height: 620px) {
    .welcome-hero-compact { padding: .85rem; }
    .welcome-hero-compact .welcome-title { font-size: 1.3rem; }
    .welcome-hero-compact .welcome-slogan { font-size: .85rem; margin-bottom: .5rem; }
    .welcome-hero-compact .alert-notice-card { padding: .65rem; margin: .65rem 0; }
    .welcome-hero-compact .welcome-duration-text { font-size: .85rem; line-height: 1.4; }
    .welcome-hero-compact .welcome-logout { margin-top: .35rem; }
}

/* Avisos da assinatura: não interfere nos cartões, chat ou pagamento existentes. */
.subscription-notice-overlay{position:fixed;inset:0;z-index:95000;display:flex;align-items:center;justify-content:center;background: rgba(15,23,42,.55);backdrop-filter:blur(4px);padding:20px}.subscription-notice-overlay[hidden]{display:none}.subscription-notice-card{position:relative;width:min(480px,100%);max-height:calc(100dvh - 40px);overflow-y:auto;padding:26px;border: 1px solid var(--color-border);border-radius:18px;background: var(--color-surface,#fff);color: var(--color-text-main,#0f172a);box-shadow:0 20px 70px #0f172a33;overscroll-behavior:contain}.subscription-notice-x{position:absolute;top:10px;right:10px;width:36px;height:36px;border: 0;border-radius:50%;background: var(--color-bg,#f8fafc);color: var(--color-text-muted,#64748b);font-size:25px;cursor:pointer}.subscription-notice-icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:14px;background: var(--qa-bg-255-247-237-1000, #fff7ed);color: var(--qa-ink-180-83-9-1000, #b45309);font-size:32px;margin-bottom:16px}.subscription-notice-label{color: var(--qa-ink-180-83-9-1000, #b45309);font-size:.7rem;font-weight:800;letter-spacing:.06em}.subscription-notice-card h2{font-size:1.35rem;line-height:1.3;margin:8px 0 12px;letter-spacing:-.025em}.subscription-notice-card>p{font-size:.9rem;line-height:1.55;color: var(--color-text-muted);margin:0 0 16px}.subscription-notice-details{padding:14px;background: var(--color-bg,#f8fafc);border: 1px solid var(--color-border);border-radius:10px;margin:16px 0}.subscription-notice-details>div{display:flex;justify-content:space-between;gap:16px;align-items:baseline;padding:5px 0;font-size:.85rem}.subscription-notice-details dt{color: var(--color-text-muted);flex-shrink:0}.subscription-notice-details dd{margin:0;text-align:right;font-weight:700;overflow-wrap:anywhere;min-width:0}.subscription-notice-card .subscription-notice-footnote{font-size:.78rem}.subscription-notice-actions{display:grid;gap:9px}.subscription-notice-actions button{width:100%;min-height:46px;font-size:.9rem;line-height:1.35;font-weight:700}.subscription-notice-primary{display:flex;align-items:center;justify-content:center;padding:12px 14px}.subscription-notice-open{overflow:hidden!important}.subscription-notice-overlay[data-kind=payment] .subscription-notice-icon{background: var(--qa-bg-236-253-245-1000, #ecfdf5);color: var(--qa-ink-4-120-87-1000, #047857)}.subscription-notice-overlay[data-kind=payment] .subscription-notice-label{color: var(--qa-ink-4-120-87-1000, #047857)}
@media(max-width:480px){.subscription-notice-overlay{padding:12px}.subscription-notice-card{padding:22px 18px;max-height:calc(100dvh - 24px)}.subscription-notice-card h2{font-size:1.25rem}.subscription-notice-details>div{gap:10px;font-size:.82rem}.subscription-notice-details dt{flex-shrink:1}}
@media(max-height:620px){.subscription-notice-card{padding:18px}.subscription-notice-icon{width:38px;height:38px;font-size:26px;margin-bottom:10px}.subscription-notice-card h2{font-size:1.2rem;margin:6px 0 8px}.subscription-notice-card>p{margin-bottom:10px}.subscription-notice-details{margin:10px 0;padding:10px}}
