:root {
    --primary-color: #0f172a;
    --primary-light: #1e293b;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --border-radius: 12px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand i {
    color: var(--accent-color);
    font-size: 1.8rem;
}
.brand strong {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-color);
}

.btn-nav {
    background: var(--primary-color);
    color: white !important;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    transition: background 0.3s !important;
}
.btn-nav:hover {
    background: var(--primary-light) !important;
}

/* Hero Section */
.hero {
    position: relative;
    background-image: url('../uploads/hero_bg.png');
    background-size: cover;
    background-position: center;
    padding: 50px 0 80px 0;
    color: white;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 40px;
}

/* Search Box */
.search-box {
    background: white;
    padding: 8px;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    margin-bottom: 50px;
}

.search-box form {
    display: flex;
    width: 100%;
    align-items: center;
}

.search-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-left: 15px;
}

.search-box input {
    flex-grow: 1;
    border: none;
    padding: 15px 20px;
    font-size: 1.1rem;
    outline: none;
    font-family: inherit;
    color: var(--text-main);
    background: transparent;
}

.search-box .btn-primary {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}
.search-box .btn-primary:hover {
    background: var(--accent-hover);
}

/* Stats */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 30px;
    border-radius: 16px;
    min-width: 150px;
}

.stat-box h3 {
    font-size: 2.5rem;
    margin: 0;
    font-weight: 800;
}
.stat-box span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #cbd5e1;
}

.stat-box.warning h3 { color: #fcd34d; }
.stat-box.success h3 { color: #6ee7b7; }

/* Main Content */
.main-content {
    padding: 60px 0;
    min-height: 50vh;
}

.section-header {
    margin-bottom: 40px;
    text-align: center;
}
.section-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0 0 10px 0;
}
.divider {
    height: 4px;
    width: 60px;
    background: var(--accent-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* Grid & Cards */
.persons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.person-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.person-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-image-wrapper {
    position: relative;
    height: 280px;
}

.person-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
}

.status-desaparecido {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}
.status-encontrado {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.person-info {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.person-info h3 {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    color: var(--primary-color);
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 0.95rem;
}
.info-row i {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-top: 2px;
}
.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-actions {
    margin-top: auto;
    padding-top: 20px;
}

.btn-outline {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    border: 2px solid #e2e8f0;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    box-sizing: border-box;
}
.btn-outline:hover {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}
.alert-success {
    background: var(--success-bg);
    color: #047857;
    border: 1px solid #a7f3d0;
}
.alert i {
    font-size: 1.5rem;
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--border-radius);
    border: 1px dashed #cbd5e1;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 15px;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    padding: 40px 0;
    text-align: center;
}
.footer-content .brand {
    color: white;
    justify-content: center;
    margin-bottom: 10px;
}
.footer-content p {
    color: #94a3b8;
    margin: 0;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .nav-container { flex-direction: column; height: auto; padding: 15px 0; gap: 15px; }
    .search-box { flex-direction: column; border-radius: 20px; padding: 15px; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); }
    .search-box input { background: white; border-radius: 10px; margin-bottom: 10px; width: 100%; box-sizing: border-box; }
    .search-box .btn-primary { width: 100%; }
    .search-icon { display: none; }
    .form-row { flex-direction: column; gap: 0; }
    .detail-card { flex-direction: column; }
    .info-grid { grid-template-columns: 1fr; }
}

/* Page Header */
.page-header {
    position: relative;
    background-image: url('../uploads/hero_bg.png');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 40px 0;
    margin-bottom: 40px;
}
.page-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95));
    z-index: 0;
}
.page-header .container {
    position: relative;
    z-index: 1;
}
.page-header h1 { margin: 0 0 10px 0; font-size: 2.2rem; }
.page-header p { margin: 0; color: #cbd5e1; font-size: 1.1rem; }
.back-link {
    color: #cbd5e1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: color 0.3s;
}
.back-link:hover { color: white; }

/* Forms */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid #e2e8f0;
}
.form-section {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
}
.form-section:last-of-type { border-bottom: none; }
.form-section h3 {
    margin: 0 0 20px 0;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-section h3 i { color: var(--accent-color); font-size: 1.5rem; }
.form-row {
    display: flex;
    gap: 20px;
}
.form-group {
    margin-bottom: 20px;
    flex: 1;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-light);
}
.required { color: var(--danger); }
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.3s;
    background: #f8fafc;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}
.file-upload {
    border: 2px dashed #cbd5e1;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    background: #f8fafc;
}
.file-upload input { margin-bottom: 10px; }
.btn-large {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}
.btn-primary {
    background: var(--accent-color);
    color: white;
    transition: background 0.3s;
}
.btn-primary:hover { background: var(--accent-hover); }

/* Detail Page */
.detail-card {
    display: flex;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid #e2e8f0;
}
.detail-image {
    flex: 1;
    position: relative;
    min-width: 300px;
}
.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.large-badge {
    font-size: 1.1rem;
    padding: 10px 20px;
    top: 20px;
    right: 20px;
}
.detail-info {
    flex: 1.5;
    padding: 40px;
    display: flex;
    flex-direction: column;
}
.info-header { margin-bottom: 30px; border-bottom: 1px solid #e2e8f0; padding-bottom: 20px; }
.info-header h2 { font-size: 2.5rem; margin: 0 0 10px 0; color: var(--primary-color); }
.meta-data { color: var(--text-muted); font-size: 0.95rem; display: flex; align-items: center; gap: 5px; }
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}
.info-item { display: flex; flex-direction: column; gap: 5px; }
.full-width { grid-column: 1 / -1; }
.info-item .label { font-weight: 600; color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; }
.info-item .value { font-size: 1.1rem; color: var(--primary-color); font-weight: 500; }
.description-box { background: #f8fafc; padding: 20px; border-radius: 8px; border-left: 4px solid var(--accent-color); }
.contact-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    background: #eff6ff;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}
.contact-box i { font-size: 2.5rem; color: var(--accent-color); }
.action-box { margin-top: 40px; padding-top: 30px; border-top: 1px solid #e2e8f0; }
.btn-success { background: var(--success); color: white; border: none; cursor: pointer; transition: background 0.3s; }
.btn-success:hover { background: #059669; }
.w-100 { width: 100%; }
.warning-text { font-size: 0.9rem; color: var(--text-muted); text-align: center; margin-top: 15px; display: flex; align-items: center; justify-content: center; gap: 5px; }
