/* ============================================
   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;
}

* {
    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: sticky;
    top: 0;
    z-index: 1000;
    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%;
    }
}

/* 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%;
}

/* 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.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-aguardando {
    background: #fef3c7;
    color: #d97706;
}

.badge-aprovado {
    background: #d1fae5;
    color: #059669;
}

.badge-reprovado {
    background: #fee2e2;
    color: #dc2626;
}

.badge-ajuste {
    background: #dbeafe;
    color: #2563eb;
}

/* 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: separate;
    border-spacing: 0;
}

.modern-table thead th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.modern-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.modern-table tbody tr {
    transition: var(--transition-fast);
}

.modern-table tbody tr:hover {
    background: #f8fafc;
}

.modern-table tbody tr:last-child td {
    border-bottom: none;
}

.table-id {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color);
    background: #f0f4ff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* 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: 400px;
    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-config-section {
    margin-bottom: 2rem;
}

.email-config-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.email-config-form textarea {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* 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;
}
