:root {
    --bg: #f6f8fc;
    --card: rgba(255, 255, 255, .88);
    --card-solid: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: rgba(229, 231, 235, .95);
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --success: #15803d;
    --shadow: 0 28px 90px rgba(15, 23, 42, .10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .16), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(20, 184, 166, .16), transparent 32rem),
        linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 18px;
}

.shell {
    width: 100%;
    max-width: 1120px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, #2563eb, #0f766e);
    box-shadow: 0 18px 36px rgba(37, 99, 235, .24);
}

.brand-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.brand-subtitle {
    margin-top: 2px;
    color: var(--muted);
    font-size: 14px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.top-link,
.logout-button {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 14px;
    color: #374151;
    background: rgba(255, 255, 255, .74);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.logout-button {
    font-family: inherit;
}

.hero {
    display: grid;
    grid-template-columns: .92fr 1.38fr;
    gap: 26px;
    align-items: stretch;
}

.intro,
.card {
    border: 1px solid var(--border);
    border-radius: 30px;
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.intro {
    padding: 34px;
    overflow: hidden;
    position: relative;
}

.intro::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -120px;
    bottom: -120px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(37, 99, 235, .20), transparent 68%);
}

.intro h1 {
    margin: 0;
    font-size: 42px;
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.intro p {
    margin: 18px 0 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 16px;
}

.steps {
    display: grid;
    gap: 14px;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.step-number {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 900;
    color: white;
    background: var(--primary);
}

.step strong {
    display: block;
    font-size: 14px;
}

.step span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.card {
    padding: 34px;
}

.auth-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 36px;
}

.card h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.card-description {
    margin: 8px 0 28px;
    color: var(--muted);
    line-height: 1.55;
}

.section-title {
    margin: 26px 0 14px;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #374151;
}

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

.field {
    display: grid;
    gap: 7px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    font-size: 14px;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 17px;
    padding: 14px 15px;
    font: inherit;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

textarea {
    resize: vertical;
    min-height: 124px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(37, 99, 235, .85);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
}

.checkbox-row input {
    width: 16px;
    height: 16px;
}

.error {
    color: var(--danger);
    font-size: 13px;
    line-height: 1.4;
}

.alert {
    margin-bottom: 18px;
    border-radius: 17px;
    padding: 13px 15px;
    background: rgba(21, 128, 61, .10);
    color: var(--success);
    font-size: 14px;
    font-weight: 700;
}

.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 28px;
}

.privacy {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 14px 24px;
    color: #fff;
    background: var(--primary);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(37, 99, 235, .24);
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 20px 42px rgba(37, 99, 235, .30);
}

.button.full {
    width: 100%;
}

.under-form {
    margin-top: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.under-form a {
    color: var(--primary);
    font-weight: 900;
}

.success-card {
    max-width: 640px;
    margin: 0 auto;
    padding: 46px;
    text-align: center;
}

.success-icon {
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    margin: 0 auto 20px;
    border-radius: 999px;
    color: white;
    background: var(--success);
    font-size: 30px;
    font-weight: 900;
}

.success-card h1 {
    margin: 0;
    font-size: 36px;
    letter-spacing: -0.05em;
}

.success-card p {
    color: var(--muted);
    line-height: 1.65;
}

.hidden-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Lista zgłoszeń */

.list {
    display: grid;
    gap: 14px;
}

.recommendation-row {
    display: grid;
    grid-template-columns: 1.2fr .9fr .8fr .8fr auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, .74);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.recommendation-row:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, .25);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

.row-title {
    font-weight: 900;
    letter-spacing: -0.02em;
}

.row-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    background: #eef2ff;
    color: #3730a3;
}

.badge.gray {
    background: #f3f4f6;
    color: #374151;
}

.badge.success {
    background: #dcfce7;
    color: #166534;
}

.badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge.info,
.badge.primary {
    background: #dbeafe;
    color: #1d4ed8;
}

.empty-state {
    padding: 42px 24px;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, .62);
}

.empty-state h3 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.empty-state p {
    color: var(--muted);
}

/* Podgląd zgłoszenia */

.details-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.detail-box {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, .72);
}

.detail-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.detail-value {
    margin-top: 7px;
    font-weight: 900;
    word-break: break-word;
}

.timeline {
    display: grid;
    gap: 14px;
}

.message {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 13px;
    align-items: start;
}

.avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, #2563eb, #0f766e);
}

.message-card {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, .78);
}

.message-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.message-author {
    color: var(--text);
    font-weight: 900;
}

.message-body {
    white-space: pre-line;
    line-height: 1.6;
}

.pagination {
    margin-top: 22px;
}

.small-button {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 10px 14px;
    color: white;
    background: var(--primary);
    font-size: 13px;
    font-weight: 900;
}
.message-mine .message-card {
    border-color: rgba(37, 99, 235, .25);
    background: rgba(239, 246, 255, .78);
}

.message-mine .avatar {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
}

.timeline-event {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 760px;
    margin: 4px auto;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 18px;
    background: rgba(248, 250, 252, .82);
}

.timeline-event-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, .10);
    color: #2563eb;
    font-size: 18px;
    font-weight: 900;
}

.timeline-event-content {
    min-width: 0;
}

.timeline-event-title {
    font-size: 13px;
    font-weight: 900;
    color: #1f2937;
}

.timeline-event-message {
    margin-top: 4px;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

.timeline-event-date {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.timeline-event-status {
    border-color: rgba(37, 99, 235, .18);
    background: rgba(239, 246, 255, .72);
}

.alert-warning {
    background: rgba(245, 158, 11, .12);
    color: #92400e;
}
/* Responsywność */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .intro h1 {
        font-size: 34px;
    }

    .recommendation-row {
        grid-template-columns: 1fr;
    }

    .details-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .page {
        padding: 26px 14px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .card,
    .intro,
    .auth-card {
        padding: 23px;
        border-radius: 24px;
    }

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

    .actions {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .message {
        grid-template-columns: 1fr;
    }

    .avatar {
        display: none;
    }
}
