:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #F7FAFC;
    color: #18202a;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 1024px;
    min-height: 100%;
}

body {
    min-width: 1024px;
    min-height: 100vh;
    margin: 0;
    background: #F7FAFC;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(31, 111, 178, 0.24);
    outline-offset: 2px;
}

h1,
h2,
p {
    margin-top: 0;
}

.eyebrow {
    margin: 0 0 12px;
    color: #667385;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 750;
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    color: #ffffff;
    background: #1F6FB2;
    box-shadow: 0 12px 28px rgba(31, 111, 178, 0.24);
}

.button--primary:hover {
    background: #185B93;
    box-shadow: 0 16px 32px rgba(31, 111, 178, 0.28);
}

.button--ghost {
    color: #2c3948;
    border-color: #d9e0e8;
    background: #ffffff;
}

.button--ghost:hover {
    border-color: #bec8d4;
    background: #f8fafc;
}

.button--wide {
    width: 100%;
}

/* Logowanie */
.auth-page {
    background:
        radial-gradient(circle at 15% 18%, rgba(31, 111, 178, 0.17), transparent 28rem),
        radial-gradient(circle at 86% 80%, rgba(44, 193, 139, 0.10), transparent 26rem),
        #F1F6FA;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
}

.auth-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(64px, 8vw, 132px);
    background:
        linear-gradient(145deg, rgba(13, 27, 54, 0.96), rgba(22, 45, 87, 0.93)),
        #0F3B66;
    color: #ffffff;
}

.auth-intro .eyebrow {
    color: #aebfe8;
}

.auth-intro h1 {
    max-width: 760px;
    margin-bottom: 26px;
    font-size: clamp(54px, 5.6vw, 88px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.auth-intro .lead {
    max-width: 660px;
    margin-bottom: 44px;
    color: #c8d2e6;
    font-size: 19px;
    line-height: 1.7;
}

.product-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 44px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}

.product-mark span {
    width: 20px;
    height: 28px;
    position: relative;
    display: block;
    border: 6px solid #58A0DC;
    border-radius: 14px 14px 18px 18px;
}

.product-mark span::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -13px;
    width: 8px;
    height: 8px;
    border-right: 5px solid #58A0DC;
    border-bottom: 5px solid #58A0DC;
    transform: translateX(-50%) rotate(45deg);
}

.auth-feature-list {
    display: grid;
    gap: 13px;
    color: #d8e0ef;
    font-size: 15px;
}

.auth-feature-list span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-feature-list span::before {
    content: "✓";
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(89, 210, 161, 0.16);
    color: #75dfb5;
    font-weight: 900;
}

.auth-card {
    width: min(510px, calc(100% - 80px));
    align-self: center;
    justify-self: center;
    padding: 48px;
    border: 1px solid #dfe5ec;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 30px 80px rgba(24, 37, 56, 0.13);
}

.auth-card__header {
    margin-bottom: 30px;
}

.auth-card__header h2 {
    margin-bottom: 10px;
    font-size: 38px;
    letter-spacing: -0.035em;
}

.auth-card__header p:last-child {
    margin: 0;
    color: #697686;
    line-height: 1.55;
}

.auth-form {
    display: grid;
    gap: 20px;
}

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

.field__label {
    color: #354254;
    font-size: 14px;
    font-weight: 750;
}

.field input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid #cfd7e1;
    border-radius: 12px;
    color: #1b2634;
    background: #ffffff;
    transition: border-color 130ms ease, box-shadow 130ms ease;
}

.field input:hover {
    border-color: #aab6c5;
}

.field input:focus {
    border-color: #4566eb;
    box-shadow: 0 0 0 4px rgba(69, 102, 235, 0.11);
    outline: none;
}

.field input::placeholder {
    color: #97a2af;
}

.alert {
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
}

.alert--error {
    border-color: #efc3bf;
    color: #9b2c25;
    background: #fff3f1;
}

.alert--success {
    border-color: #b9e2cf;
    color: #176c47;
    background: #f0fbf6;
}

.alert--warning {
    border-color: #ecd5a6;
    color: #7b5619;
    background: #fff8e8;
}

.auth-help {
    margin: 24px 0 0;
    color: #7c8897;
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
}

/* Panel administratora */
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 284px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    border-right: 1px solid #e1e6ec;
    background: #ffffff;
}

.sidebar__brand,
.client-topbar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar__brand {
    padding: 6px 8px 25px;
    border-bottom: 1px solid #edf0f4;
}

.sidebar__brand div:last-child,
.client-topbar__brand div:last-child {
    display: grid;
    gap: 3px;
}

.sidebar__brand strong,
.client-topbar__brand strong {
    color: #1d2937;
    font-size: 15px;
}

.sidebar__brand span,
.client-topbar__brand span {
    color: #818d9a;
    font-size: 12px;
}

.brand-placeholder {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    background:
        linear-gradient(145deg, #1F6FB2, #2A82C4);
    box-shadow: 0 9px 24px rgba(31, 111, 178, 0.22);
}

.sidebar__nav {
    display: grid;
    gap: 7px;
    padding: 24px 0;
}

.nav-item {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 13px;
    border-radius: 11px;
    color: #526071;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.nav-item__icon {
    width: 24px;
    color: #778495;
    font-size: 19px;
    text-align: center;
}

.nav-item--active {
    color: #284aca;
    background: #EAF4FB;
}

.nav-item--active .nav-item__icon {
    color: #1F6FB2;
}

.nav-item--disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.nav-item small {
    margin-left: auto;
    color: #98a2ae;
    font-size: 10px;
    font-weight: 800;
}

.sidebar__footer {
    display: grid;
    gap: 16px;
    margin-top: auto;
    padding: 18px 8px 2px;
    border-top: 1px solid #edf0f4;
}

.signed-user {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.signed-user__avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #294aca;
    background: #e9eeff;
    font-weight: 850;
}

.signed-user div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.signed-user strong {
    overflow: hidden;
    color: #293545;
    font-size: 14px;
    text-overflow: ellipsis;
}

.signed-user span:last-child {
    color: #8894a2;
    font-size: 12px;
}

.workspace {
    min-width: 0;
    padding: 44px 48px 64px;
    background:
        radial-gradient(circle at 82% 8%, rgba(70, 104, 238, 0.08), transparent 28rem),
        #f5f7fa;
}

.workspace-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 34px;
}

.workspace-header h1,
.client-hero h1 {
    margin-bottom: 10px;
    color: #172231;
    font-size: 42px;
    letter-spacing: -0.04em;
}

.workspace-header p:last-child,
.client-hero p:last-child {
    margin: 0;
    color: #718091;
    line-height: 1.55;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.role-badge--admin {
    color: #2e4ac0;
    background: #e8edff;
}

.role-badge--client {
    color: #0d7550;
    background: #e6f8f0;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.metric-card,
.content-card {
    border: 1px solid #e0e6ed;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 38px rgba(31, 44, 61, 0.055);
}

.metric-card {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 18px;
}

.metric-card__label {
    margin-bottom: 18px;
    color: #84909d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-card strong {
    margin-bottom: 8px;
    color: #1f2c3c;
    font-size: 24px;
    letter-spacing: -0.025em;
}

.metric-card small {
    margin-top: auto;
    color: #7c8998;
    line-height: 1.45;
}

.status-text--ok {
    color: #168558 !important;
}

.status-text--error {
    color: #b3332b !important;
}

.content-card {
    padding: 30px;
    border-radius: 20px;
}

.content-card__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.content-card__header h2 {
    margin: 0;
    color: #1f2b3a;
    font-size: 27px;
    letter-spacing: -0.025em;
}

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

.check-item {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 16px;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    color: #445264;
    background: #f9fafc;
    font-size: 14px;
    font-weight: 650;
}

.check-item span {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #167a52;
    background: #e5f7ef;
    font-size: 13px;
    font-weight: 900;
}

/* Panel klienta */
.client-page {
    background:
        radial-gradient(circle at 78% 10%, rgba(51, 86, 230, 0.08), transparent 30rem),
        #f4f6f9;
}

.client-topbar {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 36px;
    border-bottom: 1px solid #e1e6ed;
    background: rgba(255, 255, 255, 0.96);
}

.client-topbar__actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.signed-user--horizontal {
    padding-right: 22px;
    border-right: 1px solid #e5e9ee;
}

.client-workspace {
    width: min(1440px, calc(100% - 80px));
    margin: 0 auto;
    padding: 48px 0 72px;
}

.client-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.client-hero > div:first-child {
    max-width: 720px;
}

.client-placeholder {
    min-height: 580px;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.65fr);
    overflow: hidden;
    border: 1px solid #dce3eb;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 60px rgba(25, 38, 56, 0.08);
}

.map-skeleton {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(30deg, transparent 24%, rgba(189, 202, 215, 0.22) 25%, rgba(189, 202, 215, 0.22) 28%, transparent 29%, transparent 70%, rgba(189, 202, 215, 0.19) 71%, rgba(189, 202, 215, 0.19) 74%, transparent 75%),
        linear-gradient(118deg, #e9f0e8 0 28%, #edf2e8 28% 56%, #e6edef 56% 100%);
    background-size: 170px 170px, auto;
}

.map-skeleton::before,
.map-skeleton::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 2px rgba(204, 214, 222, 0.55);
}

.map-skeleton::before {
    width: 120%;
    height: 34px;
    left: -10%;
    top: 47%;
    transform: rotate(-11deg);
}

.map-skeleton::after {
    width: 34px;
    height: 120%;
    left: 56%;
    top: -10%;
    transform: rotate(16deg);
}

.map-pin {
    position: absolute;
    z-index: 2;
    width: 38px;
    height: 38px;
    border: 8px solid #4163eb;
    border-radius: 50% 50% 50% 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(43, 68, 164, 0.22);
    transform: rotate(-45deg);
}

.map-pin--one {
    left: 29%;
    top: 35%;
}

.map-pin--two {
    left: 62%;
    top: 23%;
    border-color: #27a66d;
}

.map-pin--three {
    left: 68%;
    top: 67%;
    border-color: #8a96a4;
}

.client-placeholder__copy {
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px;
    border-left: 1px solid #e2e7ed;
    background: rgba(255, 255, 255, 0.98);
}

.client-placeholder__copy h2 {
    margin-bottom: 18px;
    color: #1d2938;
    font-size: 32px;
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.client-placeholder__copy p:last-child {
    margin: 0;
    color: #718091;
    line-height: 1.7;
}

/* Komunikaty */
.center-page {
    display: grid;
    place-items: center;
    padding: 48px;
    background:
        radial-gradient(circle at 25% 20%, rgba(67, 98, 231, 0.11), transparent 28rem),
        #f3f6f9;
}

.message-card {
    width: min(620px, 100%);
    padding: 50px;
    border: 1px solid #e0e5ec;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(20, 33, 51, 0.11);
    text-align: center;
}

.message-card__icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 28px;
    border-radius: 50%;
    color: #a23a31;
    background: #fff0ee;
    font-size: 28px;
    font-weight: 900;
}

.message-card h1 {
    margin-bottom: 16px;
    font-size: 38px;
    letter-spacing: -0.04em;
}

.message-card p:not(.eyebrow) {
    max-width: 480px;
    margin: 0 auto 28px;
    color: #6f7c8b;
    line-height: 1.65;
}

/* MVP3 — zarządzanie klientami */
.account-link {
    display: block;
    margin-bottom: 14px;
    color: #617084;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.account-link:hover,
.back-link:hover {
    color: #1F6FB2;
}

.workspace--narrow {
    max-width: 1040px;
}

.workspace-header--compact {
    margin-bottom: 26px;
}

.workspace-header--compact h1 {
    margin-bottom: 10px;
}

.back-link {
    display: inline-flex;
    margin-bottom: 22px;
    color: #677587;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

.button--quiet {
    min-height: 42px;
    padding-inline: 10px;
    color: #667487;
    background: transparent;
}

.button--warning {
    color: #84580a;
    border-color: #efce8d;
    background: #fff8e9;
}

.button--success {
    color: #116b47;
    border-color: #a7dbc6;
    background: #ecfaf4;
}

.button--danger {
    color: #a03b35;
    border-color: #efc0bc;
    background: #fff2f0;
}

.client-toolbar {
    display: grid;
    gap: 18px;
    margin-bottom: 26px;
    padding: 20px;
    border: 1px solid #e0e5eb;
    border-radius: 18px;
    background: #ffffff;
}

.search-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.field--inline {
    flex: 1;
    margin: 0;
}

.filter-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #edf0f4;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #627084;
    background: #f5f7fa;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.filter-tab span {
    min-width: 23px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #e7ebf1;
    text-align: center;
    font-size: 11px;
}

.filter-tab--active {
    color: #185B93;
    border-color: #cbd5ff;
    background: #EAF4FB;
}

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

.client-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid #e0e5eb;
    border-radius: 18px;
    color: inherit;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(25, 38, 56, 0.04);
    text-decoration: none;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.client-card:hover {
    transform: translateY(-3px);
    border-color: #c9d2df;
    box-shadow: 0 18px 40px rgba(25, 38, 56, 0.09);
}

.client-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.client-card__avatar,
.client-detail-header__avatar,
.account-summary__avatar {
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #2f4cc2;
    background: #e9eeff;
    font-weight: 850;
}

.client-card__avatar {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

.client-card__body h2 {
    overflow: hidden;
    margin-bottom: 7px;
    font-size: 19px;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mono-value {
    margin: 0;
    color: #6a7889;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 13px;
}

.client-card__meta {
    display: grid;
    gap: 12px;
    margin: 22px 0 20px;
    padding: 16px 0;
    border-top: 1px solid #edf0f3;
    border-bottom: 1px solid #edf0f3;
}

.client-card__meta div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.client-card__meta dt {
    color: #8490a0;
    font-size: 12px;
}

.client-card__meta dd {
    margin: 0;
    color: #3c4959;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.client-card__open {
    color: #1F6FB2;
    font-size: 13px;
    font-weight: 800;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.status-pill--active {
    color: #116b47;
    background: #e8f8f1;
}

.status-pill--blocked {
    color: #9a5515;
    background: #fff3dd;
}

.status-pill--trash {
    color: #687383;
    background: #edf0f3;
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 390px;
    padding: 54px;
    border: 1px dashed #cbd4de;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.65);
    text-align: center;
}

.empty-state__icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border-radius: 18px;
    color: #1F6FB2;
    background: #EAF4FB;
    font-size: 30px;
}

.empty-state h2 {
    margin-bottom: 10px;
}

.empty-state p {
    margin-bottom: 24px;
    color: #738092;
}

.form-card,
.danger-card,
.restore-card {
    border: 1px solid #e0e5eb;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(25, 38, 56, 0.055);
}

.form-card {
    padding: 28px;
}

.stack-form {
    display: grid;
    gap: 20px;
}

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

.field small {
    display: block;
    margin-top: 8px;
    color: #7d8999;
    font-size: 12px;
    line-height: 1.5;
}

.info-box {
    padding: 16px 18px;
    border: 1px solid #d7e0ff;
    border-radius: 13px;
    color: #3c4d76;
    background: #F1F7FB;
}

.info-box strong {
    display: block;
    margin-bottom: 5px;
}

.info-box p {
    margin: 0;
    color: #667493;
    font-size: 13px;
    line-height: 1.55;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 6px;
}

.form-actions--end {
    justify-content: flex-end;
}

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

.client-detail-header__identity {
    display: flex;
    align-items: center;
    gap: 20px;
}

.client-detail-header__avatar {
    width: 72px;
    height: 72px;
    font-size: 27px;
}

.client-detail-header h1 {
    margin-bottom: 5px;
    font-size: 36px;
    letter-spacing: -0.04em;
}

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

.detail-metrics article {
    padding: 18px;
    border: 1px solid #e1e6ec;
    border-radius: 15px;
    background: #ffffff;
}

.detail-metrics span {
    display: block;
    margin-bottom: 9px;
    color: #8792a1;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.detail-metrics strong {
    color: #344153;
    font-size: 14px;
}

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

.section-heading {
    margin-bottom: 22px;
}

.section-heading h2 {
    margin-bottom: 8px;
}

.section-heading p:last-child {
    margin: 0;
    color: #738092;
    font-size: 14px;
    line-height: 1.55;
}

.danger-card,
.restore-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 26px 28px;
}

.danger-card {
    border-color: #eadbd9;
}

.restore-card {
    border-color: #bfdfd1;
}

.danger-card h2,
.restore-card h2 {
    margin-bottom: 8px;
}

.danger-card p:last-child,
.restore-card p:last-child {
    margin: 0;
    color: #738092;
}

.action-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

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

.account-recommendation div {
    display: grid;
    gap: 4px;
}

.account-recommendation span {
    font-size: 13px;
}

.account-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 12%, rgba(31, 111, 178, 0.10), transparent 30rem),
        #f3f6f9;
}

.account-topbar {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 42px;
    border-bottom: 1px solid #e0e5eb;
    background: rgba(255, 255, 255, 0.94);
}

.account-topbar .back-link {
    margin: 0;
}

.account-layout {
    width: min(1120px, calc(100% - 80px));
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    gap: 24px;
    margin: 58px auto;
}

.account-summary {
    align-self: start;
    padding: 32px;
    border: 1px solid #dde4ec;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 16px 46px rgba(25, 38, 56, 0.07);
}

.account-summary__avatar {
    width: 76px;
    height: 76px;
    margin-bottom: 26px;
    font-size: 29px;
}

.account-summary h1 {
    margin-bottom: 8px;
    font-size: 32px;
    letter-spacing: -0.04em;
}

.account-summary .role-badge {
    margin: 24px 0;
}

.account-password-card {
    padding: 34px;
}

@media (max-width: 1260px) {
    .client-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* MVP4 — projekty */
select,
textarea {
    font: inherit;
}

select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(31, 111, 178, 0.24);
    outline-offset: 2px;
}

.field select,
.field textarea {
    width: 100%;
    border: 1px solid #d9e0e8;
    border-radius: 12px;
    color: #223042;
    background: #ffffff;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field select {
    min-height: 48px;
    padding: 0 14px;
}

.field textarea {
    min-height: 120px;
    padding: 14px;
    resize: vertical;
    line-height: 1.55;
}

.field select:hover,
.field textarea:hover,
.field select:focus,
.field textarea:focus {
    border-color: #9cadc2;
}

.section-divider {
    height: 1px;
    margin: 8px 0 2px;
    background: #e6ebf0;
}

.project-toolbar {
    display: grid;
    gap: 18px;
    margin-bottom: 26px;
    padding: 20px;
    border: 1px solid #e0e5eb;
    border-radius: 18px;
    background: #ffffff;
}

.project-filter-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.project-search-field {
    flex: 1.6;
}

.project-category-field {
    flex: 0.7;
}

.project-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.project-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dce3eb;
    border-radius: 20px;
    color: inherit;
    background: #ffffff;
    box-shadow: 0 14px 42px rgba(31, 44, 61, 0.065);
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: #c5d0de;
    box-shadow: 0 20px 52px rgba(31, 44, 61, 0.11);
}

.project-card__cover {
    min-height: 188px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.25), transparent 13rem),
        linear-gradient(145deg, #3b61d9, #1d387f);
}

.project-card__cover[data-category="AUDIT"] {
    background: linear-gradient(145deg, #744fc8, #39246e);
}

.project-card__cover[data-category="PROPERTY_VALUATION"] {
    background: linear-gradient(145deg, #d28a3f, #7c461f);
}

.project-card__cover[data-category="PHOTO_DOCUMENTATION"] {
    background: linear-gradient(145deg, #318b8c, #174f60);
}

.project-card__cover[data-category="DRONE_FLIGHT"] {
    background: linear-gradient(145deg, #317ab6, #173e70);
}

.project-card__cover[data-category="SCAN_3D"],
.project-card__cover[data-category="MODEL_3D"] {
    background: linear-gradient(145deg, #308d73, #145044);
}

.project-card__cover[data-category="INVENTORY"] {
    background: linear-gradient(145deg, #657486, #303b48);
}

.project-card__cover[data-category="OTHER"] {
    background: linear-gradient(145deg, #855d72, #46303d);
}

.project-card__placeholder {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 24px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.2);
    font-size: 34px;
    font-weight: 850;
}

.project-card__badges {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.project-card__thumbnail-note {
    position: absolute;
    right: 14px;
    bottom: 13px;
    left: 14px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 11px;
    text-align: center;
}

.project-card__content {
    padding: 22px;
}

.project-card__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 13px;
}

.project-card__category {
    display: block;
    margin-bottom: 7px;
    color: #758397;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-card h2 {
    margin: 0;
    color: #1d2938;
    font-size: 21px;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.project-card__arrow {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #3556d4;
    background: #EAF4FB;
    font-weight: 850;
}

.project-card__description {
    min-height: 63px;
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 20px;
    color: #69778a;
    font-size: 14px;
    line-height: 1.52;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.project-card__meta {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-top: 17px;
    border-top: 1px solid #e8ecf1;
}

.project-card__meta div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
}

.project-card__meta dt {
    color: #8b96a4;
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.project-card__meta dd {
    min-width: 0;
    overflow: hidden;
    margin: 0;
    color: #4e5d70;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-pill--draft {
    color: #4a5d7b;
    background: #edf1f6;
}

.status-pill--processing {
    color: #3156b4;
    background: #EAF4FB;
}

.status-pill--warning {
    color: #8a5b0d;
    background: #fff3d8;
}

.status-pill--ready {
    color: #126b50;
    background: #e7f8f1;
}

.status-pill--archived {
    color: #586577;
    background: #eceff3;
}

.status-pill--portfolio {
    color: #5d3aa0;
    background: #f0e9ff;
}

.status-pill--download {
    color: #1c6276;
    background: #e6f5f8;
}

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

.choice-card {
    min-height: 92px;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 18px;
    border: 1px solid #dde4ec;
    border-radius: 15px;
    background: #fafbfd;
    cursor: pointer;
}

.choice-card:hover {
    border-color: #becadd;
    background: #f7f9fc;
}

.choice-card input {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    margin-top: 2px;
    accent-color: #1F6FB2;
}

.choice-card span {
    display: grid;
    gap: 5px;
}

.choice-card strong {
    color: #2d3a4c;
    font-size: 14px;
}

.choice-card small {
    color: #7a8798;
    line-height: 1.45;
}

.project-detail-hero {
    min-height: 230px;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    overflow: hidden;
    margin-bottom: 22px;
    border: 1px solid #dce3eb;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 16px 48px rgba(31, 44, 61, 0.07);
}

.project-detail-hero__cover {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    color: #ffffff;
    background: linear-gradient(145deg, #3b61d9, #1d387f);
}

.project-detail-hero__cover > span {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.13);
    font-size: 38px;
    font-weight: 850;
}

.project-detail-hero__cover small {
    color: rgba(255, 255, 255, 0.7);
}

.project-detail-hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 36px 42px;
}

.project-detail-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.project-detail-hero__content h1 {
    margin-bottom: 14px;
    color: #172231;
    font-size: 38px;
    letter-spacing: -0.04em;
}

.project-detail-hero__content > p:last-child {
    max-width: 900px;
    margin: 0;
    color: #6e7b8d;
    line-height: 1.62;
}

.project-detail-metrics {
    margin-bottom: 20px;
}

.project-stage-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 20px;
    padding: 25px 28px;
    border: 1px solid #dce4ee;
    border-radius: 18px;
    background: #ffffff;
}

.project-stage-card h2 {
    margin-bottom: 8px;
}

.project-stage-card p:last-child {
    margin: 0;
    color: #728094;
}

.project-stage-card__steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.project-step {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #e0e5eb;
    border-radius: 999px;
    color: #84909e;
    background: #f7f9fb;
    font-size: 11px;
    font-weight: 800;
}

.project-step--active {
    color: #2e4fc9;
    border-color: #cad5ff;
    background: #EAF4FB;
}

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

.project-action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.project-action-card h2 {
    margin-bottom: 8px;
}

.project-action-card p:last-child {
    margin: 0;
    color: #748194;
    line-height: 1.52;
}

@media (max-width: 1460px) {
    .project-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* MVP5 — dostępy klient–projekt */
.access-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 20px;
}

.access-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.access-client-panel {
    position: sticky;
    top: 24px;
}

.access-client-selector {
    margin-top: 22px;
}

.access-policy-box {
    margin-top: 22px;
}

.access-projects-panel {
    min-width: 0;
}

.access-search {
    margin-bottom: 16px;
    padding: 17px 18px;
    border: 1px solid #dfe5ec;
    border-radius: 16px;
    background: #ffffff;
}

.access-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
    padding: 20px 22px;
    border: 1px solid #dfe5ec;
    border-radius: 16px;
    background: #ffffff;
}

.access-form-header h2,
.client-section-heading h2 {
    margin-bottom: 6px;
}

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

.access-project-card {
    overflow: hidden;
    border: 1px solid #dfe5ec;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(31, 44, 61, 0.05);
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.access-project-card--assigned {
    border-color: #9eb0ff;
    box-shadow: 0 14px 36px rgba(31, 111, 178, 0.12);
}

.access-project-card__select {
    min-height: 47px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    color: #657386;
    border-bottom: 1px solid #e7ebf0;
    background: #f9fafc;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.access-project-card--assigned .access-project-card__select {
    color: #2b4ac1;
    background: #EAF4FB;
}

.access-project-card__select input {
    width: 18px;
    height: 18px;
    accent-color: #1F6FB2;
}

.access-project-card__cover {
    min-height: 116px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #ffffff;
    text-decoration: none;
    background: linear-gradient(145deg, #1F6FB2, #0F3B66);
}

.access-project-card__cover img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.access-project-card__cover-fallback {
    position: relative;
    z-index: 0;
}

.access-project-card__cover[data-category="DRONE_FLIGHT"] { background: linear-gradient(145deg, #2f72b7, #173e6b); }
.access-project-card__cover[data-category="SCAN_3D"] { background: linear-gradient(145deg, #6c50bd, #3d267d); }
.access-project-card__cover[data-category="MODEL_3D"] { background: linear-gradient(145deg, #8b4d9e, #4d275e); }
.access-project-card__cover[data-category="AUDIT"] { background: linear-gradient(145deg, #b5762c, #704414); }
.access-project-card__cover[data-category="PROPERTY_VALUATION"] { background: linear-gradient(145deg, #3c8a70, #205343); }

.access-project-card__cover > span {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 25px;
    font-weight: 900;
}

.access-project-card__content {
    padding: 18px;
}

.access-project-card__badges {
    position: static;
    margin-bottom: 12px;
}

.access-project-card__content h3 {
    margin: 6px 0 9px;
    color: #202d3c;
    font-size: 19px;
}

.access-project-card__content > p {
    min-height: 44px;
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 14px;
    color: #6e7a8a;
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.access-project-card__footer,
.access-project-card__portfolio,
.access-save-bar,
.access-assignment-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.access-project-card__footer {
    color: #8792a0;
    font-size: 11px;
}

.access-project-card__portfolio {
    min-height: 59px;
    padding: 10px 14px 10px 18px;
    border-top: 1px solid #e7ebf0;
    color: #6f7b8b;
    background: #fbfcfd;
    font-size: 11px;
}

.access-project-card__portfolio .button {
    min-height: 36px;
    padding: 0 11px;
    font-size: 11px;
}

.access-save-bar {
    position: sticky;
    bottom: 18px;
    z-index: 5;
    margin-top: 18px;
    padding: 15px 17px 15px 20px;
    border: 1px solid #cad4df;
    border-radius: 16px;
    color: #627083;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 50px rgba(26, 38, 56, 0.15);
    backdrop-filter: blur(12px);
    font-size: 12px;
}

.project-access-section {
    margin: 20px 0;
}

.project-access-section .content-card__header p:last-child {
    max-width: 780px;
    margin: 8px 0 0;
    color: #748194;
    line-height: 1.52;
}

.client-access-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.client-access-option {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid #dfe5ec;
    border-radius: 14px;
    background: #fafbfd;
    cursor: pointer;
}

.client-access-option--selected {
    border-color: #aebcff;
    background: #f1f4ff;
}

.client-access-option input {
    width: 18px;
    height: 18px;
    accent-color: #1F6FB2;
}

.client-access-option .signed-user__avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
}

.client-access-option__identity {
    min-width: 0;
    display: grid;
    gap: 3px;
    margin-right: auto;
}

.client-access-option__identity strong,
.client-access-option__identity small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-access-option__identity small {
    color: #8792a0;
}

.access-assignment-summary {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e6eaf0;
    color: #6e7b8d;
}

.empty-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px;
    border: 1px dashed #cfd7e1;
    border-radius: 14px;
    background: #fafbfd;
}

.empty-inline div {
    display: grid;
    gap: 5px;
}

.empty-inline span {
    color: #7c8897;
    font-size: 13px;
}

.client-workspace--projects,
.client-workspace--project-details {
    max-width: 1540px;
    margin: 0 auto;
}

.client-hero--compact {
    align-items: center;
}

.client-summary-pills {
    display: flex;
    gap: 10px;
}

.client-summary-pills span {
    min-width: 132px;
    display: grid;
    gap: 4px;
    padding: 15px 18px;
    border: 1px solid #dce3eb;
    border-radius: 15px;
    color: #788597;
    background: #ffffff;
    font-size: 12px;
}

.client-summary-pills strong {
    color: #233246;
    font-size: 26px;
}

.client-project-section {
    margin-top: 28px;
}

.client-section-heading {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.client-section-heading p:last-child {
    margin: 0;
    color: #7a8798;
}

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

.client-project-card {
    overflow: hidden;
    border: 1px solid #dce3eb;
    border-radius: 19px;
    color: inherit;
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(29, 42, 60, 0.07);
    text-decoration: none;
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.client-project-card:hover {
    transform: translateY(-3px);
    border-color: #bdc9d8;
    box-shadow: 0 22px 48px rgba(29, 42, 60, 0.12);
}

.client-project-card__cover {
    min-height: 150px;
    position: relative;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(145deg, #1F6FB2, #0F3B66);
}

.client-project-card--portfolio .client-project-card__cover {
    background: linear-gradient(145deg, #7955bd, #463078);
}

.client-project-card__cover > span:first-child {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 27px;
    font-weight: 900;
}

.client-project-card__cover .status-pill {
    position: absolute;
    top: 14px;
    right: 14px;
}

.client-project-card__content {
    padding: 20px;
}

.client-project-card__content h3 {
    margin: 7px 0 10px;
    color: #1f2c3c;
    font-size: 20px;
}

.client-project-card__content > p {
    min-height: 63px;
    display: -webkit-box;
    overflow: hidden;
    color: #6f7c8d;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.client-project-detail-hero {
    min-height: 270px;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    overflow: hidden;
    margin: 18px 0 22px;
    border: 1px solid #dce3eb;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(29, 42, 60, 0.08);
}

.client-project-detail-hero__cover {
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(145deg, #1F6FB2, #0F3B66);
}

.client-project-detail-hero__cover > span {
    width: 98px;
    height: 98px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 40px;
    font-weight: 900;
}

.client-project-detail-hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px 48px;
}

.client-project-detail-hero__content h1 {
    margin: 8px 0 14px;
    color: #172333;
    font-size: 40px;
    letter-spacing: -0.04em;
}

.client-project-detail-hero__content > p {
    max-width: 880px;
    margin: 0;
    color: #697789;
    font-size: 16px;
    line-height: 1.65;
}

.client-project-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.detail-list {
    display: grid;
    gap: 0;
    margin: 18px 0 0;
}

.detail-list div {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 18px;
    padding: 13px 0;
    border-top: 1px solid #e8ecf1;
}

.detail-list dt {
    color: #84909e;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-list dd {
    margin: 0;
    color: #354254;
}

.muted-copy,
.project-full-description {
    color: #6f7c8d;
    line-height: 1.65;
}

.check-grid--single {
    grid-template-columns: 1fr;
    margin-top: 18px;
}

.empty-state--compact {
    min-height: 250px;
}

@media (max-width: 1380px) {
    .access-project-grid,
    .client-project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .client-access-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* MVP6 — główny viewer mapy */
.map-page {
    min-width: 1100px;
    min-height: 100vh;
    overflow: hidden;
    background: #eef2f7;
}

.map-topbar {
    height: 72px;
    position: relative;
    z-index: 30;
    border-bottom: 1px solid #dbe2eb;
    box-shadow: 0 4px 18px rgba(22, 34, 51, 0.06);
}

.map-public-caption {
    color: #7a8797;
    font-size: 13px;
}

.map-workspace {
    height: calc(100vh - 72px);
    display: grid;
    grid-template-columns: 390px minmax(0, 1fr);
}

.map-sidebar {
    min-width: 0;
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid #dbe2eb;
    background: #ffffff;
    box-shadow: 8px 0 28px rgba(24, 38, 58, 0.07);
}

.map-sidebar__scroll {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding: 27px 24px 34px;
}

.map-sidebar__heading h1 {
    margin: 5px 0 8px;
    color: #182536;
    font-size: 29px;
    letter-spacing: -0.035em;
}

.map-sidebar__heading > p:last-child {
    margin: 0 0 22px;
    color: #748194;
    line-height: 1.55;
}

.map-account-alert {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
}

.map-account-alert .button {
    justify-self: start;
}

.map-search {
    display: grid;
    gap: 7px;
    margin-bottom: 13px;
}

.map-search > span,
.field--compact .field__label {
    color: #667487;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.map-search input {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #d5dde7;
    border-radius: 12px;
    outline: none;
    background: #f9fbfd;
    color: #243245;
}

.map-search input:focus,
.field--compact select:focus {
    border-color: #6680e9;
    box-shadow: 0 0 0 3px rgba(71, 99, 224, 0.12);
}

.map-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.field--compact {
    gap: 7px;
}

.field--compact select {
    min-height: 41px;
    padding: 0 10px;
    border: 1px solid #d5dde7;
    border-radius: 11px;
    background: #ffffff;
    color: #344256;
}

.map-visibility-box {
    display: grid;
    gap: 10px;
    margin: 16px 0 20px;
    padding: 15px 16px;
    border: 1px solid #dde4ec;
    border-radius: 14px;
    background: #f8fafc;
}

.map-visibility-box > strong {
    color: #263449;
    font-size: 13px;
}

.map-visibility-box label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #5e6c7d;
    font-size: 13px;
    cursor: pointer;
}

.map-visibility-box input {
    width: 16px;
    height: 16px;
    accent-color: #3f63dd;
}

.map-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 11px;
}

.map-list-heading > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-list-heading strong {
    color: #263449;
    font-size: 14px;
}

.map-list-heading span {
    min-width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #536278;
    background: #e9eef5;
    font-size: 11px;
    font-weight: 850;
}

.text-button {
    padding: 0;
    border: 0;
    color: #3d5fd2;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.map-project-list {
    display: grid;
    gap: 9px;
}

.map-project-card {
    width: 100%;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border: 1px solid #e0e6ed;
    border-radius: 14px;
    background: #ffffff;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.map-project-card:hover {
    transform: translateY(-1px);
    border-color: #bcc9db;
    box-shadow: 0 9px 22px rgba(30, 45, 65, 0.08);
}

.map-project-card--selected {
    border-color: #5774e3;
    background: #f6f8ff;
    box-shadow: 0 0 0 3px rgba(77, 105, 221, 0.1);
}

.map-project-card__thumb {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(145deg, #4868df, #263e9b);
    font-size: 20px;
    font-weight: 900;
}

.map-project-card__thumb--portfolio {
    background: linear-gradient(145deg, #7d59c5, #4c347f);
}

.map-project-card__thumb--private {
    background: linear-gradient(145deg, #8793a2, #546171);
}

.map-project-card__content {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 5px;
}

.map-project-card__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #7a8797;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.map-project-card__visibility {
    flex: none;
    padding: 3px 6px;
    border-radius: 999px;
    letter-spacing: 0;
    text-transform: none;
}

.map-project-card__visibility--assigned {
    color: #236b46;
    background: #dff4e8;
}

.map-project-card__visibility--portfolio {
    color: #634095;
    background: #eee5fa;
}

.map-project-card__visibility--private {
    color: #647184;
    background: #e9edf2;
}

.map-project-card__content > strong {
    overflow: hidden;
    color: #253347;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-project-card__content > small {
    overflow: hidden;
    color: #7a8797;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-list-empty {
    padding: 23px 18px;
    border: 1px dashed #cdd6e1;
    border-radius: 14px;
    text-align: center;
    background: #fafbfd;
}

.map-list-empty strong {
    color: #354357;
}

.map-list-empty p {
    margin: 7px 0 0;
    color: #7d8998;
    font-size: 12px;
    line-height: 1.5;
}

.map-detail-panel {
    flex: none;
    position: relative;
    max-height: 55%;
    overflow-y: auto;
    padding: 23px 24px 27px;
    border-top: 1px solid #dce3eb;
    background: #ffffff;
    box-shadow: 0 -12px 28px rgba(25, 39, 59, 0.08);
}

.map-detail-panel__close {
    width: 31px;
    height: 31px;
    position: absolute;
    top: 17px;
    right: 17px;
    border: 1px solid #d8e0e9;
    border-radius: 9px;
    color: #647184;
    background: #ffffff;
    font-size: 21px;
    cursor: pointer;
}

.map-detail-panel h2 {
    margin: 13px 36px 8px 0;
    color: #1d2a3c;
    font-size: 23px;
    line-height: 1.2;
}

.map-detail-panel > p {
    margin: 0 0 15px;
    color: #6d7a8c;
    font-size: 13px;
    line-height: 1.55;
}

.map-detail-list {
    display: grid;
    gap: 0;
    margin: 0 0 17px;
}

.map-detail-list div {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid #e8edf2;
}

.map-detail-list dt {
    color: #8792a1;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.map-detail-list dd {
    margin: 0;
    color: #3c4a5d;
    font-size: 12px;
}

.map-private-notice {
    padding: 12px 13px;
    border: 1px solid #dce2e9;
    border-radius: 11px;
    background: #f5f7f9;
    color: #687587 !important;
}

.status-pill--map-assigned {
    color: #206a44;
    background: #def3e7;
}

.status-pill--map-portfolio,
.status-pill--portfolio {
    color: #654293;
    background: #ece3f8;
}

.status-pill--map-private {
    color: #637083;
    background: #e8edf2;
}

.map-stage {
    min-width: 0;
    position: relative;
    overflow: hidden;
    background: #dfe6ee;
}

.project-map {
    width: 100%;
    height: 100%;
}

.map-layer-switcher {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 8;
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(207, 216, 227, 0.95);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 25px rgba(20, 34, 54, 0.16);
    backdrop-filter: blur(10px);
}

.map-layer-switcher button {
    min-height: 34px;
    padding: 0 13px;
    border: 0;
    border-radius: 8px;
    color: #657286;
    background: transparent;
    font-weight: 750;
    cursor: pointer;
}

.map-layer-switcher button.is-active {
    color: #ffffff;
    background: #3559d5;
}

.map-legend {
    position: absolute;
    left: 18px;
    bottom: 54px;
    z-index: 8;
    display: grid;
    gap: 8px;
    padding: 13px 15px;
    border: 1px solid rgba(207, 216, 227, 0.95);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 25px rgba(20, 34, 54, 0.14);
    backdrop-filter: blur(10px);
}

.map-legend strong {
    color: #2d3a4e;
    font-size: 11px;
    text-transform: uppercase;
}

.map-legend span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667386;
    font-size: 11px;
}

.legend-dot {
    width: 11px;
    height: 11px;
    display: inline-block;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px currentColor;
}

.legend-dot--assigned { color: #2d9b63; background: #2d9b63; }
.legend-dot--portfolio { color: #7651b7; background: #7651b7; }
.legend-dot--panorama {
    position: relative;
    color: #FF6900;
    background: #fff7ed;
    border-radius: 4px;
    transform: rotate(45deg);
    box-shadow: 0 0 0 2px currentColor, inset 0 0 0 2px #fff;
}
.legend-dot--panorama::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: currentColor;
}
.legend-dot--private { color: #788596; background: #788596; }

.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 12;
    transform: translate(-50%, -50%);
    padding: 14px 20px;
    border-radius: 13px;
    color: #344256;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 40px rgba(17, 32, 53, 0.2);
    font-weight: 750;
}

.map-bottom-bar {
    height: 36px;
    position: absolute;
    right: 18px;
    bottom: 12px;
    z-index: 8;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 13px;
    border: 1px solid rgba(207, 216, 227, 0.95);
    border-radius: 10px;
    color: #5f6d7f;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 7px 22px rgba(20, 34, 54, 0.12);
    font-size: 11px;
    backdrop-filter: blur(10px);
}

.map-bottom-bar span + span {
    padding-left: 13px;
    border-left: 1px solid #dce3eb;
}

.map-status--error {
    color: #b33f45;
}

.project-pin {
    width: 58px;
    height: 70px;
    position: relative;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    filter: drop-shadow(0 8px 8px rgba(26, 38, 54, 0.27));
    transform-origin: 50% 100%;
    transition: transform 140ms ease, filter 140ms ease;
}

.project-pin::before {
    content: "";
    width: 52px;
    height: 52px;
    position: absolute;
    top: 0;
    left: 3px;
    transform: rotate(45deg);
    border-radius: 50% 50% 50% 8px;
    background: #2d9b63;
}

.project-pin--portfolio::before { background: #7651b7; }
.project-pin--private::before { background: #788596; }

.project-pin__image {
    width: 40px;
    height: 40px;
    position: absolute;
    top: 7px;
    left: 9px;
    z-index: 2;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 3px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(145deg, #1F6FB2, #0F3B66);
    font-size: 15px;
    font-weight: 900;
}

.project-pin:hover,
.project-pin--selected {
    z-index: 20 !important;
    transform: scale(1.16) translateY(-3px);
    filter: drop-shadow(0 12px 12px rgba(20, 32, 48, 0.32));
}

.project-pin--selected::after {
    content: "";
    width: 62px;
    height: 62px;
    position: absolute;
    top: -5px;
    left: -2px;
    border: 3px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(49, 75, 184, 0.34);
}

.desktop-only-message {
    display: none;
}

.info-box--compact {
    margin-top: -2px;
}

@media (max-width: 1099px) {
    .map-page {
        min-width: 0;
        overflow: auto;
    }

    .map-topbar,
    .map-workspace {
        display: none;
    }

    .desktop-only-message {
        min-height: 100vh;
        display: grid;
        place-content: center;
        gap: 8px;
        padding: 30px;
        text-align: center;
        color: #344256;
        background: #f3f6fa;
    }

    .desktop-only-message strong {
        font-size: 26px;
    }

    .desktop-only-message p {
        max-width: 520px;
        margin: 0;
        color: #718095;
    }
}

/* MVP7 — ustawienia globalne */
.settings-form {
    display: grid;
    gap: 20px;
    padding-bottom: 96px;
}

.settings-section {
    display: grid;
    gap: 24px;
}

.settings-section__header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8edf2;
}

.settings-section__header h2 {
    margin: 0 0 7px;
    color: #243244;
    font-size: 24px;
    letter-spacing: -0.025em;
}

.settings-section__header p:last-child {
    max-width: 760px;
    margin: 0;
    color: #748193;
    line-height: 1.55;
}

.settings-section__icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #1F6FB2;
    background: #EAF4FB;
    font-size: 22px;
    font-weight: 800;
}

.settings-grid {
    max-width: 980px;
}

.field-with-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    overflow: hidden;
    border: 1px solid #cfd7e1;
    border-radius: 12px;
    background: #ffffff;
    transition: border-color 130ms ease, box-shadow 130ms ease;
}

.field-with-unit:focus-within {
    border-color: #4566eb;
    box-shadow: 0 0 0 4px rgba(69, 102, 235, 0.11);
}

.field-with-unit input {
    height: 48px;
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
}

.field-with-unit > span {
    min-width: 76px;
    padding: 0 15px;
    border-left: 1px solid #e0e5eb;
    color: #6d7a8a;
    font-size: 13px;
    font-weight: 750;
    text-align: center;
}

.settings-choice-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-save-bar {
    position: sticky;
    bottom: 18px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border: 1px solid #dce3eb;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 50px rgba(31, 44, 61, 0.16);
    backdrop-filter: blur(14px);
}

.settings-save-bar > div {
    display: grid;
    gap: 3px;
}

.settings-save-bar strong {
    color: #3a4758;
    font-size: 13px;
}

.settings-save-bar span {
    color: #7b8797;
    font-size: 12px;
}

/* MVP8 — import zdjęć, EXIF i miniatury */
.import-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.import-card {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid #dce3eb;
    border-radius: 18px;
    color: inherit;
    background: #fff;
    box-shadow: 0 10px 30px rgba(35, 50, 70, .07);
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.import-card:hover {
    transform: translateY(-2px);
    border-color: #b9c7e8;
    box-shadow: 0 16px 36px rgba(35, 50, 70, .12);
}

.import-card__top,
.import-card__stats,
.upload-current-file,
.import-project-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.import-card__top > span:last-child,
.import-card > p,
.import-card__stats span {
    color: #7a8798;
    font-size: 12px;
}

.import-card h2 { margin: 0; color: #263547; font-size: 20px; }
.import-card p { margin: -8px 0 0; }
.import-card__stats { padding-top: 12px; border-top: 1px solid #edf0f4; }
.import-card__stats strong { color: #36465a; }

.import-progress { display: grid; gap: 7px; }
.import-progress__bar {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9edf3;
}
.import-progress__bar span {
    width: 0;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, #315bd8, #6b87ee);
    transition: width .2s ease;
}
.import-progress small { color: #7b8796; }

.upload-workspace { padding-bottom: 70px; }
.upload-drop-card {
    min-height: 330px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 13px;
    padding: 42px;
    border: 2px dashed #b8c5d7;
    border-radius: 22px;
    background: linear-gradient(145deg, #F7FAFC, #f2f6fc);
    text-align: center;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.upload-drop-card.is-dragging {
    transform: scale(1.005);
    border-color: #3c61e6;
    background: #EAF4FB;
}
.upload-drop-card input { display: none; }
.upload-drop-card__icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    color: #3459dd;
    background: #e5ecff;
    font-size: 34px;
    font-weight: 900;
}
.upload-drop-card h2 { max-width: 650px; margin: 0; color: #243348; font-size: 27px; }
.upload-drop-card p { max-width: 680px; margin: 0 0 8px; color: #738094; line-height: 1.6; }

.upload-summary,
.resume-notice,
.import-status-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.upload-summary h2,
.resume-notice p { margin: 4px 0 0; }
.upload-summary p { margin: 8px 0 0; color: #748194; }
.resume-notice {
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid #c8d5f5;
    border-radius: 16px;
    background: #eef3ff;
}
.resume-notice strong { color: #2d477f; }
.resume-notice p { color: #657696; }

.upload-progress-panel { display: grid; gap: 22px; }
.upload-main-progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px;
    align-items: center;
    gap: 14px;
}
.upload-main-progress strong { color: #3552ad; text-align: right; }
.upload-current-file {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f6f8fb;
    color: #657387;
    font-size: 12px;
}
.upload-current-file span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.upload-rejected {
    padding: 16px 18px;
    border: 1px solid #efd5a6;
    border-radius: 14px;
    background: #fff8e9;
    color: #735b2f;
}
.upload-rejected ul { max-height: 180px; overflow: auto; margin: 10px 0 0; padding-left: 20px; }
.upload-rejected li { margin: 5px 0; font-size: 12px; }

.import-status-hero {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid #dce3eb;
    border-radius: 18px;
    background: #fff;
}
.import-status-hero h2 { margin: 10px 0 0; color: #29394d; }
.import-status-hero .upload-main-progress { width: min(520px, 50vw); }

.attention-panel {
    display: grid;
    gap: 18px;
    margin: 20px 0;
    padding: 22px;
    border: 1px solid #f0c6c8;
    border-radius: 18px;
    background: #fff7f7;
}
.attention-panel--duplicate { border-color: #ead6a7; background: #fffaf0; }
.attention-panel h2 { margin: 5px 0 8px; color: #3d3340; }
.attention-panel p { margin: 0; color: #7d6870; }
.problem-file-list { display: grid; gap: 10px; }
.problem-file-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(196, 115, 120, .25);
    border-radius: 12px;
    background: rgba(255,255,255,.82);
}
.problem-file-list article > div:first-child { min-width: 0; display: grid; gap: 4px; }
.problem-file-list strong { overflow-wrap: anywhere; color: #4b3c43; font-size: 13px; }
.problem-file-list span { color: #8a747b; font-size: 12px; }
.duplicate-actions { display: flex; align-items: center; gap: 8px; }
.duplicate-keep-form { display: flex; align-items: center; gap: 8px; }
.duplicate-keep-form input { width: 240px; height: 38px; }
.button--small { min-height: 38px; padding: 0 13px; font-size: 12px; }

.media-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}
.media-admin-card {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border: 1px solid #e1e6ed;
    border-radius: 14px;
    background: #fff;
}
.media-admin-card--deleted {
    background: #fcfcfd;
    border-style: dashed;
}
.media-admin-card--hidden {
    background: #f7f8fa;
    border-color: #d9e0e8;
}
.media-admin-card__thumb {
    position: relative;
    width: 84px;
    height: 72px;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(180deg, #F1F6FA, #dde4ec);
}
.media-admin-card img {
    width: 84px;
    height: 72px;
    display: block;
    object-fit: cover;
    border-radius: 10px;
    background: #e8edf3;
}
.media-admin-card__deleted-badge {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 8px;
    color: #ffffff;
    background: rgba(113, 37, 33, 0.68);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.media-admin-card__hidden-badge {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 8px;
    color: #4f5d6e;
    background: rgba(238, 242, 247, 0.74);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.media-admin-card--hidden .media-admin-card__thumb img {
    filter: grayscale(1) opacity(.62);
}
.media-admin-card > div { min-width: 0; display: grid; align-content: start; gap: 4px; }
.media-admin-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #344458; font-size: 12px; }
.media-admin-card span { color: #7b8796; font-size: 10px; }
.media-admin-card__deleted-text {
    color: #a43d37 !important;
    font-weight: 700;
}
.media-admin-card__hidden-text {
    color: #667587 !important;
    font-weight: 700;
}
.media-admin-card form,
.media-admin-card__action-note { grid-column: 1 / -1; }
.media-admin-card button { width: 100%; }
.media-admin-card__action-note {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #efc8c4;
    border-radius: 12px;
    background: #fff2f0;
    color: #a43d37;
    font-size: 12px;
    font-weight: 700;
}
.media-admin-card__action-note--hidden {
    border-color: #d6dde7;
    background: #F1F6FA;
    color: #586779;
}

.project-import-section { display: grid; gap: 18px; }
.import-project-summary {
    justify-content: flex-start;
    padding: 14px 0;
    border-top: 1px solid #edf0f4;
    border-bottom: 1px solid #edf0f4;
}
.import-project-summary > div { min-width: 180px; display: grid; gap: 4px; }
.import-project-summary span { color: #7b8797; font-size: 11px; text-transform: uppercase; }
.import-project-summary strong { color: #314056; font-size: 18px; }
.project-import-list { display: grid; gap: 9px; }
.project-import-list a {
    display: grid;
    grid-template-columns: auto 130px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e1e6ed;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
}
.project-import-list a:hover { border-color: #bdcae1; background: #F7FAFC; }
.project-import-list strong { color: #405067; }
.project-import-list small { color: #7b8797; }

.status-pill--processing { color: #3153aa; background: #e8eeff; }
.status-pill--warning { color: #865b14; background: #fff0c8; }

@media (max-width: 1250px) {
    .import-status-hero { align-items: stretch; flex-direction: column; }
    .import-status-hero .upload-main-progress { width: 100%; }
    .problem-file-list article { align-items: stretch; flex-direction: column; }
    .duplicate-actions { align-items: stretch; flex-direction: column; }
    .duplicate-keep-form { align-items: stretch; flex-direction: column; }
    .duplicate-keep-form input { width: 100%; }
}

/* MVP9 — punkty zdjęć, viewer pełnej jakości i panoramy 360° */
.project-pin__image img,
.map-project-card__thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.photo-project-panel {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    background: #fff;
}

.photo-project-panel__header {
    display: grid;
    gap: 11px;
    padding: 25px 24px 20px;
    border-bottom: 1px solid #e1e7ee;
    background: linear-gradient(180deg, #F7FAFC, #fff);
}

.photo-project-panel__header h1 {
    margin: 3px 0 0;
    color: #1d2a3c;
    font-size: 27px;
    line-height: 1.15;
    letter-spacing: -.035em;
}

.photo-project-panel__header > p {
    margin: 0;
    color: #6e7b8d;
    font-size: 13px;
    line-height: 1.55;
}

.photo-project-meta {
    color: #4f6076 !important;
    font-size: 11px !important;
    font-weight: 750;
}

.photo-project-back {
    justify-self: start;
    padding: 0;
    border: 0;
    color: #3458cf;
    background: transparent;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.photo-project-panel__photos {
    padding: 20px 20px 32px;
}

.photo-list {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.photo-list-item {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 8px;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    color: inherit;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.photo-list-item:hover {
    transform: translateY(-1px);
    border-color: #b9c7db;
    background: #F7FAFC;
}

.photo-list-item--selected {
    border-color: #5270df;
    background: #f1f5ff;
    box-shadow: 0 0 0 3px rgba(69, 99, 218, .10);
}

.photo-list-item img {
    width: 62px;
    height: 48px;
    object-fit: cover;
    border-radius: 9px;
    background: #e8edf3;
}

.photo-list-item > span {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.photo-list-item strong {
    overflow: hidden;
    color: #344256;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-list-item small {
    color: #7d8998;
    font-size: 10px;
}

.photo-pin {
    width: 54px;
    height: 64px;
    position: relative;
    padding: 4px 4px 10px;
    border: 0;
    border-radius: 17px 17px 17px 5px;
    background: #315bd8;
    box-shadow: 0 8px 18px rgba(26, 39, 58, .28);
    cursor: pointer;
    transform: rotate(-45deg) scale(0);
    transform-origin: 50% 100%;
    animation: photo-pin-enter .24s ease forwards;
    transition: filter .15s ease, box-shadow .15s ease;
}

.photo-pin img {
    width: 46px;
    height: 46px;
    display: block;
    object-fit: cover;
    border: 3px solid #fff;
    border-radius: 13px;
    transform: rotate(45deg);
    background: #e7ecf3;
}

.photo-pin > span {
    position: absolute;
    top: -8px;
    right: -13px;
    z-index: 3;
    padding: 3px 6px;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: #7b4fb3;
    font-size: 8px;
    font-weight: 900;
    transform: rotate(45deg);
}

.photo-pin--360 {
    background: #FF6900;
    box-shadow: 0 10px 24px rgba(230,126,34,.34), 0 0 0 3px rgba(255,255,255,.92);
}
.photo-pin--360 > span {
    background: #E65F00;
    border-color: #fff7ed;
}
.photo-pin:not(.photo-pin--360) { background: #2d9b63; }
.photo-pin:hover,
.photo-pin--selected {
    z-index: 20 !important;
    filter: brightness(1.08);
    box-shadow: 0 12px 25px rgba(24, 36, 55, .4), 0 0 0 4px rgba(255,255,255,.9);
}

@keyframes photo-pin-enter {
    to { transform: rotate(-45deg) scale(1); }
}

.photo-viewer-open { overflow: hidden; }

.photo-viewer {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-rows: 66px minmax(0, 1fr);
    color: #F7FAFC;
    background: #0c121c;
}

.photo-viewer__header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 18px 0 24px;
    border-bottom: 1px solid rgba(255,255,255,.11);
    background: #111926;
}

.photo-viewer__header > div:first-child {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 13px;
}

.photo-viewer__header strong {
    overflow: hidden;
    max-width: 65vw;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-viewer__header span {
    color: #92a0b3;
    font-size: 11px;
}

.photo-viewer__tools {
    display: flex;
    align-items: center;
    gap: 7px;
}

.photo-viewer__tools button {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 9px;
    color: #EAF2F7;
    background: rgba(255,255,255,.07);
    font-weight: 800;
    cursor: pointer;
}

.photo-viewer__tools button:hover { background: rgba(255,255,255,.13); }
.photo-viewer__tools .photo-viewer__close { font-size: 25px; }

.photo-viewer__stage {
    min-width: 0;
    min-height: 0;
    position: relative;
    overflow: hidden;
    background: #070b11;
}

.photo-image-viewport,
.photo-panorama {
    width: 100%;
    height: 100%;
}

.photo-image-viewport {
    display: grid;
    place-items: center;
    overflow: hidden;
    cursor: zoom-in;
    touch-action: none;
}

.photo-image-viewport.is-dragging { cursor: grabbing; }

.photo-image-viewport img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
    user-select: none;
    will-change: transform;
    transition: transform .08s linear;
}

.photo-panorama .pnlm-container { background: #070b11; }

.photo-viewer__navigation {
    width: 52px;
    height: 74px;
    position: absolute;
    top: 50%;
    z-index: 6;
    transform: translateY(-50%);
    border: 1px solid rgba(255,255,255,.16);
    color: #fff;
    background: rgba(10, 17, 27, .62);
    font-size: 47px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.photo-viewer__navigation:disabled { opacity: .2; cursor: default; }
.photo-viewer__navigation--previous { left: 16px; border-radius: 13px; }
.photo-viewer__navigation--next { right: 16px; border-radius: 13px; }

.photo-viewer__loading {
    position: absolute;
    top: 18px;
    left: 50%;
    z-index: 8;
    transform: translateX(-50%);
    padding: 9px 13px;
    border-radius: 9px;
    color: #dbe5f2;
    background: rgba(16, 25, 38, .82);
    font-size: 11px;
    font-weight: 750;
    backdrop-filter: blur(8px);
}

.photo-viewer__metadata {
    min-height: 0;
    overflow-y: auto;
    padding: 24px 22px;
    border-left: 1px solid rgba(255,255,255,.1);
    background: #111926;
}

.photo-viewer__metadata > .status-pill {
    margin-bottom: 18px;
    color: #dfe7ff;
    background: #2a3b69;
}

.photo-viewer__metadata dl {
    display: grid;
    margin: 0;
}

.photo-viewer__metadata dl > div {
    display: grid;
    gap: 5px;
    padding: 13px 0;
    border-top: 1px solid rgba(255,255,255,.09);
}

.photo-viewer__metadata dt {
    color: #77879c;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.photo-viewer__metadata dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #d4dce8;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 1250px) {
    .photo-viewer { grid-template-columns: minmax(0, 1fr) 290px; }
}
[hidden] { display: none !important; }

/* MVP10 — publication, project content and metadata */
.publication-card { display: grid; gap: 20px; }
.publication-check-grid { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 12px; }
.publication-check-grid > div { border: 1px solid var(--border, #dce3ee); border-radius: 14px; padding: 14px; display: grid; gap: 4px; background: #f8fafc; }
.publication-check-grid strong { font-size: 1.35rem; }
.publication-check-grid span { color: #64748b; font-size: .83rem; }
.publication-check--ok { box-shadow: inset 0 3px 0 #1f9d68; }
.publication-check--blocked { box-shadow: inset 0 3px 0 #d97706; }
.publication-actions { flex-wrap: wrap; }
.publication-actions form { margin: 0; }
.thumbnail-settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.thumbnail-choice-card { border: 1px solid #dce3ee; border-radius: 16px; padding: 18px; display: grid; gap: 12px; background: #f8fafc; }
.thumbnail-choice-card p { margin: 0; color: #64748b; }
.thumbnail-choice-card select, .thumbnail-choice-card input[type=file] { width: 100%; }
.bulk-photo-toolbar { display: grid; grid-template-columns: 230px minmax(260px, 1fr) auto; gap: 12px; margin-bottom: 18px; align-items: center; }
.bulk-photo-toolbar select, .bulk-photo-toolbar input { min-height: 42px; border: 1px solid #ccd6e4; border-radius: 10px; padding: 0 12px; }
.admin-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; max-height: 760px; overflow: auto; padding-right: 6px; }
.admin-photo-card { position: relative; display: grid; grid-template-rows: 130px auto; border: 1px solid #dce3ee; border-radius: 14px; overflow: hidden; background: #fff; cursor: pointer; }
.admin-photo-card > input { position: absolute; z-index: 2; top: 10px; left: 10px; width: 20px; height: 20px; }
.admin-photo-card > img { width: 100%; height: 130px; object-fit: cover; background: #e8edf5; }
.admin-photo-card__body { display: grid; gap: 4px; padding: 12px; min-width: 0; }
.admin-photo-card__body strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-photo-card__body small { color: #64748b; }
.admin-photo-card--hidden { opacity: .62; filter: grayscale(.45); }
.attachment-upload-form { padding-bottom: 22px; border-bottom: 1px solid #e5eaf1; margin-bottom: 18px; }
.project-file-list, .external-material-admin-list { display: grid; gap: 10px; }
.project-file-list article, .external-material-admin-list article { display: flex; justify-content: space-between; align-items: center; gap: 18px; border: 1px solid #dce3ee; border-radius: 14px; padding: 14px 16px; }
.project-file-list article > div:first-child, .external-material-admin-list article > div:first-child { display: grid; gap: 3px; min-width: 0; }
.project-file-list span, .project-file-list small { color: #64748b; }
.project-file-actions { display: flex; align-items: center; gap: 8px; }
.project-file-actions form, .external-material-admin-list form { margin: 0; }
.external-material-admin-list article > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.photo-edit-layout { display: grid; grid-template-columns: minmax(400px, 1.15fr) minmax(360px, .85fr); gap: 24px; align-items: start; }
.photo-edit-preview img { width: 100%; max-height: 620px; object-fit: contain; background: #0f172a; border-radius: 14px; margin: 14px 0; }
.workspace--standalone { max-width: 1440px; margin: 0 auto; padding: 28px; }
.photo-project-panel__content { display: grid; gap: 20px; padding: 18px; border-bottom: 1px solid #dde5ef; }
.viewer-material-list, .viewer-content-list { display: grid; gap: 9px; }
.viewer-material-card { width: 100%; border: 1px solid #d8e0eb; border-radius: 12px; background: #fff; padding: 10px; display: grid; grid-template-columns: 64px 1fr; gap: 10px; text-align: left; cursor: pointer; }
.viewer-material-card:not(:has(img)) { grid-template-columns: 1fr; }
.viewer-material-card img { width: 64px; height: 56px; object-fit: cover; border-radius: 8px; }
.viewer-material-card span { display: grid; gap: 2px; min-width: 0; }
.viewer-material-card strong { overflow: hidden; text-overflow: ellipsis; }
.viewer-material-card small { color: #64748b; }
.viewer-content-row { border: 1px solid #d8e0eb; border-radius: 12px; padding: 11px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.viewer-content-row > span { display: grid; gap: 2px; min-width: 0; }
.viewer-content-row small { color: #64748b; }
.material-viewer { position: fixed; inset: 0; z-index: 1200; background: #0b1220; display: grid; grid-template-rows: 64px 1fr; }
.material-viewer[hidden] { display: none; }
.material-viewer header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 10px 18px; background: #111b2d; color: #fff; }
.material-viewer header > div { display: flex; gap: 10px; align-items: center; }
.material-viewer iframe { width: 100%; height: 100%; border: 0; background: #fff; }
body.material-viewer-open { overflow: hidden; }
.preview-topbar form { margin: 0; }

@media (max-width: 1250px) {
    .publication-check-grid { grid-template-columns: repeat(3, 1fr); }
    .thumbnail-settings-grid { grid-template-columns: 1fr; }
    .photo-edit-layout { grid-template-columns: 1fr; }
}

/* MVP11 — generowanie i pobieranie paczek */
.archive-downloads {
    border-top: 1px solid var(--border-color, #dfe5ec);
    padding-top: 18px;
}

.archive-downloads__description {
    margin: 0 0 12px;
    color: #657181;
    font-size: 0.88rem;
    line-height: 1.5;
}

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

.archive-downloads__actions .button {
    min-height: 40px;
    white-space: normal;
}

.archive-job-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.archive-job {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid #dfe5ec;
    border-radius: 12px;
    background: #f8fafc;
}

.archive-job--completed {
    border-color: #a8d8bd;
    background: #f2fbf6;
}

.archive-job--failed,
.archive-job--expired {
    border-color: #efb1b1;
    background: #fff5f5;
}

.archive-job__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.archive-job__header span,
.archive-job small {
    color: #657181;
    font-size: 0.78rem;
}

.archive-job__progress {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4e9ef;
}

.archive-job__progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2f7d59;
    transition: width 180ms ease;
}

.archive-job__error,
.archive-inline-error {
    margin: 0;
    color: #a52323;
    font-size: 0.82rem;
    line-height: 1.4;
}

.archive-inline-error {
    padding: 10px 12px;
    border: 1px solid #efb1b1;
    border-radius: 10px;
    background: #fff5f5;
}

.archive-part-list {
    display: grid;
    gap: 6px;
}

.archive-part-link {
    display: block;
    padding: 9px 10px;
    border: 1px solid #bad4c5;
    border-radius: 9px;
    color: #1f6948;
    background: #fff;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.archive-part-link:hover {
    background: #edf8f1;
}

.photo-list-item {
    position: relative;
}

.photo-download-selector {
    position: absolute;
    top: 7px;
    left: 7px;
    z-index: 2;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 7px;
    background: rgba(21, 31, 43, 0.72);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
    cursor: pointer;
}

.photo-download-selector.is-selected,
.photo-download-selector[aria-checked="true"] {
    background: #258052;
}

.photo-download-selector:focus-visible {
    outline: 3px solid rgba(64, 141, 242, 0.42);
    outline-offset: 2px;
}

/* MVP12 — diagnostyka i stabilizacja */
.diagnostics-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding: 26px 28px;
    border: 1px solid var(--border, #dce3ec);
    border-radius: 20px;
    background: #fff;
}
.diagnostics-hero--healthy { box-shadow: inset 5px 0 0 #16a34a; }
.diagnostics-hero--danger { box-shadow: inset 5px 0 0 #dc2626; }
.diagnostics-status {
    min-width: 82px;
    padding: 12px 16px;
    border-radius: 999px;
    text-align: center;
    font-weight: 800;
    background: #ecfdf3;
    color: #166534;
}
.diagnostics-hero--danger .diagnostics-status { background: #fef2f2; color: #991b1b; }
.diagnostics-grid .stat-card small {
    display: block;
    margin-top: 8px;
    color: #64748b;
    overflow-wrap: anywhere;
}
.diagnostics-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
}
.diagnostics-table > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}
.diagnostics-table > div span { color: #475569; }
.diagnostics-table > div strong { font-size: 1.1rem; color: #0f172a; }
.diagnostics-table--compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.diagnostics-table--compact > div { flex-direction: column; align-items: flex-start; }
@media (max-width: 1100px) {
    .diagnostics-table,
    .diagnostics-table--compact { grid-template-columns: 1fr; }
}

/* MVP20.42 — administracja warstwami DXF. */
.dxf-style-grid {
    display: grid;
    grid-template-columns: minmax(150px, .7fr) minmax(150px, 1fr) minmax(150px, 1fr);
    gap: 14px;
}

.dxf-color-input {
    width: 100%;
    min-height: 44px;
    padding: 4px 6px !important;
    cursor: pointer;
}

.dxf-overlay-admin-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.dxf-overlay-admin-list article {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #dfe6ef;
    border-radius: 14px;
    background: #fbfcfe;
}

.dxf-overlay-admin-list article > div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.dxf-overlay-admin-list strong { color: #24344d; }
.dxf-overlay-admin-list span,
.dxf-overlay-admin-list small { color: #728096; }

.dxf-overlay-swatch {
    width: 30px;
    height: 30px;
    display: block;
    border: 5px solid rgba(255,255,255,.95);
    border-radius: 50%;
    background: var(--dxf-color, #e04f3f);
    box-shadow: 0 0 0 1px #d8e0ea, 0 5px 12px rgba(30,45,66,.14);
}

@media (max-width: 900px) {
    .dxf-style-grid { grid-template-columns: 1fr; }
    .dxf-overlay-admin-list article { grid-template-columns: 30px minmax(0, 1fr); }
    .dxf-overlay-admin-list article > form { grid-column: 1 / -1; }
}


/* ===== MVP20.65 — rebranding VECTORview ===== */
.brand-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    filter: drop-shadow(0 2px 6px rgba(17, 24, 39, 0.14));
}

.brand-logo--sidebar {
    width: 142px;
}

.brand-logo--topbar {
    width: 166px;
}

.brand-logo--account {
    width: 154px;
}

.brand-logo--auth {
    width: min(100%, 210px);
}

.brand-logo--auth-mobile {
    width: min(100%, 180px);
}

.sidebar__brand--vectorview,
.client-topbar__brand--vectorview,
.account-topbar__brand--vectorview,
.auth-brand--vectorview,
.auth-mobile-brand--vectorview {
    align-items: center;
}

.auth-mobile-brand--vectorview {
    gap: 10px;
}

.auth-mobile-brand--vectorview strong {
    display: none;
}

@media (max-width: 860px) {
    .brand-logo--topbar {
        width: 132px;
    }

    .brand-logo--account {
        width: 138px;
    }
}
