:root {
    --primary-color: #102050;
    --text-color: #333;
}   

/* Login page styles */
.login-page {
    display: flex;
    align-items: center !important ;
    justify-content: center;
    padding: 3rem 1rem;
    min-height: 70vh;
    color: var(--text-color);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid rgba(16,32,80,0.06);
    box-shadow: 0 6px 24px rgba(16,32,80,0.06);
    border-radius: 8px;
    padding: 2rem;
}

.login-card h1 {
    margin: 0 0 1.25rem 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.form-row { margin-bottom: 0.85rem; }
.form-label { display: block; margin-bottom: 0.35rem; font-weight: 600; }
input[type="text"], input[type="password"], input[type="email"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #dfe6f0;
    border-radius: 6px;
    font-size: 1rem;
}

.form-actions { margin-top: 1rem; text-align: right; }
.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

.btn-primary:hover { opacity: 0.95; }

@media (max-width: 480px) {
    .login-card { padding: 1rem; }
}

/* small utilities for login info */
.muted { color: #6b7280; margin: 0 0 0.5rem 0; }
.username-display { background: #f3f4f6; padding: 0.5rem 0.75rem; border-radius: 6px; font-family: monospace; display: inline-block; }
.login-info { margin-bottom: 1rem; padding-right: 2rem; }
.login-card-fragment h2 { margin-top: 0; }

/* Layout for baselayout pages */
.base-content .login-page { display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1rem; min-height: 50vh; margin-top: 1rem; }

/* Card containing the form */
.login-card-fragment { width: 100%; max-width: 520px; background: #fff; border: 1px solid rgba(16,32,80,0.06); box-shadow: 0 6px 24px rgba(16,32,80,0.06); border-radius: 8px; padding: 1.5rem; margin-top: 0.75rem; }
.login-card-fragment h2 { margin: 0 0 1rem 0; color: var(--primary-color); font-size: 1.25rem; }

/* Error styles */
.errorlist { color: #b91c1c; margin: 0.5rem 0; list-style: none; padding-left: 0; }
.error { color: #b91c1c; }

@media (max-width: 480px) {
  .login-card-fragment { padding: 1rem; margin: 0 0.5rem; }
}

/* Expert reports dashboard */
.expert-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.expert-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-end;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 32, 80, 0.08);
    border-radius: 18px;
    padding: 1rem 1.1rem;
    box-shadow: 0 10px 30px rgba(16, 32, 80, 0.06);
}

.expert-toolbar h2 {
    margin: 0 0 0.35rem 0;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.expert-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.expert-filters input[type="search"],
.expert-filters select {
    min-width: 220px;
    border-radius: 12px;
    border: 1px solid #d7deea;
    padding: 0.75rem 0.9rem;
    background: #fff;
}

.expert-list {
    display: grid;
    gap: 1.25rem;
}

.expert-report-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(16, 32, 80, 0.08);
    border-radius: 20px;
    padding: 1.15rem;
    box-shadow: 0 14px 40px rgba(16, 32, 80, 0.08);
}

.expert-report-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.report-url {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-color);
    word-break: break-word;
}

.report-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: #edf2ff;
    color: #1f3a8a;
    font-size: 0.78rem;
    font-weight: 600;
}

.chip-alert { background: #fff4db; color: #9a6700; }
.chip-soft { background: #f3f4f6; color: #334155; }

.report-votes {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.vote-button {
    border: 1px solid #d7deea;
    background: #fff;
    border-radius: 12px;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    font-weight: 700;
    min-width: 84px;
}

.vote-button:hover { background: #f8fafc; }
.vote-active { border-color: #1d4ed8; color: #1d4ed8; }
.vote-active-down { border-color: #b91c1c; color: #b91c1c; }

.expert-comment {
    background: #f8fafc;
    border-left: 4px solid #c7d2fe;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    color: #334155;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.screenshot-thumb {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(16, 32, 80, 0.08);
    background: #fff;
}

.screenshot-thumb img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.classification-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(16, 32, 80, 0.08);
}

.classification-list {
    display: grid;
    gap: 0.75rem;
}

.classification-item {
    background: #f8fafc;
    border: 1px solid rgba(16, 32, 80, 0.06);
    border-radius: 14px;
    padding: 0.9rem;
}

.classification-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: baseline;
    margin-bottom: 0.55rem;
}

.classification-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.classification-form-block .expert-classification-form {
    display: grid;
    gap: 1rem;
}

.form-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-grid-two .full-width {
    grid-column: 1 / -1;
}

.form-grid-two label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 700;
    color: #1f2937;
}

.form-grid-two textarea {
    width: 100%;
    min-height: 100px;
}

.form-grid-two .errorlist,
.expert-classification-form .errorlist {
    color: #b91c1c;
    margin: 0.45rem 0 0;
    padding-left: 1.1rem;
}

.expert-empty {
    padding: 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border: 1px dashed rgba(16, 32, 80, 0.12);
    border-radius: 18px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0.5rem 0 2rem;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(16, 32, 80, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    text-decoration: none;
}

.pagination a:hover { background: #fff; }

.expert-classification-form textarea,
.expert-classification-form select,
.expert-classification-form input[type="text"],
.expert-classification-form input[type="url"],
.expert-classification-form input[type="search"] {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.875rem;
    background: #ffffff;
    color: #111827;
    padding: 0.85rem 0.95rem;
}

.expert-classification-form textarea {
    min-height: 7rem;
}

.expert-classification-form textarea:focus,
.expert-classification-form select:focus,
.expert-classification-form input[type="text"]:focus,
.expert-classification-form input[type="url"]:focus,
.expert-classification-form input[type="search"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.expert-classification-form .errorlist {
    margin-top: 0.4rem;
}

.expert-report-comment {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.expert-category-pill {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
    line-height: 1.35;
}

@media (max-width: 760px) {
    .expert-report-head {
        flex-direction: column;
    }

    .report-votes {
        width: 100%;
    }

    .vote-button {
        width: 100%;
    }

    .form-grid-two {
        grid-template-columns: 1fr;
    }
}
