/* ============================================
   Sistema de Cadastro Grande Recife
   Clean Design - Brand Color: #3f3f63
   ============================================ */

:root {
    --primary-color: #3f3f63;
    --primary-dark: #2d2d47;
    --primary-light: #5a5a7d;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3f3f63;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --bg-light: #fafafa;
    --border-color: #e5e7eb;
    --shadow-soft: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --transition-fast: 0.15s ease;
    --transition-medium: 0.3s ease;
}

/* ============================================
   ACESSIBILIDADE
   ============================================ */

/* Skip Links */
.skip-links {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 10000;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--warning-color);
    outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Melhorias de Foco */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Indicador de teclado visível */
*:focus-visible {
    outline: 3px solid var(--warning-color);
    outline-offset: 2px;
}

/* ============================================
   FIM ACESSIBILIDADE
   ============================================ */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-light);
    min-height: 100vh;
    color: var(--dark-color);
    line-height: 1.6;
}

/* Header */
.header {
    background: white;
    box-shadow: var(--shadow-soft);
    padding: 1rem 0;
    position: relative;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark-color);
}

.logo-img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

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

.nav-links a {
    padding: 0.5rem 1rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition-fast);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Main Container */
.main-container {
    min-height: calc(100vh - 80px);
    padding: 2rem 1rem;
    align-items: flex-start;
}

.container {
    margin: 0 auto;
    padding: 0 1rem;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
    border: 1px solid var(--border-color);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header h1,
.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-header p {
    opacity: 0.95;
    font-size: 0.9rem;
    font-weight: 400;
}

.card-body {
    padding: 2rem;
}

/* Form Styles */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.form-section-title i {
    font-size: 1.1rem;
}

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

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

.form-label .required {
    color: var(--danger-color);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: var(--transition-fast);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(63, 63, 99, 0.1);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-text {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Row and Columns */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 0.75rem;
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 0.75rem;
}

@media (min-width: 768px) {
    .col-md-4 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

.col-md-3 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 0.75rem;
}

@media (min-width: 768px) {
    .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-medium);
}

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

.btn-success:hover {
    background: #059669;
    box-shadow: var(--shadow-medium);
}

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

.btn-danger:hover {
    background: #dc2626;
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon svg {
    flex-shrink: 0;
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    cursor: pointer;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--dark-color);
    cursor: pointer;
}

.form-check-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #059669;
}

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

.alert-info {
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    color: #0891b2;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 4px;
    white-space: nowrap;
}

.badge-aguardando {
    background: #fef3c7;
    color: #b45309;
}

.badge-aprovado {
    background: #dcfce7;
    color: #166534;
}

.badge-reprovado {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-ajuste {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Status Icons (for Eleja/Comissao columns) */
.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.status-icon.status-aprovado {
    background: #dcfce7;
    color: #16a34a;
}

.status-icon.status-reprovado {
    background: #fee2e2;
    color: #dc2626;
}

.status-icon.status-ajuste {
    background: #dbeafe;
    color: #2563eb;
}

.status-icon.status-pendente {
    background: #fef3c7;
    color: #d97706;
}

.status-icon.status-na {
    background: #f1f5f9;
    color: #94a3b8;
    font-weight: 500;
}

/* Info Box */
.info-box {
    background: #f8fafc;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.info-box-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-item {
    display: flex;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.info-label {
    flex: 0 0 140px;
    font-weight: 500;
    color: #64748b;
    font-size: 0.9rem;
}

.info-value {
    flex: 1;
    font-weight: 500;
    color: var(--dark-color);
}

/* Table */
.table-responsive {
    overflow-x: auto;
    margin: -1rem;
    padding: 1rem;
}

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

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

.table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--dark-color);
    white-space: nowrap;
}

.table tr:hover {
    background: #f8fafc;
}

.table .actions {
    display: flex;
    gap: 0.5rem;
}

.table .btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.filter-bar .form-control,
.filter-bar .form-select {
    max-width: 200px;
}

/* Conditional Fields */
.conditional-field {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.conditional-field.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* File Input */
.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    transition: var(--transition-fast);
}

.file-input-wrapper input[type="file"]:hover {
    border-color: var(--primary-color);
    background: #f0f9ff;
}

.file-input-wrapper input[type="file"]::file-selector-button {
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

/* Success Page */
.success-icon {
    width: 100px;
    height: 100px;
    background: var(--gradient-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 3rem;
    color: white;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Modern Admin Dashboard */
.modern-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.modern-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.modern-stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.modern-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.modern-stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modern-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.modern-stat-footer {
    font-size: 0.875rem;
    color: #64748b;
}

/* Modern Table */
.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table thead th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.modern-table tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
    color: #374151;
}

.modern-table tbody tr {
    transition: background 0.15s ease;
}

.modern-table tbody tr:hover {
    background: #f9fafb;
}

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

.table-id {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
    font-weight: 500;
    font-size: 0.8rem;
    color: #6366f1;
}

/* Old Admin Dashboard (deprecated) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-fast);
}

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

.stat-card .icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.stat-card .icon.primary {
    background: var(--gradient-primary);
}

.stat-card .icon.success {
    background: var(--gradient-success);
}

.stat-card .icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-card .icon.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-card .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
}

.stat-card .label {
    color: #64748b;
    font-size: 0.9rem;
}

/* Login Page */
.login-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem;
    color: #64748b;
    font-size: 0.85rem;
    background: white;
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .card-body {
        padding: 1.5rem;
    }

    .info-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .info-label {
        flex: none;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-bar .form-control,
    .filter-bar .form-select {
        max-width: 100%;
    }
}

/* Email Config */
/* ========== Email / SMS Config Cards ========== */
.email-config-section {
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.25rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: border-color 0.2s;
}
.email-config-section:hover {
    border-color: #c7d2fe;
}

.email-config-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
    background: #f8fafc;
    border-bottom: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s;
}
.email-config-header:hover {
    background: #f1f5f9;
}
.email-config-header.active {
    border-bottom-color: var(--border-color);
}

.email-config-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.email-config-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 1rem;
}
.email-config-icon.icon-aguardando { background: linear-gradient(135deg, #f59e0b, #d97706); }
.email-config-icon.icon-aprovado   { background: linear-gradient(135deg, #10b981, #059669); }
.email-config-icon.icon-reprovado  { background: linear-gradient(135deg, #ef4444, #dc2626); }
.email-config-icon.icon-ajuste     { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.email-config-icon.icon-recurso    { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.email-config-icon.icon-sms        { background: linear-gradient(135deg, #06b6d4, #0891b2); }

.email-config-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}
.email-config-subtitle {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.1rem;
}

.email-config-chevron {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s ease, background 0.2s;
    color: #64748b;
}
.email-config-chevron.open {
    transform: rotate(180deg);
    background: var(--primary-color);
    color: #fff;
}

.email-config-body {
    display: none;
    padding: 1.25rem;
}
.email-config-body.open {
    display: block;
}

.email-config-form .form-group {
    margin-bottom: 1rem;
}
.email-config-form .form-label {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.email-config-form textarea {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 1.5;
}
.email-config-form .form-control {
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.email-config-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(63, 63, 99, 0.08);
}

.email-config-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}
.email-config-actions .btn-primary {
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
}
.email-config-actions .btn-secondary {
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
}

.email-variables-hint {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
    color: #475569;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
}
.email-variables-hint svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary-light);
}
.email-variables-hint code {
    background: #e0e7ff;
    color: var(--primary-color);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: #64748b;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.d-flex {
    display: flex;
}

.gap-2 {
    gap: 1rem;
}

.justify-center {
    justify-content: center;
}
/* Modal de Feedback */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.3s ease;
}

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

.modal-content {
    padding: 2rem;
    text-align: center;
}

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
}

.modal-icon.error { background: #fee2e2; }
.modal-icon.success { background: #d1fae5; }
.modal-icon.info { background: #dbeafe; }

.modal-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.modal-content p {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-content .btn {
    min-width: 120px;
}

/* Reprovado / Motivos styles (clean) */
.reprovado-card {
    background: #ffffff;
    border: 1px solid #fdecec;
    border-radius: 8px;
    padding: 14px;
}

.reprovado-header {
    display: flex;
    gap: 10px;
    align-items: center;
}

.reprovado-title {
    font-weight: 600;
    font-size: 1rem;
    color: #7f1d1d;
    margin: 0 0 2px 0;
}

.motivos-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 10px;
}

.motivo-column {
    flex: 1;
    min-width: 180px;
}

.motivos-title {
    font-weight: 600;
    color: #7f1d1d;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.motivo-badge {
    background: #fff8f8;
    color: #7f1d1d;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.85rem;
    margin: 4px 6px 0 0;
    display: inline-block;
}

.justificativa-box {
    margin-top: 10px;
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.justificativa-eleja {
    background: #fffbf0;
    border-left: 4px solid var(--warning-color);
    padding: 8px;
    border-radius: 6px;
    color: #92400e;
    font-size: 0.95rem;
}

.justificativa-comissao {
    background: #f8fdff;
    border-left: 4px solid #0284c7;
    padding: 8px;
    border-radius: 6px;
    color: #075985;
    font-size: 0.95rem;
}

.note-muted {
    margin-top: 10px;
    color: #64748b;
}

/* ============================================
   RECURSO ADMINISTRATIVO
   ============================================ */

/* ---- Page wrapper ---- */
.recurso-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   ADMIN PAGE – PADRÃO COMPARTILHADO
   ============================================ */

.admin-page-header {
    background: var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.admin-page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-page-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
}

.admin-page-sub {
    margin: 0.2rem 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 400;
}

.admin-page-header .btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    transition: all 0.2s ease;
}

.admin-page-header .btn-outline {
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    background: transparent;
}

.admin-page-header .btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
}

.admin-page-header .btn-success {
    background: #10b981;
    color: #fff;
}

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

.admin-page-header .btn-danger {
    background: #ef4444;
    color: #fff;
}

.admin-page-header .btn-danger:hover {
    background: #dc2626;
}

.admin-content-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

/* Admin Filters */
.admin-filters {
    margin-bottom: 1.5rem;
}

.admin-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.filter-group {
    flex: 0 0 auto;
}

.filter-input,
.filter-select {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    min-width: 160px;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-input::placeholder {
    color: #9ca3af;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

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

.filter-btn-primary {
    background: #6366f1;
    color: #fff;
}

.filter-btn-primary:hover {
    background: #4f46e5;
}

.filter-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.filter-btn-secondary:hover {
    background: #e5e7eb;
}

/* Action Button */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6366f1;
    background: #eef2ff;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.action-btn:hover {
    background: #6366f1;
    color: #fff;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem !important;
    color: #9ca3af;
}

.empty-state svg {
    margin-bottom: 1rem;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f3f4f6;
}

.pagination-info {
    color: #6b7280;
    font-size: 0.8rem;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.pagination-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.pagination-btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

.pagination-ellipsis {
    padding: 0 0.25rem;
    color: #9ca3af;
    font-size: 0.8rem;
}

/* Document links */
.doc-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #6366f1;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.doc-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

.doc-link::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%236366f1' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* No outer card — content flows directly (used in detalhes.html) */
.admin-content-body {
    /* just a semantic wrapper */
}

/* ---- Admin Detalhes - Status Banner ---- */
.detalhes-status-bar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.detalhes-status-bar.status-bar-aprovado  { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.detalhes-status-bar.status-bar-reprovado { background: linear-gradient(135deg, #fef2f2, #fee2e2); }
.detalhes-status-bar.status-bar-ajuste    { background: linear-gradient(135deg, #fffbeb, #fef3c7); }
.detalhes-status-bar.status-bar-analise   { background: linear-gradient(135deg, #f5f3ff, #ede9fe); }
.detalhes-status-bar-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    white-space: nowrap;
}
.detalhes-finalizado-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 700;
    color: #dc2626;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
}

/* ---- Admin Detalhes - Side-by-side cards grid ---- */
.detalhes-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 768px) {
    .detalhes-cards-row { grid-template-columns: 1fr; }
}

/* ---- Admin Detalhes - Document Grid ---- */
.detalhes-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.75rem;
    padding: 1.5rem 2rem;
}
.detalhes-doc-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.18s ease;
}
.detalhes-doc-item:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
    color: #4f46e5;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99,102,241,0.12);
}
.detalhes-doc-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.detalhes-doc-type {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}
.detalhes-doc-name {
    font-weight: 600;
    font-size: 0.88rem;
}

/* ---- Admin Detalhes - Validation Panel ---- */
.detalhes-val-grid {
    display: grid;
    grid-template-columns: 1fr;
}
.detalhes-val-grid.two-col {
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 768px) {
    .detalhes-val-grid.two-col { grid-template-columns: 1fr; }
}
.detalhes-val-col {
    padding: 1.5rem 2rem;
}
.detalhes-val-col + .detalhes-val-col {
    border-left: 1px solid var(--border-color);
}
.detalhes-val-col-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px solid;
    font-size: 0.9rem;
    font-weight: 700;
}
.detalhes-val-status-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.detalhes-val-status-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}
.detalhes-justificativa-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.85rem;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
}
.detalhes-justificativa-box strong {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}
.detalhes-reprovado-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.85rem;
    font-size: 0.85rem;
}
.detalhes-reprovado-box strong {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #dc2626;
    margin-bottom: 0.4rem;
}
.detalhes-reprovado-box ul {
    margin: 0;
    padding-left: 1.3rem;
    color: #7f1d1d;
}
.detalhes-val-form-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.25rem 0;
}
.detalhes-motivos-container {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin-bottom: 0.85rem;
}
.detalhes-motivos-container .motivos-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #92400e;
    margin-bottom: 0.6rem;
}
.detalhes-motivo-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    color: #334155;
}
.detalhes-motivo-check input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* ---- Recurso Detalhes (Admin) ---- */
.rd-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
    .rd-cards-row { grid-template-columns: 1fr; }
}
.rd-participant-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0.1rem 0 0.15rem;
}
.rd-participant-meta {
    font-size: 0.84rem;
    color: #64748b;
    margin: 0 0 0.15rem;
}
.rd-info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.88rem;
    color: #334155;
}
.rd-info-row:last-child { border-bottom: none; }
.rd-info-row span:first-child { color: #94a3b8; font-size: 0.82rem; }
.rd-info-row strong { font-weight: 600; text-align: right; }
.rd-fundamentacao-block {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
}
.rd-fundamentacao-text {
    white-space: pre-wrap;
    line-height: 1.7;
    color: #334155;
    font-size: 0.9rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.rd-anexo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.4rem;
    background: #f8fafc;
    transition: background 0.15s;
}
.rd-anexo-item:hover { background: #f1f5f9; }
.rd-anexo-name { font-size: 0.88rem; color: #334155; }
.rd-anexo-size { font-size: 0.78rem; color: #94a3b8; margin-left: 0.4rem; }
.rd-impugnacao-card {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fffbeb, #fef9c3);
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 1.5rem;
}
.rd-impugnacao-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.75rem;
}
.rd-impugnacao-subtitle {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 0.35rem;
}
.rd-impugnacao-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}
.rd-impugnacao-tag {
    background: #fef3c7;
    color: #78350f;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 500;
}
.rd-impugnacao-quote {
    margin: 0.4rem 0 0;
    padding: 0.7rem 0.9rem;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
    border: 1px solid #fcd34d;
    font-size: 0.87rem;
    line-height: 1.6;
    white-space: pre-wrap;
    color: #334155;
}
.rd-parecer-card {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}
.rd-parecer-card.parecer-acatado {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #86efac;
}
.rd-parecer-card.parecer-rejeitado {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #fca5a5;
}
.rd-parecer-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 1rem;
}
.rd-parecer-card.parecer-acatado .rd-parecer-header { color: #166534; }
.rd-parecer-card.parecer-rejeitado .rd-parecer-header { color: #991b1b; }
.rd-parecer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 768px) {
    .rd-parecer-grid { grid-template-columns: 1fr; }
}
.rd-parecer-col {
    padding: 1rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.7);
    border: 1px solid #e2e8f0;
}
.rd-parecer-col-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin: 0 0 0.5rem;
}
.rd-parecer-meta {
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 0.2rem 0 0.5rem;
}
.rd-parecer-fundamentacao {
    padding: 0.7rem 0.9rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    white-space: pre-wrap;
    font-size: 0.87rem;
    line-height: 1.6;
    color: #334155;
}
.rd-status-final {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.6);
    border: 1px solid #e2e8f0;
    font-size: 0.88rem;
    color: #334155;
}
.rd-julgar-card {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
}
.rd-julgar-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-color);
    margin: 0 0 1.25rem;
}
.rd-julgar-desc {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 1.25rem;
}
.rd-julgar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
    .rd-julgar-grid { grid-template-columns: 1fr; }
}
.rd-julgar-fieldset {
    border: 1px solid #c4b5fd;
    border-radius: 10px;
    padding: 1.25rem;
    margin: 0;
    background: rgba(255,255,255,0.6);
}
.rd-julgar-fieldset legend {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6366f1;
    padding: 0 0.4rem;
}
.rd-preview-status {
    display: none;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.7);
    border: 1px solid #cbd5e1;
    font-size: 0.88rem;
    color: #334155;
}
.rd-no-permission {
    margin-bottom: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    color: #64748b;
    font-size: 0.9rem;
}

/* ---- Card header ---- */
.recurso-card-header {
    background: var(--primary-color);
    padding: 1.75rem 2rem;
    text-align: center;
    color: white;
}

.recurso-tipo-badge {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.6rem;
}

.recurso-card-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
}

.recurso-card-header p {
    opacity: 0.82;
    font-size: 0.875rem;
}

.recurso-header-icon {
    display: none;
}

/* ---- Step progress bar ---- */
.recurso-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    background: #f8f9fb;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    gap: 0;
}

.recurso-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 56px;
}

.step-bubble {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 2px solid #cbd5e1;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.step-label {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.recurso-step-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    min-width: 16px;
    max-width: 48px;
    margin-bottom: 22px;
}

/* ---- Fieldset blocks ---- */
.recurso-fieldset {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    background: white;
    box-shadow: var(--shadow-soft);
    transition: box-shadow var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.recurso-fieldset:hover {
    box-shadow: var(--shadow-medium);
}

.recurso-fieldset::before {
    display: none;
}

/* ---- Legend ---- */
.recurso-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 0;
    margin-bottom: 1rem;
    float: none;
    width: 100%;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}

.legend-icon {
    display: none;
}

.legend-badge-optional {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.18rem 0.55rem;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.recurso-section-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1.25rem;
    line-height: 1.55;
}

/* ---- Input with icon prefix ---- */
.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 1;
    opacity: 0.65;
}

.input-with-icon .form-control {
    padding-left: 2.5rem;
}

/* ---- Textarea + char bar ---- */
.recurso-textarea {
    resize: vertical;
    min-height: 140px;
}

.recurso-char-container {
    margin-top: 0.5rem;
}

.recurso-char-bar-track {
    height: 4px;
    background: #e5e7eb;
    border-radius: 4px;
    margin-bottom: 0.4rem;
    overflow: hidden;
}

.recurso-char-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: #ef4444;
    transition: width 0.2s ease, background 0.3s ease;
    width: 0%;
}

.recurso-char-count {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recurso-min-warning {
    color: var(--danger-color);
    font-weight: 600;
}

/* ---- Pedido pills ---- */
.recurso-pedido-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.recurso-pedido-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.25rem;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    background: white;
    position: relative;
}

.recurso-pedido-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.recurso-pedido-card:hover {
    border-color: var(--primary-color);
    background: #f8f9fb;
}

.recurso-pedido-card:has(input:checked) {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.pedido-card-icon {
    display: none;
}

.pedido-card-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark-color);
}

.recurso-pedido-card:has(input:checked) .pedido-card-label {
    color: white;
}

/* ---- Upload zone ---- */
.recurso-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1.5rem;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    background: #fafbfc;
    text-align: center;
    margin-bottom: 0.75rem;
}

.recurso-upload-zone:hover,
.recurso-upload-zone.dragover {
    border-color: var(--primary-color);
    background: #f8f9fb;
}

.recurso-upload-zone.has-files {
    border-color: var(--success-color);
    background: #f0fdf4;
}

.upload-zone-icon {
    width: 40px;
    height: 40px;
    border: 1.5px solid #94a3b8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    margin-bottom: 0.15rem;
    flex-shrink: 0;
}

.upload-zone-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.95rem;
    color: var(--dark-color);
}

.upload-zone-text strong {
    color: var(--primary-color);
}

.upload-zone-hint {
    font-size: 0.78rem;
    color: #94a3b8;
}

.upload-zone-input {
    display: none;
}

/* ---- Anexos list ---- */
.recurso-anexos-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.recurso-anexo-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.recurso-anexo-item.anexo-ok {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.recurso-anexo-item.anexo-erro {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.recurso-anexo-item span {
    color: #64748b;
    font-size: 0.8rem;
}

.anexo-remove-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.anexo-remove-btn:hover {
    opacity: 1;
}

/* ---- Declaração ---- */
.recurso-declaracao-fieldset {
    background: white;
    border-color: var(--border-color);
}

.recurso-declaracao-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.recurso-declaracao-card:hover {
    background: #f1f4f8;
}

.declaracao-input {
    display: none;
}

.declaracao-check-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #94a3b8;
    border-radius: 4px;
    background: white;
    margin-top: 2px;
    position: relative;
    transition: var(--transition-fast);
}

.declaracao-input:checked ~ .declaracao-check-icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.declaracao-input:checked ~ .declaracao-check-icon::after {
    content: '✓';
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.declaracao-text {
    font-size: 0.9rem;
    color: var(--dark-color);
    line-height: 1.6;
}

/* ---- Submit area ---- */
.recurso-submit-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0 0.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.recurso-submit-btn {
    min-width: 260px;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 10px;
    padding: 1rem 2.5rem;
    gap: 0.6rem;
}

.recurso-submit-hint {
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
}

/* ---- Closed state ---- */
.recurso-closed-icon {
    display: none;
}

.recurso-closed-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

.recurso-closed-msg {
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.mt-3 { margin-top: 1rem; }

/* ---- Recurso decisão box (public view) ---- */
.recurso-decisao-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.decisao-texto {
    margin-top: 0.5rem;
    padding: 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    white-space: pre-wrap;
    line-height: 1.6;
}

/* ---- Admin recurso stats grid ---- */
.recurso-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.recurso-stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.recurso-stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.recurso-stat-label {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.recurso-stat-card.stat-em-analise { border-left: 3px solid var(--warning-color); }
.recurso-stat-card.stat-em-analise .recurso-stat-number { color: var(--warning-color); }
.recurso-stat-card.stat-acatado { border-left: 3px solid var(--success-color); }
.recurso-stat-card.stat-acatado .recurso-stat-number { color: var(--success-color); }
.recurso-stat-card.stat-rejeitado { border-left: 3px solid var(--danger-color); }
.recurso-stat-card.stat-rejeitado .recurso-stat-number { color: var(--danger-color); }
.recurso-stat-card.stat-parcial { border-left: 3px solid #8b5cf6; }
.recurso-stat-card.stat-parcial .recurso-stat-number { color: #8b5cf6; }
.recurso-stat-card.stat-nao-conhecido { border-left: 3px solid #6b7280; }
.recurso-stat-card.stat-nao-conhecido .recurso-stat-number { color: #6b7280; }

/* ---- Info grid (admin detail) ---- */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* ---- Legacy compat: recurso option pills ---- */
.recurso-opcoes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.recurso-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.95rem;
    background: white;
}

.recurso-option:hover {
    border-color: var(--primary-color);
    background: #f0f0ff;
}

.recurso-option:has(input:checked) {
    border-color: var(--primary-color);
    background: #eef0ff;
}

/* ---- Shared button helpers ---- */
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

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

.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.85rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .recurso-stepper {
        padding: 0.75rem;
    }
    .step-label {
        display: none;
    }
    .recurso-pedido-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    .recurso-fieldset {
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 600px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    .recurso-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .recurso-pedido-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   ACOMPANHAR RECURSO - MODERN LAYOUT
   ============================================ */

.acompanhar-resultado {
    margin-top: 2rem;
}

/* ---- Card Principal do Recurso ---- */
.acompanhar-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.acompanhar-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border-color);
}

.acompanhar-card-icon {
    width: 52px;
    height: 52px;
    background: var(--primary-color);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(63, 63, 99, 0.25);
}

.acompanhar-card-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

.acompanhar-protocolo {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0.15rem 0 0;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-weight: 500;
}

.acompanhar-status-badge {
    margin-left: auto;
}

/* Status Tags */
.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-tag.status-analise {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.status-tag.status-deferido {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.status-tag.status-indeferido {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.status-tag.status-ajuste {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    color: #9a3412;
    border: 1px solid #fb923c;
}

/* Card Body - Grid de Campos */
.acompanhar-card-body {
    padding: 1.75rem 2rem;
}

.acompanhar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 2rem;
}

.acompanhar-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.acompanhar-field.acompanhar-field-full {
    grid-column: 1 / -1;
}

.acompanhar-field .field-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.acompanhar-field .field-label svg {
    opacity: 0.7;
}

.acompanhar-field .field-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark-color);
    line-height: 1.5;
}

/* ---- Card de Decisão ---- */
.acompanhar-decisao-card {
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid;
    position: relative;
    overflow: hidden;
}

.acompanhar-decisao-card::before {
    display: none;
}

.acompanhar-decisao-card.decisao-deferido {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #6ee7b7;
}

.acompanhar-decisao-card.decisao-deferido::before {
    background: #10b981;
}

.acompanhar-decisao-card.decisao-indeferido {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fca5a5;
}

.acompanhar-decisao-card.decisao-indeferido::before {
    background: #ef4444;
}

.decisao-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.decisao-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.decisao-deferido .decisao-icon {
    background: #10b981;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.decisao-indeferido .decisao-icon {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.decisao-info {
    flex: 1;
}

.decisao-tipo-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.decisao-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
}

.decisao-deferido .decisao-badge {
    background: #10b981;
    color: white;
}

.decisao-indeferido .decisao-badge {
    background: #ef4444;
    color: white;
}

.decisao-meta {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0.4rem 0 0;
}

.decisao-fundamentacao {
    background: rgba(255, 255, 255, 0.75);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-top: 0.5rem;
}

.fundamentacao-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin: 0 0 0.5rem;
}

.fundamentacao-text {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* ---- Card de Impugnação Original ---- */
.acompanhar-impugnacao-card {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fed7aa;
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.impugnacao-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.impugnacao-icon {
    width: 38px;
    height: 38px;
    background: #ea580c;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.impugnacao-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #9a3412;
    margin: 0;
}

.impugnacao-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.impugnacao-section {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.impugnacao-section-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #9a3412;
    margin: 0 0 0.6rem;
}

.impugnacao-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.impugnacao-tag {
    background: #fef3c7;
    color: #78350f;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 500;
}

.impugnacao-text {
    font-size: 0.9rem;
    color: #451a03;
    line-height: 1.6;
    margin: 0;
}

/* ---- Card de Anexos ---- */
.acompanhar-anexos-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.anexos-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.anexos-header h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--dark-color);
}

.anexos-count {
    background: var(--primary-color);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 50px;
    margin-left: auto;
}

.anexos-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.anexo-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: var(--transition-fast);
}

.anexo-item:hover {
    background: #f1f5f9;
    border-color: var(--primary-color);
}

.anexo-icon {
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.anexo-nome {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anexo-tamanho {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ---- Responsivo Acompanhar ---- */
@media (max-width: 768px) {
    .acompanhar-card-header {
        flex-wrap: wrap;
        padding: 1.25rem;
    }

    .acompanhar-status-badge {
        margin-left: 0;
        width: 100%;
        margin-top: 0.75rem;
    }

    .acompanhar-card-body {
        padding: 1.25rem;
    }

    .acompanhar-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .decisao-header {
        flex-wrap: wrap;
    }

    .status-tag {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .acompanhar-card-icon {
        width: 44px;
        height: 44px;
    }

    .acompanhar-protocolo {
        font-size: 0.82rem;
    }
}
