/* ==========================================================================
   Painel BI SRAG-MS - Módulo Administrativo - Estilos e Acessibilidade (WCAG AA)
   ========================================================================== */

:root {
    --primary-blue: #003366;
    --primary-dark: #002244;
    --primary-light: #005599;
    --accent-green: #00a859;
    --accent-green-dark: #008746;
    --accent-red: #d32f2f;
    --accent-dark-red: #8b0000;
    --accent-coral: #e57373;
    --accent-orange: #f57c00;
    --accent-yellow: #fbc02d;
    --neutral-dark: #1e293b;
    --neutral-gray: #475569;
    --neutral-light: #f8fafc;
    --neutral-border: #cbd5e1;
    --white: #ffffff;
    --term-bg: #0d1117;
    --term-header: #161b22;
    --term-border: #30363d;
    --term-text: #e6edf3;
    --term-time: #8b949e;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --font-mono: 'Consolas', 'Fira Code', 'Monaco', monospace;
}

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

body {
    font-family: var(--font-family);
    background-color: #f1f5f9;
    color: var(--neutral-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   HEADER INSTITUCIONAL
   ========================================================================== */
.header-gov {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    color: var(--white);
    padding: 12px 0;
    box-shadow: var(--shadow-md);
    border-bottom: 4px solid var(--accent-green);
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.gov-seal {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gov-logo-wrapper {
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gov-logo-img {
    height: 38px;
    width: auto;
    display: block;
}

.gov-text-box h1 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
}

.gov-text-box p {
    font-size: 0.82rem;
    color: #cbd5e1;
    margin: 2px 0 0 0;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-session-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.user-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-green);
    box-shadow: 0 0 6px var(--accent-green);
}

.btn-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.btn-nav-link:hover, .btn-nav-link:focus {
    background: rgba(255, 255, 255, 0.2);
    outline: 2px solid var(--accent-green);
}

.btn-nav-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-nav-logout:hover {
    background: rgba(239, 68, 68, 0.35);
    color: #ffffff;
}

/* ==========================================================================
   TELA DE LOGIN
   ========================================================================== */
.login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    border: 1px solid var(--neutral-border);
}

.login-card-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    color: var(--white);
    padding: 28px 24px;
    text-align: center;
    position: relative;
    border-bottom: 3px solid var(--accent-green);
}

.login-card-header .icon-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
}

.login-card-header .icon-badge svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.login-card-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-card-header p {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.login-card-body {
    padding: 32px 28px;
}

.login-card-footer {
    padding: 16px 28px 24px 28px;
    background-color: #fafbfc;
    border-top: 1px solid var(--neutral-border);
    font-size: 0.82rem;
    color: #64748b;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--neutral-dark);
    margin-bottom: 6px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.input-icon svg {
    width: 18px;
    height: 18px;
}

.form-control {
    width: 100%;
    padding: 11px 14px 11px 38px;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1.5px solid var(--neutral-border);
    border-radius: var(--radius-md);
    background-color: #fafbfc;
    color: var(--neutral-dark);
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 85, 153, 0.15);
}

.btn-toggle-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #64748b;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
}

.btn-toggle-password:hover {
    color: var(--neutral-dark);
}

.btn-toggle-password svg {
    width: 18px;
    height: 18px;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

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

/* ==========================================================================
   LAYOUT PRINCIPAL ADMIN & WORKFLOW STEPPER
   ========================================================================== */
.admin-app-layout {
    background-color: #f1f5f9;
}

.admin-main-content {
    flex: 1;
    padding: 24px 16px 40px 16px;
}

.admin-container {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.workflow-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    padding: 16px 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-border);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    position: relative;
    user-select: none;
}

.step-bubble {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.step-label {
    display: flex;
    flex-direction: column;
}

.step-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #64748b;
}

.step-desc {
    font-size: 0.75rem;
    color: #94a3b8;
}

.step-divider {
    flex: 1;
    height: 2px;
    background-color: #e2e8f0;
    margin: 0 16px;
}

.step-item.active .step-bubble {
    background-color: var(--primary-blue);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.2);
}

.step-item.active .step-title {
    color: var(--primary-blue);
}

.step-item.completed .step-bubble {
    background-color: var(--accent-green);
    color: #ffffff;
}

.step-item.completed .step-title {
    color: var(--accent-green-dark);
}

/* ==========================================================================
   CARDS ADMINISTRATIVOS & BADGES
   ========================================================================== */
.admin-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-border);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.admin-card:hover {
    box-shadow: var(--shadow-md);
}

.admin-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
}

.admin-card-header.highlight-simulation {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 2px solid #cbd5e1;
}

.admin-card-header.bg-success-light {
    background-color: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
}

.card-success-border {
    border-color: #86efac;
}

.card-title-group h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.card-title-group p {
    font-size: 0.88rem;
    color: #64748b;
}

.admin-card-body {
    padding: 24px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-outline {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.badge-primary {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-green-glow {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.badge-blue-glow {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.badge-neutral {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.header-tag-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-green);
    animation: pulseGlow 1.5s infinite;
}

.pulse-blue {
    background-color: #0284c7;
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(0, 168, 89, 0.7); }
    70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 6px rgba(0, 168, 89, 0); }
    100% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(0, 168, 89, 0); }
}

/* ==========================================================================
   BANNER DE DICA ZIP & ARQUIVOS DO SERVIDOR
   ========================================================================== */
.upload-speed-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #166534;
}

.upload-speed-banner .banner-icon {
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upload-speed-banner .banner-text {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.4;
}

.upload-speed-banner .banner-text code {
    background: #dcfce7;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    color: #15803d;
}

.server-files-panel {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.server-files-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.server-files-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.server-files-header p {
    font-size: 0.8rem;
    color: #64748b;
}

.server-files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
}

.server-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 14px;
    transition: all 0.15s ease;
}

.server-file-item:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.server-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.server-file-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: #1e293b;
}

.server-file-meta {
    font-size: 0.75rem;
    color: #64748b;
}

/* ==========================================================================
   DROPZONE & METADADOS DO ARQUIVO
   ========================================================================== */
.dropzone {
    border: 2px dashed #94a3b8;
    border-radius: var(--radius-lg);
    background-color: #f8fafc;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropzone:hover, .dropzone:focus, .dropzone-dragover {
    border-color: var(--primary-light);
    background-color: #eff6ff;
    outline: none;
}

.file-input-hidden {
    display: none;
}

.dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dropzone-icon {
    color: var(--primary-blue);
}

.dropzone-prompt {
    font-size: 1.05rem;
    color: var(--neutral-dark);
}

.btn-link-inline {
    color: var(--primary-light);
    text-decoration: underline;
    font-weight: 600;
}

.dropzone-sub {
    font-size: 0.85rem;
    color: #64748b;
}

.file-meta-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 16px 20px;
}

.file-meta-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.file-icon-box {
    color: var(--primary-blue);
    background: #e0f2fe;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-details h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--neutral-dark);
    margin-bottom: 4px;
}

.file-tags {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: #e2e8f0;
    color: #475569;
}

.tag-blue { background: #dbeafe; color: #1e40af; }
.tag-green { background: #dcfce7; color: #166534; }

.file-meta-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   BOX DE PROGRESSO DE UPLOAD (TEMPO REAL)
   ========================================================================== */
.upload-progress-box {
    margin-top: 18px;
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

.upload-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.upload-progress-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.upload-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e0f2fe;
    border-top: 3px solid #0284c7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.upload-status-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    display: block;
}

.upload-bytes-metric {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 2px;
}

.upload-metrics-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.metric-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.metric-speed {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.metric-eta {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.upload-progress-track-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
}

.upload-progress-track {
    flex: 1;
    height: 10px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.upload-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284c7 0%, #00a859 100%);
    border-radius: 6px;
    transition: width 0.15s ease-out;
}

.upload-percent-metric {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0284c7;
    min-width: 44px;
    text-align: right;
}

/* ==========================================================================
   CARDS DE COMPARAÇÃO DRY-RUN & IMPACTO
   ========================================================================== */
.metrics-grid-6 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.metric-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.metric-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--neutral-dark);
    line-height: 1.2;
    display: block;
    margin-bottom: 4px;
}

.metric-subtext {
    font-size: 0.75rem;
    color: #94a3b8;
}

.card-highlight-new {
    border-color: #86efac;
    background: #f0fdf4;
}

.card-highlight-updated {
    border-color: #93c5fd;
    background: #eff6ff;
}

.text-green { color: #16a34a !important; }
.text-blue { color: #2563eb !important; }
.text-red { color: #dc2626 !important; }
.text-muted { color: #64748b !important; }
.font-bold { font-weight: 700 !important; }
.font-mono { font-family: var(--font-mono); }

.icon-gray { color: #64748b; }
.icon-teal { color: #0d9488; }
.icon-amber { color: #d97706; }

.diff-impact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.diff-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 18px;
}

.panel-subtitle {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.diff-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.diff-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.88rem;
}

.diff-item-val {
    font-size: 1rem;
    font-weight: 700;
}

.kpi-projection-table-wrapper {
    overflow-x: auto;
}

.kpi-projection-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.kpi-projection-table th, .kpi-projection-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.kpi-projection-table th {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.impact-table-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 24px;
}

.impact-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.table-legend {
    font-size: 0.78rem;
    color: #64748b;
}

.table-responsive {
    overflow-x: auto;
    max-height: 280px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table th {
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    padding: 10px 14px;
    border-bottom: 2px solid #cbd5e1;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table td {
    padding: 9px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.data-table tr:hover {
    background-color: #f8fafc;
}

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

/* ==========================================================================
   GATE DE CONFIRMAÇÃO & PROGRESSO
   ========================================================================== */
.confirmation-gate {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.confirmation-gate-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.gate-icon {
    color: #b45309;
    padding: 6px;
    background: #fef3c7;
    border-radius: 8px;
}

.gate-text h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 4px;
}

.gate-text p {
    font-size: 0.88rem;
    color: #78350f;
}

.confirmation-gate-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #fde68a;
    padding-top: 14px;
}

.mode-selector {
    display: flex;
    align-items: center;
    gap: 18px;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #92400e;
    cursor: pointer;
}

.action-btn-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-box {
    margin-bottom: 20px;
}

.progress-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-stage-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
}

.progress-percent-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.progress-bar-track {
    width: 100%;
    height: 14px;
    background-color: #e2e8f0;
    border-radius: 7px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--accent-green) 100%);
    border-radius: 7px;
    transition: width 0.3s ease;
}

.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.telemetry-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.telemetry-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

.telemetry-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--neutral-dark);
}

.success-icon-badge {
    color: var(--accent-green);
    background: #dcfce7;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-green-dark {
    color: #14532d !important;
}

.summary-receipt {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92rem;
}

.receipt-label {
    color: #475569;
}

.receipt-val {
    font-size: 1.05rem;
}

.complete-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ==========================================================================
   TERMINAL INTERATIVO WEB (OPERATIONS CONSOLE)
   ========================================================================== */
.terminal-wrapper {
    width: 100%;
}

.terminal-box {
    background-color: var(--term-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--term-border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background-color: var(--term-header);
    border-bottom: 1px solid var(--term-border);
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.terminal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.terminal-window-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: block;
}

.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: #c9d1d9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.terminal-live-badge {
    background: rgba(39, 201, 63, 0.15);
    color: #3fb950;
    border: 1px solid rgba(39, 201, 63, 0.3);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.terminal-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-pills {
    display: inline-flex;
    background: #21262d;
    padding: 2px;
    border-radius: 6px;
    border: 1px solid #30363d;
}

.filter-pill {
    background: transparent;
    border: none;
    color: #8b949e;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.filter-pill:hover {
    color: #c9d1d9;
}

.filter-pill.active {
    background: #30363d;
    color: #ffffff;
}

.pill-count {
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.68rem;
    padding: 1px 5px;
    border-radius: 10px;
}

.toggle-switch-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.78rem;
    color: #8b949e;
    user-select: none;
}

.toggle-switch-label input {
    display: none;
}

.toggle-slider {
    width: 28px;
    height: 16px;
    background-color: #30363d;
    border-radius: 8px;
    position: relative;
    transition: background-color 0.2s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ffffff;
    transition: transform 0.2s ease;
}

.toggle-switch-label input:checked + .toggle-slider {
    background-color: #238636;
}

.toggle-switch-label input:checked + .toggle-slider::after {
    transform: translateX(12px);
}

.btn-term-tool {
    background: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.btn-term-tool:hover {
    background: #30363d;
    color: #ffffff;
}

.terminal-output {
    height: 280px;
    overflow-y: auto;
    padding: 14px 18px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--term-text);
    display: flex;
    flex-direction: column;
    gap: 4px;
    scrollbar-width: thin;
    scrollbar-color: #30363d #0d1117;
}

.terminal-output::-webkit-scrollbar {
    width: 8px;
}

.terminal-output::-webkit-scrollbar-track {
    background: #0d1117;
}

.terminal-output::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}

.term-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
    line-height: 1.45;
    word-break: break-all;
}

.term-level-info { color: #e6edf3; }
.term-level-success { color: #7ee787; }
.term-level-warning { color: #ffd60a; }
.term-level-error { color: #ffa198; }

.term-time {
    color: var(--term-time);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.term-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.term-badge-info { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.term-badge-success { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.term-badge-warning { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.term-badge-error { background: rgba(248, 113, 113, 0.2); color: #f87171; }

.term-stage {
    color: #a5d6ff;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.term-msg {
    color: #e6edf3;
}

.term-level-error .term-msg {
    color: #ffa198;
}

.term-level-warning .term-msg {
    color: #ffd60a;
}

.term-level-success .term-msg {
    color: #7ee787;
}

.terminal-footer {
    background-color: var(--term-header);
    border-top: 1px solid var(--term-border);
    padding: 8px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #8b949e;
}

.term-time-now {
    font-family: var(--font-mono);
}

.term-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    font-size: 0.88rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

.term-toast.active {
    opacity: 1;
    transform: translateY(0);
}

.term-toast-success { border-left: 4px solid var(--accent-green); }
.term-toast-error { border-left: 4px solid var(--accent-red); }
.term-toast-info { border-left: 4px solid var(--primary-light); }

/* ==========================================================================
   BOTÕES E COMPONENTES GERAIS
   ========================================================================== */
.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    padding: 10px 18px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(0, 51, 102, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

.btn-secondary {
    background: #ffffff;
    color: var(--neutral-dark);
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 9px 16px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.btn-success {
    background: var(--accent-green);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    padding: 10px 18px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(0, 168, 89, 0.2);
}

.btn-success:hover {
    background: var(--accent-green-dark);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-primary:disabled, .btn-secondary:disabled, .btn-success:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.alert-hidden {
    display: none !important;
}

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

.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

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

.alert-close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
}

.alert-close-btn:hover {
    opacity: 1;
}

.footer-gov {
    background: var(--primary-dark);
    color: #94a3b8;
    padding: 16px 0;
    font-size: 0.82rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

:focus-visible {
    outline: 2px solid var(--accent-green) !important;
    outline-offset: 2px !important;
}

@media (max-width: 900px) {
    .diff-impact-container {
        grid-template-columns: 1fr;
    }
    .telemetry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .workflow-stepper {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .step-divider {
        display: none;
    }
    .confirmation-gate-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
}
