/* ============================================
   Mediador CCT — Bootstrap Light Theme
   Fonte preta, fundo claro, alto contraste
   ============================================ */

body {
    background-color: #f8f9fa;
    color: #212529;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Navbar refinada */
.navbar-brand {
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

/* Cards */
.card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: #212529;
}
.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #212529;
    border-radius: 0.75rem 0.75rem 0 0 !important;
    display: flex;
    align-items: center;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-size: 0.85rem;
    border-radius: 0 0 0.75rem 0.75rem !important;
}

/* KPI Cards */
.kpi-card {
    position: relative;
    overflow: hidden;
    border: none;
    color: #fff;
}
.kpi-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.kpi-card .card-body {
    position: relative;
    z-index: 1;
}
.kpi-card .card-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}
.kpi-card h2 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.kpi-card .card-footer {
    position: relative;
    z-index: 1;
    background: rgba(0,0,0,0.15);
    border-top: none;
}
.kpi-card .card-footer a {
    opacity: 0.9;
    transition: opacity 0.2s;
    color: #fff;
    text-decoration: none;
}
.kpi-card .card-footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Cores de fundo KPI */
.bg-primary   { background: linear-gradient(135deg, #0d6efd, #0a58ca) !important; }
.bg-success   { background: linear-gradient(135deg, #198754, #146c43) !important; }
.bg-info      { background: linear-gradient(135deg, #0dcaf0, #0aa2c0) !important; }
.bg-warning   { background: linear-gradient(135deg, #ffc107, #cc9a06) !important; color: #212529 !important; }
.bg-danger    { background: linear-gradient(135deg, #dc3545, #b02a37) !important; }
.bg-secondary { background: linear-gradient(135deg, #6c757d, #565e64) !important; }

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    color: #212529;
}
.table thead th {
    background: #e9ecef;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding: 0.875rem 1rem;
    white-space: nowrap;
    text-align: left;
}
.table tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
    color: #212529;
}
.table tbody tr {
    transition: background 0.15s;
}
.table tbody tr:hover {
    background: #f1f3f5;
}
.table-striped tbody tr:nth-child(odd) {
    background: #f8f9fa;
}
.table-striped tbody tr:nth-child(odd):hover {
    background: #f1f3f5;
}

/* Buttons refinados */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-weight: 500;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.25;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* Outline buttons mais escuros para legibilidade */
.btn-outline-primary { color: #0a58ca; border-color: #0d6efd; }
.btn-outline-primary:hover { background: #0d6efd; color: #fff; }

.btn-outline-success { color: #146c43; border-color: #198754; }
.btn-outline-success:hover { background: #198754; color: #fff; }

.btn-outline-info { color: #0aa2c0; border-color: #0dcaf0; }
.btn-outline-info:hover { background: #0dcaf0; color: #fff; }

.btn-outline-warning { color: #997404; border-color: #ffc107; }
.btn-outline-warning:hover { background: #ffc107; color: #212529; }

.btn-outline-danger { color: #b02a37; border-color: #dc3545; }
.btn-outline-danger:hover { background: #dc3545; color: #fff; }

.btn-outline-secondary { color: #495057; border-color: #6c757d; }
.btn-outline-secondary:hover { background: #6c757d; color: #fff; }

/* Forms */
.form-control, .form-select {
    background-color: #fff;
    border: 1.5px solid #ced4da;
    border-radius: 0.5rem;
    padding: 0.6rem 0.875rem;
    font-size: 0.9rem;
    color: #212529;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-control::placeholder {
    color: #adb5bd;
}
.form-control:focus, .form-select:focus {
    background-color: #fff;
    border-color: #86b7fe;
    box-shadow: 0 0 0 4px rgba(13,110,253,0.15);
    color: #212529;
}

/* Pagination */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.25rem;
}
.pagination .page-link {
    display: block;
    background: #fff;
    border: 1px solid #dee2e6;
    color: #0d6efd;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem 0.85rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s;
}
.pagination .page-link:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}
.pagination .active .page-link {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}
.pagination .disabled .page-link {
    background: #fff;
    border-color: #dee2e6;
    color: #adb5bd;
    cursor: not-allowed;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0.75rem 1rem;
    margin: 0;
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    font-size: 0.85rem;
}
.breadcrumb-item a {
    color: #0d6efd;
    text-decoration: none;
}
.breadcrumb-item a:hover {
    text-decoration: underline;
}
.breadcrumb-item.active {
    color: #6c757d;
}
.breadcrumb-item + .breadcrumb-item::before {
    content: '>';
    padding: 0 0.5rem;
    color: #adb5bd;
}

/* Detail header */
.detail-header {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}
.detail-header h2 {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
    color: #212529;
}
.detail-header .meta {
    color: #6c757d;
    font-size: 0.875rem;
}

/* List group */
.list-group-item {
    background-color: #fff;
    border: 1px solid #dee2e6;
    color: #212529;
    padding: 0.75rem 1rem;
}
.list-group-item:hover {
    background-color: #f8f9fa;
}

/* Modals */
.modal-content {
    background-color: #fff;
    border: 1px solid #dee2e6;
    color: #212529;
    border-radius: 0.75rem;
}
.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}
.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

/* Alerts */
.alert {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    color: #212529;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
main > div > * {
    animation: fadeIn 0.4s ease forwards;
}

/* Utilities */
.fw-mono {
    font-family: 'SF Mono', Monaco, monospace;
    font-weight: 500;
}
.text-gradient {
    background: linear-gradient(135deg, #0d6efd, #198754);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Login card */
.login-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.875rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
    max-width: 420px;
}
.login-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: #fff;
    padding: 2rem;
    text-align: center;
}
.login-header .logo-icon {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.15);
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}
.login-body {
    padding: 2rem;
}
.login-body .form-control {
    background: #fff;
    border: 1.5px solid #ced4da;
    color: #212529;
}
.login-body .form-control:focus {
    background: #fff;
    border-color: #86b7fe;
    box-shadow: 0 0 0 4px rgba(13,110,253,0.15);
    color: #212529;
}
.login-body .form-label {
    color: #495057;
}
.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: none;
    border-radius: 0.75rem;
    padding: 0.875rem;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
    transition: all 0.2s;
    color: #fff;
    cursor: pointer;
}
.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13,110,253,0.25);
}

/* Form error text */
.form-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}
