/* Согласие на обработку ПДн: чекбокс в формах, экран согласия, реестр обращений. */

.consent-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 4px 0 16px;
    font-size: var(--fs-xs);
    line-height: var(--lh-base);
    color: var(--text-secondary, #4a4d52);
    cursor: pointer;
    text-align: left;
}
.consent-check input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    padding: 0;
    accent-color: var(--primary, #0b6573);
    cursor: pointer;
}
.consent-check a { color: var(--primary-dark, #0b4f5b); text-decoration: underline; }

/* Экран повторного согласия */
.consent-screen {
    max-width: 560px;
    margin: 48px auto;
    padding: 32px;
    background: var(--surface, #fff);
    border: 1px solid var(--surface-border, #e5e7eb);
    border-radius: var(--r-lg);
    box-shadow: var(--surface-shadow, 0 4px 20px rgba(0, 0, 0, .06));
}
.consent-screen h1 { font-size: var(--fs-xl); margin: 0 0 12px; }
.consent-screen p, .consent-screen li { color: var(--text-secondary, #4a4d52); line-height: var(--lh-base); }
.consent-screen ul { padding-left: 20px; }
.consent-screen .consent-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.consent-screen .consent-btn {
    padding: 10px 22px;
    border: 0;
    border-radius: var(--r-md);
    background: var(--primary, #0b6573);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.consent-screen .consent-btn:disabled { opacity: .45; cursor: not-allowed; }
.consent-screen .consent-error { color: #b91c1c; font-size: var(--fs-xs); margin: 8px 0 0; }
.consent-screen .consent-foot { margin-top: 20px; font-size: var(--fs-xs); color: var(--text-muted, #6b7280); }

/* Профиль: блок «Мои персональные данные» */
.pf-pd { display: flex; flex-direction: column; gap: 12px; }
.pf-pd__row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pf-pd__danger { border-top: 1px solid var(--surface-border, #e5e7eb); padding-top: 14px; }
.pf-pd__danger[hidden], .pf-pd__confirm[hidden] { display: none; }
.pf-pd__confirm { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.pf-pd__confirm input { max-width: 240px; }
.pf-pd .btn-danger-soft {
    background: #fff;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    border-radius: var(--r-sm);
    padding: 8px 14px;
    cursor: pointer;
}

/* Реестр обращений */
.pdr-lead { margin: 0 0 1rem; max-width: 62rem; font-size: var(--fs-sm); line-height: var(--lh-base); color: #475569; }
.pdr-lawyer { margin-left: .35rem; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--badge-warn-bg); color: var(--badge-warn-fg); font-size: var(--fs-micro); font-weight: 600; white-space: nowrap; }

.pdr-summary { display: flex; gap: .75rem; flex-wrap: wrap; margin: 0 0 1rem; }
.pdr-chip { display: flex; flex-direction: column; min-width: 140px; padding: .7rem 1.1rem; border-radius: var(--r-md); background: var(--surface, #fff); border: 1px solid var(--brand-100); box-shadow: var(--elev-1); font-size: var(--fs-xs); font-weight: 600; color: #64748b; }
.pdr-chip b { font-size: var(--fs-2xl); line-height: var(--lh-tight); color: var(--brand-700); font-variant-numeric: tabular-nums; }
.pdr-chip--bad { background: var(--danger-100); border-color: var(--danger-200); color: var(--danger-700); }
.pdr-chip--bad b { color: var(--danger-700); }

.pdr-new { margin: 0 0 1.25rem; background: var(--surface, #fff); border: 1px solid var(--brand-100); border-radius: var(--r-lg); box-shadow: var(--elev-1); overflow: hidden; }
.pdr-new > summary { display: flex; align-items: center; gap: .6rem; padding: .85rem 1.25rem; cursor: pointer; list-style: none; font-weight: 600; font-size: var(--fs-md); color: var(--brand-800); user-select: none; transition: background-color .15s ease; }
.pdr-new > summary::-webkit-details-marker { display: none; }
.pdr-new > summary:hover { background: var(--brand-25); }
.pdr-new .ic { color: var(--brand-700); }
.pdr-new__chev { margin-left: auto; color: var(--brand-600); transition: transform .2s ease; }
.pdr-new[open] > summary { border-bottom: 1px solid var(--brand-100); background: var(--brand-25); }
.pdr-new[open] .pdr-new__chev { transform: rotate(180deg); }

.pdr-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem 1rem; padding: 1.1rem 1.25rem 1.25rem; }
.pdr-form label { display: flex; flex-direction: column; gap: .35rem; font-size: var(--fs-xs); font-weight: 600; color: #475569; }
.pdr-form input, .pdr-form select, .pdr-form textarea { width: 100%; box-sizing: border-box; font-weight: 400; }
.pdr-form select { appearance: none; -webkit-appearance: none; -moz-appearance: none; padding-right: 2.2rem; background-color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; }
.pdr-form textarea { resize: vertical; min-height: 84px; }
.pdr-form .wide { grid-column: 1 / -1; }
.pdr-form__foot { display: flex; justify-content: flex-end; }
@media (max-width: 860px) { .pdr-form { grid-template-columns: 1fr; } }

.pdr-card { background: var(--surface, #fff); border: 1px solid var(--brand-100); border-radius: var(--r-lg); box-shadow: var(--elev-2); overflow-x: auto; }
.pdr-table { width: 100%; border-collapse: collapse; }
.pdr-table th { padding: .7rem 1rem; background: var(--brand-25); border-bottom: 1px solid var(--brand-100); text-align: left; text-transform: uppercase; letter-spacing: var(--ls-wide); font-size: var(--fs-micro); font-weight: 700; color: var(--brand-700); white-space: nowrap; }
.pdr-table td { padding: .8rem 1rem; border-bottom: 1px solid #f1f5f9; text-align: left; vertical-align: top; font-size: var(--fs-sm); color: #334155; }
.pdr-table tbody tr:last-child td { border-bottom: 0; }
.pdr-table tbody tr:hover td { background: var(--brand-25); }
.pdr-table small { color: #64748b; font-size: var(--fs-xs); }
.pdr-table tr.is-overdue td, .pdr-table tr.is-overdue:hover td { background: var(--danger-100); }
.pdr-id { font-weight: 700; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.pdr-due { white-space: nowrap; }
.pdr-due b { display: block; margin-top: 2px; color: var(--danger-700); font-size: var(--fs-xs); }
.pdr-res { margin-top: .35rem; padding: .35rem .6rem; border-left: 3px solid var(--brand-200); background: var(--brand-25); border-radius: 0 var(--r-xs) var(--r-xs) 0; font-size: var(--fs-xs); color: #475569; }
.pdr-table td.pdr-empty { padding: 2.5rem 1rem; text-align: center; color: #94a3b8; }
.pdr-empty .ic { display: block; margin: 0 auto .5rem; width: 28px; height: 28px; color: var(--brand-300); }
.pdr-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pdr-status { display: inline-block; padding: 2px 10px; border-radius: var(--badge-radius, 999px); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.pdr-status--new { background: var(--badge-warn-bg); color: var(--badge-warn-fg); }
.pdr-status--in_progress { background: var(--brand-50); color: var(--brand-800); }
.pdr-status--done { background: var(--brand-100); color: var(--brand-700); }
.pdr-status--rejected { background: #f1f5f9; color: #64748b; }

/* Подсказка про данные сотрудников в форме приглашения (/lab/staff) */
.consent-hint {
    margin: 4px 0 0;
    font-size: var(--fs-xs);
    line-height: var(--lh-base);
    color: var(--text-muted, #6b7280);
}
.consent-hint a { color: var(--primary-dark, #0b4f5b); text-decoration: underline; }
