* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f8ff;
    margin: 0;
    color: #1f2937;
}

.navbar {
    background: #007bff;
    color: white;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.navbar h2 {
    margin: 0;
    font-size: 1.15rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
}

.page-title-row h1 {
    margin-bottom: 6px;
}

.page-title-row p {
    margin-top: 0;
    color: #4b5563;
}

.card {
    background: white;
    padding: 16px;
    margin: 10px 0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.rank-card {
    position: relative;
    padding-top: 38px;
}

.rank-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    background: #007bff;
    color: white;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
}

.action-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.12s ease;
}

.action-card:hover {
    transform: translateY(-2px);
}

.auth-wrap {
    min-height: calc(100vh - 74px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

input,
textarea,
select {
    display: block;
    margin: 10px 0;
    padding: 10px;
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font: inherit;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button,
.btn {
    background: #007bff;
    color: white;
    padding: 10px 14px;
    border: none;
    text-decoration: none;
    display: inline-block;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-secondary {
    background: #6b7280;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    margin-bottom: 12px;
}

.inline-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 6px;
    margin-bottom: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px;
}

.checkbox-item input {
    width: auto;
    margin: 0;
}

.project-image {
    width: 100%;
    border-radius: 8px;
    margin-top: 8px;
    max-height: 220px;
    object-fit: cover;
}

.error-text {
    color: #b91c1c;
}

.success-text {
    color: #166534;
}

@media (max-width: 720px) {
    .search-row {
        grid-template-columns: 1fr;
    }

    .inline-form {
        grid-template-columns: 1fr;
    }
}