/* ==========================================================================
   RelatoPB - Modern Web Stylesheet (Dark & Light Theme)
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Theme colors - Dark Mode Default */
    --bg-app: #080b11;
    --bg-sidebar: #0e1320;
    --bg-card: #151c2e;
    --bg-input: #1a233a;
    --border-color: #243152;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* Brand / Accent colors */
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.15);
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    
    --purple: #8b5cf6;
    --purple-bg: rgba(139, 92, 246, 0.1);

    /* Gradients */
    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --gradient-emerald: linear-gradient(135deg, #10b981 0%, #047857 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    --gradient-welcome: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);

    /* UI elements */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.25);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* Light Theme Variables */
body.light-theme {
    --bg-app: #f4f6fa;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f3f4f6;
    --border-color: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-glow: rgba(37, 99, 235, 0.1);
    
    --gradient-welcome: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Base resets and Layout
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-body);
    background-color: var(--bg-app);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition-normal);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* App structure layout */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ==========================================================================
   Sidebar Styles
   ========================================================================== */
.sidebar {
    width: 260px;
    height: 100%;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex-shrink: 0;
    z-index: 100;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
}
.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}
.logo-text {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}
.logo-text span {
    color: var(--primary);
}

/* Navigation items */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none !important;
}

.nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    color: var(--text-primary);
    background-color: var(--primary-glow);
}

.nav-item.active {
    color: white;
    background: var(--gradient-blue);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* Sidebar Footer */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.privacy-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background-color: var(--success-bg);
    border-radius: var(--radius-sm);
    color: var(--success);
    font-size: 12px;
    font-weight: 600;
}
.privacy-badge i {
    font-size: 14px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background-color: var(--bg-input);
    transition: var(--transition-fast);
}
.theme-toggle:hover {
    color: var(--text-primary);
    background-color: var(--border-color);
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.main-header {
    height: 80px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-sidebar);
    flex-shrink: 0;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-title h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}
.header-title p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* User Status Bar Pill */
.api-status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot.active {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}
.status-dot.inactive {
    background-color: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

/* Scrollable main screen viewport */
.content-viewport {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px;
}

/* Main Footer Styles */
.main-footer {
    padding: 24px 0 0 0;
    background-color: transparent;
    border-top: 1px solid var(--border-color);
    margin-top: 48px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    transition: color var(--transition-normal);
}
.main-footer p {
    margin: 4px 0;
}


/* Screen visibility styling */
.app-screen {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.app-screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Shared Cards Styles
   ========================================================================== */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    transition: background-color var(--transition-normal), border-color var(--transition-normal), transform var(--transition-fast);
}

/* ==========================================================================
   SCREEN 1: DASHBOARD
   ========================================================================== */
.welcome-banner {
    display: flex;
    background: var(--gradient-welcome);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}
.banner-content h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.banner-content p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 20px;
}
.banner-illustration {
    font-size: 80px;
    color: var(--primary);
    opacity: 0.15;
    margin-right: 20px;
}

/* Quick Action Cards Grid */
.grid-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.action-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 220px;
}
.action-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    margin-bottom: 18px;
}
.card-icon.blue { background: var(--gradient-blue); }
.card-icon.emerald { background: var(--gradient-emerald); }
.card-icon.purple { background: var(--gradient-purple); }

.action-card h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.action-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
}
.card-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
}
.action-card:hover .card-link {
    color: var(--primary-hover);
}

/* Timeline Card */
.timeline-card h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 24px;
}
.pb-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 20px 0;
}
.pb-timeline::before {
    content: '';
    position: absolute;
    top: 38px;
    left: 40px;
    right: 40px;
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 120px;
    text-align: center;
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-input);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    transition: var(--transition-fast);
}

.timeline-step.done .step-num {
    background-color: var(--success);
    border-color: var(--success);
    color: white;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.timeline-step.active .step-num {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.timeline-step h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}
.timeline-step p {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==========================================================================
   SCREEN 2: REDACAO (WIZARD & Split Screen)
   ========================================================================== */
.screen-split {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    align-items: start;
}

.step-wizard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.step-badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
}
.step-wizard-header h3 {
    font-family: var(--font-heading);
    font-size: 20px;
}

.progress-bar-container {
    height: 6px;
    width: 100%;
    background-color: var(--bg-input);
    border-radius: var(--radius-full);
    margin-bottom: 30px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--gradient-blue);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.wizard-step-content {
    display: none;
}
.wizard-step-content.active {
    display: block;
}

/* Form controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}
.form-group.row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
label .required {
    color: var(--danger);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea {
    resize: vertical;
}

.input-tip {
    font-size: 12px;
    color: var(--text-muted);
}
.input-tip.warning-tip {
    color: var(--warning);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wizard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    margin-top: 12px;
}

/* Buttons System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
}
.btn-primary {
    background: var(--gradient-blue);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 10px var(--primary-glow);
}
.btn-secondary {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background-color: var(--border-color);
}
.btn-success {
    background: var(--gradient-emerald);
    color: white;
}
.btn-success:hover {
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}
.btn-danger {
    background: var(--gradient-danger);
    color: white;
}
.btn-danger:hover {
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-align: left;
    justify-content: flex-start;
}
.btn-outline:hover {
    border-color: var(--primary);
    background-color: var(--primary-glow);
}
.btn-full {
    width: 100%;
    padding: 14px;
}
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hide {
    display: none !important;
}

/* ==========================================================================
   Validation Checklists (Assistant Side)
   ========================================================================== */
.validation-card h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.check-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.check-item.val-ok {
    color: var(--success);
}
.check-item.val-ok i {
    color: var(--success);
}

.check-item.val-fail {
    color: var(--danger);
}
.check-item.val-fail i {
    color: var(--danger);
}

.check-item.val-warn {
    color: var(--warning);
}
.check-item.val-warn i {
    color: var(--warning);
}

/* AI Panel Side Card */
.ai-card {
    background-color: #171d33;
    border-color: #293863;
}
.ai-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.ai-card-header h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    color: white;
}
.ai-badge {
    background-color: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.ai-intro-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 14px;
}

.ai-assistant-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Loading animations */
.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
}
.ai-loading i {
    font-size: 24px;
    color: var(--primary);
}

/* AI Output display box */
.ai-output-box {
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 10px;
}
.ai-output-box h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #93c5fd;
}
.ai-output-content {
    font-size: 13px;
    color: #e2e8f0;
    line-height: 1.6;
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 12px;
    white-space: pre-wrap;
}

/* ==========================================================================
   SCREEN 3: TCLE (Narrow Form Container)
   ========================================================================== */
.form-container-narrow {
    max-width: 720px;
    margin: 0 auto;
}
.form-header {
    text-align: center;
    margin-bottom: 32px;
}
.form-header i {
    font-size: 40px;
    color: var(--success);
    margin-bottom: 12px;
}
.form-header h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    margin-bottom: 6px;
}
.form-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.form-section-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 28px;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.info-alert {
    display: flex;
    gap: 12px;
    padding: 16px;
    background-color: rgba(59, 130, 246, 0.08);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin-top: 8px;
}
.info-alert i {
    font-size: 16px;
    color: var(--primary);
    margin-top: 2px;
}

/* ==========================================================================
   SCREEN 4: REVISOR DE MANUSCRITO
   ========================================================================== */
.text-input-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.panel-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.revisor-textarea {
    width: 100%;
    height: 380px;
    resize: none;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.revisor-actions {
    display: flex;
    gap: 12px;
}

/* Results panel dynamic displays */
.revisor-placeholder {
    height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
    color: var(--text-muted);
}
.revisor-placeholder i {
    font-size: 56px;
    opacity: 0.5;
}
.revisor-placeholder p {
    font-size: 14px;
    max-width: 320px;
    line-height: 1.5;
}

/* Circular score dial */
.score-container {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.score-radial {
    width: 90px;
    height: 90px;
}

.circular-chart {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.circle-bg {
    fill: none;
    stroke: var(--bg-input);
    stroke-width: 2.8;
}

.circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}

/* Score colors based on percentage */
.circular-chart .circle {
    stroke: var(--success);
}
.circular-chart.fail .circle {
    stroke: var(--danger);
}
.circular-chart.warn .circle {
    stroke: var(--warning);
}

.percentage {
    fill: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 7.5px;
    font-weight: 700;
    text-anchor: middle;
}

.score-details h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 4px;
}
.score-details p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Tab Headers and Layout */
.tab-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.tab-headers {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}
.tab-header {
    background: transparent;
    border: none;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}
.tab-header.active {
    color: var(--primary);
}
.tab-header.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary);
}

.tab-contents {
    flex-grow: 1;
    overflow-y: auto;
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* Dynamic Issue reports */
.issues-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.issue-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-input);
    border-left: 4px solid var(--border-color);
    font-size: 13px;
    line-height: 1.5;
}
.issue-item i {
    font-size: 16px;
    margin-top: 2px;
}

.issue-item.danger-issue {
    border-left-color: var(--danger);
    background-color: var(--danger-bg);
    color: #fecaca;
}
.issue-item.danger-issue i {
    color: var(--danger);
}

.issue-item.warning-issue {
    border-left-color: var(--warning);
    background-color: var(--warning-bg);
    color: #fef3c7;
}
.issue-item.warning-issue i {
    color: var(--warning);
}

.issue-item.success-issue {
    border-left-color: var(--success);
    background-color: var(--success-bg);
    color: #d1fae5;
}
.issue-item.success-issue i {
    color: var(--success);
}

/* ==========================================================================
   SCREEN 5: GUIA PLATAFORMA BRASIL
   ========================================================================== */
.guia-container {
    max-width: 1000px;
    margin: 0 auto;
}
.guia-header {
    text-align: center;
    margin-bottom: 36px;
}
.guia-header i {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 12px;
}
.guia-header h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    margin-bottom: 6px;
}
.guia-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.guia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.guia-card {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guia-card-badge {
    align-self: flex-start;
    background-color: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.guia-card h3 {
    font-family: var(--font-heading);
    font-size: 17px;
}
.guia-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.code-block {
    background-color: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 14px;
    color: #93c5fd;
    text-align: center;
    font-weight: 700;
}

.tip-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--warning);
    font-weight: 500;
}

.guia-card ul {
    list-style: none;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.guia-card ul li::before {
    content: "•";
    color: var(--primary);
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* ==========================================================================
   SCREEN 6: CONFIGURACOES & TUTORIAL
   ========================================================================== */
.input-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-password-wrapper input {
    padding-right: 48px;
}
.btn-toggle-vis {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
}
.btn-toggle-vis:hover {
    color: var(--text-primary);
}

.config-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 30px;
}

/* Tutorial details */
.tutorial-card {
    background-color: var(--bg-input);
    border-color: var(--border-color);
    margin-top: 20px;
}
.tutorial-card h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.tut-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.tut-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--primary-glow);
    border: 1px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}
.tut-step p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.tut-step code {
    background-color: rgba(15, 23, 42, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    color: #93c5fd;
}

/* ==========================================================================
   Notifications System
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    background-color: #1f2937;
    color: white;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transform: translateY(150%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success-toast {
    border-left: 4px solid var(--success);
}
.toast.success-toast i {
    color: var(--success);
}

.toast.error-toast {
    border-left: 4px solid var(--danger);
}
.toast.error-toast i {
    color: var(--danger);
}

.toast.warning-toast {
    border-left: 4px solid var(--warning);
}
.toast.warning-toast i {
    color: var(--warning);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
    .screen-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        padding: 16px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .brand {
        margin-bottom: 0;
    }
    .nav-menu {
        display: none; /* In a real build, we'd add a burger menu, but let's keep it simple for now */
    }
    .sidebar-footer {
        display: none;
    }
    .content-viewport {
        padding: 20px;
    }
    .pb-timeline {
        flex-direction: column;
        gap: 20px;
    }
    .pb-timeline::before {
        display: none;
    }
    .timeline-step {
        flex-direction: row;
        width: 100%;
        text-align: left;
        gap: 16px;
    }
    .step-num {
        margin-bottom: 0;
    }
    .guia-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Welcome Modal Styles (Premium Glassmorphism)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(5, 7, 12, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(59, 130, 246, 0.1);
    transform: translateY(20px);
    transition: transform var(--transition-normal);
    overflow: hidden;
}

.modal-overlay.show .modal-card {
    transform: translateY(0);
}

.modal-header {
    padding: 24px 32px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-sidebar);
    flex-shrink: 0;
}

.modal-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-body {
    padding: 24px 32px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-box {
    display: flex;
    gap: 16px;
    padding: 16px;
    background-color: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    align-items: flex-start;
}

.info-box i {
    font-size: 20px;
    color: var(--success);
    margin-top: 2px;
}

.info-box strong {
    font-size: 14px;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.info-box p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-box.warning-box {
    background-color: var(--primary-glow);
    border-color: rgba(59, 130, 246, 0.2);
}

.info-box.warning-box i {
    color: var(--primary);
}

.terms-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.terms-section h3 {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.terms-content {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    max-height: 150px;
    overflow-y: auto;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.terms-content p {
    margin-bottom: 8px;
}

.terms-content ol {
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 8px;
}

/* Custom Checkbox Design */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
    color: var(--text-primary);
    font-weight: 500;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 18px;
    width: 18px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition-fast);
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    line-height: 1.4;
}

.checkbox-label .required {
    color: var(--danger);
}

.modal-footer {
    padding: 16px 32px 24px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-sidebar);
    flex-shrink: 0;
}

/* ==========================================================================
   Dashboard Interactive Checklist
   ========================================================================== */
.checklist-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}

.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.checklist-header h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checklist-progress {
    font-size: 13px;
    font-weight: 700;
    color: var(--success);
    background-color: var(--success-bg);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.checklist-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checklist-item-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 16px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    user-select: none;
}

.checklist-item-row:hover {
    border-color: var(--primary);
    background-color: var(--primary-glow);
}

.checklist-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark-box {
    width: 20px;
    height: 20px;
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.checkmark-box i {
    font-size: 11px;
    color: white;
    display: none;
}

.checklist-checkbox:checked ~ .checkmark-box {
    background-color: var(--success);
    border-color: var(--success);
}

.checklist-checkbox:checked ~ .checkmark-box i {
    display: block;
}

.checklist-item-row:has(.checklist-checkbox:checked) {
    border-color: var(--success-bg);
    opacity: 0.8;
}

.checklist-item-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.checklist-item-content strong {
    font-size: 14px;
    color: var(--text-primary);
}

.checklist-item-content span {
    font-size: 12px;
    color: var(--text-secondary);
}

.checklist-checkbox:checked ~ .checklist-item-content strong {
    text-decoration: line-through;
    color: var(--text-muted);
}
.checklist-checkbox:checked ~ .checklist-item-content span {
    color: var(--text-muted);
}

/* ==========================================================================
   Minor Age Verification & TALE Style
   ========================================================================== */
.minor-warning-box {
    display: flex;
    gap: 16px;
    padding: 16px;
    background-color: var(--warning-bg);
    border: 1px solid var(--warning);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    align-items: flex-start;
    animation: fadeIn 0.3s ease;
}

.minor-warning-box i {
    font-size: 24px;
    color: var(--warning);
    margin-top: 2px;
}

.minor-warning-box strong {
    font-size: 14px;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.minor-warning-box p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 6px;
}

.minor-warning-box p:last-child {
    margin-bottom: 0;
}

.tale-action-text {
    font-weight: 600;
    color: var(--warning) !important;
}

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

/* ==========================================================================
   Export Buttons Layout
   ========================================================================== */
.export-button-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: 12px;
}

.export-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

.export-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.export-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.export-buttons .btn {
    flex: 1;
    min-width: 140px;
}

/* Sidebar Promo Card (Highlighted Link) */
.sidebar-promo-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--primary-glow);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--radius-md);
    padding: 12px;
    margin: 16px 0;
    text-decoration: none !important;
    transition: all var(--transition-fast);
    color: var(--text-primary);
}
.sidebar-promo-card:hover {
    background-color: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.sidebar-promo-card .promo-icon {
    font-size: 18px;
    color: var(--primary);
    flex-shrink: 0;
}
.sidebar-promo-card .promo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
}
.sidebar-promo-card .promo-text strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.sidebar-promo-card .promo-text span {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.3;
}
.sidebar-promo-card .promo-arrow {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.sidebar-promo-card:hover .promo-arrow {
    color: var(--primary);
}

/* Checklist Regulation Reference */
.regulation-ref {
    display: block;
    font-size: 11px;
    color: var(--primary);
    opacity: 0.85;
    margin-top: 4px;
    font-style: italic;
}

