/* ============================================
   AF Informes - Custom Styles
   Bootstrap 5.3.3 provides the base.
   This file contains brand-specific overrides.
   ============================================ */

/* --- Brand Colors & Variables --- */
:root {
    --af-primary: #426a65;
    --af-primary-dark: #2c4438;
    --af-primary-hover: #365a54;
}

/* --- Base --- */
body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* --- Brand Utility Classes --- */
.text-af {
    color: var(--af-primary) !important;
}

.bg-af {
    background-color: var(--af-primary) !important;
}

.btn-af {
    background-color: var(--af-primary);
    color: #fff;
    border: 2px solid var(--af-primary);
    font-weight: 500;
}

.btn-af:hover,
.btn-af:focus {
    background-color: var(--af-primary-dark);
    color: #fff;
}

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

.btn-outline-af:hover,
.btn-outline-af:focus {
    background-color: var(--af-primary);
    color: #fff;
}

/* --- Brand Titles --- */
.af-title {
    color: var(--af-primary);
    font-weight: 700;
}

.af-title-lg {
    color: var(--af-primary);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
}

@media (max-width: 768px) {
    .af-title-lg {
        font-size: 2.5rem;
    }
}

/* --- Confidentiality bullets --- */
.af-bullet::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: var(--af-primary);
    font-weight: bold;
    font-size: 1.2rem;
}

/* --- Header --- */
.main-header {
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.main-header .navbar {
    background-color: #f8f9fa !important;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.main-header .dropdown-menu {
    border: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

.main-header .dropdown-item {
    color: var(--af-primary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.main-header .dropdown-item:hover {
    background-color: #f5f5f5;
}

/* --- Footer --- */
.main-footer {
    background-color: var(--af-primary);
    color: white;
    padding: 2rem 2rem 1rem;
    margin-top: auto;
    font-size: 0.875rem;
}

.main-footer h3 {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.main-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.main-footer a:hover {
    color: white;
}

/* --- Form Controls (AF-branded focus) --- */
.form-control:focus,
.form-select:focus {
    border-color: var(--af-primary);
    box-shadow: 0 0 0 0.2rem rgba(66, 106, 101, 0.15);
}

.form-label {
    color: var(--af-primary);
    font-weight: 500;
}

/* --- AF Checkbox --- */
.af-check:checked {
    background-color: var(--af-primary);
    border-color: var(--af-primary);
}

.af-check:focus {
    border-color: var(--af-primary);
    box-shadow: 0 0 0 0.2rem rgba(66, 106, 101, 0.25);
}

/* --- Report Status Badges (profile page) --- */
.report-status {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-pending {
    background: #fff3e0;
    color: #f57c00;
}

.status-processing {
    background: #e3f2fd;
    color: #1976d2;
}

.status-not_evaluable {
    background: #fff1f2;
    color: #e11d48;
}

/* --- Responsive (md breakpoint border-end) --- */
@media (min-width: 768px) {
    .border-end-md {
        border-right: 1px solid #dee2e6 !important;
    }
}

/* --- Upload Spinner --- */
.hidden {
    display: none !important;
}

/* --- Loader (used by manuscript processing) --- */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--af-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* --- Clickable Cards --- */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* --- Text Clamp Utilities --- */
.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Social Icon Links (WCAG 2.5.5 touch target) --- */
.social-icon-link {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* --- Avatar Utilities --- */
.avatar-lg {
    width: 80px;
    height: 80px;
    font-size: 1.8rem;
    font-weight: 600;
}

.avatar-md {
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
    font-weight: 600;
}

.avatar-sm {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* --- Profile Header --- */
.avatar-xl {
    width: 96px;
    height: 96px;
    font-size: 2.2rem;
    font-weight: 600;
}

.profile-stat-box {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 0.6rem 1.5rem;
    min-width: 80px;
}

/* --- Links --- */
a.text-af:hover {
    color: var(--af-primary-dark) !important;
}
