/* ================================================
   JNS RODO System - wspólny arkusz stylów
   ================================================ */

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base */
body {
    font-family: system-ui, -apple-system, sans-serif;
    background: #f4f4f4;
    min-height: 100vh;
    color: #222;
}

/* ================================================
   Topbar
   ================================================ */
.topbar {
    background: #fff;
    border-bottom: 3px solid #c0392b;
    padding: 0 2rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-logo {
    font-size: 20px;
    font-weight: 800;
    color: #222;
    letter-spacing: 1px;
    text-decoration: none;
}

.topbar-logo span { color: #c0392b; }

.topbar-right {
    font-size: 12px;
    color: #888;
}

.topbar-right a {
    color: #c0392b;
    text-decoration: none;
    margin-left: 1rem;
}

/* ================================================
   Layout
   ================================================ */
.container {
    max-width: 640px;
    margin: 2.5rem auto;
    padding: 0 1rem;
}

.container--narrow {
    max-width: 480px;
    margin: 2.5rem auto;
    padding: 0 1rem;
}

.container--centered {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ================================================
   Card
   ================================================ */
.card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.card--full {
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.card-top {
    background: #c0392b;
    padding: 2rem 2rem 1.75rem;
    text-align: center;
    margin: -2rem -2rem 2rem;
    border-radius: 6px 6px 0 0;
}

.card-logo {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
}

.card-logo span {
    opacity: .65;
    font-weight: 400;
    font-size: 16px;
}

.card-subtitle {
    font-size: 11px;
    color: rgba(255,255,255,.7);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 6px;
}

.card-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #aaa;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

/* ================================================
   Page title
   ================================================ */
.page-title {
    font-size: 13px;
    font-weight: 700;
    color: #c0392b;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-bottom: 2px solid #c0392b;
    padding-bottom: 8px;
    margin-bottom: 1.75rem;
    display: inline-block;
}

/* ================================================
   Fields
   ================================================ */
.field {
    margin-bottom: 1rem;
}

.field:last-child { margin-bottom: 0; }

.field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"] {
    width: 100%;
    height: 42px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 14px;
    color: #222;
    outline: none;
    transition: border-color .15s, background .15s;
}

.field input:focus {
    border-color: #c0392b;
    background: #fff;
}

.field input[readonly] {
    background: #f0f0f0;
    color: #666;
    cursor: not-allowed;
}

/* OTP input */
.otp-input {
    width: 100%;
    height: 56px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 28px;
    font-weight: 700;
    color: #222;
    text-align: center;
    letter-spacing: 8px;
    outline: none;
    transition: border-color .15s;
}

.otp-input:focus {
    border-color: #c0392b;
    background: #fff;
}

/* ================================================
   Checkboxes
   ================================================ */
.checkboxes {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.checkbox-item:hover {
    border-color: #c0392b;
    background: #fdf9f9;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #c0392b;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

.checkbox-item span {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

/* ================================================
   Button
   ================================================ */
.btn {
    width: 100%;
    height: 46px;
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .15s;
    margin-top: .5rem;
}

.btn:hover { background: #a93226; }
.btn:active { background: #922b21; }

.btn-wrap { margin-top: 1.75rem; }

/* ================================================
   Alerts
   ================================================ */
.error {
    background: #fdf0f0;
    border: 1px solid #f5c0c0;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 13px;
    color: #c0392b;
    margin-bottom: 1.25rem;
}

.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.success-title {
    font-size: 13px;
    font-weight: 700;
    color: #166534;
    margin-bottom: .5rem;
}

.success-link {
    font-size: 13px;
    color: #166534;
    word-break: break-all;
}

.info {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    text-align: center;
}

/* ================================================
   Done page
   ================================================ */
.done-icon {
    font-size: 48px;
    margin-bottom: 1rem;
    text-align: center;
}

.done-title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: .75rem;
    text-align: center;
}

.done-subtitle {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: center;
}

.aims-list {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.aims-list-title {
    font-size: 11px;
    font-weight: 700;
    color: #aaa;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: .75rem;
}

.aims-list ul {
    list-style: none;
    padding: 0;
}

.aims-list ul li {
    font-size: 13px;
    color: #444;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
}

.aims-list ul li:last-child { border-bottom: none; }

.aims-list ul li::before {
    content: '✓ ';
    color: #c0392b;
    font-weight: 700;
}

.timestamp {
    font-size: 11px;
    color: #aaa;
    text-align: center;
}

/* ================================================
   Footer
   ================================================ */
.footer {
    margin-top: 1.5rem;
    font-size: 11px;
    color: #aaa;
    text-align: center;
}
/* ================================================
   Multi select - cele przetwarzania danych
   ================================================ */
.field select {
    width: 100%;
    min-height: 220px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    font-size: 13px;
    color: #222;
    outline: none;
    transition: border-color .15s, background .15s;
}

.field select:focus {
    border-color: #c0392b;
    background: #fff;
}

.field select option {
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 4px;
    cursor: pointer;
}

.field select option:hover {
    background: #fdf9f9;
}

.field select option:checked {
    background: #c0392b linear-gradient(0deg, #c0392b 0%, #c0392b 100%);
    color: #fff;
    font-weight: 600;
}

/* ================================================
   Generated link page
   ================================================ */
.generated-card {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.generated-icon {
    width: 52px;
    height: 52px;
    line-height: 50px;
    border-radius: 50%;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 26px;
    font-weight: 800;
    margin: 0 auto 1rem;
}

.generated-title {
    font-size: 19px;
    font-weight: 800;
    color: #222;
    margin-bottom: .35rem;
}

.generated-subtitle {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.generated-person {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.generated-person > div {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: .85rem;
    min-width: 0;
}

.generated-person span {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #aaa;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.generated-person strong {
    display: block;
    font-size: 13px;
    color: #333;
    word-break: break-word;
    margin-bottom: 6px;
}

.generated-person em {
    display: inline-block;
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 8px;
}

.status-ok {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-error {
    background: #fdf0f0;
    color: #c0392b;
    border: 1px solid #f5c0c0;
}

.copy-box {
    display: block;
    width: 100%;
    background: #fafafa;
    border: 1px dashed #c0392b;
    border-radius: 6px;
    padding: 1rem;
    margin: 1.25rem 0;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.copy-box:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.copy-box.copied {
    border-color: #16a34a;
    background: #f0fdf4;
}

.copy-box-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #c0392b;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: .5rem;
}

.copy-box-link {
    display: block;
    max-height: 44px;
    overflow: hidden;
    font-size: 13px;
    color: #333;
    line-height: 1.45;
    word-break: break-all;
}

.copy-box-status {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: .75rem;
}

.copy-box.copied .copy-box-label,
.copy-box.copied .copy-box-status {
    color: #166534;
}

.qr-wrap {
    margin: 1.25rem 0;
    text-align: center;
}

.qr-wrap img {
    max-width: 260px;
    width: 100%;
    height: auto;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 12px;
}

.generated-aims {
    text-align: left;
    margin-top: 1.25rem;
}

.btn-link {
    display: block;
    text-align: center;
    line-height: 46px;
    text-decoration: none;
}

@media (max-width: 640px) {
    .generated-person {
        grid-template-columns: 1fr;
    }
}

.sms-note {
    font-size: 0.82rem;
    line-height: 1.4;
    color: #777;
    text-align: center;
    margin: 0.5rem 0 1rem;
}

.resend-form {
    margin-top: 0.9rem;
    text-align: center;
}

.btn-send-again {
    border: none;
    background: #e9e9e9;
    color: #555;
    font-size: 0.85rem;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    width: auto;
    min-width: 180px;
}

.btn-send-again:hover {
    background: #dedede;
}

.btn-send-again:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.cooldown-info {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    color: #777;
}

.success {
    max-height: 80px;
    overflow-y: auto;
    overflow-wrap: anywhere;
    word-break: break-word;
    margin-top: 12px;
    margin-bottom: 16px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: #e8f7ed;
    color: #1f7a3a;
    font-size: 0.9rem;
}