/* ENTOMONE - style runtime */
/* Wspolny modal potwierdzenia dla akcji zmieniajacych dane. */
.ent-confirm-dialog { width: min(92vw, 520px); margin: auto; padding: 0; border: 0; border-radius: 8px; box-shadow: 0 18px 52px rgba(11, 32, 24, .32); color: #22332b; background: #fff; }
.ent-confirm-dialog::backdrop { background: rgba(13, 25, 21, .56); }
.ent-confirm-dialog__form { margin: 0; padding: 24px; }
.ent-confirm-dialog__title { margin: 0 0 12px; color: #173f32; font-size: 20px; line-height: 1.25; }
.ent-confirm-dialog__message { margin: 0; color: #40524a; line-height: 1.55; white-space: pre-line; }
.ent-confirm-dialog__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.ent-confirm-dialog__actions button { min-height: 38px; padding: 8px 15px; border-radius: 6px; font: inherit; font-weight: 700; cursor: pointer; }
.ent-confirm-dialog .ent-confirm-dialog__cancel { border: 1px solid #8ea398 !important; color: #243b30 !important; background: #ffffff !important; text-shadow: none !important; }
.ent-confirm-dialog__confirm { border: 1px solid #166534; color: #fff; background: #157347; }
.ent-confirm-dialog__confirm.is-danger { border-color: #a52c28; background: #b63731; }
.ent-confirm-dialog__cancel:hover, .ent-confirm-dialog__cancel:focus-visible { background: #f1f5f2; }
.ent-confirm-dialog__confirm:hover, .ent-confirm-dialog__confirm:focus-visible { filter: brightness(.92); }
.ent-confirm-dialog--stacked .ent-confirm-dialog__actions { align-items: stretch; flex-direction: column-reverse; }
.ent-confirm-dialog--stacked .ent-confirm-dialog__actions button { width: 100%; }
.record-delete-dialog__media-option { display: flex; align-items: flex-start; gap: 9px; margin-top: 18px; padding: 12px; border: 1px solid #e1c4bf; border-radius: 6px; background: #fff7f5; color: #5a302a; line-height: 1.45; cursor: pointer; }
.record-delete-dialog__media-option input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #b63731; }
@media (max-width: 640px) { .ent-confirm-dialog { width: min(94vw, 520px); } .ent-confirm-dialog__form { padding: 20px; } .ent-confirm-dialog__actions { align-items: stretch; flex-direction: column-reverse; } .ent-confirm-dialog__actions button { width: 100%; } }
/* Start desktop: panel pracy i filtry; aparat pozostaje tylko na mobile. */
.ent-start-record-filters { max-width: 1180px; margin: 22px auto 0; padding: 22px; background: #fff; border: 1px solid #d8e0dc; border-radius: 14px; }
.ent-start-filter-counters { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 16px; }
.ent-start-filter-counters span { display: inline-flex; align-items: baseline; gap: 4px; padding: 6px 10px; border: 1px solid #e0e8e4; border-radius: 999px; background: #f6f9f7; color: #50605a; font-size: 13px; line-height: 1.1; white-space: nowrap; }
.ent-start-filter-counters strong { color: #2f4a3d; font-size: 15px; font-weight: 800; }
.ent-start-dataset-counters { margin: 10px 0 0; }
@media (max-width: 640px) { .ent-start-filter-counters { justify-content: center; gap: 7px; margin-bottom: 14px; } .ent-start-filter-counters span { padding: 5px 8px; font-size: 12px; } .ent-start-filter-counters strong { font-size: 14px; } }
.ent-record-edit-page .record-media-lightbox { width: min(96vw, 1200px); max-width: 96vw; max-height: 96svh; margin: auto; padding: 42px 12px 12px; border: 0; background: #111820; color: #fff; }
.ent-record-edit-page .record-media-lightbox::backdrop { background: rgba(11, 18, 25, .82); }
.ent-record-edit-page .record-media-lightbox-image { display: block; width: auto; max-width: 100%; max-height: calc(96svh - 54px); margin: 0 auto; object-fit: contain; }
.ent-record-edit-page .record-media-lightbox-close { position: absolute; top: 7px; right: 9px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.ent-record-edit-page .record-media-lightbox-close:hover, .ent-record-edit-page .record-media-lightbox-close:focus-visible { background: rgba(255, 255, 255, .18); }
.recent-gallery-trash-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.recent-gallery-trash-toolbar .btn-secondary, .recent-gallery-trash-toolbar .btn-danger { min-height: 38px; padding: 8px 12px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.recent-gallery-trash-toolbar .btn-secondary { border: 1px solid #b7c3bd; background: #fff; color: #24332c; }
.recent-gallery-trash-toolbar .btn-danger { border: 1px solid #a52c28; background: #b63731; color: #fff; }
.recent-gallery-trash-toolbar .btn-danger:disabled { opacity: .5; cursor: not-allowed; }
.btn-recent-delete-mode { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 12px; border: 1px solid #b63731; border-radius: 8px; background: #fff; color: #9d2d28; font-weight: 800; text-decoration: none; }
.btn-recent-delete-mode--active { background: #b63731; color: #fff; }
.ent-recent-gallery-page .topbar { align-items: center; justify-content: space-between; gap: 16px; }
.ent-recent-gallery-page .recent-gallery-heading { flex: 1 1 auto; min-width: 0; }
.ent-recent-gallery-page .topbar h1 { margin: 0; text-align: left; }
.ent-recent-gallery-page .gallery-expedition { margin-top: 4px; color: #546270; }
.recent-gallery-top-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; }
.recent-observation-card { position: relative; }
.recent-observation-select { display: flex; gap: 6px; align-items: center; padding: 8px 10px; font-size: 12px; font-weight: 700; background: #fff7e9; border-bottom: 1px solid #eadcc3; }
.record-origin-switch { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.record-origin-switch label { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 7px 12px; border: 1px solid #cdd8d4; border-radius: 999px; background: #fff; color: #243b34; font-size: 13px; font-weight: 700; cursor: pointer; }
.record-origin-switch input { position: absolute; opacity: 0; pointer-events: none; }
.record-origin-switch label:has(input:checked) { border-color: #74ac00; background: #74ac00; color: #fff; }
.record-origin-switch label:focus-within { outline: 2px solid #315746; outline-offset: 2px; }
.record-sex-switch { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.record-sex-switch label { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 7px 12px; border: 1px solid #cdd8d4; border-radius: 999px; background: #fff; color: #243b34; font-size: 13px; font-weight: 700; cursor: pointer; }
.record-sex-switch input { position: absolute; opacity: 0; pointer-events: none; }
.record-sex-switch label:has(input:checked) { border-color: #74ac00; background: #74ac00; color: #fff; }
.record-sex-switch label:focus-within { outline: 2px solid #315746; outline-offset: 2px; }
@media (max-width: 640px) {
    .recent-gallery-trash-toolbar { align-items: stretch; }
    .recent-gallery-trash-toolbar .btn-secondary, .recent-gallery-trash-toolbar .btn-danger { width: 100%; }
    .ent-recent-gallery-page .topbar { align-items: stretch; flex-direction: column; }
    .recent-gallery-top-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 8px; }
    .recent-gallery-top-actions .btn-media, .recent-gallery-top-actions .btn-back { width: 100%; }
    .recent-gallery-top-actions .btn-recent-delete-mode { grid-column: 1 / -1; justify-self: start; }
}

.ent-start-record-filters h2 { margin: 0 0 16px; font-size: 22px; }
.ent-start-filter-search { display: block; font-weight: 700; }
.ent-start-filter-search-row { display: flex; align-items: end; gap: 10px; width: min(100%, 760px); }
.ent-start-filter-search-row .ent-start-filter-search { flex: 1 1 auto; min-width: 0; }
.ent-start-filter-search-row .btn-primary { flex: 0 0 auto; min-height: 50px; border: 1px solid #166534; border-radius: 12px; background: #15803d; color: #fff; padding: 0 18px; font: inherit; font-weight: 700; cursor: pointer; }
.ent-start-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ent-start-filter-search input, .ent-start-filter-dates input, .ent-start-filter-grid select, .ent-start-filter-grid input { width: 100%; margin-top: 6px; }
.ent-start-filter-search input { box-sizing: border-box; min-height: 50px; margin-top: 8px; padding: 10px 14px; border: 1px solid #7bc7b7; border-radius: 12px; background: #fff; color: #173f32; font: inherit; }
.ent-start-filter-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.ent-start-filter-dates label { display: flex; align-items: center; justify-content: center; min-height: 50px; box-sizing: border-box; padding: 8px 10px; border: 1px solid #7bc7b7; border-radius: 12px; background: #edf9f6; color: #155e52; font-weight: 700; cursor: pointer; }
.ent-start-filter-dates input { position: absolute; width: 1px !important; height: 1px; margin: 0 !important; opacity: 0; pointer-events: none; }
.ent-start-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.ent-start-filter-grid label { display: block; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; color: #334155; font-weight: 700; }
.ent-start-filter-grid select, .ent-start-filter-grid input { box-sizing: border-box; min-height: 38px; border: 1px solid #94a3b8; border-radius: 4px; background: #fff; color: #172033; padding: 0 8px; }
.ent-start-site-autocomplete { position: relative; }
.ent-start-site-suggestions { position: absolute; z-index: 1200; top: calc(100% + 4px); left: 0; right: 0; max-height: 260px; overflow-y: auto; border: 1px solid #94a3b8; border-radius: 6px; background: #fff; box-shadow: 0 8px 20px rgba(15, 23, 42, .16); }
.ent-start-site-suggestions[hidden] { display: none; }
.ent-start-site-suggestion { display: block; width: 100%; min-height: 38px; padding: 8px 10px; border: 0; border-bottom: 1px solid #e2e8f0; background: #fff; color: #172033; font: inherit; font-weight: 400; text-align: left; cursor: pointer; }
.ent-start-site-suggestion:last-child { border-bottom: 0; }
.ent-start-site-suggestion:hover, .ent-start-site-suggestion.is-active { background: #eaf5ff; color: #0b4f85; }
.ent-start-site-suggestion-empty { padding: 10px; color: #64748b; font-weight: 400; }
.ent-start-mobile-filter-choices { display: block; margin-top: 16px; }
.ent-start-mobile-filter-label { display: block; margin-bottom: 8px; font-weight: 700; }
.ent-start-mobile-choice-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ent-start-mobile-choice-row--origin { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ent-start-mobile-observer-row { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
.ent-start-mobile-choice { min-height: 46px; padding: 8px 10px; border: 1px solid #b7c3bd; border-radius: 999px; background: #fff; color: #173f32; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.ent-start-mobile-choice.is-active { border-color: #74ac00; background: #74ac00; color: #fff; }
.ent-start-filter-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.ent-start-filter-actions .btn-primary { min-height: 40px; border: 1px solid #166534; border-radius: 6px; background: #15803d; color: #fff; padding: 0 16px; font-weight: 700; }
.ent-start-filter-actions .btn-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; border: 1px solid #b91c1c; border-radius: 6px; background: #fff1f2; color: #991b1b; font-weight: 700; text-decoration: none; }
.ent-start-filter-actions .btn-primary:hover, .ent-start-filter-actions .btn-secondary:hover { filter: brightness(.94); }
.ent-start-record-filters { scroll-margin-top: 110px; }
@media (min-width: 901px) { .ent-start-camera-form { display: none !important; } .ent-start-filter-origin, .ent-start-filter-observer { display: none; } .ent-start-filter-site select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; } .ent-start-mobile-site-button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 42px; margin-top: 7px; padding: 8px 12px; border: 1px solid #7bc7b7; border-radius: 8px; background: #edf9f6; color: #155e52; font: inherit; cursor: pointer; } }
@media (max-width: 900px) {
    .ent-start-record-filters { display: none; }
    .ent-start-page--mobile-search .ent-start-record-filters { display: block; }
    .ent-start-filter-search input {
        min-height: 56px;
        margin-top: 8px;
        padding: 12px 16px;
        border-radius: 12px;
        font-size: 1.08rem;
    }
    .ent-start-filter-search-row { align-items: stretch; width: 100%; }
    .ent-start-filter-search-row .btn-primary { min-height: 56px; }
    .ent-start-filter-dates { gap: 10px; margin-top: 18px; }
    .ent-start-mobile-filter-choices { margin-top: 18px; }
    .ent-start-filter-grid { display: contents; }
    .ent-start-filter-origin, .ent-start-filter-observer, .ent-start-filter-plant { display: none !important; }
    .ent-start-filter-site { display: block; margin-top: 18px; font-weight: 700; }
    .ent-start-filter-site select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
    .ent-start-mobile-site-button { display: flex !important; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin-top: 7px; padding: 8px 12px; border: 1px solid #b7c3bd; border-radius: 12px; background: #fff; color: #173f32; font: inherit; cursor: pointer; }
    .ent-start-filter-quantity-value, .ent-start-filter-quantity-op { display: block; margin-top: 18px; font-weight: 700; }
    .ent-start-filter-quantity-value input, .ent-start-filter-quantity-op select { box-sizing: border-box; height: 52px; min-height: 52px; padding: 8px 12px; border: 1px solid #b7c3bd; border-radius: 12px; background: #fff; color: #173f32; font: inherit; }
    .ent-start-filter-actions { margin-top: 22px; }
    .ent-start-filter-actions .btn-primary, .ent-start-filter-actions .btn-secondary { min-height: 50px; }
}
@media (max-width: 640px) { .ent-start-filter-dates { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ent-start-mobile-site-button { display: none; }
@media (min-width: 901px) { .ent-start-mobile-site-button { display: flex; } }
.ent-menu-mobile-search, .ent-mobile-record-tools { display: none; }
/* Kopia rekordu: prosty etap dodania nowego zdjecia. */
.ent-media-picker-page--copy-quick .tabs,
.ent-media-picker-page--copy-quick .pane[data-pane="library"],
.ent-media-picker-page--copy-quick .upload-help-row,
.ent-media-picker-page--copy-quick .footer-left-actions,
.ent-media-picker-page--copy-quick #btnDelete,
.ent-media-picker-page--copy-quick #btnLink,
.ent-media-picker-page--copy-quick .upload { display: none !important; }
.ent-media-picker-page--copy-quick .container { height: auto; max-height: calc(100vh - 86px); }
.ent-media-picker-page--copy-quick .content { flex: 0; overflow: visible; padding: 0; }
.ent-media-picker-page--copy-quick .copy-quick-species { margin-top: 4px; color: #315746; font-size: 1.08rem; font-weight: 800; }
.ent-media-picker-page--copy-quick .copy-quick-date { margin-top: 8px; color: #4b5d54; font-size: .95rem; }
.ent-media-picker-page--copy-quick .copy-quick-details { margin: 0 0 16px; padding: 14px; border: 1px solid #d8e6d2; border-radius: 12px; background: #fbfef8; }
.ent-media-picker-page--copy-quick .copy-quick-add-photo { display: flex; align-items: center; justify-content: center; min-height: 56px; margin: 0 0 16px; padding: 10px 16px; border-radius: 10px; background: #247eaa; color: #fff; font-size: 1.08rem; font-weight: 800; cursor: pointer; }
.ent-media-picker-page--copy-quick .copy-quick-add-photo::before { content: "📷"; margin-right: 9px; font-size: 1.3em; }
.ent-media-picker-page--copy-quick .copy-quick-details > label { display: block; margin-bottom: 6px; font-weight: 800; }
.ent-media-picker-page--copy-quick .copy-quick-details > label.copy-quick-add-photo { display: flex; justify-content: center; margin-bottom: 16px; text-align: center; }
.ent-media-picker-page--copy-quick #copyQuickObservedOn { width: 100%; min-height: 44px; margin: 0 0 14px; }
.ent-media-picker-page--copy-quick .copy-quick-details textarea { width: 100%; resize: vertical; }
.ent-media-picker-page--copy-quick .copy-quick-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.ent-media-picker-page--copy-quick .copy-quick-choice-grid fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.ent-media-picker-page--copy-quick .copy-quick-choice-grid legend { margin-bottom: 7px; font-weight: 800; }
.ent-media-picker-page--copy-quick .record-sex-switch,
.ent-media-picker-page--copy-quick .record-origin-switch { justify-content: center; }
.ent-media-picker-page--copy-quick .record-sex-switch label,
.ent-media-picker-page--copy-quick .record-origin-switch label { min-height: 42px; padding: 8px 14px; font-size: 14px; }
.ent-media-picker-page--copy-quick .copy-quick-gps { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.ent-media-picker-page--copy-quick .copy-quick-gps .btn { min-height: 44px; }
.ent-media-picker-page--copy-quick #copyQuickGpsStatus { color: #52645a; font-size: .9rem; }
.ent-media-picker-page--copy-quick .footer { justify-content: space-between; }
@media (max-width: 640px) { .ent-media-picker-page--copy-quick .modal { align-items: flex-end; } .ent-media-picker-page--copy-quick .modal .container { width: 100%; height: calc(100dvh - 156px); max-height: none; margin: 0; border-radius: 14px 14px 0 0; } .ent-media-picker-page--copy-quick .copy-quick-choice-grid { grid-template-columns: 1fr; justify-items: center; } .ent-media-picker-page--copy-quick .copy-quick-choice-grid fieldset { text-align: center; } .ent-media-picker-page--copy-quick .copy-quick-details { flex: 1 1 auto; min-height: 0; margin: 0; overflow-y: auto; } .ent-media-picker-page--copy-quick .footer { flex-wrap: wrap; } }
/* Historia zmian: projektowe LEDGER.md i WYKONANE_PRACE.md */

:root {
    /* brand */
    --color-ink: #17251f;
    --color-deep: #10251f;
    --color-moss: #315746;
    --color-leaf: #dfe9d6;
    --color-paper: #fffaf0;
    --color-sand: #eadcc3;
    --color-amber: #d66f2f;
    --color-amber-dark: #b75822;
    --color-muted: #66736e;

    /* neutral surfaces */
    --surface-page: #f4f7f6;
    --surface-panel: #ffffff;
    --surface-warm: #fffaf0;
    --border-soft: #d8cbb5;
    --border-control: #e3d9c7;

    /* status */
    --status-success-bg: #d4edda;
    --status-success-border: #c3e6cb;
    --status-success-text: #155724;
    --status-danger-bg: #f8d7da;
    --status-danger-border: #f5c6cb;
    --status-danger-text: #721c24;
    --status-warning-bg: #fff3cd;
    --status-warning-border: #ffeeba;
    --status-warning-text: #856404;
    --status-info-bg: #d1ecf1;
    --status-info-border: #bee5eb;
    --status-info-text: #0c5460;

    --font-ui: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --shadow-panel: 0 22px 60px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-ui);
    color: var(--color-ink);
    background: var(--surface-page);
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
.btn,
.home-link {
    min-height: 44px;
}

button,
.btn,
a[class*="btn"] {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
}

.app-alert {
    margin: 15px 0 0;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

.app-alert-success {
    color: var(--status-success-text);
    background: var(--status-success-bg);
    border: 1px solid var(--status-success-border);
}

.app-alert-danger,
.app-alert-error {
    color: var(--status-danger-text);
    background: var(--status-danger-bg);
    border: 1px solid var(--status-danger-border);
}

.app-alert-warning {
    color: var(--status-warning-text);
    background: var(--status-warning-bg);
    border: 1px solid var(--status-warning-border);
}

.app-alert-info {
    color: var(--status-info-text);
    background: var(--status-info-bg);
    border: 1px solid var(--status-info-border);
}

.ent-login-page {
    min-height: 100svh;
    position: relative;
    overflow-x: hidden;
    padding: 0;
    background:
        linear-gradient(180deg, rgba(246, 248, 247, 0.92), rgba(238, 243, 240, 0.96)),
        #f1f4f2;
    color: #1d2d29;
}

.ent-login-page::before {
    content: "";
    position: fixed;
    inset: 50px 0 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(13,31,27,0.84) 0%, rgba(13,31,27,0.58) 42%, rgba(13,31,27,0.22) 100%),
        radial-gradient(circle at 78% 24%, rgba(214,111,47,0.38), transparent 24%),
        radial-gradient(circle at 24% 68%, rgba(49,87,70,0.30), transparent 28%),
        linear-gradient(135deg, #123027 0%, #244c3d 48%, #0d1f1b 100%);
    filter: blur(14px);
    opacity: .28;
    transform: scale(1.04);
    pointer-events: none;
}

.ent-login-page::after {
    content: "";
    position: fixed;
    inset: 50px 0 0;
    z-index: 0;
    background:
        linear-gradient(110deg, transparent 0 54%, rgba(255,255,255,0.20) 54% 55%, transparent 55%),
        repeating-linear-gradient(90deg, rgba(23,52,42,0.055) 0 1px, transparent 1px 84px);
    opacity: .45;
    pointer-events: none;
}

.ent-login-page .ent-global-header,
.ent-login-page .login-screen,
.ent-login-page .records-footer,
.ent-login-page .registration-notice-modal {
    position: relative;
    z-index: 1;
}

.ent-login-page .login-screen {
    min-height: calc(100svh - var(--ent-fixed-header-clearance, 74px) - 44px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 24px 22px;
}

.ent-login-page .records-footer {
    width: min(390px, 100%);
    margin-top: 0;
    margin-left: auto;
    margin-right: auto;
    padding: 0 0 18px;
    border-top: 0;
    color: #66736e;
}

.ent-login-page .records-footer p {
    margin: 0;
}

.login-box {
    width: min(390px, 100%);
    padding: 32px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(216, 226, 220, 0.96);
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(20, 39, 34, 0.14);
    backdrop-filter: blur(12px);
}

.login-box h1 {
    margin: 0 0 8px;
    color: #16352d;
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: 0;
    text-align: center;
}

.login-box .subtitle {
    margin: 0 0 28px;
    color: #61716c;
    font-size: 14px;
    text-align: center;
}

.login-box label {
    display: block;
    margin-bottom: 6px;
    color: #16352d;
    font-size: 13px;
    font-weight: 700;
}

.login-box input[type="text"],
.login-box input[type="email"],
.login-box input[type="password"] {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #cbd7d1;
    border-radius: 8px;
    background: #ffffff;
    font-size: 15px;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.login-box input:focus {
    outline: none;
    border-color: #74ac00;
    box-shadow: 0 0 0 3px rgba(116, 172, 0, 0.16);
}

.login-box button,
.login-box .home-link {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    border: none;
    border-radius: 999px;
    background: #74ac00;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-box button:hover,
.login-box .home-link:hover {
    transform: translateY(-2px);
    background: #5f9000;
    box-shadow: 0 10px 24px rgba(116, 172, 0, 0.24);
}

.login-box .home-link {
    margin-top: 10px;
    background: transparent;
    color: #16352d;
    box-shadow: inset 0 0 0 1px #cbd7d1;
}

.register-box {
    width: min(520px, 100%);
}

.register-box input {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    border: 2px solid var(--border-control);
    border-radius: 10px;
    background: #fffdf7;
    font-size: 15px;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.register-box .register-note {
    margin: 14px 0 0;
    color: #61716c;
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
}

.register-dev-link {
    margin: 10px 0 14px;
    padding: 10px 12px;
    border: 1px solid rgba(21, 87, 36, 0.20);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.55);
    color: #155724;
    font-size: 12px;
    line-height: 1.35;
}

.register-dev-link a {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ent-users-admin-page .inline-action-form {
    margin-top: 8px;
}

.ent-users-admin-page .inline-action-form .btn {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}

.register-verify-box {
    width: min(460px, 100%);
}

@media (max-width: 520px) {
    .ent-login-page .login-screen {
        padding: 22px 16px 18px;
    }

    .login-box {
        align-self: center;
        padding: 28px 22px;
    }
}

/* Batch records: shared visit/place with separate records and no media. */
.ent-batch-records-shell { max-width: 1200px; margin: 0 auto; padding: 24px 20px 48px; }
.ent-batch-records-shell h1 { margin: 14px 0 8px; color: #243b30; }
.ent-batch-intro, .ent-batch-help { color: #52665b; }
.ent-batch-back { color: #176a43; font-weight: 700; text-decoration: none; }
.ent-batch-records-form fieldset { margin: 20px 0; padding: 20px; border: 1px solid #d6e1da; border-radius: 12px; background: #fff; }
.ent-batch-records-form legend { padding: 0 6px; color: #243b30; font-weight: 700; }
.ent-batch-records-form label { display: grid; gap: 6px; margin: 12px 0; color: #243b30; font-weight: 700; }
.ent-batch-records-form input, .ent-batch-records-form select, .ent-batch-records-form textarea { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #b8c9bd; border-radius: 7px; font: inherit; }
.ent-batch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ent-batch-species-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 8px 0; }
.ent-batch-locality-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.ent-batch-location-grid { align-items: start; }
.ent-batch-records-form .ent-batch-locality-status { grid-column: 1 / -1; margin: -2px 0 0; font-weight: 400; line-height: 1.35; }
.ent-batch-geo-editor { margin-top: 8px; }
.ent-batch-txt-label { margin-top: 20px !important; }
.ent-batch-result { margin: 20px 0; padding: 18px; border: 1px solid #8fc8a5; border-radius: 12px; background: #edf9f0; }
.ent-batch-taxonomy-review { margin: 20px 0; padding: 18px; border: 2px solid #d99132; border-radius: 12px; background: #fff8e8; }
.ent-batch-taxonomy-review h2 { margin: 0 0 8px; color: #6b3f08; }
.ent-batch-records-form .ent-batch-taxonomy-choice { margin: 14px 0 0; padding: 14px; border: 1px solid #e3bd7b; background: #fff; }
.ent-batch-taxonomy-choice label { display: flex; align-items: flex-start; gap: 9px; margin: 8px 0; font-weight: 500; }
.ent-batch-records-form .ent-batch-taxonomy-choice input[type="radio"] { width: auto; margin-top: 3px; padding: 0; flex: 0 0 auto; }
@media (max-width: 640px) { .ent-batch-records-shell { padding: 16px 8px 32px; } .ent-batch-grid { grid-template-columns: 1fr; } .ent-batch-records-form fieldset { padding: 14px; } .ent-batch-locality-row { grid-template-columns: 1fr; } }

/* C1 low-risk views */
.ent-logout-page,
.ent-gallery-page {
    min-height: 100svh;
    background: var(--surface-page);
    color: #2c3e50;
}

.ent-logout-page {
    padding: 40px 20px;
}

.ent-gallery-page {
    padding: 20px;
}

.ent-logout-page .wrap,
.ent-gallery-page .wrap {
    width: min(100%, var(--page-max, 1200px));
    margin: 0 auto;
}

.ent-logout-page .wrap {
    --page-max: 1200px;
    padding: 28px;
    border: 1px solid #d7dee5;
    border-radius: 10px;
    background: var(--surface-panel);
}

.ent-gallery-page .wrap {
    --page-max: 1320px;
}

.ent-logout-page h1,
.ent-gallery-page h1 {
    margin-top: 0;
}

.ent-logout-page .top-link,
.ent-gallery-page .topbar {
    margin-bottom: 12px;
    text-align: right;
}

.ent-gallery-page .topbar,
.ent-gallery-page .stats,
.ent-logout-page .actions,
.ent-logout-page .exp-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ent-gallery-page .topbar,
.ent-logout-page .actions,
.ent-logout-page .exp-form {
    justify-content: center;
}

.ent-gallery-page .topbar {
    justify-content: flex-end;
    margin-bottom: 8px;
}

.ent-logout-page .top-link a {
    color: #2c3e50;
    font-size: 13px;
    text-decoration: none;
}

.ent-logout-page .panel,
.ent-gallery-page .top,
.ent-gallery-page .card,
.ent-gallery-page .empty {
    background: var(--surface-panel);
    border: 1px solid #dce3e8;
}

.ent-logout-page .panel {
    padding: 22px;
    border-color: #dee2e6;
    border-radius: 8px;
    text-align: center;
}

.ent-gallery-page .top {
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.ent-gallery-page .top h1 {
    margin: 8px 0 0;
}

.ent-logout-page .btn,
.ent-gallery-page .btn-back,
.ent-gallery-page .btn-media {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.ent-logout-page .btn {
    padding: 12px 18px;
}

.ent-gallery-page .btn-back,
.ent-gallery-page .btn-media {
    padding: 8px 14px;
    font-size: 14px;
}

.ent-gallery-page .btn-back {
    background: #3498db;
}

.ent-gallery-page .btn-back:hover {
    background: #2980b9;
}

.ent-gallery-page .btn-media {
    background: #6c5ce7;
}

.ent-gallery-page .btn-media:hover {
    background: #5a4bcf;
}

.ent-logout-page .btn-main {
    min-width: 280px;
    background: #2c3e50;
}

.ent-logout-page .btn-main:hover {
    background: #1f2f3d;
}

.ent-logout-page .btn-red {
    min-width: 150px;
    background: #c0392b;
}

.ent-logout-page .btn-red:hover {
    background: #a93226;
}

.ent-logout-page .btn-dark {
    min-width: 190px;
    background: #111111;
}

.ent-logout-page .btn-dark:hover {
    background: #000000;
}

.ent-logout-page .btn-blue {
    min-width: 220px;
    background: #2980b9;
}

.ent-logout-page .btn-blue:hover {
    background: #21618c;
}

.ent-logout-page .btn-green {
    min-width: 220px;
    background: #27ae60;
}

.ent-logout-page .btn-green:hover {
    background: #229954;
}

.ent-logout-page .actions {
    margin-top: 18px;
}

.ent-logout-page .admin-box {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #dee2e6;
}

.ent-logout-page .exp-form {
    align-items: flex-end;
    margin-top: 12px;
}

.ent-logout-page .exp-field {
    min-width: min(320px, 100%);
    text-align: left;
}

.ent-logout-page .exp-field label {
    display: block;
    margin-bottom: 6px;
    color: #6c757d;
    font-size: 12px;
    font-weight: 700;
}

.ent-logout-page .exp-field input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    font-size: 14px;
}

.ent-logout-page .hint,
.ent-gallery-page .stats,
.ent-gallery-page .meta,
.ent-gallery-page .empty {
    color: #607080;
}

.ent-logout-page .hint {
    margin-top: 6px;
    font-size: 12px;
}

.ent-gallery-page .stats {
    margin-top: 10px;
    gap: 18px;
    font-size: 13px;
}

.ent-gallery-page .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.ent-gallery-page .card {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.ent-gallery-page .thumb-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    color: inherit;
    text-decoration: none;
}

.ent-gallery-page .thumb-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ent-gallery-page .code,
.ent-gallery-page .badge {
    position: absolute;
    top: 8px;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 11px;
}

.ent-gallery-page .code {
    left: 8px;
    background: rgba(0, 0, 0, 0.68);
    color: #ffffff;
}

.ent-gallery-page .badge {
    right: 8px;
    background: rgba(255, 193, 7, 0.94);
    color: #222222;
    font-weight: 700;
}

.ent-gallery-page .meta {
    padding: 12px;
    font-size: 13px;
}

.ent-gallery-page .species {
    margin-bottom: 6px;
    color: #1f2d3d;
    font-weight: 700;
}

.ent-gallery-page .species a,
.ent-gallery-page .record-link {
    text-decoration: none;
}

.ent-gallery-page .species a:hover,
.ent-gallery-page .record-link:hover {
    text-decoration: underline;
}

.ent-gallery-page .line {
    margin-bottom: 4px;
}

.ent-gallery-page .record-link {
    display: inline-block;
    margin-top: 8px;
    color: #1976d2;
    font-weight: 700;
}

.ent-gallery-page .empty {
    padding: 40px;
    border-radius: 12px;
    text-align: center;
}

.ent-gallery-page .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 22px 0 4px;
}

.ent-gallery-page .pagination a,
.ent-gallery-page .pagination span {
    padding: 8px 12px;
    border: 1px solid #d6dde2;
    border-radius: 6px;
    background: #ffffff;
    color: #263238;
    text-decoration: none;
}

.ent-gallery-page .pagination a:hover,
.ent-gallery-page .pagination .active {
    background: #1976d2;
    color: #ffffff;
    border-color: #1976d2;
}

@media (max-width: 640px) {
    .ent-logout-page,
    .ent-gallery-page {
        padding: 14px;
    }

    .ent-logout-page .wrap,
    .ent-gallery-page .top {
        padding: 18px;
    }

    .ent-logout-page .btn,
    .ent-gallery-page .btn-back,
    .ent-gallery-page .btn-media {
        width: 100%;
    }

    .ent-gallery-page .topbar,
    .ent-logout-page .actions,
    .ent-logout-page .exp-form {
        align-items: stretch;
        flex-direction: column;
    }
}
/* C2 low-risk views */
.ent-gallery-page .site {
    margin-bottom: 6px;
    color: #1f2d3d;
    font-weight: 700;
}

.ent-gallery-page .site a,
.ent-gallery-page .site-link {
    color: inherit;
    text-decoration: none;
}

.ent-gallery-page .site a:hover,
.ent-gallery-page .site-link:hover {
    text-decoration: underline;
}

.ent-gallery-page .site-link {
    display: inline-block;
    margin-top: 8px;
    color: #1976d2;
    font-weight: 700;
}

.ent-media-page {
    min-height: 100svh;
    padding: 20px;
    background: var(--surface-page);
    color: #263238;
}

.ent-media-page .wrap {
    width: min(100%, 1200px);
    margin: 0 auto;
}

.ent-media-page .top,
.ent-media-page .card,
.ent-media-page .empty {
    background: var(--surface-panel);
    border: 1px solid #dce3e8;
}

.ent-media-page .top {
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.ent-media-page .topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.ent-media-page .btn {
    display: inline-block;
    padding: 8px 12px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
}

.ent-media-page .btn-back {
    background: #eceff1;
    color: #263238;
}

.ent-media-page .btn-del {
    background: #c62828;
    color: #ffffff;
}

.ent-media-page .notice {
    margin-top: 10px;
}

.ent-media-page .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.ent-media-page .card {
    overflow: hidden;
    border-radius: 10px;
}

.ent-media-page .card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

body.ent-media-page .grid .card > img {
    height: 150px;
    max-height: none;
    object-fit: cover;
}

/* ENTOMONE records toolbar actions (2026-07-29) */
.ent-records-page .bulk-actions-open-btn {
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid #8c3f21 !important;
    border-radius: 7px;
    background: #a94f2a !important;
    color: #ffffff !important;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.ent-records-page .bulk-actions-open-btn:hover,
.ent-records-page .bulk-actions-open-btn:focus {
    background: #8c3f21 !important;
    border-color: #733018 !important;
    color: #ffffff !important;
}

.ent-records-page .bulk-delete-toolbar #bulkClearBtn {
    order: 90;
    margin-left: auto;
}

.ent-records-page .bulk-delete-toolbar #bulkSelectVisibleBtn {
    order: 91;
}

.records-bulk-actions-dialog__content {
    padding: 20px;
}

.records-bulk-actions-dialog__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.records-bulk-actions-dialog__grid button {
    width: 100%;
    min-height: 42px;
    margin: 0;
}

.ent-records-page .records-bulk-actions-dialog .records-bulk-edit-close {
    border: 1px solid #cbd5e1 !important;
    background: #e5e7eb !important;
    color: #374151 !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.ent-records-page .records-bulk-actions-dialog .records-bulk-edit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ent-records-page .records-bulk-actions-dialog .records-bulk-edit-close {
    flex: 0 0 auto;
    margin-left: auto;
}

.ent-records-page .records-bulk-actions-dialog__grid button:disabled {
    border: 1px solid #cbd5e1 !important;
    background: #e5e7eb !important;
    color: #374151 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.ent-records-page .records-bulk-actions-dialog__grid .bulk-edit-open-btn {
    border: 1px solid #cbd5e1 !important;
    background: #e5e7eb !important;
    color: #374151 !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.ent-records-page .records-bulk-edit-search {
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    margin: 6px 0 8px;
    padding: 8px 10px;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    background: #ffffff;
    color: #172033;
    font: inherit;
}

/* Compact the logo only on the sign-in screen. */
body.ent-login-page .login-screen .ent-auth-logo {
    display: block;
    width: 75%;
    margin: 0 auto 8px;
}
.ent-media-page .meta {
    padding: 10px;
    color: #455a64;
    font-size: 12px;
}

.ent-media-page .meta div {
    margin-bottom: 4px;
}

.ent-media-page .pick {
    display: block;
    padding: 8px 10px;
    border-bottom: 1px solid #eceff1;
}

.ent-media-page .empty {
    padding: 30px;
    border-radius: 10px;
    color: #607d8b;
    text-align: center;
}

.ent-invite-page {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: #f5f7fa;
    color: #2c3e50;
}

.ent-invite-page .container {
    width: min(100%, 520px);
    flex: 1;
    margin: 60px auto;
    padding: 0 16px;
}

.ent-invite-page .card {
    padding: 32px 36px;
    border-radius: 8px;
    background: var(--surface-panel);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.ent-invite-page .brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.ent-invite-page .brand-mark {
    padding: 3px 8px;
    border-radius: 4px;
    background: #1f4f82;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.ent-invite-page .brand-title {
    color: #1f4f82;
    font-size: 18px;
    font-weight: 700;
}

.ent-invite-page h2 {
    margin: 0 0 16px;
    color: #1f4f82;
    font-size: 20px;
}

.ent-invite-page p {
    margin: 0 0 12px;
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.6;
}

.ent-invite-page .alert,
.ent-invite-page .app-alert {
    margin: 16px 0;
    padding: 12px 16px;
    border-radius: 5px;
    font-size: 14px;
    text-align: left;
}

.ent-invite-page .alert-success {
    color: var(--status-success-text);
    background: var(--status-success-bg);
    border: 1px solid var(--status-success-border);
}

.ent-invite-page .alert-danger {
    color: var(--status-danger-text);
    background: var(--status-danger-bg);
    border: 1px solid var(--status-danger-border);
}

.ent-invite-page .alert-info {
    color: var(--status-info-text);
    background: var(--status-info-bg);
    border: 1px solid var(--status-info-border);
}

.ent-invite-page .alert-warning {
    color: var(--status-warning-text);
    background: var(--status-warning-bg);
    border: 1px solid #ffc107;
}

.ent-invite-page .btn {
    display: inline-block;
    padding: 9px 22px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.ent-invite-page .btn-primary {
    background: #1f4f82;
    color: #ffffff;
}

.ent-invite-page .btn-primary:hover {
    background: #174070;
}

.ent-invite-page .btn-secondary {
    border: 1px solid #bdc3c7;
    background: #ecf0f1;
    color: #2c3e50;
}

.ent-invite-page .btn-secondary:hover {
    background: #dce3ee;
}

.ent-invite-page .ds-info {
    margin: 16px 0;
    padding: 12px 16px;
    border: 1px solid #d6e6f8;
    border-radius: 6px;
    background: #f0f4fb;
    font-size: 13px;
}

.ent-invite-page .ds-info strong {
    display: block;
    margin-bottom: 4px;
    color: #1f4f82;
    font-size: 15px;
}

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

    .ent-media-page .top {
        padding: 18px;
    }

    .ent-media-page .topbar,
    .ent-invite-page .card > div[style*="display:flex"] {
        align-items: stretch;
        flex-direction: column;
    }

    .ent-media-page .btn,
    .ent-invite-page .btn {
        width: 100%;
        text-align: center;
    }

    .ent-invite-page .container {
        margin: 24px auto;
    }

    .ent-invite-page .card {
        padding: 24px 20px;
    }
}
/* C3 table and report views */
.ent-table-page {
    min-height: 100svh;
    padding: 20px;
    background: var(--surface-page);
    color: #333333;
}

.ent-table-page .container {
    width: min(100%, 1200px);
    margin: 0 auto;
    padding: 30px;
    border-radius: 8px;
    background: var(--surface-panel);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.ent-trash-page .container {
    max-width: 1180px;
    border-radius: 10px;
}

.ent-table-page .top,
.ent-table-page .topbar {
    display: flex;
    gap: 16px;
}

.ent-trash-page .top {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ent-filtered-page .topbar {
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.ent-filtered-page .filtered-species-topbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.ent-filtered-page .filtered-species-action {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.ent-filtered-page .filtered-species-action-primary {
    border: 1px solid #315746;
    background: #4f8c00;
    color: #fff;
}

.ent-filtered-page .filtered-species-action-secondary {
    border: 1px solid #b7c3bd;
    background: #fff;
    color: #24332c;
}

.ent-table-page h1 {
    margin: 0 0 8px;
    color: #2c3e50;
}

.ent-trash-page h1 {
    margin: 0;
}

.ent-table-page .subtitle,
.ent-table-page .muted {
    color: #607080;
}

.ent-table-page .subtitle {
    margin: 0 0 20px;
}

.ent-table-page .muted {
    font-size: 13px;
}

.ent-table-page .btn,
.ent-table-page .back-link,
.ent-report-page .btn-print {
    display: inline-block;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
}

.ent-table-page .btn {
    padding: 10px 14px;
}

.ent-table-page .btn-back {
    background: #3498db;
    color: #ffffff;
}

.ent-table-page .btn-back:hover {
    background: #2980b9;
}

.ent-table-page .btn-restore {
    background: #27ae60;
    color: #ffffff;
    padding: 7px 12px;
}

.ent-trash-page .trash-purge-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 14px;
}

.ent-trash-page .trash-select-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #34495e;
    font-size: 13px;
    font-weight: 700;
}

.ent-trash-page .btn-danger {
    padding: 8px 12px;
    background: #c0392b;
    color: #ffffff;
}

.ent-trash-page .btn-danger:hover,
.ent-trash-page .btn-danger:focus-visible {
    background: #a93226;
}

.ent-table-page .back-link,
.ent-table-page .records-link {
    color: #1f5fa9;
    font-weight: 700;
    text-decoration: none;
}

.ent-table-page .back-link {
    margin-bottom: 18px;
}

.ent-table-page .species-link {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    font-weight: 700;
    text-decoration: none;
}

.ent-table-page .alert,
.ent-table-page .no-results,
.ent-table-page .empty {
    border-radius: 6px;
}

.ent-table-page .alert {
    margin-bottom: 18px;
    padding: 14px;
}

.ent-table-page .alert-success {
    color: var(--status-success-text);
    background: var(--status-success-bg);
    border: 1px solid var(--status-success-border);
}

.ent-table-page .alert-danger {
    color: var(--status-danger-text);
    background: var(--status-danger-bg);
    border: 1px solid var(--status-danger-border);
}

.ent-table-page .empty {
    padding: 28px;
    background: #f8faf9;
    border: 1px dashed #cbd7d1;
    color: #667680;
    text-align: center;
}

.ent-table-page .stats {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 6px;
    background: #ecf0f1;
}

.ent-table-page .stat-item strong {
    display: block;
    color: #2c3e50;
    font-size: 18px;
}

.ent-table-page table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ent-table-page th,
.ent-table-page td {
    padding: 10px 8px;
    border-bottom: 1px solid #edf1f4;
    text-align: left;
    vertical-align: top;
}

.ent-filtered-page th,
.ent-filtered-page td {
    padding: 12px;
    border-bottom: 1px solid #dddddd;
}

.ent-table-page th {
    background: #eef4f2;
    color: #2c3e50;
}

.ent-filtered-page th {
    background: #f8f9fa;
}
/* ENTOMONE filtered species compact list (2026-07-09) */
.ent-filtered-page .filtered-species-search {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 8px;
    align-items: end;
    margin: 0 0 14px;
}

.ent-filtered-page .filtered-species-search-field {
    position: relative;
    min-width: 0;
}

.ent-filtered-page .filtered-species-search label {
    display: block;
    margin-bottom: 4px;
    color: #33423e;
    font-size: 12px;
    font-weight: 700;
}

.ent-filtered-page .filtered-species-search input {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
}

.ent-filtered-page .filtered-species-suggestions {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 30;
    max-height: 260px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    box-shadow: 0 10px 24px rgba(15, 47, 41, 0.16);
}

.ent-filtered-page .filtered-species-search-field.is-open .filtered-species-suggestions {
    display: block;
}

.ent-filtered-page .filtered-species-suggestion {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 0;
    border-bottom: 1px solid #eef2f1;
    background: #ffffff;
    color: #102a43;
    padding: 8px 10px;
    text-align: left;
    cursor: pointer;
}

.ent-filtered-page .filtered-species-suggestion:hover,
.ent-filtered-page .filtered-species-suggestion:focus {
    background: #eef7f5;
    outline: none;
}

.ent-filtered-page .filtered-species-suggestion span {
    font-weight: 700;
    font-size: 13px;
}

.ent-filtered-page .filtered-species-suggestion small {
    color: #66756f;
    font-size: 11px;
    white-space: nowrap;
}

.ent-filtered-page .filtered-species-suggestions-empty {
    display: none;
    padding: 10px;
    color: #66756f;
    font-size: 13px;
}

.ent-filtered-page .filtered-species-suggestions.is-empty .filtered-species-suggestions-empty {
    display: block;
}

.ent-species-gallery-page .btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 7px;
    background: #1976d2;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.ent-species-gallery-page .btn-back:hover,
.ent-species-gallery-page .btn-back:focus {
    background: #125ea8;
    color: #ffffff;
    outline: 3px solid rgba(25, 118, 210, 0.22);
    outline-offset: 2px;
}

.ent-filtered-page .filtered-species-search button,
.ent-filtered-page .filtered-species-search .btn-clear {
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.ent-filtered-page .filtered-species-search button {
    background: #1976d2;
    color: #ffffff;
}

.ent-filtered-page .filtered-species-search .btn-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eceff1;
    color: #263238;
}

.ent-filtered-page .filtered-species-list {
    border: 1px solid #dce7e3;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.ent-filtered-page .filtered-species-header,
.ent-filtered-page .filtered-species-row {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(88px, 0.35fr) minmax(120px, 0.9fr);
    gap: 14px;
}

.ent-filtered-page .filtered-species-header {
    padding: 8px 12px;
    border-bottom: 1px solid #dce7e3;
    background: #eef6f1;
    color: #315644;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.ent-filtered-page .filtered-species-row {
    align-items: baseline;
    padding: 9px 12px;
    border-bottom: 1px solid #edf1f4;
}

.ent-filtered-page .filtered-species-row:last-child {
    border-bottom: 0;
}

.ent-filtered-page .filtered-species-row:hover {
    background: #f8fbfa;
}

.ent-filtered-page .filtered-species-family {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 400;
    overflow-wrap: anywhere;
}
.ent-filtered-page .filtered-species-count { display: flex; align-items: baseline; gap: 5px; color: #2c3e50; white-space: nowrap; }
.ent-filtered-page .filtered-species-count span { font-size: 12px; color: #66736e; }
.ent-filtered-page .filtered-species-count strong { font-size: 15px; }

@media (max-width: 640px) {
    .ent-filtered-page .filtered-species-search {
        grid-template-columns: 1fr auto;
    }

    .ent-filtered-page .filtered-species-search-field {
        grid-column: 1 / -1;
    }

    .ent-filtered-page .filtered-species-list {
        border-radius: 7px;
    }

    .ent-filtered-page .filtered-species-header,
    .ent-filtered-page .filtered-species-row {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 8px;
    }

    .ent-filtered-page .filtered-species-header {
        padding: 7px 10px;
        font-size: 10px;
    }

    .ent-filtered-page .filtered-species-row {
        padding: 8px 10px;
    }

    .ent-filtered-page .filtered-species-family {
        font-size: 13px;
        color: #53616d;
        white-space: nowrap;
    }

    .ent-filtered-page .species-link {
        font-size: 13px;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }
}

.ent-table-page tr:hover {
    background: #fafafa;
}

.ent-table-page .no-results {
    padding: 20px;
    background: var(--status-warning-bg);
    border: 1px solid #f1c40f;
    color: #7d6608;
}

.ent-report-page {
    margin: 40px;
    background: #ffffff;
    color: #333333;
    line-height: 1.6;
}

.ent-report-page .header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #2c3e50;
    text-align: center;
}

.ent-report-page .header h1 {
    margin: 0;
    color: #2c3e50;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ent-report-page .header p {
    margin: 5px 0;
    color: #7f8c8d;
    font-weight: 700;
}

.ent-report-page .meta-info {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    background: #f9f9f9;
}

.ent-report-page .meta-item {
    font-size: 14px;
}

.ent-report-page .meta-item b {
    color: #2c3e50;
}

.ent-report-page table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
}

.ent-report-page th {
    padding: 12px 8px;
    border: 1px solid #34495e;
    background: #2c3e50;
    color: #ffffff;
    text-align: left;
}

.ent-report-page td {
    padding: 8px;
    border: 1px solid #dddddd;
    vertical-align: top;
}


.ent-report-page .col-id,
.ent-report-page table td:nth-child(1) {
    width: 54px;
}

.ent-report-page .col-date,
.ent-report-page table td:nth-child(2) {
    width: 86px;
}

.ent-report-page .report-species,
.ent-report-page table th:nth-child(3) {
    width: 18%;
}

.ent-report-page .report-locality,
.ent-report-page table th:nth-child(4) {
    width: 16%;
}

.ent-report-page .report-notes,
.ent-report-page table th:nth-child(10) {
    width: 14%;
}

.ent-report-page .report-notes {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.ent-report-page tr:nth-child(even) {
    background: #f2f2f2;
}

.ent-report-page .footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eeeeee;
    color: #95a5a6;
    font-size: 12px;
    text-align: center;
}

.ent-report-page .badge-n {
    color: #e74c3c;
    font-weight: 700;
}

.ent-report-page .badge-h {
    color: #2c3e50;
    font-weight: 400;
}

.ent-report-page .btn-print {
    padding: 10px 20px;
    border-radius: 5px;
    background: #3498db;
    color: #ffffff;
}

.ent-report-page .btn-print:hover {
    background: #2980b9;
}

@media (max-width: 780px) {
    .ent-table-page {
        padding: 14px;
    }

    .ent-table-page .container {
        padding: 18px;
    }

    .ent-trash-page .top,
    .ent-report-page .meta-info {
        align-items: stretch;
        flex-direction: column;
    }

    .ent-table-page table,
    .ent-table-page thead,
    .ent-table-page tbody,
    .ent-table-page th,
    .ent-table-page td,
    .ent-table-page tr {
        display: block;
    }

    .ent-table-page thead {
        display: none;
    }

    .ent-table-page tr {
        margin-bottom: 12px;
        border: 1px solid #edf1f4;
        border-radius: 8px;
        background: #ffffff;
    }

    .ent-table-page td {
        border-bottom: 1px solid #edf1f4;
    }

    .ent-report-page {
        margin: 20px;
    }
}

@media print {
    .ent-report-page {
        margin: 20px;
    }

    .ent-report-page .no-print {
        display: none;
    }

    .ent-report-page table {
        font-size: 11px;
    }

    .ent-report-page tr {
        page-break-inside: avoid;
    }
}

/* D0 medium-risk views */

/* record_change_dataset.php */
.ent-change-dataset-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #e0e5ec;
    margin: 0;
    padding: 20px;
    color: #2d3436;
}

.ent-change-dataset-page *,
.ent-change-dataset-page *::before,
.ent-change-dataset-page *::after {
    box-sizing: border-box;
}

.ent-change-dataset-page .container {
    max-width: 860px;
    margin: 30px auto;
    background: #fff;
    padding: 34px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-top: 5px solid #2c3e50;
}

.ent-change-dataset-page .header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 2px solid #eee;
    padding-bottom: 18px;
    margin-bottom: 24px;
}

.ent-change-dataset-page h1 {
    margin: 0;
    font-size: 26px;
    color: #2c3e50;
}

.ent-change-dataset-page .badge-id {
    display: inline-block;
    margin-top: 10px;
    background: #2c3e50;
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
}

.ent-change-dataset-page .btn-back,
.ent-change-dataset-page .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 5px;
    border: 0;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
}

.ent-change-dataset-page .btn-back {
    background: #34495e;
}

.ent-change-dataset-page .btn-back:hover {
    background: #2c3e50;
    transform: translateY(-2px);
}

.ent-change-dataset-page .btn-primary {
    background: #1f78d1;
}

.ent-change-dataset-page .btn-primary:hover {
    background: #1764ad;
    transform: translateY(-2px);
}

.ent-change-dataset-page .record-summary {
    background: #f8f9fa;
    border-left: 3px solid #3498db;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.ent-change-dataset-page .summary-row {
    margin-bottom: 10px;
}

.ent-change-dataset-page .summary-row:last-child {
    margin-bottom: 0;
}

.ent-change-dataset-page .label {
    display: block;
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.ent-change-dataset-page .value {
    font-size: 15px;
    font-weight: 600;
    color: #2d3436;
}

.ent-change-dataset-page .change-box {
    background: #f7fbff;
    border: 1px solid #d6e2f0;
    border-radius: 8px;
    padding: 18px;
}

.ent-change-dataset-page .change-box h2 {
    margin: 0 0 12px;
    font-size: 17px;
    color: #1f4f82;
}

.ent-change-dataset-page .change-box p {
    margin: 0 0 14px;
    font-size: 14px;
    color: #51606f;
    line-height: 1.45;
}

.ent-change-dataset-page .dataset-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.ent-change-dataset-page .dataset-form > div {
    flex: 1 1 280px;
    min-width: 0;
}

.ent-change-dataset-page .dataset-form label {
    display: block;
    font-size: 12px;
    color: #5d6d7e;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ent-change-dataset-page .dataset-form select {
    width: 100%;
    min-width: 280px;
    padding: 11px 12px;
    border: 1px solid #c5d3e0;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.ent-change-dataset-page .dataset-warning {
    margin-top: 12px;
    color: #8a5a1f;
    font-size: 13px;
}

.ent-change-dataset-page .alert-success,
.ent-change-dataset-page .alert-error,
.ent-change-dataset-page .alert-info {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.ent-change-dataset-page .alert-success {
    background: #e8f8ee;
    border: 1px solid #b7dfc5;
    color: #1f6f43;
}

.ent-change-dataset-page .alert-error {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    color: #8a1f2d;
}

.ent-change-dataset-page .alert-info {
    background: #eef6ff;
    border: 1px solid #cfe3fb;
    color: #1f4f82;
}

.ent-change-dataset-page .bottom-actions {
    position: static;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin-top: 22px;
}

@media (max-width: 640px) {
    .ent-change-dataset-page .container {
        padding: 24px;
    }

    .ent-change-dataset-page .header,
    .ent-change-dataset-page .dataset-form,
    .ent-change-dataset-page .bottom-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ent-change-dataset-page .dataset-form select,
    .ent-change-dataset-page .btn-back,
    .ent-change-dataset-page .btn-primary {
        width: 100%;
    }

    .ent-change-dataset-page .dataset-form select {
        min-width: 0;
    }
}

/* user_panel.php */
.ent-user-panel-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f8;
    margin: 0;
    padding: 20px;
    color: #2c3e50;
}

.ent-user-panel-page h1 {
    font-size: 22px;
    margin: 0 0 14px 0;
}

.ent-user-panel-page .page {
    max-width: 980px;
    margin: 0 auto;
}

.ent-user-panel-page .panel {
    background: #fff;
    border-radius: 8px;
    padding: 18px 22px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    width: 100%;
}

.ent-user-panel-page .alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 14px;
    width: 100%;
}

.ent-user-panel-page .alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ent-user-panel-page .alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ent-user-panel-page .alert.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.ent-user-panel-page dl {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 6px 12px;
    font-size: 14px;
    margin: 0;
}

.ent-user-panel-page dt {
    font-weight: bold;
    color: #555;
}

.ent-user-panel-page dd {
    margin: 0;
}

.ent-user-panel-page .status-pill {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.ent-user-panel-page .status-ok {
    background: #d4edda;
    color: #155724;
}

.ent-user-panel-page .status-warn {
    background: #fff3cd;
    color: #856404;
}

.ent-user-panel-page .status-error {
    background: #f8d7da;
    color: #721c24;
}

.ent-user-panel-page .btn {
    background: #27ae60;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    font-weight: 700;
}

.ent-user-panel-page .btn:hover,
.ent-user-panel-page .btn:focus {
    background: #1f8d4d;
    color: #fff;
}

.ent-user-panel-page .btn.danger {
    background: #e74c3c;
}

.ent-user-panel-page .btn.danger:hover,
.ent-user-panel-page .btn.danger:focus {
    background: #c0392b;
}

.ent-user-panel-page .btn-home {
    background: #3498db;
    color: #fff;
    padding: 8px 14px;
    border-radius: 5px;
    font-size: 14px;
}

.ent-user-panel-page .btn-home:hover {
    background: #2980b9;
}

.ent-user-panel-page label {
    font-weight: bold;
    font-size: 12px;
    display: block;
    margin: 10px 0 4px;
}

.ent-user-panel-page input[type="text"],
.ent-user-panel-page input[type="email"],
.ent-user-panel-page input[type="password"],
.ent-user-panel-page select,
.ent-user-panel-page textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #cfd8df;
    border-radius: 7px;
    font-size: 14px;
    background: #fff;
}

.ent-user-panel-page textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.45;
}

.ent-user-panel-page .topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.ent-user-panel-page .top-link {
    font-size: 13px;
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.ent-user-panel-page .hint {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.ent-user-panel-page .tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 16px 0;
    border-bottom: 1px solid #e5edf5;
    padding-bottom: 10px;
}

.ent-user-panel-page .tab {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 7px;
    background: #f3f6f8;
    color: #243447;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.ent-user-panel-page .tab:hover {
    background: #e7eef4;
}

.ent-user-panel-page .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.ent-user-panel-page .wide {
    grid-column: 1 / -1;
}

.ent-user-panel-page .profile-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.ent-user-panel-page .profile-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.ent-user-panel-page .profile-title {
    margin: 0 0 4px 0;
    font-size: 18px;
}

.ent-user-panel-page .profile-sub {
    color: #6b7280;
    font-size: 13px;
}

.ent-user-panel-page .language-select {
    font-family: inherit, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

.ent-user-panel-page .section-title {
    margin: 0 0 12px 0;
    font-size: 16px;
}

.ent-user-panel-page .user-panel-data-export-intro {
    margin: 0 0 14px;
    color: #5b6870;
}

.ent-user-panel-page .user-panel-data-export-row {
    padding: 16px 0;
    border-top: 1px solid #dce5e1;
}

.ent-user-panel-page .user-panel-data-export-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ent-user-panel-page .user-panel-data-export-row h3,
.ent-user-panel-page .user-panel-data-export-rules h3 {
    margin: 0;
    font-size: 15px;
}

.ent-user-panel-page .user-panel-data-export-row p {
    margin: 8px 0 12px;
    color: #52616a;
    line-height: 1.45;
}

.ent-user-panel-page .user-panel-export-form {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(210px, 2fr) auto;
    align-items: end;
    gap: 10px;
    margin: 0;
}

.ent-user-panel-page .user-panel-export-form label {
    grid-column: 1;
    margin: 0 0 4px;
}

.ent-user-panel-page .user-panel-export-form select {
    grid-column: 1 / 3;
    grid-row: 2;
    margin: 0;
}

.ent-user-panel-page .user-panel-export-form .btn {
    grid-column: 3;
    grid-row: 2;
    min-height: 39px;
    white-space: nowrap;
}

.ent-user-panel-page .btn:disabled {
    background: #aeb8b3;
    cursor: not-allowed;
    opacity: .8;
}

.ent-user-panel-page .user-panel-export-notice {
    display: grid;
    gap: 6px;
}

.ent-user-panel-page .user-panel-export-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.ent-user-panel-page .user-panel-export-download {
    background: #337fa3;
}

.ent-user-panel-page .user-panel-data-export-rules {
    padding-top: 14px;
    border-top: 1px solid #dce5e1;
}

.ent-user-panel-page .user-panel-data-export-rules ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

@media (max-width: 760px) {
    .ent-user-panel-page .form-grid,
    .ent-user-panel-page dl {
        grid-template-columns: 1fr;
    }

    .ent-user-panel-page .profile-head {
        flex-direction: column;
    }

    .ent-user-panel-page .user-panel-export-form {
        grid-template-columns: 1fr;
    }

    .ent-user-panel-page .user-panel-export-form label,
    .ent-user-panel-page .user-panel-export-form select,
    .ent-user-panel-page .user-panel-export-form .btn {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
    }

    .ent-user-panel-page .user-panel-data-export-row-head {
        align-items: flex-start;
    }
}

/* users_admin_add.php */
.ent-user-add-page {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    background: #f5f1e8;
    color: #243547;
}

.ent-user-add-page .page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px 40px 20px;
}

.ent-user-add-page .top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.ent-user-add-page .card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(36, 53, 71, 0.08);
    padding: 22px;
}

.ent-user-add-page .grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ent-user-add-page label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.ent-user-add-page input,
.ent-user-add-page select,
.ent-user-add-page textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d6dbe1;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
}

.ent-user-add-page textarea {
    min-height: 110px;
    resize: vertical;
}

.ent-user-add-page .muted {
    color: #667788;
    font-size: 14px;
}

.ent-user-add-page .msg {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
}

.ent-user-add-page .msg.ok {
    background: #e7f7ed;
    color: #215c34;
}

.ent-user-add-page .msg.err {
    background: #fdecec;
    color: #8a2f2f;
}

.ent-user-add-page .btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
}

.ent-user-add-page .btn-main {
    background: #2f455d;
    color: #fff;
}

.ent-user-add-page .btn-save {
    background: #d58a29;
    color: #fff;
    border: none;
    cursor: pointer;
}

.ent-user-add-page .full {
    grid-column: 1 / -1;
}

@media (max-width: 760px) {
    .ent-user-add-page .top {
        flex-direction: column;
    }

    .ent-user-add-page .grid {
        grid-template-columns: 1fr;
    }
}

/* D1 inline style attrs cleanup */
.ent-user-panel-page .account-settings-form {
    margin-top: 16px;
}

.ent-user-panel-page .inat-actions {
    margin-top: 16px;
}

.ent-user-panel-page .inat-disconnect-form {
    display: inline;
}

.ent-user-add-page .user-add-title {
    margin: 0 0 8px 0;
}

.ent-user-add-page .user-add-actions {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.ent-user-add-page .dataset-access-label {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 700;
}

.ent-user-add-page .dataset-access-checkbox {
    width: auto;
}
/* D2 users_admin.php */
.ent-users-admin-page {
    margin: 0;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7f6;
    color: #243447;
}

.ent-users-admin-page .page {
    max-width: 1320px;
    margin: 0 auto;
}

.ent-users-admin-page .top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.ent-users-admin-page .card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    padding: 20px;
    margin-bottom: 18px;
}

.ent-users-admin-page .msg {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.ent-users-admin-page .msg.ok {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.ent-users-admin-page .msg.err {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.ent-users-admin-page .btn {
    display: inline-block;
    text-decoration: none;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.ent-users-admin-page .btn-main {
    background: #2c3e50;
    color: #fff;
}

.ent-users-admin-page .btn-home {
    background: #3498db;
    color: #fff;
}

.ent-users-admin-page .btn-home:hover {
    background: #2980b9;
}

.ent-users-admin-page .btn-save {
    background: #1f8f55;
    color: #fff;
}

.ent-users-admin-page .muted {
    color: #6b7280;
    font-size: 13px;
}

.ent-users-admin-page table {
    width: 100%;
    border-collapse: collapse;
}

.ent-users-admin-page .users-admin-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ent-users-admin-page .users-admin-table-scroll table {
    min-width: 1080px;
}

.ent-users-admin-page th,
.ent-users-admin-page td {
    padding: 10px 8px;
    border-bottom: 1px solid #e8edf1;
    vertical-align: top;
    text-align: left;
    font-size: 14px;
}

.ent-users-admin-page th {
    background: #f8fafc;
}

.ent-users-admin-page .pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.ent-users-admin-page .pill.admin {
    background: #e8eefc;
    color: #1d4ed8;
}

.ent-users-admin-page .pill.user {
    background: #e6f7ef;
    color: #0f7a47;
}

.ent-users-admin-page .pill.viewer {
    background: #f3f4f6;
    color: #4b5563;
}

.ent-users-admin-page .pill.off {
    background: #fef2f2;
    color: #b91c1c;
}

.ent-users-admin-page .pill.pending {
    background: #fff7ed;
    color: #c2410c;
}

.final-register-link {
    display: inline-flex;
    margin-left: 14px;
    color: #17352d;
    border-bottom-color: rgba(23, 53, 45, 0.45);
}

.ent-users-admin-page .grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.ent-users-admin-page .layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, .9fr);
    gap: 18px;
    align-items: start;
}

.ent-users-admin-page label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 6px;
}

.ent-users-admin-page input[type="text"],
.ent-users-admin-page input[type="email"],
.ent-users-admin-page input[type="password"],
.ent-users-admin-page select,
.ent-users-admin-page textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #cfd8df;
    border-radius: 7px;
    font-size: 14px;
    background: #fff;
}

.ent-users-admin-page textarea {
    min-height: 96px;
    resize: vertical;
    line-height: 1.45;
}

.ent-users-admin-page .user-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.ent-users-admin-page .user-form .wide {
    grid-column: span 2;
}

.ent-users-admin-page .user-form .full {
    grid-column: 1 / -1;
}

.ent-users-admin-page .login-link {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 700;
}

.ent-users-admin-page .login-link:hover {
    text-decoration: underline;
}

.ent-users-admin-page .row-active {
    background: #f8fbff;
}

.ent-users-admin-page .stats-mini {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 16px;
}

.ent-users-admin-page .stats-mini .box {
    background: #f8fafc;
    border: 1px solid #e5edf5;
    border-radius: 10px;
    padding: 12px;
}

.ent-users-admin-page .stats-mini .num {
    font-size: 22px;
    font-weight: 800;
    color: #243447;
}

.ent-users-admin-page .stats-mini .lbl {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.ent-users-admin-page .detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.ent-users-admin-page .detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.ent-users-admin-page .detail-meta .item {
    background: #f8fafc;
    border: 1px solid #e5edf5;
    border-radius: 10px;
    padding: 12px;
}

.ent-users-admin-page .detail-meta .k {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 6px;
}

.ent-users-admin-page .detail-meta .v {
    font-size: 14px;
    color: #243447;
}

.ent-users-admin-page .tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 16px 0;
    border-bottom: 1px solid #e5edf5;
    padding-bottom: 10px;
}

.ent-users-admin-page .tab {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 7px;
    background: #f3f6f8;
    color: #243447;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.ent-users-admin-page .tab.active {
    background: #2c3e50;
    color: #fff;
}

.ent-users-admin-page .form-section {
    grid-column: 1 / -1;
    border-top: 1px solid #e5edf5;
    padding-top: 14px;
    margin-top: 4px;
}

.ent-users-admin-page .form-section h3 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #243447;
}

.ent-users-admin-page .danger-zone {
    margin-top: 18px;
    border: 1px solid #f3c4c4;
    border-radius: 8px;
    background: #fff7f7;
    overflow: hidden;
}

.ent-users-admin-page .danger-zone summary {
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 800;
    color: #9f1d1d;
}

.ent-users-admin-page .danger-zone-body {
    padding: 0 14px 14px 14px;
    color: #5f2930;
}

.ent-users-admin-page .btn-danger {
    background: #c0392b;
    color: #fff;
}

.ent-users-admin-page code {
    background: #f3f4f6;
    padding: 2px 5px;
    border-radius: 4px;
}

@media (max-width: 1100px) {
    .ent-users-admin-page .layout {
        grid-template-columns: 1fr;
    }

    .ent-users-admin-page .grid,
    .ent-users-admin-page .user-form,
    .ent-users-admin-page .detail-meta {
        grid-template-columns: 1fr 1fr;
    }

    .ent-users-admin-page .user-form .wide,
    .ent-users-admin-page .user-form .full {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .ent-users-admin-page .top {
        flex-direction: column;
        align-items: flex-start;
    }

    .ent-users-admin-page .grid,
    .ent-users-admin-page .user-form,
    .ent-users-admin-page .detail-meta {
        grid-template-columns: 1fr;
    }
}

/* D3 my_datasets.php */
.ent-my-datasets-page {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f5f7fa;
    margin: 0;
    color: #2c3e50;
}

.ent-my-datasets-page .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

.ent-my-datasets-page .app-header {
    background: #1f4f82;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.ent-my-datasets-page .brand-link {
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 18px;
}

.ent-my-datasets-page .brand-mark {
    background: #fff;
    color: #1f4f82;
    font-weight: 900;
    font-size: 18px;
    padding: 3px 8px;
    border-radius: 4px;
}

.ent-my-datasets-page .brand-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .5px;
}

.ent-my-datasets-page .brand-subtitle {
    font-size: 11px;
    opacity: .75;
    display: block;
}

.ent-my-datasets-page .header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.ent-my-datasets-page .nav-link {
    padding: 5px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.ent-my-datasets-page .nav-link.secondary {
    background: rgba(255, 255, 255, .15);
    color: #fff;
}

.ent-my-datasets-page .nav-link.logout {
    background: #e74c3c;
    color: #fff;
}

.ent-my-datasets-page .nav-link:hover {
    filter: brightness(.9);
}

.ent-my-datasets-page .nav-link.home-link {
    background: #3498db;
    color: #fff;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
}

.ent-my-datasets-page .nav-link.home-link:hover {
    background: #2980b9;
    filter: none;
}

.ent-my-datasets-page h1 {
    font-size: 22px;
    margin: 28px 0 6px;
    color: #1f4f82;
}

.ent-my-datasets-page h2 {
    font-size: 16px;
    margin: 24px 0 10px;
    color: #2c3e50;
    border-bottom: 1px solid #dce3ee;
    padding-bottom: 6px;
}

.ent-my-datasets-page .alert {
    padding: 10px 14px;
    border-radius: 5px;
    margin: 16px 0;
    font-size: 14px;
}

.ent-my-datasets-page .alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.ent-my-datasets-page .alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.ent-my-datasets-page .alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.ent-my-datasets-page table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 10px;
}

.ent-my-datasets-page th,
.ent-my-datasets-page td {
    padding: 9px 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.ent-my-datasets-page th {
    background: #f0f4fb;
    font-weight: 700;
    color: #2c3e50;
}

.ent-my-datasets-page tr:hover {
    background: #f9fbff;
}

.ent-my-datasets-page .badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.ent-my-datasets-page .badge-owner {
    background: #1f4f82;
    color: #fff;
}

.ent-my-datasets-page .badge-editor {
    background: #27ae60;
    color: #fff;
}

.ent-my-datasets-page .badge-viewer {
    background: #7f8c8d;
    color: #fff;
}

.ent-my-datasets-page .badge-system {
    background: #f39c12;
    color: #fff;
}

.ent-my-datasets-page .badge-default {
    background: #2980b9;
    color: #fff;
}

.ent-my-datasets-page .empty-state {
    text-align: center;
    padding: 32px;
    color: #7f8c8d;
    font-size: 14px;
}

.ent-my-datasets-page .form-box {
    background: #fff;
    border: 1px solid #d6e6f8;
    border-radius: 8px;
    padding: 20px 24px;
    margin-top: 16px;
}

.ent-my-datasets-page .form-box.edit-box {
    border-color: #c3a800;
    background: #fffef0;
}

.ent-my-datasets-page .form-box.invite-box {
    border-color: #27ae60;
    background: #f0fff4;
}

.ent-my-datasets-page .form-row {
    margin-bottom: 14px;
}

.ent-my-datasets-page .form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #2c3e50;
}

.ent-my-datasets-page .form-row input[type=text],
.ent-my-datasets-page .form-row input[type=email],
.ent-my-datasets-page .form-row select,
.ent-my-datasets-page .form-row textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #b0c4de;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    background: #f8faff;
}

.ent-my-datasets-page .form-row input:focus,
.ent-my-datasets-page .form-row select:focus,
.ent-my-datasets-page .form-row textarea:focus {
    outline: none;
    border-color: #1f4f82;
    background: #fff;
}

.ent-my-datasets-page .form-row textarea {
    resize: vertical;
    min-height: 60px;
}

.ent-my-datasets-page .form-row .hint {
    font-size: 11px;
    color: #7f8c8d;
    margin-top: 3px;
}

.ent-my-datasets-page .form-row.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ent-my-datasets-page .form-row.checkbox-row label {
    margin-bottom: 0;
    font-weight: 400;
}

.ent-my-datasets-page .btn {
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.ent-my-datasets-page .btn-primary {
    background: #1f4f82;
    color: #fff;
}

.ent-my-datasets-page .btn-primary:hover {
    background: #174070;
}

.ent-my-datasets-page .btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}

.ent-my-datasets-page .btn-default {
    background: #2980b9;
    color: #fff;
}

.ent-my-datasets-page .btn-default:hover {
    background: #1f6899;
}

.ent-my-datasets-page .btn-edit {
    background: #f39c12;
    color: #fff;
}

.ent-my-datasets-page .btn-edit:hover {
    background: #d68910;
}

.ent-my-datasets-page .btn-invite {
    background: #27ae60;
    color: #fff;
}

.ent-my-datasets-page .btn-invite:hover {
    background: #1e8449;
}

.ent-my-datasets-page .btn-revoke {
    background: #e74c3c;
    color: #fff;
}

.ent-my-datasets-page .btn-revoke:hover {
    background: #c0392b;
}

.ent-my-datasets-page .btn-cancel {
    background: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
}

.ent-my-datasets-page .btn-cancel:hover {
    background: #dce3ee;
}

.ent-my-datasets-page .viewer-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 5px;
    padding: 10px 14px;
    font-size: 13px;
    color: #856404;
    margin-top: 10px;
}

.ent-my-datasets-page .actions-cell {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.ent-my-datasets-page .section-title-sm {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px;
}

.ent-my-datasets-page .section-intro {
    font-size: 13px;
    color: #5d6d7e;
    margin: 0 0 14px;
    line-height: 1.6;
}

.ent-my-datasets-page .page-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0 10px;
}

.ent-my-datasets-page .summary-card {
    background: #eef4fb;
    border: 1px solid #d6e6f8;
    border-radius: 8px;
    padding: 12px 14px;
    min-width: 180px;
}

.ent-my-datasets-page .summary-card strong {
    display: block;
    font-size: 18px;
    color: #1f4f82;
    margin-bottom: 4px;
}

.ent-my-datasets-page .summary-card span {
    font-size: 12px;
    color: #5d6d7e;
}

.ent-my-datasets-page .invite-link-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin: 10px 0;
}

.ent-my-datasets-page .invite-link-box {
    flex: 1;
    background: #f8faff;
    border: 1px solid #b0c4de;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
}

.ent-my-datasets-page .copy-link-btn {
    background: #1f4f82;
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.ent-my-datasets-page .copy-link-btn:hover {
    background: #174070;
}

.ent-my-datasets-page .copy-link-btn.copied {
    background: #27ae60;
}

.ent-my-datasets-page .invite-status-accepted {
    color: #155724;
    font-size: 11px;
}

.ent-my-datasets-page .invite-status-revoked {
    color: #721c24;
    font-size: 11px;
}

.ent-my-datasets-page .invite-status-expired {
    color: #856404;
    font-size: 11px;
}

.ent-my-datasets-page .invite-status-active {
    color: #0c5460;
    font-size: 11px;
}

/* D3 cleanup my_datasets.php */
.ent-my-datasets-page .page-meta {
    font-size: 13px;
    color: #5d6d7e;
    margin: 0 0 12px;
}

.ent-my-datasets-page .create-actions {
    margin: 0 0 18px;
}

.ent-my-datasets-page .plain-action-link {
    text-decoration: none;
    display: inline-block;
}

.ent-my-datasets-page .muted-dash {
    color: #aaa;
}

.ent-my-datasets-page .muted-dash-small {
    font-size: 11px;
}

.ent-my-datasets-page .date-cell {
    white-space: nowrap;
    font-size: 12px;
    color: #7f8c8d;
}

.ent-my-datasets-page .default-dataset-note {
    font-size: 11px;
    color: #2980b9;
    font-style: italic;
}

.ent-my-datasets-page .system-note {
    font-size: 11px;
    color: #aaa;
}

.ent-my-datasets-page .inline-default-form {
    display: inline;
}

.ent-my-datasets-page .invite-title {
    color: #155724;
}

/* D3 cleanup my_datasets.php extended */
.ent-my-datasets-page tr.is-row-active {
    background: #fffde7;
}

.ent-my-datasets-page .required-mark {
    color: #e74c3c;
}

.ent-my-datasets-page .form-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.ent-my-datasets-page .section-stack {
    margin-top: 16px;
}

.ent-my-datasets-page .empty-inline-note {
    font-size: 13px;
    color: #7f8c8d;
}

.ent-my-datasets-page .invite-empty-note {
    margin-top: 12px;
}

.ent-my-datasets-page .member-display-name {
    font-size: 11px;
    color: #7f8c8d;
}

.ent-my-datasets-page .member-no-note {
    color: #7f8c8d;
}

.ent-my-datasets-page .member-role-form {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.ent-my-datasets-page .member-role-select {
    font-size: 11px;
    padding: 4px 6px;
    border: 1px solid #b0c4de;
    border-radius: 4px;
}

.ent-my-datasets-page .member-edit-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #2c3e50;
    white-space: nowrap;
}

.ent-my-datasets-page .invite-form-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.ent-my-datasets-page .invite-email-row {
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.ent-my-datasets-page .invite-role-row {
    margin: 0;
    width: 140px;
}

.ent-my-datasets-page .invite-submit-row {
    margin: 0;
}

.ent-my-datasets-page .btn-create-dataset {
    padding: 8px 20px;
    font-size: 13px;
}


/* D4 inat_publish.php */
.ent-inat-publish-page {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f8;
    margin: 0;
    padding: 20px;
    color: #2c3e50;
}

.ent-inat-publish-page *,
.ent-inat-publish-page *::before,
.ent-inat-publish-page *::after {
    box-sizing: border-box;
}

.ent-inat-publish-page h1 {
    font-size: 22px;
}

.ent-inat-publish-page .top-link {
    font-size: 13px;
}

.ent-inat-publish-page .alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 14px;
}

.ent-inat-publish-page .alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ent-inat-publish-page .alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ent-inat-publish-page .alert.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.ent-inat-publish-page .panel {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ent-inat-publish-page .status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

.ent-inat-publish-page .status-ok {
    background: #d4edda;
    color: #155724;
}

.ent-inat-publish-page .status-warn {
    background: #fff3cd;
    color: #856404;
}

.ent-inat-publish-page .status-error {
    background: #f8d7da;
    color: #721c24;
}

.ent-inat-publish-page .status-published {
    background: #cce5ff;
    color: #004085;
}

.ent-inat-publish-page .lock-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    background: #e2e3e5;
    color: #383d41;
}

.ent-inat-publish-page .btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    display: inline-block;
}

.ent-inat-publish-page .btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.ent-inat-publish-page .inat-connect-link {
    margin-left: 10px;
}

.ent-inat-publish-page table {
    border-collapse: collapse;
    width: 100%;
    font-size: 12.5px;
    background: #fff;
}

.ent-inat-publish-page th,
.ent-inat-publish-page td {
    border: 1px solid #e0e0e0;
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
}

.ent-inat-publish-page th {
    background: #f0f2f5;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.ent-inat-publish-page tr:nth-child(even) {
    background: #fafbfc;
}

.ent-inat-publish-page .reasons {
    color: #a94442;
    font-size: 11.5px;
}

.ent-inat-publish-page .warnings {
    color: #8a6d3b;
    font-size: 11.5px;
}

.ent-inat-publish-page .filters label {
    font-weight: bold;
    font-size: 12px;
    display: block;
    margin-bottom: 3px;
}

.ent-inat-publish-page .filters select,
.ent-inat-publish-page .filters input {
    padding: 6px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.ent-inat-publish-page .filters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: end;
}

.ent-inat-publish-page .filter-checkbox-label {
    font-weight: normal;
}

.ent-inat-publish-page .muted {
    color: #888;
    font-size: 12px;
}

.ent-inat-publish-page a.inat-link {
    color: #74ac00;
    font-weight: bold;
}


/* D5 inat_search.php */
.ent-inat-search-denied {
    font-family: sans-serif;
    padding: 40px;
}

.ent-inat-search-page {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f8;
    margin: 0;
    padding: 20px;
    color: #2c3e50;
}

.ent-inat-search-page *,
.ent-inat-search-page *::before,
.ent-inat-search-page *::after {
    box-sizing: border-box;
}

.ent-inat-search-page h1 {
    font-size: 22px;
}

.ent-inat-search-page .badge-admin {
    display: inline-block;
    background: #764ba2;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

.ent-inat-search-page .panel {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ent-inat-search-page .alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 14px;
}

.ent-inat-search-page .alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ent-inat-search-page .alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ent-inat-search-page .alert.warn {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.ent-inat-search-page label {
    font-weight: bold;
    font-size: 12px;
    display: block;
    margin-bottom: 4px;
}

.ent-inat-search-page input,
.ent-inat-search-page select {
    padding: 7px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 13px;
    width: 100%;
}

.ent-inat-search-page .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 12px;
}

.ent-inat-search-page button,
.ent-inat-search-page .btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    display: inline-block;
}

.ent-inat-search-page button.secondary,
.ent-inat-search-page .btn.secondary {
    background: #95a5a6;
}

.ent-inat-search-page button.danger,
.ent-inat-search-page .btn.danger {
    background: #e74c3c;
}

.ent-inat-search-page table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ent-inat-search-page th,
.ent-inat-search-page td {
    padding: 6px 8px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.ent-inat-search-page th {
    background: #f0f2f5;
}

.ent-inat-search-page .status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.ent-inat-search-page .status-ready_to_import {
    background: #d4edda;
    color: #155724;
}

.ent-inat-search-page .status-duplicate_existing {
    background: #e2e3e5;
    color: #383d41;
}

.ent-inat-search-page .status-missing_taxon_match {
    background: #fff3cd;
    color: #856404;
}

.ent-inat-search-page .status-imported {
    background: #cce5ff;
    color: #004085;
}

.ent-inat-search-page .top-link {
    font-size: 13px;
}

.ent-inat-search-page .batch-list a {
    display: block;
    padding: 4px 0;
    font-size: 13px;
}

.ent-inat-search-page .page-intro {
    font-size: 13px;
    color: #666;
}

.ent-inat-search-page .panel-title {
    font-size: 16px;
    margin-top: 0;
}

.ent-inat-search-page .muted-note {
    font-size: 13px;
    color: #888;
}

.ent-inat-search-page .hidden-form {
    display: none;
}


/* D6 records.php */
.ent-records-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7f6;
    margin: 0;
    padding: 20px;
    color: #333;
}

.ent-records-page *,
.ent-records-page *::before,
.ent-records-page *::after {
    box-sizing: border-box;
}

.ent-records-page .container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.ent-records-page h1,
.ent-records-page h2 {
    color: #2c3e50;
}

.ent-records-page .alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.ent-records-page .alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ent-records-page .alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ent-records-page label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e50;
    font-size: 14px;
}

.ent-records-page input[type="date"],
.ent-records-page input[type="number"],
.ent-records-page select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.ent-records-page .row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.ent-records-page .col {
    flex: 1;
    min-width: 200px;
}

.ent-records-page .filter-site-col {
    flex: 1.5;
    min-width: 320px;
}

.ent-records-page .filter-site-col select,
.ent-records-page .filter-site-col .select2-container--default .select2-selection--single,
.ent-records-page .filter-site-col .select2-container--default .select2-selection--single .select2-selection__rendered,
.ent-records-page .filter-site-col .select2-results__option {
    font-size: 12px;
}

.ent-records-page button {
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
}

.ent-records-page button.btn-primary {
    background: #3498db;
}

.ent-records-page button.btn-primary:hover {
    background: #2980b9;
}

.ent-records-page button.btn-success {
    background: #27ae60;
}

.ent-records-page button.btn-success:hover {
    background: #229954;
}

.ent-records-page button.btn-secondary {
    background: #95a5a6;
}

.ent-records-page button.btn-secondary:hover {
    background: #7f8c8d;
}

.ent-records-page .button-group {
    display: flex;
    gap: 18px;
    margin-bottom: 20px;
}

.ent-records-page .button-group button {
    flex: 1;
}

.ent-records-page .app-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 18px;
}

.ent-records-page .brand-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: flex-start;
    gap: 12px;
}

.ent-records-page .brand-mark {
    font-size: 34px;
    line-height: 1;
}

.ent-records-page .brand-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ent-records-page .brand-title {
    font-size: 34px;
    line-height: 1.1;
    font-weight: 800;
    color: #23384f;
    display: block;
}

.ent-records-page .brand-subtitle {
    color: #66788a;
    font-size: 14px;
    display: block;
}

.ent-records-page .header-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.ent-records-page .header-user {
    font-size: 13px;
    color: #5f7284;
    font-weight: 700;
}

.ent-records-page .header-tools,
.ent-records-page .header-secondary {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ent-records-page .nav-section {
    margin: 14px 0 16px 0;
    border: 1px solid #dfe7ee;
    border-radius: 8px;
    background: #f8fafc;
    padding: 12px;
}

.ent-records-page .nav-section-title {
    font-size: 12px;
    font-weight: 800;
    color: #587086;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 8px;
}

.ent-records-page .nav-row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.ent-records-page .nav-row + .nav-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5edf3;
}

.ent-records-page .nav-link {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
}

.ent-records-page .nav-link.primary { background: #1f78d1; }
.ent-records-page .nav-link.secondary { background: #2c3e50; }
.ent-records-page .nav-link.dataset { background: #d9822b; }
.ent-records-page .nav-link.inat { background: #0f766e; }
.ent-records-page .nav-link.admin { background: #6b7280; }
.ent-records-page .nav-link.action { background: #27ae60; }
.ent-records-page .nav-link.logout { background: #111; padding: 8px 12px; font-size: 13px; }
.ent-records-page .nav-link:hover { filter: brightness(.92); }

.ent-records-page table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 13px;
}

.ent-records-page .records-table {
    table-layout: fixed;
}

.ent-records-page th,
.ent-records-page td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    min-width: 0;
    overflow-wrap: anywhere;
}

.ent-records-page th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
}

.ent-records-page th a {
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.ent-records-page th a:hover {
    color: #3498db;
    text-decoration: underline;
}

.ent-records-page tr:hover {
    background-color: #f9f9f9;
}

.ent-records-page .stats {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    gap: 30px;
}

.ent-records-page .stat-item strong {
    color: #2c3e50;
    display: block;
    font-size: 18px;
}

.ent-records-page .stat-item a {
    color: inherit;
    text-decoration: none;
}

.ent-records-page .stat-item a:hover {
    text-decoration: underline;
}

.ent-records-page .stat-meta-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    color: #1f5fa9;
    font-weight: 700;
}

.ent-records-page .filter-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.ent-records-page .no-results {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.ent-records-page .form-divider {
    border-top: 2px solid #ecf0f1;
    padding-top: 20px;
    margin-top: 20px;
}

.ent-records-page .pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 20px 0;
    position: relative;
}

.ent-records-page .records-pagination-links {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.ent-records-page .records-per-page-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
    color: #2c3e50;
    font-size: 14px;
    white-space: nowrap;
}

.ent-records-page .records-per-page-form select {
    box-sizing: border-box;
    flex: 0 0 56px;
    width: 56px;
    min-width: 56px;
    padding: 5px 20px 5px 6px;
    border: 1px solid #d7dee5;
    border-radius: 4px;
    background: #fff;
    color: #2c3e50;
    font-size: 14px;
}

.ent-records-page .pagination a,
.ent-records-page .pagination span {
    padding: 6px 9px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #2c3e50;
    font-size: 14px;
}

.ent-records-page .pagination a:hover {
    background: #3498db;
    color: #fff;
}

.ent-records-page .pagination .active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.ent-records-page .pagination .disabled {
    color: #999;
    cursor: not-allowed;
}

.ent-records-page .btn-delete {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 16px;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1;
}

.ent-records-page .btn-delete:hover {
    opacity: 0.7;
}

.ent-records-page .actions-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 56px;
    white-space: nowrap;
}


/* D6 records.php inline cleanup */
.ent-records-page .active-dataset-row {
    margin: 6px 0 10px 0;
}

.ent-records-page .active-dataset-label {
    font-size: 13px;
    color: #5d6d7e;
}

.ent-records-page .change-dataset-link {
    margin-left: 10px;
    font-size: 13px;
    color: #1f4f82;
    text-decoration: none;
    font-weight: 700;
}

.ent-records-page .dataset-switcher-box {
    margin: 8px 0 16px 0;
    background: #eef4fb;
    border: 1px solid #d6e6f8;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 560px;
    flex-wrap: wrap;
}

.ent-records-page .dataset-switcher-label {
    font-size: 13px;
    color: #2c3e50;
}

.ent-records-page .dataset-switcher-form,
.ent-records-page .dataset-default-form {
    margin: 0;
}

.ent-records-page .dataset-switcher-select {
    padding: 6px 10px;
    border-radius: 6px;
}

.ent-records-page .dataset-default-button {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #c7d8ee;
    background: #fff;
    color: #1f4f82;
    font-weight: 700;
    cursor: pointer;
}

.ent-records-page .dataset-missing-note {
    font-size: 13px;
    color: #8a5a1f;
}

.ent-records-page .col-flex-1 { flex: 1; }
.ent-records-page .col-flex-2 { flex: 2; }

.ent-records-page .search-input {
    border: 2px solid #3498db;
}

.ent-records-page .records-live-search-row {
    margin-bottom: 12px;
}

.ent-records-page .records-live-search-input {
    width: 100%;
    min-height: 42px;
    border-radius: 6px;
}

.ent-records-page .records-live-search-note {
    margin-top: 6px;
    color: #66788a;
    font-size: 13px;
}

.ent-records-page .records-live-search-status {
    min-height: 18px;
    margin-top: 5px;
    color: #24435f;
    font-size: 13px;
    font-weight: 700;
}

.ent-records-page .records-taxonomy-matches {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #bdd7c7;
    border-radius: 8px;
    background: #f4fff8;
}

.ent-records-page .records-taxonomy-matches-title {
    color: #183f2a;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

.ent-records-page .records-taxonomy-matches-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ent-records-page .records-taxonomy-match {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid #b9d8c8;
    border-radius: 7px;
    background: #fff;
    color: #173b2a;
    text-decoration: none;
}

.ent-records-page .records-taxonomy-match:hover {
    border-color: #2bb673;
    background: #ecfff3;
}

.ent-records-page .records-taxonomy-match span,
.ent-records-page .records-taxonomy-matches-note {
    color: #607080;
    font-size: 12px;
}

.ent-records-page .records-taxonomy-matches-note {
    margin-top: 8px;
}

.ent-records-page .records-taxonomy-browser {
    margin: 12px 0 14px;
    padding: 12px;
    border: 1px solid #cfe0d6;
    border-radius: 8px;
    background: #fbfefd;
}

.ent-records-page .records-taxonomy-browser-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.ent-records-page .records-taxonomy-browser h3 {
    margin: 0 0 3px;
    color: #183f2a;
    font-size: 15px;
}

.ent-records-page .records-taxonomy-browser p {
    margin: 0;
    color: #607080;
    font-size: 12px;
    line-height: 1.4;
}

.ent-records-page .records-taxonomy-clear {
    flex: 0 0 auto;
    color: #1f6f47;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.ent-records-page .records-taxonomy-clear:hover {
    text-decoration: underline;
}

.ent-records-page .records-taxonomy-path,
.ent-records-page .records-taxonomy-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.ent-records-page .records-taxonomy-path {
    margin-bottom: 10px;
}

.ent-records-page .records-taxonomy-sep {
    color: #87948e;
    font-weight: 800;
}

.ent-records-page .records-taxonomy-chip,
.ent-records-page .records-taxonomy-node {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 6px 9px;
    border: 1px solid #d6e4dc;
    border-radius: 6px;
    background: #ffffff;
    color: #1f332c;
    text-decoration: none;
    font-size: 12px;
    line-height: 1.2;
}

.ent-records-page .records-taxonomy-node {
    flex-direction: column;
    align-items: flex-start;
    min-width: 138px;
}

.ent-records-page .records-taxonomy-chip span,
.ent-records-page .records-taxonomy-node span {
    color: #6c7c74;
    font-size: 11px;
    font-weight: 600;
}

.ent-records-page .records-taxonomy-chip:hover,
.ent-records-page .records-taxonomy-node:hover {
    border-color: #2bb673;
    background: #ecfff3;
    text-decoration: none;
}

.ent-records-page .records-taxonomy-chip.is-current {
    border-color: #1f8d4d;
    background: #e6f7ed;
    font-weight: 800;
}

.ent-records-page .records-taxonomy-group {
    margin-top: 10px;
}

.ent-records-page .records-taxonomy-group-title {
    margin-bottom: 7px;
    color: #24435f;
    font-size: 12px;
    font-weight: 800;
}

.ent-records-page .records-taxonomy-empty {
    color: #607080;
    font-size: 12px;
    font-style: italic;
}

.ent-records-page .species-summary-row {
    margin: -4px 0 14px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ent-records-page .species-summary-card {
    background: #eef4fb;
    border: 1px solid #d6e6f8;
    color: #2c3e50;
    border-radius: 6px;
    padding: 10px 14px;
}

.ent-records-page .species-summary-link {
    display: inline-block;
    background: #1f78d1;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 6px;
    padding: 10px 14px;
}

.ent-records-page .active-filter-tag {
    font-size: 0.6em;
    background: #f1c40f;
    color: #2c3e50;
    padding: 4px 8px;
    border-radius: 4px;
    vertical-align: middle;
    font-weight: bold;
    margin-left: 10px;
    border: 1px solid #d4ac0d;
}

.ent-records-page .results-heading-row {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    gap: 12px;
    margin-bottom: 10px;
}

.ent-records-page .results-heading {
    margin: 0;
}

.ent-records-page .records-dataset-switcher-top {
    display: block;
    max-width: 430px;
    margin: 8px 0 16px;
    padding: 12px 16px 14px;
    border: 2px solid #58778f;
    border-radius: 10px;
    background: #fff;
    text-align: center;
}

.ent-records-page .records-dataset-switcher-top .dataset-switcher-label {
    display: block;
    color: #31495e;
    font-size: 13px;
    font-weight: 700;
}

.ent-records-page .records-active-dataset-link {
    display: inline-block;
    margin-top: 2px;
    color: #247b56;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.ent-records-page .records-active-dataset-link:hover,
.ent-records-page .records-active-dataset-link:focus-visible {
    color: #176442;
    text-decoration: underline;
}

.ent-records-page .records-csv-export-form {
    display: flex;
    flex-flow: row nowrap !important;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 456px;
    flex: 1 1 456px;
    margin: 0 0 0 auto;
}

.ent-records-page .records-csv-filename-label {
    margin: 0;
    color: #25342f;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.ent-records-page .records-csv-export-bottom {
    display: flex;
    justify-content: flex-end;
    margin: 18px 0 10px;
    padding-top: 12px;
    border-top: 1px solid #dbe4e0;
}

.ent-records-page .records-csv-filename {
    flex: 1 1 240px;
    width: auto;
    max-width: 240px;
    min-width: 0;
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid #aebdc4;
    border-radius: 6px;
    background: #fff;
    color: #25342f;
    font-size: 13px;
}

.ent-records-page .results-edit-filters {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid #63a800;
    border-radius: 8px;
    background: #6cab00;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.ent-records-page .results-edit-filters:hover,
.ent-records-page .results-edit-filters:focus { border-color: #315746; background: #4f8c00; color: #fff; }

/* Ostatnie rekordy: nadrzedna akcja nad lista, poza wierszem paginacji. */
.ent-records-page .records-results-top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.ent-records-page .records-results-top-actions .records-recent-gallery-link {
    background: #278457;
    border-color: #1d6945;
}

.ent-records-page .records-results-top-actions .records-recent-gallery-link:hover,
.ent-records-page .records-results-top-actions .records-recent-gallery-link:focus-visible {
    background: #1d6945;
    border-color: #155238;
}

@media (max-width: 900px) {
    .ent-records-page .records-results-top-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 10px;
    }

    .ent-records-page .records-results-top-actions .results-edit-filters {
        width: 100%;
        min-width: 0;
    }
}

.ent-records-page .results-clear-filters {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid #b7c3bd;
    border-radius: 8px;
    background: #fff;
    color: #24332c;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.ent-records-page .results-clear-filters:hover,
.ent-records-page .results-clear-filters:focus { border-color: #315746; background: #edf6f0; color: #173f32; }

.ent-records-page .ent-active-region-clear-form {
    display: inline-flex;
    margin: 0;
}

.ent-records-page .ent-active-region-clear-form button {
    border: 0;
    background: transparent;
    color: #8b2b25;
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
}

.ent-records-page .results-export-csv {
    flex: 0 0 auto;
    min-width: 160px;
    border-color: #2d6f8e;
    background: #337fa3;
    cursor: pointer;
}

.ent-records-page .results-export-csv:hover,
.ent-records-page .results-export-csv:focus {
    border-color: #214f66;
    background: #286681;
}

.ent-records-page .results-export-csv:disabled,
.ent-records-page .results-export-csv:disabled:hover,
.ent-records-page .results-export-csv:disabled:focus {
    cursor: not-allowed;
    opacity: .5;
    border-color: #9aa9b1;
    background: #9aa9b1;
}

.ent-records-page .record-id-link {
    display: inline-block;
    padding: 2px 6px;
    background: #2c3e50;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
}

.ent-records-page .record-date-link {
    color: #2c3e50;
    text-decoration: none;
    border-bottom: 1px dotted #ccc;
}

.ent-records-page .species-notes-panel {
    margin: 18px 0 22px;
    border: 1px solid #d8e3ee;
    border-radius: 10px;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f8fb 100%);
    box-shadow: 0 1px 3px rgba(31, 61, 88, 0.08);
    overflow: hidden;
}

.ent-records-page .species-notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #eaf2f9;
    border-bottom: 1px solid #d8e3ee;
}

.ent-records-page .species-notes-header h3 {
    margin: 0;
    color: #24384c;
    font-size: 18px;
}

.ent-records-page .species-notes-header span {
    color: #5f7286;
    font-size: 13px;
    font-weight: 700;
}

.ent-records-page .species-notes-box {
    padding: 12px 16px;
    background: #fff;
}

.ent-records-page .species-note-line {
    padding: 7px 0;
    color: #24384c;
    line-height: 1.45;
    border-bottom: 1px solid #eef2f6;
}

.ent-records-page .species-note-line:last-child {
    border-bottom: 0;
}

.ent-records-page .species-note-date {
    color: #607589;
    font-weight: 700;
    white-space: nowrap;
}

.ent-records-page .species-note-id {
    display: inline-block;
    margin: 0 6px;
    color: #1f78d1;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.ent-records-page .species-note-id:hover {
    text-decoration: underline;
}

.ent-records-page .species-note-text {
    white-space: normal;
}

.ent-records-page .species-notes-empty {
    padding: 14px 16px;
    color: #6b7d8f;
    background: #fff;
}

.ent-records-page .record-species-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #3498db;
}

.ent-records-page .record-site-link {
    color: #e67e22;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dashed #e67e22;
}

.ent-records-page .record-plant-link {
    color: #27ae60;
    text-decoration: none;
    font-style: italic;
    border-bottom: 1px dashed #27ae60;
}

.ent-records-page .observer-badge {
    background: #eee;
    color: #333;
    font-size: 0.85em;
}

.ent-records-page .origin-nature {
    color: #e74c3c;
}

.ent-records-page .record-notes-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: #666;
}

.ent-records-page .record-edit-link {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
}

.ent-records-page .inline-delete-form {
    display: inline;
    margin: 0;
}

.ent-records-page .edit-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.ent-records-page .viewer-mode-notice {
    background: #fff3cd;
    color: #856404;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ffeeba;
    margin-top: 20px;
}

.records-footer {
    margin-top: 50px;
    padding: 20px 0;
    border-top: 1px solid #eee;
    text-align: center;
    color: #95a5a6;
    font-size: 13px;
}

.records-trash-link {
    margin: 36px 0 0;
    text-align: right;
}

.records-trash-link .records-trash-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid #47715f;
    border-radius: 6px;
    background: #f4faf6;
    color: #1f5f46;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
}

.records-trash-link .records-trash-button:hover,
.records-trash-link .records-trash-button:focus-visible {
    border-color: #1f5f46;
    background: #e0f0e7;
    color: #174735;
}

.records-trash-link .records-trash-button:focus-visible {
    outline: 2px solid #1f5f46;
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .records-trash-link .records-trash-button {
        width: 100%;
    }
}

.ent-records-page .delete-record-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17,24,39,.42);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ent-records-page .delete-record-modal-card {
    width: min(460px, 100%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0,0,0,.22);
    border: 1px solid #d9e1e7;
    overflow: hidden;
}

.ent-records-page .delete-record-modal-title {
    padding: 18px 20px 10px;
    font-size: 20px;
    font-weight: 700;
    color: #243447;
}

.ent-records-page .delete-record-modal-text {
    padding: 0 20px 18px;
    color: #4b5d6b;
    line-height: 1.45;
}

.ent-records-page .delete-record-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 18px;
    padding: 14px 20px 20px;
    background: #f8fafc;
    border-top: 1px solid #e6edf3;
}

.ent-records-page .delete-record-cancel-btn {
    background: #cbd5df;
    color: #22303d;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 8px;
}

.ent-records-page .delete-record-confirm-btn {
    background: #c0392b;
    color: #fff;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 8px;
}


/* D7 dictionaries.php */
.ent-dictionaries-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7f6;
    margin: 0;
    padding: 20px;
    color: #333;
}

.ent-dictionaries-page *,
.ent-dictionaries-page *::before,
.ent-dictionaries-page *::after {
    box-sizing: border-box;
}

.ent-dictionaries-page .container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.ent-dictionaries-page h1 {
    color: #2c3e50;
}

.ent-dictionaries-page .alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.ent-dictionaries-page .alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ent-dictionaries-page .alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ent-dictionaries-page .tabs {
    display: flex;
    border-bottom: 2px solid #ecf0f1;
    margin-bottom: 20px;
    gap: 5px;
}

.ent-dictionaries-page .tab-link {
    padding: 12px 25px;
    text-decoration: none;
    color: #7f8c8d;
    background: #f9f9f9;
    border-radius: 5px 5px 0 0;
    font-weight: bold;
    transition: 0.3s;
    border: 1px solid #eee;
    border-bottom: none;
}

.ent-dictionaries-page .tab-link:hover {
    background: #ecf0f1;
}

.ent-dictionaries-page .tab-link.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.ent-dictionaries-page table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.ent-dictionaries-page th,
.ent-dictionaries-page td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.ent-dictionaries-page th {
    background-color: #f8f9fa;
    color: #2c3e50;
}

.ent-dictionaries-page tr:hover {
    background-color: #fcfcfc;
}

.ent-dictionaries-page form.inline-edit {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    margin: 5px 0;
}

.ent-dictionaries-page .row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    align-items: flex-end;
}

.ent-dictionaries-page .col {
    flex: 1;
    min-width: 150px;
}

.ent-dictionaries-page label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 3px;
    color: #666;
}

.ent-dictionaries-page input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.ent-dictionaries-page button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    font-weight: bold;
}

.ent-dictionaries-page .btn-save { background: #27ae60; }
.ent-dictionaries-page .btn-edit { background: #3498db; }
.ent-dictionaries-page .btn-cancel { background: #95a5a6; }

.ent-dictionaries-page .nav-back {
    margin-bottom: 20px;
}

.ent-dictionaries-page .nav-back a {
    text-decoration: none;
    color: #3498db;
    font-weight: bold;
}

.ent-dictionaries-page .add-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #3498db;
    border-radius: 8px;
    background: #f0f7fd;
}

.ent-dictionaries-page .add-section h3 {
    margin-top: 0;
    color: #2980b9;
    font-size: 18px;
    margin-bottom: 15px;
}

.ent-dictionaries-page .field-group {
    display: flex;
    gap: 5px;
}

.ent-dictionaries-page .plus-btn {
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
    font-weight: bold;
    height: 35px;
    min-width: 35px;
}

.ent-dictionaries-page .plus-btn:hover {
    background: #2980b9;
}

.ent-dictionaries-page select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    height: 35px;
}

.ent-dictionaries-page .search-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ent-dictionaries-page .search-input {
    padding: 8px 12px;
    border: 1px solid #3498db;
    border-radius: 20px;
    width: 300px;
    outline: none;
    transition: 0.3s;
}

.ent-dictionaries-page .search-input:focus {
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.4);
    width: 350px;
}

.ent-dictionaries-page .search-icon {
    font-size: 18px;
    color: #3498db;
}

.ent-dictionaries-page .header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ent-dictionaries-page .section-note {
    color: #607080;
    font-size: 14px;
    margin: 6px 0 0 0;
}

.ent-dictionaries-page .plant-taxonomy-text {
    min-width: 240px;
}

.ent-dictionaries-page .plant-taxonomy-status {
    display: inline-block;
    margin-bottom: 4px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #d4edda;
    color: #155724;
    font-size: 12px;
    font-weight: 700;
}

.ent-dictionaries-page .plant-taxonomy-path {
    display: block;
    color: #405264;
    font-size: 12px;
    line-height: 1.45;
}

.ent-dictionaries-page .plant-taxonomy-pending {
    color: #6c757d;
    font-size: 12px;
}

.record-plant-taxonomy-path {
    margin-top: 6px;
    color: #405264;
    font-size: 12px;
    line-height: 1.45;
}

.ent-dictionaries-page .dict-link {
    color: #2c3e50;
    text-decoration: none;
    border-bottom: 1px dotted #ccc;
}

.ent-dictionaries-page .dict-link:hover {
    color: #3498db;
    border-bottom-style: solid;
    text-decoration: none;
}

.ent-dictionaries-page .dict-link-species {
    font-style: italic;
    font-weight: bold;
    border-bottom: 1px dashed #3498db;
}


/* D28 dictionaries.php taxonomy add workflow */
.ent-dictionaries-page .taxonomy-add-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr);
    gap: 16px;
    margin-bottom: 26px;
}

.ent-dictionaries-page .taxonomy-add-panel {
    border: 1px solid #cfdbe7;
    border-radius: 8px;
    background: #f8fbfe;
    padding: 16px;
}

.ent-dictionaries-page .taxonomy-add-species {
    grid-column: 1 / -1;
}

.ent-dictionaries-page .taxonomy-add-panel h3 {
    margin: 0 0 12px;
    color: #24384a;
    font-size: 17px;
}

.ent-dictionaries-page .taxonomy-form {
    display: grid;
    gap: 18px;
}

.ent-dictionaries-page .taxonomy-two-cols,
.ent-dictionaries-page .taxonomy-species-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ent-dictionaries-page .taxonomy-species-fields {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.2fr);
}

.ent-dictionaries-page .taxonomy-species-layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.9fr) minmax(380px, 1.5fr);
    gap: 16px;
    align-items: start;
}

.ent-dictionaries-page .taxonomy-existing-col,
.ent-dictionaries-page .taxonomy-new-col {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #d6e0ea;
    border-radius: 8px;
}

.ent-dictionaries-page .taxonomy-existing-col {
    background: #eef5fb;
}

.ent-dictionaries-page .taxonomy-new-col {
    background: #fff;
    border-color: #b9d8c8;
}

.ent-dictionaries-page .taxonomy-existing-col h4,
.ent-dictionaries-page .taxonomy-new-col h4 {
    margin: 0 0 2px;
    font-size: 14px;
    color: #24384a;
}

.ent-dictionaries-page .taxonomy-new-grid,
.ent-dictionaries-page .taxonomy-secondary-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ent-dictionaries-page .taxonomy-species-main-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.45fr) minmax(150px, 0.75fr);
    gap: 12px;
    align-items: end;
}

.ent-dictionaries-page .taxonomy-main-species-field {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.ent-dictionaries-page .taxonomy-main-species-field label {
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
}

.ent-dictionaries-page .taxonomy-main-species-field input {
    min-height: 42px;
    font-size: 16px;
    font-weight: 600;
    border-color: #cfd8e3;
}

.ent-dictionaries-page .taxonomy-subspecies-field input {
    min-height: 42px;
}

.ent-dictionaries-page .taxonomy-panel-header {
    align-items: flex-start;
    gap: 14px;
}

.ent-dictionaries-page .taxonomy-panel-header .search-input {
    width: min(340px, 100%);
}

.ent-dictionaries-page .taxonomy-panel-header .search-input:focus {
    width: min(380px, 100%);
}

.ent-dictionaries-page .taxonomy-form .select2-container {
    max-width: 100%;
}

@media (max-width: 760px) {
    .ent-dictionaries-page .taxonomy-add-grid,
    .ent-dictionaries-page .taxonomy-two-cols,
    .ent-dictionaries-page .taxonomy-species-fields,
    .ent-dictionaries-page .taxonomy-species-layout,
    .ent-dictionaries-page .taxonomy-new-grid,
    .ent-dictionaries-page .taxonomy-species-main-row,
    .ent-dictionaries-page .taxonomy-secondary-row {
        grid-template-columns: 1fr;
    }

    .ent-dictionaries-page .taxonomy-panel-header {
        display: block;
    }

    .ent-dictionaries-page .taxonomy-panel-header .search-box {
        margin-top: 10px;
    }
}


.ent-dictionaries-page .taxonomy-form select,
.ent-dictionaries-page .taxonomy-form .select2-container--default .select2-selection--single,
.ent-dictionaries-page .taxonomy-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 13px;
}

.ent-dictionaries-page .taxonomy-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 33px;
    padding-left: 10px;
}
.ent-dictionaries-page .taxonomy-list-filter {
    margin: 4px 0 18px;
    padding: 14px 16px;
    border: 1px solid #d8e2ec;
    border-radius: 8px;
    background: #f6f9fc;
}

.ent-dictionaries-page .taxonomy-list-filter-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 6px;
}

.ent-dictionaries-page .taxonomy-list-filter .search-input {
    width: min(520px, 100%);
    border-radius: 6px;
}

.ent-dictionaries-page .taxonomy-list-filter .search-input:focus {
    width: min(560px, 100%);
}

.ent-dictionaries-page .taxonomy-filter-status {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #24435f;
}

.ent-live-search-highlight {
    padding: 12px;
    border: 2px solid #2bb673;
    border-radius: 8px;
    background: #f4fff8;
}

.ent-live-search-highlight label {
    font-size: 16px;
    font-weight: 800;
    color: #183f2a;
}

.ent-live-search-highlight .search-input,
.ent-live-search-highlight .records-live-search-input,
.ent-live-search-highlight input[type="text"] {
    min-height: 46px;
    border-color: #2bb673;
}

.ent-live-search-highlight .search-input:focus,
.ent-live-search-highlight .records-live-search-input:focus,
.ent-live-search-highlight input[type="text"]:focus {
    border-color: #24a766;
    box-shadow: 0 0 0 3px rgba(43, 182, 115, 0.16);
}

.ent-records-page .records-live-search-row.ent-live-search-highlight {
    margin-bottom: 12px;
}

.ent-records-page .records-live-search-row.ent-live-search-highlight .col-flex-1 {
    position: relative;
}

.ent-media-picker-page .media-search-highlight {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ent-media-picker-page .media-search-highlight label {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #183f2a;
}

.ent-media-picker-page .media-search-highlight .search-input {
    width: 100%;
}

@media (max-width: 760px) {
    .ent-dictionaries-page .taxonomy-list-filter-row {
        align-items: stretch;
        flex-direction: column;
    }
}
/* === ent-record-add-photo-page (CC partia frontendowa d8) === */
/* Reguly przeniesione z lokalnego <style> w record_add_photo.php.        */
/* Cel: zachowac wyglad 1:1, przygotowac grunt pod RWD/mobile w kolejnej partii. */

.ent-record-add-photo-page,
.ent-record-add-photo-page * { box-sizing: border-box; }
.ent-record-add-photo-page { margin: 0; padding: 20px; background: #f4f7f6; color: #333; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
.ent-record-add-photo-page .container { max-width: 1200px; margin: 0 auto; background: #fff; border-radius: 10px; padding: 26px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); }
.ent-record-add-photo-page h1 { color: #2c3e50; margin-top: 0; }
.ent-record-add-photo-page .alert { padding: 14px; border-radius: 6px; margin: 14px 0; }
.ent-record-add-photo-page .alert-success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.ent-record-add-photo-page .alert-danger { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }
.ent-record-add-photo-page .client-alert { display: none; }
.ent-record-add-photo-page .hint { background: #eef6ff; border: 1px solid #cfe3fb; color: #1f4d7a; padding: 12px; border-radius: 6px; margin-bottom: 16px; }
.ent-record-add-photo-page .row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.ent-record-add-photo-page .col { flex: 1; min-width: 230px; }
.ent-record-add-photo-page label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; color: #2c3e50; }
.ent-record-add-photo-page input[type="text"],
.ent-record-add-photo-page input[type="number"],
.ent-record-add-photo-page input[type="date"],
.ent-record-add-photo-page select,
.ent-record-add-photo-page textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccd4d9;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}
.ent-record-add-photo-page .upload { border: 2px dashed #1976d2; border-radius: 8px; padding: 36px 16px; text-align: center; cursor: pointer; background: #f0f7ff; }
.ent-record-add-photo-page .upload.dragover { background: #e3f2fd; border-color: #0d47a1; }
.ent-record-add-photo-page input[type="file"] { display: none; }
.ent-record-add-photo-page textarea { min-height: 90px; resize: vertical; }
.ent-record-add-photo-page .required::after { content: " *"; color: #c0392b; }
.ent-record-add-photo-page .muted { font-size: 12px; color: #6c757d; margin-top: 4px; }

.ent-record-add-photo-page .station-mode-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 8px;
}
.ent-record-add-photo-page .station-mode-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    background: #f8fafb;
    color: #2c3e50;
    font-weight: 600;
    cursor: pointer;
}
.ent-record-add-photo-page .station-mode-option input {
    margin: 0;
}
.ent-record-add-photo-page .station-mode-option:has(input:checked) {
    border-color: #1976d2;
    background: #eef6ff;
}
.ent-record-add-photo-page .station-mode-panel[hidden] {
    display: none !important;
}
.ent-record-add-photo-page .actions { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; }
.ent-record-add-photo-page .btn {
    border: none; border-radius: 6px; padding: 12px 16px; font-weight: 700; text-decoration: none; cursor: pointer; display: inline-block;
}
.ent-record-add-photo-page .btn-primary { background: #11824a; color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.ent-record-add-photo-page .btn-primary:hover { background: #0d6d3e; }
.ent-record-add-photo-page .btn-add { background: #27ae60; color: #fff; }
.ent-record-add-photo-page .btn-add:hover { background: #229954; }
.ent-record-add-photo-page .btn-secondary { background: #2c3e50; color: #fff; }
.ent-record-add-photo-page .btn-secondary:hover { background: #1f2f3d; }
.ent-record-add-photo-page .btn-home { background: #3498db; color: #fff; }
.ent-record-add-photo-page .btn-home:hover { background: #2980b9; }
.ent-record-add-photo-page .preview-wrap { margin-top: 8px; display: none; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.ent-record-add-photo-page .preview-wrap img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border: 1px solid #ddd; border-radius: 8px; }
.ent-record-add-photo-page .geo-editor-box { background: #eef6ff; border: 1px solid #cfe3fb; border-radius: 8px; padding: 14px; margin: 0 0 14px; }
.ent-record-add-photo-page .geo-editor-title { font-weight: 700; color: #2c3e50; margin-bottom: 8px; }
.ent-record-add-photo-page .geo-editor-map { height: 360px; border-radius: 8px; overflow: hidden; border: 1px solid #c7d6e5; margin-bottom: 10px; }
.ent-record-add-photo-page .geo-editor-controls { display: grid; grid-template-columns: minmax(140px, 160px) minmax(0, 1fr); gap: 18px; align-items: end; }
.ent-record-add-photo-page .geo-editor-controls label { font-size: 12px; margin-bottom: 4px; color: #607080; }
.ent-record-add-photo-page .geo-editor-controls input { width: 100%; }
.ent-record-add-photo-page #positional_accuracy { max-width: 16ch; }
.ent-record-add-photo-page .details-row #ilosc { width: 16ch; }
.ent-record-add-photo-page .geo-editor-hint { color: #607080; font-size: 12px; margin-top: 8px; }


/* === ent-record-edit-page (CC partia frontendowa d9) === */
/* Zrodlo: dawny inline <style> w record_edit.php - przeniesione 1:1, scope: body.ent-record-edit-page */

.ent-record-edit-page,
.ent-record-edit-page * { box-sizing: border-box; }
.ent-record-edit-page { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f4f7f6; margin: 0; padding: 20px; color: #333; }
.ent-record-edit-page .container { max-width: 1200px; margin: 0 auto; background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.ent-record-edit-page h1,
.ent-record-edit-page h2 { color: #2c3e50; }
.ent-record-edit-page .record-edit-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ent-record-edit-page .record-edit-header h1 { margin: 0; }
.ent-record-edit-page .record-edit-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.ent-record-edit-page .record-edit-completion-status { margin: 0; }
.ent-record-edit-page .record-edit-completion-status .record-completion-switch.is-completed .record-completion-track { background: #2f9b57; }
.ent-record-edit-page .record-edit-completion-status .record-completion-switch.is-completed .record-completion-thumb { transform: translateX(28px); }
.ent-record-edit-page .record-edit-completion-status .record-completion-switch.is-progress .record-completion-track { background: #e88922; }
.ent-record-edit-page .record-edit-save-top { min-height: 44px; white-space: nowrap; }
.ent-record-edit-page .record-edit-cancel-top { height: 45px; min-height: 45px; white-space: nowrap; }
.ent-record-edit-page .record-origin-switch label.is-unavailable { cursor: not-allowed; }
.ent-record-edit-page .record-floating-notice { position: fixed; left: 50%; bottom: 24px; z-index: 1300; width: min(560px, calc(100vw - 32px)); padding: 13px 16px; border-radius: 10px; background: #263d34; color: #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, .24); font-size: 14px; line-height: 1.4; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .18s ease, transform .18s ease; }
.ent-record-edit-page .record-floating-notice.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 720px) { .ent-record-edit-page .record-edit-header { align-items: flex-start; flex-direction: column; } .ent-record-edit-page .record-edit-header-actions { width: 100%; justify-content: space-between; } .ent-record-edit-page .record-edit-save-top { flex: 1 1 auto; } }
.ent-record-edit-page .alert { padding: 15px; border-radius: 4px; margin-bottom: 20px; }
.ent-record-edit-page .alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.ent-record-edit-page .alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.ent-record-edit-page .record-save-success-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(17, 24, 39, 0.42);
}

.ent-record-edit-page .record-save-success-modal.is-hidden {
    display: none;
}

.ent-record-edit-page .record-save-success-modal-card {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid #cfe8d8;
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.ent-record-edit-page .record-save-success-modal-title {
    padding: 18px 20px 8px;
    color: #155724;
    font-size: 20px;
    font-weight: 800;
}

.ent-record-edit-page .record-save-success-modal-text {
    padding: 0 20px 18px;
    color: #243447;
    line-height: 1.45;
}

.ent-record-edit-page .record-save-success-modal-text a {
    color: #0056b3;
    font-weight: 800;
}

.ent-record-edit-page .record-save-success-modal-actions {
    padding: 14px 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f7fbf8;
    border-top: 1px solid #e3f1e8;
}

.ent-record-edit-page .record-save-success-view-link,
.ent-record-edit-page .record-save-success-ok-btn {
    min-width: 96px;
    min-height: 42px;
    padding: 10px 18px;
    border: 2px solid #1f6f43;
    border-radius: 8px;
    background: #27ae60 !important;
    color: #fff !important;
    font-weight: 800;
    cursor: pointer;
    opacity: 1 !important;
}

.ent-record-edit-page .record-save-success-view-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: #155fa0;
    background: #1976d2 !important;
    text-decoration: none;
}

.ent-record-edit-page .record-save-success-ok-btn:hover,
.ent-record-edit-page .record-save-success-ok-btn:focus,
.ent-record-edit-page .record-save-success-view-link:hover,
.ent-record-edit-page .record-save-success-view-link:focus {
    background: #229954;
    color: #fff;
    outline: 3px solid rgba(39, 174, 96, 0.28);
    outline-offset: 2px;
}

.ent-record-edit-page .record-edit-footer {
    margin-top: 50px;
    padding: 20px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
    text-align: center;
    color: #666;
    font-size: 12px;
}

.ent-record-edit-page .record-edit-footer p {
    margin: 5px 0;
}

@media (max-width: 760px) {
    .ent-record-edit-page .records-footer {
        margin-top: 24px;
        padding: 16px 12px 18px;
    }
    .ent-record-edit-page .records-footer .ent-footer-partners,
    .ent-record-edit-page .records-footer .ent-footer-links {
        display: none;
    }
    .ent-record-edit-page .records-footer p {
        font-size: 12px;
        line-height: 1.35;
    }
}

.help-info-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 5px;
    border: 1px solid #1976d2;
    border-radius: 50%;
    color: #1976d2;
    background: #eef6ff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    vertical-align: middle;
}

.help-info-link:hover,
.help-info-link:focus {
    color: #fff;
    background: #1976d2;
    outline: 3px solid rgba(25, 118, 210, 0.22);
    outline-offset: 2px;
}

.upload-help-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 6px;
    color: #52606d;
    font-size: 13px;
}

.upload-help-row a {
    color: #1976d2;
    font-weight: 700;
}

.ent-help-page {
    margin: 0;
    padding: 24px;
    background: #f4f7f6;
    color: #263238;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.ent-help-page .help-shell {
    max-width: 1040px;
    margin: 0 auto;
}

.ent-help-page .help-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    padding: 24px 0 18px;
    border-bottom: 1px solid #dbe3e7;
}

.ent-help-page .help-kicker {
    margin: 0 0 6px;
    color: #607080;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.ent-help-page h1 {
    margin: 0 0 8px;
    color: #2c3e50;
    font-size: 34px;
    line-height: 1.12;
}

.ent-help-page .help-lead {
    max-width: 680px;
    margin: 0;
    color: #52616f;
    font-size: 16px;
    line-height: 1.5;
}

.ent-help-page .help-actions {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ent-help-page .help-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 6px;
    background: #1976d2;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.ent-help-page .help-action-secondary {
    background: #607d8b;
}

.ent-help-page .help-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px 0 8px;
}

.ent-help-page .help-toc a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid #c8d7df;
    border-radius: 999px;
    background: #fff;
    color: #23527c;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.ent-help-page .help-section {
    margin: 22px 0;
    padding: 22px;
    border: 1px solid #dbe3e7;
    border-radius: 8px;
    background: #fff;
    scroll-margin-top: 16px;
}

.ent-help-page .help-section h2 {
    margin: 0 0 12px;
    color: #2c3e50;
    font-size: 22px;
}

.ent-help-page .help-section-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: -4px 0 14px;
    font-size: 13px;
}

.ent-help-page .help-section-links span {
    color: #6a7a89;
    font-weight: 700;
    margin-right: 4px;
}

.ent-help-page .help-section-links a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid #cfe1ed;
    border-radius: 999px;
    background: #f6fbff;
    color: #1e5f8f;
    text-decoration: none;
    font-weight: 700;
}

.ent-help-page .help-section-links a:hover,
.ent-help-page .help-section-links a:focus {
    background: #e8f4fc;
    border-color: #9dc5dc;
    color: #12476e;
    text-decoration: none;
}
.ent-help-page .help-section h3 {
    margin: 18px 0 8px;
    color: #34495e;
    font-size: 17px;
}

.ent-help-page .help-section p,
.ent-help-page .help-list,
.ent-help-page .help-steps {
    color: #425466;
    line-height: 1.58;
}

.ent-help-page .help-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.ent-help-page .help-card {
    border: 1px solid #dbe8ef;
    border-radius: 8px;
    padding: 14px;
    background: #f8fbfd;
}

.ent-help-page .help-card h3 {
    margin-top: 0;
}

.ent-help-page .help-note {
    padding: 12px 14px;
    border-left: 4px solid #1976d2;
    background: #eef6ff;
}

.ent-help-page .help-section-planned {
    background: #fbfcfd;
}

@media (max-width: 760px) {
    .ent-help-page {
        padding: 14px;
    }

    .ent-help-page .help-header {
        flex-direction: column;
    }

    .ent-help-page .help-actions {
        justify-content: flex-start;
    }

    .ent-help-page .help-action {
        width: 100%;
    }

    .ent-help-page h1 {
        font-size: 28px;
    }

    .ent-help-page .help-section {
        padding: 16px;
    }

    .ent-help-page .help-grid {
        grid-template-columns: 1fr;
    }
}
.ent-record-edit-page label { display: block; font-weight: bold; margin-bottom: 5px; color: #2c3e50; font-size: 14px; }
.ent-record-edit-page .record-site-label { white-space: nowrap; }
.ent-record-edit-page .record-site-label-note { font-weight: 400; }
.ent-record-edit-page input[type="date"],
.ent-record-edit-page input[type="number"],
.ent-record-edit-page input[type="text"],
.ent-record-edit-page textarea,
.ent-record-edit-page select { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; }
.ent-record-edit-page textarea { resize: vertical; min-height: 80px; }
.ent-record-edit-page .row { display: flex; gap: 15px; margin-bottom: 15px; flex-wrap: wrap; }
.ent-record-edit-page .col { flex: 1; min-width: 200px; }
.ent-record-edit-page .record-primary-fields { align-items: flex-end; justify-content: center; }
.ent-record-edit-page .record-primary-fields > .col { display: flex; flex-direction: column; justify-content: flex-end; }
.ent-record-edit-page .record-primary-fields > .record-date-field[hidden] { display: none !important; }
.ent-record-edit-page .record-primary-fields > .col > label { min-height: 17px; }
.ent-record-edit-page .record-primary-fields > .col > input,
.ent-record-edit-page .record-primary-fields > .col > select { min-height: 44px; box-sizing: border-box; }
.ent-record-edit-page .record-primary-fields > .record-date-field input[type="date"] { box-sizing: border-box; }
.ent-record-edit-page .record-primary-fields .select2-container--default .select2-selection--single { height: 44px; }
.ent-record-edit-page .record-primary-fields .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 42px; }
.ent-record-edit-page .record-primary-fields .select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; }

@media (min-width: 769px) {
    .ent-record-edit-page .record-basic-data-layout {
        display: grid;
        grid-template-columns: minmax(360px, 1.35fr) minmax(500px, 1fr);
        grid-template-areas:
            "heading heading"
            "taxon options"
            "dates dates";
        align-items: start;
        gap: 34px;
        margin: 0 0 22px;
    }
    .ent-record-edit-page .record-basic-data-main { display: contents; }
    .ent-record-edit-page .record-basic-data-main h2 { grid-area: heading; margin-bottom: -18px; }
    .ent-record-edit-page .record-taxon-field { grid-area: taxon; width: min(100%, 430px); min-width: 0; }
    .ent-record-edit-page .record-basic-data-options { grid-area: options; min-width: 0; }
    .ent-record-edit-page .record-primary-fields {
        display: grid;
        grid-template-columns: 16ch 16ch 16ch max-content 16ch 28ch;
        align-items: end;
        justify-content: start;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 30px 0 18px;
        gap: 16px 18px;
        grid-area: dates;
    }
    .ent-record-edit-page .record-primary-fields > .record-observation-fields { display: contents; }
    .ent-record-edit-page .record-primary-fields .col { min-width: 0; width: auto; }
    .ent-record-edit-page .record-primary-fields .record-date-field input[type="date"] { width: 15ch; min-width: 15ch; }
    .ent-record-edit-page .record-primary-fields > .record-main-date-field { grid-column: 1; }
    .ent-record-edit-page .record-primary-fields > .record-date-to-field { grid-column: 2; }
    .ent-record-edit-page .record-primary-fields .record-quantity-field { grid-column: 3; }
    .ent-record-edit-page .record-primary-fields .record-sex-field { grid-column: 4; }
    .ent-record-edit-page .record-primary-fields .record-plant-field { position: relative; grid-column: 5; grid-row: 1; margin-top: 0; }
    .ent-record-edit-page .record-primary-fields .record-plant-taxonomy-path { position: absolute; top: calc(100% + 8px); left: 0; width: 100%; }
    .ent-record-edit-page .record-primary-fields { padding-bottom: 42px; }
    .ent-record-edit-page .record-primary-fields.is-breeding-layout > #record-visit-date-field { grid-column: 1; grid-row: 1; }
    .ent-record-edit-page .record-primary-fields.is-breeding-layout > .record-date-to-field { grid-column: 2; grid-row: 1; }
    .ent-record-edit-page .record-primary-fields.is-breeding-layout > .record-main-date-field { grid-column: 3; grid-row: 1; }
    .ent-record-edit-page .record-primary-fields.is-breeding-layout .record-quantity-field { grid-column: 4; }
    .ent-record-edit-page .record-primary-fields.is-breeding-layout .record-sex-field { grid-column: 5; }
    .ent-record-edit-page .record-primary-fields.is-breeding-layout .record-plant-field { grid-column: 6; grid-row: 1; }
    .ent-record-edit-page .record-basic-data-options .record-observation-meta-row {
        display: grid;
        grid-template-columns: 160px 170px 14ch;
        gap: 10px;
        width: 100%;
        margin: 0;
    }
    .ent-record-edit-page .record-basic-data-options .record-origin-field,
    .ent-record-edit-page .record-basic-data-options .record-acquisition-source-field,
    .ent-record-edit-page .record-basic-data-options .record-observer-choice-field {
        width: 100%;
        margin: 0;
        justify-self: auto;
    }
    .ent-record-edit-page .record-basic-data-options .record-observer-choice-field { grid-column: 1 / -1; margin-top: 2px; }
    .ent-record-edit-page .record-basic-data-options .record-origin-switch { flex-wrap: nowrap; justify-content: flex-start; }
    .ent-record-edit-page .record-basic-data-options .record-breeding-stage-field { min-width: 0; }
    .ent-record-edit-page .record-basic-data-options .record-breeding-stage-field select { width: 14ch; max-width: 100%; box-sizing: border-box; }
    .ent-record-edit-page .record-basic-data-options .record-observer-switch { justify-content: flex-start; }
    .ent-record-edit-page .record-site-row { margin-top: 0; }
    .ent-record-edit-page .record-site-field-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto; column-gap: 24px; row-gap: 4px; align-items: start; }
    .ent-record-edit-page .record-site-label { grid-column: 1; grid-row: 1; }
    .ent-record-edit-page .record-site-select-row { grid-column: 1; grid-row: 2; width: 100%; }
    .ent-record-edit-page .record-site-actions-row,
    .ent-record-edit-page .record-site-buttons { display: contents; }
    .ent-record-edit-page .record-site-apply-group { display: flex !important; flex-direction: column; grid-row: 2; width: 100%; align-items: center; }
    .ent-record-edit-page .record-site-apply-group:nth-child(1) { grid-column: 2; }
    .ent-record-edit-page .record-site-apply-group:nth-child(2) { grid-column: 3; }
    .ent-record-edit-page .btn-site-from-record { width: 153px; min-width: 153px; }
    .ent-record-edit-page .btn-site-create-new { background: #3498db; }
    .ent-record-edit-page .btn-site-create-new:hover { background: #2980b9; }
    .ent-record-edit-page .record-site-help { width: 100%; font-size: 11px; text-align: left; }
}
.ent-record-edit-page .record-primary-fields > .record-date-field { flex: 0 0 auto; min-width: 0; }
.ent-record-edit-page .record-primary-fields > .record-date-field input[type="date"] { box-sizing: border-box; width: 15ch; min-width: 15ch; }
.ent-record-edit-page .record-primary-fields > .record-observation-fields { display: contents; }
.ent-record-edit-page .record-observation-fields { align-items: flex-end; justify-content: center; }
.ent-record-edit-page .record-observation-meta-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: flex-end; width: min(100%, 980px); margin-left: auto; margin-right: auto; gap: 24px; }
.ent-record-edit-page .record-origin-field,
.ent-record-edit-page .record-acquisition-source-field { min-width: 0; justify-self: center; }
.ent-record-edit-page .record-origin-switch { justify-content: center; }
.ent-record-edit-page .record-observer-choice-field { min-width: 0; margin-left: 0; justify-self: center; }
.ent-record-edit-page .record-observer-switch { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.ent-record-edit-page .record-observer-choice { min-height: 36px; padding: 7px 12px; border: 1px solid #cdd8d4; border-radius: 999px; background: #fff; color: #243b34; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ent-record-edit-page .record-observer-choice.is-active { border-color: #74ac00; background: #74ac00; color: #fff; }
.ent-record-edit-page .record-observer-choice:focus-visible { outline: 2px solid #315746; outline-offset: 2px; }
.ent-record-edit-page .record-observer-choice:disabled { cursor: default; }
.ent-record-edit-page .record-quantity-field { flex: 0 0 auto; min-width: 0; }
.ent-record-edit-page .record-quantity-field input { box-sizing: content-box; width: 6ch; }
.ent-record-edit-page .record-quantity-field input[type="number"]::-webkit-inner-spin-button { opacity: 1; }
.ent-record-edit-page .record-sex-field { flex: 0 0 auto; min-width: 0; }
.ent-record-edit-page .record-sex-field select { box-sizing: content-box; width: 14ch; }
.ent-record-edit-page .record-plant-field { flex: 0 0 calc(28ch + 18px); min-width: calc(28ch + 18px); }
.ent-record-edit-page .record-plant-field .record-plant-control,
.ent-record-edit-page .record-plant-field .select2-container { width: 100% !important; }
.ent-record-edit-page .record-plant-field .record-plant-taxonomy-path { max-width: 100%; overflow-wrap: anywhere; }
.ent-record-edit-page .record-plant-field #recordPlantVernacularField { margin-top: 6px; }
.ent-record-edit-page .record-plant-field .record-plant-vernacular { width: 100%; box-sizing: border-box; }
.ent-record-edit-page .record-observation-fields .select2-container--default .select2-selection--single { height: 38px; }
.ent-record-edit-page .record-observation-fields .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 36px; }
.ent-record-edit-page .record-observation-fields .select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px; }
body.ent-record-edit-page > .select2-container--open { z-index: 10000 !important; }
body.ent-record-edit-page > .select2-container--open .record-edit-select2-dropdown { z-index: 10000 !important; }
.ent-record-edit-page button { color: #fff; border: none; padding: 12px 20px; font-size: 16px; border-radius: 4px; cursor: pointer; transition: 0.3s; }
.ent-record-edit-page button.btn-primary { background: #3498db; }
.ent-record-edit-page button.btn-primary:hover { background: #2980b9; }
.ent-record-edit-page button.btn-success { background: #27ae60; }
.ent-record-edit-page button.btn-success:hover { background: #229954; }
.ent-record-edit-page button.btn-secondary { background: #95a5a6; }
.ent-record-edit-page button.btn-secondary:hover { background: #7f8c8d; }
.ent-record-edit-page button.btn-danger { background: #e74c3c; }
.ent-record-edit-page button.btn-danger:hover { background: #c0392b; }
.ent-record-edit-page .alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.ent-record-edit-page .button-group { display: flex; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.ent-record-edit-page .button-group button { flex: 1; }
.ent-record-edit-page .button-group button.btn-success { flex: 1.25; }
.ent-record-edit-page .button-group .btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    line-height: 1.2;
    transition: 0.3s;
    white-space: nowrap;
}
.ent-record-edit-page .button-group .btn-link.btn-media { background: #3498db; flex: 0.9; }
.ent-record-edit-page .button-group .btn-link.btn-media:hover { background: #2980b9; }
.ent-record-edit-page .button-group .btn-link.btn-back-list { background: #95a5a6; flex: 1; }
.ent-record-edit-page .button-group .btn-link.btn-back-list:hover { background: #7f8c8d; }
.ent-record-edit-page .record-page-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.ent-record-edit-page .record-page-nav.bottom { margin-top: 24px; margin-bottom: 0; }
.ent-record-edit-page .record-page-actions { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.ent-record-edit-page .record-page-actions-left,
.ent-record-edit-page .record-page-actions-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ent-record-edit-page .record-page-actions-left { padding: 10px; border: 1px solid #cce5cf; border-radius: 6px; background: #edf8ef; }
.ent-record-edit-page .record-page-actions-right { margin-left: auto; }
.ent-record-edit-page .record-page-actions-bottom { margin-top: 18px; margin-bottom: 0; }
.ent-record-edit-page .btn-compact,
.ent-record-edit-page .record-page-nav .btn-link,
.ent-record-edit-page .record-delete-row .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: 0.3s;
}
.ent-record-edit-page .btn-compact:hover,
.ent-record-edit-page .record-page-nav .btn-link:hover,
.ent-record-edit-page .record-delete-row .btn-danger:hover { transform: translateY(-2px); }
.ent-record-edit-page .record-page-nav .btn-link { background: #34495e; color: #fff; }
.ent-record-edit-page .record-page-nav .btn-link:hover { background: #2c3e50; }
.ent-record-edit-page .btn-compact.btn-primary,
.ent-record-edit-page .btn-compact.btn-media { background: #3498db; color: #fff; }
.ent-record-edit-page .btn-compact.btn-primary:hover,
.ent-record-edit-page .btn-compact.btn-media:hover { background: #2980b9; }
.ent-record-edit-page .btn-compact.btn-danger {
    border: 0;
    background: #c0392b;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
}
.ent-record-edit-page .btn-compact.btn-danger:hover,
.ent-record-edit-page .btn-compact.btn-danger:focus {
    background: #a93226;
}
.ent-record-edit-page .btn-compact.btn-success { background: #27ae60; color: #fff; min-width: 170px; }
.ent-record-edit-page .btn-compact.btn-success:hover { background: #229954; }
.ent-record-edit-page .btn-compact.btn-cancel { background: #95a5a6; color: #fff; }
.ent-record-edit-page .btn-compact.btn-cancel:hover { background: #7f8c8d; }
.ent-record-edit-page .btn-dataset { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 9px 16px; background: #1f78d1; color: #fff; text-decoration: none; border-radius: 5px; font-weight: 700; transition: 0.3s; text-align: center; border: none; cursor: pointer; font-size: 13px; font-family: inherit; }
.ent-record-edit-page .btn-dataset:hover { background: #1764ad; transform: translateY(-2px); }
.ent-record-edit-page .record-delete-row { display: flex; justify-content: flex-end; gap: 18px; margin-top: 20px; flex-wrap: wrap; }
.ent-record-edit-page .record-delete-row .btn-danger { min-width: 170px; }
.ent-record-edit-page .form-divider { border-top: 2px solid #ecf0f1; padding-top: 20px; margin-top: 20px; }
.ent-record-edit-page .error-box { background: #f8d7da; padding: 20px; border-radius: 8px; text-align: center; }
.ent-record-edit-page .checkbox-group { display: flex; align-items: center; gap: 18px; }
.ent-record-edit-page .checkbox-group input[type="checkbox"] { width: auto; }
.ent-record-edit-page .species-media-box { background: #f8f9fa; border: 1px solid #e4e7eb; border-radius: 8px; padding: 14px; margin: 10px 0 20px; }
.ent-record-edit-page .species-media-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 10px; }
.ent-record-edit-page .species-media-top-right { display: flex; align-items: center; justify-content: flex-end; gap: 18px; flex-wrap: wrap; }
.ent-record-edit-page .species-media-title { font-weight: 700; color: #2c3e50; }
.ent-record-edit-page .species-media-count { font-size: 13px; color: #627181; }
.ent-record-edit-page .species-media-link { font-size: 13px; color: #1976d2; text-decoration: none; font-weight: 600; }
.ent-record-edit-page .species-media-link:hover { text-decoration: underline; }
.ent-record-edit-page .species-media-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 18px; }
.ent-record-edit-page .species-media-item { border: 1px solid #d9dee3; border-radius: 8px; background: #fff; overflow: hidden; }
.ent-record-edit-page .species-media-thumb { position: relative; display: block; overflow: hidden; background: #fff; aspect-ratio: 16 / 9; }
.ent-record-edit-page .species-media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ent-record-edit-page .species-media-pick { position: absolute; top: 8px; left: 8px; z-index: 20; display: none; background: rgba(255,255,255,.96); border-radius: 4px; padding: 6px; cursor: pointer; }
.ent-record-edit-page .species-media-pick input { width: 18px; height: 18px; cursor: pointer; display: block; }
.ent-record-edit-page .species-media-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-top: 1px solid #e6ebef; }
.ent-record-edit-page .species-media-status { font-size: 12px; font-weight: 700; color: #5d6d7e; }
.ent-record-edit-page .species-media-status.is-primary { color: #7a4d11; }
.ent-record-edit-page .species-media-set-primary { border: 0; background: transparent; color: #1976d2; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; }
.ent-record-edit-page .species-media-set-primary:hover { color: #125aa0; text-decoration: underline; }
.ent-record-edit-page .species-media-toolbar { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ent-record-edit-page .species-media-btn { border: 0; border-radius: 6px; padding: 7px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.ent-record-edit-page .species-media-btn-mode { background: #8d6e63; color: #fff; }
.ent-record-edit-page .species-media-btn-mode:hover { background: #795548; }
.ent-record-edit-page .species-media-btn-danger { background: #e74c3c; color: #fff; display: none; }
.ent-record-edit-page .species-media-btn-danger:hover { background: #c0392b; }
.ent-record-edit-page .species-media-btn-cancel { display: none; width: 32px; height: 32px; padding: 0; background: #b0bec5; color: #263238; font-size: 20px; line-height: 1; }
.ent-record-edit-page #recordMediaDeleteWrap.delete-mode .species-media-pick { display: block; }
.ent-record-edit-page #recordMediaDeleteWrap.delete-mode .species-media-btn-danger,
.ent-record-edit-page #recordMediaDeleteWrap.delete-mode .species-media-btn-cancel { display: inline-block; }
.ent-record-edit-page .species-media-empty { font-size: 13px; color: #7a8793; padding: 8px 0; }
.ent-record-edit-page .geo-editor-box { background: #eef6ff; border: 1px solid #cfe3fb; border-radius: 8px; padding: 14px; margin: 14px 0 20px; }
.ent-record-edit-page .geo-editor-title { font-weight: 700; color: #2c3e50; margin-bottom: 8px; }
.ent-record-edit-page .geo-editor-map { height: 360px; border-radius: 8px; overflow: hidden; border: 1px solid #c7d6e5; margin-bottom: 10px; }
.ent-record-edit-page .geo-editor-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    grid-template-areas:
        "locality locality locality"
        "latitude longitude elevation"
        "decimal decimal decimal"
        "dms dms dms";
    gap: 12px;
    align-items: end;
}
.ent-record-edit-page .geo-editor-locality { grid-area: locality; display: grid; grid-template-columns: 25ch auto minmax(150px, 1fr) 9ch; gap: 10px; align-items: end; }
.ent-record-edit-page .geo-editor-latitude { grid-area: latitude; }
.ent-record-edit-page .geo-editor-longitude { grid-area: longitude; }
.ent-record-edit-page .geo-editor-elevation { grid-area: elevation; }
.ent-record-edit-page .geo-editor-coordinate-decimal { grid-area: decimal; }
.ent-record-edit-page .geo-editor-coordinate-dms { grid-area: dms; }
.ent-record-edit-page .record-coordinate-copy-line { display: flex; align-items: stretch; }
.ent-record-edit-page .record-coordinate-copy-line input { min-width: 0; flex: 1 1 auto; border-radius: 6px 0 0 6px; }
.ent-record-edit-page .record-coordinate-copy { flex: 0 0 38px; width: 38px; padding: 0; border: 1px solid #c7d6e5; border-left: 0; border-radius: 0 6px 6px 0; background: #f4f8fb; color: #315746; cursor: pointer; }
.ent-record-edit-page .record-coordinate-copy:hover, .ent-record-edit-page .record-coordinate-copy:focus-visible { background: #dbeee2; color: #176b45; }
.ent-record-edit-page .record-coordinate-copy.copied { background: #e8f8ee; border-color: #8fd3a8; color: #1f6f43; }
.ent-record-edit-page .record-coordinate-copy svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; vertical-align: middle; }
.ent-record-edit-page .record-coordinate-copy-status { grid-column: 1 / -1; min-height: 18px; color: #315746; font-size: 12px; }
.ent-record-edit-page .geo-editor-controls label { font-size: 12px; font-weight: 700; color: #607080; margin-bottom: 4px; display: block; }
.ent-record-edit-page .geo-editor-controls input { width: 100%; padding: 8px 9px; border: 1px solid #c7d6e5; border-radius: 6px; }
.ent-record-edit-page .geo-editor-controls input[type="range"] { padding: 0; }
.ent-record-edit-page .geo-editor-locality-input #record-locality { width: 25ch; }
.ent-record-edit-page .geo-editor-locality .geo-editor-radius input[type="range"] { width: 80%; }
.ent-record-edit-page .geo-editor-locality .geo-editor-accuracy input { box-sizing: content-box; width: 6ch; }
.ent-record-edit-page .geo-editor-latitude input,
.ent-record-edit-page .geo-editor-longitude input,
.ent-record-edit-page .geo-editor-elevation input { width: 10ch; }
.ent-record-edit-page .geo-editor-reverse .btn { min-height: 36px; margin: 0; padding: 8px 12px; white-space: nowrap; }
.ent-record-edit-page .geo-editor-status { grid-column: 1 / -1; min-height: 0; display: flex; align-items: center; }
.ent-record-edit-page .geo-editor-status .muted { margin: 0; }
.ent-record-edit-page .geo-editor-hint { color: #607080; font-size: 12px; margin: 0 0 10px; }
@media (max-width: 900px) {
    .ent-record-edit-page .species-media-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
    .ent-record-edit-page .geo-editor-controls {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "locality locality"
            "latitude longitude"
            "elevation elevation"
            "decimal decimal"
            "dms dms";
    }
    .ent-record-edit-page .geo-editor-locality { grid-template-columns: minmax(220px, 1fr) auto; }
    .ent-record-edit-page .geo-editor-locality .geo-editor-radius { grid-column: 1; }
    .ent-record-edit-page .geo-editor-locality .geo-editor-accuracy { grid-column: 2; }
}
@media (max-width: 560px) {
    .ent-record-edit-page .species-media-top,
    .ent-record-edit-page .species-media-top-right,
    .ent-record-edit-page .record-page-nav,
    .ent-record-edit-page .record-page-actions,
    .ent-record-edit-page .record-page-actions-left,
    .ent-record-edit-page .record-page-actions-right,
    .ent-record-edit-page .record-delete-row { flex-direction: column; align-items: stretch; }
    .ent-record-edit-page .record-page-actions-right { margin-left: 0; }
    .ent-record-edit-page .species-media-toolbar { width: 100%; justify-content: flex-start; }
    .ent-record-edit-page .species-media-grid { grid-template-columns: 1fr; }
    .ent-record-edit-page .btn-compact,
    .ent-record-edit-page .record-page-nav .btn-link,
    .ent-record-edit-page .btn-dataset,
    .ent-record-edit-page .record-delete-row .btn-danger { width: 100%; }
    .ent-record-edit-page .geo-editor-controls {
        grid-template-columns: 1fr;
        grid-template-areas:
            "locality"
            "latitude"
            "longitude"
            "elevation"
            "decimal"
            "dms";
    }
    .ent-record-edit-page .geo-editor-locality { grid-template-columns: 1fr; }
    .ent-record-edit-page .geo-editor-locality .geo-editor-radius,
    .ent-record-edit-page .geo-editor-locality .geo-editor-accuracy,
    .ent-record-edit-page .geo-editor-status { grid-column: auto; }
    .ent-record-edit-page .geo-editor-locality-input #record-locality { width: 100%; }
    .ent-record-edit-page .geo-editor-latitude input,
    .ent-record-edit-page .geo-editor-longitude input,
    .ent-record-edit-page .geo-editor-elevation input { width: 100%; }
}

/* === ent-record-edit-page mobile M3 (CC, 2026-06-21) ===
   Cel: edycja rekordu (kopia -> korekta ilosci -> nowe zdjecie -> zapis) ma byc uzywalna na telefonie.
   Strategia: CSS-only, scope .ent-record-edit-page. Zero zmian HTML/JS, kontrakty id=/name= nietkniete.
   Breakpointy: 768px (telefon) i 769-900px (tablet/landscape - tylko mapa). */
@media (max-width: 768px) {
    .ent-record-edit-page { padding: 12px; }
    .ent-record-edit-page .container { padding: 14px; border-radius: 8px; }
    .ent-record-edit-page h1 { font-size: 20px; line-height: 1.2; margin: 0 0 10px; }
    .ent-record-edit-page h2 { font-size: 16px; margin: 14px 0 8px; }
    .ent-record-edit-page label { font-size: 14px; margin-bottom: 4px; }

    /* Inputy / selecty / textarea - touch + brak auto-zoom iOS */
    .ent-record-edit-page input[type="date"],
    .ent-record-edit-page input[type="number"],
    .ent-record-edit-page input[type="text"],
    .ent-record-edit-page textarea,
    .ent-record-edit-page select { font-size: 16px; min-height: 44px; padding: 8px 10px; }
    .ent-record-edit-page textarea { min-height: 90px; }

    /* Wyrozniona "ilosc okazow" - najwazniejsze pole na telefonie */
    .ent-record-edit-page input[name="ilosc"] {
        font-size: 18px; font-weight: 700; min-height: 48px;
        border: 2px solid #1976d2; background: #f5fbff;
    }

    /* Rzedy formularza na jedna kolumne (pokonuje inline flex:2 / flex:1 na .col) */
    .ent-record-edit-page .row { flex-direction: column; gap: 18px; margin-bottom: 10px; }
    .ent-record-edit-page .col { flex: 1 1 100% !important; min-width: 0 !important; width: 100%; }
    .ent-record-edit-page .col[style*="flex: 2"] { flex: 1 1 100% !important; }
    .ent-record-edit-page .record-observation-meta-row { display: flex; width: 100%; max-width: none; margin-left: 0; margin-right: 0; gap: 18px; }
    .ent-record-edit-page .record-origin-field,
    .ent-record-edit-page .record-acquisition-source-field,
    .ent-record-edit-page .record-observer-choice-field { justify-self: auto; }
    .ent-record-edit-page .record-observation-fields .record-plant-field .select2-container { width: 100% !important; }

    /* Dane podstawowe: ten sam, dwukolumnowy rytm co mobilne filtry rekordow. */
    .ent-record-edit-page .record-primary-fields {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 10px;
        align-items: end;
    }
    .ent-record-edit-page .record-primary-fields > .col { grid-column: 1 / -1; width: auto; }
    .ent-record-edit-page .record-primary-fields .record-date-field,
    .ent-record-edit-page .record-primary-fields .record-quantity-field,
    .ent-record-edit-page .record-primary-fields .record-sex-field { grid-column: span 1; }
    .ent-record-edit-page .record-primary-fields .record-plant-field { grid-column: 1 / -1; }
    .ent-record-edit-page .record-primary-fields > .col > input,
    .ent-record-edit-page .record-primary-fields > .col > select { width: 100%; box-sizing: border-box; min-height: 50px; }
    .ent-record-edit-page .record-primary-fields > .record-date-field input[type="date"] { width: 100%; box-sizing: border-box; }
    .ent-record-edit-page .record-primary-fields > .record-date-field input[type="date"] { font-size: 14px; }
    .ent-record-edit-page .record-primary-fields .record-quantity-field input,
    .ent-record-edit-page .record-primary-fields .record-sex-field select { width: 100%; box-sizing: border-box; }
    .ent-record-edit-page .record-primary-fields .select2-container--default .select2-selection--single { height: 50px; }
    .ent-record-edit-page .record-primary-fields .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 48px; }
    .ent-record-edit-page .record-primary-fields .select2-container--default .select2-selection--single .select2-selection__arrow { height: 48px; }

    .ent-record-edit-page .record-observation-meta-row { display: block; margin-top: 18px; }
    .ent-record-edit-page .record-origin-field,
    .ent-record-edit-page .record-acquisition-source-field,
    .ent-record-edit-page .record-observer-choice-field { width: 100%; margin: 0; }
    .ent-record-edit-page .record-observer-choice-field { margin-top: 18px; }
    .ent-record-edit-page .record-origin-switch,
    .ent-record-edit-page .record-observer-switch { display: grid; width: 100%; gap: 8px; }
    .ent-record-edit-page .record-origin-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ent-record-edit-page .record-observer-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ent-record-edit-page .record-origin-switch label,
    .ent-record-edit-page .record-observer-choice { min-height: 46px; padding: 8px 10px; font-size: 14px; text-align: center; }
    .ent-record-edit-page .record-origin-switch label { display: flex; align-items: center; justify-content: center; text-align: center; }

    /* Inline flex wrapper rosliny (select2 + przycisk "Wyczysc") - przelaczamy na pion */
    .ent-record-edit-page .row > .col > div[style*="display:flex"],
    .ent-record-edit-page .row > .col > div[style*="display: flex"] {
        flex-wrap: wrap; gap: 8px;
    }
    .ent-record-edit-page #clear-roslina { width: 100%; min-height: 44px; font-weight: 700; }

    /* Form wrapper - mniejszy padding na telefonie (mimo inline style w PHP) */
    .ent-record-edit-page #record-edit-form { padding: 12px !important; }

    /* Gorny pasek akcji rekordu: tytul -> akcje, glowny "Zapisz" widoczny od razu */
    .ent-record-edit-page .record-page-nav,
    .ent-record-edit-page .record-page-actions { flex-direction: column; align-items: stretch; gap: 8px; }
    .ent-record-edit-page .record-page-actions-left,
    .ent-record-edit-page .record-page-actions-right { flex-direction: column; align-items: stretch; gap: 8px; margin-left: 0; }
    .ent-record-edit-page .record-page-actions-bottom { margin-top: 14px; }
    .ent-record-edit-page .btn-compact,
    .ent-record-edit-page .record-page-nav .btn-link,
    .ent-record-edit-page .btn-dataset,
    .ent-record-edit-page .record-delete-row .btn-danger {
        width: 100%; min-height: 48px; font-size: 15px;
    }
    /* "Zapisz zmiany" wybity i podniesiony nad pozostale akcje gorne */
    .ent-record-edit-page .record-page-actions { order: 0; }
    .ent-record-edit-page .record-page-actions-right { order: -1; }
    .ent-record-edit-page .record-page-actions-right .btn-compact.btn-success {
        min-height: 52px; font-size: 16px; font-weight: 700;
    }

    /* select2 - pelna szerokosc i wieksze touch targety */
    .ent-record-edit-page .select2-container,
    .ent-record-edit-page .select2-container--default { width: 100% !important; max-width: 100%; }
    .ent-record-edit-page .select2-container--default .select2-selection--single { height: 44px; }
    .ent-record-edit-page .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 42px; font-size: 16px; padding-left: 10px;
    }
    .ent-record-edit-page .select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; }
    /* select2 dropdown (renderowany w body) - osobno, poza scope */

    /* Sekcja geo / mapa - widoczna ale nie zalewa ekranu */
    .ent-record-edit-page .geo-editor-box { padding: 10px; margin: 12px 0; }
    .ent-record-edit-page .geo-editor-map { height: 280px; }
    .ent-record-edit-page .geo-editor-controls { grid-template-columns: 1fr; gap: 8px; }
    .ent-record-edit-page #record-accuracy-range { height: 36px; padding: 0; }
    .ent-record-edit-page .geo-editor-hint { font-size: 12px; }

    /* Galeria zdjec rekordu - 2 kolumny dla szybkiego przegladu */
    .ent-record-edit-page .species-media-box { padding: 10px; }
    .ent-record-edit-page .species-media-top,
    .ent-record-edit-page .species-media-top-right { flex-direction: column; align-items: stretch; gap: 8px; }
    .ent-record-edit-page .species-media-toolbar { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
    .ent-record-edit-page .species-media-btn { min-height: 40px; padding: 8px 12px; }
    .ent-record-edit-page .species-media-btn-cancel { width: 40px; height: 40px; }
    .ent-record-edit-page .species-media-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

    /* Dolne nawigacje + delete row */
    .ent-record-edit-page .record-delete-row { flex-direction: column; align-items: stretch; gap: 8px; }

    /* Alerty czytelne */
    .ent-record-edit-page .alert { font-size: 14px; padding: 12px; margin-bottom: 12px; }

    /* Bottom spacer - zeby ostatnie akcje nie chowaly sie pod system bar / klawiatura */
    .ent-record-edit-page::after { content: ""; display: block; height: 64px; }
}

/* Mapa na tablecie / landscape - troche wyzsza niz mobile, ale nizsza niz desktop 360px */
@media (max-width: 900px) and (min-width: 769px) {
    .ent-record-edit-page .geo-editor-map { height: 320px; }
}

/* select2 dropdown jest portalowany do <body>, wiec poza scope .ent-record-edit-page.
   Dotykamy go tylko gdy strona macierzysta jest record-edit (body class), via :has()/sasiednie selectory niedostepne
   bezpiecznie -> stosujemy globalny tweak ograniczony do mobile breakpointu. */
@media (max-width: 768px) {
    body.ent-record-edit-page ~ .select2-container--open,
    .select2-container--open .select2-dropdown { max-width: 96vw; }
    .select2-container--open .select2-results__option { padding: 10px 12px; font-size: 16px; min-height: 40px; }
    .select2-container--open .select2-search--dropdown .select2-search__field {
        font-size: 16px; padding: 8px 10px; min-height: 40px;
    }
}

/* =========================================================
   ENTOMONE - stanowiska.php (CC D10, 2026-06-21)
   Wszystkie reguly namespacowane przez .ent-stanowiska-page
   Przeniesione 1:1 z inline <style> w stanowiska.php
   ========================================================= */
.ent-stanowiska-page * { box-sizing: border-box; }
.ent-stanowiska-page { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f4f7f6; margin: 0; padding: 20px; color: #333; }
.ent-stanowiska-page .container { max-width: 1200px; margin: 0 auto; background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.ent-stanowiska-page .topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ent-stanowiska-page .btn-back { display: inline-block; background: #3498db; color: #fff; padding: 8px 14px; border-radius: 5px; text-decoration: none; font-weight: 700; font-size: 14px; }
.ent-stanowiska-page .btn-back:hover { background: #2980b9; }
.ent-stanowiska-page h1 { margin: 0 0 4px 0; color: #2c3e50; }
.ent-stanowiska-page .subtitle { color: #607080; font-size: 14px; }
.ent-stanowiska-page .alert { border-radius: 8px; padding: 12px 14px; margin: 0 0 16px 0; }
.ent-stanowiska-page .alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.ent-stanowiska-page .alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.ent-stanowiska-page .sites-card { background: #fffaf3; border: 1px solid #f1d7ad; border-radius: 8px; padding: 18px; margin: 18px 0 0 0; }
.ent-stanowiska-page .sites-card-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.ent-stanowiska-page .sites-card-header-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ent-stanowiska-page .sites-card h2 { margin: 0; font-size: 22px; color: #2c3e50; }
.ent-stanowiska-page .sites-card-count { color: #8a6d3b; font-size: 13px; font-weight: 700; }
.ent-stanowiska-page .sites-delete-toggle { border: 0; background: #a94442; color: #fff; padding: 9px 14px; border-radius: 6px; cursor: pointer; font-weight: 700; font-size: 14px; }
.ent-stanowiska-page .sites-delete-toggle:hover { background: #8d2f2f; }
.ent-stanowiska-page .sites-delete-toolbar { display: none; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px 0; padding: 10px 12px; background: #fff3f2; border: 1px solid #f0c7c3; border-radius: 6px; }
.ent-stanowiska-page .sites-delete-wrap.delete-mode .sites-delete-toolbar { display: flex; }
.ent-stanowiska-page .sites-delete-toolbar.bottom { margin: 14px 0 0 0; }
.ent-stanowiska-page .sites-delete-confirm,
.ent-stanowiska-page .sites-delete-cancel { border: 0; padding: 8px 12px; border-radius: 6px; cursor: pointer; font-weight: 700; font-size: 13px; }
.ent-stanowiska-page .sites-delete-confirm { background: #a94442; color: #fff; }
.ent-stanowiska-page .sites-delete-confirm:hover { background: #8d2f2f; }
.ent-stanowiska-page .sites-delete-cancel { background: #d8dde3; color: #2c3e50; }
.ent-stanowiska-page .sites-delete-cancel:hover { background: #c7ced6; }
.ent-stanowiska-page .sites-delete-note { color: #7a4d11; font-size: 13px; }
.ent-stanowiska-page .sites-actions { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.ent-stanowiska-page .sites-actions a { display: inline-block; text-decoration: none; color: #fff; padding: 10px 14px; border-radius: 6px; font-weight: 700; font-size: 14px; }
.ent-stanowiska-page .sites-actions .btn-gallery-sites { background: #7b5ce1; }
.ent-stanowiska-page .sites-actions .btn-gallery-sites:hover { background: #6247bb; }
.ent-stanowiska-page .sites-actions .btn-map-all { background: #00a884; }
.ent-stanowiska-page .sites-actions .btn-map-all:hover { background: #00886b; }
.ent-stanowiska-page .site-add-form { margin: 0 0 16px 0; padding: 14px; background: #f7fbff; border: 1px solid #cfe0f4; border-radius: 8px; }
.ent-stanowiska-page .site-add-form-title { margin: 0 0 12px 0; color: #2c3e50; font-size: 16px; font-weight: 700; }
.ent-stanowiska-page .site-add-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-end; }
.ent-stanowiska-page .site-add-col { flex: 1 1 160px; min-width: 140px; }
.ent-stanowiska-page .site-add-col.wide { flex: 2 1 260px; }
.ent-stanowiska-page .site-add-col.submit { flex: 0 0 auto; }
.ent-stanowiska-page .site-add-col label { display: block; font-size: 12px; font-weight: 700; color: #607080; margin-bottom: 4px; }
.ent-stanowiska-page .site-add-col input { width: 100%; border: 1px solid #c7d6e5; border-radius: 6px; padding: 9px 10px; font-size: 14px; }
.ent-stanowiska-page .site-add-submit { border: 0; background: #27ae60; color: #fff; padding: 10px 14px; border-radius: 6px; cursor: pointer; font-weight: 700; font-size: 14px; }
.ent-stanowiska-page .site-add-submit:hover { background: #1f8d4d; }
.ent-stanowiska-page .sites-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ent-stanowiska-page .site-card { background: #fff; border: 1px solid #ead8bd; border-radius: 8px; overflow: hidden; color: #2c3e50; }
.ent-stanowiska-page .site-card-head { padding: 10px 12px; border-bottom: 1px solid #f0dfc4; background: #fff8ec; }
.ent-stanowiska-page .site-card-head-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.ent-stanowiska-page .site-thumb { display: block; position: relative; background: #f4eadc; aspect-ratio: 16 / 9; overflow: hidden; text-decoration: none; color: inherit; }
.ent-stanowiska-page .site-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ent-stanowiska-page .site-thumb-empty { height: 100%; display: flex; align-items: center; justify-content: center; color: #8a6d3b; font-size: 13px; font-weight: 700; padding: 16px; text-align: center; }
.ent-stanowiska-page .site-delete-pick { display: none; align-items: center; gap: 6px; font-size: 12px; color: #7a4d11; font-weight: 700; white-space: nowrap; }
.ent-stanowiska-page .sites-delete-wrap.delete-mode .site-delete-pick { display: inline-flex; }
.ent-stanowiska-page .site-delete-pick input { margin: 0; }
.ent-stanowiska-page .site-card-body { padding: 10px 12px 12px; }
.ent-stanowiska-page .site-photo-meta { color: #455a64; font-size: 12px; margin-bottom: 8px; line-height: 1.45; }
.ent-stanowiska-page .site-photo-line { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ent-stanowiska-page .site-photo-line .site-photo-gps-empty { color: #8a6d3b; }
.ent-stanowiska-page .site-photo-meta a { color: #1976d2; text-decoration: none; font-weight: 700; }
.ent-stanowiska-page .site-photo-meta a:hover { text-decoration: underline; }
.ent-stanowiska-page .site-visits { border-top: 1px solid #f0dfc4; margin-top: 8px; padding-top: 8px; font-size: 12px; color: #455a64; display: flex; align-items: flex-start; gap: 6px; flex-wrap: wrap; }
.ent-stanowiska-page .site-visits-title { font-weight: 700; color: #2c3e50; }
.ent-stanowiska-page .site-visits-list { display: flex; flex-wrap: wrap; gap: 5px; }
.ent-stanowiska-page .site-visit-link { display: inline-block; color: #7a4d11; background: #fff8ec; border: 1px solid #ead8bd; border-radius: 4px; padding: 3px 6px; text-decoration: none; font-weight: 700; }
.ent-stanowiska-page .site-visit-link:hover { background: #ffe9c4; color: #2c3e50; }
.ent-stanowiska-page .site-visits-empty { color: #8a6d3b; }
.ent-stanowiska-page .site-title { color: #7a4d11; text-decoration: none; font-weight: 700; line-height: 1.3; font-size: 14px; }
.ent-stanowiska-page .site-title:hover { color: #2c3e50; text-decoration: underline; }
.ent-stanowiska-page .sites-empty { padding: 14px; background: #fff; border-radius: 6px; color: #8a6d3b; }
@media (max-width: 1380px) {
    .ent-stanowiska-page .sites-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1040px) {
    .ent-stanowiska-page .sites-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .ent-stanowiska-page .sites-list { grid-template-columns: 1fr; }
}

/* =========================================================
   ENTOMONE - site_view.php (CC D11, 2026-06-21)
   Wszystkie reguly namespacowane przez .ent-site-view-page
   Przeniesione 1:1 z inline <style> w site_view.php + klasy
   pomocnicze dla zmigrowanych inline style=""
   ========================================================= */
.ent-site-view-page * { box-sizing: border-box; }
.ent-site-view-page { font-family: 'Outfit', 'Segoe UI', sans-serif; background: #f8f9fa; margin: 0; padding: 20px; color: #333; }
.ent-site-view-page .container { max-width: 1200px; margin: 0 auto; background: #fff; padding: 40px; border-radius: 16px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); }

.ent-site-view-page .header { background: linear-gradient(135deg, #1e3799 0%, #0984e3 100%); margin: -40px -40px 30px -40px; padding: 40px; border-radius: 16px 16px 0 0; color: #fff; }
.ent-site-view-page .header-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ent-site-view-page .header-title-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ent-site-view-page .site-nav-arrows { display: flex; align-items: center; gap: 8px; }
.ent-site-view-page .site-nav-arrow { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 999px; background: rgba(255,255,255,0.18); color: #fff; text-decoration: none; font-size: 20px; font-weight: 700; border: 1px solid rgba(255,255,255,0.25); }
.ent-site-view-page .site-nav-arrow:hover { background: rgba(255,255,255,0.28); }
.ent-site-view-page .site-nav-arrow.disabled { opacity: 0.35; cursor: default; pointer-events: none; }
.ent-site-view-page .header-actions { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.ent-site-view-page .header-actions a { display: inline-block; padding: 10px 14px; background: rgba(255,255,255,0.18); color: #fff; text-decoration: none; border-radius: 8px; font-weight: 700; font-size: 14px; border: 1px solid rgba(255,255,255,0.25); }
.ent-site-view-page .header-actions a:hover { background: rgba(255,255,255,0.28); }
.ent-site-view-page .loc-code { font-size: 14px; letter-spacing: 2px; opacity: 0.8; margin-bottom: 5px; }
.ent-site-view-page h1 { margin: 0; font-size: 30px; }
.ent-site-view-page .site-visit-date-badge { display: inline-flex; align-items: center; min-height: 32px; padding: 5px 11px; border: 1px solid rgba(255,255,255,0.32); border-radius: 999px; background: rgba(255,255,255,0.18); color: #ffffff; font-size: 14px; font-weight: 800; letter-spacing: 0.2px; }
.ent-site-view-page .alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.ent-site-view-page .alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }

.ent-site-view-page .stats-panel { display: flex; gap: 12px; margin-bottom: 22px; margin-top: -15px; }
.ent-site-view-page .stat-item { flex: 1; background: #fff; padding: 12px 14px; border-radius: 10px; box-shadow: 0 3px 5px rgba(0,0,0,0.018); border: 1px solid #edf2f7; text-align: center; }
.ent-site-view-page .stat-item span { display: block; font-size: 10px; color: #718096; text-transform: uppercase; font-weight: bold; margin-bottom: 3px; line-height: 1.2; }
.ent-site-view-page .stat-item strong { font-size: 18px; line-height: 1.2; color: #2d3436; }
.ent-site-view-page .obs-dates-strong { font-size: 13px !important; line-height: 1.2; letter-spacing: 0; }

.ent-site-view-page .records-list { margin-top: 20px; }
.ent-site-view-page .records-list h3 { margin: 0 0 10px 0; color: #2c3e50; }
.ent-site-view-page .record-row { display: grid; grid-template-columns: 78px 112px minmax(260px, 1fr) auto; gap: 12px; align-items: center; padding: 7px 10px; border-bottom: 1px solid #edf2f7; transition: 0.2s; color: inherit; }
.ent-site-view-page .record-row:hover { background: #f5f7fa; }
.ent-site-view-page .record-id { font-size: 12px; font-weight: 700; color: #1e3799; text-decoration: none; }
.ent-site-view-page .record-id:hover { text-decoration: underline; }
.ent-site-view-page .record-date { font-size: 12px; color: #607080; }
.ent-site-view-page .record-species { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ent-site-view-page .record-species strong { display: inline; font-size: 14px; font-style: italic; color: #2c3e50; line-height: 1.2; }
.ent-site-view-page .record-species span { display: inline; font-size: 11px; color: #7f8c8d; line-height: 1.2; margin-top: 0; }
.ent-site-view-page .site-record-species-link { display: inline-block; text-decoration: none; }
.ent-site-view-page .site-record-species-link:hover strong { color: #1e78d7; text-decoration: underline; }
.ent-site-view-page .record-meta { display: flex; justify-content: flex-end; gap: 6px; white-space: nowrap; text-align: right; font-size: 12px; color: #455a64; line-height: 1.25; }
.ent-site-view-page .record-empty { padding: 16px; text-align: center; color: #a4b0be; }
.ent-site-view-page .taxa-list { display: none; }
.ent-site-view-page .taxa-empty { padding: 40px; text-align: center; color: #a4b0be; }

.ent-site-view-page .btn-back { display: inline-block; margin-top: 40px; padding: 12px 30px; background: #2d3436; color: #fff; text-decoration: none; border-radius: 8px; font-weight: bold; transition: 0.3s; }
.ent-site-view-page .btn-back:hover { background: #000; transform: translateY(-2px); }
.ent-site-view-page .btn-back-row-hidden { text-align: center; display: none; }
.ent-site-view-page .date-link { color: #0984e3; text-decoration: none; border-bottom: 1px dotted #0984e3; transition: 0.2s; }
.ent-site-view-page .date-link:hover { color: #1e3799; border-bottom-style: solid; }
.ent-site-view-page .site-media-box { background: #f8f9fa; border: 1px solid #e4e7eb; border-radius: 8px; padding: 14px; margin: 10px 0 20px; }
.ent-site-view-page .site-media-top { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 10px; flex-wrap: wrap; }
.ent-site-view-page .site-media-title { font-weight: 700; color: #2c3e50; }
.ent-site-view-page .site-media-count { font-size: 13px; color: #627181; }
.ent-site-view-page .site-connect-box { background: #f4fbf7; border: 1px solid #bddfc9; border-radius: 8px; padding: 16px; margin: 0 0 20px; }
.ent-site-view-page .site-connect-title { font-weight: 800; color: #183f2a; margin-bottom: 6px; font-size: 16px; }
.ent-site-view-page .site-connect-note { font-size: 14px; line-height: 1.45; color: #365342; margin-bottom: 12px; max-width: 920px; }
.ent-site-view-page .site-connect-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #d7e8dc; border-radius: 8px; overflow: hidden; font-size: 14px; }
.ent-site-view-page .site-connect-table th { text-align: left; background: #e8f5ec; color: #183f2a; font-size: 12px; text-transform: uppercase; letter-spacing: .02em; padding: 9px 10px; border-bottom: 1px solid #d7e8dc; }
.ent-site-view-page .site-connect-table td { padding: 9px 10px; border-bottom: 1px solid #edf4ef; vertical-align: middle; }
.ent-site-view-page .site-connect-table tr:last-child td { border-bottom: 0; }
.ent-site-view-page .site-connect-table a { color: #1e3799; font-weight: 700; text-decoration: none; }
.ent-site-view-page .site-connect-table a:hover { text-decoration: underline; }
.ent-site-view-page .site-connect-form { margin-top: 12px; }
.ent-site-view-page .site-connect-submit { border: 0; border-radius: 6px; background: #198754; color: #fff; font-weight: 800; padding: 11px 16px; cursor: pointer; font-size: 14px; }
.ent-site-view-page .site-connect-submit:hover { background: #146c43; }
.ent-site-view-page .site-connect-empty { color: #607080; font-size: 13px; padding-top: 4px; }
.ent-site-view-page .site-edit-box { background: #fffaf3; border: 1px solid #ead8bd; border-radius: 8px; padding: 14px; margin: 0 0 20px; }
.ent-site-view-page .site-edit-title { font-weight: 700; color: #2c3e50; margin-bottom: 10px; }
.ent-site-view-page .site-edit-row { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.ent-site-view-page .site-edit-col { flex: 1 1 150px; min-width: 130px; }
.ent-site-view-page .site-edit-col.wide { flex: 2 1 260px; }
.ent-site-view-page .site-edit-col.submit { flex: 0 0 auto; }
.ent-site-view-page .site-edit-col label { display: block; font-size: 12px; font-weight: 700; color: #607080; margin-bottom: 4px; }
.ent-site-view-page .site-edit-col input { width: 100%; border: 1px solid #c7d6e5; border-radius: 6px; padding: 9px 10px; font-size: 14px; }
.ent-site-view-page .site-edit-submit { border: 0; background: #27ae60; color: #fff; padding: 10px 14px; border-radius: 6px; cursor: pointer; font-weight: 700; font-size: 14px; }
.ent-site-view-page .site-edit-submit:hover { background: #1f8d4d; }
.ent-site-view-page .geo-editor-map { height: 360px; border-radius: 8px; overflow: hidden; border: 1px solid #c7d6e5; margin: 0 0 10px; }
.ent-site-view-page .geo-editor-hint { color: #607080; font-size: 12px; margin-top: 8px; }
.ent-site-view-page .site-media-link { font-size: 13px; color: #1976d2; text-decoration: none; font-weight: 600; }
.ent-site-view-page .site-media-link:hover { text-decoration: underline; }
.ent-site-view-page .site-media-link-row { margin-top: 10px; }
.ent-site-view-page .site-media-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 18px; }
.ent-site-view-page .site-media-item { background: #fff; border: 1px solid #d9dee3; border-radius: 6px; overflow: hidden; }
.ent-site-view-page .site-media-thumb { position: relative; display: block; border-radius: 6px; overflow: hidden; border: 1px solid #d9dee3; background: #fff; aspect-ratio: 16 / 9; }
.ent-site-view-page .site-media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ent-site-view-page .site-media-missing { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 16px; text-align: center; color: #7a8793; background: #f3f5f7; font-size: 13px; }
.ent-site-view-page .site-media-primary { position: absolute; top: 8px; right: 8px; background: rgba(255,193,7,.93); color: #222; font-size: 11px; padding: 3px 6px; border-radius: 4px; font-weight: 700; z-index: 2; }
.ent-site-view-page .site-media-actions { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 8px 10px; border-top: 1px solid #e7ebef; background: #fbfcfd; }
.ent-site-view-page .site-media-actions-left,
.ent-site-view-page .site-media-actions-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ent-site-view-page .site-media-action-form { margin: 0; }
.ent-site-view-page .site-media-action-btn { border: 0; background: transparent; cursor: pointer; padding: 0; font-size: 12px; font-weight: 600; color: #6b7785; }
.ent-site-view-page .site-media-action-btn:hover { color: #2c3e50; text-decoration: underline; }
.ent-site-view-page .site-media-action-btn.delete { color: #a94442; }
.ent-site-view-page .site-media-action-btn.delete:hover { color: #7f1d1d; }
.ent-site-view-page .site-media-action-current { font-size: 12px; font-weight: 700; color: #2e7d32; }
.ent-site-view-page .site-media-empty { font-size: 13px; color: #7a8793; padding: 8px 0; }

/* Action buttons row (zmigrowane z inline style="") */
.ent-site-view-page .site-view-actions { margin-bottom: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.ent-site-view-page .site-view-action { display: inline-block; padding: 12px 20px; color: #fff; text-decoration: none; border-radius: 6px; font-weight: bold; transition: 0.3s; }
.ent-site-view-page .site-view-action.btn-gallery-site { background: #0984e3; }
.ent-site-view-page .site-view-action.btn-gallery-site:hover { background: #086fbf; }
.ent-site-view-page .site-view-action.btn-map-site { background: #00b894; }
.ent-site-view-page .site-view-action.btn-map-site:hover { background: #009b7d; }
.ent-site-view-page .site-view-action.btn-add-media { background: #6c5ce7; }
.ent-site-view-page .site-view-action.btn-add-media:hover { background: #5848c2; }

@media (max-width: 900px) {
    .ent-site-view-page .site-media-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}

@media (min-width: 561px) and (max-width: 768px) {
    .ent-record-edit-page .geo-editor-controls {
        grid-template-columns: 1fr;
        grid-template-areas:
            "locality"
            "latitude"
            "longitude"
            "elevation"
            "decimal"
            "dms";
    }
    .ent-record-edit-page .geo-editor-locality { grid-template-columns: minmax(0, 1fr) auto; }
    .ent-record-edit-page .geo-editor-locality .geo-editor-radius { grid-column: 1; }
    .ent-record-edit-page .geo-editor-locality .geo-editor-accuracy { grid-column: 2; }
}
@media (max-width: 560px) {
    .ent-site-view-page .site-media-grid { grid-template-columns: 1fr; }
    .ent-site-view-page .site-media-actions { flex-direction: column; align-items: flex-start; }
    .ent-site-view-page .site-media-actions-left,
    .ent-site-view-page .site-media-actions-right { width: 100%; justify-content: flex-start; }
    .ent-site-view-page .site-connect-box { overflow-x: auto; }
    .ent-site-view-page .site-connect-table { min-width: 560px; }
    .ent-site-view-page .record-row { grid-template-columns: 1fr; gap: 4px; }
    .ent-site-view-page .record-meta { text-align: left; }
}

/* =========================================================
   ENTOMONE - site_gallery.php (CC D12, 2026-06-21)
   Wszystkie reguly namespacowane przez .ent-site-gallery-page
   Przeniesione 1:1 z inline <style> w site_gallery.php
   ========================================================= */
.ent-site-gallery-page { font-family: Arial, sans-serif; background: #f4f6f8; margin: 0; padding: 20px; }
.ent-site-gallery-page .wrap { max-width: 1220px; margin: 0 auto; }
.ent-site-gallery-page .top { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.08); margin-bottom: 16px; }
.ent-site-gallery-page .topbar { display: flex; justify-content: flex-end; align-items: flex-start; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.ent-site-gallery-page .topbar-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; align-items: center; }
.ent-site-gallery-page .top h1 { margin: 8px 0 0 0; }
.ent-site-gallery-page .site-gallery-title-card { padding: 24px 28px; border-radius: 10px; background: linear-gradient(135deg, #173f68, #237dc0); color: #fff; }
.ent-site-gallery-page .site-gallery-title-kicker { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .82; }
.ent-site-gallery-page .site-gallery-title-card h1 { margin: 0; color: #fff; font-size: clamp(25px, 3vw, 34px); line-height: 1.15; }
.ent-site-gallery-page .btn-back { display: inline-block; background: #eceff1; color: #263238; text-decoration: none; border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.ent-site-gallery-page .sec { margin-top: 18px; }
.ent-site-gallery-page .sec h2 { margin: 0 0 10px 0; font-size: 20px; }
.ent-site-gallery-page .site-gallery-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.ent-site-gallery-page .site-gallery-section-heading h2 { margin: 0; }
.ent-site-gallery-page .site-gallery-section-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ent-site-gallery-page .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ent-site-gallery-page .card { position: relative; background: #fff; border: 1px solid #dce3e8; border-radius: 10px; overflow: hidden; }
.ent-site-gallery-page .card a { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.ent-site-gallery-page .card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ent-site-gallery-page .code { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 3px 7px; border-radius: 4px; }
.ent-site-gallery-page .badge { position: absolute; right: 8px; top: 8px; background: rgba(255,193,7,.93); color: #222; font-size: 11px; padding: 3px 6px; border-radius: 4px; font-weight: 700; }
.ent-site-gallery-page .gps { position: absolute; right: 8px; bottom: 8px; background: rgba(25,118,210,.92); color: #fff; font-size: 11px; padding: 3px 6px; border-radius: 4px; }
.ent-site-gallery-page .pick { position: absolute; left: 8px; top: 8px; z-index: 3; display: none; background: rgba(255,255,255,.92); border-radius: 4px; padding: 2px 4px; }
.ent-site-gallery-page #siteGalleryForm.delete-mode .pick { display: block; }
.ent-site-gallery-page .toolbar { display: inline-flex; gap: 8px; align-items: center; background: rgba(255,255,255,.96); border: 1px solid #d6dde2; border-radius: 10px; padding: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.ent-site-gallery-page .btn-del-mode { background: #8d6e63; color: #fff; border: 0; border-radius: 6px; padding: 8px 12px; cursor: pointer; }
.ent-site-gallery-page .btn-danger { background: #d32f2f; color: #fff; border: 0; border-radius: 6px; padding: 8px 12px; cursor: pointer; display: none; }
.ent-site-gallery-page .btn-cancel { background: #b0bec5; color: #263238; border: 0; border-radius: 6px; padding: 0; width: 32px; height: 32px; cursor: pointer; display: none; font-size: 20px; line-height: 1; }
.ent-site-gallery-page #siteGalleryForm.delete-mode .btn-danger,
.ent-site-gallery-page #siteGalleryForm.delete-mode .btn-cancel { display: inline-block; }
.ent-site-gallery-page .notice { background: #e8f5e9; border: 1px solid #c8e6c9; color: #1b5e20; border-radius: 8px; padding: 10px; margin-bottom: 12px; }
.ent-site-gallery-page .meta { font-size: 12px; padding: 10px; color: #455a64; }
.ent-site-gallery-page .meta div { margin-bottom: 4px; }
.ent-site-gallery-page .meta .gps-line { white-space: nowrap; }
.ent-site-gallery-page .meta .gps-line a { font-weight: 700; }
.ent-site-gallery-page .empty { background: #fff; border-radius: 10px; padding: 34px; color: #607d8b; text-align: center; }
.ent-site-gallery-page .site-gallery-landscape-grid,
.ent-site-gallery-page .site-gallery-fauna-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 280px));
    gap: 14px;
    align-items: start;
}
.ent-site-gallery-page .site-gallery-landscape-card,
.ent-site-gallery-page .site-gallery-fauna-card {
    min-width: 0;
    align-self: start;
    overflow: hidden;
    border: 1px solid #dce3e8;
    border-radius: 8px;
    background: #fff;
}
.ent-site-gallery-page .site-gallery-landscape-photo,
.ent-site-gallery-page .site-gallery-fauna-photo {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.ent-site-gallery-page .site-gallery-landscape-photo img,
.ent-site-gallery-page .site-gallery-fauna-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ent-site-gallery-page .site-gallery-landscape-meta,
.ent-site-gallery-page .site-gallery-fauna-name {
    padding: 10px;
    color: #455a64;
    font-size: 12px;
}
.ent-site-gallery-page .site-gallery-landscape-meta > div { margin: 0 0 4px; }
.ent-site-gallery-page .site-gallery-landscape-meta > div:last-child { margin-bottom: 0; }
.ent-site-gallery-page .site-gallery-fauna-name { min-height: 38px; font-weight: 700; }
@media (max-width: 640px) {
    .ent-site-gallery-page .site-gallery-title-card { padding: 20px; }
    .ent-site-gallery-page .site-gallery-section-heading { align-items: flex-start; flex-direction: column; }
    .ent-site-gallery-page .site-gallery-section-actions { justify-content: flex-start; }
}
@media (min-width: 301px) and (max-width: 768px) {
    .ent-site-gallery-page .site-gallery-landscape-grid,
    .ent-site-gallery-page .site-gallery-fauna-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 300px) {
    .ent-site-gallery-page .site-gallery-landscape-grid,
    .ent-site-gallery-page .site-gallery-fauna-grid { grid-template-columns: minmax(0, 1fr); }
}

/* === D13: media_picker.php — scoped under .ent-media-picker-page === */
.ent-media-picker-page, .ent-media-picker-page * { box-sizing: border-box; }
.ent-media-picker-page { margin: 0; font-family: Arial, sans-serif; }
.ent-media-picker-page .modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 10000; }
.ent-media-picker-page .container { background: #fff; border-radius: 12px; width: 92%; max-width: 1200px; height: 85vh; display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }
.ent-media-picker-page .header { padding: 16px 20px; border-bottom: 1px solid #e0e0e0; display: flex; justify-content: space-between; align-items: center; }
.ent-media-picker-page .header h2 { margin: 0; font-size: 18px; }
.ent-media-picker-page .close { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: #666; }
.ent-media-picker-page .tabs { display: flex; border-bottom: 1px solid #ddd; background: #f9f9f9; }
.ent-media-picker-page .tab { flex: 1; padding: 12px; background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; font-weight: 600; color: #666; }
.ent-media-picker-page .tab.active { color: #1976d2; border-bottom-color: #1976d2; }
.ent-media-picker-page .camera-tab svg { display: block; width: 22px; height: 22px; margin: 0 auto; }
.ent-media-picker-page .content { flex: 1; overflow-y: auto; padding: 16px 20px; }
.ent-media-picker-page .pane { display: none; }
.ent-media-picker-page .pane.active { display: block; }
.ent-media-picker-page .upload { border: 2px dashed #1976d2; border-radius: 8px; padding: 40px; text-align: center; cursor: pointer; background: #f0f7ff; }
.ent-media-picker-page .upload.dragover { background: #e3f2fd; border-color: #0d47a1; }
.ent-media-picker-page .upload-icon { font-size: 42px; }
@media (min-width: 901px) {
    .ent-media-picker-page .tab[data-tab="camera"],
    .ent-media-picker-page .pane[data-pane="camera"] { display: none !important; }
}
.ent-media-picker-page .upload-helper { margin-top: 8px; font-size: 12px; color: #5f6b76; }
.ent-media-picker-page .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.ent-media-picker-page .item { position: relative; cursor: pointer; border-radius: 6px; overflow: hidden; border: 3px solid transparent; background: #f2f2f2; }
.ent-media-picker-page .media-thumb-wrap { position: relative; background: #e9eef3; }
.ent-media-picker-page .item img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; display: block; }
.ent-media-picker-page .item.sel { border-color: #1976d2; }
.ent-media-picker-page .badge { position: absolute; top: 6px; right: 6px; background: #4caf50; color: #fff; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.ent-media-picker-page .code { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,0.72); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.ent-media-picker-page .chip { position: absolute; left: 6px; bottom: 6px; background: rgba(25,118,210,0.9); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.ent-media-picker-page .chip-gps { position: absolute; right: 6px; bottom: 6px; background: rgba(76,175,80,.95); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.ent-media-picker-page .meta { padding: 7px 8px; font-size: 11px; color: #444; background: #fff; line-height: 1.35; }
.ent-media-picker-page .meta .name { font-weight: 700; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ent-media-picker-page .meta .line { color: #627181; }
.ent-media-picker-page .media-usage { margin-top: 8px; padding-top: 8px; border-top: 1px solid #e4e9ef; }
.ent-media-picker-page .media-usage-title { margin-bottom: 5px; color: #34495e; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.ent-media-picker-page .media-usage-row { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.ent-media-picker-page .media-usage-row:first-of-type { margin-top: 0; }
.ent-media-picker-page .media-usage-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ent-media-picker-page .media-usage-link { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border-radius: 5px; background: #eef4fb; color: #1f5f99; font-size: 11px; font-weight: 800; text-decoration: none; }
.ent-media-picker-page .media-usage-link-site { background: #edf7ee; color: #256a31; }
.ent-media-picker-page .media-usage-link-species { background: #fff4e5; color: #9a5b05; }
.ent-media-picker-page .media-usage-link:hover { text-decoration: underline; }
.ent-media-picker-page .media-usage-edit { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border-radius: 5px; background: #e67e22; color: #fff; font-size: 11px; font-weight: 800; text-decoration: none; }
.ent-media-picker-page .media-usage-edit:hover { background: #cf6d17; }
.ent-media-picker-page .media-usage-detail { color: #526173; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ent-media-picker-page .media-usage-orphaned { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border-radius: 5px; background: #f5f6f7; color: #7b8794; font-size: 11px; font-weight: 700; }
.ent-media-picker-page .library-manage-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 10px 12px; background: #eef6ff; border: 1px solid #cfe3fb; border-radius: 8px; }
.ent-media-picker-page .library-manage-link { display: inline-flex; align-items: center; justify-content: center; padding: 9px 12px; background: #1976d2; color: #fff; border-radius: 6px; font-weight: 700; text-decoration: none; }
.ent-media-picker-page .library-manage-link:hover { background: #0d5fab; }
.ent-media-picker-page .library-manage-link-secondary { background: #5f6f83; }
.ent-media-picker-page .library-manage-link-secondary:hover { background: #465568; }
.ent-media-picker-page .library-manage-note { flex: 1 1 280px; color: #425466; font-size: 13px; line-height: 1.35; }
.ent-media-picker-page .footer-left-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-right: auto; }
.ent-media-picker-page .footer-orphaned-link { color: #1976d2; font-weight: 700; text-decoration: none; }
.ent-media-picker-page .footer-orphaned-link:hover { text-decoration: underline; }
.ent-media-picker-page .filters { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 8px; align-items: center; }
.ent-media-picker-page .filters input, .ent-media-picker-page .filters select, .ent-media-picker-page .filters button { padding: 8px; border: 1px solid #ccc; border-radius: 6px; font-size: 13px; }
.ent-media-picker-page .filters .search-input { padding: 10px 12px; }
.ent-media-picker-page .filters button { background: #1976d2; color: #fff; border-color: #1976d2; cursor: pointer; }
.ent-media-picker-page .filters button.secondary { background: #f7f7f7; color: #333; border-color: #ccc; }
.ent-media-picker-page .filters-actions { display: flex; gap: 8px; grid-column: span 5; }
.ent-media-picker-page .media-search-highlight { grid-column: span 2; }
.ent-media-picker-page .footer { padding: 12px 16px; border-top: 1px solid #e0e0e0; display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.ent-media-picker-page .btn { padding: 10px 16px; border: 0; border-radius: 4px; cursor: pointer; font-weight: 600; }
.ent-media-picker-page .btn-s { background: #e0e0e0; color: #333; }
.ent-media-picker-page .btn-p { background: #1976d2; color: #fff; }
.ent-media-picker-page .btn-d { background: #c62828; color: #fff; }
.ent-media-picker-page .btn-p:disabled { background: #b0bec5; cursor: not-allowed; }
.ent-media-picker-page .btn-d:disabled { background: #ef9a9a; cursor: not-allowed; }
.ent-media-picker-page .primary-toggle { margin-right: auto; font-size: 13px; color: #444; user-select: none; }
.ent-media-picker-page .status { font-size: 12px; color: #666; margin-left: 8px; padding: 6px 10px; border-radius: 6px; transition: .2s; }
.ent-media-picker-page .status.is-success { background: #e8f5e9; color: #1b5e20; }
.ent-media-picker-page .status.is-error { background: #fdecea; color: #8b1e1e; }
.ent-media-picker-page .status.is-info { background: #eef4fb; color: #1f4f82; }
.ent-media-picker-page .app-dialog-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.38); display: none; align-items: center; justify-content: center; z-index: 20000; }
.ent-media-picker-page .app-dialog-backdrop.open { display: flex; }
.ent-media-picker-page .app-dialog { width: min(520px, calc(100vw - 32px)); background: #fff; border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,0.24); overflow: hidden; }
.ent-media-picker-page .app-dialog-head { padding: 16px 18px 10px; font-size: 18px; font-weight: 700; color: #22313f; }
.ent-media-picker-page .app-dialog-body { padding: 0 18px 18px; color: #425466; line-height: 1.5; white-space: pre-line; }
.ent-media-picker-page .app-dialog-actions { padding: 14px 18px 18px; display: flex; justify-content: flex-end; gap: 18px; }
.ent-media-picker-page .app-dialog-btn { padding: 10px 16px; border: 0; border-radius: 8px; cursor: pointer; font-weight: 700; }
.ent-media-picker-page .app-dialog-btn.secondary { background: #e8edf1; color: #334155; }
.ent-media-picker-page .app-dialog-btn.danger { background: #c62828; color: #fff; }
.ent-media-picker-page .app-dialog-btn.primary { background: #1976d2; color: #fff; }
.ent-media-picker-page input[type="file"] { display: none; }
@media (max-width: 960px) {
    .ent-media-picker-page .filters { grid-template-columns: 1fr 1fr; }
    .ent-media-picker-page .media-search-highlight { grid-column: span 2; }
}

/* === D14: dictionaries.php — cleanup of inline style="" attrs, scoped under .ent-dictionaries-page === */
.ent-dictionaries-page .btn-home { float: right; padding: 10px 20px; background: #3498db; color: white; text-decoration: none; border-radius: 5px; font-weight: bold; }
.ent-dictionaries-page .viewer-warning { background: #fff3cd; color: #856404; padding: 15px; border-radius: 6px; border: 1px solid #ffeeba; margin-bottom: 20px; }
.ent-dictionaries-page .inline-edit.form-add { background: #e8f4fd; border-color: #3498db; }
.ent-dictionaries-page .dict-hidden { display: none; }
.ent-dictionaries-page .dict-edit-row { display: none; }
.ent-dictionaries-page .h-35 { height: 35px; }
.ent-dictionaries-page .col-flex-2 { flex: 2; }
.ent-dictionaries-page .col-flex-auto { flex: 0 0 auto; }
.ent-dictionaries-page .btn-save.btn-save-green { background: #27ae60; }
.ent-dictionaries-page .form-inline { display: inline; }
.ent-dictionaries-page .btn-icon-sm { padding: 5px 8px; font-size: 11px; }
.ent-dictionaries-page .lock-icon { opacity: 0.3; }
.ent-dictionaries-page .map-link-row { text-align: center; margin-top: 10px; }
.ent-dictionaries-page .btn-map { display: inline-block; padding: 7px 14px; background: #2a6fbe; color: #fff; text-decoration: none; border-radius: 7px; font-weight: 600; }
.ent-dictionaries-page .map-badge { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 24px; border: 1px solid #9bb3c9; border-radius: 4px; background: linear-gradient(135deg, #cfe8ff, #e9f4ff); font-size: 16px; line-height: 1; }
.ent-dictionaries-page .no-gps { opacity: 0.45; }
.ent-dictionaries-page .plant-link { color: #27ae60; text-decoration: none; font-weight: bold; font-style: italic; border-bottom: 1px dashed #27ae60; }

/* === D15: record_view.php - scoped under .ent-record-view-page === */
.ent-record-view-page, .ent-record-view-page * { box-sizing: border-box; }
.ent-record-view-page { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #e0e5ec; margin: 0; padding: 20px; color: #333; }
.ent-record-view-page .container { max-width: 1200px; margin: 30px auto; background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-top: 5px solid #2c3e50; }
.ent-record-view-page .header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #eee; padding-bottom: 20px; margin-bottom: 30px; gap: 16px; }
.ent-record-view-page .header-main { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.ent-record-view-page h1 { margin: 0; font-size: 28px; color: #2c3e50; }
.ent-record-view-page .badge-id { background: #2c3e50; color: #fff; padding: 5px 15px; border-radius: 20px; font-size: 18px; font-weight: bold; letter-spacing: 1px; }
.ent-record-view-page .record-id-nav { display: inline-flex; align-items: center; gap: 10px; }
.ent-record-view-page .record-nav-arrow { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: #ecf0f1; color: #2c3e50; font-size: 30px; font-weight: 800; line-height: 1; text-decoration: none; }
.ent-record-view-page .record-nav-arrow:hover { background: #d9e2ea; color: #1f2d3a; }
.ent-record-view-page .record-nav-arrow.disabled { opacity: 0.35; cursor: default; }
.ent-record-view-page .header-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 18px; }
.ent-record-view-page .data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 30px; }
.ent-record-view-page .data-group { background: #f8f9fa; padding: 20px; border-radius: 8px; border-left: 3px solid #3498db; }
.ent-record-view-page .data-group.data-group-accent { border-left-color: #e67e22; }
.ent-record-view-page .data-row { margin-bottom: 12px; }
.ent-record-view-page .data-row:last-child { margin-bottom: 0; }
.ent-record-view-page .label { display: block; font-size: 11px; color: #7f8c8d; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.ent-record-view-page .val { font-size: 16px; color: #2d3436; font-weight: 500; }
.ent-record-view-page .val.val-large { font-size: 16px; }
.ent-record-view-page .ent-utm-value { font-family: inherit; font-size: inherit; font-weight: 700; color: inherit; }
.ent-record-view-page .val-link { color: #3498db; text-decoration: none; font-weight: bold; }
.ent-record-view-page .val-link:hover { text-decoration: underline; }
.ent-record-view-page .val-link.val-link-plant { color: #27ae60; }
.ent-record-view-page .species-name { font-style: italic; font-size: 18px; }
.ent-record-view-page .species-author { font-size: 13px; color: #7f8c8d; }
.ent-record-view-page .species-italic { font-style: italic; }
.ent-record-view-page .plec-tag { color: #c0392b; margin-left: 10px; }
.ent-record-view-page .coords-line { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ent-record-view-page .coords-copy-btn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #cfd6dd; border-radius: 4px; background: #f4f5f6; color: #3f454b; cursor: pointer; padding: 0; vertical-align: middle; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.ent-record-view-page .coords-copy-btn:hover { background: #e9ecef; border-color: #aeb7c0; color: #1f2328; }
.ent-record-view-page .coords-copy-btn svg { width: 18px; height: 18px; stroke: currentColor; }
.ent-record-view-page .coords-copy-btn.copied { background: #e8f8ee; border-color: #8fd3a8; color: #1f6f43; }
.ent-record-view-page .coords-map-link { color: #2d3436; text-decoration: none; border-bottom: 1px dotted #95a5a6; }
.ent-record-view-page .coords-map-link:hover { color: #1976d2; border-bottom-color: #1976d2; }
.ent-record-view-page .notes-box { background: #fff9db; padding: 20px; border-radius: 8px; border: 1px solid #f1c40f; margin-bottom: 20px; }
.ent-record-view-page .notes-box h3 { margin-top: 0; font-size: 14px; color: #d35400; text-transform: uppercase; margin-bottom: 10px; }
.ent-record-view-page .notes-content { font-size: 15px; color: #333; }
.ent-record-view-page .desc-box { background: #e8f4f8; padding: 20px; border-radius: 8px; border: 1px solid #bdc3c7; margin-bottom: 30px; }
.ent-record-view-page .desc-box h3 { margin-top: 0; font-size: 14px; color: #2980b9; text-transform: uppercase; margin-bottom: 10px; }
.ent-record-view-page .desc-content { font-size: 14px; line-height: 1.5; color: #2c3e50; }
.ent-record-view-page .alert-success, .ent-record-view-page .alert-error { padding: 14px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.ent-record-view-page .alert-success { background: #e8f8ee; border: 1px solid #b7dfc5; color: #1f6f43; }
.ent-record-view-page .alert-error { background: #fdecea; border: 1px solid #f5c6cb; color: #8a1f2d; }
.ent-record-view-page .btn-back { display: inline-block; padding: 12px 30px; background: #34495e; color: #fff; text-decoration: none; border-radius: 5px; font-weight: bold; transition: 0.3s; text-align: center; }
.ent-record-view-page .btn-back:hover { background: #2c3e50; transform: translateY(-2px); }
.ent-record-view-page .container > .btn-back { display: none; }
.ent-record-view-page .header-actions .btn-back { display: inline-block; }
.ent-record-view-page .btn-edit { display: inline-block; padding: 12px 30px; background: #27ae60; color: #fff; text-decoration: none; border-radius: 5px; font-weight: bold; transition: 0.3s; text-align: center; }
.ent-record-view-page .btn-edit:hover { background: #1f8a4d; transform: translateY(-2px); }
.ent-record-view-page .record-view-trip-copy-form { margin: 20px 0 0; }
.ent-record-view-page .record-view-trip-copy-button { width: 100%; min-height: 58px; padding: 10px 14px; border: 1px solid #1f7a50; border-radius: 6px; background: #278257; color: #fff; font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.ent-record-view-page .record-view-trip-copy-button:hover, .ent-record-view-page .record-view-trip-copy-button:focus-visible { background: #1f704a; }
.ent-record-view-page .record-view-trip-copy-button span, .ent-record-view-page .record-view-trip-copy-button small { display: block; }
.ent-record-view-page .record-view-trip-copy-button span { font-size: 15px; }
.ent-record-view-page .record-view-trip-copy-button small { margin-top: 3px; font-size: 12px; font-weight: 400; opacity: .92; }
.ent-record-view-page .bottom-actions { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 24px; }
.ent-record-view-page .bottom-actions .btn-back { display: inline-block; }
.ent-record-view-page .record-view-delete-form { margin-left: auto; }
.ent-record-view-page .record-view-delete-button {
    min-height: 44px;
    padding: 11px 22px;
    border: 1px solid #a52c28;
    border-radius: 5px;
    background: #b63731;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s, transform .2s;
}
.ent-record-view-page .record-view-delete-button:hover,
.ent-record-view-page .record-view-delete-button:focus-visible {
    background: #982b26;
    transform: translateY(-2px);
}
.ent-record-view-page .tag { display: inline-block; padding: 3px 8px; border-radius: 12px; font-size: 12px; font-weight: bold; color: #fff; }
.ent-record-view-page .tag-n { background: #e74c3c; }
.ent-record-view-page .tag-h { background: #95a5a6; }
.ent-record-view-page .media-section { margin-bottom: 30px; }
.ent-record-view-page .media-section h3 { margin-top: 0; font-size: 16px; color: #2c3e50; border-bottom: 2px solid #3498db; padding-bottom: 10px; }
.ent-record-view-page .media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 15px; }
.ent-record-view-page .media-thumb { position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.1); cursor: pointer; transition: all 0.3s; border: 2px solid transparent; aspect-ratio: 16 / 9; }
.ent-record-view-page .media-thumb:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.ent-record-view-page .media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ent-record-view-page .media-thumb.is-primary::after { content: '\2605'; position: absolute; top: 4px; right: 4px; background: #ffc107; color: #333; padding: 2px 6px; border-radius: 3px; font-size: 12px; font-weight: bold; }
.ent-record-view-page .media-actions { display: flex; gap: 18px; flex-wrap: wrap; }
.ent-record-view-page .btn-media { display: inline-block; padding: 10px 16px; background: #3498db; color: #fff; text-decoration: none; border-radius: 5px; font-weight: bold; font-size: 13px; transition: 0.3s; border: none; cursor: pointer; }
.ent-record-view-page .btn-media:hover { background: #2980b9; transform: translateY(-2px); }
.ent-record-view-page .btn-media.secondary { background: #95a5a6; }
.ent-record-view-page .btn-media.secondary:hover { background: #7f8c8d; }
.ent-record-view-page .media-empty { color: #7f8c8d; font-style: italic; padding: 20px; text-align: center; background: #f8f9fa; border-radius: 8px; }
.ent-record-view-page .fallback-lb { position: fixed; inset: 0; background: rgba(0,0,0,.86); display: none; align-items: center; justify-content: center; z-index: 9999; }
.ent-record-view-page .fallback-lb.active { display: flex; }
.ent-record-view-page .fallback-lb img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.ent-record-view-page .fallback-lb-close { position: absolute; top: 14px; right: 18px; background: rgba(255,255,255,.18); color: #fff; border: 0; border-radius: 999px; width: 36px; height: 36px; cursor: pointer; font-size: 22px; line-height: 1; }
.ent-record-view-page .fallback-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.18); color: #fff; border: 0; border-radius: 999px; width: 44px; height: 44px; cursor: pointer; font-size: 26px; line-height: 1; }
.ent-record-view-page .fallback-lb-prev { left: 14px; }
.ent-record-view-page .fallback-lb-next { right: 14px; }


/* === D16: species_view.php - scoped under .ent-species-view-page === */
.ent-species-view-page, .ent-species-view-page * { box-sizing: border-box; }
.ent-species-view-page { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f0f2f5; margin: 0; padding: 20px; color: #333; }
.ent-species-view-page .container { max-width: 1200px; margin: 0 auto; background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
.ent-species-view-page .header { border-bottom: 2px solid #3498db; padding-bottom: 20px; margin-bottom: 30px; }
.ent-species-view-page .header-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ent-species-view-page .header-actions { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.ent-species-view-page .header-actions a { display: inline-block; padding: 10px 14px; background: #2c3e50; color: #fff; text-decoration: none; border-radius: 6px; font-weight: 700; font-size: 14px; }
.ent-species-view-page .header-actions a:hover { background: #1f2d3a; }
.ent-species-view-page .family { color: #7f8c8d; text-transform: uppercase; letter-spacing: 1px; font-size: 14px; font-weight: bold; }
.ent-species-view-page h1 { margin: 5px 0; font-size: 32px; color: #2c3e50; font-style: italic; }
.ent-species-view-page .author { color: #34495e; font-size: 18px; font-style: normal; }
.ent-species-view-page .stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.ent-species-view-page .stat-card { background: #f8f9fa; padding: 20px; border-radius: 8px; border-left: 4px solid #3498db; text-align: center; }
.ent-species-view-page .stat-card .label { display: block; font-size: 12px; color: #7f8c8d; text-transform: uppercase; margin-bottom: 5px; }
.ent-species-view-page .stat-card .value { font-size: 24px; font-weight: bold; color: #2c3e50; }
.ent-species-view-page .stat-card .value.value-sm { font-size: 16px; }
.ent-species-view-page .description-box { background: #fff9db; padding: 20px; border-radius: 8px; border: 1px solid #ffe066; margin-bottom: 30px; line-height: 1.6; }
.ent-species-view-page .description-box h3 { margin-top: 0; font-size: 16px; color: #f08c00; }
.ent-species-view-page table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.ent-species-view-page th, .ent-species-view-page td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
.ent-species-view-page th { background-color: #f8f9fa; color: #2c3e50; font-weight: bold; }
.ent-species-view-page th a { text-decoration: none; color: inherit; display: block; width: 100%; position: relative; }
.ent-species-view-page th.sort-active { background-color: #ebf5fb; border-bottom: 2px solid #3498db; }
.ent-species-view-page tr:hover { background-color: #fcfcfc; }
.ent-species-view-page tr.thumb-row:hover { background-color: transparent; }
.ent-species-view-page .origin-h { color: #7f8c8d; }
.ent-species-view-page .origin-n { color: #e74c3c; font-weight: bold; }
.ent-species-view-page .thumbs-toolbar { margin: -8px 0 16px; display: flex; justify-content: flex-end; }
.ent-species-view-page .thumbs-toggle { border: 0; background: #ecf0f1; color: #2c3e50; border-radius: 6px; padding: 8px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.ent-species-view-page .thumbs-toggle:hover { background: #dfe6e9; }
.ent-species-view-page .thumbs-toggle:disabled { opacity: 0.6; cursor: default; }
.ent-species-view-page .species-record-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: -8px 0 16px; }
.ent-species-view-page .species-record-selected { color: #52616b; font-size: 13px; font-weight: 700; }
.ent-species-view-page .species-record-delete { min-height: 40px; border: 0; border-radius: 6px; padding: 9px 14px; background: #c62828; color: #fff; font-size: 13px; font-weight: 800; cursor: pointer; }
.ent-species-view-page .species-record-delete:disabled { background: #aeb7bd; cursor: not-allowed; }
.ent-species-view-page .species-record-select { width: 52px; text-align: center; }
.ent-species-view-page .species-record-select input { width: 22px; height: 22px; accent-color: #c62828; }
.ent-species-view-page .thumb-row { display: none; }
.ent-species-view-page .thumb-row.visible { display: table-row; }
.ent-species-view-page .thumb-cell { padding: 12px 15px 16px; background: #fafbfc; }
.ent-species-view-page .thumb-strip { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; }
.ent-species-view-page .thumb-strip a { display: block; width: 120px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; border: 1px solid #dfe6ec; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.ent-species-view-page .thumb-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ent-species-view-page .thumb-strip a.is-primary { border-color: #f0b429; box-shadow: 0 0 0 2px rgba(240,180,41,0.25); }
.ent-species-view-page .nav-back { margin-top: 30px; text-align: center; }
.ent-species-view-page .nav-back.is-hidden { display: none; }
.ent-species-view-page .btn-back { display: inline-block; padding: 12px 25px; background: #3498db; color: #fff; text-decoration: none; border-radius: 5px; font-weight: bold; transition: 0.3s; }
.ent-species-view-page .btn-back:hover { background: #2980b9; transform: translateY(-2px); }
.ent-species-view-page .table-link { color: #2c3e50; text-decoration: none; border-bottom: 1px dotted #ccc; }
.ent-species-view-page .table-link:hover { color: #3498db; border-bottom-style: solid; }
.ent-species-view-page .site-link { color: #e67e22; text-decoration: none; border-bottom: 1px dashed #e67e22; }
.ent-species-view-page .site-link:hover { color: #d35400; border-bottom-style: solid; }
.ent-species-view-page .plant-link { color: #27ae60; text-decoration: none; font-style: italic; border-bottom: 1px dashed #27ae60; }
.ent-species-view-page .plant-fallback { font-style: italic; color: #7f8c8d; }
.ent-species-view-page .stan-kod-small { color: #7f8c8d; font-size: 0.85em; }
.ent-species-view-page .uwagi-cell { font-size: 12px; color: #666; }
.ent-species-view-page .empty-state-cell { text-align: center; padding: 40px; color: #7f8c8d; }
.ent-species-view-page .note-url { color: #1565c0; text-decoration: underline; }

.ent-species-view-page .species-notes-panel {
    margin: 18px 0 28px;
    border: 1px solid #d8e3ee;
    border-radius: 10px;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f8fb 100%);
    box-shadow: 0 1px 3px rgba(31, 61, 88, 0.08);
    overflow: hidden;
}

.ent-species-view-page .species-notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #eaf2f9;
    border-bottom: 1px solid #d8e3ee;
}

.ent-species-view-page .species-notes-header h3 {
    margin: 0;
    color: #24384c;
    font-size: 18px;
}

.ent-species-view-page .species-notes-header span {
    color: #5f7286;
    font-size: 13px;
    font-weight: 700;
}

.ent-species-view-page .species-notes-box {
    padding: 12px 16px;
    background: #fff;
}

.ent-species-view-page .species-note-line {
    padding: 7px 0;
    color: #24384c;
    line-height: 1.45;
    border-bottom: 1px solid #eef2f6;
}

.ent-species-view-page .species-note-line:last-child {
    border-bottom: 0;
}

.ent-species-view-page .species-note-date {
    color: #607589;
    font-weight: 700;
    white-space: nowrap;
}

.ent-species-view-page .species-note-id {
    display: inline-block;
    margin: 0 6px;
    color: #1f78d1;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.ent-species-view-page .species-note-id:hover {
    text-decoration: underline;
}

.ent-species-view-page .species-note-text {
    white-space: normal;
}

.ent-species-view-page .species-notes-empty {
    padding: 14px 16px;
    color: #6b7d8f;
    background: #fff;
}
.ent-species-view-page .media-buttons { margin-bottom: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.ent-species-view-page .media-buttons a { display: inline-block; padding: 12px 20px; color: white; text-decoration: none; border-radius: 6px; font-weight: bold; transition: 0.3s; }
.ent-species-view-page .media-buttons a:hover { transform: translateY(-2px); }
.ent-species-view-page .btn-gallery { background: #3498db; }
.ent-species-view-page .btn-gallery:hover { background: #2980b9; }
.ent-species-view-page .btn-media { background: #6c5ce7; }
.ent-species-view-page .btn-media:hover { background: #5a4bcf; }
.ent-species-view-page .btn-map { background: #27ae60; }
.ent-species-view-page .btn-map:hover { background: #229954; }
.ent-species-view-page .btn-edit-species { background: #e67e22; margin-left: auto; }
.ent-species-view-page .btn-edit-species:hover { background: #cf711f; }
.ent-species-view-page .gallery-section { margin-top: 34px; }
.ent-species-view-page .gallery-section h2 { margin: 0 0 14px; font-size: 24px; color: #2c3e50; }
.ent-species-view-page .gallery-note { margin: -2px 0 14px; color: #6b7785; font-size: 13px; }
.ent-species-view-page .gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.ent-species-view-page .gallery-card { background: #fff; border: 1px solid #dde5eb; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.ent-species-view-page .gallery-card a.image-link { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #eef2f5; }
.ent-species-view-page .gallery-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ent-species-view-page .gallery-card .primary-badge { position: absolute; right: 8px; top: 8px; background: rgba(240, 180, 41, 0.94); color: #3c2d00; font-size: 11px; padding: 3px 6px; border-radius: 4px; font-weight: 700; }
.ent-species-view-page .gallery-card .gps-badge { position: absolute; left: 8px; bottom: 8px; background: rgba(25, 118, 210, 0.94); color: #fff; font-size: 11px; padding: 3px 6px; border-radius: 4px; font-weight: 700; }
.ent-species-view-page .gallery-meta { padding: 10px 12px 12px; font-size: 12px; color: #4f5b66; line-height: 1.45; }
.ent-species-view-page .gallery-meta strong { color: #2c3e50; }
.ent-species-view-page .gallery-empty { background: #f8fafb; border: 1px dashed #d6dde3; border-radius: 10px; padding: 24px; text-align: center; color: #72808e; }
@media print {
    .ent-species-view-page .btn-back { display: none; }
    .ent-species-view-page .container { box-shadow: none; padding: 0; }
}


/* === D17: plant_view.php - scoped under .ent-plant-view-page === */
.ent-plant-view-page, .ent-plant-view-page * { box-sizing: border-box; }
.ent-plant-view-page { font-family: 'Outfit', 'Segoe UI', sans-serif; background: #fdfdfd; margin: 0; padding: 20px; color: #2f3542; }
.ent-plant-view-page .container { max-width: 1200px; margin: 40px auto; background: #fff; padding: 40px; border-radius: 20px; border: 1px solid #f1f2f6; box-shadow: 0 4px 50px rgba(0,0,0,0.03); }
.ent-plant-view-page .header { text-align: center; margin-bottom: 40px; border-bottom: 1px solid #f1f2f6; padding-bottom: 30px; }
.ent-plant-view-page .header-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.ent-plant-view-page .leaf { font-size: 48px; margin-bottom: 15px; }
.ent-plant-view-page h1 { margin: 0; font-style: italic; color: #2ed573; font-size: 32px; }
.ent-plant-view-page .nazwa_pl { color: #a4b0be; font-style: normal; margin-top: 5px; font-size: 18px; }
.ent-plant-view-page .summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 40px; }
.ent-plant-view-page .summary-card { background: #f1f2f655; padding: 25px; border-radius: 15px; text-align: center; border: 1px solid #f1f2f6; }
.ent-plant-view-page .summary-card .val { display: block; font-size: 30px; font-weight: bold; color: #2d3436; }
.ent-plant-view-page .summary-card .lbl { font-size: 12px; color: #747d8c; text-transform: uppercase; letter-spacing: 1px; }
.ent-plant-view-page .val-link-plain { color: inherit; text-decoration: none; }
.ent-plant-view-page .species-list { border-top: 2px solid #2ed57355; padding-top: 20px; }
.ent-plant-view-page .species-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 0; border-bottom: 1px solid #f1f2f6; }
.ent-plant-view-page .species-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ent-plant-view-page .family-link { display: inline-block; padding: 5px 10px; border-radius: 999px; background: #eef8f1; color: #2f7d4a; text-decoration: none; font-size: 12px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }
.ent-plant-view-page .family-link:hover { background: #dff2e5; }
.ent-plant-view-page .species-link { text-decoration: none; color: #2c3e50; font-size: 18px; font-style: italic; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ent-plant-view-page .species-link:hover { color: #2ed573; }
.ent-plant-view-page .species-row .count { background: #2ed57322; color: #2ed573; padding: 4px 12px; border-radius: 20px; font-weight: bold; font-size: 14px; text-decoration: none; display: inline-block; }
.ent-plant-view-page .species-row .count:hover { background: #2ed57333; color: #1e9f51; }
.ent-plant-view-page .empty-state-text { text-align: center; color: #a4b0be; padding: 20px; }
.ent-plant-view-page .btn-back { display: inline-block; padding: 12px 24px; background: #2d3436; color: #fff; text-decoration: none; border-radius: 8px; font-weight: bold; transition: 0.3s; }
.ent-plant-view-page .btn-back:hover { background: #000; transform: translateY(-2px); }
.ent-plant-view-page .container > .btn-back { display: none; }


/* === D18: species_gallery.php - scoped under .ent-species-gallery-page === */
.ent-species-gallery-page { font-family: Arial, sans-serif; background: #f4f6f8; margin: 0; padding: 20px; }
.ent-species-gallery-page .wrap { max-width: 1220px; margin: 0 auto; }
.ent-species-gallery-page .top { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.08); margin-bottom: 16px; }
.ent-species-gallery-page .topbar { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.ent-species-gallery-page .topbar > div { margin-left: auto; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.ent-species-gallery-page .topbar > form { order: -1; }
.ent-species-gallery-page .row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.ent-species-gallery-page .stats { display: flex; gap: 14px; font-size: 13px; color: #4f5b66; margin-top: 8px; }
.ent-species-gallery-page .search { display: flex; gap: 8px; }
.ent-species-gallery-page .search input { padding: 8px 10px; border: 1px solid #cfd8dc; border-radius: 6px; min-width: 220px; }
.ent-species-gallery-page .search button, .ent-species-gallery-page .btn { padding: 8px 12px; border: 0; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-block; font-size: 13px; }
.ent-species-gallery-page .search button { background: #1976d2; color: #fff; }
.ent-species-gallery-page .btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1976d2;
    color: #ffffff;
    line-height: 1;
}
.ent-species-gallery-page .btn-orph { background: #455a64; color: #fff; }
.ent-species-gallery-page .notice { background: #e8f5e9; border: 1px solid #c8e6c9; color: #1b5e20; border-radius: 8px; padding: 10px; margin-bottom: 12px; }
.ent-species-gallery-page .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ent-species-gallery-page .card { position: relative; background: #fff; border: 1px solid #dce3e8; border-radius: 10px; overflow: hidden; }
.ent-species-gallery-page .card a { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.ent-species-gallery-page .card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ent-species-gallery-page .gps { position: absolute; right: 8px; bottom: 8px; background: rgba(25,118,210,.92); color: #fff; font-size: 11px; padding: 3px 6px; border-radius: 4px; }
.ent-species-gallery-page .meta { font-size: 12px; padding: 10px; color: #455a64; }
.ent-species-gallery-page .meta div { margin-bottom: 4px; }
.ent-species-gallery-page .card-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 10px 10px; }
.ent-species-gallery-page .card-status { font-size: 12px; font-weight: 700; color: #5d6d7e; }
.ent-species-gallery-page .card-status.is-primary { color: #7a4d11; }
.ent-species-gallery-page .card-set-primary { border: 0; background: transparent; color: #1976d2; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; }
.ent-species-gallery-page .card-set-primary:hover { color: #125aa0; text-decoration: underline; }
.ent-species-gallery-page .pick { position: absolute; left: 8px; top: 8px; z-index: 4; display: none; background: rgba(255,255,255,.9); border-radius: 4px; padding: 2px 4px; }
.ent-species-gallery-page #speciesGalleryDeleteScope.delete-mode .pick { display: block; }
.ent-species-gallery-page .toolbar { position: fixed; right: 18px; bottom: 18px; z-index: 1200; display: inline-flex; gap: 8px; align-items: center; background: rgba(255,255,255,.96); border: 1px solid #d6dde2; border-radius: 10px; padding: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.ent-species-gallery-page .btn-del-mode { background: #795548; color: #fff; }
.ent-species-gallery-page .btn-danger { background: #d32f2f; color: #fff; display: none; }
.ent-species-gallery-page .btn-cancel { background: #b0bec5; color: #263238; display: none; width: 32px; height: 32px; padding: 0; font-size: 20px; line-height: 1; }
.ent-species-gallery-page #speciesGalleryDeleteScope.delete-mode .btn-danger,
.ent-species-gallery-page #speciesGalleryDeleteScope.delete-mode .btn-cancel { display: inline-block; }
.ent-species-gallery-page .empty { background: #fff; border-radius: 10px; padding: 40px; color: #607d8b; text-align: center; }
.ent-species-gallery-page .species-title { margin: 10px 0 0 0; }


/* === D19: media_orphaned.php — inline attrs cleanup under .ent-media-page === */
.ent-media-page .orphaned-title { margin: 10px 0 0 0; }
.ent-media-page .orphaned-lead { margin: 6px 0 0 0; color: #607d8b; font-size: 13px; }
.ent-media-page .orphaned-actions-spacer { height: 10px; }

/* === D20: expedition gallery inline cleanup under .ent-gallery-page === */
.ent-gallery-page .gallery-expedition { margin-top: 4px; color: #546270; }

/* === D21: map.php — scoped under .ent-map-page === */
.ent-map-page, html:has(body.ent-map-page) { height: 100%; margin: 0; padding: 0; font-family: Segoe UI, Arial, sans-serif; }
.ent-map-page {
    --ent-map-header-clearance: 86px;
}
.ent-map-page #map {
    width: 100vw;
    height: calc(100vh - var(--ent-map-header-clearance));
    margin-top: var(--ent-map-header-clearance);
}
.ent-map-page .map-header {
    position: absolute; top: 16px; left: 16px; z-index: 1000;
    background: rgba(255,255,255,.94); padding: 12px 16px; border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,.18); max-width: min(92vw, 420px);
}
.ent-map-page .map-header-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ent-map-page .map-header h1 { margin: 0 0 6px; font-size: 17px; color: #1f2a36; }
.ent-map-page .map-sub { font-size: 12px; color: #5c6b7a; margin-bottom: 8px; }
.ent-map-page .btn-back { font-size: 13px; color: #1976d2; text-decoration: none; font-weight: 600; }
.ent-map-page .empty-note {
    position: absolute; bottom: 16px; left: 16px; z-index: 1000;
    background: rgba(255,255,255,.94); padding: 10px 12px; border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,.14); font-size: 12px; color: #555;
    display: none;
}
.ent-map-page .empty-note.show { display: block; }
.ent-map-page .tile-note {
    position: absolute; bottom: 16px; right: 16px; z-index: 1000;
    background: rgba(255,245,230,.97); border: 1px solid #f0c87d; color: #8a5a00;
    padding: 10px 12px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.14);
    font-size: 12px; max-width: 360px; display: none;
}
.ent-map-page .tile-note.show { display: block; }
.ent-map-page .map-popup { font-family: inherit; min-width: 180px; }
.ent-map-page .map-popup-code { color: #e67e22; }
.ent-map-page .map-popup-link { color: #1976d2; text-decoration: none; font-weight: 700; }

/* === D22: users_admin.php — inline attrs cleanup under .ent-users-admin-page === */
.ent-users-admin-page .users-admin-title { margin: 0; }
.ent-users-admin-page .users-admin-actions { display: flex; gap: 18px; flex-wrap: wrap; }
.ent-users-admin-page .users-admin-list-title { margin-top: 0; }
.ent-users-admin-page .users-admin-detail-title { margin: 0 0 6px 0; }
.ent-users-admin-page .users-admin-activity { font-size: 12px; }
.ent-users-admin-page .users-admin-empty-title { margin-top: 0; }
.ent-record-view-page .record-view-map-section {
    margin: 24px 0;
    padding: 18px;
    border: 1px solid #d6e2da;
    border-radius: 12px;
    background: #fff;
}
.ent-record-view-page .record-view-map-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.ent-record-view-page .record-view-map-heading h3 { margin: 0; }
.ent-record-view-page .record-view-map-heading a { color: #2d7e4e; font-weight: 700; }
.ent-record-view-page .record-view-map { height: 310px; border-radius: 8px; overflow: hidden; }
@media (max-width: 640px) {
    .ent-record-view-page .record-view-map-section { margin-left: 0; margin-right: 0; padding: 12px; }
    .ent-record-view-page .record-view-map-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
.ent-record-view-page .record-view-map { height: 260px; }
}

/* Mapy rekordów: pełny obszar roboczy na desktopie. */
@media (min-width: 901px) {
    .ent-batch-records-page .geo-editor-map,
    .ent-record-edit-page .geo-editor-map,
    .ent-record-view-page .record-view-map { height: 700px; }
}
.ent-my-datasets-page .active-dataset-switcher {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0 24px;
    padding: 16px 18px;
    border: 1px solid #b9d9c2;
    border-radius: 10px;
    background: #f0f9f1;
}
.ent-my-datasets-page .active-dataset-switcher label { font-weight: 800; }
.ent-my-datasets-page .active-dataset-switcher select { min-width: 250px; }
.ent-my-datasets-page .active-dataset-help { color: #496256; font-size: 13px; }
@media (max-width: 640px) {
    .ent-my-datasets-page .active-dataset-switcher { align-items: stretch; }
    .ent-my-datasets-page .active-dataset-switcher select,
    .ent-my-datasets-page .active-dataset-switcher .btn { width: 100%; }
}
.ent-users-admin-page .users-admin-search { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; margin: 0 0 14px; }
.ent-users-admin-page .users-admin-search > div { min-width: 220px; flex: 1 1 260px; }
.ent-users-admin-page .users-admin-search-actions { display: flex; gap: 8px; align-items: end; flex: 0 0 auto !important; min-width: auto !important; }
.ent-users-admin-page .users-admin-search-actions .btn { white-space: nowrap; }
.ent-users-admin-page .users-admin-result-summary { margin: 0 0 12px; }
.ent-users-admin-page .users-admin-sort-link { color: inherit; text-decoration: none; font-weight: 800; white-space: nowrap; }
.ent-users-admin-page .users-admin-sort-link:hover { color: #1976d2; text-decoration: underline; }
.ent-users-admin-page .users-admin-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.ent-users-admin-page .users-admin-back-link { margin-bottom: 18px; font-weight: 700; }
@media (max-width: 640px) {
    .ent-users-admin-page .users-admin-search > div { flex-basis: 100%; }
    .ent-users-admin-page .users-admin-search-actions { justify-content: flex-end; }
}

/* === D23: wyloguj.php — inline attrs cleanup under .ent-logout-page === */
.ent-logout-page .logout-panel-title { margin-top: 0; }
.ent-logout-page .logout-panel-lead { color: #6c757d; }
.ent-logout-page .logout-inline-form { margin: 0; max-width: 100%; }
.ent-logout-page .logout-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ent-records-page .records-csv-success-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(17, 24, 39, 0.46);
}

.ent-records-page .records-csv-success-modal.is-hidden {
    display: none;
}

.ent-records-page .records-csv-success-modal-card {
    width: min(440px, 100%);
    overflow: hidden;
    border: 1px solid #b9dec8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.ent-records-page .records-csv-success-modal-icon {
    width: 54px;
    height: 54px;
    margin: 22px auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #23834f;
    color: #fff;
    font-size: 32px;
    font-weight: 800;
}

.ent-records-page .records-csv-success-modal-title {
    padding: 4px 20px 8px;
    color: #155724;
    font-size: 21px;
    font-weight: 800;
    text-align: center;
}

.ent-records-page .records-csv-success-modal-text {
    display: grid;
    gap: 7px;
    padding: 0 20px 20px;
    color: #263b32;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
}

.ent-records-page .records-csv-success-modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px 20px;
    border-top: 1px solid #dcece2;
    background: #f4faf6;
}

.ent-records-page .records-csv-success-view-link,
.ent-records-page .records-csv-success-close-btn {
    min-height: 44px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #1d6ea1;
    border-radius: 8px;
    background: #267da8 !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.ent-records-page .records-csv-success-close-btn {
    border-color: #17643b;
    background: #23834f !important;
}

@media (max-width: 480px) {
    .ent-records-page .records-csv-success-modal-actions {
        flex-direction: column;
    }

    .ent-records-page .records-csv-success-view-link,
    .ent-records-page .records-csv-success-close-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ent-records-page .records-csv-export-bottom,
    .ent-records-page .records-csv-export-form {
        width: 100%;
    }

    .ent-records-page .records-csv-export-bottom {
        justify-content: stretch;
    }

    .ent-records-page .records-csv-export-form {
        display: flex;
        flex-flow: column nowrap !important;
        align-items: stretch;
    }

    .ent-records-page .records-csv-filename-label {
        width: 100%;
    }

    .ent-records-page .records-csv-filename,
    .ent-records-page .records-csv-export-form .results-export-csv {
        width: 100%;
    }

    .ent-records-page .records-csv-filename {
        flex: 0 0 auto;
        max-width: none;
    }

    .ent-records-page .records-csv-export-form .results-export-csv {
        min-width: 0;
        white-space: normal;
        line-height: 1.25;
    }
}

/* ENTOMONE Notatnik Terenowy - resilient mobile capture (2026-07-20) */
body.ent-record-add-field-page {
    margin: 0;
    padding: 0 !important;
    overflow: hidden;
    background: #f4f7f5;
    color: #17211c;
}

body.ent-record-add-field-page > .ent-global-header,
body.ent-record-add-field-page > footer,
body.ent-record-add-field-page .ent-quick-photo-processing {
    display: none !important;
}

.ent-record-add-field-page .ent-field-notebook {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100svh;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-rows: 64px minmax(0, 1fr);
    background: #f4f7f5;
}

.ent-record-add-field-page .ent-field-notebook-has-drive-notice {
    grid-template-rows: 64px auto minmax(0, 1fr);
}
.ent-record-add-field-page .ent-field-notebook-has-trip-copy {
    grid-template-rows: 64px auto minmax(0, 1fr);
}
.ent-record-add-field-page .ent-field-notebook-has-drive-notice.ent-field-notebook-has-trip-copy {
    grid-template-rows: 64px auto auto minmax(0, 1fr);
}

.ent-record-add-field-page .ent-field-notebook-drive-notice {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #e7c77a;
    background: #fff8df;
    color: #6a4a00;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.ent-record-add-field-page .ent-field-notebook-drive-notice span {
    min-width: 0;
}

.ent-record-add-field-page .ent-field-notebook-drive-notice a {
    flex: 0 0 auto;
    color: #6a4a00;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ent-record-add-field-page .ent-field-notebook-drive-notice a:hover,
.ent-record-add-field-page .ent-field-notebook-drive-notice a:focus-visible {
    color: #3d2a00;
}

@media (max-width: 390px) {
    .ent-record-add-field-page .ent-field-notebook-drive-notice {
        align-items: flex-start;
        font-size: 12px;
    }
}

.ent-field-notebook-bar {
    min-width: 0;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
    border-bottom: 1px solid #d9e1dc;
    background: #ffffff;
    z-index: 4;
}

.ent-field-notebook-icon-btn,
.ent-field-notebook-indicator,
.ent-field-notebook-secondary {
    width: 34px;
    height: 34px;
    min-width: 48px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #33443b;
    text-decoration: none;
    cursor: pointer;
}

.ent-field-notebook-icon-btn svg,
.ent-field-notebook-indicator svg,
.ent-field-notebook-secondary svg,
.ent-field-notebook-primary svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ent-field-notebook-dataset {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 800;
}

.ent-field-notebook-indicators {
    display: flex;
    align-items: center;
    gap: 2px;
}

.ent-field-notebook-indicator {
    width: 40px;
    height: 40px;
    min-width: 40px;
    color: #7b8780;
}

.ent-field-notebook-indicator svg {
    width: 22px;
    height: 22px;
}

.ent-field-notebook-gps-label {
    display: inline-flex;
    width: auto;
    min-width: 54px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 800;
}

.ent-field-notebook-gps-label svg {
    width: 20px;
    height: 20px;
}

.ent-field-notebook-indicator[data-state="ready"],
.ent-field-notebook-indicator[data-state="online"] { color: #1f7a4d; }
.ent-field-notebook-indicator[data-state="cached"] { color: #246aa5; }
.ent-field-notebook-indicator[data-state="loading"],
.ent-field-notebook-indicator[data-state="pending"] { color: #a45d08; }
.ent-field-notebook-indicator[data-state="offline"],
.ent-field-notebook-indicator[data-state="error"] { color: #bd2b2b; }

.ent-field-notebook-queue {
    display: inline-flex;
    box-sizing: border-box;
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    aspect-ratio: 1 / 1;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #1f2d27;
    border-radius: 50%;
    background: #ffffff;
    color: #1f2d27 !important;
    font-variant-numeric: tabular-nums;
}

.ent-field-notebook-queue span {
    display: block;
    min-width: 0;
    padding: 0;
    color: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.ent-field-notebook-queue[data-state="error"] {
    background: #ffffff;
    color: #1f2d27 !important;
}

.ent-record-add-field-page #fieldQuickForm {
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.ent-field-notebook-screen {
    height: 100%;
    min-height: 0;
}

.ent-field-notebook-screen[hidden],
.ent-field-notebook-sheet[hidden] {
    display: none !important;
}

.ent-field-notebook-camera {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ent-field-notebook-camera-button {
    width: min(76vw, 310px);
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 0;
    border-radius: 50%;
    background: #267447;
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(22, 74, 44, 0.22);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.ent-field-notebook-camera-button:active { transform: scale(0.97); }
.ent-field-notebook-camera-button svg {
    width: 88px;
    height: 88px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ent-field-notebook-camera-button span {
    max-width: 210px;
    font-size: 21px;
    line-height: 1.15;
    font-weight: 900;
    text-align: center;
    text-wrap: balance;
}

.ent-field-notebook-review {
    display: grid;
    grid-template-rows: minmax(0, 1fr) 24px 84px;
    gap: 8px;
    padding: 12px 12px max(12px, env(safe-area-inset-bottom));
}

.ent-field-notebook-photo {
    min-height: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    border-radius: 8px;
    background: #18201c;
}

.ent-field-notebook-photo img {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: block;
    object-fit: contain;
    scroll-snap-align: center;
}

.ent-field-notebook-photo-count {
    justify-self: center;
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #dfe6e2;
    color: #344039;
    font-size: 13px;
    font-weight: 800;
}

.ent-field-notebook-review-actions {
    display: grid;
    grid-template-columns: 64px 64px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.ent-field-notebook-secondary {
    width: 64px;
    height: 64px;
    min-width: 64px;
    align-self: center;
    border: 1px solid #cbd5cf;
    background: #ffffff;
}

.ent-field-notebook-primary {
    min-height: 64px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 8px;
    background: #267447;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.ent-field-notebook-primary:disabled {
    opacity: 0.55;
    cursor: default;
}

.ent-field-notebook-sheet {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 20;
    padding: 12px;
    display: grid;
    gap: 8px;
    border: 1px solid #cbd5cf;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(20, 34, 27, 0.22);
}

.ent-field-notebook-sheet button {
    min-height: 56px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: #e8eeea;
    color: #1d2a23;
    font-size: 17px;
    font-weight: 800;
}

.ent-field-notebook-sheet strong {
    padding: 8px 4px;
    font-size: 17px;
    text-align: center;
}

.ent-field-notebook-queue-sheet span {
    padding: 0 4px;
    color: #536159;
    font-size: 15px;
    line-height: 1.4;
    text-align: center;
}

.ent-field-notebook-live {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ent-field-notebook-blocked {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 24px;
    text-align: center;
}

.ent-field-notebook-blocked .ent-field-notebook-primary { width: min(100%, 320px); }

.ent-record-add-field-page .ent-field-quick-alert,
.ent-record-add-field-page .ent-field-quick-build,
.ent-record-add-field-page .ent-field-quick-dataset-footer {
    display: none !important;
}

@media (min-width: 769px) {
    .ent-record-add-field-page .ent-field-notebook {
        max-width: 520px;
        margin: 0 auto;
        border-left: 1px solid #d9e1dc;
        border-right: 1px solid #d9e1dc;
    }
}

@media (max-height: 680px) {
    .ent-field-notebook-camera-button { width: min(58vh, 250px); }
    .ent-field-notebook-camera-button svg { width: 68px; height: 68px; }
    .ent-field-notebook-review { grid-template-rows: minmax(0, 1fr) 20px 72px; }
    .ent-field-notebook-primary { min-height: 58px; }
}
.ent-logout-page .logout-exp-link { text-decoration: none; display: inline-block; line-height: 20px; }
.ent-logout-page .logout-exp-title { margin-bottom: 8px; }
.ent-logout-page .logout-exp-lead { color: #6c757d; margin-top: 0; }
.ent-logout-page .logout-exp-actions { min-width: 220px; }

@media (max-width: 640px) {
    .ent-logout-page .logout-actions,
    .ent-logout-page .logout-actions .logout-inline-form,
    .ent-logout-page .logout-actions .btn {
        width: 100%;
    }
}

/* === D24: records_deleted.php — inline attrs cleanup under .ent-trash-page === */
.ent-trash-page .trash-restore-form { margin: 0; }

/* === D25: dataset_invite_accept.php — inline attrs cleanup under .ent-invite-page === */
.ent-invite-page .invite-link-box {
    background: #f8faff;
    border: 1px solid #b0c4de;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
    margin-bottom: 16px;
}
.ent-invite-page .invite-actions {
    display: flex;
    gap: 18px;
    margin-top: 16px;
}

/* === D26: report_html.php — inline attrs cleanup under .ent-report-page === */
.ent-report-page .report-actions { margin-bottom: 20px; text-align: right; }
.ent-report-page .col-id { width: 40px; }
.ent-report-page .col-date { width: 80px; }
.ent-report-page .col-exx { width: 40px; }
.ent-report-page .col-obs { width: 40px; }
.ent-report-page .col-type { width: 60px; }
.ent-report-page .report-species { font-weight: bold; }
.ent-report-page .report-plant { font-style: italic; }
.ent-report-page .report-exx { text-align: center; }
.ent-report-page .report-obs { text-align: center; }
.ent-report-page .report-notes { font-size: 11px; color: #666; }
.ent-report-page .report-empty { text-align: center; padding: 50px; color: #7f8c8d; }

/* === M1: records.php mobile entry workflow under .ent-records-page === */
@media (max-width: 768px) {
    .ent-records-page .container { padding: 8px; }

    /* app-header: stack vertically, breathing room */
    .ent-records-page .app-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        padding: 10px 0;
    }
    .ent-records-page .app-header .brand-link {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .ent-records-page .app-header .brand-subtitle { display: none; }
    .ent-records-page .header-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    .ent-records-page .header-user { font-size: 13px; color: #555; }
    .ent-records-page .header-tools,
    .ent-records-page .header-secondary {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .ent-records-page .header-tools .nav-link,
    .ent-records-page .header-secondary .nav-link {
        font-size: 13px;
        padding: 8px 10px;
        min-height: 36px;
        display: inline-flex;
        align-items: center;
    }

    /* Active dataset row + switcher — make switcher prominent */
    .ent-records-page .active-dataset-row {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
        font-size: 14px;
    }
    .ent-records-page .dataset-switcher-box {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
        border: 2px solid #1976d2;
        border-radius: 8px;
        background: #f3f8ff;
        margin: 8px 0 12px 0;
        box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    }
    .ent-records-page .dataset-switcher-label { font-size: 14px; color: #1f2a36; }
    .ent-records-page .dataset-switcher-form { width: 100%; }
    .ent-records-page .dataset-switcher-select {
        width: 100%;
        min-height: 44px;
        font-size: 15px;
        padding: 8px 10px;
        border-radius: 6px;
    }
    .ent-records-page .dataset-default-form { width: 100%; }
    .ent-records-page .dataset-default-button {
        width: 100%;
        min-height: 40px;
        font-size: 14px;
    }

    /* Nav-section — primary action stands out */
    .ent-records-page .nav-section {
        margin: 8px 0 12px 0;
        padding: 8px;
        background: #fafbfc;
        border-radius: 8px;
    }
    .ent-records-page .nav-section-title { font-size: 13px; color: #5c6b7a; margin-bottom: 6px; }
    .ent-records-page .nav-section .nav-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .ent-records-page .nav-section .nav-link {
        flex: 1 1 calc(50% - 8px);
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 14px;
        padding: 8px 10px;
    }
    .ent-records-page .nav-section .nav-link.action {
        flex: 1 1 100%;
        min-height: 52px;
        font-size: 16px;
        font-weight: 700;
        background: #2e7d32;
        color: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(46,125,50,0.25);
    }

    /* Filter section — accessible but not dominant */
    .ent-records-page .filter-section {
        margin: 8px 0 12px 0;
        padding: 8px;
    }
    .ent-records-page .filter-section h2 { font-size: 15px; margin: 0 0 6px 0; }
    .ent-records-page .filter-section .row {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .ent-records-page .filter-section .col { width: 100%; }
    .ent-records-page .filter-section input,
    .ent-records-page .filter-section select {
        width: 100%;
        min-height: 40px;
        font-size: 15px;
    }

    /* Records table → stacked card layout */
    /* Records table -> compact operational list */
    .ent-records-page .records-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }
    .ent-records-page .records-table,
    .ent-records-page .records-table thead,
    .ent-records-page .records-table tbody,
    .ent-records-page .records-table tr {
        display: block;
        width: 100%;
    }
    .ent-records-page .records-table thead { display: none; }
    .ent-records-page .records-table tbody {
        background: #fff;
        border: 1px solid #d7dde3;
        border-radius: 10px;
        overflow: hidden;
    }
    .ent-records-page .records-table tr {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "id name edit"
            ". family edit"
            ". site edit";
        gap: 3px 10px;
        align-items: start;
        padding: 11px 12px;
        margin: 0;
        border: 0;
        border-bottom: 1px solid #e6ebf0;
        border-radius: 0;
        background: #fff;
        box-shadow: none;
    }
    .ent-records-page .records-table tr:last-child {
        border-bottom: 0;
    }
    .ent-records-page .records-table td {
        display: block;
        width: auto;
        border: 0;
        padding: 0;
        margin: 0;
        text-align: left;
        font-size: 14px;
        min-width: 0;
        word-break: break-word;
    }
    .ent-records-page .records-table td::before {
        display: none;
    }
    .ent-records-page .records-table td[data-label="Data"],
    .ent-records-page .records-table td[data-label="Roslina"],
    .ent-records-page .records-table td[data-label="Ilosc"],
    .ent-records-page .records-table td[data-label="Obs."],
    .ent-records-page .records-table td[data-label="Typ"],
    .ent-records-page .records-table td[data-label="Uwagi"] {
        display: none;
    }
    .ent-records-page .records-table td[data-label="ID"] {
        grid-area: id;
        white-space: nowrap;
    }
    .ent-records-page .records-table td[data-label="Nazwa"] {
        grid-area: name;
    }
    .ent-records-page .records-table .record-family-cell {
        grid-area: family;
        color: #52606d;
        font-size: 12px;
        line-height: 1.25;
    }
    .ent-records-page .records-table td[data-label="Stanowisko"] {
        grid-area: site;
        min-width: 0;
    }
    .ent-records-page .records-table td.actions-cell {
        grid-area: edit;
        justify-self: end;
        align-self: center;
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: auto;
        white-space: nowrap;
    }
    .ent-records-page .records-table .record-id-link {
        color: #ffffff;
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
    }
    .ent-records-page .records-table .record-species-link {
        display: block;
        color: #163a63;
        text-decoration: none;
        line-height: 1.25;
    }
    .ent-records-page .records-table .record-species-link strong {
        display: block;
        font-size: 15px;
        font-weight: 700;
    }
    .ent-records-page .records-table .record-site-link {
        display: block;
        color: #b86d16;
        font-size: 13px;
        text-decoration: none;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .ent-records-page .records-table td.actions-cell::before {
        display: none;
    }
    .ent-records-page .records-table td.actions-cell .record-edit-link,
    .ent-records-page .records-table td.actions-cell .edit-disabled {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        padding: 0 12px;
        border-radius: 999px;
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
    }
    .ent-records-page .records-table td.actions-cell .record-edit-link {
        background: #eaf4ff;
        color: #1976d2;
    }
    .ent-records-page .records-table td.actions-cell .edit-disabled {
        background: #f1f3f5;
        color: #8a96a3;
    }
    .ent-records-page .records-table td.actions-cell .inline-delete-form,
    .ent-records-page .records-table td.actions-cell .btn-delete {
        display: none;
    }
    /* Pagination — wrap nicely */
    .ent-records-page .pagination {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
        margin: 12px 0;
    }
    .ent-records-page .records-per-page-form {
        width: 100%;
        justify-content: flex-start;
        margin-right: 0;
    }
    .ent-records-page .records-pagination-links {
        width: 100%;
    }
    .ent-records-page .pagination a,
    .ent-records-page .pagination span {
        min-height: 40px;
        min-width: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px 10px;
        font-size: 14px;
    }
}

/* === M2: record_add_photo.php mobile workflow under .ent-record-add-photo-page === */
@media (max-width: 768px) {
    .ent-record-add-photo-page .container { padding: 8px 8px 88px 8px; }

    /* Top header: title + active dataset + main actions */
    .ent-record-add-photo-page #photoRecordForm > div:first-of-type {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    .ent-record-add-photo-page #photoRecordForm h1 {
        font-size: 20px;
        margin: 0 0 4px 0 !important;
    }
    .ent-record-add-photo-page #photoRecordForm .actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 4px 0 0 0 !important;
    }
    .ent-record-add-photo-page #photoRecordForm .actions .btn {
        flex: 1 1 calc(50% - 8px);
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        padding: 8px 10px;
    }
    .ent-record-add-photo-page #photoRecordForm .actions .btn.btn-primary {
        flex: 1 1 100%;
        min-height: 52px;
        font-size: 16px;
        font-weight: 700;
        order: -1;
    }
    .ent-record-add-photo-page #photoRecordForm .actions .btn.btn-add {
        flex: 1 1 calc(50% - 8px);
        min-height: 48px;
        font-size: 15px;
        order: -2;
    }
    .ent-record-add-photo-page #photoRecordForm .actions .btn.btn-add-note {
        flex-basis: 100%;
        min-height: 52px;
        font-size: 16px;
        order: -3;
    }

    .ent-record-add-photo-page .hint {
        font-size: 13px;
        padding: 8px 10px;
    }

    .ent-record-add-photo-page.is-note-mode .hint-note-mode {
        background: #fff8e6;
        border: 1px solid #f0cf79;
        color: #5f4610;
        line-height: 1.45;
    }

    .ent-record-add-photo-page.is-note-mode .note-row-top {
        order: -10;
        background: #fffdf7;
        border: 1px solid #efdca8;
        border-radius: 12px;
        padding: 10px;
        margin-bottom: 12px;
    }

    .ent-record-add-photo-page.is-note-mode .note-row-top textarea {
        min-height: 170px !important;
        font-size: 17px !important;
        line-height: 1.45;
    }

    .ent-record-add-photo-page.is-note-mode .species-col {
        order: -2;
    }

    .ent-record-add-photo-page.is-note-mode .upload-col {
        order: 3;
    }

    .ent-record-add-photo-page.is-note-mode .upload {
        min-height: 96px;
        padding: 14px 10px;
        border-color: #b8c7d6;
        background: #f8fafc;
    }

    .ent-record-add-photo-page.is-note-mode .upload > div:first-child {
        font-size: 20px !important;
        color: #607080;
    }

    .ent-record-add-photo-page #photoRecordForm .actions .btn-add-note {
        background: #f0a500;
        color: #17202a;
        box-shadow: 0 2px 6px rgba(240,165,0,0.28);
    }

    .ent-record-add-photo-page #photoRecordForm .actions .btn-add-note.is-active,
    .ent-record-add-photo-page #photoRecordForm .actions .btn-add-record.is-active {
        outline: 3px solid rgba(25, 118, 210, 0.22);
        outline-offset: 2px;
    }

    /* Generic row → single-column on mobile */
    .ent-record-add-photo-page #photoRecordForm .row {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
    }
    .ent-record-add-photo-page #photoRecordForm .row .col {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: 1 1 100%;
    }
    .ent-record-add-photo-page #photoRecordForm label {
        font-size: 14px;
        font-weight: 600;
    }
    .ent-record-add-photo-page #photoRecordForm input[type="text"],
    .ent-record-add-photo-page #photoRecordForm input[type="date"],
    .ent-record-add-photo-page #photoRecordForm input[type="number"],
    .ent-record-add-photo-page #photoRecordForm select,
    .ent-record-add-photo-page #photoRecordForm textarea {
        width: 100%;
        min-height: 44px;
        font-size: 16px;
        padding: 8px 10px;
        box-sizing: border-box;
    }
    .ent-record-add-photo-page #photoRecordForm textarea {
        min-height: 100px;
    }
    .ent-record-add-photo-page #photoRecordForm .muted {
        font-size: 12px;
    }

    .ent-record-add-photo-page .station-mode-switch {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .ent-record-add-photo-page .station-mode-option {
        min-height: 44px;
        font-size: 14px;
    }

    /* Upload area: large touch target, visible primary affordance */
    .ent-record-add-photo-page .upload {
        min-height: 140px;
        padding: 18px 12px;
        border: 2px dashed #1976d2;
        border-radius: 10px;
        background: #f3f8ff;
        text-align: center;
    }
    .ent-record-add-photo-page .upload > div:first-child {
        font-size: 28px !important;
        font-weight: 700;
        color: #1976d2;
    }
    .ent-record-add-photo-page input#photo {
        display: block;
        width: 100%;
        min-height: 44px;
        font-size: 15px;
        margin-top: 8px;
    }
    .ent-record-add-photo-page .preview-wrap {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 10px;
    }
    .ent-record-add-photo-page .preview-wrap img,
    .ent-record-add-photo-page .preview-wrap canvas,
    .ent-record-add-photo-page .preview-wrap > * {
        max-width: 100%;
        height: auto;
        border-radius: 6px;
    }

    /* Geo editor: map kept usable but not screen-eating */
    .ent-record-add-photo-page .geo-editor-box {
        padding: 10px;
        margin: 12px 0;
        border-radius: 10px;
    }
    .ent-record-add-photo-page .geo-editor-title {
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 8px;
    }
    .ent-record-add-photo-page .geo-editor-map,
    .ent-record-add-photo-page #photoGeoMap {
        height: 280px !important;
        min-height: 280px;
        width: 100%;
        border-radius: 8px;
    }
    .ent-record-add-photo-page .geo-editor-controls {
        display: flex;
        flex-direction: column;
        gap: 18px;
        margin-top: 10px;
    }
    .ent-record-add-photo-page .geo-editor-controls input[type="range"] {
        width: 100%;
        height: 36px;
    }
    .ent-record-add-photo-page .geo-editor-hint {
        font-size: 12px;
        margin-top: 8px;
    }

    .ent-record-add-photo-page .alert,
    .ent-record-add-photo-page .client-alert {
        font-size: 14px;
        padding: 10px 12px;
        border-radius: 8px;
    }

    /* Sticky save bar at the bottom for fast field submit */
    .ent-record-add-photo-page::after {
        content: "";
        display: block;
        height: 72px;
    }
    .ent-record-add-photo-page .mobile-save-bar,
    .ent-record-add-photo-page #photoRecordForm .actions .btn-primary {
        /* Primary Zapisz also remains in header actions; the sticky shortcut comes from this rule:
           we duplicate visual prominence by promoting the top-of-form button via order: -1 above. */
    }
}

/* Optional: slightly wider tablet still benefits from single-column */
@media (max-width: 900px) and (min-width: 769px) {
    .ent-record-add-photo-page #photoGeoMap,
    .ent-record-add-photo-page .geo-editor-map {
        height: 320px !important;
    }
}



/* === M4: species_view.php mobile tighten under .ent-species-view-page === */
@media (max-width: 768px) {
    .ent-species-view-page {
        padding: 12px;
    }
    .ent-species-view-page .container {
        margin: 0 auto;
        padding: 18px 16px;
        border-radius: 16px;
    }
    .ent-species-view-page .header-top {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .ent-species-view-page .header-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        justify-content: stretch;
    }
    .ent-species-view-page .header-actions a {
        width: 100%;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 10px 12px;
    }
    .ent-species-view-page .family {
        font-size: 12px;
        letter-spacing: 0.8px;
    }
    .ent-species-view-page h1 {
        font-size: 24px;
        line-height: 1.15;
        margin: 4px 0;
    }
    .ent-species-view-page .author {
        display: block;
        margin-top: 6px;
        font-size: 15px;
    }
    .ent-species-view-page .media-buttons {
        display: grid;
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 20px;
    }
    .ent-species-view-page .media-buttons a {
        width: 100%;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 10px 14px;
    }
    .ent-species-view-page .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 22px;
    }
    .ent-species-view-page .stat-card {
        padding: 16px;
    }
    .ent-species-view-page .thumbs-toolbar {
        margin: 0 0 12px;
        justify-content: stretch;
    }
    .ent-species-view-page .species-record-actions {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        margin: 0 0 12px;
    }
    .ent-species-view-page .species-record-selected { text-align: center; }
    .ent-species-view-page .species-record-delete { width: 100%; min-height: 46px; }
    .ent-species-view-page .thumbs-toggle {
        width: 100%;
        min-height: 42px;
    }

    .ent-species-view-page table,
    .ent-species-view-page thead,
    .ent-species-view-page tbody {
        display: block;
        width: 100%;
    }
    .ent-species-view-page thead {
        display: none;
    }
    .ent-species-view-page tbody {
        background: #fff;
        border: 1px solid #e3e8ee;
        border-radius: 12px;
        overflow: hidden;
    }
    .ent-species-view-page tbody > tr:not(.thumb-row) {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) 38px;
        grid-template-areas:
            "id date delete"
            "site site delete";
        gap: 4px 12px;
        align-items: start;
        padding: 12px 14px;
        margin: 0;
        border-bottom: 1px solid #edf1f4;
        background: #fff;
    }
    .ent-species-view-page tbody > tr:not(.thumb-row):last-child {
        border-bottom: 0;
    }
    .ent-species-view-page tbody > tr:not(.thumb-row) td {
        display: block;
        padding: 0;
        border: 0;
        min-width: 0;
    }
    .ent-species-view-page tbody > tr:not(.thumb-row) td:nth-child(1) {
        grid-area: id;
        white-space: nowrap;
    }
    .ent-species-view-page tbody > tr:not(.thumb-row) td:nth-child(2) {
        grid-area: date;
        justify-self: end;
        text-align: right;
        white-space: nowrap;
    }
    .ent-species-view-page tbody > tr:not(.thumb-row) td:nth-child(3) {
        grid-area: site;
        min-width: 0;
    }
    .ent-species-view-page tbody > tr:not(.thumb-row) td:nth-child(4),
    .ent-species-view-page tbody > tr:not(.thumb-row) td:nth-child(5),
    .ent-species-view-page tbody > tr:not(.thumb-row) td:nth-child(6),
    .ent-species-view-page tbody > tr:not(.thumb-row) td:nth-child(7),
    .ent-species-view-page tbody > tr:not(.thumb-row) td:nth-child(8) {
        display: none;
    }
    .ent-species-view-page tbody > tr:not(.thumb-row) td:nth-child(9) {
        grid-area: delete;
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: stretch;
        width: 38px;
    }
    .ent-species-view-page .table-link {
        color: #43566f;
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
    }
    .ent-species-view-page tbody > tr:not(.thumb-row) td:nth-child(2) .table-link {
        font-size: 14px;
        font-weight: 600;
        color: #2c3e50;
    }
    .ent-species-view-page .site-link {
        display: block;
        color: #c77718;
        text-decoration: none;
        line-height: 1.22;
    }
    .ent-species-view-page .site-link strong,
    .ent-species-view-page tbody > tr:not(.thumb-row) td:nth-child(3) > strong {
        display: block;
        font-size: 15px;
        font-weight: 700;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .ent-species-view-page .stan-kod-small {
        display: block;
        margin-top: 2px;
        font-size: 12px;
    }
    .ent-species-view-page .thumb-row {
        display: none;
        border-bottom: 1px solid #edf1f4;
        background: #fafbfc;
    }
    .ent-species-view-page .thumb-row.visible {
        display: block;
    }
    .ent-species-view-page .thumb-cell {
        display: block;
        padding: 10px 12px 14px;
        border: 0;
    }
    .ent-species-view-page .thumb-strip {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .ent-species-view-page .thumb-strip a {
        flex: 0 0 108px;
        width: 108px;
    }
    .ent-species-view-page .empty-state-cell {
        display: block !important;
        padding: 26px 16px !important;
        text-align: center;
    }
    .ent-species-view-page .gallery-section h2 {
        font-size: 20px;
    }
    .ent-species-view-page .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

/* === M1B: records.php mobile hard override under .ent-records-page === */
@media (max-width: 768px) {
    .ent-records-page .records-table tbody {
        display: block !important;
        width: 100% !important;
        background: #fff !important;
        border: 1px solid #d7dde3 !important;
        border-radius: 10px !important;
        overflow: hidden !important;
    }
    .ent-records-page .records-table tbody > tr {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) auto auto !important;
        grid-template-areas:
            "id name edit delete"
            ". family edit delete"
            ". site edit delete" !important;
        gap: 3px 10px !important;
        align-items: start !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 11px 12px !important;
        border: 0 !important;
        border-bottom: 1px solid #e6ebf0 !important;
        border-radius: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
    }
    .ent-records-page .records-table tbody > tr:last-child {
        border-bottom: 0 !important;
    }
    .ent-records-page .records-table tbody > tr > td {
        display: block !important;
        width: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        min-width: 0 !important;
        text-align: left !important;
    }
    .ent-records-page .records-table tbody > tr > td::before {
        display: none !important;
        content: none !important;
    }
    .ent-records-page .records-table tbody > tr > td:nth-child(1) {
        grid-area: id !important;
        white-space: nowrap !important;
    }
    .ent-records-page .records-table tbody > tr > td:nth-child(13) {
        grid-area: delete !important;
        align-self: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 28px !important;
    }
    .ent-records-page .records-table tbody > tr > td:nth-child(3) {
        grid-area: name !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }
    .ent-records-page .records-table tbody > tr > td:nth-child(6) {
        grid-area: site !important;
        min-width: 0 !important;
    }
    .ent-records-page .records-table tbody > tr > td:nth-child(2),
    .ent-records-page .records-table tbody > tr > td:nth-child(5),
    .ent-records-page .records-table tbody > tr > td:nth-child(7),
    .ent-records-page .records-table tbody > tr > td:nth-child(8),
    .ent-records-page .records-table tbody > tr > td:nth-child(9),
    .ent-records-page .records-table tbody > tr > td:nth-child(10),
    .ent-records-page .records-table tbody > tr > td:nth-child(11) {
        display: none !important;
    }
    .ent-records-page .records-table tbody > tr > td.record-family-cell {
        display: block !important;
        grid-area: family !important;
    }
    .ent-records-page .records-table tbody > tr > td.actions-cell {
        grid-area: edit !important;
        display: flex !important;
        align-items: center !important;
        justify-self: end !important;
        align-self: center !important;
        gap: 8px !important;
        white-space: nowrap !important;
        min-width: auto !important;
        border-top: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    .ent-records-page .records-table tbody > tr > td.actions-cell .inline-delete-form,
    .ent-records-page .records-table tbody > tr > td.actions-cell .btn-delete {
        display: none !important;
    }
    .ent-records-page .records-table tbody > tr > td.actions-cell .record-edit-link,
    .ent-records-page .records-table tbody > tr > td.actions-cell .edit-disabled {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 34px !important;
        padding: 0 12px !important;
        border-radius: 999px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        text-decoration: none !important;
    }
    .ent-records-page .records-table .record-id-link {
        color: #ffffff !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        text-decoration: none !important;
    }
    .ent-records-page .records-table .record-species-link {
        display: block !important;
        color: #163a63 !important;
        text-decoration: none !important;
        line-height: 1.25 !important;
    }
    .ent-records-page .records-table .record-species-link strong {
        display: block !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        hyphens: auto;
    }
    .ent-records-page .records-table .record-site-link {
        display: block !important;
        color: #b86d16 !important;
        font-size: 13px !important;
        text-decoration: none !important;
        line-height: 1.3 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .ent-records-page .bulk-delete-toolbar {
        align-items: stretch !important;
        margin-bottom: 10px !important;
    }
    .ent-records-page .bulk-delete-counter {
        flex: 1 1 100% !important;
        margin-right: 0 !important;
    }
    .ent-records-page .bulk-delete-secondary,
    .ent-records-page .bulk-delete-submit,
    .ent-records-page .bulk-export-form {
        flex: 1 1 calc(50% - 8px) !important;
    }
    .ent-records-page .bulk-export-form {
        display: flex !important;
    }
    .ent-records-page .bulk-export-submit {
        width: 100%;
    }
}


/* === M3B: record_view.php mobile card layout under .ent-record-view-page === */
@media (max-width: 768px) {
    .ent-record-view-page {
        padding: 8px;
    }
    .ent-record-view-page .container {
        margin: 8px auto 24px;
        padding: 18px 14px 20px;
        border-radius: 10px;
        border-top-width: 4px;
    }
    .ent-record-view-page .header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding-bottom: 16px;
        margin-bottom: 18px;
    }
    .ent-record-view-page .header-main,
    .ent-record-view-page .header-actions {
        width: 100%;
        align-items: stretch;
    }
    .ent-record-view-page h1 {
        font-size: 22px;
        line-height: 1.15;
    }
    .ent-record-view-page .badge-id {
        align-self: flex-start;
        font-size: 14px;
        padding: 6px 12px;
        letter-spacing: 0;
    }
    .ent-record-view-page .header-actions,
    .ent-record-view-page .bottom-actions {
        flex-direction: column;
        gap: 18px;
    }
    .ent-record-view-page .btn-back,
    .ent-record-view-page .btn-edit,
    .ent-record-view-page .btn-media,
    .ent-record-view-page .record-view-delete-form,
    .ent-record-view-page .record-view-delete-button {
        width: 100%;
        min-height: 46px;
        padding: 12px 14px;
        font-size: 15px;
    }
    .ent-record-view-page .data-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 20px;
    }
    .ent-record-view-page .data-group,
    .ent-record-view-page .notes-box,
    .ent-record-view-page .desc-box,
    .ent-record-view-page .media-empty {
        padding: 14px 12px;
        border-radius: 10px;
    }
    .ent-record-view-page .data-row {
        margin-bottom: 14px;
    }
    .ent-record-view-page .label {
        font-size: 10px;
        margin-bottom: 5px;
    }
    .ent-record-view-page .val,
    .ent-record-view-page .notes-content,
    .ent-record-view-page .desc-content {
        font-size: 15px;
        line-height: 1.45;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .ent-record-view-page .val.val-large {
        font-size: 15px;
    }
    .ent-record-view-page .species-name {
        display: block;
        font-size: 22px;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }
    .ent-record-view-page .species-author {
        display: block;
        margin-top: 4px;
        font-size: 12px;
        line-height: 1.35;
    }
    .ent-record-view-page .plec-tag {
        display: inline-block;
        margin: 6px 0 0;
    }
    .ent-record-view-page .coords-line {
        align-items: flex-start;
    }
    .ent-record-view-page .coords-map-link {
        overflow-wrap: anywhere;
    }
    .ent-record-view-page .media-section {
        margin-bottom: 20px;
    }
    .ent-record-view-page .media-section h3,
    .ent-record-view-page .desc-box h3,
    .ent-record-view-page .notes-box h3 {
        font-size: 13px;
        line-height: 1.3;
    }
    .ent-record-view-page .media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
        margin-bottom: 12px;
    }
    .ent-record-view-page .media-thumb {
        border-radius: 8px;
    }
}

@media (max-width: 420px) {
    .ent-record-view-page .media-grid {
        grid-template-columns: 1fr;
    }
}

/* Origin type Notatka (2026-06-22) */
.ent-records-page .origin-note {
    color: #6f42c1;
    font-weight: 700;
}

.ent-records-page .record-note-preview {
    color: #52606d;
    font-size: 13px;
    line-height: 1.3;
    margin-top: 3px;
}

.ent-records-page .bulk-delete-form {
    display: none;
}

.ent-records-page .bulk-delete-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 10px;
    border: 1px solid #dce5e0;
    border-radius: 8px;
    background: #f7faf8;
}

.ent-records-page .bulk-delete-counter {
    margin-right: auto;
    color: #31443d;
    font-size: 13px;
    font-weight: 700;
}

.ent-records-page .bulk-delete-secondary,
.ent-records-page .bulk-delete-submit,
.ent-records-page .bulk-export-submit {
    min-height: 36px;
    padding: 7px 11px;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.ent-records-page .bulk-delete-secondary {
    background: #e7eee9 !important;
    color: #22362f !important;
}

.ent-records-page .bulk-delete-submit {
    background: #c0392b !important;
    color: #ffffff !important;
}

.ent-records-page .bulk-export-form {
    display: inline-flex;
    margin: 0;
}

.ent-records-page .bulk-export-submit {
    border: 1px solid #286681 !important;
    background: #337fa3 !important;
    color: #ffffff !important;
}

.ent-records-page .bulk-delete-submit:disabled {
    background: #e5e7eb !important;
    color: #6b7280 !important;
    cursor: not-allowed;
    opacity: 0.5;
}

.ent-records-page .bulk-select-head,
.ent-records-page .bulk-select-cell {
    width: 52px;
    text-align: center;
}

@media (min-width: 769px) {
.ent-records-page .records-table th:nth-child(1),
.ent-records-page .records-table td:nth-child(1) { width: 64px; }
.ent-records-page .records-table th:nth-child(2),
.ent-records-page .records-table td:nth-child(2) { width: 72px; }
.ent-records-page .records-table th:nth-child(3),
.ent-records-page .records-table td:nth-child(3) { width: 150px; }
.ent-records-page .records-table th:nth-child(4),
.ent-records-page .records-table td:nth-child(4) { width: 110px; }
.ent-records-page .records-table th:nth-child(5),
.ent-records-page .records-table td:nth-child(5) { width: 130px; }
.ent-records-page .records-table th:nth-child(6),
.ent-records-page .records-table td:nth-child(6) { width: 170px; }
.ent-records-page .records-table th:nth-child(7),
.ent-records-page .records-table td:nth-child(7) { width: 88px; }
.ent-records-page .records-table th:nth-child(8),
.ent-records-page .records-table td:nth-child(8) { width: 50px; }
.ent-records-page .records-table th:nth-child(9),
.ent-records-page .records-table td:nth-child(9) { width: 52px; }
.ent-records-page .records-table th:nth-child(10),
.ent-records-page .records-table td:nth-child(10) { width: 76px; }
.ent-records-page .records-table th:nth-child(11),
.ent-records-page .records-table td:nth-child(11) {
    width: 150px;
    max-width: 150px;
}
.ent-records-page .records-table th:nth-child(12),
.ent-records-page .records-table td:nth-child(12) {
    width: 76px;
    min-width: 76px;
    text-align: center;
}
.ent-records-page .records-table th:nth-child(13),
.ent-records-page .records-table td:nth-child(13) {
    width: 70px;
    min-width: 70px;
    text-align: center;
}

.ent-records-page .records-table .record-place-cell,
.ent-records-page .records-table .record-site-cell,
.ent-records-page .records-table .record-family-cell,
.ent-records-page .records-table .record-notes-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ent-records-page .records-table .record-notes-cell {
    max-width: 150px;
}
.ent-records-page .records-table .actions-cell {
    white-space: nowrap;
}

.ent-records-page .records-table td.actions-cell .inline-delete-form,
.ent-records-page .records-table td.actions-cell .btn-delete {
    display: none;
}
}

/* ENTOMONE records: optional compact photo thumbnails in the record list. */
.ent-records-page .records-thumbnail-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 9px;
    box-sizing: border-box;
    flex: 0 0 auto;
    min-width: 84px;
    border: 1px solid #d8c82f;
    border-radius: 6px;
    color: #332f00;
    background: #F6E63C;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.ent-records-page .records-thumbnail-toggle:hover,
.ent-records-page .records-thumbnail-toggle:focus {
    background: #e4d42d;
    border-color: #c9ba24;
    color: #332f00;
}

.ent-records-page .records-thumbnail-toggle.is-active {
    background: #e4d42d;
    border-color: #c9ba24;
    color: #332f00;
}

/* ENTOMONE site view: optional compact record thumbnails. */
.ent-site-view-page .site-records-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ent-site-view-page .site-records-heading h3 { margin: 0; }
.ent-site-view-page .records-thumbnail-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #d8c91f;
    border-radius: 6px;
    background: #fffbe6;
    color: #4b4300;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.ent-site-view-page .records-thumbnail-toggle:hover,
.ent-site-view-page .records-thumbnail-toggle:focus,
.ent-site-view-page .records-thumbnail-toggle.is-active { background: #e4d42d; border-color: #c9ba24; color: #332f00; }
.ent-site-view-page .records-list--thumbnails .record-row { grid-template-columns: 80px 110px 96px 1fr 92px; }
.ent-site-view-page .site-record-thumbnail { width: 96px; min-height: 64px; padding: 4px; text-align: center; }
.ent-site-view-page .site-record-thumbnail-link { display: inline-flex; width: 96px; height: 64px; overflow: hidden; border: 1px solid #d5dce3; border-radius: 5px; background: #f5f7f9; }
.ent-site-view-page .site-record-thumbnail-link img { width: 100%; height: 100%; object-fit: cover; }
.ent-site-view-page .site-record-thumbnail.is-empty { min-height: 0; padding: 0; }

.ent-records-page .records-table--thumbnails .record-thumbnail-cell {
    width: 104px;
    padding: 4px;
    text-align: center;
}

.ent-records-page .record-thumbnail-link {
    display: inline-flex;
    width: 96px;
    height: 64px;
    overflow: hidden;
    border: 1px solid #d5dce3;
    border-radius: 5px;
    background: #f5f7f9;
}

.ent-records-page .record-thumbnail-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 769px) {
    .ent-records-page .records-table--thumbnails th:nth-child(3),
    .ent-records-page .records-table--thumbnails td:nth-child(3) { width: 104px; min-width: 104px; }
    .ent-records-page .records-table--thumbnails th:nth-child(4),
    .ent-records-page .records-table--thumbnails td:nth-child(4) { width: 140px; }
    .ent-records-page .records-table--thumbnails th:nth-child(5),
    .ent-records-page .records-table--thumbnails td:nth-child(5) { width: 110px; }
    .ent-records-page .records-table--thumbnails th:nth-child(6),
    .ent-records-page .records-table--thumbnails td:nth-child(6) { width: 120px; }
    .ent-records-page .records-table--thumbnails th:nth-child(7),
    .ent-records-page .records-table--thumbnails td:nth-child(7) { width: 150px; }
    .ent-records-page .records-table--thumbnails th:nth-child(12),
    .ent-records-page .records-table--thumbnails td:nth-child(12) { width: 130px; max-width: 130px; }
}

@media (max-width: 768px) {
    .ent-records-page .records-table .record-notes-cell {
        display: none !important;
    }

    .ent-records-page .records-table--thumbnails tr {
        grid-template-areas:
            "id name edit delete"
            ". family edit delete"
            ". photo edit delete"
            ". site edit delete" !important;
    }

    .ent-records-page .records-table--thumbnails .record-thumbnail-cell {
        grid-area: photo;
        display: block;
        padding-top: 2px;
    }

    .ent-records-page .records-table--thumbnails td[data-label="Nazwa"],
    .ent-records-page .records-table--thumbnails td[data-label="Name"] {
        display: block !important;
        grid-area: name !important;
    }

    .ent-records-page .records-table--thumbnails .record-thumbnail-cell {
        grid-area: photo !important;
        display: block !important;
    }

    .ent-records-page .records-table--thumbnails .record-site-cell {
        display: block !important;
        grid-area: site !important;
    }

    .ent-records-page .records-table--thumbnails .record-thumbnail-cell.is-empty {
        display: none;
    }

    .ent-records-page .record-thumbnail-link {
        width: 120px;
        height: 80px;
    }

}

/* ENTOMONE records.php: czytelna liczba okazow */
.ent-records-page .record-quantity-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 3px 7px;
    border: 1px solid #d0e7d3;
    border-radius: 999px;
    background: #f2faf3;
    color: #176b35;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.1;
    white-space: nowrap;
}

.ent-records-page .record-quantity-badge strong {
    font-size: inherit;
    color: inherit;
    font-weight: 500;
}

.ent-records-page .record-quantity-empty {
    color: #7b8794;
}

@media (max-width: 768px) {
    .ent-records-page .records-table tbody > tr > td.record-quantity-cell {
        display: block !important;
        padding-top: 2px !important;
    }
}
.ent-records-page .record-bulk-check {
    width: 18px;
    height: 18px;
    accent-color: #c0392b;
    cursor: pointer;
}

.ent-records-page .bulk-select-disabled {
    color: #a4adb5;
}

.ent-records-page .bulk-delete-toolbar button.bulk-delete-secondary,
.ent-records-page .bulk-delete-toolbar #bulkSelectVisibleBtn,
.ent-records-page .bulk-delete-toolbar #bulkClearBtn {
    background: #e7eee9 !important;
    color: #1f332c !important;
    border: 1px solid #c9d8d0 !important;
    text-shadow: none !important;
    opacity: 1 !important;
}

.ent-records-page .bulk-delete-toolbar button.bulk-delete-submit,
.ent-records-page .bulk-delete-toolbar #bulkDeleteSubmitBtn {
    background: #c0392b !important;
    color: #ffffff !important;
    border: 1px solid #a93226 !important;
    text-shadow: none !important;
    opacity: 1 !important;
}


/* ENTOMONE records toolbar gallery link (2026-07-09) */
.ent-records-page .bulk-gallery-link {
    align-items: center;
    background: #3498db !important;
    border: 1px solid #2477ad !important;
    border-radius: 7px;
    color: #ffffff !important;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    min-height: 36px;
    padding: 7px 12px;
    text-decoration: none;
    text-shadow: none !important;
}

.ent-records-page .bulk-gallery-link:hover,
.ent-records-page .bulk-gallery-link:focus {
    background: #2477ad !important;
    color: #ffffff !important;
    outline: none;
    text-decoration: none;
}

@media (max-width: 768px) {
    .ent-records-page .bulk-delete-toolbar .bulk-gallery-link {
        flex: 1 1 100% !important;
        width: 100%;
    }
}
.ent-records-page .bulk-delete-toolbar button.bulk-delete-submit:disabled,
.ent-records-page .bulk-delete-toolbar #bulkDeleteSubmitBtn:disabled {
    background: #e5e7eb !important;
    color: #374151 !important;
    border-color: #cbd5e1 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

.ent-record-view-page .tag-u {
    background: #6f42c1;
}

.ent-report-page .badge-u {
    color: #6f42c1;
    font-weight: 700;
}

.ent-species-view-page .origin-u {
    color: #6f42c1;
    font-weight: 700;
}

/* Fix dictionaries.php home button contrast (2026-06-22) */
.ent-dictionaries-page .nav-back .btn-home,
.ent-dictionaries-page .nav-back .btn-home:visited {
    color: #ffffff;
}
.ent-dictionaries-page .nav-back .btn-home:hover,
.ent-dictionaries-page .nav-back .btn-home:focus {
    background: #2980b9;
    color: #ffffff;
}


/* Site visits as first-class observation events (2026-06-23) */
.ent-site-view-page .site-visits-box { margin: -8px 0 18px; padding: 12px; border: 1px solid #dce6ef; border-radius: 10px; background: #f8fbff; }
.ent-site-view-page .site-visits-box-title { margin-bottom: 8px; color: #1f3f5f; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; }
.ent-site-view-page .site-visits-box-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ent-site-view-page .site-visit-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #bfd4e6; border-radius: 999px; background: #ffffff; color: #26465f; font-size: 12px; line-height: 1.15; }
.ent-site-view-page .site-visit-chip strong { color: #12395a; }
.ent-site-view-page .site-visit-chip span { color: #607080; }
.ent-site-view-page .site-visits-box-empty { color: #607080; font-size: 13px; }

/* Updates page (2026-06-28) */
.ent-updates-page {
    min-height: 100svh;
    background: #f4f7f6;
    color: #17251f;
}

.ent-updates-page .updates-shell {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 28px 20px 42px;
}

.ent-updates-page .updates-hero,
.ent-updates-page .updates-continuity,
.ent-updates-page .updates-rules,
.ent-updates-page .updates-timeline,
.ent-updates-page .updates-footer {
    border: 1px solid #dbe5df;
    border-radius: 8px;
    background: #ffffff;
}

.ent-updates-page .updates-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 22px;
    padding: 26px;
    border-top: 5px solid #315746;
}

.ent-updates-page .updates-kicker,
.ent-updates-page .updates-section-label {
    margin: 0 0 7px;
    color: #66736e;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ent-updates-page h1,
.ent-updates-page h2,
.ent-updates-page h3,
.ent-updates-page p {
    overflow-wrap: anywhere;
}

.ent-updates-page h1 {
    margin: 0 0 10px;
    color: #10251f;
    font-size: 34px;
    line-height: 1.1;
}

.ent-updates-page .updates-lead {
    max-width: 760px;
    margin: 0;
    color: #52615c;
    font-size: 16px;
    line-height: 1.55;
}

.ent-updates-page .updates-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 18px;
}

.ent-updates-page .updates-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 7px;
    background: #315746;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.ent-updates-page .updates-action-secondary {
    background: #e8efe9;
    color: #1f332c;
}

.ent-updates-page .updates-continuity {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr);
    gap: 22px;
    margin-top: 18px;
    padding: 24px;
}

.ent-updates-page .updates-continuity h2,
.ent-updates-page .updates-timeline h2 {
    margin: 0 0 10px;
    color: #10251f;
    font-size: 24px;
    line-height: 1.2;
}

.ent-updates-page .updates-continuity p,
.ent-updates-page .updates-stage-card p,
.ent-updates-page .updates-rules p,
.ent-updates-page .updates-item p,
.ent-updates-page .updates-footer p {
    margin: 0;
    color: #52615c;
    font-size: 14px;
    line-height: 1.55;
}

.ent-updates-page .updates-stage-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ent-updates-page .updates-stage-card {
    padding: 15px;
    border: 1px solid #dde7e1;
    border-radius: 8px;
    background: #f8faf8;
}

.ent-updates-page .updates-stage-card span {
    display: block;
    margin-bottom: 7px;
    color: #7a5c30;
    font-size: 12px;
    font-weight: 800;
}

.ent-updates-page .updates-stage-card h3 {
    margin: 0 0 8px;
    color: #1f3c32;
    font-size: 17px;
}

.ent-updates-page .updates-rules {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
    padding: 18px 22px;
    background: #fbfcfb;
}

.ent-updates-page .updates-rules strong {
    display: block;
    margin-bottom: 5px;
    color: #21372f;
    font-size: 14px;
}

.ent-updates-page .updates-timeline {
    margin-top: 18px;
    padding: 24px;
}

.ent-updates-page .updates-timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
}

.ent-updates-page .updates-timeline-head > span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e8efe9;
    color: #27453a;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.ent-updates-page .updates-list {
    display: grid;
    gap: 12px;
}

.ent-updates-page .updates-item {
    display: grid;
    grid-template-columns: 142px minmax(0, 1fr);
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid #e4ebe6;
}

.ent-updates-page .updates-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.ent-updates-page .updates-date {
    color: #7a5c30;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.35;
}

.ent-updates-page .updates-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 8px;
}

.ent-updates-page .updates-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef3ef;
    color: #2e4b40;
    font-size: 12px;
    font-weight: 800;
}

.ent-updates-page .updates-meta span + span {
    background: #f2eee7;
    color: #66502f;
}

.ent-updates-page .updates-item h3 {
    margin: 0 0 6px;
    color: #17251f;
    font-size: 18px;
    line-height: 1.25;
}

.ent-updates-page .updates-footer {
    margin-top: 18px;
    padding: 16px 20px;
    background: #fbfcfb;
}

@media (max-width: 860px) {
    .ent-updates-page .updates-hero,
    .ent-updates-page .updates-continuity,
    .ent-updates-page .updates-rules,
    .ent-updates-page .updates-timeline-head,
    .ent-updates-page .updates-item {
        display: block;
    }

    .ent-updates-page .updates-actions {
        justify-content: stretch;
        margin-top: 18px;
    }

    .ent-updates-page .updates-action {
        flex: 1 1 140px;
    }

    .ent-updates-page .updates-stage-grid {
        grid-template-columns: 1fr;
        margin-top: 18px;
    }

    .ent-updates-page .updates-timeline-head > span {
        margin-top: 8px;
    }

    .ent-updates-page .updates-date {
        margin-bottom: 8px;
    }
}

@media (max-width: 520px) {
    .ent-updates-page .updates-shell {
        padding: 14px 10px 28px;
    }

    .ent-updates-page .updates-hero,
    .ent-updates-page .updates-continuity,
    .ent-updates-page .updates-rules,
    .ent-updates-page .updates-timeline,
    .ent-updates-page .updates-footer {
        padding: 16px;
    }

    .ent-updates-page h1 {
        font-size: 28px;
    }

    .ent-updates-page .updates-continuity h2,
    .ent-updates-page .updates-timeline h2 {
        font-size: 21px;
    }
}
/* Updates page (2026-06-28, compact ENTOMONE layout) */
.ent-updates-page {
    color: var(--color-ink);
}

.ent-updates-page .updates-page-shell {
    max-width: 1200px;
}

.ent-updates-page .updates-page-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 18px;
}

.ent-updates-page .updates-page-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 12px;
    border: 0;
    border-radius: 7px;
    background: #2c3e50;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.ent-updates-page .updates-page-nav-link:hover,
.ent-updates-page .updates-page-nav-link:focus {
    background: #1f2d3a;
}

.ent-updates-page .updates-page-panel {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.ent-updates-page .updates-page-row {
    display: grid;
    grid-template-columns: 148px 18px minmax(0, 1fr);
    align-items: start;
    column-gap: 10px;
    margin: 0;
    padding: 6px 0;
    border-bottom: 1px solid #edf1f3;
    color: #17251f;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
}

.ent-updates-page .updates-page-row:last-child {
    border-bottom: 0;
}

.ent-updates-page .updates-page-date {
    color: #10251f;
    font-weight: 800;
    white-space: nowrap;
}

.ent-updates-page .updates-page-separator {
    color: #6b7780;
    font-weight: 700;
    text-align: center;
}

.ent-updates-page .updates-page-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .ent-updates-page .updates-page-nav {
        justify-content: stretch;
    }

    .ent-updates-page .updates-page-nav-link {
        flex: 1 1 120px;
    }

    .ent-updates-page .updates-page-row {
        grid-template-columns: 1fr;
        row-gap: 2px;
        padding: 7px 0;
        font-size: 13px;
    }

    .ent-updates-page .updates-page-separator {
        display: none;
    }
}

/* Live search standard (2026-06-29) */
.ent-live-search-anchor {
    position: relative;
}

.ent-live-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 2800;
    display: flex;
    flex-direction: column;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #d8e0e6;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(19, 34, 47, 0.16);
}

.ent-live-search-dropdown.is-drop-up {
    top: auto;
    bottom: calc(100% + 6px);
}

.ent-live-search-item {
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #edf1f3;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
}

.ent-live-search-item:last-child {
    border-bottom: 0;
}

.ent-live-search-item:hover,
.ent-live-search-item.is-active {
    background: #eef6ff;
}

.ent-live-search-item-label {
    display: block;
    color: #17251f;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
}

.ent-live-search-item-source {
    display: inline-flex;
    align-items: center;
    margin-top: 5px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e9f4ee;
    color: #176f54;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.ent-live-search-item-meta {
    display: block;
    margin-top: 3px;
    color: #607080;
    font-size: 12px;
    line-height: 1.3;
}

.ent-dictionaries-page .search-box,
.ent-dictionaries-page .taxonomy-list-filter,
.ent-records-page .records-live-search-row .col-flex-1 {
    position: relative;
}

.ent-media-picker-page .filters-live-note {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    color: #516171;
    font-size: 12px;
    line-height: 1.35;
}




/* Records compact filter grid (2026-06-29) */
.ent-records-page .records-filter-grid {
    display: grid;
    grid-template-columns: 1.05fr 1.05fr 0.75fr 0.85fr 0.9fr 1.35fr 1.55fr 0.95fr;
    gap: 14px;
    align-items: end;
    margin-bottom: 8px;
}

.ent-records-page .records-filter-field {
    min-width: 0;
}

.ent-records-page .records-filter-field input,
.ent-records-page .records-filter-field select,
.ent-records-page .records-filter-field .select2-container,
.ent-records-page .records-filter-field .select2-container--default .select2-selection--single {
    width: 100% !important;
}

.ent-records-page .records-filter-field select.select2-hidden-accessible {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

.ent-records-page .records-filter-type .select2-container--default .select2-selection--single,
.ent-records-page .records-filter-observer .select2-container--default .select2-selection--single {
    min-width: 0;
}

@media (max-width: 1180px) {
    .ent-records-page .records-filter-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .ent-records-page .records-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .ent-records-page .records-filter-grid {
        grid-template-columns: 1fr;
    }
}

/* Records layout compact summary (2026-06-29) */
.ent-records-page .records-live-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 12px;
}

.ent-records-page .records-live-search-main,
.ent-records-page .records-live-search-actions {
    min-width: 0;
}

.ent-records-page .records-live-search-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 28px 0 0;
}

.ent-records-page .records-live-search-buttons button {
    min-height: 44px;
    margin: 0;
}

.ent-records-page .records-summary-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 10px 0 0;
    color: #526576;
    font-size: 13px;
}

.ent-records-page .records-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef3f7;
    border: 1px solid #d8e3ec;
    white-space: nowrap;
}

.ent-records-page .records-summary-chip strong {
    color: #22384c;
    font-size: 14px;
}

.ent-records-page .results-heading-summary {
    min-width: 0;
}

.ent-records-page .records-results-counters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
}

.ent-records-page .records-results-counters span {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 5px 9px;
    border: 1px solid #e0e8e4;
    border-radius: 999px;
    background: #f6f9f7;
    color: #50605a;
    font-size: 13px;
    line-height: 1.1;
    white-space: nowrap;
}

.ent-records-page .records-results-counters strong {
    color: #2f4a3d;
    font-size: 14px;
    font-weight: 800;
}

.ent-records-page .records-summary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 14px;
    border-radius: 6px;
    border: 1px solid #1f78d1;
    background: #1f78d1;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(31, 120, 209, 0.18);
}

.ent-records-page .records-summary-link:hover,
.ent-records-page .records-summary-link:focus-visible {
    background: #175fa8;
    border-color: #175fa8;
    color: #ffffff;
    text-decoration: none;
}

.ent-records-page .records-summary-link:focus-visible {
    outline: 3px solid rgba(31, 120, 209, 0.25);
    outline-offset: 2px;
}

.ent-records-page .records-mobile-filter-submit {
    display: none;
}

.ent-records-page .results-heading {
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
    color: #435667;
}

.ent-records-page .active-filter-tag {
    font-size: 11px;
    padding: 3px 7px;
    margin-left: 8px;
}

@media (max-width: 900px) {
    .ent-records-page .results-heading-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .ent-records-page .records-live-search-row {
        grid-template-columns: 1fr;
    }

    .ent-records-page .records-live-search-buttons {
        margin-top: 0;
    }
}

@media (max-width: 640px) {
    .ent-records-page .records-live-search-buttons {
        grid-template-columns: 1fr;
    }
}


/* Records filter grid compacted after removing family/species helpers (2026-06-29) */
.ent-records-page .records-filter-grid {
    grid-template-columns: 1fr 1fr 0.7fr 0.82fr 1.75fr 1.1fr;
}

.ent-records-page .record-dataset-badge {
    color: #28527a;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.ent-records-page .record-edit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid #cfe0f1;
    background: #f4f9ff;
    color: #1f78d1;
    font-size: 16px;
    line-height: 1;
}

.ent-records-page .record-edit-link:hover {
    background: #e6f2ff;
    text-decoration: none;
}

.ent-records-page .edit-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid #e1e6eb;
    background: #f7f9fb;
    font-size: 16px;
    line-height: 1;
}

/* ENTOMONE global menu pilot (2026-06-29) */
.ent-global-header {
    position: sticky;
    top: 0;
    z-index: 3000;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #d8e2dc;
    box-shadow: 0 2px 10px rgba(20, 39, 34, 0.08);
    font-family: Arial, sans-serif;
}

.ent-global-inner {
    width: min(100%, 1200px);
    margin: 0 auto;
    min-height: 56px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.ent-global-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: #17342a;
    text-decoration: none;
    font-weight: 900;
    flex: 0 0 auto;
}

.ent-global-brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: #1f6f58;
    color: #ffffff;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0;
}

.ent-global-brand-text {
    font-size: 17px;
    letter-spacing: 0;
}

.ent-global-menu-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid #c9d8d0;
    border-radius: 7px;
    background: #f7faf8;
    color: #17342a;
    min-height: 40px;
    padding: 8px 11px;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    cursor: pointer;
}

.ent-global-menu-icon,
.ent-global-menu-icon::before,
.ent-global-menu-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: "";
}

.ent-global-menu-icon {
    position: relative;
}

.ent-global-menu-icon::before,
.ent-global-menu-icon::after {
    position: absolute;
    left: 0;
}

.ent-global-menu-icon::before { top: -6px; }
.ent-global-menu-icon::after { top: 6px; }

.ent-global-menu {
    display: flex;
    align-items: stretch;
    gap: 4px;
    margin-left: auto;
    min-height: 56px;
}

.ent-menu-group {
    position: relative;
    display: flex;
    align-items: stretch;
}

.ent-menu-trigger,
.ent-menu-direct {
    border: 0;
    background: transparent;
    color: #25342f;
    min-height: 56px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.ent-menu-trigger::after {
    content: "";
    width: 0;
    height: 0;
    margin-left: 7px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.72;
}

.ent-menu-trigger:hover,
.ent-menu-trigger:focus,
.ent-menu-direct:hover,
.ent-menu-direct:focus,
.ent-menu-direct.is-active,
.ent-menu-group:focus-within > .ent-menu-trigger,
.ent-menu-group:hover > .ent-menu-trigger {
    color: #0f5f46;
    background: #edf5f1;
    outline: none;
}

.ent-menu-dropdown {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    width: max-content;
    min-width: 220px;
    max-width: min(320px, calc(100vw - 24px));
    padding: 8px;
    background: #ffffff;
    border: 1px solid #cfded6;
    border-radius: 8px;
    box-shadow: 0 18px 34px rgba(18, 36, 31, 0.18);
}

.ent-menu-dropdown-right {
    left: auto;
    right: 0;
}

.ent-menu-group:hover > .ent-menu-dropdown,
.ent-menu-group:focus-within > .ent-menu-dropdown,
.ent-menu-group.is-open > .ent-menu-dropdown {
    display: block;
}

.ent-menu-link,
.ent-menu-note,
.ent-menu-user-label {
    display: block;
    padding: 9px 10px;
    border-radius: 6px;
    color: #20342d;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.25;
}

.ent-menu-link:hover,
.ent-menu-link:focus,
.ent-menu-link.is-active {
    background: #edf5f1;
    color: #0f5f46;
    outline: none;
}

.ent-menu-subgroup {
    position: relative;
}

.ent-menu-subtrigger {
    width: 100%;
    border: 0;
    background: transparent;
    color: #1f332c;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.ent-menu-subtrigger::after {
    content: ">";
    float: right;
    margin-left: 16px;
    color: #75837d;
    font-weight: 800;
}

.ent-menu-subdropdown {
    display: none;
    position: absolute;
    top: 0;
    left: calc(100% + 6px);
    z-index: 1;
    min-width: 190px;
    padding: 6px;
    border: 1px solid #d7e1dc;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(21, 44, 35, 0.16);
}

.ent-menu-subgroup:hover > .ent-menu-subdropdown,
.ent-menu-subgroup:focus-within > .ent-menu-subdropdown {
    display: block;
}

.ent-menu-note,
.ent-menu-user-label {
    color: #64736d;
    font-size: 12px;
    font-weight: 800;
    text-transform: none;
}

.ent-menu-login {
    color: #ffffff;
    background: #1f6f58;
    border-radius: 999px;
    min-height: 34px;
    margin: 11px 0 11px 4px;
    padding: 0 14px;
}

.ent-menu-login:hover,
.ent-menu-login:focus {
    color: #ffffff;
    background: #185744;
}

@media (max-width: 768px) {
    .ent-global-header {
        position: sticky;
    }

    .ent-global-inner {
        min-height: 54px;
        padding: 0 12px;
    }

    .ent-global-menu-toggle {
        display: inline-flex;
    }

    .ent-global-menu {
        display: none;
        position: absolute;
        left: 8px;
        right: 8px;
        top: calc(100% + 6px);
        max-height: min(78vh, 620px);
        overflow: auto;
        overscroll-behavior: contain;
        margin: 0;
        padding: 8px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        background: #ffffff;
        border: 1px solid #cfded6;
        border-radius: 10px;
        box-shadow: 0 20px 42px rgba(18, 36, 31, 0.24);
    }

    .ent-global-header.is-menu-open .ent-global-menu {
        display: flex;
    }

    .ent-menu-group {
        display: block;
    }

    .ent-menu-trigger,
    .ent-menu-direct {
        width: 100%;
        min-height: 44px;
        justify-content: space-between;
        padding: 0 12px;
        border-radius: 7px;
        background: #f8fbf9;
    }

    .ent-menu-direct {
        justify-content: flex-start;
    }

    .ent-menu-dropdown,
    .ent-menu-dropdown-right {
        position: static;
        width: 100%;
        min-width: 0;
        max-width: none;
        margin-top: 4px;
        padding: 4px;
        border-radius: 8px;
        box-shadow: none;
        border-color: #e2ebe6;
        background: #fbfdfc;
    }

    .ent-menu-group:hover > .ent-menu-dropdown,
    .ent-menu-group:focus-within > .ent-menu-dropdown {
        display: none;
    }

    .ent-menu-group.is-open > .ent-menu-dropdown,
    .ent-menu-group.is-open:focus-within > .ent-menu-dropdown,
    .ent-menu-group.is-open:hover > .ent-menu-dropdown {
        display: block;
    }

    .ent-menu-link,
    .ent-menu-note,
    .ent-menu-user-label {
        min-height: 40px;
        display: flex;
        align-items: center;
    }

    .ent-menu-subdropdown {
        position: static;
        min-width: 0;
        margin: 2px 0 4px 12px;
        box-shadow: none;
    }

    .ent-menu-subtrigger::after {
        content: "v";
    }

    .ent-global-menu-open {
        overflow-x: hidden;
    }
}

/* ENTOMONE global menu pilot - specificity fix vs .ent-records-page button (2026-06-29)
   Powod: .ent-records-page button {color:#fff; padding:12px 20px; font-size:16px; border-radius:4px}
   ma wyzsza specyficznosc niz .ent-menu-trigger / .ent-global-menu-toggle z pilota,
   przez co tekst menu byl bialy na bialym tle. Prefix .ent-global-header podnosi specyficznosc. */

.ent-global-header .ent-menu-trigger,
.ent-global-header .ent-menu-direct {
    color: #25342f;
    background: transparent;
    border: 0;
    padding: 0 12px;
    font-size: 14px;
    border-radius: 0;
    transition: none;
}

.ent-global-header .ent-global-menu-toggle {
    color: #17342a;
    background: #f7faf8;
    border: 1px solid #c9d8d0;
    padding: 8px 11px;
    font-size: inherit;
    border-radius: 7px;
    transition: none;
}

.ent-global-header .ent-menu-trigger:hover,
.ent-global-header .ent-menu-trigger:focus,
.ent-global-header .ent-menu-direct:hover,
.ent-global-header .ent-menu-direct:focus,
.ent-global-header .ent-menu-direct.is-active,
.ent-global-header .ent-menu-group:focus-within > .ent-menu-trigger,
.ent-global-header .ent-menu-group:hover > .ent-menu-trigger {
    color: #0f5f46;
    background: #edf5f1;
}

.ent-global-header .ent-menu-login {
    color: #ffffff;
    background: #1f6f58;
    border-radius: 999px;
    padding: 0 14px;
}

.ent-global-header .ent-menu-login:hover,
.ent-global-header .ent-menu-login:focus {
    color: #ffffff;
    background: #185744;
}

@media (max-width: 768px) {
    .ent-global-header .ent-menu-trigger,
    .ent-global-header .ent-menu-direct {
        background: #f8fbf9;
        padding: 0 12px;
        border-radius: 7px;
    }
}
/* ENTOMONE global menu typography refinement (2026-06-29)
   Kierunek: lzejsze menu zblizone gestoscia do iNaturalist. */
.ent-global-header {
    box-shadow: 0 1px 4px rgba(20, 39, 34, 0.06);
}

.ent-global-inner {
    min-height: 50px;
    gap: 14px;
}

.ent-global-brand {
    min-height: 38px;
    font-weight: 800;
}

.ent-global-brand-mark {
    width: 30px;
    height: 30px;
    font-size: 12px;
    border-radius: 5px;
}

.ent-global-brand-text {
    font-size: 16px;
    font-weight: 800;
}

.ent-global-menu {
    min-height: 50px;
    gap: 2px;
}

.ent-global-header .ent-menu-trigger,
.ent-global-header .ent-menu-direct {
    min-height: 50px;
    padding: 0 10px;
    color: #17251f;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}

.ent-global-header .ent-menu-trigger::after {
    margin-left: 6px;
    border-left-width: 3px;
    border-right-width: 3px;
    border-top-width: 4px;
    opacity: 0.78;
}

.ent-global-header .ent-menu-trigger:hover,
.ent-global-header .ent-menu-trigger:focus,
.ent-global-header .ent-menu-direct:hover,
.ent-global-header .ent-menu-direct:focus,
.ent-global-header .ent-menu-direct.is-active,
.ent-global-header .ent-menu-group:focus-within > .ent-menu-trigger,
.ent-global-header .ent-menu-group:hover > .ent-menu-trigger {
    color: #111827;
    background: #f2f5f3;
}

.ent-menu-dropdown {
    min-width: 210px;
    padding: 6px;
    border-radius: 6px;
    box-shadow: 0 12px 24px rgba(18, 36, 31, 0.14);
}

.ent-menu-link,
.ent-menu-note,
.ent-menu-user-label {
    padding: 8px 9px;
    font-size: 14px;
    line-height: 1.2;
}

.ent-menu-note,
.ent-menu-user-label {
    font-weight: 600;
}

.ent-global-header .ent-global-menu-toggle {
    min-height: 38px;
    padding: 7px 10px;
    color: #17251f;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .ent-global-inner {
        min-height: 50px;
        padding: 0 10px;
    }

    .ent-global-header .ent-menu-trigger,
    .ent-global-header .ent-menu-direct {
        min-height: 42px;
        padding: 0 10px;
        font-size: 14px;
        font-weight: 500;
    }

    .ent-menu-link,
    .ent-menu-note,
    .ent-menu-user-label {
        min-height: 38px;
    }
}
/* ENTOMONE global menu lighter typography pass (2026-06-29)
   Cel: spokojna typografia jak w klasycznych paskach nawigacji, bez ciezkiego boldu. */
.ent-global-header .ent-menu-trigger,
.ent-global-header .ent-menu-direct {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
}

.ent-global-header .ent-menu-trigger::after {
    margin-left: 5px;
    border-left-width: 3px;
    border-right-width: 3px;
    border-top-width: 4px;
    opacity: 0.7;
}

.ent-global-header .ent-menu-trigger:hover,
.ent-global-header .ent-menu-trigger:focus,
.ent-global-header .ent-menu-direct:hover,
.ent-global-header .ent-menu-direct:focus,
.ent-global-header .ent-menu-direct.is-active,
.ent-global-header .ent-menu-group:focus-within > .ent-menu-trigger,
.ent-global-header .ent-menu-group:hover > .ent-menu-trigger {
    font-weight: 400;
}

.ent-menu-link {
    font-size: 14px;
    font-weight: 400;
}

.ent-global-header .ent-global-menu-toggle {
    font-weight: 500;
}
/* ENTOMONE global menu centered desktop (2026-06-29)
   Brand zostaje po lewej, a glowne grupy menu sa centrowane w pasku. */
@media (min-width: 769px) {
    .ent-global-inner {
        position: relative;
        justify-content: center;
    }

    .ent-global-brand {
        position: absolute;
        left: 18px;
    }

    .ent-global-menu {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .ent-global-brand {
        position: static;
    }
}
/* ENTOMONE global menu fixed calm placement (2026-06-29)
   Pasek ma byc przyklejony do gornej krawedzi, bez plywania i animacji. */
html,
body {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.ent-global-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

.ent-global-header,
.ent-global-header * {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
}

.ent-global-inner {
    margin-top: 0 !important;
    transform: none !important;
}

.ent-records-page,
.ent-my-datasets-page,
.ent-user-panel-page,
.ent-users-admin-page,
.ent-user-add-page,
.ent-logout-page {
    padding-top: 50px !important;
}

@media (max-width: 768px) {
    .ent-records-page,
    .ent-my-datasets-page,
    .ent-user-panel-page,
    .ent-users-admin-page,
    .ent-user-add-page,
    .ent-logout-page,
    .ent-record-add-field-page {
        /* Mobilny header (.ent-global-header) zawija sie na 2 rzedy:
           ENT+Menu oraz Dodaj obserwacje+Uzytkownik. Realna wysokosc ~110 px,
           dlatego padding-top musi byc wiekszy niz desktopowe 50 px, inaczej
           tytul strony (np. "Moje obserwacje") jest ucinany przez fixed header. */
        padding-top: 110px !important;
    }
}
/* ENTOMONE records local title compact pass (2026-06-29) */
.ent-records-page .app-header-local .brand-mark {
    display: none !important;
}

.ent-records-page .app-header-local .brand-link {
    gap: 0 !important;
}

.ent-records-page .app-header-local .brand-title {
    font-size: 22px !important;
    line-height: 1.15 !important;
    font-weight: 500 !important;
}

.ent-records-page .app-header-local .brand-subtitle {
    font-size: 12px !important;
    line-height: 1.25 !important;
}
/* ENTOMONE record add mobile action order: save first, then note. */
@media (max-width: 768px) {
    .ent-record-add-photo-page #photoRecordForm .actions .btn {
        flex: 1 1 100% !important;
        width: 100%;
    }

    .ent-record-add-photo-page #photoRecordForm .actions .btn-home {
        order: 1 !important;
    }

    .ent-record-add-photo-page #photoRecordForm .actions .btn-add-record {
        order: 2 !important;
    }

    .ent-record-add-photo-page #photoRecordForm .actions .btn-add-note {
        order: 2 !important;
    }

    .ent-record-add-photo-page #photoRecordForm .actions .btn-primary {
        order: 1 !important;
    }
}

.ent-record-add-photo-page #noteVoiceButton.note-voice-button {
    display: grid;
    width: 54px;
    height: 54px;
    min-width: 54px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #278457;
    color: #ffffff;
}

.ent-record-add-photo-page #noteVoiceButton.note-voice-button:hover,
.ent-record-add-photo-page #noteVoiceButton.note-voice-button:focus-visible {
    background: #176b43;
}

.ent-record-add-photo-page #noteVoiceButton.note-voice-button svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}
/* ENTOMONE shared menu record add page padding (2026-06-29) */
.ent-record-add-photo-page {
    padding-top: 70px !important;
}

@media (max-width: 768px) {
    .ent-record-add-photo-page {
        padding-top: 58px !important;
    }
}
/* ENTOMONE shared menu records batch padding (2026-06-29) */
.ent-record-edit-page,
.ent-record-view-page,
.ent-gallery-page,
.ent-stanowiska-page {
    padding-top: 70px !important;
}

.ent-map-page .map-header {
    top: calc(var(--ent-map-header-clearance) + 16px) !important;
}

@media (max-width: 768px) {
    .ent-map-page {
        --ent-map-header-clearance: 68px;
    }
    .ent-record-edit-page,
    .ent-record-view-page,
    .ent-gallery-page,
    .ent-stanowiska-page {
        padding-top: 58px !important;
    }

    .ent-map-page .map-header {
        top: calc(var(--ent-map-header-clearance) + 8px) !important;
        left: 8px !important;
        right: 8px !important;
    }
}
/* ENTOMONE shared menu tools batch padding (2026-06-29) */
.ent-species-gallery-page,
.ent-report-page,
.ent-inat-publish-page {
    padding-top: 70px !important;
}

.ent-media-picker-page .modal {
    top: 50px !important;
    z-index: 2500 !important;
}

.ent-media-picker-page .container {
    height: calc(100vh - 70px) !important;
}

@media (max-width: 768px) {
    .ent-species-gallery-page,
    .ent-report-page,
    .ent-inat-publish-page {
        padding-top: 58px !important;
    }

    .ent-media-picker-page .modal {
        top: 50px !important;
        align-items: stretch !important;
    }

    .ent-media-picker-page .container {
        width: 100% !important;
        height: calc(100vh - 50px) !important;
        border-radius: 0 !important;
    }
}
/* ENTOMONE shared menu account help batch padding (2026-06-29) */
.ent-help-page,
.ent-updates-page {
    padding-top: 70px !important;
}

.ent-my-datasets-page .container,
.ent-user-panel-page .page,
.ent-users-admin-page .page,
.ent-user-add-page .page,
.ent-logout-page .wrap {
    margin-top: 18px;
}

@media (max-width: 768px) {
    .ent-help-page,
    .ent-updates-page {
        padding-top: 58px !important;
    }
}

/* ENTOMONE global page title compact pass (2026-06-29) */
.ent-my-datasets-page h1,
.ent-user-panel-page h1,
.ent-users-admin-page .users-admin-title,
.ent-user-add-page h1,
.ent-logout-page h1,
.ent-stanowiska-page h1,
.ent-record-edit-page h1,
.ent-record-view-page h1,
.ent-site-view-page h1,
.ent-site-gallery-page .top h1,
.ent-species-view-page h1,
.ent-plant-view-page h1,
.ent-species-gallery-page h1,
.ent-report-page .header h1,
.ent-inat-publish-page h1,
.ent-inat-search-page h1,
.ent-help-page h1,
.ent-updates-page h1,
.ent-dictionaries-page h1 {
    font-size: 22px !important;
    line-height: 1.15 !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
}

.ent-stanowiska-page .sites-card-header {
    justify-content: flex-end;
}

.ent-my-datasets-page .edit-form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ent-my-datasets-page .dataset-delete-btn {
    margin-left: auto;
}

.ent-my-datasets-page .dataset-delete-form {
    display: none;
}

@media (max-width: 768px) {
    .ent-my-datasets-page .edit-form-actions {
        align-items: stretch;
    }

    .ent-my-datasets-page .dataset-delete-btn {
        margin-left: 0;
    }
}

/* ENTOMONE remaining global menu page offsets (2026-06-29) */
.ent-invite-page,
.ent-dictionaries-page,
.ent-filtered-page,
.ent-inat-search-page,
.ent-media-page,
.ent-plant-view-page,
.ent-change-dataset-page,
.ent-trash-page,
.ent-site-gallery-page,
.ent-site-view-page,
.ent-species-view-page {
    padding-top: 70px !important;
}

@media (max-width: 768px) {
    .ent-invite-page,
    .ent-dictionaries-page,
    .ent-filtered-page,
    .ent-inat-search-page,
    .ent-media-page,
    .ent-plant-view-page,
    .ent-change-dataset-page,
    .ent-trash-page,
    .ent-site-gallery-page,
    .ent-site-view-page,
    .ent-species-view-page {
        padding-top: 58px !important;
    }
}

/* ENTOMONE mobile global menu hardening (2026-06-30) */
@media (max-width: 768px) {
    .ent-global-header {
        z-index: 4000 !important;
        background: #ffffff !important;
        border-bottom: 1px solid #dce5e0 !important;
    }

    .ent-global-inner {
        align-items: center !important;
        display: flex !important;
        justify-content: space-between !important;
        min-height: 50px !important;
    }

    .ent-global-brand {
        align-items: center !important;
        display: inline-flex !important;
        flex: 0 1 auto !important;
        min-width: 0 !important;
        text-decoration: none !important;
    }

    .ent-global-brand-text {
        display: none !important;
    }

    .ent-global-menu-toggle {
        align-items: center !important;
        display: inline-flex !important;
        gap: 7px !important;
        margin-left: auto !important;
    }

    .ent-global-header:not(.is-menu-open) .ent-global-menu {
        display: none !important;
    }

    .ent-global-header.is-menu-open .ent-global-menu {
        background: #ffffff !important;
        border-top: 1px solid #dce5e0 !important;
        box-shadow: 0 16px 30px rgba(15, 33, 28, 0.16) !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        left: 0 !important;
        max-height: calc(100vh - 50px) !important;
        overflow-y: auto !important;
        padding: 10px !important;
        position: fixed !important;
        right: 0 !important;
        top: 50px !important;
        width: 100% !important;
    }

    .ent-menu-group,
    .ent-menu-direct {
        width: 100% !important;
    }

    .ent-global-header .ent-menu-trigger,
    .ent-global-header .ent-menu-direct {
        justify-content: space-between !important;
        min-height: 42px !important;
        width: 100% !important;
    }

    .ent-menu-dropdown {
        box-shadow: none !important;
        display: none !important;
        min-width: 0 !important;
        padding: 4px 0 8px 10px !important;
        position: static !important;
        width: 100% !important;
    }

    .ent-menu-group.is-open > .ent-menu-dropdown {
        display: grid !important;
        gap: 4px !important;
    }

    .ent-menu-link,
    .ent-menu-note,
    .ent-menu-user-label {
        border-radius: 6px !important;
        display: block !important;
        min-height: 38px !important;
        padding: 9px 10px !important;
        text-decoration: none !important;
    }
}

/* ENTOMONE photo upload mobile buttons hardening (2026-06-30) */
.ent-record-add-photo-page .upload-picker-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ent-record-add-photo-page .upload-picker-button {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    line-height: 1.2;
    min-height: 42px;
    text-align: center;
}

@media (max-width: 768px) {
    .ent-record-add-photo-page .upload-picker-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .ent-record-add-photo-page .upload-picker-button {
        width: 100%;
    }
}


/* ENTOMONE record add mobile single file picker (2026-07-07) */
@media (max-width: 900px) {
    .ent-record-add-photo-page .upload,
    .ent-record-add-photo-page #photoPickGallery {
        display: none !important;
    }

    .ent-record-add-photo-page .upload-picker-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
}
/* ENTOMONE records mobile filters hardening (2026-06-30) */
@media (max-width: 640px) {
    .ent-records-page .filter-section {
        padding: 14px !important;
    }

    .ent-records-page .records-filter-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        align-items: stretch !important;
    }

    .ent-records-page .records-filter-field {
        min-width: 0 !important;
        width: 100% !important;
    }

    .ent-records-page .records-filter-field label {
        display: block !important;
        margin-bottom: 5px !important;
        font-size: 14px !important;
        line-height: 1.25 !important;
        white-space: normal !important;
    }

    .ent-records-page .records-filter-field input,
    .ent-records-page .records-filter-field select,
    .ent-records-page .records-filter-field .select2-container,
    .ent-records-page .records-filter-field .select2-container--default .select2-selection--single {
        min-height: 42px !important;
        width: 100% !important;
    }

    .ent-records-page .records-summary-strip {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .ent-records-page .records-summary-link,
    .ent-records-page .records-mobile-filter-submit {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }

    .ent-records-page .records-mobile-filter-submit {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        margin: 0;
    }
}

/* ENTOMONE stanowiska mobile width hardening (2026-06-30) */
@media (max-width: 640px) {
    .ent-stanowiska-page {
        padding: 92px 8px 14px !important;
    }

    .ent-stanowiska-page .container {
        max-width: none !important;
        padding: 16px 10px !important;
        width: 100% !important;
    }

    .ent-stanowiska-page .topbar {
        gap: 12px !important;
        margin-bottom: 14px !important;
    }

    .ent-stanowiska-page .btn-back {
        max-width: 100% !important;
        padding: 10px 12px !important;
        text-align: center !important;
        width: 100% !important;
    }

    .ent-stanowiska-page .sites-card {
        margin-top: 14px !important;
        padding: 12px 10px !important;
    }

    .ent-stanowiska-page .sites-card-header,
    .ent-stanowiska-page .sites-card-header-right,
    .ent-stanowiska-page .sites-actions {
        align-items: stretch !important;
        display: grid !important;
        gap: 10px !important;
        grid-template-columns: 1fr !important;
    }

    .ent-stanowiska-page .sites-actions a,
    .ent-stanowiska-page .sites-delete-toggle {
        text-align: center !important;
        width: 100% !important;
    }

    .ent-stanowiska-page .site-add-form {
        margin-top: 12px !important;
        padding: 12px 10px !important;
    }

    .ent-stanowiska-page .site-add-row {
        display: grid !important;
        gap: 10px !important;
        grid-template-columns: 1fr !important;
    }

    .ent-stanowiska-page .site-add-col,
    .ent-stanowiska-page .site-add-col.wide,
    .ent-stanowiska-page .site-add-col.submit {
        min-width: 0 !important;
        width: 100% !important;
    }

    .ent-stanowiska-page .site-add-col input,
    .ent-stanowiska-page .site-add-submit {
        min-height: 42px !important;
        width: 100% !important;
    }
}

/* ENTOMONE stanowiska mobile card compacting (2026-07-01) */
@media (max-width: 640px) {
    .ent-stanowiska-page .sites-list {
        gap: 10px !important;
    }

    .ent-stanowiska-page .site-card-head {
        padding: 8px 9px !important;
    }

    .ent-stanowiska-page .site-card-head-top {
        gap: 8px !important;
    }

    .ent-stanowiska-page .site-card-body {
        padding: 8px 9px 9px !important;
    }

    .ent-stanowiska-page .site-photo-meta {
        line-height: 1.25 !important;
        margin-bottom: 5px !important;
    }

    .ent-stanowiska-page .site-photo-line {
        flex-wrap: nowrap !important;
        gap: 6px !important;
        min-width: 0 !important;
        white-space: nowrap !important;
    }

    .ent-stanowiska-page .site-photo-line > div {
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .ent-stanowiska-page .site-photo-line a,
    .ent-stanowiska-page .site-photo-gps-empty {
        flex: 0 0 auto !important;
    }

    .ent-stanowiska-page .site-visits {
        gap: 4px !important;
        margin-top: 5px !important;
        padding-top: 6px !important;
    }
}

/* ENTOMONE media picker mobile footer safe area (2026-07-01) */
@media (max-width: 768px) {
    .ent-media-picker-page .container {
        height: calc(100dvh - 50px) !important;
        max-height: calc(100dvh - 50px) !important;
    }

    .ent-media-picker-page .content {
        padding: 12px 10px 18px !important;
    }

    .ent-media-picker-page .footer {
        background: #ffffff !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        padding: 10px 10px calc(66px + env(safe-area-inset-bottom, 0px)) !important;
        position: sticky !important;
        bottom: 0 !important;
        z-index: 5 !important;
    }

    .ent-media-picker-page .footer-left-actions,
    .ent-media-picker-page .status,
    .ent-media-picker-page .btn-d {
        grid-column: 1 / -1 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .ent-media-picker-page .footer-left-actions {
        gap: 8px !important;
    }

    .ent-media-picker-page .footer-orphaned-link {
        display: none !important;
    }

    .ent-media-picker-page .primary-toggle {
        margin: 0 !important;
    }

    .ent-media-picker-page .footer .btn {
        min-height: 46px !important;
        padding: 10px 12px !important;
        width: 100% !important;
    }

    .ent-media-picker-page .btn-d {
        min-height: 48px !important;
    }
}
/* ENTOMONE my_datasets mobile layout hardening (2026-07-01) */
.ent-my-datasets-page,
.ent-my-datasets-page * ,
.ent-my-datasets-page *::before,
.ent-my-datasets-page *::after {
    box-sizing: border-box;
}

.ent-my-datasets-page {
    overflow-x: hidden;
}

.ent-my-datasets-page .container,
.ent-my-datasets-page .form-box,
.ent-my-datasets-page .section-stack,
.ent-my-datasets-page .alert,
.ent-my-datasets-page table,
.ent-my-datasets-page .actions-cell,
.ent-my-datasets-page .member-role-form,
.ent-my-datasets-page .invite-form-grid,
.ent-my-datasets-page .invite-link-row {
    min-width: 0;
    max-width: 100%;
}

.ent-my-datasets-page .form-row input[type=text],
.ent-my-datasets-page .form-row input[type=email],
.ent-my-datasets-page .form-row select,
.ent-my-datasets-page .form-row textarea,
.ent-my-datasets-page .member-role-select {
    max-width: 100%;
}

@media (max-width: 640px) {
    .ent-my-datasets-page {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .ent-my-datasets-page .container {
        width: 100%;
        max-width: none !important;
        padding: 0 10px 28px !important;
        margin: 0 auto;
    }

    .ent-my-datasets-page h1 {
        margin-top: 16px;
    }

    .ent-my-datasets-page .page-meta {
        line-height: 1.45;
        overflow-wrap: anywhere;
    }

    .ent-my-datasets-page .form-box,
    .ent-my-datasets-page .alert {
        padding: 14px 12px;
    }

    .ent-my-datasets-page table,
    .ent-my-datasets-page thead,
    .ent-my-datasets-page tbody,
    .ent-my-datasets-page tr,
    .ent-my-datasets-page th,
    .ent-my-datasets-page td {
        display: block;
        width: 100%;
    }

    .ent-my-datasets-page table {
        border-collapse: separate;
        border-spacing: 0;
        margin-top: 8px;
    }

    .ent-my-datasets-page thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .ent-my-datasets-page tbody {
        display: grid;
        gap: 10px;
    }

    .ent-my-datasets-page tr {
        background: #ffffff;
        border: 1px solid #d6e6f8;
        border-radius: 8px;
        padding: 8px 10px;
        box-shadow: 0 1px 4px rgba(31, 79, 130, 0.08);
    }

    .ent-my-datasets-page tr.is-row-active {
        border-color: #d9c75f;
    }

    .ent-my-datasets-page td {
        border-bottom: 1px solid #edf2f7;
        padding: 7px 0;
        overflow-wrap: anywhere;
    }

    .ent-my-datasets-page td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .ent-my-datasets-page td:first-child {
        color: #66788a;
        font-size: 12px;
    }

    .ent-my-datasets-page .date-cell {
        white-space: normal;
    }

    .ent-my-datasets-page .actions-cell,
    .ent-my-datasets-page .member-role-form,
    .ent-my-datasets-page .form-actions,
    .ent-my-datasets-page .invite-form-grid,
    .ent-my-datasets-page .invite-link-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        align-items: stretch;
    }

    .ent-my-datasets-page .inline-default-form,
    .ent-my-datasets-page .actions-cell form,
    .ent-my-datasets-page .member-role-form,
    .ent-my-datasets-page .plain-action-link,
    .ent-my-datasets-page .copy-link-btn,
    .ent-my-datasets-page .btn,
    .ent-my-datasets-page .member-role-select,
    .ent-my-datasets-page .invite-email-row,
    .ent-my-datasets-page .invite-role-row,
    .ent-my-datasets-page .invite-submit-row {
        width: 100%;
    }

    .ent-my-datasets-page .btn,
    .ent-my-datasets-page .copy-link-btn {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: normal;
    }

    .ent-my-datasets-page .member-edit-toggle,
    .ent-my-datasets-page .form-row.checkbox-row {
        align-items: flex-start;
        white-space: normal;
    }

    .ent-my-datasets-page .invite-link-box {
        width: 100%;
    }
}

/* ENTOMONE logout button overflow guard (2026-07-01) */
.ent-logout-page .panel {
    max-width: 100%;
}

.ent-logout-page .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.ent-logout-page .actions .logout-inline-form {
    flex: 1 1 180px;
    min-width: 0;
}

.ent-logout-page .btn {
    max-width: 100%;
}

.ent-logout-page .actions .btn {
    width: 100%;
}


/* ENTOMONE logout mobile button equal width (2026-07-01) */
@media (max-width: 768px) {
    .ent-logout-page .logout-inline-form {
        width: 100%;
    }

    .ent-logout-page .btn-main,
    .ent-logout-page .btn-blue,
    .ent-logout-page .btn-red {
        width: 100%;
        min-width: 0;
    }
}


/* ENTOMONE logout mobile strict stack (2026-07-01) */
@media (max-width: 768px) {
    .ent-logout-page .panel {
        overflow: hidden;
    }

    .ent-logout-page .actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        width: 100%;
        max-width: 100%;
        justify-items: stretch;
    }

    .ent-logout-page .actions .logout-inline-form,
    .ent-logout-page .actions .btn {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
}

/* ENTOMONE global mobile header viewport guard (2026-07-01) */
@media (max-width: 768px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .ent-global-header {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    .ent-global-inner {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        gap: 8px !important;
        justify-content: space-between !important;
    }

    .ent-global-brand {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        max-width: calc(100% - 132px) !important;
    }

    .ent-global-menu-toggle,
    .ent-global-header .ent-global-menu-toggle {
        flex: 0 0 auto !important;
        max-width: calc(100vw - 92px) !important;
        margin-left: auto !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        white-space: nowrap !important;
        transform: none !important;
    }

    .ent-global-menu {
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        max-width: calc(100vw - 16px) !important;
    }
}
/* ENTOMONE inat_taxon_link.php UI */
.ent-inat-taxon-link-page {
    background: #f4f7f6;
    color: #18352d;
    padding-top: 88px;
}

.ent-inat-taxon-link-page *,
.ent-inat-taxon-link-page *::before,
.ent-inat-taxon-link-page *::after {
    box-sizing: border-box;
}

.ent-inat-taxon-link-page .container {
    max-width: 1120px;
    margin: 24px auto 56px;
    padding: 0 24px;
}

.ent-inat-taxon-link-page .top-link {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    color: #5b6f68;
    font-size: 14px;
}

.ent-inat-taxon-link-page .top-link a,
.ent-inat-taxon-link-page table a {
    color: #176f54;
    font-weight: 700;
    text-decoration: none;
}

.ent-inat-taxon-link-page .top-link a:hover,
.ent-inat-taxon-link-page table a:hover {
    text-decoration: underline;
}

.ent-inat-taxon-link-page h1 {
    margin: 0 0 22px;
    font-size: 28px;
    line-height: 1.18;
    color: #10251f;
}

.ent-inat-taxon-link-page h2 {
    margin: 0 0 16px;
    font-size: 18px;
    line-height: 1.25;
    color: #10251f;
}

.ent-inat-taxon-link-page .panel {
    background: #ffffff;
    border: 1px solid #d9e6e1;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(20, 58, 46, 0.08);
    padding: 20px;
    margin-bottom: 18px;
}

.ent-inat-taxon-link-page .details-list {
    display: grid;
    grid-template-columns: minmax(160px, 220px) 1fr;
    gap: 10px 20px;
    margin: 0;
}

.ent-inat-taxon-link-page .details-list dt {
    margin: 0;
    color: #60766e;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.ent-inat-taxon-link-page .details-list dd {
    margin: 0;
    color: #10251f;
    font-weight: 600;
}

.ent-inat-taxon-link-page .muted {
    color: #71837d;
    font-weight: 500;
}

.ent-inat-taxon-link-page label {
    display: block;
    margin: 0 0 8px;
    color: #233b34;
    font-weight: 700;
}

.ent-inat-taxon-link-page .inline-form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 620px;
}

.ent-inat-taxon-link-page input[type="text"] {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    border: 1px solid #bdcec8;
    border-radius: 6px;
    padding: 9px 11px;
    color: #10251f;
    font: inherit;
    background: #ffffff;
}

.ent-inat-taxon-link-page input[type="text"]:focus {
    outline: 3px solid rgba(31, 128, 95, 0.16);
    border-color: #1f805f;
}

.ent-inat-taxon-link-page .btn,
.ent-inat-taxon-link-page button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    padding: 9px 14px;
    background: #176f54;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.ent-inat-taxon-link-page .btn:hover,
.ent-inat-taxon-link-page button:hover {
    background: #115740;
}

.ent-inat-taxon-link-page .alert {
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0 0 18px;
    border: 1px solid transparent;
    font-weight: 700;
}

.ent-inat-taxon-link-page .alert.success {
    background: #dff3e6;
    border-color: #b8e2c5;
    color: #145b34;
}

.ent-inat-taxon-link-page .alert.error {
    background: #fde6e2;
    border-color: #f3bbb0;
    color: #8a2b20;
}

.ent-inat-taxon-link-page table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ent-inat-taxon-link-page th,
.ent-inat-taxon-link-page td {
    border-bottom: 1px solid #e1ebe7;
    padding: 11px 10px;
    text-align: left;
    vertical-align: middle;
}

.ent-inat-taxon-link-page th {
    background: #eef6f3;
    color: #24473d;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.ent-inat-taxon-link-page tr:last-child td {
    border-bottom: 0;
}

.ent-inat-taxon-link-page td form {
    margin: 0;
}

@media (max-width: 720px) {
    .ent-inat-taxon-link-page {
        padding-top: 76px;
    }

    .ent-inat-taxon-link-page .container {
        margin: 12px auto 32px;
        padding: 0 10px;
    }

    .ent-inat-taxon-link-page h1 {
        font-size: 24px;
    }

    .ent-inat-taxon-link-page .panel {
        padding: 14px;
    }

    .ent-inat-taxon-link-page .details-list {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .ent-inat-taxon-link-page .details-list dd {
        margin-bottom: 10px;
    }

    .ent-inat-taxon-link-page .inline-form-row {
        align-items: stretch;
        flex-direction: column;
    }

    .ent-inat-taxon-link-page table,
    .ent-inat-taxon-link-page thead,
    .ent-inat-taxon-link-page tbody,
    .ent-inat-taxon-link-page tr,
    .ent-inat-taxon-link-page th,
    .ent-inat-taxon-link-page td {
        display: block;
    }

    .ent-inat-taxon-link-page thead {
        display: none;
    }

    .ent-inat-taxon-link-page tr {
        border: 1px solid #d9e6e1;
        border-radius: 8px;
        padding: 10px;
        margin-bottom: 10px;
        background: #ffffff;
    }

    .ent-inat-taxon-link-page td {
        border-bottom: 0;
        padding: 5px 0;
    }
}
/* ENTOMONE inat_taxon_link back/no hamburger */
.ent-inat-taxon-link-page .ent-global-menu-toggle {
    display: none !important;
}

.ent-inat-taxon-link-page .inat-link-page-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.ent-inat-taxon-link-page .inat-link-back-btn,
.ent-inat-taxon-link-page .inat-link-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 6px;
    padding: 8px 13px;
    font-weight: 800;
    text-decoration: none;
}

.ent-inat-taxon-link-page .inat-link-back-btn {
    background: #176f54;
    color: #ffffff;
}

.ent-inat-taxon-link-page .inat-link-back-btn:hover {
    background: #115740;
}

.ent-inat-taxon-link-page .inat-link-secondary {
    background: #eef6f3;
    color: #176f54;
    border: 1px solid #c9ddd5;
}

.ent-inat-taxon-link-page .inat-link-secondary:hover {
    background: #dfeee9;
}

@media (max-width: 720px) {
    .ent-inat-taxon-link-page .inat-link-page-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ent-inat-taxon-link-page .inat-link-back-btn,
    .ent-inat-taxon-link-page .inat-link-secondary {
        width: 100%;
    }
}
/* ENTOMONE dictionaries species actions Sync iNat */
.ent-dictionaries-page #tbody-gatunki .species-actions-cell {
    min-width: 230px;
    width: 230px;
}

.ent-dictionaries-page #tbody-gatunki .species-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: nowrap;
}

.ent-dictionaries-page #tbody-gatunki .species-actions .form-inline {
    display: inline-flex;
    margin: 0;
}

.ent-dictionaries-page #tbody-gatunki .species-actions .btn-edit,
.ent-dictionaries-page #tbody-gatunki .species-actions .btn-cancel,
.ent-dictionaries-page #tbody-gatunki .species-actions .btn-sync-inat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 0;
    border-radius: 4px;
    padding: 7px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.ent-dictionaries-page #tbody-gatunki .species-actions .btn-sync-inat {
    background: #176f54;
}

.ent-dictionaries-page #tbody-gatunki .species-actions .btn-sync-inat:hover {
    background: #115740;
}

.ent-dictionaries-page #tbody-gatunki tr.is-editing .species-actions .btn-edit {
    display: none;
}

@media (max-width: 900px) {
    .ent-dictionaries-page #tbody-gatunki .species-actions-cell {
        min-width: 0;
        width: auto;
    }

    .ent-dictionaries-page #tbody-gatunki .species-actions {
        flex-wrap: wrap;
    }
}
/* ENTOMONE dictionaries bulk iNaturalist sync */
.ent-dictionaries-page .inat-bulk-panel {
    background: #ffffff;
    border: 1px solid #d8e7e1;
    border-radius: 8px;
    padding: 16px;
    margin: 0 0 18px;
    box-shadow: 0 2px 8px rgba(15, 47, 41, 0.05);
}

.ent-dictionaries-page .inat-bulk-header,
.ent-dictionaries-page .inat-bulk-list-head,
.ent-dictionaries-page .inat-bulk-filters {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.ent-dictionaries-page .inat-bulk-header {
    align-items: flex-start;
    justify-content: space-between;
}

.ent-dictionaries-page .inat-bulk-header h2,
.ent-dictionaries-page .inat-bulk-list-head h2 {
    margin: 0 0 6px;
}

.ent-dictionaries-page .inat-bulk-filters {
    margin-top: 14px;
}

.ent-dictionaries-page .inat-bulk-filters label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-weight: 700;
}

.ent-dictionaries-page .inat-bulk-filters input[type="text"],
.ent-dictionaries-page .inat-bulk-filters select {
    min-height: 36px;
    border: 1px solid #c9d9d3;
    border-radius: 6px;
    padding: 7px 10px;
}

.ent-dictionaries-page .inat-bulk-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
}

.ent-dictionaries-page .inat-bulk-table,
.ent-dictionaries-page .inat-bulk-results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.ent-dictionaries-page .inat-bulk-table th,
.ent-dictionaries-page .inat-bulk-table td,
.ent-dictionaries-page .inat-bulk-results-table th,
.ent-dictionaries-page .inat-bulk-results-table td {
    padding: 10px 9px;
    border-bottom: 1px solid #e4eeea;
    vertical-align: middle;
}

.ent-dictionaries-page .inat-bulk-select-col {
    width: 76px;
    text-align: center;
}

.ent-dictionaries-page .inat-bulk-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.ent-dictionaries-page .inat-bulk-status-exact {
    background: #dff3e8;
    color: #176f43;
}

.ent-dictionaries-page .inat-bulk-status-manual,
.ent-dictionaries-page .inat-bulk-status-ambiguous {
    background: #fff4d6;
    color: #7a5200;
}

.ent-dictionaries-page .inat-bulk-status-none,
.ent-dictionaries-page .inat-bulk-status-error {
    background: #fde7e7;
    color: #8b1c1c;
}

.ent-dictionaries-page .inat-bulk-panel .btn-sync-inat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 4px;
    padding: 7px 10px;
    background: #176f54;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.ent-dictionaries-page .inat-bulk-panel .btn-sync-inat:hover {
    background: #115740;
}

@media (max-width: 900px) {
    .ent-dictionaries-page .inat-bulk-table,
    .ent-dictionaries-page .inat-bulk-results-table {
        display: block;
        overflow-x: auto;
    }
}
/* ENTOMONE record edit iNaturalist readiness panel */
.ent-record-edit-page .record-inat-panel {
    background: #ffffff;
    border: 1px solid #d8e7e1;
    border-radius: 8px;
    padding: 16px;
    margin: 0 0 18px;
    box-shadow: 0 2px 8px rgba(15, 47, 41, 0.06);
}

.ent-record-edit-page .record-inat-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.ent-record-edit-page .record-inat-panel h2 {
    margin: 0;
    font-size: 20px;
}

.ent-record-edit-page .record-inat-subtitle {
    color: #5d6d68;
    font-size: 13px;
    margin-top: 3px;
}

.ent-record-edit-page .record-inat-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.ent-record-edit-page .record-inat-status.status-ok {
    background: #d4edda;
    color: #155724;
}

.ent-record-edit-page .record-inat-status.status-warn {
    background: #fff3cd;
    color: #856404;
}

.ent-record-edit-page .record-inat-status.status-error {
    background: #f8d7da;
    color: #721c24;
}

.ent-record-edit-page .record-inat-status.status-published {
    background: #cce5ff;
    color: #004085;
}

.ent-record-edit-page .record-inat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.ent-record-edit-page .record-inat-grid > div {
    background: #f6faf8;
    border: 1px solid #e0ebe7;
    border-radius: 6px;
    padding: 10px;
}

.ent-record-edit-page .record-inat-grid strong {
    display: block;
    color: #40534e;
    font-size: 12px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.ent-record-edit-page .record-inat-inline-link {
    display: inline-block;
    margin-left: 8px;
    font-weight: 700;
}

.ent-record-edit-page .record-inat-diagnostics {
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 10px;
}

.ent-record-edit-page .record-inat-diagnostics ul {
    margin: 7px 0 0;
    padding-left: 20px;
}

.ent-record-edit-page .record-inat-diagnostics li + li {
    margin-top: 4px;
}

.ent-record-edit-page .record-inat-blockers {
    background: #fff7e1;
    border: 1px solid #ead38d;
    color: #5d4b12;
}

.ent-record-edit-page .record-inat-warnings {
    background: #eef6ff;
    border: 1px solid #cfe2ff;
    color: #27496d;
}

.ent-record-edit-page .record-inat-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

@media (max-width: 760px) {
    .ent-record-edit-page .record-inat-panel-head,
    .ent-record-edit-page .record-inat-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ent-record-edit-page .record-inat-grid {
        grid-template-columns: 1fr;
    }

    .ent-record-edit-page .record-inat-status,
    .ent-record-edit-page .record-inat-actions .btn-compact {
        width: 100%;
    }
}
/* ENTOMONE inat_taxon_link fixed menu clearance hardening */
.ent-inat-taxon-link-page {
    padding-top: 72px !important;
    scroll-padding-top: 72px;
}

.ent-inat-taxon-link-page .container {
    padding-top: 0 !important;
}

.ent-inat-taxon-link-page .inat-link-page-actions {
    margin-top: 0 !important;
}

#record-inat-panel,
.ent-inat-taxon-link-page h1 {
    scroll-margin-top: 72px;
}

@media (max-width: 720px) {
    .ent-inat-taxon-link-page {
        padding-top: 68px !important;
        scroll-padding-top: 68px;
    }

    .ent-inat-taxon-link-page h1 {
        scroll-margin-top: 68px;
    }
}
/* ENTOMONE iNaturalist batch publish progress modal (2026-07-02) */
.ent-inat-publish-page .inat-page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 16px;
    align-items: start;
    margin: 0 0 18px;
}

.ent-inat-publish-page .inat-page-title h1 {
    margin-bottom: 8px;
}

.ent-inat-publish-page .inat-page-description {
    max-width: 760px;
    margin: 0;
    color: #52675f;
    font-size: 14px;
    line-height: 1.45;
}

.ent-inat-publish-page .inat-account-compact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid #d8e7e1;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(15, 47, 41, 0.05);
}

.ent-inat-publish-page .inat-account-label {
    color: #536762;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ent-inat-publish-page .inat-account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ent-inat-publish-page .inat-account-actions .btn {
    margin: 0;
}

@media (max-width: 760px) {
    .ent-inat-publish-page .inat-page-head {
        grid-template-columns: 1fr;
    }
}

.ent-inat-publish-page .inat-progress-modal {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.56);
}

.ent-inat-publish-page .inat-progress-modal.is-visible {
    display: flex;
}

.ent-inat-publish-page .inat-progress-card {
    width: min(560px, 100%);
    max-height: calc(100vh - 64px);
    overflow: auto;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
    padding: 22px;
}

.ent-inat-publish-page .inat-progress-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.ent-inat-publish-page .inat-progress-head h2 {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.2;
    color: #102a25;
}

.ent-inat-publish-page .inat-progress-head p {
    margin: 0;
    color: #536762;
    font-size: 13px;
}

.ent-inat-publish-page .inat-progress-close {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #334155;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.ent-inat-publish-page .inat-progress-close:hover,
.ent-inat-publish-page .inat-progress-close:focus-visible {
    border-color: #64748b;
    background: #f8fafc;
}

.ent-inat-publish-page .inat-progress-badge {
    min-width: 58px;
    text-align: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e6f4ef;
    color: #106b56;
    font-weight: 700;
    font-size: 13px;
}

.ent-inat-publish-page .inat-progress-track {
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #e5ecea;
}

.ent-inat-publish-page .inat-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e, #22c55e);
    transition: width 360ms ease;
}

.ent-inat-publish-page .inat-progress-percent {
    margin-top: 6px;
    text-align: right;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.ent-inat-publish-page .inat-progress-step {
    margin-top: 14px;
    font-weight: 700;
    color: #102a25;
}

.ent-inat-publish-page .inat-progress-events {
    margin: 14px 0 0;
    padding-left: 20px;
    max-height: 150px;
    overflow: auto;
    color: #334155;
    font-size: 13px;
    line-height: 1.45;
}

.ent-inat-publish-page .inat-progress-events li + li {
    margin-top: 5px;
}

.ent-inat-publish-page .inat-progress-note {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 6px;
    background: #fff7ed;
    color: #8a4b12;
    font-size: 12px;
}

@media (max-width: 640px) {
    .ent-inat-publish-page .inat-progress-modal {
        align-items: stretch;
        padding: 12px;
    }

    .ent-inat-publish-page .inat-progress-card {
        margin-top: 46px;
        max-height: calc(100vh - 70px);
        padding: 18px;
    }
}
/* ENTOMONE iNaturalist queue progress details (2026-07-02) */
.ent-inat-publish-page .inat-progress-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.ent-inat-publish-page .inat-progress-events .is-success {
    color: #106b56;
    font-weight: 700;
}

.ent-inat-publish-page .inat-progress-events .is-error {
    color: #991b1b;
    font-weight: 700;
}

.ent-inat-publish-page .inat-queue-history {
    margin-bottom: 18px;
}

.ent-inat-publish-page .inat-queue-history-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.ent-inat-publish-page .inat-queue-history-head h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.ent-inat-publish-page .inat-queue-history-head p {
    margin: 0;
}

.ent-inat-publish-page .inat-queue-history .table-scroll {
    overflow-x: auto;
}

.ent-inat-publish-page .inat-queue-history table {
    min-width: 700px;
}

.ent-inat-publish-page .inat-queue-history td:last-child,
.ent-inat-publish-page .inat-queue-history th:last-child {
    width: 132px;
    min-width: 132px;
    white-space: nowrap;
}

.ent-inat-publish-page .inat-queue-history td:last-child .btn {
    display: inline-flex;
    justify-content: center;
    min-width: 112px;
    white-space: nowrap;
}

body.ent-inat-queue-window-page {
    margin: 0;
    background: #f3f6f5;
    color: #172b27;
}

.ent-inat-queue-window-page .inat-queue-window {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 40px;
}

.ent-inat-queue-window-page .inat-queue-window-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 18px;
}

.ent-inat-queue-window-page .inat-queue-window-head h1 {
    margin: 0 0 7px;
    font-size: 26px;
}

.ent-inat-queue-window-page .inat-queue-window-head p {
    max-width: 650px;
    margin: 0;
    color: #52645f;
    line-height: 1.5;
}

.ent-inat-queue-window-page .inat-queue-window-controls,
.ent-inat-queue-window-page .inat-queue-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.ent-inat-queue-window-page .inat-queue-card {
    padding: 22px;
    border: 1px solid #cbd7d3;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(17, 49, 42, 0.1);
}

.ent-inat-queue-window-page .inat-queue-meta {
    margin-bottom: 12px;
    font-weight: 700;
}

.ent-inat-queue-window-page .inat-progress-track {
    height: 12px;
    overflow: hidden;
    border-radius: 6px;
    background: #e2e8e6;
}

.ent-inat-queue-window-page .inat-progress-bar {
    width: 0;
    height: 100%;
    background: #0f766e;
    transition: width 300ms ease;
}

.ent-inat-queue-window-page .inat-queue-percent {
    margin-top: 6px;
    text-align: right;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.ent-inat-queue-window-page .inat-queue-current {
    margin: 16px 0 12px;
    font-size: 16px;
    font-weight: 700;
}

.ent-inat-queue-window-page .inat-queue-events {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ent-inat-queue-window-page .inat-queue-item {
    padding: 10px 12px;
    border-top: 1px solid #e2e8e6;
    color: #334155;
    line-height: 1.45;
}

.ent-inat-queue-window-page .inat-queue-item.is-published {
    color: #106b56;
}

.ent-inat-queue-window-page .inat-queue-item.is-error,
.ent-inat-queue-window-page .inat-queue-item.is-partial {
    color: #991b1b;
}

.ent-inat-queue-window-page .inat-queue-actions {
    margin-top: 18px;
}

@media (max-width: 700px) {
    .ent-inat-queue-window-page .inat-queue-window {
        width: min(100% - 24px, 920px);
        padding-top: 18px;
    }

    .ent-inat-queue-window-page .inat-queue-window-head {
        display: block;
    }

    .ent-inat-queue-window-page .inat-queue-window-controls {
        justify-content: flex-start;
        margin-top: 14px;
    }

    .ent-inat-queue-window-page .inat-queue-window-controls .btn {
        flex: 1 1 auto;
    }
}

/* ENTOMONE record_add_photo locality layout 2026-07-05 */
.ent-record-add-photo-page .location-row {
    align-items: flex-start;
}
.ent-record-add-photo-page .location-row .coords-col,
.ent-record-add-photo-page .location-row .observation-place-col {
    flex: 0 1 430px;
    max-width: 460px;
}
.ent-record-add-photo-page .locality-input-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}
.ent-record-add-photo-page .locality-input-row input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
}
.ent-record-add-photo-page .locality-input-row .btn {
    flex: 0 0 auto;
    padding: 9px 14px;
    white-space: nowrap;
}
.ent-record-add-photo-page .locality-status {
    margin-top: 4px;
}
.ent-record-add-photo-page .station-row-below-map {
    margin-top: 4px;
}
.ent-record-add-photo-page .station-row-below-map .station-mode-col {
    flex: 0 1 940px;
    max-width: 940px;
}
.ent-record-add-photo-page .station-inline-fields {
    display: grid;
    grid-template-columns: minmax(310px, max-content) minmax(320px, 1fr);
    gap: 10px;
    align-items: start;
}
.ent-record-add-photo-page .station-row-below-map .station-mode-switch {
    margin: 0;
    align-content: start;
}
.ent-record-add-photo-page .station-row-below-map .station-mode-option {
    min-height: 38px;
    padding: 8px 10px;
}
.ent-record-add-photo-page .station-row-below-map .station-mode-panel input[type="text"] {
    min-height: 38px;
}
@media (max-width: 760px) {
    .ent-record-add-photo-page .location-row .coords-col,
    .ent-record-add-photo-page .location-row .observation-place-col,
    .ent-record-add-photo-page .station-row-below-map .station-mode-col {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .ent-record-add-photo-page .station-inline-fields {
        grid-template-columns: 1fr;
    }
}
/* ENTOMONE stanowiska header action compacting (2026-07-05) */
.ent-stanowiska-page .sites-card-header {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 10px;
}
.ent-stanowiska-page .sites-card-header-right {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    grid-template-columns: none !important;
    width: 100%;
}
.ent-stanowiska-page .sites-card-count {
    white-space: nowrap;
}
.ent-stanowiska-page .sites-delete-toggle {
    width: auto !important;
    max-width: 100%;
    padding: 7px 10px;
    white-space: nowrap;
}
@media (max-width: 420px) {
    .ent-stanowiska-page .sites-card-count,
    .ent-stanowiska-page .sites-delete-toggle {
        font-size: 12px;
    }
}
/* ENTOMONE record_add_photo logical field order (2026-07-05) */
.ent-record-add-photo-page .station-row-below-map .station-inline-fields {
    display: grid;
    grid-template-columns: max-content minmax(300px, 460px) max-content;
    align-items: start;
    gap: 10px;
}
.ent-record-add-photo-page .station-row-below-map .station-mode-option {
    min-height: 38px;
    white-space: nowrap;
}
.ent-record-add-photo-page .station-row-below-map #stationExistingPanel .muted {
    display: none;
}
.ent-record-add-photo-page .station-row-below-map #stationNewPanel {
    grid-column: 2 / span 2;
}
.ent-record-add-photo-page .taxonomy-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.ent-record-add-photo-page .taxonomy-row .species-col,
.ent-record-add-photo-page .taxonomy-row .col {
    min-width: 0;
}

.ent-record-edit-page .species-col,
.ent-record-add-photo-page .species-col {
    position: relative;
    z-index: 2900;
}

.ent-record-edit-page .species-col:focus-within,
.ent-record-add-photo-page .species-col:focus-within {
    z-index: 2910;
}

.inat-taxon-status {
    margin-top: 3px;
    color: #245c46;
    font-size: 13px;
    font-weight: 700;
}

.inat-taxon-status:empty {
    display: none;
}

.ent-record-edit-page #species_name {
    font-weight: 700;
}

.inat-taxon-tree {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid #cfe0d9;
    border-radius: 6px;
    background: #f5fbf8;
    color: #223d34;
    font-size: 12px;
    line-height: 1.35;
}

.inat-taxon-tree[hidden] {
    display: none;
}

.inat-taxon-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    color: #176f54;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.inat-taxon-chip:hover {
    text-decoration: underline;
}

.inat-taxon-separator {
    color: #87988f;
    font-weight: 700;
}

.inat-bulk-top-action {
    margin: 0 0 12px;
}

.ent-live-search-item-label {
    overflow-wrap: anywhere;
}

.ent-live-search-item-meta {
    overflow-wrap: anywhere;
}
.ent-record-add-photo-page .details-row {
    display: grid;
    grid-template-columns: 16ch max-content max-content max-content;
    gap: 18px;
    align-items: start;
}
.ent-record-add-photo-page .details-row .col { min-width: 0; }
.ent-record-add-photo-page .details-row .observer-col { min-width: max-content; }
.ent-record-add-photo-page .details-row .observer-display { width: 16ch; max-width: 100%; }
.ent-record-add-photo-page .observer-display {
    padding: 10px 12px;
    border: 1px solid #d7dde2;
    border-radius: 8px;
    background: #f8fafb;
    min-height: 40px;
}
.ent-record-add-photo-page .record-observer-switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ent-record-add-photo-page .record-observer-choice {
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid #cdd8d4;
    border-radius: 999px;
    background: #fff;
    color: #243b34;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.ent-record-add-photo-page .record-observer-choice.is-active {
    border-color: #74ac00;
    background: #74ac00;
    color: #fff;
}
.ent-record-add-photo-page .record-observer-choice:focus-visible {
    outline: 2px solid #315746;
    outline-offset: 2px;
}
.ent-record-add-photo-page .record-observer-choice:disabled {
    cursor: default;
}
@media (max-width: 760px) {
    .ent-record-add-photo-page .station-row-below-map .station-inline-fields {
        grid-template-columns: 1fr;
    }
    .ent-record-add-photo-page .locality-input-row {
        flex-direction: column;
    }
    .ent-record-add-photo-page .locality-input-row .btn {
        width: 100%;
    }
    .ent-record-add-photo-page .station-row-below-map #stationNewPanel {
        grid-column: auto;
    }
    .ent-record-add-photo-page .taxonomy-row,
    .ent-record-add-photo-page .details-row { grid-template-columns: 1fr; }
    .ent-record-add-photo-page .record-observer-switch {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .ent-record-add-photo-page .record-observer-choice {
        min-height: 46px;
        padding: 8px 10px;
        text-align: center;
    }
}
/* ENTOMONE stanowiska one-line toolbar (2026-07-05) */
.ent-stanowiska-page .sites-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.ent-stanowiska-page .sites-toolbar a,
.ent-stanowiska-page .sites-toolbar .sites-delete-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    text-decoration: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    width: auto !important;
    white-space: nowrap;
}
.ent-stanowiska-page .sites-toolbar .btn-map-all { background: #00a884; }
.ent-stanowiska-page .sites-toolbar .btn-map-all:hover { background: #00886b; }
.ent-stanowiska-page .sites-toolbar .btn-gallery-sites { background: #7b5ce1; }
.ent-stanowiska-page .sites-toolbar .btn-gallery-sites:hover { background: #6247bb; }
.ent-stanowiska-page .sites-toolbar .sites-card-count {
    margin-left: auto;
    white-space: nowrap;
}
@media (max-width: 640px) {
    .ent-stanowiska-page .sites-toolbar {
        gap: 8px;
    }
    .ent-stanowiska-page .sites-toolbar a,
    .ent-stanowiska-page .sites-toolbar .sites-delete-toggle {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 13px;
        padding: 8px 10px;
    }
    .ent-stanowiska-page .sites-toolbar .sites-card-count {
        margin-left: 0;
    }
}
/* ENTOMONE site_view delete site action (2026-07-05) */
.ent-site-view-page .site-view-actions {
    align-items: center;
}
.ent-site-view-page .site-delete-form {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 0 auto;
}
.ent-site-view-page .site-delete-records-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 2px;
    color: #7f1d1d;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.ent-site-view-page .site-delete-records-option input {
    margin: 0;
}
.ent-site-view-page .site-view-action.btn-delete-site {
    border: 0;
    background: #a94442;
    cursor: pointer;
    font-family: inherit;
}
.ent-site-view-page .site-view-action.btn-delete-site:hover {
    background: #7f1d1d;
}
.ent-site-view-page .site-view-action.btn-edit-site {
    background: #2980b9;
}
.ent-site-view-page .site-view-action.btn-edit-site:hover {
    background: #1f6694;
}
@media (max-width: 760px) {
    .ent-site-view-page .site-delete-form {
        width: 100%;
        margin-left: 0;
    }
}


.ent-stanowiska-page .sites-toolbar .btn-add-site { background: #27ae60; }
.ent-stanowiska-page .sites-toolbar .btn-add-site:hover { background: #1f8d4d; }
.ent-site-add-page .container { max-width: 1200px; margin: 92px auto 0; }
.ent-site-add-page .site-add-header { background: linear-gradient(135deg, #174c3c 0%, #2f8f65 100%); color: #fff; border-radius: 16px; padding: 28px 32px; margin: 0 0 18px; display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.ent-site-add-page .site-add-kicker { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; opacity: .82; font-weight: 800; }
.ent-site-add-page .site-add-header h1 { margin: 4px 0 6px; font-size: 32px; }
.ent-site-add-page .site-add-subtitle { opacity: .9; font-size: 15px; }
.ent-site-add-page .site-add-back { color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.15); padding: 10px 14px; border-radius: 8px; font-weight: 800; }
.ent-site-add-page .site-add-back:hover { background: rgba(255,255,255,.24); }
.ent-site-add-page .site-add-page-form { background: #fffaf3; border: 1px solid #ead8bd; border-radius: 12px; padding: 16px; }
.ent-site-add-page .site-add-map-title { font-weight: 800; color: #2c3e50; margin: 0 0 10px; }
.ent-site-add-page .site-add-geo-map { height: 430px; border-radius: 10px; overflow: hidden; border: 1px solid #c7d6e5; margin: 0 0 14px; }
.ent-site-add-page .site-add-page-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.ent-site-add-page .site-add-page-col { flex: 1 1 145px; min-width: 130px; }
.ent-site-add-page .site-add-page-col.code { flex: 0 1 150px; }
.ent-site-add-page .site-add-page-col.wide { flex: 2 1 280px; }
.ent-site-add-page .site-add-page-col.range { flex: 1 1 190px; }
.ent-site-add-page .site-add-page-col label { display: block; font-size: 12px; font-weight: 800; color: #607080; margin-bottom: 4px; }
.ent-site-add-page .site-add-page-col input { width: 100%; border: 1px solid #c7d6e5; border-radius: 7px; padding: 10px 11px; font-size: 14px; }
.ent-site-add-page .site-add-hint { color: #607080; font-size: 12px; margin: 10px 0 16px; }
.ent-site-add-page .site-add-actions { display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.ent-site-add-page .site-add-main-submit { border: 0; background: #27ae60; color: #fff; padding: 12px 18px; border-radius: 8px; cursor: pointer; font-weight: 800; font-size: 15px; }
.ent-site-add-page .site-add-main-submit:hover { background: #1f8d4d; }
.ent-site-add-page .site-add-media-submit { border: 0; background: #6c5ce7; color: #fff; padding: 12px 18px; border-radius: 8px; cursor: pointer; font-weight: 800; font-size: 15px; }
.ent-site-add-page .site-add-media-submit:hover { background: #5848c2; }
.ent-site-add-page .site-add-cancel { color: #34495e; text-decoration: none; font-weight: 800; padding: 10px 12px; }
.ent-site-add-page .site-add-cancel:hover { text-decoration: underline; }
@media (max-width: 760px) {
    .ent-site-add-page .site-add-header { padding: 20px; }
    .ent-site-add-page .site-add-header h1 { font-size: 26px; }
    .ent-site-add-page .site-add-geo-map { height: 330px; }
    .ent-site-add-page .site-add-page-col,
    .ent-site-add-page .site-add-page-col.code,
    .ent-site-add-page .site-add-page-col.wide,
    .ent-site-add-page .site-add-page-col.range { flex: 1 1 100%; }
}

.ent-site-add-page .site-name-input-row,
.ent-site-view-page .site-name-input-row { display: flex; gap: 10px; align-items: stretch; }
.ent-site-add-page .site-name-input-row input,
.ent-site-view-page .site-name-input-row input { flex: 1 1 auto; }
.ent-site-add-page .site-name-reverse-btn,
.ent-site-view-page .site-name-reverse-btn { flex: 0 0 auto; border: 0; background: #2c3e50; color: #fff; padding: 9px 13px; border-radius: 7px; cursor: pointer; font-weight: 800; font-size: 13px; }
.ent-site-add-page .site-name-reverse-btn:hover,
.ent-site-view-page .site-name-reverse-btn:hover { background: #1d2b38; }
.ent-site-add-page .site-name-reverse-btn:disabled,
.ent-site-view-page .site-name-reverse-btn:disabled { opacity: .62; cursor: wait; }
.ent-site-add-page .site-name-help,
.ent-site-view-page .site-name-help { margin-top: 6px; color: #607080; font-size: 12px; line-height: 1.35; }
.ent-site-add-page .site-name-status,
.ent-site-view-page .site-name-status { margin-top: 4px; color: #607080; font-size: 12px; min-height: 16px; }
.ent-site-view-page .site-map-edit-toolbar {
    display: grid;
    grid-template-columns: max-content minmax(220px, 380px) max-content;
    gap: 8px;
    align-items: center;
    margin: 0 0 8px 0;
}
.ent-site-view-page .site-map-inline-label {
    font-size: 13px;
    font-weight: 800;
    color: #34495e;
    white-space: nowrap;
}
.ent-site-view-page .site-map-edit-toolbar input {
    min-width: 0;
    height: 40px;
    border: 1px solid #c7d6e5;
    border-radius: 7px;
    padding: 8px 10px;
    font-size: 14px;
}
.ent-site-view-page .site-map-inline-btn {
    min-height: 40px;
    border: 0;
    background: #0984e3;
    color: #fff;
    padding: 8px 13px;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
}
.ent-site-view-page .site-map-inline-btn:hover { background: #086fbf; }
.ent-site-view-page .site-map-inline-btn:disabled { opacity: .62; cursor: wait; }
.ent-site-view-page .site-map-edit-notes {
    margin: 0 0 14px 0;
}
.ent-site-view-page .site-place-search-status { color: #607080; font-size: 12px; min-height: 16px; line-height: 1.35; }
@media (max-width: 760px) {
    .ent-site-add-page .site-name-input-row,
    .ent-site-view-page .site-name-input-row { flex-direction: column; align-items: stretch; }
    .ent-site-add-page .site-name-reverse-btn,
    .ent-site-view-page .site-name-reverse-btn { width: 100%; }
    .ent-site-view-page .site-map-edit-toolbar,
    .ent-site-view-page .site-map-edit-notes { display: flex; flex-direction: column; gap: 8px; }
    .ent-site-view-page .site-map-inline-label { white-space: normal; }
    .ent-site-view-page .site-map-inline-btn { width: 100%; }
}


/* ENTOMONE global menu iNaturalist-style layout (2026-07-06) */
.ent-global-inner {
    width: min(100%, 1440px);
    gap: 12px;
}

.ent-global-search {
    position: relative;
    flex: 0 1 280px;
    min-width: 180px;
    margin: 0;
}

.ent-global-search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.ent-global-search-field {
    position: relative;
}

.ent-global-search-input {
    width: 100%;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #cfd7d2;
    border-radius: 2px;
    background: #ffffff;
    color: #17251f;
    font-size: 14px;
    line-height: 1.2;
}

.ent-global-search-input:focus {
    border-color: #6ca884;
    outline: 2px solid rgba(116, 174, 80, 0.24);
    outline-offset: 0;
}

.ent-global-header .ent-live-search-dropdown {
    z-index: 3200;
}

.ent-global-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex: 0 0 auto;
}

.ent-language-switch {
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
    position: relative;
    flex: 0 0 auto;
}

.ent-language-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    box-shadow: none;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
}

.ent-language-current {
    width: 30px;
}

.ent-language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 26000;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 150px;
    padding: 8px;
    border: 1px solid #d8e2dd;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(20, 39, 34, 0.16);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-3px);
    transition: opacity .14s ease, transform .14s ease;
    visibility: hidden;
}

.ent-language-switch:hover .ent-language-dropdown,
.ent-language-switch:focus-within .ent-language-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.ent-language-flag:hover,
.ent-language-flag:focus {
    outline: 2px solid rgba(116, 172, 0, 0.24);
    outline-offset: 2px;
}

.ent-language-flag.is-active {
    outline: none;
    background: transparent;
    box-shadow: none;
}

.ent-language-option {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 32px;
    padding: 6px 8px;
    border-radius: 5px;
    color: #25342f;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.ent-language-option:hover,
.ent-language-option:focus {
    outline: none;
    background: #eef7f2;
    color: #0f6a4f;
}

.ent-language-option.is-active {
    background: #e7f3ee;
    color: #0f6a4f;
    font-weight: 800;
}

.ent-language-option.is-planned {
    color: #7c8a85;
    cursor: default;
    opacity: .74;
}

.ent-language-option.is-planned:hover,
.ent-language-option.is-planned:focus {
    background: transparent;
    color: #7c8a85;
}

.ent-language-flag-svg {
    display: block;
    width: 24px;
    height: 16px;
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.ent-global-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: #74ac00;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.ent-global-upload:hover,
.ent-global-upload:focus,
.ent-global-upload.is-active {
    background: #5f9000;
    color: #ffffff;
    outline: none;
}

.ent-global-user .ent-menu-dropdown {
    left: auto;
    right: 0;
}

.ent-menu-group-user-mobile {
    display: none;
}

.ent-global-header .ent-global-user-trigger {
    min-height: 50px;
    padding: 0 8px;
}

@media (min-width: 769px) {
    .ent-global-inner {
        justify-content: flex-start;
    }

    .ent-global-brand {
        position: static;
        left: auto;
    }

    .ent-global-menu {
        margin-left: 8px;
        margin-right: 0;
        flex: 0 0 auto;
    }
}

@media (max-width: 980px) and (min-width: 769px) {
    .ent-global-search {
        flex-basis: 220px;
    }

    .ent-global-brand-text {
        display: none;
    }
}

@media (max-width: 768px) {
    .ent-global-inner {
        flex-wrap: wrap;
        gap: 8px;
    }

    .ent-global-menu-toggle {
        margin-left: auto;
    }

    .ent-global-search {
        order: 4;
        display: none;
        flex: 1 1 100%;
        min-width: 0;
    }

    .ent-global-header.is-menu-open .ent-global-search {
        display: none !important;
    }

    .ent-global-actions .ent-global-user {
        display: none !important;
    }

    .ent-global-menu .ent-menu-group-user-mobile {
        display: block !important;
    }

    .ent-global-menu {
        order: 5;
        top: calc(100% + 6px);
    }

    .ent-global-actions {
        order: 3;
        width: 100%;
        justify-content: stretch;
        margin-left: 0;
        gap: 6px;
    }

    .ent-language-switch {
        order: 2;
        margin-left: 0;
    }

    .ent-language-flag {
        width: 30px;
        min-height: 22px;
    }

    .ent-language-current {
        width: 30px;
    }

    .ent-language-dropdown {
        min-width: 148px;
    }

    .ent-global-upload,
    .ent-global-actions > .ent-menu-login {
        flex: 1 1 auto;
        min-height: 38px;
    }

    .ent-global-user {
        flex: 1 1 auto;
    }

    .ent-global-header .ent-global-user-trigger {
        width: 100%;
        min-height: 38px;
        justify-content: center;
        border-radius: 7px;
        background: #f8fbf9;
    }
}


/* ENTOMONE global menu subtrigger visibility (2026-07-06) */
.ent-global-header .ent-menu-subtrigger,
.ent-global-header .ent-menu-subtrigger:visited {
    color: #20342d !important;
    background: transparent !important;
}

.ent-global-header .ent-menu-subtrigger:hover,
.ent-global-header .ent-menu-subtrigger:focus,
.ent-global-header .ent-menu-subtrigger.is-active {
    color: #0f5f46 !important;
    background: #edf5f1 !important;
}

.ent-global-header .ent-menu-separator {
    height: 1px;
    margin: 6px 8px;
    background: #d9e1dd;
}

.ent-global-header .ent-menu-dataset-block {
    padding: 6px 0;
}

.ent-global-header .ent-menu-dataset-title {
    padding: 4px 12px 6px;
    color: #60756c;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ent-global-header .ent-menu-dataset-link.is-active {
    background: #e7f4ee;
    color: #176f54;
    font-weight: 800;
}

.ent-global-header .ent-menu-group-dataset .ent-menu-dropdown {
    max-height: min(420px, calc(100vh - 90px));
    overflow-y: auto;
}

.ent-global-header .ent-menu-dropdown .ent-menu-dataset-block {
    max-height: min(420px, calc(100vh - 140px));
    overflow-y: auto;
}

.ent-global-header .ent-menu-subdropdown-dataset {
    max-height: min(420px, calc(100vh - 120px));
    overflow-y: auto;
}

@media (min-width: 769px) {
    .ent-global-header .ent-global-menu-toggle {
        display: none !important;
    }

    .ent-global-header .ent-global-menu {
        display: flex !important;
    }

    .ent-global-header .ent-menu-group-user-mobile {
        display: none !important;
    }
}


/* ENTOMONE global menu visible neutral background (2026-07-06) */
.ent-global-header,
.ent-global-inner {
    background: #eeeeee !important;
}

/* ENTOMONE recent observations gallery (2026-07-06) */
.ent-recent-gallery-page .recent-gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.ent-recent-gallery-page .recent-gallery-status {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ent-recent-gallery-page .recent-gallery-origin {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-left: 8px;
    padding-left: 14px;
    border-left: 1px solid #d7e0dc;
}

.ent-recent-gallery-page .recent-gallery-status a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid #cdd8d4;
    border-radius: 999px;
    background: #ffffff;
    color: #243b34;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.ent-recent-gallery-page .recent-gallery-status a.is-active,
.ent-recent-gallery-page .recent-gallery-status a:hover {
    border-color: #74ac00;
    background: #74ac00;
    color: #ffffff;
}

.ent-recent-gallery-page .recent-gallery-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.ent-recent-gallery-page .recent-gallery-sort label {
    color: #607080;
    font-size: 13px;
    font-weight: 700;
}

.ent-recent-gallery-page .recent-gallery-sort select {
    min-height: 36px;
    max-width: 260px;
    border: 1px solid #cdd8d4;
    border-radius: 7px;
    background: #ffffff;
    color: #17251f;
    padding: 6px 10px;
}

.ent-recent-gallery-page .recent-gallery-apply {
    min-height: 36px;
    padding: 7px 14px;
    border: 1px solid #5b9000;
    border-radius: 7px;
    background: #74ac00;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.ent-recent-gallery-page .recent-gallery-apply:hover,
.ent-recent-gallery-page .recent-gallery-apply:focus-visible {
    background: #5b9000;
    outline: none;
}

.ent-recent-gallery-page .recent-gallery-mobile-filter-controls {
    display: none;
}

.ent-recent-gallery-page .recent-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 4px;
}

.ent-recent-gallery-page .wrap {
    --page-max: none;
    width: 100%;
}

.ent-recent-gallery-page .recent-life-layout {
    --recent-taxonomy-width: clamp(340px, 28vw, 520px);
    display: flex;
    gap: 8px;
    align-items: start;
}

.ent-recent-gallery-page .recent-taxonomy-panel {
    flex: 0 0 var(--recent-taxonomy-width);
    width: var(--recent-taxonomy-width);
    min-width: 0;
    position: sticky;
    top: 78px;
    max-height: calc(100svh - 96px);
    overflow: auto;
    padding: 12px 14px 14px;
    border: 1px solid #dce3e8;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.ent-recent-gallery-page .recent-taxonomy-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    margin-bottom: 8px;
}

.ent-recent-gallery-page .recent-taxonomy-life,
.ent-recent-gallery-page .recent-taxonomy-clear {
    color: #1f332c;
    font-weight: 800;
    text-decoration: none;
}

.ent-recent-gallery-page .recent-taxonomy-clear {
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef4f1;
    font-size: 12px;
}

.ent-recent-gallery-page .recent-taxonomy-tree,
.ent-recent-gallery-page .recent-taxonomy-tree ul {
    min-width: max-content;
    margin: 0;
    padding-left: 16px;
    list-style: none;
}

.ent-recent-gallery-page .recent-taxonomy-tree {
    padding-left: 0;
}

.ent-recent-gallery-page .recent-taxonomy-node {
    position: relative;
    margin: 2px 0;
    color: #2d3a35;
    font-size: 13px;
    line-height: 1.35;
    white-space: nowrap;
}

.ent-recent-gallery-page .recent-taxonomy-node::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 0.75em;
    width: 8px;
    border-top: 1px solid #d2d9d6;
}

.ent-recent-gallery-page .recent-taxonomy-tree > .recent-taxonomy-node::before {
    display: none;
}

.ent-recent-gallery-page .recent-taxonomy-node details {
    margin: 0;
}

.ent-recent-gallery-page .recent-taxonomy-node summary {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    min-height: 18px;
    cursor: pointer;
}

.ent-recent-gallery-page .recent-taxonomy-node summary::marker {
    color: #9aa6a1;
}

.ent-recent-gallery-page .recent-taxonomy-label {
    color: #1f332c;
}

.ent-recent-gallery-page .recent-taxonomy-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    min-height: 16px;
    margin-left: 5px;
    padding: 0 4px;
    border-radius: 999px;
    background: #eef4f1;
    color: #7d8c84;
    font-size: 11px;
    line-height: 1;
    font-weight: 400;
}

.ent-recent-gallery-page .recent-taxonomy-life .recent-taxonomy-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    min-height: 16px;
    margin-left: 5px;
    padding: 0 4px;
    border-radius: 999px;
    background: #eef4f1;
    color: #7d8c84;
    font-size: 11px;
    line-height: 1;
    font-weight: 400;
}

.ent-recent-gallery-page .recent-taxonomy-observe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    margin-left: 2px;
    border-radius: 50%;
    color: #9aa4a0;
    filter: grayscale(1);
    font-size: 11px;
    line-height: 1;
    opacity: 0.58;
    text-decoration: none;
    vertical-align: text-bottom;
}

.ent-recent-gallery-page .recent-taxonomy-observe:hover,
.ent-recent-gallery-page .recent-taxonomy-observe:focus-visible {
    background: #e8f3eb;
    color: #607068;
    opacity: 0.9;
    outline: none;
}

.ent-recent-gallery-page .recent-taxonomy-node.is-current > .recent-taxonomy-label,
.ent-recent-gallery-page .recent-taxonomy-node.is-current > details > summary .recent-taxonomy-label,
.ent-recent-gallery-page .recent-taxonomy-life.is-current {
    color: #0b6b43;
    background: #e8f3eb;
    border-radius: 5px;
    padding: 1px 4px;
}

.ent-recent-gallery-page .recent-taxonomy-empty {
    min-width: 260px;
    color: #607080;
    font-size: 13px;
}

.ent-recent-gallery-page .recent-gallery-results {
    flex: 1 1 auto;
    min-width: 0;
}

.ent-recent-gallery-page .recent-taxonomy-resizer {
    flex: 0 0 10px;
    position: sticky;
    top: 78px;
    width: 10px;
    height: calc(100svh - 96px);
    cursor: col-resize;
    border-radius: 999px;
}

.ent-recent-gallery-page .recent-taxonomy-resizer::before {
    content: "";
    display: block;
    width: 2px;
    height: 100%;
    margin: 0 auto;
    border-radius: 999px;
    background: #d7dfdc;
}

.ent-recent-gallery-page .recent-taxonomy-resizer:hover::before,
.ent-recent-gallery-page .recent-taxonomy-resizer:focus-visible::before,
body.recent-taxonomy-resizing.ent-recent-gallery-page .recent-taxonomy-resizer::before {
    width: 4px;
    background: #74ac00;
}

body.recent-taxonomy-resizing {
    cursor: col-resize;
    user-select: none;
}

.ent-recent-gallery-page .recent-observation-card {
    position: relative;
    overflow: hidden;
    min-height: 250px;
    background: #10251f;
}

.ent-recent-gallery-page .recent-observation-thumb {
    position: relative;
    display: block;
    height: 100%;
    min-height: 250px;
    color: #ffffff;
    text-decoration: none;
}

.ent-recent-gallery-page .recent-observation-thumb img {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #dfe9d6;
}

.ent-recent-gallery-page .recent-observation-record,
.ent-recent-gallery-page .recent-observation-inat {
    position: absolute;
    z-index: 2;
    top: 8px;
    min-height: 28px;
    padding: 5px 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.ent-recent-gallery-page .recent-observation-record {
    left: 8px;
    background: rgba(16, 37, 31, 0.78);
}

.ent-recent-gallery-page .recent-observation-inat {
    right: 8px;
    background: #74ac00;
}

.ent-recent-gallery-page .recent-observation-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 32px 10px 9px;
    background: linear-gradient(180deg, rgba(16, 37, 31, 0), rgba(16, 37, 31, 0.92) 42%, rgba(16, 37, 31, 0.96));
    color: #ffffff;
}

.ent-recent-gallery-page .recent-observation-species {
    margin-bottom: 4px;
    font-size: 16px;
    font-style: italic;
    font-weight: 800;
    line-height: 1.2;
}

.ent-recent-gallery-page .recent-observation-species a {
    color: #ffffff;
    text-decoration: none;
}

.ent-recent-gallery-page .recent-observation-species a:hover {
    text-decoration: underline;
}

.ent-recent-gallery-page .recent-observation-line {
    color: rgba(255, 255, 255, 0.86);
    font-size: 12px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.ent-recent-gallery-page .recent-observation-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 7px;
    color: #bde37a;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 640px) {
    .ent-recent-gallery-page .recent-gallery-controls,
    .ent-recent-gallery-page .recent-gallery-sort {
        align-items: stretch;
        flex-direction: column;
    }

    .ent-recent-gallery-page .recent-gallery-status a,
    .ent-recent-gallery-page .recent-gallery-sort select {
        width: 100%;
    }

    .ent-recent-gallery-page .recent-gallery-mobile-filter-controls {
        display: grid;
        width: 100%;
        gap: 7px;
    }

    .ent-recent-gallery-page .recent-gallery-mobile-filter-label {
        color: #607080;
        font-size: 13px;
        font-weight: 800;
    }

    .ent-recent-gallery-page .recent-gallery-mobile-completion-controls,
    .ent-recent-gallery-page .recent-gallery-mobile-observer-controls {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .ent-recent-gallery-page .recent-gallery-mobile-completion-controls {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ent-recent-gallery-page .recent-gallery-mobile-filter-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 36px;
        padding: 7px 12px;
        border: 1px solid #cdd8d4;
        border-radius: 999px;
        background: #fff;
        color: #294438;
        font: inherit;
        font-size: 13px;
        font-weight: 750;
        cursor: pointer;
    }

    .ent-recent-gallery-page .recent-gallery-mobile-filter-button.is-active {
        border-color: #74ac00;
        background: #74ac00;
        color: #fff;
    }

    .ent-recent-gallery-page .recent-gallery-sort label[for="recent-gallery-completion"],
    .ent-recent-gallery-page .recent-gallery-sort #recent-gallery-completion,
    .ent-recent-gallery-page .recent-gallery-sort label[for="recent-gallery-observer"],
    .ent-recent-gallery-page .recent-gallery-sort #recent-gallery-observer {
        display: none;
    }

    .ent-recent-gallery-page .recent-gallery-grid {
        grid-template-columns: 1fr;
    }

    .ent-recent-gallery-page .recent-life-layout {
        display: block;
    }

    .ent-recent-gallery-page .recent-taxonomy-panel {
        position: static;
        max-height: 48svh;
    }

    .ent-recent-gallery-page .recent-taxonomy-resizer {
        display: none;
    }
}

/* ENTOMONE users_admin table containment (2026-07-07) */
.ent-users-admin-page .layout > .card {
    min-width: 0;
}

.ent-users-admin-page .layout > .card:first-child {
    overflow: hidden;
}

.ent-users-admin-page .layout > .card:first-child table {
    table-layout: fixed;
}

.ent-users-admin-page .layout > .card:first-child th,
.ent-users-admin-page .layout > .card:first-child td {
    padding: 10px 7px;
    overflow-wrap: anywhere;
    word-break: normal;
}

.ent-users-admin-page .layout > .card:first-child th:nth-child(1),
.ent-users-admin-page .layout > .card:first-child td:nth-child(1) {
    width: 17%;
}

.ent-users-admin-page .layout > .card:first-child th:nth-child(2),
.ent-users-admin-page .layout > .card:first-child td:nth-child(2),
.ent-users-admin-page .layout > .card:first-child th:nth-child(3),
.ent-users-admin-page .layout > .card:first-child td:nth-child(3) {
    width: 14%;
}

.ent-users-admin-page .layout > .card:first-child th:nth-child(4),
.ent-users-admin-page .layout > .card:first-child td:nth-child(4) {
    width: 15%;
}

.ent-users-admin-page .layout > .card:first-child th:nth-child(5),
.ent-users-admin-page .layout > .card:first-child td:nth-child(5) {
    width: 14%;
}

.ent-users-admin-page .layout > .card:first-child th:nth-child(6),
.ent-users-admin-page .layout > .card:first-child td:nth-child(6),
.ent-users-admin-page .layout > .card:first-child th:nth-child(7),
.ent-users-admin-page .layout > .card:first-child td:nth-child(7) {
    width: 8%;
}

.ent-users-admin-page .layout > .card:first-child th:nth-child(8),
.ent-users-admin-page .layout > .card:first-child td:nth-child(8) {
    width: 10%;
}

@media (max-width: 1100px) {
    .ent-users-admin-page .layout > .card:first-child {
        overflow-x: auto;
    }
}
/* ENTOMONE users_admin table column readability (2026-07-07) */
.ent-users-admin-page .layout > .card:first-child th {
    overflow-wrap: normal;
    word-break: normal;
}

.ent-users-admin-page .layout > .card:first-child th:nth-child(1),
.ent-users-admin-page .layout > .card:first-child td:nth-child(1) {
    width: 16%;
}

.ent-users-admin-page .layout > .card:first-child th:nth-child(3),
.ent-users-admin-page .layout > .card:first-child td:nth-child(3),
.ent-users-admin-page .layout > .card:first-child th:nth-child(4),
.ent-users-admin-page .layout > .card:first-child td:nth-child(4) {
    width: 13%;
}

.ent-users-admin-page .layout > .card:first-child th:nth-child(6),
.ent-users-admin-page .layout > .card:first-child td:nth-child(6) {
    width: 9%;
}

.ent-users-admin-page .layout > .card:first-child th:nth-child(8),
.ent-users-admin-page .layout > .card:first-child td:nth-child(8) {
    width: 13%;
}
.ent-users-admin-page .layout > .card:first-child .pill {
    padding-inline: 8px;
    font-size: 11px;
    white-space: nowrap;
}
/* ENTOMONE my_datasets default GPS map (2026-07-07) */
.ent-my-datasets-page .dataset-default-map-section {
    margin: 16px 0;
    padding: 14px;
    border: 1px solid #d8e7e1;
    border-radius: 8px;
    background: #f8fbf9;
}

.ent-my-datasets-page .dataset-default-map {
    height: 360px;
    margin: 10px 0 12px;
    border: 1px solid #c7d6e5;
    border-radius: 8px;
    overflow: hidden;
    background: #edf3f0;
}

.ent-my-datasets-page .dataset-default-map-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 760px) {
    .ent-my-datasets-page .dataset-default-map {
        height: 300px;
    }

    .ent-my-datasets-page .dataset-default-map-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   Zwarty naglowek records.php - Faza 1 mobile (2026-07-08)
   - Dodaj (skrot do pelnego formularza)
   - Ikona aparatu z + (szybki tryb terenowy: <label> dla file capture)
   Uklad kolumnowy po prawej stronie tytulu; user info w osobnym wierszu ponizej.
   ================================================================ */
.ent-header-quick-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 12px 0 8px;
}
.ent-header-quick-actions .ent-header-quick-form {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
}
.ent-header-quick-btn {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    min-height: 48px;
    border-radius: 999px;
    background: #74ac00;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: background 0.12s;
}
.ent-header-quick-btn:hover,
.ent-header-quick-btn:focus {
    background: #5f9000;
    color: #ffffff !important;
    outline: none;
    text-decoration: none;
}
/* Solo circle-style camera button (bez tekstu "Dodaj" obok).
   Zastepuje pill shape z .ent-header-quick-btn. */
.ent-header-quick-btn-camera {
    flex: 0 0 72px !important;
    box-sizing: border-box !important;
    display: grid !important;
    place-items: center !important;
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    min-height: 72px !important;
    max-width: 72px !important;
    max-height: 72px !important;
    aspect-ratio: 1 / 1;
    padding: 0 !important;
    gap: 0 !important;
    border-radius: 50% !important;
    border: 4px solid #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}
.ent-header-quick-btn-camera > svg,
.ent-header-camera-svg {
    width: 40px !important;
    height: 40px !important;
    display: block !important;
    justify-self: center !important;
    align-self: center !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    /* Korekta optyczna: masa rysunku jest nieco nizej niz srodek viewBox
       (cienki daszek nad obiektywem vs. gruby korpus), wiec pchamy SVG
       lekko do gory zeby aparat wygladal na wyśrodkowany. */
    transform: translateY(-2px);
}
/* Pomaranczowy plusik wycofany na prosbe USER - ikona aparatu wystarcza. */
.ent-header-camera-plus {
    display: none !important;
}
.ent-header-quick-form {
    flex: 1 1 0;
    margin: 0;
    padding: 0;
    display: flex;
}
.ent-header-quick-form > .ent-header-quick-btn {
    width: 100%;
}
.ent-records-user-row {
    color: #2d3748;
    font-size: 15px;
    padding: 4px 0 2px;
}

/* Poprzedni floating FAB zostal przeniesiony do naglowka - stary element nie
   jest juz renderowany, ale defensywnie ukrywamy klase gdyby gdzies wrocila. */
.ent-mobile-fab-add,
.ent-mobile-fab-form {
    display: none !important;
}

@media (max-width: 900px) {
    /* Naglowek: tytul zajmuje pelna szerokosc i jest wycentrowany.
       Uzytkownik, Baza danych i buttony sa w kolejnych osobnych wierszach. */
    .ent-records-header-compact {
        display: block;
        text-align: center;
        margin-bottom: 4px;
    }
    .ent-records-header-compact .brand-link {
        display: inline-flex;
        justify-content: center;
    }
    .ent-records-header-compact .brand-title {
        font-size: 20px !important;
        line-height: 1.2 !important;
    }
    .ent-records-header-compact .brand-subtitle {
        display: none;
    }
    /* Zmniejszony gorny odstep - poprzednio 110 px bylo pod stary uklad
       naglowka globalnego, ktory na mobile wciaz ma 2 rzedy, ale content
       page nie musi juz miec az 110 px oddechu. */
    .ent-records-page {
        padding-top: 92px !important;
    }
    /* Pomaranczowe pill'e "Stanowiska" / "Mapa" - dwa na wiersz na mobile */
    .ent-records-page .nav-section .nav-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .ent-records-page .nav-section .nav-row > .nav-link {
        width: 100%;
        text-align: center;
    }
}

/* ================================================================
   record_add_field.php - mobilny szybki tryb terenowy (Faza 1 MVP)
   ================================================================ */
.ent-record-add-field-page {
    background: #f5f7f6;
}

.ent-field-quick-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px 14px 40px;
    min-height: calc(100dvh - 72px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.ent-field-quick-header h1 {
    font-size: 1.5rem;
    margin: 0 0 4px;
}

.ent-field-quick-dataset {
    color: #4a5568;
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.ent-field-quick-dataset-footer {
    color: #718096;
    font-size: 0.82rem;
    margin: 34px 0 4px;
    text-align: center;
}

.ent-field-quick-alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.95rem;
    line-height: 1.4;
}
.ent-field-quick-alert-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #f56565;
}
.ent-field-quick-alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #38a169;
}

.ent-field-quick-step-0 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 52px 0 56px;
}

.ent-field-quick-camera-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 176px;
    height: 176px;
    border: 8px solid #fff;
    border-radius: 50%;
    background: #2f855a;
    color: #fff;
    box-shadow: 0 12px 28px rgba(31, 73, 52, 0.25);
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s, transform 0.15s;
}

.ent-field-quick-camera-button:hover,
.ent-field-quick-camera-button:focus-visible {
    background: #276749;
    color: #fff;
    transform: scale(1.03);
}

.ent-field-quick-camera-button svg {
    width: 96px;
    height: 96px;
}

.ent-field-quick-step-1 {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
}

.ent-field-quick-thumb-wrap {
    max-height: 40vh;
    overflow: hidden;
    border-radius: 10px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ent-field-quick-thumb {
    display: block;
    width: 100%;
    height: auto;
    max-height: 40vh;
    object-fit: contain;
}

.ent-field-quick-status {
    padding: 10px 12px;
    border-radius: 8px;
    background: #edf2f7;
    color: #2d3748;
    font-size: 0.95rem;
    line-height: 1.4;
    min-height: 2.2em;
}
.ent-field-quick-status.is-info    { background: #e6f0f8; color: #2b6cb0; }
.ent-field-quick-status.is-ok      { background: #c6f6d5; color: #22543d; }
.ent-field-quick-status.is-warn    { background: #fefcbf; color: #744210; }
.ent-field-quick-status.is-error   { background: #fed7d7; color: #742a2a; }

.ent-field-quick-gps-actions {
    display: flex;
    justify-content: stretch;
}

.ent-field-quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.ent-field-quick-actions-vertical {
    flex-direction: column;
    align-items: stretch;
}

.ent-field-quick-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    min-height: 52px;
    box-sizing: border-box;
    transition: background 0.15s, color 0.15s;
}
.ent-field-quick-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.ent-field-quick-btn-big {
    min-height: 64px;
    font-size: 1.15rem;
}
.ent-field-quick-btn-primary {
    background: #2f855a;
    color: #fff;
}
.ent-field-quick-btn-primary:hover:not(:disabled),
.ent-field-quick-btn-primary:focus:not(:disabled) {
    background: #276749;
    color: #fff;
}
.ent-field-quick-btn-secondary {
    background: #edf2f7;
    color: #2d3748;
    border: 1px solid #cbd5e0;
}
.ent-field-quick-btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
}
.ent-field-quick-btn-link {
    background: transparent;
    color: #2b6cb0;
    padding: 10px 8px;
    min-height: 40px;
    font-weight: 500;
    text-decoration: underline;
}

.ent-field-quick-build {
    margin-top: auto;
    padding-top: 26px;
    font-size: 0.75rem;
    color: #a0aec0;
    text-align: center;
}

/* ENTOMONE resizable Leaflet maps (2026-07-08) */
.ent-resizable-map[data-ent-resizable-map] {
    resize: vertical;
    overflow: hidden !important;
    min-height: 220px;
    max-height: min(82vh, 760px);
    position: relative;
}

.ent-resizable-map[data-ent-resizable-map] .leaflet-bottom.leaflet-right {
    right: 46px;
}

@media (max-width: 768px) {
    .ent-resizable-map[data-ent-resizable-map] {
        min-height: 240px;
        max-height: calc(100dvh - 120px);
    }
}
.ent-map-resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 1200;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px 0 7px 0;
    background: rgba(31, 111, 88, 0.92);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92), 0 2px 8px rgba(17, 37, 30, 0.26);
    cursor: nwse-resize;
    touch-action: none;
}

.ent-map-resize-handle::before,
.ent-map-resize-handle::after {
    content: "";
    position: absolute;
    right: 8px;
    bottom: 8px;
    pointer-events: none;
}

.ent-map-resize-handle::before {
    width: 16px;
    height: 16px;
    border-right: 3px solid #ffffff;
    border-bottom: 3px solid #ffffff;
}

.ent-map-resize-handle::after {
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(255, 255, 255, 0.82);
    border-bottom: 2px solid rgba(255, 255, 255, 0.82);
}

.ent-map-resize-handle:hover,
.ent-map-resize-handle:focus,
.ent-map-resize-handle.is-dragging {
    background: rgba(20, 96, 73, 0.98);
    outline: 3px solid rgba(40, 137, 88, 0.28);
    outline-offset: 1px;
}

/* ENTOMONE start split and action grid (2026-07-08) */
.ent-start-page {
    min-height: 100svh;
    margin: 0;
    padding: 156px 14px 24px;
    background: #f4f7f6;
    color: #17251f;
}

.ent-start-shell {
    width: min(100%, 720px);
    margin: 0 auto;
}

.ent-start-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0 18px;
    text-align: center;
}

.ent-start-header h1 {
    margin: 0;
    color: #17251f;
    font-size: 30px;
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: 0;
}

.ent-start-header p {
    margin: 6px 0 0;
    color: #66736e;
    font-size: 14px;
    line-height: 1.3;
}

.ent-start-notice {
    margin: 0 auto 20px;
    max-width: 560px;
    border: 1px solid;
    border-radius: 8px;
    padding: 11px 13px;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.ent-start-notice-success {
    border-color: #b7dfc5;
    background: #e8f8ee;
    color: #1f6f43;
}

.ent-start-notice-warning {
    border-color: #e8cd7b;
    background: #fff8dc;
    color: #735900;
}

.ent-start-notice-gallery {
    margin-top: -10px;
}

.ent-start-saved-record-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 9px;
    padding: 7px 12px;
    border: 1px solid currentColor;
    border-radius: 8px;
    color: inherit;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none;
}

.ent-start-saved-record-link:hover,
.ent-start-saved-record-link:focus {
    background: rgba(31, 111, 67, 0.10);
    text-decoration: underline;
}

.ent-start-notice-line {
    display: block;
}

.ent-start-notice-line + .ent-start-notice-line {
    margin-top: 5px;
}

@media (max-width: 900px) {
    .ent-start-shell--field-save .ent-start-notice {
        padding: 12px 14px;
        font-size: 16px;
        line-height: 1.35;
    }

    .ent-start-shell--field-save .ent-start-saved-record-link {
        margin-bottom: 11px;
        padding: 9px 14px;
        font-size: 19px;
    }

    .ent-start-shell--field-save .ent-start-notice-line {
        font-size: 16px;
    }
}

.ent-start-download-copy {
    margin: 0 auto 20px;
    max-width: 560px;
    border: 1px solid #bed3e7;
    border-radius: 8px;
    background: #f3f8fc;
    padding: 12px;
    text-align: center;
}

.ent-start-shell--field-save .ent-start-download-copy {
    margin: 0 auto 10px;
    padding: 0;
    border: 0;
    background: transparent;
}

.ent-start-shell--field-save .ent-start-download-button {
    font-size: 18px;
}

.ent-start-download-copy p {
    margin: 0 0 10px;
    color: #34536d;
    font-size: 14px;
    line-height: 1.35;
}

.ent-start-download-button {
    display: inline-block;
    margin: 4px;
    border-radius: 7px;
    background: #236a93;
    color: #fff;
    padding: 10px 13px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.ent-start-download-copy .ent-start-download-button {
    min-height: 52px;
    min-width: min(100%, 250px);
    border: 0;
    cursor: pointer;
}

.ent-start-download-copy--compact {
    margin: 0 auto 14px;
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
}

.ent-start-download-copy .ent-start-download-button--compact {
    min-width: auto;
    min-height: 40px;
    padding: 9px 14px;
    font-size: 14px;
}

.ent-start-download-button:hover,
.ent-start-download-button:focus-visible {
    background: #174f70;
    color: #fff;
}

.ent-start-camera-form {
    display: flex;
    justify-content: center;
    margin: 42px 0 20px;
}

.ent-start-camera-button {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    padding: 0;
    appearance: none;
    border: 6px solid #ffffff;
    border-radius: 50%;
    background: #2f855a;
    box-shadow: 0 12px 26px rgba(23, 37, 31, 0.22);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.16s, background 0.16s, box-shadow 0.16s;
}

body.ent-rejestrator-page .ent-start-camera-button img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.ent-start-camera-button:hover,
.ent-start-camera-button:focus-visible {
    background: #276749;
    transform: translateY(-1px);
    outline: none;
    box-shadow: 0 14px 30px rgba(23, 37, 31, 0.26);
}

@media (max-width: 900px) {
    .ent-start-camera-form {
        margin: 52px 0 56px;
    }

    .ent-start-camera-button {
        width: 176px;
        height: 176px;
        border-width: 8px;
    }

    .ent-start-camera-button svg {
        width: 96px;
        height: 96px;
    }
}

.ent-start-actions {
    margin: 14px 0 16px;
    border: 1px solid #dfe7ee;
    border-radius: 8px;
    background: #ffffff;
    padding: 14px;
}

.ent-records-page .ent-start-actions {
    background: #f8fafc;
}

.ent-start-actions-title {
    margin-bottom: 10px;
    color: #587086;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ent-start-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.ent-start-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 6px 7px;
    border-radius: 7px;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.32;
    text-align: center;
    text-decoration: none;
    transition: filter 0.14s, transform 0.14s;
}

.ent-start-action:hover,
.ent-start-action:focus-visible {
    color: #ffffff !important;
    filter: brightness(0.93);
    outline: none;
    transform: translateY(-1px);
    text-decoration: none;
}

.ent-start-action-record { background: #2f855a; }
.ent-start-action-recent { background: #2f855a; }
.ent-start-action-species { background: #1f78d1; }
.ent-start-action-site { background: #d9822b; }
.ent-start-action-map { background: #c46a1d; }
.ent-start-action-disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.72;
}

@media (min-width: 901px) {
    .ent-records-page .container {
        width: 100%;
        max-width: none;
    }

    .ent-records-page .records-table {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .ent-start-page {
        padding-top: 128px;
    }

    .ent-start-actions {
        padding: 12px;
    }

    .ent-start-actions-grid,
    .ent-records-page .ent-start-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .ent-start-action {
        min-height: 50px;
        padding: 6px 5px;
        font-size: 16px;
    }
}

@media (max-width: 900px) {
    .ent-start-page .ent-start-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ent-start-page .ent-start-action {
        min-height: 50px;
        padding: 6px 5px;
        font-size: 16px;
        line-height: 1.32;
    }

    .ent-menu-mobile-search { display: block; }
    .ent-mobile-record-tools { display: grid; gap: 10px; margin: 0 0 14px; }
    .ent-mobile-record-search { display: flex; min-height: 52px; align-items: center; justify-content: center; border-radius: 8px; background: #fff; border: 1px solid #2f855a; color: #1f6b46; font-weight: 800; text-decoration: none; }
}

@media (max-width: 340px) {
    .ent-start-actions-grid,
    .ent-records-page .ent-start-actions-grid {
        grid-template-columns: 1fr;
    }
}
/* ENTOMONE sites gallery mobile 2-column pilot (2026-07-09) */
.ent-sites-gallery-page .grid {
    align-items: start;
}

@media (max-width: 768px) {
    .ent-sites-gallery-page .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ent-sites-gallery-page .card {
        border-radius: 8px;
    }

    .ent-sites-gallery-page .meta {
        padding: 8px;
        font-size: 11px;
        line-height: 1.28;
    }

    .ent-sites-gallery-page .site {
        font-size: 13px;
        line-height: 1.22;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 300px) {
    .ent-sites-gallery-page .grid {
        grid-template-columns: 1fr;
    }
}

/* ENTOMONE records gallery mobile 2-column pilot (2026-07-09) */
@media (max-width: 768px) {
    .ent-records-gallery-page .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ent-records-gallery-page .card {
        border-radius: 8px;
    }

    .ent-records-gallery-page .meta {
        padding: 8px;
        font-size: 11px;
        line-height: 1.28;
    }

    .ent-records-gallery-page .species {
        font-size: 13px;
        line-height: 1.22;
        overflow-wrap: anywhere;
    }

    .ent-records-gallery-page .line {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 300px) {
    .ent-records-gallery-page .grid {
        grid-template-columns: 1fr;
    }
}

/* ENTOMONE records gallery sort control (2026-07-09) */
.ent-records-gallery-page .records-gallery-stats {
    align-items: center;
}

.ent-records-gallery-page .records-gallery-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.ent-records-gallery-page .records-gallery-sort label {
    color: #607080;
    font-size: 13px;
    font-weight: 700;
}

.ent-records-gallery-page .records-gallery-sort select {
    min-height: 34px;
    max-width: 250px;
    border: 1px solid #cdd8d4;
    border-radius: 7px;
    background: #ffffff;
    color: #22342e;
    padding: 6px 9px;
    font: inherit;
}

@media (max-width: 640px) {
    .ent-records-gallery-page .records-gallery-sort {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .ent-records-gallery-page .records-gallery-sort select {
        max-width: none;
        width: 100%;
    }
}
/* ENTOMONE records gallery taxon link (2026-07-09) */
.ent-records-gallery-page .taxon-link {
    color: #1769aa;
    font-weight: 800;
    text-decoration: none;
}

.ent-records-gallery-page .taxon-link:hover,
.ent-records-gallery-page .taxon-link:focus {
    color: #0f4f82;
    text-decoration: underline;
}

.ent-records-page .bulk-export-submit:disabled {
    border-color: #cbd5e1 !important;
    background: #e5e7eb !important;
    color: #374151 !important;
    cursor: not-allowed;
}

/* ENTOMONE site gallery taxon link (2026-07-20) */
.ent-site-gallery-page .site-gallery-taxon-link {
    color: #1769aa;
    font-weight: 800;
    text-decoration: none;
}

.ent-site-gallery-page .site-gallery-taxon-link:hover,
.ent-site-gallery-page .site-gallery-taxon-link:focus {
    color: #0f4f82;
    text-decoration: underline;
}
/* ENTOMONE records gallery mobile header spacing (2026-07-09) */
@media (max-width: 640px) {
    .ent-records-gallery-page .top {
        margin-top: 28px;
    }
}
/* ENTOMONE recent observations mobile gallery-only layout (2026-07-09) */
@media (max-width: 640px) {
    .ent-recent-gallery-page .recent-taxonomy-panel,
    .ent-recent-gallery-page .recent-taxonomy-resizer {
        display: none;
    }

    .ent-recent-gallery-page .recent-life-layout {
        display: block;
    }

    .ent-recent-gallery-page .recent-gallery-results {
        width: 100%;
    }

    .ent-recent-gallery-page .recent-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .ent-recent-gallery-page .recent-observation-card {
        min-height: 220px;
        border-radius: 8px;
    }

    .ent-recent-gallery-page .recent-observation-thumb,
    .ent-recent-gallery-page .recent-observation-thumb img {
        min-height: 220px;
        height: 220px;
    }

    .ent-recent-gallery-page .recent-observation-meta {
        padding: 34px 8px 8px;
    }

    .ent-recent-gallery-page .recent-observation-species {
        font-size: 13px;
        line-height: 1.18;
    }

    .ent-recent-gallery-page .recent-observation-line {
        font-size: 11px;
        line-height: 1.22;
    }
}

@media (max-width: 300px) {
    .ent-recent-gallery-page .recent-gallery-grid {
        grid-template-columns: 1fr;
    }
}
/* ENTOMONE recent observations mobile status buttons row (2026-07-09) */
@media (max-width: 640px) {
    .ent-recent-gallery-page .recent-gallery-status {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .ent-recent-gallery-page .recent-gallery-status a {
        width: auto;
        min-width: 0;
        padding-left: 8px;
        padding-right: 8px;
        white-space: nowrap;
    }

    .ent-recent-gallery-page .recent-gallery-origin {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 340px) {
    .ent-recent-gallery-page .recent-gallery-status {
        grid-template-columns: 1fr;
    }
}
/* ENTOMONE species view mobile compact actions and stats (2026-07-09) */
@media (max-width: 768px) {
    .ent-species-view-page .media-buttons {
        gap: 8px;
        margin-bottom: 14px;
    }

    .ent-species-view-page .media-buttons a {
        min-height: 42px;
        padding: 9px 12px;
    }

    .ent-species-view-page .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        margin-bottom: 18px;
    }

    .ent-species-view-page .stat-card {
        padding: 9px 5px;
        border-left-width: 3px;
        min-width: 0;
    }

    .ent-species-view-page .stat-card .label {
        font-size: 9px;
        line-height: 1.15;
        margin-bottom: 5px;
        min-height: 20px;
    }

    .ent-species-view-page .stat-card .value {
        font-size: 18px;
        line-height: 1.15;
    }

    .ent-species-view-page .stat-card .value.value-sm {
        font-size: 10px;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }
}
/* ENTOMONE species view mobile button margin reset (2026-07-09) */
@media (max-width: 768px) {
    .ent-species-view-page .media-buttons a {
        margin: 0;
    }
}
/* ENTOMONE species view mobile header spacing (2026-07-09) */
@media (max-width: 768px) {
    .ent-species-view-page {
        padding-top: 86px !important;
    }
}
/* ENTOMONE site_view mobile header alignment (2026-07-09) */
@media (max-width: 640px) {
    .ent-site-view-page .header {
        text-align: center;
    }

    .ent-site-view-page .header-top {
        justify-content: center;
        text-align: center;
    }

    .ent-site-view-page .header-top > div:first-child {
        width: 100%;
    }

    .ent-site-view-page .header-title-wrap {
        align-items: center;
        display: grid;
        gap: 10px 8px;
        grid-template-columns: auto 1fr;
        justify-items: center;
        width: 100%;
    }

    .ent-site-view-page .header-title-wrap h1 {
        grid-column: 2;
        grid-row: 1;
        justify-self: start;
        text-align: left;
        width: 100%;
    }

    .ent-site-view-page .site-nav-arrows {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .ent-site-view-page .site-nav-arrow {
        height: 38px;
        line-height: 1;
        padding-bottom: 2px;
        width: 38px;
    }

    .ent-site-view-page .site-visit-date-badge {
        font-size: 13px;
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: center;
        padding-left: 10px;
        padding-right: 10px;
        white-space: nowrap;
    }

    .ent-site-view-page .header-actions {
        gap: 10px;
        justify-content: center;
        width: 100%;
    }

    .ent-site-view-page .header-actions a {
        flex: 0 1 auto;
        padding-left: 12px;
        padding-right: 12px;
        text-align: center;
    }

    .ent-site-view-page .stats-panel {
        display: grid;
        gap: 12px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ent-site-view-page .stats-panel .stat-item:nth-child(3) {
        display: none;
    }
}
/* ENTOMONE site_view mobile record and media compacting (2026-07-09) */
@media (max-width: 640px) {
    .ent-site-view-page .record-row {
        align-items: start;
        column-gap: 12px;
        display: grid;
        grid-template-areas:
            "id date"
            "species species"
            "meta meta";
        grid-template-columns: auto 1fr;
        padding: 8px 10px;
        row-gap: 3px;
    }

    .ent-site-view-page .record-id {
        grid-area: id;
        line-height: 1.25;
    }

    .ent-site-view-page .record-date {
        grid-area: date;
        line-height: 1.25;
        text-align: right;
    }

    .ent-site-view-page .record-species {
        grid-area: species;
        min-width: 0;
    }

    .ent-site-view-page .record-species strong {
        font-size: 14px;
        line-height: 1.15;
    }

    .ent-site-view-page .record-family {
        display: none !important;
    }

    .ent-site-view-page .record-meta {
        align-items: center;
        display: flex;
        gap: 10px;
        grid-area: meta;
        line-height: 1.2;
        text-align: left;
    }

    .ent-site-view-page .site-media-actions {
        gap: 2px;
        padding: 6px 10px 8px;
    }

    .ent-site-view-page .site-media-actions-left,
    .ent-site-view-page .site-media-actions-right {
        gap: 2px;
        min-height: 0;
    }

    .ent-site-view-page .site-media-action-form,
    .ent-site-view-page .site-media-action-current {
        line-height: 1.2;
    }

    .ent-site-view-page .site-media-action-btn {
        line-height: 1.2;
        min-height: 0;
        padding: 0;
    }
}
/* ENTOMONE global mobile add-observation button compact width (2026-07-09) */
@media (max-width: 760px) {
    .ent-global-header .ent-global-actions {
        justify-content: center !important;
        width: 100% !important;
    }

    .ent-global-header .ent-global-upload {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        padding-left: 28px !important;
        padding-right: 28px !important;
        width: auto !important;
    }
}
/* ENTOMONE site_view mobile global button clearance (2026-07-09) */
@media (max-width: 640px) {
    .ent-site-view-page {
        padding-top: 92px !important;
    }

    .ent-site-view-page .container {
        margin-top: 12px !important;
    }
}
/* ENTOMONE global mobile header bottom breathing room (2026-07-09) */
@media (max-width: 760px) {
    .ent-global-header .ent-global-inner {
        padding-bottom: 8px !important;
    }
}
/* ENTOMONE record_add_photo mobile header clearance (2026-07-09) */
@media (max-width: 768px) {
    .ent-record-add-photo-page {
        padding-top: 96px !important;
    }
}
/* ENTOMONE global mobile scroll-to-top button (2026-07-09) */
.ent-mobile-scroll-top {
    display: none;
}

@media (max-width: 768px) {
    .ent-mobile-scroll-top {
        align-items: center;
        background: #2f855a;
        border: 0;
        border-radius: 4px;
        bottom: calc(18px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 8px 18px rgba(20, 55, 38, 0.28);
        cursor: pointer;
        display: flex;
        height: 44px;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        position: fixed;
        right: 16px;
        transform: translateY(10px);
        transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease;
        width: 44px;
        z-index: 4100;
    }

    .ent-mobile-scroll-top.is-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .ent-mobile-scroll-top:hover,
    .ent-mobile-scroll-top:focus {
        background: #276749;
        outline: 2px solid rgba(47, 133, 90, 0.28);
        outline-offset: 2px;
    }

    .ent-mobile-scroll-top-line {
        background: #ffffff;
        border-radius: 999px;
        display: block;
        height: 3px;
        position: absolute;
        top: 18px;
        width: 14px;
    }

    .ent-mobile-scroll-top-line.line-left {
        left: 10px;
        transform: rotate(-45deg);
        transform-origin: right center;
    }

    .ent-mobile-scroll-top-line.line-right {
        right: 10px;
        transform: rotate(45deg);
        transform-origin: left center;
    }
}

/* ENTOMONE standalone site editor (2026-07-19) */
.ent-site-edit-page {
    padding-top: 70px !important;
}

.ent-site-edit-page .container {
    margin-top: 24px !important;
}

.ent-site-edit-page .site-edit-radius-handle {
    display: block;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 2px solid #c0392b;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

.ent-site-edit-page .site-edit-media-box {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #dfe6ec;
    border-radius: 8px;
    background: #fff;
}

.ent-site-edit-page .site-edit-media-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 14px;
}

.ent-site-edit-page .site-edit-media-top h2 {
    margin: 0 0 5px;
    color: #22313f;
    font-size: 20px;
}

.ent-site-edit-page .site-edit-media-top p {
    margin: 0;
    color: #627181;
    font-size: 13px;
}

.ent-site-edit-page .site-edit-media-add,
.ent-site-edit-page .site-edit-media-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 13px;
    border: 0;
    border-radius: 6px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.ent-site-edit-page .site-edit-media-add {
    background: #1976d2;
    color: #fff;
}

.ent-site-edit-page .site-edit-media-add:hover {
    background: #0d5fab;
}

.ent-site-edit-page .site-edit-media-delete {
    background: #c62828;
    color: #fff;
}

.ent-site-edit-page .site-edit-media-delete:hover {
    background: #a61f1f;
}

.ent-site-edit-page .site-edit-media-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}

.ent-site-edit-page .site-edit-media-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #34495e;
    font-size: 13px;
    font-weight: 700;
}

.ent-site-edit-page .site-edit-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px;
}

.ent-site-edit-page .site-edit-media-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px solid #dfe6ec;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
}

.ent-site-edit-page .site-edit-media-item:has(.site-edit-media-checkbox:checked) {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.16);
}

.ent-site-edit-page .site-edit-media-checkbox {
    align-self: flex-start;
}

.ent-site-edit-page .site-edit-media-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    border: 1px solid #d9dee3;
    background: #eef2f6;
}

.ent-site-edit-page .site-edit-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ent-site-edit-page .site-edit-media-primary {
    position: absolute;
    top: 7px;
    right: 7px;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(255, 193, 7, 0.94);
    color: #222;
    font-size: 11px;
    font-weight: 800;
    z-index: 2;
}

.ent-site-edit-page .site-edit-media-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 12px;
    color: #7a8793;
    font-size: 13px;
    text-align: center;
}

.ent-site-edit-page .site-edit-media-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: #526173;
    font-size: 12px;
    line-height: 1.35;
}

.ent-site-edit-page .site-edit-media-meta strong {
    color: #243447;
}

.ent-site-edit-page .site-edit-media-empty {
    padding: 18px;
    border: 1px dashed #cfd8e3;
    border-radius: 8px;
    color: #627181;
    background: #f8fafc;
}

@media (max-width: 768px) {
    .ent-site-edit-page {
        padding-top: 96px !important;
    }

    .ent-site-edit-page .container {
        margin-top: 24px !important;
    }

    .ent-site-edit-page .site-edit-media-top,
    .ent-site-edit-page .site-edit-media-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ent-site-edit-page .site-edit-media-add,
    .ent-site-edit-page .site-edit-media-delete {
        width: 100%;
    }

    .ent-site-edit-page .site-edit-media-grid {
        grid-template-columns: 1fr;
    }
}
/* ENTOMONE record_add_photo mobile GPS controls one row (2026-07-09) */
@media (max-width: 768px) {
    .ent-record-add-photo-page .geo-editor-controls {
        align-items: start !important;
        display: grid !important;
        gap: 10px !important;
        grid-template-columns: minmax(92px, 116px) minmax(0, 1fr) !important;
        margin-top: 10px !important;
    }

    .ent-record-add-photo-page .geo-editor-controls > div {
        min-width: 0;
    }

    .ent-record-add-photo-page .geo-editor-controls label {
        align-items: flex-end !important;
        display: flex !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
        margin-bottom: 4px !important;
        min-height: 30px !important;
    }

    .ent-record-add-photo-page .geo-editor-controls input[type="number"] {
        min-height: 44px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        width: 100% !important;
    }

    .ent-record-add-photo-page .geo-editor-controls input[type="range"] {
        height: 44px !important;
        width: 100% !important;
    }

    .ent-record-add-photo-page .details-row #ilosc {
        width: 16ch !important;
    }
}
/* ENTOMONE global mobile header clearance baseline (2026-07-09) */
@media (max-width: 768px) {
    body:has(> .ent-global-header):not(.ent-start-page):not(.ent-map-page):not(.ent-media-picker-page):not(.ent-record-add-field-page) {
        padding-top: 96px !important;
    }
}
/* ENTOMONE recent gallery mobile header clearance (2026-07-09) */
@media (max-width: 768px) {
    .ent-recent-gallery-page {
        padding-top: 96px !important;
    }
}

/* ENTOMONE field quick success link (2026-07-09) */
.ent-record-add-field-page .ent-field-quick-alert-success a {
    color: #155724;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ent-record-add-field-page .ent-field-quick-alert-success a:hover,
.ent-record-add-field-page .ent-field-quick-alert-success a:focus {
    color: #0b3d18;
}
/* ENTOMONE records.php test: subtle column separators */
@media (min-width: 769px) {
    .ent-records-page .records-table th,
    .ent-records-page .records-table td {
        border-right: 1px solid rgba(15, 23, 42, 0.08);
    }

    .ent-records-page .records-table th:last-child,
    .ent-records-page .records-table td:last-child {
        border-right: 0;
    }
}
/* ENTOMONE report_html.php table layout after removing plant column */
.ent-report-page .col-id,
.ent-report-page table td:nth-child(1) {
    width: 70px;
}

.ent-report-page .col-date,
.ent-report-page table td:nth-child(2) {
    width: 104px;
}

.ent-report-page .report-locality,
.ent-report-page table th:nth-child(4) {
    width: 18%;
}

.ent-report-page table th:nth-child(5),
.ent-report-page table td:nth-child(5) {
    width: 18%;
}

.ent-report-page .col-exx,
.ent-report-page table td:nth-child(6) {
    width: 58px;
}

.ent-report-page .col-obs,
.ent-report-page table td:nth-child(7) {
    width: 58px;
}

.ent-report-page .col-type,
.ent-report-page table td:nth-child(8) {
    width: 74px;
}

.ent-report-page .report-notes,
.ent-report-page table th:nth-child(9) {
    width: 12%;
}
/* ENTOMONE records.php action column alignment */
@media (min-width: 769px) {
    .ent-records-page .records-table td.actions-cell {
        display: table-cell;
        vertical-align: middle;
        justify-content: center;
        text-align: center;
    }
}
/* ENTOMONE report_html.php column balance: narrower place/locality, wider notes */
.ent-report-page th {
    text-align: center;
}

.ent-report-page .report-locality,
.ent-report-page table th:nth-child(4),
.ent-report-page table td:nth-child(4) {
    width: 12%;
}

.ent-report-page table th:nth-child(5),
.ent-report-page table td:nth-child(5) {
    width: 12%;
}

.ent-report-page .report-notes,
.ent-report-page table th:nth-child(9),
.ent-report-page table td:nth-child(9) {
    width: 24%;
}
/* ENTOMONE field quick hidden state guard */
.ent-record-add-field-page .ent-field-quick-step-0[hidden],
.ent-record-add-field-page .ent-field-quick-step-1[hidden] {
    display: none !important;
}
/* ENTOMONE field quick multi-photo queue */
.ent-record-add-field-page .ent-field-quick-thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 8px;
    max-height: none;
}

.ent-record-add-field-page .ent-field-quick-thumb-grid .ent-field-quick-thumb {
    aspect-ratio: 4 / 3;
    width: 100%;
    height: auto;
    object-fit: cover;
}

@media (max-width: 768px) {
    .ent-record-add-field-page .ent-field-quick-thumb-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 200px;
    }

    .ent-record-add-field-page .ent-field-quick-thumb-grid .ent-field-quick-thumb {
        aspect-ratio: auto;
        height: 200px;
    }

    .ent-record-add-field-page .ent-field-quick-thumb-grid .ent-field-quick-thumb:only-child {
        grid-column: 1 / -1;
        height: 260px;
    }
}

.ent-record-add-field-page .ent-field-quick-photo-count {
    color: #2d3748;
    font-weight: 700;
    text-align: center;
}

/* ENTOMONE field quick: primary decision before the photo preview */
.ent-record-add-field-page .ent-field-quick-decision-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 2px;
}

.ent-record-add-field-page .ent-field-quick-decision-actions #fqSaveBtn {
    width: 100%;
    min-height: 80px;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

/* ENTOMONE field quick review action icons */
.ent-record-add-field-page #fqVoiceNoteBtn,
.ent-record-add-field-page #fqAddPhotoBtn {
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
    padding: 0;
    border: none;
    align-self: center;
}

.ent-record-add-field-page #fqAddPhotoBtn {
    border-radius: 999px;
}

.ent-record-add-field-page #fqVoiceNoteBtn {
    border-radius: 8px;
}
/* ENTOMONE quick camera processing overlay */
.ent-quick-photo-processing {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.42);
}

.ent-quick-photo-processing.is-visible {
    display: flex;
}

.ent-quick-photo-processing-card {
    width: min(360px, 100%);
    padding: 20px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    color: #1f2933;
    text-align: center;
}

.ent-quick-photo-processing-title {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 8px;
}

.ent-quick-photo-processing-text {
    font-size: 14px;
    line-height: 1.4;
    color: #4a5568;
    margin-bottom: 16px;
}

.ent-quick-photo-spinner {
    width: 48px;
    height: 48px;
    margin: 4px auto 2px;
    border: 5px solid #dce8e1;
    border-top-color: #74ac00;
    border-right-color: #2f855a;
    border-radius: 50%;
    animation: entQuickPhotoSpinner 0.8s linear infinite;
}

.ent-global-upload.is-processing {
    pointer-events: none;
    opacity: 0.72;
}

/* ENTOMONE mobile header: logo, primary field action, then Menu in one row */
@media (max-width: 768px) {
    .ent-global-header .ent-global-inner {
        min-height: 58px !important;
        padding: 6px 10px !important;
        padding-bottom: 6px !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
    }

    .ent-global-header .ent-global-brand {
        order: 1;
        min-width: 38px;
    }

    .ent-global-header .ent-global-actions {
        order: 2;
        flex: 1 1 auto !important;
        width: auto !important;
        margin: 0 !important;
        justify-content: center !important;
    }

    .ent-global-header .ent-global-upload {
        min-height: 40px;
        padding: 0 20px !important;
        font-size: 14px;
    }

    .ent-global-header .ent-global-menu-toggle {
        order: 3;
        flex: 0 0 auto;
        margin-left: 0 !important;
    }

    .ent-global-header .ent-global-menu {
        order: 4;
        top: 58px !important;
        max-height: calc(100vh - 58px) !important;
    }

    .ent-record-add-field-page {
        padding-top: 72px !important;
    }
}

/* ENTOMONE start: dedicated mobile entry to the Field Recorder (2026-07-25) */
.ent-global-recorder-link {
    display: none;
}

.ent-global-dashboard-link {
    display: none;
}

@media (max-width: 768px) {
    body.ent-start-page .ent-global-header .ent-global-actions {
        gap: 8px;
    }

    body.ent-start-page .ent-global-header .ent-global-recorder-link {
        display: inline-grid;
        flex: 0 0 44px;
        place-items: center;
        width: 44px;
        height: 44px;
        border: 3px solid #ffffff;
        border-radius: 50%;
        background: #2f855a;
        box-shadow: 0 2px 8px rgba(23, 37, 31, 0.20);
        color: #ffffff;
        text-decoration: none;
        transform: translateX(-16px);
    }

    body.ent-start-page .ent-global-header .ent-global-recorder-link svg {
        width: 25px;
        height: 25px;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 1.8;
    }

    body.ent-start-page .ent-global-header .ent-global-recorder-link:focus-visible {
        outline: 3px solid #164e63;
        outline-offset: 2px;
    }

body.ent-rejestrator-page .ent-global-header .ent-global-dashboard-link {
        display: inline-grid;
        flex: 0 0 44px;
        place-items: center;
        width: 44px;
        height: 44px;
        box-sizing: border-box;
        overflow: hidden;
        border: 3px solid #ffffff;
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(23, 37, 31, 0.20);
        text-decoration: none;
        transform: translateX(-16px);
    }

    body.ent-rejestrator-page .ent-global-header .ent-global-dashboard-link img {
        display: block;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
    }

    body.ent-rejestrator-page .ent-global-header .ent-global-dashboard-link:focus-visible {
        outline: 3px solid #164e63;
        outline-offset: 2px;
    }

    body.ent-start-page:not(.ent-rejestrator-page) .ent-global-header .ent-global-upload {
        padding-right: 20px !important;
        padding-left: 20px !important;
    }

    body.ent-rejestrator-page .ent-global-header .ent-global-upload {
        padding-right: 12px !important;
        padding-left: 12px !important;
    }
}

@keyframes entQuickPhotoSpinner {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .ent-quick-photo-spinner { animation-duration: 1.6s; }
}

/* ENTOMONE record_add_photo location/site top row (2026-07-11) */
.ent-record-add-photo-page .location-row .coords-col {
    flex: 0 1 380px;
    max-width: 430px;
}
.ent-record-add-photo-page .location-row .observation-place-col {
    flex: 0 1 430px;
    max-width: 440px;
}
.ent-record-add-photo-page .location-row .location-site-col {
    flex: 1 1 240px;
    max-width: 320px;
    min-width: 220px;
}
.ent-record-add-photo-page .location-row .location-site-col .station-inline-fields {
    display: block;
}
.ent-record-add-photo-page .location-row .location-site-col .station-inline-fields .muted {
    display: none;
}
.ent-record-add-photo-page .location-row .location-site-col input[type="text"] {
    min-height: 40px;
}
.ent-record-add-photo-page .locality-input-row .btn {
    font-size: 13px;
    line-height: 1.15;
    padding: 8px 10px;
    max-width: 190px;
    white-space: normal;
}
@media (max-width: 760px) {
    .ent-record-add-photo-page .location-row .location-site-col {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* UTM MVP */
.ent-map-utm-creator-page .map-utm-creator-shell{max-width:1440px;margin:0 auto;padding:20px;}
.ent-map-utm-creator-page .map-utm-creator-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px;}
.ent-map-utm-creator-page .map-utm-creator-header h1{margin:0;font-size:26px;letter-spacing:0;}
.ent-map-utm-creator-page .map-utm-creator-header p{margin:6px 0 0;color:#4b5563;}
.ent-map-utm-creator-page .map-utm-creator-actions{display:flex;gap:8px;align-items:center;}
.ent-map-utm-creator-page .map-utm-creator-actions button,.ent-map-utm-creator-page .map-utm-creator-back{min-width:38px;height:38px;border:1px solid #cbd5e1;background:#fff;color:#172033;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;padding:0 10px;}
.ent-map-utm-creator-page .map-utm-export-format{height:38px;border:1px solid #cbd5e1;border-radius:4px;background:#fff;color:#172033;padding:0 8px;font:inherit;}
.ent-map-utm-creator-page .map-utm-data-zone{margin-bottom:16px;padding:12px;border:1px solid #cbd5e1;background:#f8fafc;}
.ent-map-utm-creator-page .map-utm-data-zone h2,.ent-map-utm-creator-page .map-utm-style-zone h2,.ent-map-utm-creator-page .map-utm-output-zone h2,.ent-map-utm-creator-page .map-utm-map-zone h2{margin:0;font-size:17px;color:#172033;}
.ent-map-utm-creator-page .map-utm-data-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:10px;}
.ent-map-utm-creator-page .map-utm-data-block{display:grid;gap:8px;align-content:start;padding:10px;border:1px solid #cbd5e1;background:#fff;}
.ent-map-utm-creator-page .map-utm-data-block h3{margin:0;font-size:14px;color:#334155;}
.ent-map-utm-creator-page .map-utm-data-block label,.ent-map-utm-creator-page .map-utm-style-zone label{display:grid;gap:4px;font-size:13px;font-weight:600;color:#374151;}
.ent-map-utm-creator-page .map-utm-data-block input:not([type="file"]),.ent-map-utm-creator-page .map-utm-data-block select{box-sizing:border-box;width:100%;height:38px;border:1px solid #cbd5e1;border-radius:4px;background:#fff;padding:0 9px;color:#111827;}
.ent-map-utm-creator-page .map-utm-data-block textarea{box-sizing:border-box;width:100%;height:98px;min-height:98px;resize:vertical;border:1px solid #cbd5e1;border-radius:4px;padding:8px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;}
.ent-map-utm-creator-page .map-utm-data-block button,.ent-map-utm-creator-page .map-utm-clear-button{height:38px;border-radius:4px;padding:0 12px;white-space:nowrap;}
.ent-map-utm-creator-page .map-utm-data-actions{display:flex;align-items:end;gap:10px;margin-top:12px;}
.ent-map-utm-creator-page .map-utm-data-actions label{display:grid;gap:4px;min-width:220px;font-size:13px;font-weight:600;color:#374151;}
.ent-map-utm-creator-page .map-utm-data-actions input{box-sizing:border-box;width:100%;height:38px;border:1px solid #cbd5e1;border-radius:4px;background:#fff;padding:0 9px;color:#111827;}
.ent-map-utm-creator-page .map-utm-clear-button{border:1px solid #991b1b;background:#b91c1c;color:#fff;}
.ent-map-utm-creator-page .map-utm-style-zone{display:flex;gap:12px;align-items:end;margin:0 0 16px;padding:12px;border:1px solid #cbd5e1;background:#f8fafc;}
.ent-map-utm-creator-page .map-utm-style-zone h2{margin-right:12px;align-self:center;}
.ent-map-utm-creator-page .map-utm-style-zone input[type="color"]{width:70px;height:38px;border:1px solid #cbd5e1;border-radius:4px;padding:3px;background:#fff;}
.ent-map-utm-creator-page .map-utm-layer-tools{display:grid;gap:6px;min-width:220px;}
.ent-map-utm-creator-page .map-utm-layer-tools label{display:grid;gap:4px;font-size:13px;font-weight:600;color:#374151;}
.ent-map-utm-creator-page .map-utm-layer-tools input{box-sizing:border-box;width:100%;height:38px;border:1px solid #cbd5e1;border-radius:4px;background:#fff;padding:0 9px;color:#111827;}
.ent-map-utm-creator-page .map-utm-layers{display:flex;gap:5px;flex-wrap:wrap;max-width:380px;}
.ent-map-utm-creator-page .map-utm-layer-button{height:30px;border:1px solid #94a3b8;border-radius:4px;background:#fff;color:#334155;padding:0 8px;font-size:12px;}
.ent-map-utm-creator-page .map-utm-layer-button.is-active{border-color:#1d4ed8;background:#dbeafe;color:#1e3a8a;font-weight:700;}
.ent-map-utm-creator-page .map-utm-layer-actions,.ent-map-utm-creator-page .map-utm-project-actions{display:flex;gap:6px;flex-wrap:wrap;}
.ent-map-utm-creator-page .map-utm-layer-actions button,.ent-map-utm-creator-page .map-utm-project-actions button{height:34px;border:1px solid #2563eb;border-radius:4px;background:#2563eb;color:#fff;padding:0 9px;}
.ent-map-utm-creator-page .map-utm-layer-actions #mapUtmRemoveLayer{border-color:#9f1239;background:#be123c;}
.ent-map-utm-creator-page .map-utm-project-actions #mapUtmSaveProject{border-color:#0f766e;background:#0f766e;}
.ent-map-utm-creator-page .map-utm-project-actions #mapUtmLoadProject{border-color:#475569;background:#475569;}
.ent-map-utm-creator-page .map-utm-symbol-picker{display:flex;gap:6px;align-items:center;margin:0;padding:0;border:0;}
.ent-map-utm-creator-page .map-utm-symbol-picker legend{padding:0 0 4px;font-size:13px;font-weight:600;color:#374151;}
.ent-map-utm-creator-page .map-utm-symbol-button{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border:1px solid #94a3b8;border-radius:4px;background:#fff;padding:0;}
.ent-map-utm-creator-page .map-utm-symbol-button.is-selected{border:2px solid #1d4ed8;background:#dbeafe;}
.ent-map-utm-creator-page .map-utm-symbol{display:block;width:18px;height:18px;background:#111827;}
.ent-map-utm-creator-page .map-utm-symbol-circle{border-radius:50%;}
.ent-map-utm-creator-page .map-utm-symbol-ring{box-sizing:border-box;border:3px solid #111827;border-radius:50%;background:transparent;}
.ent-map-utm-creator-page .map-utm-symbol-square{border-radius:0;}
.ent-map-utm-creator-page .map-utm-output-zone{justify-content:flex-start;}
.ent-map-utm-creator-page .map-utm-output-zone h2{margin-right:auto;align-self:center;}
.ent-map-utm-creator-page .map-utm-map-zone h2{margin:0 0 8px;}
.ent-map-utm-creator-page .map-utm-map-operation{display:flex;justify-content:flex-end;margin:0 0 8px;}
.ent-map-utm-creator-page .map-utm-map-operation label{display:grid;gap:4px;width:min(260px,100%);font-size:13px;font-weight:600;color:#374151;}
.ent-map-utm-creator-page .map-utm-map-operation input{height:38px;border:1px solid #cbd5e1;border-radius:4px;background:#fff;padding:0 9px;color:#111827;}
.ent-map-utm-creator-page .map-utm-creator-controls{display:grid;grid-template-columns:minmax(250px,1.5fr) minmax(130px,.65fr) repeat(2,minmax(106px,.55fr));gap:10px;align-items:end;margin-bottom:12px;}
.ent-map-utm-creator-page .map-utm-creator-controls label,.ent-map-utm-creator-page .map-utm-record-search{display:grid;gap:4px;font-size:13px;font-weight:600;color:#374151;}
.ent-map-utm-creator-page .map-utm-record-search>div{display:flex;gap:6px;min-width:0;}
.ent-map-utm-creator-page .map-utm-record-search textarea{min-width:0;flex:1 1 auto;}
.ent-map-utm-creator-page .map-utm-creator-controls input:not([type="range"]):not([type="color"]),.ent-map-utm-creator-page .map-utm-creator-controls select{box-sizing:border-box;width:100%;height:38px;border:1px solid #cbd5e1;border-radius:4px;background:#fff;padding:0 9px;color:#111827;}
.ent-map-utm-creator-page .map-utm-records-button{height:38px;border:1px solid #1d4ed8;background:#2563eb;color:#fff;border-radius:4px;padding:0 12px;white-space:nowrap;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;}
.ent-map-utm-creator-page .map-utm-control-field input[type="color"]{width:100%;height:38px;border:1px solid #cbd5e1;border-radius:4px;padding:3px;background:#fff;}
.ent-map-utm-creator-page .map-utm-output-zone{display:flex;justify-content:flex-end;gap:8px;align-items:center;margin:0 0 10px;padding:10px 12px;border:1px solid #cbd5e1;background:#fff;}
.ent-map-utm-creator-page .map-utm-output-zone button{min-width:38px;height:38px;border:1px solid #cbd5e1;background:#fff;color:#172033;border-radius:4px;padding:0 10px;}
.ent-map-utm-creator-page .map-utm-creator-map-wrap{position:relative;border:1px solid #cbd5e1;background:#fff;}
.ent-map-utm-creator-page #mapUtmCreatorMap{height:calc(100vh - 270px);min-height:480px;background:#fff;}
.ent-map-utm-creator-page #mapUtmCreatorMap:fullscreen{width:100vw!important;height:100vh!important;min-height:0!important;}
.ent-map-utm-creator-page .leaflet-control-map-utm-fullscreen button{display:block;width:30px;height:30px;border:0;background:#fff;color:#172033;font:22px/30px Arial,sans-serif;cursor:pointer;padding:0;}
.ent-map-utm-creator-page .leaflet-control-map-utm-fullscreen button:hover,.ent-map-utm-creator-page .leaflet-control-map-utm-fullscreen button:focus-visible{background:#f1f5f9;outline:0;}
.ent-map-utm-creator-page .map-utm-creator-empty{position:absolute;z-index:700;inset:22% auto auto 50%;transform:translate(-50%,-50%);margin:0;padding:12px 16px;background:#fff;border:1px solid #cbd5e1;border-radius:4px;max-width:360px;text-align:center;}
.ent-map-utm-creator-page .map-utm-creator-status{min-height:24px;margin-top:8px;color:#92400e;font-size:14px;}
.ent-map-utm-creator-page .map-utm-paste-panel{display:grid;grid-template-columns:minmax(180px,1fr) minmax(280px,2fr) auto;gap:10px;align-items:start;margin:0;padding:10px;border:1px solid #cbd5e1;background:#fff;}
.ent-map-utm-creator-page .map-utm-paste-panel>label{font-size:14px;font-weight:700;color:#172033;}
.ent-map-utm-creator-page .map-utm-paste-panel textarea{box-sizing:border-box;width:100%;resize:vertical;min-height:74px;border:1px solid #cbd5e1;border-radius:4px;padding:8px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;}
.ent-map-utm-creator-page .map-utm-paste-actions{display:flex;flex-direction:column;gap:6px;}
.ent-map-utm-creator-page .map-utm-paste-actions button{height:34px;border:1px solid #94a3b8;border-radius:4px;background:#fff;color:#172033;white-space:nowrap;}
.ent-map-utm-creator-page #mapUtmLoadFile{background:#0f766e;color:#fff;border-color:#0f5f59;}
.ent-map-utm-creator-page #mapUtmClearPaste{background:#b91c1c;color:#fff;border-color:#991b1b;}
.ent-map-utm-creator-page .map-utm-output-zone #mapUtmExportA4{background:#166534;color:#fff;border-color:#14532d;}
.ent-map-utm-creator-page .map-utm-output-zone #mapUtmSaveDrive{background:#2563eb;color:#fff;border-color:#1d4ed8;}
.ent-map-utm-creator-page .map-utm-paste-actions button:hover,.ent-map-utm-creator-page .map-utm-output-zone button:hover{filter:brightness(.92);}
.ent-map-utm-creator-page .map-utm-paste-panel p{grid-column:2 / -1;margin:0;color:#4b5563;font-size:12px;}
@media (max-width:700px){.ent-map-utm-creator-page .map-utm-paste-panel{grid-template-columns:1fr;}.ent-map-utm-creator-page .map-utm-paste-actions{flex-direction:row;flex-wrap:wrap;}.ent-map-utm-creator-page .map-utm-paste-panel p{grid-column:auto;}}
@media (max-width:900px){.ent-map-utm-creator-page .map-utm-creator-controls,.ent-map-utm-creator-page .map-utm-data-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.ent-map-utm-creator-page .map-utm-style-zone{flex-wrap:wrap;}.ent-map-utm-creator-page #mapUtmCreatorMap{height:62vh;min-height:380px;}}
@media (max-width:560px){.ent-map-utm-creator-page .map-utm-creator-shell{padding:12px;}.ent-map-utm-creator-page .map-utm-creator-header{flex-direction:column;align-items:stretch;gap:12px;}.ent-map-utm-creator-page .map-utm-creator-header>div:first-child{min-width:0;}.ent-map-utm-creator-page .map-utm-creator-header h1{font-size:21px;}.ent-map-utm-creator-page .map-utm-creator-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 38px 38px;width:100%;gap:8px;}.ent-map-utm-creator-page .map-utm-creator-actions button,.ent-map-utm-creator-page .map-utm-creator-back{box-sizing:border-box;min-width:0;width:100%;padding:0 6px;}.ent-map-utm-creator-page .map-utm-export-format{box-sizing:border-box;min-width:0;width:100%;}.ent-map-utm-creator-page .map-utm-creator-controls,.ent-map-utm-creator-page .map-utm-data-grid{grid-template-columns:1fr;}.ent-map-utm-creator-page .map-utm-style-zone h2,.ent-map-utm-creator-page .map-utm-output-zone h2{flex-basis:100%;margin-right:0;}.ent-map-utm-creator-page .map-utm-layer-tools{width:100%;}.ent-map-utm-creator-page .map-utm-data-actions{align-items:stretch;flex-direction:column;}.ent-map-utm-creator-page .map-utm-data-actions label{min-width:0;}.ent-map-utm-creator-page #mapUtmCreatorMap{height:56vh;min-height:330px;}}
@media print{body.ent-map-utm-creator-page .ent-global-header,body.ent-map-utm-creator-page .map-utm-creator-header,body.ent-map-utm-creator-page .map-utm-data-zone,body.ent-map-utm-creator-page .map-utm-style-zone,body.ent-map-utm-creator-page .map-utm-output-zone,body.ent-map-utm-creator-page .map-utm-map-zone h2,body.ent-map-utm-creator-page .map-utm-map-operation,body.ent-map-utm-creator-page .map-utm-creator-controls,body.ent-map-utm-creator-page .map-utm-paste-panel,body.ent-map-utm-creator-page .map-utm-creator-status,body.ent-map-utm-creator-page .leaflet-control-container{display:none!important;}body.ent-map-utm-creator-page .map-utm-creator-shell{max-width:none;padding:0;}body.ent-map-utm-creator-page .map-utm-creator-map-wrap{border:0;}body.ent-map-utm-creator-page #mapUtmCreatorMap{height:100vh;min-height:0;}}
body.ent-utm-page {
    padding-top: 60px !important;
}
.utm-tool-shell {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 20px 32px;
}
.utm-tool-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.utm-tool-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}
.utm-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #b7c3bd;
    border-radius: 6px;
    background: #fff;
    color: #20303b;
    cursor: pointer;
    font-size: 19px;
    line-height: 1;
}
.utm-header-icon:hover,
.utm-header-icon:focus-visible {
    border-color: #4d6d5d;
    background: #eef5f0;
    outline: none;
}
.utm-header-icon:disabled {
    cursor: not-allowed;
    opacity: .48;
}
.utm-header-generator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 11px 0 9px;
    border: 1px solid #b7c3bd;
    border-radius: 6px;
    background: #fff;
    color: #20303b;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}
.utm-header-generator:hover,
.utm-header-generator:focus-visible {
    border-color: #4d6d5d;
    background: #eef5f0;
    color: #20303b;
    outline: none;
}
.utm-header-generator__icon {
    font-size: 19px;
    line-height: 1;
}
.utm-share-icon {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.utm-tool-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
}
.utm-tool-header p {
    margin: 7px 0 0;
    color: #52616d;
}
.utm-input-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 16px 0;
    align-items: start;
}
.utm-coordinate-form {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #cfd8dc;
    background: #fff;
}
.utm-coordinate-form > label {
    display: block;
    margin: 0 0 10px;
    color: #20303b;
    font-size: 20px;
    font-weight: 700;
}
.utm-coordinate-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}
.utm-coordinate-row input {
    min-width: 0;
    height: 42px;
    border: 1px solid #aebcc4;
    border-radius: 4px;
    padding: 8px 11px;
    background: #fff;
    color: #20303b;
    font: inherit;
}
.utm-coordinate-row input:focus {
    border-color: #1769aa;
    outline: 2px solid rgba(23, 105, 170, .2);
    outline-offset: 1px;
}
.utm-coordinate-row input[aria-invalid="true"] {
    border-color: #a51d2d;
}
.utm-coordinate-row button {
    min-height: 42px;
    border: 1px solid #1769aa;
    border-radius: 4px;
    padding: 8px 16px;
    background: #1769aa;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}
.utm-coordinate-row button:hover,
.utm-coordinate-row button:focus-visible {
    border-color: #12598f;
    background: #12598f;
}
.utm-coordinate-error {
    margin: 7px 0 0;
    color: #8f1827;
    font-size: 13px;
}
.utm-locality-search-section {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #cfd8dc;
    background: #fff;
}
.utm-locality-search-section h2 {
    margin: 0 0 10px;
    color: #20303b;
    font-size: 20px;
    font-weight: 700;
}
.utm-locality-search-row {
    display: flex;
    gap: 8px;
    max-width: 620px;
}
.utm-locality-search-row input {
    min-width: 0;
    flex: 1 1 auto;
    min-height: 42px;
    border: 1px solid #aebdc7;
    border-radius: 4px;
    padding: 8px 12px;
    font: inherit;
}
.utm-locality-search-row button {
    min-height: 42px;
    border: 1px solid #1769aa;
    border-radius: 4px;
    padding: 8px 14px;
    background: #1769aa;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}
.utm-locality-search-row button:hover,
.utm-locality-search-row button:focus-visible {
    border-color: #12598f;
    background: #12598f;
}
.utm-locality-search-results {
    max-width: 620px;
}
.utm-locality-search-results:not(:empty) {
    margin-top: 7px;
    border: 1px solid #d9e1e5;
}
.utm-tool-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}
.utm-results {
    min-width: 0;
    border: 1px solid #cfd8dc;
    background: #fff;
    padding: 16px;
}
#utmResultGroups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}
#utmResultGroups[hidden] {
    display: none;
}
.utm-prompt {
    margin: 0;
    color: #52616d;
    line-height: 1.45;
}
.utm-result-group + .utm-result-group {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}
.utm-result-group h2 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.25;
}
.utm-mobile-result-anchor { display: block; height: 0; }
.utm-value-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    margin: 0;
}
.utm-value-list dt {
    margin-top: 8px;
    color: #52616d;
    font-size: 16px;
    font-weight: 700;
}
.utm-value-list dd {
    display: flex;
    min-width: 0;
    margin: 0;
    border: 1px solid #d9e1e5;
    background: #f8fafb;
}
.utm-value-list code {
    min-width: 0;
    flex: 1 1 auto;
    overflow-wrap: anywhere;
    padding: 12px 14px;
    color: #20303b;
    font-family: var(--font-ui);
    font-size: 20px;
    line-height: 1.25;
}
.utm-copy {
    flex: 0 0 auto;
    border: 0;
    border-left: 1px solid #d9e1e5;
    padding: 7px 9px;
    background: #eaf1f5;
    color: #20303b;
    cursor: pointer;
    font-size: 12px;
}
.utm-copy:hover,
.utm-copy:focus-visible {
    background: #dbe8ef;
}
.utm-map-wrap {
    position: relative;
    min-width: 0;
    border: 1px solid #cfd8dc;
}
#utmMap {
    height: min(72vh, 760px);
    min-height: 520px;
}
.utm-tile-error {
    position: absolute;
    z-index: 700;
    right: 12px;
    bottom: 12px;
    max-width: 320px;
    margin: 0;
    padding: 9px 11px;
    background: #fff3cd;
    border: 1px solid #e5c86b;
    color: #664d03;
    font-size: 13px;
}
.utm-seo-description {
    margin-top: 22px;
    padding: 20px 22px;
    border: 1px solid #d7e1dc;
    background: #f7faf8;
    color: #24332c;
    line-height: 1.58;
}
.utm-seo-description h2 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #1f3b2d;
}
.utm-seo-description p {
    margin: 0;
    max-width: 980px;
}
.utm-seo-description p + p {
    margin-top: 10px;
}
@media (max-width: 820px) {
    .utm-tool-shell {
        padding: 16px 12px 24px;
    }
    .utm-tool-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .utm-tool-header {
        align-items: center;
    }
    .utm-coordinate-row {
        grid-template-columns: minmax(0, 1fr);
    }
    .utm-coordinate-row button {
        width: 100%;
    }
    #utmResultGroups {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }
    .utm-result-group + .utm-result-group {
        padding-top: 16px;
        border-top: 1px solid #e1e7ea;
    }
    .utm-mobile-result-anchor { scroll-margin-top: 78px; }
    #utmMap {
        height: 58vh;
        min-height: 360px;
    }
}

@media (max-width: 768px) {
    body.ent-utm-page {
        padding-top: 72px !important;
    }
    .utm-locality-search-row {
        align-items: stretch;
        flex-direction: column;
    }
    .utm-input-sections {
        grid-template-columns: 1fr;
    }
}


/* ENTOMONE map controls - fullscreen + wyszukiwarka miejscowosci (2026-07-14) */
.ent-map-ctrl { background: #fff; border-radius: 6px; overflow: visible; }
.ent-map-btn {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; font-size: 17px; line-height: 1;
    color: #2c3e50; text-decoration: none; background: #fff; cursor: pointer;
}
.ent-map-btn:hover { background: #f2f4f6; }
.ent-map-search { position: relative; }
.ent-map-search-panel {
    display: none; position: absolute; top: 0; right: 40px;
    width: 300px; background: #fff; border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,.25); padding: 8px;
}
.ent-map-search.open .ent-map-search-panel { display: block; }
.ent-map-search-input {
    width: 100%; box-sizing: border-box; padding: 9px 10px;
    border: 1px solid #cfd6dc; border-radius: 6px; font-size: 14px; outline: none;
}
.ent-map-search-input:focus { border-color: #2e7d5b; }
.ent-map-search-results { max-height: 260px; overflow-y: auto; margin-top: 6px; }
.ent-map-search-item {
    display: block; width: 100%; text-align: left; cursor: pointer;
    background: none; border: 0; border-bottom: 1px solid #eef1f3;
    padding: 8px 6px; font-family: inherit;
}
.ent-map-search-item:hover { background: #f2f7f4; }
.ent-map-search-item strong { display: block; font-size: 13px; color: #22313f; }
.ent-map-search-item span {
    display: block; font-size: 11px; color: #78868f;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ent-map-search-info { padding: 8px 6px; font-size: 12px; color: #78868f; }
#map:fullscreen, #recordViewMap:fullscreen, #siteAddGeoMap:fullscreen, .dataset-default-map:fullscreen { width: 100% !important; height: 100% !important; border-radius: 0 !important; }

@media (max-width: 640px) {
    .ent-map-search-panel { width: 76vw; right: 40px; }
}

/* ENTOMONE mobile gallery hard override (2026-07-14)
   Real phones can hit older page-specific one-column rules; keep gallery cards in two columns. */
@media (max-width: 768px) and (min-width: 301px) {
    body.ent-records-gallery-page .grid,
    body.ent-sites-gallery-page .grid,
    body.ent-species-gallery-page .grid,
    body.ent-species-gallery-page .species-index-grid,
    body.ent-recent-gallery-page .recent-gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    body.ent-records-gallery-page .card,
    body.ent-sites-gallery-page .card,
    body.ent-species-gallery-page .card,
    body.ent-species-gallery-page .species-index-card,
    body.ent-recent-gallery-page .recent-gallery-card {
        min-width: 0 !important;
    }
}

@media (max-width: 300px) {
    body.ent-records-gallery-page .grid,
    body.ent-sites-gallery-page .grid,
    body.ent-species-gallery-page .grid,
    body.ent-species-gallery-page .species-index-grid,
    body.ent-recent-gallery-page .recent-gallery-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Record completion status */
.record-completion-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}
.record-completion-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.ent-record-edit-page .record-completion-switch {
    display: inline-flex;
    margin-bottom: 0;
}
.record-completion-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.record-completion-track {
    position: relative;
    flex: 0 0 auto;
    width: 54px;
    height: 26px;
    border-radius: 999px;
    background: #e88922;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
    transition: background 0.18s ease;
}
.record-completion-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.22);
    transition: transform 0.18s ease;
}
.record-completion-form.is-completed .record-completion-track {
    background: #2f9b57;
}
.record-completion-form.is-completed .record-completion-thumb {
    transform: translateX(28px);
}
.record-completion-text {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.05;
    color: #4b5563;
    min-width: 54px;
}
.record-completion-text strong {
    font-size: 12px;
    font-weight: 700;
}
.record-completion-text small {
    display: none;
}
.record-completion-form.is-progress .record-completion-text--progress strong,
.record-completion-form.is-progress .record-completion-text--progress small {
    color: #a95500;
}
.record-completion-form.is-completed .record-completion-text--completed strong,
.record-completion-form.is-completed .record-completion-text--completed small {
    color: #1f7a43;
}
.record-page-actions-status {
    display: flex;
    align-items: center;
    margin-left: auto;
}
.header-actions .record-completion-form {
    margin-top: -4px;
}
.recent-observation-thumb {
    position: relative;
}
.recent-observation-completion {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.recent-observation-completion--in_progress {
    background: #e88922;
}
.recent-observation-completion--completed {
    background: #2f9b57;
}
@media (max-width: 720px) {
    .record-completion-switch {
        gap: 6px;
    }
    .record-completion-text {
        min-width: 56px;
    }
    .record-completion-text strong {
        font-size: 11px;
    }
    .record-completion-text small {
        display: none;
    }
}

.ent-utm-value,
.record-utm-cell {
    font-family: Consolas, "Courier New", monospace;
    white-space: nowrap;
}
.utm-share-dialog[hidden] { display: none; }
.utm-share-dialog {
    position: fixed;
    z-index: 5000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .38);
}
.utm-share-dialog__panel {
    width: min(460px, 100%);
    padding: 20px;
    border: 1px solid #cfd8dc;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
}
.utm-share-dialog__panel h2 { margin: 0 0 14px; color: #20303b; font-size: 17px; line-height: 1.3; }
.utm-share-dialog__field { display: flex; min-width: 0; gap: 8px; }
.utm-share-dialog__field input {
    min-width: 0;
    flex: 1 1 auto;
    height: 38px;
    padding: 7px 9px;
    border: 1px solid #9db0bd;
    border-radius: 6px;
    color: #20303b;
    font-size: 13px;
}
.utm-share-dialog__actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 16px; }
.utm-share-dialog__copy,
.utm-share-dialog__open,
.utm-share-dialog__close {
    min-height: 36px;
    padding: 7px 13px;
    border: 1px solid #315746;
    border-radius: 6px;
    background: #315746;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}
.utm-share-dialog__open { display: inline-flex; align-items: center; text-decoration: none; background: #fff; color: #315746; }
.utm-share-dialog__copy:hover,
.utm-share-dialog__copy:focus-visible,
.utm-share-dialog__close:hover,
.utm-share-dialog__close:focus-visible { background: #254b3d; }
.utm-share-dialog__open:hover,
.utm-share-dialog__open:focus-visible { background: #eef5f0; }
@media (max-width: 560px) {
    .utm-share-dialog__field,
    .utm-share-dialog__actions { align-items: stretch; flex-direction: column; }
    .utm-share-dialog__copy,
    .utm-share-dialog__open,
    .utm-share-dialog__close { justify-content: center; }
}

/* ENTOMONE temporary registration notice */
.registration-notice-open {
    overflow: hidden;
}
.registration-notice-modal[hidden] {
    display: none !important;
}
.registration-notice-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.registration-notice-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
}
.registration-notice-panel {
    position: relative;
    width: min(520px, 100%);
    padding: 28px;
    border: 1px solid #d8cbb5;
    border-radius: 12px;
    background: #fffaf0;
    color: #17251f;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}
.registration-notice-panel h2 {
    margin: 0 36px 14px 0;
    font-size: 25px;
    line-height: 1.18;
    letter-spacing: 0;
}
.registration-notice-panel p {
    margin: 0 0 12px;
    color: #334841;
    line-height: 1.5;
}
.registration-notice-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-height: 38px;
    border: 1px solid #d8cbb5;
    border-radius: 8px;
    background: #ffffff;
    color: #17251f;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}
.registration-notice-form {
    margin-top: 18px;
}
.registration-notice-form label {
    display: block;
    margin-bottom: 7px;
    color: #16352d;
    font-weight: 800;
}
.registration-notice-row {
    display: flex;
    gap: 10px;
}
.registration-notice-row input {
    min-width: 0;
    flex: 1 1 auto;
    min-height: 46px;
    padding: 10px 12px;
    border: 2px solid #e3d9c7;
    border-radius: 10px;
    background: #fffdf7;
}
.registration-notice-row input:focus {
    outline: none;
    border-color: #d66f2f;
    box-shadow: 0 0 0 4px rgba(214, 111, 47, 0.12);
}
.registration-notice-row button {
    flex: 0 0 auto;
    min-height: 46px;
    padding: 10px 18px;
    border: 0;
    border-radius: 10px;
    background: #d66f2f;
    color: #fff;
    cursor: pointer;
    font-weight: 900;
}
.registration-notice-status {
    min-height: 20px;
    margin: 10px 0 0 !important;
    color: #315746 !important;
    font-size: 13px;
    font-weight: 700;
}
@media (max-width: 520px) {
    .registration-notice-modal {
        align-items: flex-end;
        padding: 14px;
    }
    .registration-notice-panel {
        padding: 24px 18px 20px;
    }
    .registration-notice-panel h2 {
        font-size: 22px;
    }
    .registration-notice-row {
        flex-direction: column;
    }
    .registration-notice-row button {
        width: 100%;
    }
}

.registration-notice-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
.registration-notice-status.is-error {
    color: #721c24 !important;
}
.registration-notice-status.is-success {
    color: #155724 !important;
}
.registration-notice-row button:disabled {
    cursor: wait;
    opacity: .68;
}

/* Mobile records: keep the observation list as the first task; dataset settings stay at the end. */
.ent-records-page .records-dataset-switcher-bottom {
    margin: 28px 0 12px;
}

@media (max-width: 900px) {
    .ent-records-page {
        padding-top: 84px !important;
    }

    .ent-records-page .ent-records-header-compact {
        margin-bottom: 0;
        padding: 4px 0;
    }

    .ent-records-page .records-dataset-switcher-bottom {
        margin: 18px 0 10px;
    }
}

/* ENTOMONE start.php fixed-header clearance guard (2026-07-19)
   The global header can expose the active dataset line below its first row;
   keep the start content below that visual header area. */
body.ent-start-page .ent-start-shell {
    padding-top: 38px !important;
}

@media (max-width: 900px) {
    body.ent-start-page .ent-start-shell {
        padding-top: 9px !important;
    }
}
/* ENTOMONE global fixed-header clearance guard (2026-07-19) */
:root {
    --ent-fixed-header-height: 50px;
    --ent-fixed-header-gap: 24px;
    --ent-fixed-header-clearance: calc(var(--ent-fixed-header-height) + var(--ent-fixed-header-gap));
}

body:has(.ent-global-header) {
    padding-top: var(--ent-fixed-header-clearance) !important;
    scroll-padding-top: var(--ent-fixed-header-clearance) !important;
}

body:has(.ent-global-header) .ent-global-header {
    min-height: var(--ent-fixed-header-height);
}

body:has(.ent-global-header) :target {
    scroll-margin-top: var(--ent-fixed-header-clearance);
}

@media (max-width: 768px) {
    :root {
        --ent-fixed-header-height: 68px;
        --ent-fixed-header-gap: 24px;
    }
}

@media (max-width: 420px) {
    :root {
        --ent-fixed-header-height: 76px;
        --ent-fixed-header-gap: 24px;
    }
}

/* ENTOMONE species/record hover photo preview */
.ent-photo-hover {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    overflow: visible;
}

.ent-photo-hover-preview {
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    z-index: 5000;
    width: 190px;
    min-height: 118px;
    padding: 8px;
    border: 1px solid #d5dce2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(23, 37, 31, .18);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition: opacity .14s ease, transform .14s ease;
    visibility: hidden;
}

.ent-photo-hover-preview img {
    display: block;
    width: 100%;
    max-height: 170px;
    object-fit: contain;
}

.ent-records-page .record-photo-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 16px;
    margin-left: 5px;
    vertical-align: -2px;
    cursor: default;
}

.ent-records-page .record-photo-indicator-glyph {
    position: relative;
    display: inline-block;
    width: 14px;
    height: 10px;
    border: 1.5px solid #60727d;
    border-radius: 3px;
    background: #f8fbfc;
}

.ent-records-page .record-photo-indicator-glyph::before {
    content: "";
    position: absolute;
    left: 2px;
    top: -4px;
    width: 5px;
    height: 3px;
    border-radius: 2px 2px 0 0;
    background: #60727d;
}

.ent-records-page .record-photo-indicator-glyph::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 4px;
    border: 1.5px solid #60727d;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
}

.ent-records-page .record-photo-indicator:hover .record-photo-indicator-glyph,
.ent-records-page .record-photo-indicator:focus-visible .record-photo-indicator-glyph {
    border-color: #1e78d7;
}

.ent-photo-hover:hover .ent-photo-hover-preview,
.ent-photo-hover:focus .ent-photo-hover-preview,
.ent-photo-hover:focus-visible .ent-photo-hover-preview {
    opacity: 1;
    transform: translate(-50%, 0);
    visibility: visible;
}

@media (hover: none), (max-width: 760px) {
    .ent-photo-hover-preview {
        display: none;
    }
}

/* ENTOMONE my_datasets visual cleanup (2026-07-20) */
.ent-my-datasets-page .container {
    width: min(100% - 32px, 1120px);
    max-width: 1120px;
}

.ent-my-datasets-page table {
    table-layout: fixed;
}

.ent-my-datasets-page th:last-child,
.ent-my-datasets-page td:last-child {
    width: 260px;
}

.ent-my-datasets-page .actions-cell {
    justify-content: flex-end;
}

.ent-my-datasets-page .actions-cell .btn,
.ent-my-datasets-page .actions-cell button.btn,
.ent-my-datasets-page .actions-cell a.btn,
.ent-my-datasets-page .form-actions .btn,
.ent-my-datasets-page .create-actions .btn,
.ent-my-datasets-page .active-dataset-switcher .btn,
.ent-my-datasets-page .copy-link-btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    white-space: normal;
}

.ent-my-datasets-page .actions-cell .btn-sm {
    min-width: 112px;
}

.ent-my-datasets-page .actions-cell .btn-invite {
    min-width: 190px;
}

.ent-my-datasets-page .active-dataset-switcher option {
    overflow-wrap: normal;
}

@media (max-width: 640px) {
    .ent-my-datasets-page .container {
        width: 100%;
    }

    .ent-my-datasets-page th:last-child,
    .ent-my-datasets-page td:last-child {
        width: 100%;
    }

    .ent-my-datasets-page .actions-cell .btn-sm,
    .ent-my-datasets-page .actions-cell .btn-invite {
        min-width: 0;
    }
}
/* ENTOMONE my_datasets terminology note (2026-07-20) */
.ent-my-datasets-page .dataset-term-note {
    margin: 8px 0 14px;
    padding: 12px 14px;
    border-left: 4px solid #2c7a57;
    background: #eef8f2;
    color: #24463a;
    font-size: 14px;
    line-height: 1.5;
}

.ent-my-datasets-page .dataset-term-note strong {
    font-weight: 800;
}

/* ENTOMONE my_datasets edit anchor offset (2026-07-20) */
.ent-my-datasets-page #dataset-edit-form {
    scroll-margin-top: calc(var(--ent-fixed-header-clearance, 88px) + 16px);
}

/* ENTOMONE Rejestrator: dedicated Field Notebook entry page (2026-07-25) */
body.ent-rejestrator-page .ent-start-shell {
    padding-top: 38px !important;
}

body.ent-rejestrator-page .ent-rejestrator-title {
    margin: 0;
    color: #17251f;
    font-size: 30px;
    font-weight: 850;
    line-height: 1.05;
}

body.ent-rejestrator-page .ent-rejestrator-copy {
    margin: 8px 0 0;
    color: #66736e;
    font-size: 14px;
    line-height: 1.35;
}

body.ent-rejestrator-page .ent-start-header {
    position: relative;
}

.ent-recorder-queue-indicator {
    position: absolute;
    top: -20px;
    right: 3px;
    display: grid;
    box-sizing: border-box;
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    aspect-ratio: 1 / 1;
    flex: 0 0 30px;
    place-items: center;
    padding: 0;
    border: 1px solid #1f2d27;
    border-radius: 50%;
    background: #ffffff;
    color: #1f2d27 !important;
    font-variant-numeric: tabular-nums;
}

.ent-recorder-queue-indicator[hidden] { display: none; }
.ent-recorder-queue-indicator[data-state="error"] {
    border-color: #1f2d27;
    color: #1f2d27 !important;
}

.ent-recorder-queue-indicator span {
    display: block;
    min-width: 0;
    padding: 0;
    color: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.ent-recorder-queue-dialog {
    width: min(360px, calc(100vw - 24px));
    padding: 18px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    color: #27332d;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
    text-align: center;
}

.ent-recorder-queue-dialog::backdrop { background: rgba(15, 23, 42, 0.42); }
.ent-recorder-queue-dialog strong,
.ent-recorder-queue-dialog span { display: block; margin-bottom: 14px; }
.ent-recorder-queue-dialog strong a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.ent-recorder-queue-dialog button {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    background: #e8efeb;
    color: #27332d;
    font: inherit;
    font-weight: 750;
}

.ent-recorder-queue-dialog button + button {
    margin-top: 8px;
}

.ent-recorder-queue-dialog .ent-queue-retry-button,
.ent-field-notebook-queue-sheet .ent-queue-retry-button {
    background: #278457;
    color: #ffffff;
}

.ent-local-queue-list {
    max-height: min(38vh, 360px);
    padding: 0;
    margin: 0 0 14px;
    overflow-y: auto;
    list-style: none;
    text-align: left;
}

.ent-local-queue-item {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid #cbd8d0;
    border-radius: 8px;
    background: #f7faf8;
}

.ent-local-queue-item + .ent-local-queue-item { margin-top: 8px; }
.ent-local-queue-item.is-error { border-color: #d99a91; background: #fff8f6; }
.ent-local-queue-item strong { margin: 0; color: #203b2c; font-size: 15px; line-height: 1.3; }
.ent-local-queue-meta,
.ent-local-queue-status { margin: 0; color: #536159; font-size: 13px; line-height: 1.35; }
.ent-local-queue-item.is-error .ent-local-queue-status { color: #a33627; font-weight: 700; }

.ent-local-queue-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin-top: 2px;
}

.ent-recorder-queue-dialog .ent-local-queue-actions button,
.ent-field-notebook-queue-sheet .ent-local-queue-actions button {
    min-height: 42px;
    padding: 8px 10px;
    margin: 0;
    border: 1px solid #5f7468;
    background: #ffffff;
    color: #203b2c;
    font-size: 13px;
    line-height: 1.2;
}

.ent-recorder-queue-dialog .ent-local-queue-actions .ent-local-queue-delete,
.ent-field-notebook-queue-sheet .ent-local-queue-actions .ent-local-queue-delete {
    border-color: #aa3c31;
    background: #aa3c31;
    color: #ffffff;
}

.ent-local-queue-actions button:disabled { opacity: 0.55; cursor: wait; }

.ent-queue-retry-button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.ent-recorder-voice-note-placeholder {
    display: flex;
    justify-content: center;
    margin: -34px 0 40px;
}

.ent-recorder-voice-note-button {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    padding: 0;
    border: 2px solid #9aada3;
    border-radius: 50%;
    background: #ffffff;
    color: #5c7066;
    cursor: not-allowed;
    opacity: 0.82;
}

.ent-recorder-voice-note-button svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

@media (min-width: 901px) {
    body.ent-rejestrator-page .ent-start-camera-form {
        display: flex !important;
    }
}

@media (max-width: 900px) {
    body.ent-rejestrator-page .ent-start-shell {
        padding-top: 16px !important;
    }
}

/* ENTOMONE Rejestrator: remembered start page preference (2026-07-25) */
.ent-recorder-start-preference {
    max-width: 360px;
    margin: 54px auto 18px;
    padding: 14px;
    border-top: 1px solid #d8e1de;
    text-align: center;
}

.ent-recorder-start-preference-button {
    width: 100%;
    min-height: 42px;
    border: 1px solid #2f855a;
    border-radius: 6px;
    background: #ffffff;
    color: #1f6b48;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
}

.ent-recorder-start-preference-button:hover,
.ent-recorder-start-preference-button:focus-visible {
    background: #edf8f1;
    outline: none;
}

.ent-recorder-start-preference-notice {
    margin-bottom: 12px;
    color: #1f6b48;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

/* ENTOMONE Rejestrator: mobile dataset switcher (2026-07-25) */
.ent-recorder-dataset-picker {
    max-width: 360px;
    margin: 54px auto 24px;
    padding: 0 14px;
}

body.ent-start-page:not(.ent-rejestrator-page) .ent-start-dataset-label--has-mobile-link {
    display: none;
}

body.ent-start-page:not(.ent-rejestrator-page) .ent-start-dataset-link {
    display: inline-block;
    margin-top: 6px;
    color: #1f6b48;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
}

body.ent-start-page:not(.ent-rejestrator-page) .ent-start-dataset-link:focus-visible {
    outline: 2px solid #164e63;
    outline-offset: 3px;
}

.ent-recorder-dataset-trigger {
    display: grid;
    width: 100%;
    min-height: 54px;
    padding: 8px 14px;
    border: 1px solid #365a72;
    border-radius: 6px;
    background: #ffffff;
    color: #243e52;
    font: inherit;
    justify-items: center;
    text-align: center;
    cursor: pointer;
}

.ent-recorder-dataset-trigger span {
    font-size: 13px;
    font-weight: 700;
}

.ent-recorder-dataset-trigger strong {
    overflow: hidden;
    max-width: 100%;
    color: #1f6b48;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ent-recorder-dataset-dialog {
    box-sizing: border-box;
    width: min(496px, calc(100vw - 24px));
    max-width: none;
    max-height: min(78dvh, 640px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 36px;
    background: #f6f8fb;
    color: #20252d;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
    overflow: auto;
}

.ent-recorder-dataset-dialog::backdrop {
    background: rgba(0, 0, 0, 0.35);
}

.ent-recorder-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ent-recorder-dataset-list {
    display: grid;
}

.ent-recorder-dataset-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100px;
    padding: 18px;
    border: 0;
    border-bottom: 1px solid #d7dce1;
    background: transparent;
    color: #20252d;
    font: inherit;
    font-size: 26px;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}

.ent-recorder-dataset-option:last-child {
    border-bottom: 0;
}

.ent-recorder-dataset-choice {
    box-sizing: border-box;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    border: 3px solid #4d555d;
    border-radius: 50%;
    background: #f6f8fb;
}

.ent-recorder-dataset-option.is-active .ent-recorder-dataset-choice {
    border-color: #277c9b;
    box-shadow: inset 0 0 0 5px #f6f8fb;
    background: #277c9b;
}

@media (max-width: 420px) {
    .ent-recorder-dataset-option {
        min-height: 82px;
        font-size: 22px;
    }
}

/* ENTOMONE Rejestrator: compact first mobile viewport (2026-08-03) */
@media (max-width: 900px) {
    body.ent-rejestrator-page .ent-start-shell {
        padding-top: 4px !important;
    }

    body.ent-rejestrator-page .ent-start-header {
        transform: translateY(-10px);
    }

    body.ent-rejestrator-page .ent-start-camera-form {
        margin-top: -12px;
        margin-bottom: 0;
        flex-direction: column;
        align-items: center;
    }

    body.ent-rejestrator-page .ent-recorder-dataset-picker {
        margin-top: 8px;
    }
}

.ent-recorder-note-compose {
    display: none;
}

@media (max-width: 900px) {
    body.ent-rejestrator-page .ent-recorder-note-compose {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 56px;
        width: min(360px, calc(100% - 28px));
        min-height: 112px;
        margin-top: 18px;
        gap: 8px;
    }

    .ent-recorder-note-compose textarea {
        width: 100%;
        min-width: 0;
        min-height: 112px;
        box-sizing: border-box;
        resize: vertical;
        padding: 10px 12px;
        border: 1px solid #1f2937;
        border-radius: 4px;
        background: #ffffff;
        color: #17251f;
        font: inherit;
        font-size: 16px;
        line-height: 1.4;
    }

    .ent-recorder-note-actions {
        display: grid;
        grid-template-rows: 52px 52px;
        gap: 8px;
    }

    .ent-recorder-note-action {
        display: grid;
        width: 52px;
        height: 52px;
        min-width: 52px;
        place-items: center;
        padding: 0;
        border: 0;
        border-radius: 8px;
    }

    .ent-recorder-note-action svg {
        width: 28px;
        height: 28px;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 1.9;
    }

    .ent-recorder-note-microphone {
        background: #278457;
        color: #ffffff;
        cursor: pointer;
    }

    .ent-recorder-note-microphone.is-listening {
        background: #b91c1c;
        color: #ffffff;
    }

    .ent-recorder-note-alert,
    .ent-recorder-note-alert:disabled {
        background: #d97706;
        color: #ffffff;
        cursor: default;
        opacity: 1;
    }

    .ent-recorder-note-commands {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .ent-recorder-note-commands button {
        min-height: 44px;
        padding: 9px 14px;
        border-radius: 6px;
        font: inherit;
        font-size: 16px;
        font-weight: 500;
        cursor: pointer;
    }

    .ent-recorder-note-save {
        border: 1px solid #278457;
        background: #278457;
        color: #ffffff;
    }

    .ent-recorder-note-save:disabled {
        border-color: #278457;
        background: #278457;
        color: #ffffff;
        opacity: 0.55;
        cursor: default;
    }

    .ent-recorder-note-cancel {
        border: 1px solid #94a3b8;
        background: #ffffff;
        color: #24332c;
    }

    .ent-recorder-note-cancel:disabled {
        opacity: 0.55;
        cursor: default;
    }

    .ent-recorder-note-status {
        grid-column: 1 / -1;
        min-height: 18px;
        color: #334155;
        font-size: 13px;
        line-height: 1.35;
        text-align: center;
    }
}

/* Notatnik hides the global header, so it must never inherit page clearance. */
body.ent-record-add-field-page {
    padding-top: 0 !important;
    scroll-padding-top: 0 !important;
}

.ent-record-add-field-page .ent-field-notebook-review-actions {
    grid-template-columns: 72px 72px minmax(0, 1fr);
    gap: 8px;
}

.ent-record-add-field-page .ent-field-notebook-review-actions .ent-field-notebook-secondary {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border: 0;
    color: #ffffff;
}

.ent-record-add-field-page .ent-field-notebook-review-actions .ent-field-notebook-add-photo {
    background: #d97706 !important;
    color: #ffffff !important;
}

.ent-record-add-field-page .ent-field-notebook-review-actions .ent-field-notebook-voice-note {
    background: #278457 !important;
    color: #ffffff !important;
    cursor: default;
}

.ent-record-add-field-page .ent-field-notebook-review-actions .ent-field-notebook-secondary svg {
    width: 32px;
    height: 32px;
}

.ent-record-add-field-page .ent-field-notebook-review-actions #fqSaveBtn {
    min-width: 0;
    padding-right: 12px;
    padding-left: 12px;
}

.ent-record-add-field-page .ent-field-notebook-photo-count[hidden] {
    display: none !important;
}

/* Notatnik terenowy: kompaktowy przeglad zdjec i notatka (2026-07-29). */
.ent-record-add-field-page .ent-field-notebook-review {
    grid-template-rows: minmax(210px, 42vh) 60px minmax(132px, auto) 76px 58px;
    gap: 8px;
}

.ent-record-add-field-page .ent-field-notebook-photo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 8px;
    overflow: hidden;
    border-radius: 4px;
    background: #eef2f0;
}

.ent-record-add-field-page .ent-field-notebook-photo-main {
    min-width: 0;
    min-height: 0;
    background: #17211c;
}

.ent-record-add-field-page .ent-field-notebook-photo-main img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ent-record-add-field-page .ent-field-notebook-photo-main img.is-selected {
    outline: 3px solid #2b8051;
    outline-offset: -3px;
}

.ent-record-add-field-page .ent-field-notebook-photo-rail {
    display: grid;
    grid-auto-rows: 92px;
    gap: 7px;
    align-content: start;
    overflow-y: auto;
    padding-right: 2px;
}

.ent-record-add-field-page .ent-field-notebook-photo-rail img {
    display: block;
    width: 100%;
    height: 92px;
    box-sizing: border-box;
    border: 2px solid #d8dee4;
    object-fit: cover;
    cursor: pointer;
}

.ent-record-add-field-page .ent-field-notebook-photo-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.ent-record-add-field-page .ent-field-notebook-photo-action {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 999px;
    padding: 0 9px;
    color: #fff;
    font-size: 14px;
    font-weight: 850;
    line-height: 1;
    cursor: pointer;
}

.ent-record-add-field-page .ent-field-notebook-photo-action svg {
    width: 23px;
    height: 23px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
}

.ent-record-add-field-page .ent-field-notebook-photo-controls .ent-field-notebook-add-photo {
    width: 100%;
    padding: 0;
    background: #22a846 !important;
}
.ent-record-add-field-page .ent-field-notebook-photo-controls .ent-field-notebook-add-photo span { display: none; }
.ent-record-add-field-page .ent-field-notebook-photo-controls .ent-field-notebook-add-photo svg { width: 30px; height: 30px; }
.ent-record-add-field-page .ent-field-notebook-remove-photo { background: #eb2020; }
.ent-record-add-field-page .ent-field-notebook-photo-count {
    min-width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 3px;
    background: #e7ece9;
    color: #27322d;
    font-size: 18px;
}

.ent-record-add-field-page .ent-field-notebook-notes {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.ent-record-add-field-page .ent-field-notebook-notes textarea {
    width: 100%;
    min-height: 130px;
    box-sizing: border-box;
    resize: vertical;
    padding: 9px 10px;
    border: 1px solid #94a3b8;
    border-radius: 3px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
}
.ent-record-add-field-page .ent-field-notebook-notes span { font-size: 12px; color: #64748b; }

.ent-record-add-field-page .ent-field-notebook-review-actions {
    grid-template-columns: 64px 64px minmax(0, 1fr);
    grid-row: 4;
    align-items: stretch;
}
.ent-record-add-field-page .ent-field-notebook-review-actions .ent-field-notebook-secondary {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 50%;
}
.ent-record-add-field-page .ent-field-notebook-review-actions .ent-field-notebook-voice-note {
    background: #278457 !important;
    color: #ffffff !important;
    border: 1px solid #278457;
    cursor: pointer;
}
.ent-record-add-field-page .ent-field-notebook-review-actions .ent-field-notebook-voice-note.is-listening { background: #b91c1c !important; color: #fff !important; }
.ent-record-add-field-page .ent-field-notebook-alert { background: #d97706 !important; color: #fff !important; opacity: 1 !important; }
.ent-record-add-field-page .ent-field-notebook-alert:disabled { cursor: default; }
.ent-record-add-field-page .ent-field-notebook-alert svg { width: 25px !important; height: 25px !important; }
.ent-record-add-field-page .ent-field-notebook-review-actions .ent-field-notebook-alert {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    justify-self: center;
}
.ent-record-add-field-page .ent-field-notebook-camera-return {
    overflow: hidden;
    border-radius: 50%;
    background: #ffffff;
}
.ent-record-add-field-page .ent-field-notebook-camera-return img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ent-record-add-field-page .ent-field-notebook-cancel-row {
    grid-row: 5;
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    padding: 0;
    background: transparent;
}
.ent-record-add-field-page .ent-field-notebook-cancel-link { grid-column: 1; min-height: 52px; }
.ent-record-add-field-page .ent-field-notebook-cancel-row #fqSaveBtn { grid-column: 2; min-height: 52px; padding: 0 12px; }

@media (max-width: 390px) {
    .ent-record-add-field-page .ent-field-notebook-photo-controls { gap: 6px; }
    .ent-record-add-field-page .ent-field-notebook-photo-action { padding: 0 8px; font-size: 13px; }
    .ent-record-add-field-page .ent-field-notebook-photo-action svg { width: 24px; height: 24px; }
}

/* ENTOMONE dictionaries mobile edit row: keep gatunki edit controls inside viewport. */
@media (max-width: 760px) {
    .ent-dictionaries-page {
        overflow-x: hidden;
    }

    .ent-dictionaries-page .container {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding-left: 12px;
        padding-right: 12px;
    }

    .ent-dictionaries-page table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ent-dictionaries-page thead,
    .ent-dictionaries-page tbody {
        display: table;
        width: 100%;
    }

    .ent-dictionaries-page .dict-edit-row,
    .ent-dictionaries-page .dict-edit-row > td {
        display: block !important;
        width: calc(100vw - 64px);
        max-width: calc(100vw - 64px);
        min-width: 280px;
        box-sizing: border-box;
    }

    .ent-dictionaries-page .dict-edit-row > td {
        padding: 10px 0;
    }

    .ent-dictionaries-page .dict-edit-row .inline-edit {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        padding: 14px;
    }

    .ent-dictionaries-page .dict-edit-row .row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        width: 100%;
        max-width: 100%;
    }

    .ent-dictionaries-page .dict-edit-row .col,
    .ent-dictionaries-page .dict-edit-row .col-flex-2,
    .ent-dictionaries-page .dict-edit-row .col-flex-auto {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }

    .ent-dictionaries-page .dict-edit-row input[type="text"],
    .ent-dictionaries-page .dict-edit-row select,
    .ent-dictionaries-page .dict-edit-row .select2-container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .ent-dictionaries-page .dict-edit-row .col-flex-auto {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ent-dictionaries-page .dict-edit-row .col-flex-auto button {
        width: 100%;
        min-height: 44px;
        margin: 0;
        white-space: normal;
    }

    /* Keep every dictionary tab, including "Rośliny", inside a phone viewport. */
    .ent-dictionaries-page .tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        overflow: visible;
        border-bottom: 0;
    }

    .ent-dictionaries-page .tab-link {
        width: 100%;
        min-width: 0;
        padding: 12px 8px;
        text-align: center;
        white-space: normal;
        overflow-wrap: anywhere;
        border-bottom: 1px solid #eee;
        border-radius: 5px;
    }

    .ent-dictionaries-page .tab-link:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}
/* ENTOMONE field quick cancel row after review actions */
.ent-record-add-field-page .ent-field-notebook-review {
    grid-template-rows: minmax(0, 1fr) 22px 76px 58px;
    gap: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
}

.ent-record-add-field-page .ent-field-notebook-review-actions {
    grid-row: 3;
}

.ent-record-add-field-page .ent-field-notebook-cancel-row {
    grid-row: 4;
    min-height: 58px;
    display: grid;
    grid-template-columns: 72px 72px minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
    padding: 0;
    background: #f4f7f5;
}

.ent-record-add-field-page .ent-field-notebook-cancel-link {
    grid-column: 3;
    min-height: 52px;
    min-width: 0;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5cf;
    border-radius: 8px;
    background: #ffffff;
    color: #8a1f1f;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
}

.ent-record-add-field-page .ent-field-notebook-cancel-link:hover,
.ent-record-add-field-page .ent-field-notebook-cancel-link:focus-visible {
    border-color: #b91c1c;
    color: #b91c1c;
    text-decoration: none;
}

@media (max-height: 680px) {
    .ent-record-add-field-page .ent-field-notebook-review {
        grid-template-rows: minmax(0, 1fr) 18px 68px 50px;
        gap: 4px;
    }
    .ent-record-add-field-page .ent-field-notebook-cancel-row {
        grid-template-columns: 72px 72px minmax(0, 1fr);
        min-height: 50px;
    }
    .ent-record-add-field-page .ent-field-notebook-cancel-link {
        min-height: 44px;
    }
}

/* ENTOMONE my_datasets mobile active dataset confirmation. */
.ent-my-datasets-page .dataset-switch-confirm {
    display: none;
}

@media (max-width: 640px) {
    .ent-my-datasets-page .dataset-switch-confirm {
        position: fixed;
        inset: 0;
        z-index: 9500;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding: 16px;
        background: rgba(15, 23, 42, 0.28);
    }

    .ent-my-datasets-page .dataset-switch-confirm.is-hiding {
        display: none;
    }

    .ent-my-datasets-page .dataset-switch-confirm-card {
        position: relative;
        width: min(100%, 420px);
        padding: 22px 46px 24px 22px;
        border: 1px solid #9fd5ad;
        border-radius: 12px;
        background: #e8f8ee;
        color: #155724;
        box-shadow: 0 16px 36px rgba(15, 23, 42, 0.24);
    }

    .ent-my-datasets-page .dataset-switch-confirm-title {
        font-size: 18px;
        font-weight: 700;
        line-height: 1.35;
    }

    .ent-my-datasets-page .dataset-switch-confirm-name {
        margin-top: 8px;
        font-size: 24px;
        font-weight: 900;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .ent-my-datasets-page .dataset-switch-confirm-close {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 999px;
        background: rgba(21, 87, 36, 0.12);
        color: #155724;
        font-size: 24px;
        font-weight: 800;
        line-height: 1;
        cursor: pointer;
    }
}

/* ENTOMONE records: desktop dataset switcher in top-right results header. */
@media (min-width: 901px) {
    .ent-records-page .results-heading-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
        align-items: start;
        column-gap: 24px;
    }

    .ent-records-page .results-edit-filters,
    .ent-records-page .results-clear-filters,
    .ent-records-page .results-heading-summary {
        grid-column: 1;
    }

    .ent-records-page .records-dataset-switcher-top {
        grid-column: 2;
        grid-row: 1 / span 2;
        justify-self: end;
        align-self: start;
        width: min(100%, 520px);
        max-width: 520px;
        margin: 0;
    }

    .ent-records-page .records-dataset-switcher-top .dataset-switcher-form {
        flex: 1 1 280px;
    }

    .ent-records-page .records-dataset-switcher-top .dataset-switcher-select {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .ent-records-page .records-dataset-switcher-top {
        display: block;
        width: 100%;
        max-width: none;
        margin: 0 0 10px;
        padding: 12px 16px 14px;
        border: 2px solid #58778f;
        border-radius: 10px;
        background: #fff;
        box-shadow: none;
    }
}
/* ENTOMONE records: keep New search button content-width in desktop header grid. */
@media (min-width: 901px) {
    .ent-records-page .results-heading-row > .results-edit-filters {
        justify-self: start;
        width: fit-content;
        max-width: 100%;
    }

    .ent-records-page .results-heading-row > .results-clear-filters {
        justify-self: start;
        width: fit-content;
        max-width: 100%;
    }
}

/* ENTOMONE global language switch: keep current flag visible on light header. */
.ent-global-header .ent-language-current {
    width: 30px;
    min-width: 30px;
    height: 22px;
    border: 0;
    border-radius: 3px;
    background: transparent;
}

.ent-global-header .ent-language-current .ent-language-flag-svg {
    flex: 0 0 auto;
    width: 24px;
    height: 16px;
}

@media (max-width: 768px) {
    .ent-global-inner {
        position: relative;
        min-height: 84px;
    }

    .ent-language-switch {
        position: absolute;
        top: 51px;
        right: 22px;
        z-index: 2;
    }
}
/* ENTOMONE record view desktop header compact actions (2026-07-22) */
@media (min-width: 769px) {
    .ent-record-view-page .header {
        position: relative;
        align-items: flex-start;
    }

    .ent-record-view-page .header-actions {
        position: relative;
        display: grid;
        grid-template-columns: auto auto;
        column-gap: 14px;
        row-gap: 0;
        justify-content: end;
        justify-items: end;
        align-items: center;
        min-width: 360px;
        padding-top: 56px;
    }

    .ent-record-view-page .header-actions .btn-back {
        position: absolute;
        top: -40px;
        right: 0;
        z-index: 2;
        min-width: 170px;
        box-shadow: none;
        transform: none;
    }

    .ent-record-view-page .header-actions .record-completion-form {
        grid-column: 1;
        grid-row: 1;
        justify-self: end;
        margin: 0;
        white-space: nowrap;
    }

    .ent-record-view-page .header-actions .btn-edit {
        grid-column: 2;
        grid-row: 1;
        min-width: 145px;
        margin: 0;
        transform: none;
    }
}
/* ENTOMONE record view mobile header compact actions (2026-07-22) */
@media (max-width: 768px) {
    .ent-record-view-page .container {
        position: relative;
        margin-top: 20px;
        padding-top: 18px;
    }

    .ent-record-view-page .header {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 10px;
        row-gap: 12px;
        align-items: center;
        padding-bottom: 16px;
        margin-bottom: 18px;
    }

    .ent-record-view-page .header-main,
    .ent-record-view-page .header-actions {
        display: contents;
    }

    .ent-record-view-page .header-main h1 {
        grid-column: 1 / -1;
        grid-row: 1;
        margin-right: 160px;
    }

    .ent-record-view-page .record-id-nav {
        grid-column: 1;
        grid-row: 2;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .ent-record-view-page .record-nav-arrow {
        flex: 0 0 32px;
        width: 32px;
        height: 32px;
    }

    .ent-record-view-page .badge-id {
        min-width: 0;
        white-space: nowrap;
    }

    .ent-record-view-page .header-actions .btn-back {
        position: absolute;
        top: -38px;
        right: 14px;
        z-index: 2;
        width: min(44vw, 160px);
        min-height: 26px;
        padding: 4px 14px;
        border-radius: 0;
        font-size: 14px;
        line-height: 1.2;
        box-shadow: none;
        transform: none;
    }

    .ent-record-view-page .header-actions .record-completion-form {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        align-self: center;
        margin: 0;
        white-space: nowrap;
    }

    /* Compact vertical status switch: labels stay readable without narrowing ID. */
    .ent-record-view-page .record-completion-switch {
        display: grid;
        grid-template-columns: max-content 32px;
        grid-template-rows: 20px 20px;
        column-gap: 6px;
        row-gap: 2px;
        align-items: center;
    }

    .ent-record-view-page .record-completion-text {
        display: block;
        min-width: 0;
        line-height: 1;
    }

    .ent-record-view-page .record-completion-text strong {
        font-size: 11px;
    }

    .ent-record-view-page .record-completion-text--completed {
        grid-column: 1;
        grid-row: 1;
    }

    .ent-record-view-page .record-completion-text--progress {
        grid-column: 1;
        grid-row: 2;
    }

    .ent-record-view-page .record-completion-track {
        grid-column: 2;
        grid-row: 1 / span 2;
        width: 32px;
        height: 42px;
    }

    .ent-record-view-page .record-completion-thumb {
        top: 3px;
        left: 6px;
        transform: translateY(16px);
    }

    .ent-record-view-page .record-completion-form.is-completed .record-completion-thumb {
        transform: translateY(0);
    }

    .ent-record-view-page .header-actions .btn-edit {
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
        min-height: 46px;
        padding: 12px 14px;
        font-size: 15px;
        transform: none;
    }
}

/* ENTOMONE global mobile menu: right drawer with larger touch targets. */
@media (max-width: 768px) {
    body.ent-global-menu-open {
        overflow: hidden !important;
    }

    body.ent-global-menu-open::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 3900;
        background: rgba(8, 27, 19, 0.54);
    }

    .ent-global-header.is-menu-open .ent-global-menu,
    .ent-global-header .ent-global-menu {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        z-index: 4200 !important;
        display: flex !important;
        width: min(84vw, 360px) !important;
        max-width: 360px !important;
        height: 100svh !important;
        max-height: none !important;
        margin: 0 !important;
        padding: calc(18px + env(safe-area-inset-top, 0px)) 0 calc(18px + env(safe-area-inset-bottom, 0px)) !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #379b72 !important;
        box-shadow: -22px 0 44px rgba(5, 25, 17, 0.34) !important;
        transform: translateX(105%);
        transition: transform 0.2s ease;
    }

    .ent-global-header.is-menu-open .ent-global-menu {
        transform: translateX(0);
    }

    .ent-global-header:not(.is-menu-open) .ent-global-menu {
        pointer-events: none;
    }

    .ent-global-header.is-menu-open .ent-global-menu::before {
        content: "ENTOMONE";
        display: flex;
        min-height: 132px;
        padding: 22px 36px 20px;
        align-items: center;
        color: #ffffff;
        font-size: 32px;
        font-weight: 900;
        line-height: 1;
        letter-spacing: 0;
    }

    .ent-global-header .ent-global-menu > .ent-menu-group,
    .ent-global-header .ent-global-menu > .ent-menu-direct {
        width: 100% !important;
        border-top: 1px solid rgba(255, 255, 255, 0.24);
    }

    .ent-global-header .ent-global-menu > .ent-menu-group:last-child,
    .ent-global-header .ent-global-menu > .ent-menu-direct:last-child {
        border-bottom: 1px solid rgba(255, 255, 255, 0.24);
    }

    .ent-global-header .ent-global-menu .ent-menu-trigger,
    .ent-global-header .ent-global-menu .ent-menu-direct {
        min-height: 72px !important;
        width: 100% !important;
        padding: 0 30px 0 36px !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: #ffffff !important;
        justify-content: flex-start !important;
        font-size: 20px !important;
        font-weight: 900 !important;
        line-height: 1.15 !important;
        text-transform: uppercase;
        white-space: normal !important;
    }

    .ent-global-header .ent-global-menu .ent-menu-trigger:hover,
    .ent-global-header .ent-global-menu .ent-menu-trigger:focus,
    .ent-global-header .ent-global-menu .ent-menu-direct:hover,
    .ent-global-header .ent-global-menu .ent-menu-direct:focus,
    .ent-global-header .ent-global-menu .ent-menu-direct.is-active,
    .ent-global-header .ent-global-menu .ent-menu-group.is-open > .ent-menu-trigger {
        background: rgba(255, 255, 255, 0.09) !important;
        color: #ffffff !important;
    }

    .ent-global-header .ent-global-menu .ent-menu-trigger::after {
        margin-left: auto !important;
        border-left-width: 5px !important;
        border-right-width: 5px !important;
        border-top-width: 6px !important;
        opacity: 0.78;
    }

    .ent-global-header .ent-global-menu .ent-menu-trigger::before,
    .ent-global-header .ent-global-menu .ent-menu-direct::before {
        content: "";
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        margin-right: 18px;
        background: currentColor;
        opacity: 0.5;
        -webkit-mask: var(--ent-mobile-menu-icon) center / 30px 30px no-repeat;
        mask: var(--ent-mobile-menu-icon) center / 30px 30px no-repeat;
    }

    .ent-global-header .ent-global-menu > .ent-menu-group:nth-of-type(1) {
        --ent-mobile-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6c0-2 16-2 16 0v12c0 2-16 2-16 0V6zm0 0c0 2 16 2 16 0M4 12c0 2 16 2 16 0' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    }

    .ent-global-header .ent-global-menu > .ent-menu-group:nth-of-type(2) {
        --ent-mobile-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='5' width='16' height='14' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m7 16 4-4 3 3 2-2 3 3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='9' cy='9' r='1.5'/%3E%3C/svg%3E");
    }

    .ent-global-header .ent-global-menu > .ent-menu-group:nth-of-type(3) {
        --ent-mobile-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m14 6 4 4-8 8H6v-4l8-8zM15 5l4 4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }

    .ent-global-header .ent-global-menu > .ent-menu-group:nth-of-type(4) {
        --ent-mobile-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 19c8 0 14-6 14-14-8 0-14 6-14 14z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M5 19c4-5 8-8 14-14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    }

    .ent-global-header .ent-global-menu > .ent-menu-group-admin {
        --ent-mobile-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm0-5v3m0 12v3M4.9 4.9 7 7m10 10 2.1 2.1M3 12h3m12 0h3M4.9 19.1 7 17m10-10 2.1-2.1' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    }

    .ent-global-header .ent-global-menu > .ent-menu-group-user-mobile {
        --ent-mobile-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M4 21c1.5-5 14.5-5 16 0' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    }

    .ent-global-header .ent-global-menu > .ent-menu-group-data {
        --ent-mobile-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6c0-2 16-2 16 0v12c0 2-16 2-16 0V6zm0 0c0 2 16 2 16 0M4 12c0 2 16 2 16 0' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    }

    .ent-global-header .ent-global-menu > .ent-menu-group-galleries {
        --ent-mobile-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='5' width='16' height='14' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m7 16 4-4 3 3 2-2 3 3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='9' cy='9' r='1.5'/%3E%3C/svg%3E");
    }

    .ent-global-header .ent-global-menu > .ent-menu-group-tools {
        --ent-mobile-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m14 6 4 4-8 8H6v-4l8-8zM15 5l4 4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }

    .ent-global-header .ent-global-menu > .ent-menu-group-app {
        --ent-mobile-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 19c8 0 14-6 14-14-8 0-14 6-14 14z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M5 19c4-5 8-8 14-14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    }

    .ent-global-header .ent-global-menu > .ent-menu-direct[href="index.php"] {
        --ent-mobile-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 11 12 4l8 7v9H7v-6h10v6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }

    .ent-global-header .ent-global-menu > .ent-menu-direct[href="utm.php"] {
        --ent-mobile-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16v16H4zM4 9h16M4 15h16M9 4v16M15 4v16' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
    }

    .ent-global-header .ent-global-menu .ent-menu-dropdown,
    .ent-global-header .ent-global-menu .ent-menu-dropdown-right {
        position: static !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 0 10px 88px !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: rgba(12, 88, 62, 0.18) !important;
        box-shadow: none !important;
    }

    .ent-global-header .ent-global-menu .ent-menu-subdropdown {
        position: static !important;
        display: none !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 0 4px 18px !important;
        border: 0 !important;
        border-left: 1px solid rgba(255, 255, 255, 0.22) !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .ent-global-header .ent-global-menu .ent-menu-group.is-open > .ent-menu-dropdown {
        display: grid !important;
        gap: 0 !important;
    }

    .ent-global-header .ent-global-menu .ent-menu-subgroup:hover > .ent-menu-subdropdown,
    .ent-global-header .ent-global-menu .ent-menu-subgroup:focus-within > .ent-menu-subdropdown {
        display: grid !important;
        gap: 0 !important;
    }

    .ent-global-header .ent-global-menu .ent-menu-link,
    .ent-global-header .ent-global-menu .ent-menu-note,
    .ent-global-header .ent-global-menu .ent-menu-user-label {
        min-height: 38px !important;
        padding: 5px 22px 5px 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        align-items: center !important;
        background: transparent !important;
        color: rgba(255, 255, 255, 0.92) !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        line-height: 1.12 !important;
        text-decoration: none !important;
        text-transform: uppercase;
    }

    .ent-global-header .ent-global-menu .ent-menu-subdropdown .ent-menu-link {
        min-height: 34px !important;
        padding-left: 0 !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        color: rgba(255, 255, 255, 0.88) !important;
    }

    .ent-global-header .ent-global-menu .ent-menu-link:hover,
    .ent-global-header .ent-global-menu .ent-menu-link:focus,
    .ent-global-header .ent-global-menu .ent-menu-link.is-active {
        color: #ffffff !important;
        text-decoration: underline;
        text-underline-offset: 4px;
    }
}
/* OBSZARY / Regions ------------------------------------------------------- */
.ent-regions-page{background:#f4f6f3;color:#1c2925}.ent-regions-shell{width:min(1500px,calc(100% - 32px));margin:24px auto 56px}.ent-regions-header{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:18px}.ent-regions-header h1{font-size:clamp(30px,4vw,48px);line-height:1;margin:0;letter-spacing:0}.ent-regions-kicker{margin:0 0 7px;color:#697872;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:0}.ent-region-active-status{display:grid;grid-template-columns:auto auto;gap:3px 14px;align-items:center;border-left:3px solid #b43a2f;padding:5px 0 5px 15px}.ent-region-active-status span{font-size:12px;color:#697872}.ent-region-active-status strong{grid-column:1;font-size:17px}.ent-region-active-status a{grid-column:2;grid-row:1/3;color:#8d2c24;font-weight:700}.ent-region-notice{padding:11px 14px;margin-bottom:14px;border:1px solid}.ent-region-notice.is-success{background:#eaf4ed;border-color:#91b29a}.ent-region-notice.is-error{background:#fff0ee;border-color:#d79187}.ent-regions-workspace{display:grid;grid-template-columns:minmax(0,1fr) 350px;min-height:560px;border:1px solid #ccd3ce;background:#fff}.ent-region-map-panel{position:relative;min-width:0}.ent-region-map{height:100%;min-height:560px;background:#dce2df}.ent-region-map.is-drawing{cursor:crosshair}.ent-region-map-tools{position:absolute;z-index:500;left:12px;top:12px;display:flex;gap:6px}.ent-region-icon-button{width:38px;height:38px;border:1px solid #aeb8b2;background:#fff;color:#263832;font-size:22px;line-height:1;box-shadow:0 2px 8px rgba(24,42,35,.14);cursor:pointer}.ent-region-sidebar{border-left:1px solid #ccd3ce;background:#f8faf8;padding:18px;overflow:auto}.ent-region-create summary{font-size:18px;font-weight:750;cursor:pointer;margin-bottom:16px}.ent-region-create label{display:grid;gap:6px;margin:0 0 13px;font-size:13px;font-weight:700}.ent-region-create input,.ent-region-create textarea{width:100%;box-sizing:border-box;border:1px solid #aeb8b2;background:#fff;padding:10px;font:inherit}.ent-region-format-note{font-size:12px;color:#52615c;margin:0 0 14px}.ent-region-format-note span{display:block;color:#8b625c;margin-top:4px}.ent-region-primary,.ent-region-row button,.ent-region-library-heading button{border:1px solid #263832;background:#263832;color:#fff;padding:9px 13px;font-weight:700;cursor:pointer}.ent-region-recent{border-top:1px solid #ccd3ce;margin-top:22px;padding-top:16px}.ent-region-recent h2,.ent-region-library h2,.ent-region-roadmap h2{font-size:17px;margin:0 0 12px}.ent-region-recent form{display:inline}.ent-region-recent button{border:0;background:transparent;color:#8d2c24;padding:5px 8px 5px 0;text-align:left;cursor:pointer}.ent-region-library{margin-top:24px}.ent-region-library-heading{display:flex;justify-content:space-between;align-items:center}.ent-region-list{border-top:1px solid #bfc8c2}.ent-region-row{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:24px;align-items:center;padding:14px 10px;border-bottom:1px solid #d8ded9}.ent-region-row.is-active{background:#edf4ef;border-left:3px solid #47725c}.ent-region-row h3{margin:0 0 3px;font-size:16px}.ent-region-row p{margin:0;color:#68756f;font-size:13px}.ent-region-row>span{font-size:12px;color:#68756f}.ent-region-row button:disabled{background:#718078;border-color:#718078;cursor:default}.ent-region-roadmap{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;margin-top:26px;padding-top:18px;border-top:1px solid #ccd3ce}.ent-region-roadmap h2{margin:0 12px 0 0}.ent-region-roadmap span{font-size:12px;color:#52615c}.ent-region-roadmap strong{font-size:11px;text-transform:uppercase;color:#8d2c24}.ent-active-region-strip{width:min(1500px,calc(100% - 32px));box-sizing:border-box;margin:18px auto -2px;padding:8px 12px;background:#fff3e5;border-left:3px solid #b43a2f;display:flex;gap:8px;align-items:center;font-size:13px}.ent-active-region-strip a{margin-left:auto;color:#8d2c24;font-weight:700}
@media(max-width:800px){.ent-regions-shell{width:min(100% - 20px,1500px);margin-top:14px}.ent-regions-header{align-items:start;flex-direction:column}.ent-region-active-status{width:100%;box-sizing:border-box}.ent-regions-workspace{grid-template-columns:1fr}.ent-region-map{min-height:50vh;height:50vh}.ent-region-sidebar{border-left:0;border-top:1px solid #ccd3ce}.ent-region-row{grid-template-columns:1fr}.ent-region-row>span{margin-top:-17px}.ent-region-row form{justify-self:start}.ent-active-region-strip{width:calc(100% - 20px);margin-top:12px;flex-wrap:wrap}}
/* Notatnik terenowy: wymuszona kolejność po odbiorze mobilnym 2026-07-29. */
.ent-record-add-field-page .ent-field-notebook-review {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 64px !important;
    grid-template-rows: minmax(210px, 42vh) 60px minmax(132px, auto) 58px !important;
    gap: 8px !important;
    overflow-y: auto !important;
}
.ent-record-add-field-page .ent-field-notebook-photo { grid-column: 1 / -1; grid-row: 1; }
.ent-record-add-field-page .ent-field-notebook-photo-controls { grid-column: 1 / -1; grid-row: 2; }
.ent-record-add-field-page .ent-field-notebook-notes { grid-column: 1; grid-row: 3; }
.ent-record-add-field-page .ent-field-notebook-review-actions {
    grid-column: 2 !important;
    grid-row: 3 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 64px 64px !important;
    gap: 8px !important;
    align-content: start !important;
}
.ent-record-add-field-page .ent-field-notebook-review-actions .ent-field-notebook-secondary {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
}
.ent-record-add-field-page .ent-field-notebook-cancel-row {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 14px !important;
    min-height: 58px !important;
}
.ent-record-add-field-page .ent-field-notebook-cancel-link,
.ent-record-add-field-page .ent-field-notebook-cancel-row #fqSaveBtn {
    grid-column: auto !important;
    min-height: 44px !important;
    padding: 0 9px !important;
    font-size: 17px !important;
}
/* Regions map control layout: keep drawing tools clear of Leaflet controls. */
.ent-regions-page .ent-region-map-tools{top:auto;bottom:22px;left:12px;gap:0;z-index:600;border:1px solid #aeb8b2;background:#fff;box-shadow:0 2px 8px rgba(24,42,35,.18)}
.ent-regions-page .ent-region-icon-button{width:34px;height:34px;border:0;border-right:1px solid #0f568f;background:#1769aa;color:#fff;box-shadow:none;font-size:19px}
.ent-regions-page .ent-region-icon-button:last-child{border-right:0}
.ent-regions-page .ent-region-icon-button:not(:disabled):hover{background:#12598f}
.ent-regions-page .ent-region-icon-button:focus-visible{position:relative;z-index:2;outline:3px solid #f0a64a;outline-offset:-3px}
.ent-regions-page .ent-region-icon-button:disabled{color:#718da3;background:#dbe8f2;cursor:default}
.ent-regions-page .ent-region-icon-button.is-active{color:#fff;background:#093f69}
.ent-regions-page .ent-region-icon-button.is-active:not(:disabled):hover{background:#093f69}
.ent-regions-page .ent-region-icon-button[data-tooltip]{position:relative}
.ent-regions-page .ent-region-icon-button[data-tooltip]::after{content:attr(data-tooltip);position:absolute;z-index:1000;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%);width:max-content;max-width:210px;padding:6px 8px;border-radius:3px;background:#263832;color:#fff;font-size:12px;font-weight:600;line-height:1.25;text-align:left;white-space:normal;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .12s ease}
.ent-regions-page .ent-region-icon-button[data-tooltip]:hover::after,.ent-regions-page .ent-region-icon-button[data-tooltip]:focus-visible::after{opacity:1;visibility:visible}
.ent-regions-page .ent-region-icon-button[data-tooltip]:first-child::after{left:0;transform:none}
.ent-regions-page .ent-region-icon-button[data-tooltip]:last-child::after{right:0;left:auto;transform:none}
.ent-regions-page .ent-region-map-panel:fullscreen{width:100vw;height:100vh;background:#fff}
.ent-regions-page .ent-region-map-panel:fullscreen .ent-region-map{width:100%;height:100vh;min-height:100vh}
.ent-regions-page .ent-region-map-panel:fullscreen .ent-region-map-tools{bottom:28px}
/* Regions polygon drawing: visible cursor guide and magnetic closing zone. */
.ent-regions-page .ent-region-draft-line{stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.ent-regions-page .ent-region-snap-zone{transition:fill-opacity .12s ease,stroke-width .12s ease}
.ent-regions-page .ent-region-map.is-snap-ready{cursor:pointer}
/* Existing boundary editor: draggable vertices and click-to-insert midpoints. */
.ent-regions-page .ent-region-vertex-icon,.ent-regions-page .ent-region-midpoint-icon{background:transparent;border:0}
.ent-regions-page .ent-region-vertex-icon span,.ent-regions-page .ent-region-midpoint-icon span{display:block;box-sizing:border-box;border:2px solid #fff;box-shadow:0 1px 4px rgba(25,38,33,.45)}
.ent-regions-page .ent-region-vertex-icon span{width:16px;height:16px;background:#b43a2f;border-radius:50%;cursor:move}
.ent-regions-page .ent-region-midpoint-icon span{width:12px;height:12px;margin:0;background:#f0a64a;border-radius:2px;cursor:copy}
.ent-regions-page .ent-region-vertex-icon.is-selected span{background:#263832;outline:3px solid rgba(240,166,74,.7)}
.ent-regions-page .ent-region-map.is-vertex-editing .leaflet-interactive{cursor:default}
/* Regions resize handle stays in the normal map view; fullscreen owns height. */
.ent-regions-page .ent-region-map-panel:fullscreen .ent-region-map{height:100vh!important;max-height:none}
.ent-regions-page .ent-region-map-panel:fullscreen .ent-map-resize-handle{display:none}
/* Regions edit workflow and versioned boundary actions. */
.ent-region-active-actions{grid-column:2;grid-row:1/3;display:flex;gap:10px;align-items:center}
.ent-region-active-actions a,.ent-region-row-actions>a,.ent-region-form-actions>a{color:#8d2c24;font-weight:700}
.ent-region-version-label{margin:0 0 12px;font-size:12px;color:#52615c}
.ent-region-import-status{margin:-3px 0 13px;padding:8px 10px;border-left:3px solid #1769aa;background:#e9f3fa;color:#163d59;font-size:12px;line-height:1.35}
.ent-region-import-status.is-error{border-left-color:#b43a2f;background:#fff0ee;color:#76261f}
.ent-region-import-status[hidden]{display:none}
.ent-region-layer-choice{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end;margin:0 0 13px}.ent-region-layer-choice[hidden]{display:none}.ent-region-layer-choice label{margin:0}.ent-region-layer-choice select{width:100%;box-sizing:border-box;border:1px solid #aeb8b2;background:#fff;padding:9px;font:inherit}.ent-region-secondary{border:1px solid #1769aa;background:#1769aa;color:#fff;padding:9px 12px;font-weight:700;cursor:pointer}.ent-region-secondary:disabled{opacity:.55;cursor:wait}.ent-region-source-search{border-top:1px solid #ccd3ce;margin-top:18px;padding-top:16px}.ent-region-source-search h3{font-size:15px;margin:0 0 10px}.ent-region-source-tabs{display:grid;grid-template-columns:1fr 1fr;margin-bottom:9px}.ent-region-source-tabs button{border:1px solid #9db1be;background:#fff;color:#21465e;padding:8px;font-weight:700;cursor:pointer}.ent-region-source-tabs button+button{border-left:0}.ent-region-source-tabs button.is-active{background:#1769aa;color:#fff}.ent-region-source-query{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.ent-region-source-query input{min-width:0}.ent-region-source-status{min-height:17px;margin:8px 0 0;color:#52615c;font-size:12px}.ent-region-source-status.is-error{color:#9a2f25}.ent-region-source-results{max-height:310px;overflow:auto;border-top:1px solid #d8ded9}.ent-region-source-result{padding:10px 0;border-bottom:1px solid #d8ded9}.ent-region-source-result h4{font-size:13px;margin:0 0 3px}.ent-region-source-result p{margin:0 0 4px;color:#52615c;font-size:11px;line-height:1.35}.ent-region-source-result>span{display:block;color:#68756f;font-size:10px}.ent-region-source-result>div{display:flex;gap:6px;margin-top:7px}.ent-region-source-result button{border:1px solid #1769aa;background:#fff;color:#1769aa;padding:5px 8px;font-size:11px;font-weight:700;cursor:pointer}.ent-region-source-result button.ent-region-source-use{background:#1769aa;color:#fff}.ent-region-source-result strong{color:#8d2c24;font-size:11px}.ent-region-source-attribution{margin:8px 0 0;color:#68756f;font-size:10px;line-height:1.3}
.ent-region-form-actions,.ent-region-row-actions{display:flex;align-items:center;gap:10px}
.ent-region-row-actions form{margin:0}
.ent-region-row-actions button,.ent-region-row-actions>a,.ent-region-delete-form button{border-radius:4px}
.ent-region-row h3{font-size:13px}
.ent-region-delete-form{margin:14px 0 0;padding-top:14px;border-top:1px solid #d8ded9}
.ent-regions-page button.ent-region-danger{border:1px solid #a72f29;background:#b63831;color:#fff;padding:8px 12px;font-weight:700;cursor:pointer}
.ent-regions-page button.ent-region-danger:hover,.ent-regions-page button.ent-region-danger:focus-visible{background:#94251f;border-color:#94251f}
.ent-regions-page .ent-region-row-actions button,.ent-regions-page .ent-region-row-actions>a{padding:6px 9px;font-size:12px;font-weight:400;line-height:1.2}
@media(max-width:800px){.ent-region-row-actions{justify-self:start}.ent-region-active-actions{justify-self:end;flex-direction:column;align-items:flex-end;gap:3px}}

/* Records CSV export confirmation. */
.records-csv-export-modal{position:fixed;z-index:20000;inset:0;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(20,33,28,.48)}
.records-csv-export-modal.is-hidden{display:none}
.records-csv-export-modal-card{width:min(100%,480px);box-sizing:border-box;padding:24px;background:#fff;border:1px solid #bfc8c2;border-radius:8px;box-shadow:0 18px 48px rgba(20,33,28,.28)}
.records-csv-export-modal-title{margin:0 0 10px;color:#173a32;font-size:22px;line-height:1.2}
.records-csv-export-modal-text{margin:0 0 18px;color:#3d4e48;font-size:15px;line-height:1.5}
.records-csv-export-modal-label{display:block;margin:0 0 6px;color:#263832;font-size:14px;font-weight:700}

/* ENTOMONE regions custom file input i18n */
.ent-regions-page .ent-region-file-label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
}

.ent-regions-page .ent-region-file-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    margin: 0 0 13px;
}

.ent-regions-page .ent-region-file-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ent-regions-page .ent-region-file-button {
    white-space: nowrap;
}

.ent-regions-page .ent-region-file-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #263832;
    font-size: 13px;
    font-weight: 650;
}
.records-csv-export-modal-input{width:100%;box-sizing:border-box;min-height:42px;padding:9px 10px;border:1px solid #82918a;border-radius:4px;background:#fff;color:#1c2925;font:inherit}
.records-csv-export-modal-input:focus{outline:3px solid rgba(23,105,170,.28);outline-offset:1px;border-color:#1769aa}
.records-csv-export-modal-hint{margin:7px 0 20px;color:#62716b;font-size:13px;line-height:1.4}
.records-csv-export-modal-actions{display:flex;justify-content:flex-end;gap:10px}
.records-csv-export-cancel-btn,.records-csv-export-confirm-btn{min-width:88px;min-height:40px;padding:8px 14px;border:1px solid;font:inherit;font-weight:700;cursor:pointer}
.records-csv-export-cancel-btn{border-color:#89958f;background:#fff;color:#263832}
.records-csv-export-confirm-btn{border-color:#1769aa;background:#1769aa;color:#fff}
.records-csv-export-cancel-btn:hover{background:#f1f4f2}
.records-csv-export-confirm-btn:hover:not(:disabled){background:#12598f}
.records-csv-export-confirm-btn:disabled{background:#8faec5;border-color:#8faec5;cursor:default}
@media(max-width:480px){.records-csv-export-modal{align-items:flex-end;padding:10px}.records-csv-export-modal-card{padding:20px}.records-csv-export-modal-actions{flex-direction:column-reverse}.records-csv-export-cancel-btn,.records-csv-export-confirm-btn{width:100%}}

/* Optional media cleanup when moving a record to trash. */
.record-delete-media-option{display:inline-flex;align-items:center;gap:7px;max-width:260px;color:#7a1f1f;font-size:13px;font-weight:700;line-height:1.3}
.record-delete-media-option input{width:17px;height:17px;accent-color:#b42318}
@media(max-width:700px){.record-delete-media-option{max-width:none;padding:7px 0}}

/* ENTOMONE brand correction after production review (2026-07-27) */
.ent-global-brand-mark {
    flex: 0 0 30px !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #eff3f1 !important;
    border-radius: 50% !important;
}

.ent-global-brand-mark img,
.ent-global-dashboard-link img,
.ent-start-brand-symbol,
.ent-auth-logo,
.ent-home-hero-logo,
.ent-home-brand img {
    max-width: 100% !important;
    height: auto;
}

.ent-global-brand-mark img {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    object-fit: contain !important;
}

.ent-start-brand-symbol {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: contain !important;
    margin: 0 auto 6px !important;
}

body.ent-rejestrator-page .ent-start-brand-symbol {
    width: 38px !important;
    height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
}

@media (max-width: 768px) {
    .ent-global-brand-mark {
        flex-basis: 32px !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
    }

    .ent-global-brand-mark img {
        width: 32px !important;
        height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
    }
}
/* ENTOMONE mobile rescue after logo review (2026-07-27) */
.ent-start-brand-symbol {
    display: none !important;
}

@media (max-width: 768px) {
    .ent-global-header.is-menu-open .ent-global-menu::before {
        content: "" !important;
        display: block !important;
        min-height: 116px !important;
        padding: 0 !important;
        background: #ffffff url("brand/entomone-logo-menu.png?v=2026-07-27-brand3") 28px center / calc(100% - 56px) auto no-repeat !important;
    }
}
/* ENTOMONE mobile rescue: restore compact header brand (2026-07-27) */
.ent-global-brand-mark {
    display: inline-grid !important;
    place-items: center !important;
    flex: 0 0 30px !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 5px !important;
    background: #1f6f58 !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}

.ent-global-brand-mark img,
.ent-start-brand-symbol {
    display: none !important;
}

/* ENTOMONE mobile header action spacing after logo rollback (2026-07-27) */
@media (max-width: 768px) {
    .ent-global-header,
    .ent-global-header .ent-global-inner {
        box-sizing: border-box;
        max-width: 100%;
    }

    .ent-global-header .ent-global-inner {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        min-height: 58px !important;
        padding: 6px 10px !important;
        flex-wrap: nowrap !important;
    }

    .ent-global-header .ent-global-brand {
        flex: 0 0 38px !important;
        min-width: 38px !important;
        width: 38px !important;
        margin: 0 !important;
    }

    .ent-global-header .ent-global-actions {
        display: flex !important;
        flex: 1 1 auto !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        min-width: 0 !important;
        margin: 0 !important;
        order: 2 !important;
    }

    body.ent-start-page .ent-global-header .ent-global-recorder-link,
    body.ent-rejestrator-page .ent-global-header .ent-global-dashboard-link {
        display: inline-grid !important;
        flex: 0 0 44px !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        place-items: center !important;
        margin: 0 !important;
    }

    body.ent-start-page .ent-global-header .ent-global-recorder-link,
    body.ent-rejestrator-page .ent-global-header .ent-global-dashboard-link {
        transform: translateX(-16px) !important;
    }

    .ent-global-header .ent-global-upload {
        flex: 0 1 auto !important;
        min-height: 40px !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }

    body.ent-start-page:not(.ent-rejestrator-page) .ent-global-header .ent-global-upload {
        padding-right: 20px !important;
        padding-left: 20px !important;
    }

    body.ent-rejestrator-page .ent-global-header .ent-global-upload {
        padding-right: 12px !important;
        padding-left: 12px !important;
    }

    .ent-global-header .ent-global-menu-toggle {
        flex: 0 0 auto !important;
        margin: 0 !important;
        order: 3 !important;
    }
}
.ent-record-add-field-page .ent-field-notebook-trip-copy {
    display: grid;
    gap: 4px;
    margin: 10px 12px 0;
    padding: 10px 12px;
    min-height: 0;
    align-content: start;
    border: 1px solid #6eb994;
    border-radius: 6px;
    background: #eef9f2;
    color: #174f35;
    font-size: 13px;
}
.ent-record-add-field-page .ent-field-notebook-trip-copy small { color: #315f49; font-size: 12px; }
.ent-record-add-field-page .ent-field-notebook-trip-copy a { color: #176b45; font-weight: 600; text-decoration: underline; }

/* Notatnik: koncowy override przycisku aparatu i Alertu. */
.ent-record-add-field-page .ent-field-notebook-photo-controls #fqAddPhotoBtn {
    width: 100% !important;
    height: 42px !important;
    min-width: 0 !important;
    min-height: 42px !important;
    border-radius: 999px !important;
    padding: 0 14px !important;
}
.ent-record-add-field-page .ent-field-notebook-photo-controls #fqAddPhotoBtn svg {
    width: 22px !important;
    height: 22px !important;
}
.ent-record-add-field-page .ent-field-notebook-photo-controls #fqAddPhotoBtn span {
    display: inline !important;
}
.ent-record-add-field-page .ent-field-notebook-photo-controls #fqRemovePhotoBtn svg {
    width: 22px !important;
    height: 22px !important;
}
.ent-record-add-field-page .ent-field-notebook-photo-controls #fqRemovePhotoBtn {
    width: 100% !important;
}
.ent-record-add-field-page .ent-field-notebook-photo-controls #fqPhotoCount[hidden] {
    display: flex !important;
    visibility: hidden;
}
.ent-record-add-field-page .ent-field-notebook-review-actions .ent-field-notebook-alert {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    justify-self: center;
}
.ent-record-add-field-page .ent-trip-copy-upload-form { display: grid; gap: 16px; max-width: 560px; margin: 22px auto; padding: 20px; border: 1px solid #c7d9cf; border-radius: 8px; background: #fff; align-self: start; align-content: start; }
.ent-record-add-field-page .ent-trip-copy-upload-field { display: grid; gap: 7px; color: #1d3e2e; font-size: 15px; font-weight: 600; }
.ent-record-add-field-page .ent-trip-copy-upload-field input,
.ent-record-add-field-page .ent-trip-copy-upload-field textarea { width: 100%; padding: 11px 12px; border: 1px solid #9eb9aa; border-radius: 5px; background: #fff; color: #1f2933; font: inherit; font-weight: 400; }
.ent-record-add-field-page .ent-trip-copy-upload-field input[type="file"] { padding: 9px; }
.ent-record-add-field-page .ent-trip-copy-upload-field small { color: #567263; font-size: 12px; font-weight: 400; }
.ent-record-add-field-page .ent-trip-copy-upload-overlay { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 24px; background: rgba(14, 33, 24, .78); }
.ent-record-add-field-page .ent-trip-copy-upload-overlay[hidden] { display: none; }
.ent-record-add-field-page .ent-trip-copy-upload-dialog { width: min(100%, 480px); padding: 28px 24px; border: 1px solid #a8c8b6; border-radius: 8px; background: #fff; color: #173b2a; text-align: center; box-shadow: 0 18px 48px rgba(0, 0, 0, .28); }
.ent-record-add-field-page .ent-trip-copy-upload-dialog h2 { margin: 0 0 16px; font-size: 24px; line-height: 1.2; }
.ent-record-add-field-page .ent-trip-copy-upload-status { margin: 0; font-size: 17px; line-height: 1.45; }
.ent-record-add-field-page .ent-trip-copy-upload-spinner { width: 42px; height: 42px; margin: 0 auto 18px; border: 4px solid #c1d9ca; border-top-color: #1f7a50; border-radius: 50%; animation: ent-trip-copy-spin .8s linear infinite; }
.ent-record-add-field-page .ent-trip-copy-upload-overlay.is-success .ent-trip-copy-upload-spinner,
.ent-record-add-field-page .ent-trip-copy-upload-overlay.is-warning .ent-trip-copy-upload-spinner,
.ent-record-add-field-page .ent-trip-copy-upload-overlay.is-error .ent-trip-copy-upload-spinner { display: none; }
.ent-record-add-field-page .ent-trip-copy-upload-progress { height: 12px; margin-top: 22px; overflow: hidden; border-radius: 6px; background: #dbe9e0; }
.ent-record-add-field-page .ent-trip-copy-upload-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: #278257; transition: width .2s ease; }
.ent-record-add-field-page .ent-trip-copy-upload-progress.is-indeterminate span { width: 42%; animation: ent-trip-copy-progress 1.1s ease-in-out infinite; }
.ent-record-add-field-page .ent-trip-copy-upload-result-actions { display: grid; gap: 10px; margin-top: 24px; }
.ent-record-add-field-page .ent-trip-copy-upload-result-actions a,
.ent-record-add-field-page .ent-trip-copy-upload-result-actions button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; border: 1px solid #1f7a50; border-radius: 5px; background: #278257; color: #fff; font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; }
.ent-record-add-field-page .ent-trip-copy-upload-result-actions a { background: #fff; color: #1f704a; }
.ent-record-add-field-page .ent-trip-copy-upload-overlay.is-error .ent-trip-copy-upload-dialog { border-color: #d68b8b; }
.ent-record-add-field-page .ent-trip-copy-upload-overlay.is-error .ent-trip-copy-upload-spinner { border-color: #f0cccc; border-top-color: #a63838; animation: none; }
.ent-record-add-field-page .ent-trip-copy-upload-overlay.is-warning .ent-trip-copy-upload-dialog { border-color: #d9b46a; }
@keyframes ent-trip-copy-spin { to { transform: rotate(360deg); } }
@keyframes ent-trip-copy-progress { 0% { transform: translateX(-115%); } 100% { transform: translateX(270%); } }
.ent-record-add-field-page .ent-trip-copy-upload-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 4px; }
.ent-record-add-field-page .ent-trip-copy-upload-actions a { color: #4d5f56; font-size: 14px; text-decoration: underline; }
.ent-record-add-field-page .ent-trip-copy-upload-actions button { min-height: 44px; padding: 9px 18px; border: 1px solid #1f7a50; border-radius: 5px; background: #278257; color: #fff; font: inherit; font-weight: 500; cursor: pointer; }
.ent-record-add-field-page .ent-trip-copy-upload-actions button:hover,
.ent-record-add-field-page .ent-trip-copy-upload-actions button:focus-visible { background: #1f704a; }
@media (max-width: 480px) { .ent-record-add-field-page .ent-trip-copy-upload-form { margin: 14px 10px; padding: 16px; } }

/* Field Notebook review: match note controls from the Recorder start screen. */
@media (max-width: 900px) {
    .ent-record-add-field-page .ent-field-notebook-review {
        grid-template-columns: minmax(0, 1fr) 56px !important;
        grid-template-rows: minmax(210px, 42vh) 60px minmax(132px, auto) 44px !important;
    }

    .ent-record-add-field-page .ent-field-notebook-review-actions {
        grid-template-rows: 52px 52px !important;
    }

    .ent-record-add-field-page .ent-field-notebook-review-actions .ent-field-notebook-secondary,
    .ent-record-add-field-page .ent-field-notebook-review-actions .ent-field-notebook-alert {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;
        border: 0 !important;
        border-radius: 8px !important;
        justify-self: center;
    }

    .ent-record-add-field-page .ent-field-notebook-review-actions .ent-field-notebook-secondary svg {
        width: 28px !important;
        height: 28px !important;
        stroke-width: 1.9;
    }

    .ent-record-add-field-page .ent-field-notebook-cancel-row {
        min-height: 44px !important;
    }

    .ent-record-add-field-page .ent-field-notebook-cancel-link,
    .ent-record-add-field-page .ent-field-notebook-cancel-row #fqSaveBtn {
        grid-column: auto !important;
        height: 44px !important;
        min-height: 44px !important;
        padding: 9px 14px !important;
        border-radius: 6px !important;
        font-size: 16px !important;
        font-weight: 500 !important;
    }

    .ent-record-add-field-page .ent-field-notebook-cancel-link {
        border-color: #94a3b8 !important;
        background: #ffffff !important;
        color: #24332c !important;
    }

    .ent-record-add-field-page .ent-field-notebook-cancel-row #fqSaveBtn {
        border: 1px solid #278457 !important;
        background: #278457 !important;
        color: #ffffff !important;
    }

    .ent-record-add-field-page .ent-field-notebook-cancel-row #fqSaveBtn svg {
        display: none !important;
    }
}

/* Pola dodatkowe rekordow: wspolny pasek zakladek Ustawien (uzywany przez
   user_panel.php i dataset_record_fields.php) oraz wyglad zakladki zarzadzania
   i karty rekordu. Autor: [CC] | Utworzony: 2026-08-03 */
.ent-settings-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 16px 0;
    border-bottom: 1px solid #e5edf5;
    padding-bottom: 10px;
}

.ent-settings-tabs .tab {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 7px;
    background: #f3f6f8;
    color: #243447;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.ent-settings-tabs .tab:hover {
    background: #e7eef4;
}

.ent-settings-tabs .tab.active {
    background: #1976d2;
    color: #ffffff;
}

.ent-custom-fields-settings-page main.ent-custom-fields-settings {
    max-width: 980px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

.ent-custom-fields-settings .ent-custom-fields-empty {
    color: #556170;
    font-size: 14px;
}

.ent-custom-fields-settings .ent-custom-fields-dataset-name {
    font-weight: 700;
    color: #243447;
    margin: 0 0 14px;
}

.ent-custom-fields-planning-note {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid #bfd8ee;
    border-radius: 10px;
    background: #f4f9fd;
    color: #29445a;
}

.ent-custom-fields-planning-note h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

.ent-custom-fields-planning-note p {
    margin: 0 0 8px;
    line-height: 1.45;
}

.ent-custom-fields-planning-note a {
    color: #1f6fa8;
    font-weight: 700;
}

.ent-custom-fields-create-card {
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0 0 20px;
    background: transparent;
}

.ent-custom-fields-create-card > summary {
    cursor: pointer;
    list-style: none;
}

.ent-custom-fields-create-card > summary::-webkit-details-marker {
    display: none;
}

.ent-custom-fields-create-card[open] > .ent-custom-fields-form {
    margin-top: 14px;
}

body.ent-custom-fields-modal-open {
    overflow: hidden;
}

.ent-custom-fields-edit-row[hidden] {
    display: none !important;
}

.ent-custom-fields-create-card[open],
.ent-custom-fields-edit-row:not([hidden]) {
    position: fixed;
    z-index: 10020;
    inset: 0;
    display: block !important;
    margin: 0;
    padding: 20px 16px;
    overflow-y: auto;
    background: rgba(15, 23, 42, .56);
}

.ent-custom-fields-create-card[open] > summary {
    display: none;
}

.ent-custom-fields-create-card[open] > .ent-custom-fields-form,
.ent-custom-fields-edit-row:not([hidden]) > td {
    display: block;
    width: min(720px, 100%);
    box-sizing: border-box;
    margin: 36px auto;
    padding: 22px;
    border: 1px solid #d9e2ec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .28);
}

.ent-custom-fields-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 18px;
}

.ent-custom-fields-modal-header h3 {
    margin: 0;
    color: #243447;
    font-size: 20px;
}

.ent-custom-fields-modal-close {
    width: 36px;
    min-height: 36px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    background: #ffffff;
    color: #334155;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.ent-custom-fields-modal-close:hover,
.ent-custom-fields-modal-close:focus-visible {
    background: #eef2f7;
}

.ent-custom-fields-settings .ent-custom-fields-new-field-toggle,
.ent-custom-fields-settings .ent-custom-fields-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.ent-custom-fields-settings .ent-custom-fields-new-field-toggle,
.ent-custom-fields-settings .ent-custom-fields-action-edit {
    background: #3498db;
    border-color: #2980b9;
}

.ent-custom-fields-settings .ent-custom-fields-new-field-toggle:hover,
.ent-custom-fields-settings .ent-custom-fields-action-edit:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.ent-custom-fields-settings .ent-custom-fields-action-deactivate {
    background: #e74c3c;
    border-color: #c0392b;
}

.ent-custom-fields-settings .ent-custom-fields-action-deactivate:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.ent-custom-fields-settings .ent-custom-fields-action-cancel-delete {
    background: #64748b;
    border-color: #475569;
    color: #ffffff;
}

.ent-custom-fields-settings .ent-custom-fields-action-cancel-delete:hover {
    background: #475569;
    border-color: #334155;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Permanent deletion stays clearly visible and distinct from deactivation. */
.ent-custom-fields-settings .ent-custom-fields-action-delete {
    background: #b91c1c;
    border-color: #991b1b;
    color: #ffffff;
}

.ent-custom-fields-settings .ent-custom-fields-action-delete:hover {
    background: #991b1b;
    border-color: #7f1d1d;
    color: #ffffff;
    transform: translateY(-1px);
}

.ent-custom-fields-settings .ent-custom-fields-action-activate {
    background: #27ae60;
    border-color: #229954;
}

.ent-custom-fields-settings .ent-custom-fields-action-activate:hover {
    background: #229954;
    transform: translateY(-1px);
}

.ent-custom-fields-settings .ent-custom-fields-new-field-toggle:focus-visible,
.ent-custom-fields-settings .ent-custom-fields-actions .btn:focus-visible {
    outline: 3px solid rgba(52, 152, 219, .4);
    outline-offset: 2px;
}

/* Form submits use the same visible primary action as the rest of this screen. */
.ent-custom-fields-form button.btn-success[type="submit"] {
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid #2980b9;
    border-radius: 6px;
    background: #3498db;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.ent-custom-fields-form button.btn-success[type="submit"]:hover,
.ent-custom-fields-form button.btn-success[type="submit"]:focus-visible {
    border-color: #1f6fa8;
    background: #2980b9;
    color: #ffffff;
}

.ent-custom-fields-form .ent-custom-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px 16px;
    margin-bottom: 14px;
}

.ent-custom-fields-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #364152;
}

.ent-custom-fields-form label.ent-custom-fields-wide {
    grid-column: 1 / -1;
}

.ent-custom-fields-form input[type="text"],
.ent-custom-fields-form input[type="number"],
.ent-custom-fields-form input[type="url"],
.ent-custom-fields-form input[type="email"],
.ent-custom-fields-form input:not([type]),
.ent-custom-fields-form select,
.ent-custom-fields-form textarea {
    font-weight: 400;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.ent-custom-fields-type-field {
    position: relative;
}

.ent-custom-fields-label-export-field {
    position: relative;
}

.ent-custom-fields-type-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ent-custom-fields-label-export-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ent-custom-fields-type-row select {
    flex: 1;
}

.ent-custom-fields-label-export-row select {
    flex: 1;
}

.ent-custom-fields-type-info {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #94a3b8;
    background: #ffffff;
    color: #364152;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
}

.ent-custom-fields-label-export-info {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #94a3b8;
    background: #ffffff;
    color: #364152;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
}

.ent-custom-fields-type-info:hover,
.ent-custom-fields-type-info:focus-visible {
    background: #eef2f7;
}

.ent-custom-fields-label-export-info:hover,
.ent-custom-fields-label-export-info:focus-visible {
    background: #eef2f7;
}

.ent-custom-fields-type-popover {
    position: absolute;
    z-index: 5;
    top: 100%;
    left: 0;
    margin-top: 4px;
    max-width: 320px;
    background: #243447;
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.ent-custom-fields-label-export-popover {
    position: absolute;
    z-index: 5;
    top: 100%;
    left: 0;
    margin-top: 4px;
    max-width: 360px;
    background: #243447;
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.ent-custom-fields-options {
    border-top: 1px dashed #e2e8f0;
    padding-top: 12px;
    margin-bottom: 14px;
}

.ent-custom-fields-options-title {
    font-size: 13px;
    font-weight: 600;
    color: #364152;
    margin: 0 0 8px;
}

.ent-custom-fields-options-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.ent-custom-fields-options-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ent-custom-fields-switches {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #364152;
}

.ent-custom-fields-switches label {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.ent-custom-fields-table-wrap {
    overflow-x: auto;
    margin-bottom: 24px;
}

.ent-custom-fields-table {
    width: 100%;
    border-collapse: collapse;
}

.ent-custom-fields-table th,
.ent-custom-fields-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #edf1f5;
    font-size: 13px;
    text-align: left;
    vertical-align: top;
}

.ent-custom-fields-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 160px;
}

.ent-custom-fields-edit-row td {
    background: #fbfcfe;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.ent-custom-fields-edit-form {
    width: 100%;
}

.ent-custom-fields-legend {
    border-top: 1px solid #e5edf5;
    padding-top: 16px;
}

.ent-custom-fields-legend dl {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: 6px 16px;
}

.ent-custom-fields-legend dt {
    font-weight: 700;
    color: #243447;
}

.ent-custom-fields-legend dd {
    margin: 0 0 8px;
    color: #4b5563;
}

.ent-custom-fields-card {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5edf5;
}

.ent-custom-fields-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px 20px;
}

.ent-custom-fields-card-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ent-custom-fields-card-label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7684;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.ent-custom-fields-card-value {
    font-size: 14px;
    color: #1f2933;
    word-break: break-word;
}

.ent-custom-fields-card-value a {
    color: #1976d2;
}

@media (max-width: 640px) {
    .ent-custom-fields-options-row {
        grid-template-columns: 1fr;
    }

    .ent-custom-fields-table-wrap {
        overflow-x: visible;
    }

    .ent-custom-fields-table,
    .ent-custom-fields-table tbody {
        display: block;
        width: 100%;
    }

    .ent-custom-fields-table thead {
        display: none;
    }

    .ent-custom-fields-table tbody > tr:not(.ent-custom-fields-edit-row):not(.ent-custom-fields-empty-row) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 16px;
        margin-bottom: 14px;
        padding: 14px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #fbfcfe;
    }

    .ent-custom-fields-table tbody > tr:not(.ent-custom-fields-edit-row):not(.ent-custom-fields-empty-row) > td {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
        padding: 0;
        border: 0;
        font-size: 14px;
    }

    .ent-custom-fields-table tbody > tr:not(.ent-custom-fields-edit-row):not(.ent-custom-fields-empty-row) > td::before {
        content: attr(data-label);
        color: #6b7684;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .02em;
        text-transform: uppercase;
    }

    .ent-custom-fields-table .ent-custom-fields-actions {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .ent-custom-fields-table .ent-custom-fields-actions form {
        display: block;
        width: 100%;
        margin: 0;
    }

    .ent-custom-fields-settings .ent-custom-fields-actions .btn {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        white-space: nowrap;
        overflow-wrap: normal;
    }

    .ent-custom-fields-form button.btn-success[type="submit"] {
        width: 100%;
        min-height: 44px;
    }

    .ent-custom-fields-table .ent-custom-fields-edit-row,
    .ent-custom-fields-table .ent-custom-fields-edit-row td,
    .ent-custom-fields-table .ent-custom-fields-empty-row,
    .ent-custom-fields-table .ent-custom-fields-empty-row td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .ent-custom-fields-legend dl {
        grid-template-columns: 1fr;
    }
}

/* Permanent custom-field deletion is a separate, single-purpose dialog. */
.ent-custom-fields-delete-modal[hidden] {
    display: none !important;
}

.ent-custom-fields-delete-modal:not([hidden]) {
    position: fixed;
    z-index: 10020;
    inset: 0;
    display: block;
    margin: 0;
    padding: 20px 16px;
    overflow-y: auto;
    background: rgba(15, 23, 42, .56);
}

.ent-custom-fields-delete-modal:not([hidden]) > td {
    display: block;
    width: min(620px, 100%);
    box-sizing: border-box;
    margin: 36px auto;
    padding: 22px;
    border: 1px solid #d9e2ec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .28);
}

.ent-custom-fields-delete-dialog p {
    margin: 0 0 12px;
    line-height: 1.5;
}

.ent-custom-fields-delete-dialog label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 700;
}

.ent-custom-fields-delete-dialog input {
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.ent-custom-fields-delete-warning {
    padding: 10px 12px;
    border-left: 4px solid #dc2626;
    background: #fff1f2;
    color: #991b1b;
}

.ent-custom-fields-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.ent-custom-fields-delete-status {
    display: inline-block;
    color: #7c2d12;
    font-size: 12px;
    font-weight: 700;
}

/* ENTOMONE record sets: calm operational library for saved record groups. */
.ent-record-sets-page {
    --record-sets-ink: #1d3345;
    --record-sets-muted: #607383;
    --record-sets-line: #dbe5e9;
    --record-sets-surface: #ffffff;
    --record-sets-green: #16835d;
    --record-sets-green-dark: #0f6647;
    margin: 0;
    min-height: 100vh;
    padding: 32px 24px 48px;
    background: linear-gradient(180deg, #f2f7f5 0, #f8fafb 260px, #f5f7fa 100%);
    color: var(--record-sets-ink);
}

.ent-record-sets-page .ent-record-sets-shell {
    width: min(100%, 1180px);
    max-width: 1180px;
    margin: 0 auto;
}

.ent-record-sets-page .ent-record-sets-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 24px;
    padding: 4px 2px 18px;
    border-bottom: 1px solid #cfdde0;
}

.ent-record-sets-page .ent-record-sets-heading h1 {
    order: -1;
    margin: 0;
    color: var(--record-sets-ink);
    font-size: clamp(26px, 3vw, 34px);
    letter-spacing: -0.035em;
    line-height: 1.1;
}

.ent-record-sets-page .ent-record-sets-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 0;
    color: #285c70;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

.ent-record-sets-page .ent-record-sets-back::before { content: '←'; font-size: 18px; line-height: 1; }
.ent-record-sets-page .ent-record-sets-back:hover { color: var(--record-sets-green-dark); text-decoration: underline; text-underline-offset: 3px; }

.ent-record-sets-page .ent-record-sets-notice {
    margin: 0 0 16px;
    padding: 13px 16px;
    border: 1px solid #b8dfca;
    border-radius: 10px;
    background: #effaf4;
    color: #19563d;
    font-weight: 650;
}

.ent-record-sets-page .ent-record-sets-notice.is-error { border-color: #efc3bd; background: #fff3f1; color: #8d3025; }

.ent-record-sets-page .ent-record-sets-library,
.ent-record-sets-page .ent-record-set-detail {
    margin: 0 0 22px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--record-sets-line);
    border-radius: 14px;
    background: var(--record-sets-surface);
    box-shadow: 0 10px 26px rgba(26, 53, 69, .06);
}

.ent-record-sets-page .ent-record-sets-section-heading,
.ent-record-sets-page .ent-record-set-detail-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--record-sets-line);
}

.ent-record-sets-page .ent-record-sets-section-heading h2,
.ent-record-sets-page .ent-record-set-detail-heading h2 {
    margin: 0;
    color: var(--record-sets-ink);
    font-size: 19px;
    letter-spacing: -0.015em;
}

.ent-record-sets-page .ent-record-sets-count {
    display: inline-grid;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    place-items: center;
    border-radius: 999px;
    background: #e5f4ed;
    color: #126b4b;
    font-size: 13px;
    font-weight: 800;
}

.ent-record-sets-page .table-scroll { margin: 0; }
.ent-record-sets-page .ent-record-sets-table,
.ent-record-sets-page .ent-record-set-records { width: 100%; border-collapse: collapse; }

.ent-record-sets-page .ent-record-sets-table th,
.ent-record-sets-page .ent-record-set-records th {
    padding: 11px 18px;
    background: #f6f9fa;
    color: #667b86;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .075em;
    text-align: left;
    text-transform: uppercase;
}

.ent-record-sets-page .ent-record-sets-table td,
.ent-record-sets-page .ent-record-set-records td {
    padding: 15px 18px;
    border-top: 1px solid #e8eef0;
    color: #344b59;
    font-size: 14px;
    vertical-align: middle;
}

.ent-record-sets-page .ent-record-sets-table tbody tr,
.ent-record-sets-page .ent-record-set-records tbody tr { transition: background-color .16s ease, box-shadow .16s ease; }
.ent-record-sets-page .ent-record-sets-table tbody tr:hover,
.ent-record-sets-page .ent-record-set-records tbody tr:hover { background: #f7fbf9; }
.ent-record-sets-page .ent-record-sets-table tbody tr.is-active { background: #edf8f2; box-shadow: inset 4px 0 0 var(--record-sets-green); }

.ent-record-sets-page .ent-record-sets-name,
.ent-record-sets-page .ent-record-set-record-id {
    color: #1b5e74;
    font-weight: 800;
    text-decoration: none;
}

.ent-record-sets-page .ent-record-sets-name:hover,
.ent-record-sets-page .ent-record-set-record-id:hover { color: var(--record-sets-green-dark); text-decoration: underline; text-underline-offset: 3px; }
.ent-record-sets-page .ent-record-sets-table small { display: block; max-width: 540px; margin-top: 4px; color: var(--record-sets-muted); font-size: 12px; line-height: 1.4; }
.ent-record-sets-page .ent-record-sets-record-count { color: #135d47; font-size: 16px; }
.ent-record-sets-page .ent-record-sets-current { color: var(--record-sets-green-dark); font-size: 12px; font-weight: 800; }

.ent-record-sets-page .ent-record-set-delete-form { margin: 0; }
.ent-record-sets-page .ent-record-set-delete-button {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #e3b8b2;
    border-radius: 7px;
    background: #fff;
    color: #a33b32;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}
.ent-record-sets-page .ent-record-set-delete-button:hover { border-color: #b43c31; background: #fff4f2; transform: translateY(-1px); }

.ent-record-sets-page .ent-record-set-detail { border-color: #c8e1d3; }
.ent-record-sets-page .ent-record-set-detail-heading { align-items: flex-start; background: linear-gradient(110deg, #f0faf4, #fff); }
.ent-record-sets-page .ent-record-set-description { max-width: 720px; margin: 7px 0 0; color: var(--record-sets-muted); font-size: 14px; line-height: 1.5; }
.ent-record-sets-page .ent-record-set-stat { display: grid; min-width: 92px; margin: 0; padding: 8px 0 8px 18px; border-left: 1px solid #cae4d5; color: var(--record-sets-muted); text-align: right; }
.ent-record-sets-page .ent-record-set-stat strong { color: #146f4d; font-size: 25px; line-height: 1; }
.ent-record-sets-page .ent-record-set-stat span { margin-top: 4px; font-size: 11px; font-weight: 700; line-height: 1.25; }

.ent-record-sets-page .ent-record-set-actions { display: flex; flex-wrap: wrap; gap: 9px; padding: 18px 22px; }
.ent-record-sets-page .ent-record-set-action {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    border: 1px solid #c9d8dd;
    border-radius: 8px;
    background: #fff;
    color: #245b70;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease;
}
.ent-record-sets-page .ent-record-set-action:first-child { border-color: var(--record-sets-green); background: var(--record-sets-green); color: #fff; }
.ent-record-sets-page .ent-record-set-action:hover { border-color: #16835d; background: #edf8f2; color: var(--record-sets-green-dark); transform: translateY(-1px); }
.ent-record-sets-page .ent-record-set-action:first-child:hover { background: var(--record-sets-green-dark); color: #fff; }
.ent-record-sets-page .ent-record-set-delete-form--detail { padding: 0 22px 22px; }

.ent-record-sets-page .ent-record-sets-empty { margin: 0; padding: 28px 22px; color: var(--record-sets-muted); line-height: 1.55; }
.ent-record-sets-page .ent-record-set-dataset { display: inline-block; padding: 4px 7px; border-radius: 5px; background: #edf3f5; color: #49626d; font-size: 12px; font-weight: 700; }

@media (max-width: 720px) {
    .ent-record-sets-page { padding: 18px 10px 30px; }
    .ent-record-sets-page .ent-record-sets-heading { align-items: flex-start; flex-direction: column; gap: 10px; padding-bottom: 14px; }
    .ent-record-sets-page .ent-record-sets-heading h1 { font-size: 27px; }
    .ent-record-sets-page .ent-record-sets-section-heading,
    .ent-record-sets-page .ent-record-set-detail-heading { padding: 16px; }
    .ent-record-sets-page .ent-record-sets-table,
    .ent-record-sets-page .ent-record-set-records { min-width: 620px; }
    .ent-record-sets-page .ent-record-sets-table th,
    .ent-record-sets-page .ent-record-set-records th { padding: 10px 12px; }
    .ent-record-sets-page .ent-record-sets-table td,
    .ent-record-sets-page .ent-record-set-records td { padding: 13px 12px; }
    .ent-record-sets-page .ent-record-set-actions { display: grid; grid-template-columns: 1fr 1fr; padding: 14px 16px; }
    .ent-record-sets-page .ent-record-set-action { width: 100%; }
    .ent-record-sets-page .ent-record-set-delete-form--detail { padding: 0 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .ent-record-sets-page .ent-record-sets-table tbody tr,
    .ent-record-sets-page .ent-record-set-records tbody tr,
    .ent-record-sets-page .ent-record-set-action,
    .ent-record-sets-page .ent-record-set-delete-button { transition: none; }
}

/* ENTOMONE full record form: visible save lifecycle for multi-photo uploads. */
.ent-record-save-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(14, 33, 24, .78);
}

.ent-record-save-overlay[hidden] {
    display: none;
}

.ent-record-save-dialog {
    width: min(100%, 480px);
    padding: 28px 24px;
    border: 1px solid #a8c8b6;
    border-radius: 12px;
    background: #fff;
    color: #173b2a;
    text-align: center;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

.ent-record-save-dialog h2 {
    margin: 0 0 16px;
    font-size: 24px;
    line-height: 1.2;
}

.ent-record-save-dialog p {
    margin: 0;
    font-size: 17px;
    line-height: 1.45;
}

.ent-record-save-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 18px;
    border: 4px solid #c1d9ca;
    border-top-color: #1f7a50;
    border-radius: 50%;
    animation: ent-record-save-spin .8s linear infinite;
}

.ent-record-save-progress {
    height: 12px;
    margin-top: 22px;
    overflow: hidden;
    border-radius: 6px;
    background: #dbe9e0;
}

.ent-record-save-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #278257;
}

.ent-record-save-progress.is-indeterminate span {
    width: 42%;
    animation: ent-record-save-progress 1.1s ease-in-out infinite;
}

.ent-record-save-success-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 50%;
    background: #278257;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
}

.ent-record-save-error-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 50%;
    background: #b42318;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
}

.ent-record-save-overlay.is-error .ent-record-save-result-actions button {
    border-color: #b42318;
    background: #b42318;
    color: #fff;
}

.ent-record-save-result-actions {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.ent-record-save-result-actions a,
.ent-record-save-result-actions button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid #1f7a50;
    border-radius: 5px;
    background: #278257;
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.ent-record-save-result-actions a:nth-child(2),
.ent-record-save-result-actions button {
    background: #fff;
    color: #1f704a;
}

@keyframes ent-record-save-spin {
    to { transform: rotate(360deg); }
}

@keyframes ent-record-save-progress {
    0% { transform: translateX(-115%); }
    100% { transform: translateX(270%); }
}

@media (max-width: 768px) {
    .ent-record-sets-page {
        padding: 8px;
    }
}

/* Record edit: keep the primary save action inside narrow mobile cards. */
@media (max-width: 520px) {
    .ent-record-edit-page .record-edit-header-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .ent-record-edit-page .record-edit-completion-status {
        justify-self: start;
        min-width: 0;
    }

    .ent-record-edit-page .record-edit-save-top {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        white-space: normal;
        text-align: center;
    }
}
/* ENTOMONE Multi Upload photos — 2026-08-09 */
.ent-multi-photo-page {
    background: #edf1ef;
    color: #173228;
}

.ent-multi-photo-page .multi-photo-shell {
    width: min(1540px, calc(100% - 32px));
    margin: 0 auto 40px;
}

.ent-multi-photo-page .multi-photo-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px;
    background: #fff;
    border: 1px solid #d7e1dc;
    border-radius: 14px 14px 0 0;
}

.ent-multi-photo-page .multi-photo-heading h1 {
    margin: 0 0 6px;
    color: #163d30;
    font-size: clamp(26px, 3vw, 38px);
}

.ent-multi-photo-page .multi-photo-heading p {
    max-width: 820px;
    margin: 0;
    color: #5d7068;
}

.ent-multi-photo-page .multi-photo-kicker {
    margin-bottom: 5px !important;
    color: #16845f !important;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.ent-multi-photo-page .multi-photo-submit {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    background: #2caa61;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 0 rgba(13, 79, 46, .22);
}

.ent-multi-photo-page .multi-photo-submit:disabled {
    background: #b9c4bf;
    box-shadow: none;
    cursor: not-allowed;
}

.ent-multi-photo-page .multi-photo-alert {
    margin: 14px 0;
    padding: 13px 16px;
    border-radius: 8px;
    font-weight: 700;
}

.ent-multi-photo-page .multi-photo-alert.success {
    border: 1px solid #9bd4ad;
    background: #e8f7ed;
    color: #176b38;
}

.ent-multi-photo-page .multi-photo-alert.error {
    border: 1px solid #edaaaa;
    background: #fff0f0;
    color: #8b2424;
}

.ent-multi-photo-page .multi-photo-observer {
    display: grid;
    grid-template-columns: minmax(220px, 360px);
    gap: 6px;
    padding: 15px 20px 0;
    background: #fff;
    font-weight: 700;
}

.ent-multi-photo-page .multi-photo-observer select {
    min-height: 42px;
    border: 1px solid #bccbc4;
    border-radius: 7px;
    background: #fff;
}

.ent-multi-photo-page .multi-photo-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #e2e8e5;
    border-bottom: 1px solid #d6dfdb;
    background: #fff;
}

.ent-multi-photo-page .multi-photo-tool {
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid #bbc8c2;
    border-radius: 7px;
    background: #f8faf9;
    color: #243c33;
    font-weight: 750;
    cursor: pointer;
}

.ent-multi-photo-page .multi-photo-tool.primary,
.ent-multi-photo-page .multi-photo-tool.combine {
    border-color: #287db7;
    background: #2f83bd;
    color: #fff;
}

.ent-multi-photo-page .multi-photo-tool:disabled {
    border-color: #d7deda;
    background: #e7ebe9;
    color: #909b96;
    cursor: not-allowed;
}

.ent-multi-photo-page .multi-photo-select-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 6px;
    font-weight: 650;
}

.ent-multi-photo-page .multi-photo-hint {
    margin: 0;
    padding: 11px 20px;
    border-bottom: 1px solid #d4dfda;
    background: #f7faf8;
    color: #62756c;
    font-size: 13px;
}

.ent-multi-photo-page .multi-photo-workspace {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 430px;
    border: 1px solid #d0dad5;
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: #e9ecea;
    overflow: hidden;
}

.ent-multi-photo-page .multi-photo-summary {
    padding: 22px 18px;
    border-right: 1px solid #d0d8d4;
    background: #f6f8f7;
    font-size: 17px;
}

.ent-multi-photo-page .multi-photo-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    align-items: start;
    gap: 20px;
    padding: 20px;
}

.ent-multi-photo-page .multi-photo-empty {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    min-height: 320px;
    border: 2px dashed #b8c7c0;
    border-radius: 12px;
    color: #64766d;
    font-size: 17px;
}

.ent-multi-photo-page .multi-photo-card {
    min-width: 0;
    padding: 16px;
    border: 3px solid transparent;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(37, 61, 51, .08);
    outline: none;
}

.ent-multi-photo-page .multi-photo-card.selected {
    border-color: #63a900;
    box-shadow: 0 0 0 1px rgba(99, 169, 0, .2);
}

.ent-multi-photo-page .multi-photo-card:focus-visible {
    box-shadow: 0 0 0 4px rgba(44, 131, 189, .28);
}

.ent-multi-photo-page .multi-photo-viewer {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    border-radius: 7px;
    background: #e5e9e7;
    overflow: hidden;
}

.ent-multi-photo-page .multi-photo-viewer > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ent-multi-photo-page .multi-photo-image-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease;
}

.ent-multi-photo-page .multi-photo-viewer:hover .multi-photo-image-actions,
.ent-multi-photo-page .multi-photo-viewer:focus-within .multi-photo-image-actions {
    opacity: 1;
    transform: translateY(0);
}

.ent-multi-photo-page .multi-photo-image-action {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    background: rgba(28, 44, 37, .86);
    color: #fff;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
}

.ent-multi-photo-page .multi-photo-image-action.select-toggle {
    border: 2px solid rgba(255, 255, 255, .95);
    background: rgba(28, 44, 37, .86);
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.ent-multi-photo-page .multi-photo-card.selected .multi-photo-image-action.select-toggle {
    background: #63a900;
    color: #fff;
}

.ent-multi-photo-page .multi-photo-image-action.select-toggle:focus-visible {
    outline: 3px solid #f0a64a;
    outline-offset: 2px;
}

.ent-multi-photo-page .multi-photo-image-action.previous,
.ent-multi-photo-page .multi-photo-image-action.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 42px;
    border: 0;
    border-radius: 5px;
    background: rgba(255, 255, 255, .86);
    color: #33443d;
    font-size: 30px;
}

.ent-multi-photo-page .multi-photo-image-action.previous { left: 7px; }
.ent-multi-photo-page .multi-photo-image-action.next { right: 7px; }

.ent-multi-photo-page .multi-photo-counter {
    padding: 8px 0 5px;
    text-align: center;
    color: #5a6b63;
    font-size: 12px;
    font-weight: 750;
}

.ent-multi-photo-page .multi-photo-fields {
    display: grid;
    gap: 9px;
}

.ent-multi-photo-page .multi-photo-field {
    display: grid;
    gap: 4px;
    margin: 0;
    color: #4f6259;
    font-size: 11px;
    font-weight: 750;
}

.ent-multi-photo-page .multi-photo-field input,
.ent-multi-photo-page .multi-photo-field select,
.ent-multi-photo-page .multi-photo-field textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #c4cec9;
    border-radius: 6px;
    background: #fff;
    color: #263a31;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
}

.ent-multi-photo-page .multi-photo-field textarea {
    min-height: 64px;
    resize: vertical;
}

.ent-multi-photo-page .multi-photo-lightbox {
    width: min(94vw, 1180px);
    max-width: none;
    padding: 44px 18px 18px;
    border: 0;
    border-radius: 12px;
    background: #17201c;
}

.ent-multi-photo-page .multi-photo-lightbox::backdrop {
    background: rgba(5, 12, 9, .82);
}

.ent-multi-photo-page .multi-photo-lightbox img {
    display: block;
    width: 100%;
    max-height: 82vh;
    object-fit: contain;
}

.ent-multi-photo-page .multi-photo-lightbox button {
    position: absolute;
    top: 7px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #18231e;
    font-size: 26px;
    cursor: pointer;
}

@media (max-width: 820px) {
    .ent-multi-photo-page .multi-photo-shell {
        width: min(100% - 18px, 1540px);
    }
    .ent-multi-photo-page .multi-photo-heading {
        display: grid;
        padding: 20px;
    }
    .ent-multi-photo-page .multi-photo-submit {
        width: 100%;
    }
    .ent-multi-photo-page .multi-photo-toolbar {
        flex-wrap: wrap;
    }
    .ent-multi-photo-page .multi-photo-select-all {
        width: 100%;
        margin: 3px 0 0;
    }
    .ent-multi-photo-page .multi-photo-workspace {
        grid-template-columns: 1fr;
    }
    .ent-multi-photo-page .multi-photo-summary {
        border-right: 0;
        border-bottom: 1px solid #d0d8d4;
        padding: 14px 18px;
    }
    .ent-multi-photo-page .multi-photo-cards {
        grid-template-columns: 1fr;
        padding: 12px;
    }
    .ent-multi-photo-page .multi-photo-image-actions {
        opacity: 1;
        transform: none;
    }
    .ent-multi-photo-page .multi-photo-image-action {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* Mobilny nagłówek: końcowy kontrakt szerokości, odporny na późniejsze style. */
@media (max-width: 768px) {
    .ent-global-header {
        width: 100vw !important;
        max-width: 100vw !important;
        overflow: clip;
    }

    .ent-global-header .ent-global-inner {
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .ent-global-header .ent-global-actions {
        min-width: 0 !important;
        overflow: hidden;
    }

    .ent-global-header .ent-global-upload {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ent-global-header .ent-global-menu-toggle {
        flex: 0 0 auto !important;
        flex-shrink: 0 !important;
    }
}

/* ENTOMONE desktop page canvas standard (2026-08-11): up to 1600 px.
   Page roots only: modals, compact cards, maps and mobile layouts keep their own sizing. */
@media (min-width: 769px) {
    body[class*="-page"] > .container,
    body[class*="-page"] > .wrap,
    body[class*="-page"] > main[class$="-shell"],
    body[class*="-page"] > main > .container,
    body[class*="-page"] > main > .wrap,
    body[class*="-page"] > main > [class$="-shell"] {
        box-sizing: border-box;
        width: min(calc(100% - 32px), 1600px) !important;
        max-width: 1600px !important;
    }
}
