/* =========================================================
   GLOBAL
========================================================= */

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    background: #f5f7fa;

    color: #1f2937;
}


/* =========================================================
   APPLICATION HEADER
========================================================= */

.app-header {
    height: 68px;

    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04);
}


.header-inner {
    max-width: 1200px;

    height: 100%;

    margin: 0 auto;

    padding: 0 24px;

    display: flex;

    align-items: center;

    justify-content: space-between;
}


/* =========================================================
   APPLICATION BRAND
========================================================= */

.app-brand {
    display: flex;

    align-items: center;

    gap: 11px;

    color: #111827;

    text-decoration: none;

    font-size: 18px;

    font-weight: 650;
}


.app-logo {
    width: 36px;

    height: 36px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 10px;

    background: #2563eb;

    color: #ffffff;

    font-size: 17px;

    font-weight: 700;
}


.app-name {
    white-space: nowrap;
}


/* =========================================================
   NAVIGATION
========================================================= */

.app-nav {
    display: flex;

    align-items: center;

    gap: 18px;
}


.user-info {
    color: #6b7280;

    font-size: 14px;
}


.nav-link {
    color: #374151;

    text-decoration: none;

    font-size: 14px;

    font-weight: 500;

    transition:
        color 0.15s ease;
}


.nav-link:hover {
    color: #2563eb;
}


.logout-link {
    color: #6b7280;
}


.logout-link:hover {
    color: #dc2626;
}


/* =========================================================
   MAIN CONTENT
========================================================= */

.main-content {
    max-width: 1200px;

    min-height: calc(100vh - 120px);

    margin: 0 auto;

    padding: 50px 24px;
}


/* =========================================================
   PAGE CONTAINER
========================================================= */

.page-container {
    width: 100%;

    max-width: 800px;

    margin: 30px auto;

    padding: 35px 40px;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 16px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.05);

    line-height: 1.6;
}


.page-container h1,
.page-container h2,
.page-container h3 {
    text-align: left;

    color: #111827;
}


.page-container > p,
.page-container h2 + p,
.page-container h3 + p {
    text-align: justify;
}


.page-container li {
    text-align: justify;
}


/* =========================================================
   FOOTER
========================================================= */

.app-footer {
    padding: 20px;

    text-align: center;

    color: #9ca3af;

    font-size: 13px;
}


.error {
    margin: 0 0 20px;

    padding: 12px 14px;

    background: #fef2f2;

    border: 1px solid #fecaca;

    border-radius: 8px;

    color: #b91c1c;

    font-size: 14px;

    line-height: 1.5;
}

.required {
    color: #c00;
    font-weight: bold;
}
.privacy-notice {
    padding: 15px 18px;
    margin: 15px 0 20px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f8f8f8;
}

.consent-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.consent-box input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
}

.consent-box label {
    cursor: pointer;
    line-height: 1.5;
}

.required {
    color: #c00;
    font-weight: bold;
}

.top-bar a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    background: #f5f5f5;
    color: #333;
}

.top-bar a:hover {
    background: #e5e5e5;
}

.feedback-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 30px 0;
    border: 1px solid #e2e5e9;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}


/* ---------------------------------------------------------
   Table
--------------------------------------------------------- */

.feedback-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #263238;
}


/* ---------------------------------------------------------
   Header
--------------------------------------------------------- */

.feedback-table thead {
    background: #f5f7f9;
}

.feedback-table th {
    padding: 15px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #5f6b76;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #dfe3e7;
    white-space: nowrap;
}


/* ---------------------------------------------------------
   Rows
--------------------------------------------------------- */

.feedback-table tbody tr {
    border-bottom: 1px solid #edf0f2;
    transition: background 0.15s ease;
}

.feedback-table tbody tr:last-child {
    border-bottom: none;
}

.feedback-table tbody tr:hover {
    background: #fafbfc;
}


/* ---------------------------------------------------------
   Cells
--------------------------------------------------------- */

.feedback-table td {
    padding: 16px;
    vertical-align: middle;
}


/* ---------------------------------------------------------
   Document ID
--------------------------------------------------------- */

.document-cell {
    max-width: 220px;
}

.doc-id {
    display: inline-block;
    max-width: 210px;
    font-family: monospace;
    font-size: 12px;
    color: #45515c;
    background: #f3f5f7;
    padding: 5px 8px;
    border-radius: 5px;
    word-break: break-all;
}


/* ---------------------------------------------------------
   Dimension
--------------------------------------------------------- */

.dimension-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 6px;
    background: #eef2f6;
    color: #37474f;
    font-weight: 600;
    white-space: nowrap;
}


/* ---------------------------------------------------------
   Scores
--------------------------------------------------------- */

.score-cell {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
}

.reference-score {
    color: #455a64;
}


/* ---------------------------------------------------------
   Result
--------------------------------------------------------- */

.result-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.result-badge.correct {
    background: #e8f5e9;
    color: #2e7d32;
}

.result-badge.incorrect {
    background: #ffebee;
    color: #c62828;
}


/* ---------------------------------------------------------
   Annotation hint
--------------------------------------------------------- */

.hint-cell {
    min-width: 250px;
    max-width: 420px;
    line-height: 1.5;
    color: #4f5b66;
}


/* ---------------------------------------------------------
   Attempts
--------------------------------------------------------- */

.attempt-cell {
    text-align: center;
}

.attempt-badge {
    display: inline-flex;
    min-width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border-radius: 50%;
    background: #eef1f4;
    color: #455a64;
    font-weight: 700;
}


/* ---------------------------------------------------------
   Mobile
--------------------------------------------------------- */

@media (max-width: 900px) {

    .feedback-table {
        min-width: 950px;
    }

    .feedback-table td {
        padding: 13px;
    }

}

.feedback-row {
    cursor: pointer;
}

.feedback-row:hover {
    background-color: #f2f5f8;
}

/* =========================================================
   PAGE CONTAINER
========================================================= */

.page-container {
    width: 100%;

    max-width: 800px;

    margin: 30px auto;

    padding: 35px 40px;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 16px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.05);

    line-height: 1.6;
}

/* Normal text */
.page-container > p,
.page-container h2 + p,
.page-container h3 + p {
    text-align: justify;
}

/* Lists */
.page-container li {
    text-align: justify;
}

/* Headings stay left aligned */
.page-container h1,
.page-container h2,
.page-container h3 {
    text-align: left;
}
/* =========================================================
   FORMS
========================================================= */

.form-group {
    margin-bottom: 20px;
}


.form-group label {
    display: block;

    margin-bottom: 7px;

    color: #374151;

    font-size: 14px;

    font-weight: 600;
}


.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;

    padding: 11px 13px;

    background: #ffffff;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    color: #111827;

    font-family: inherit;

    font-size: 15px;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;

    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}


/* =========================================================
   BUTTONS
========================================================= */

button {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 11px 20px;

    border: none;

    border-radius: 8px;

    background: #2563eb;

    color: #ffffff;

    font-family: inherit;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.05s ease;
}


button:hover {
    background: #1d4ed8;
}


button:active {
    transform: translateY(1px);
}


/* =========================================================
   LOGIN
========================================================= */

.login-container {
    max-width: 440px;

    margin-top: 30px;
}


.page-subtitle {
    margin-top: 0;

    margin-bottom: 30px;

    color: #6b7280;

    line-height: 1.6;
}


.help-text {
    margin-top: 24px;

    color: #6b7280;

    font-size: 14px;

    line-height: 1.6;
}
/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .header-inner {
        padding: 0 16px;
    }

    .app-name {
        font-size: 16px;
    }

    .user-info {
        display: none;
    }

    .app-nav {
        gap: 12px;
    }

    .main-content {
        padding: 30px 16px;
    }

    .page-container {
        margin: 10px auto;

        padding: 28px 22px;
    }

}