/* ENTOMONE - style runtime */
/* 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; }
@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; } }
.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 input, .ent-start-filter-dates input, .ent-start-filter-grid select, .ent-start-filter-grid input { width: 100%; margin-top: 6px; }
.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: block; font-weight: 700; }
.ent-start-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.ent-start-filter-grid label { display: block; font-weight: 700; }
.ent-start-mobile-filter-choices { display: none; }
.ent-start-filter-actions { display: flex; gap: 10px; margin-top: 18px; }
.ent-start-filter-actions .btn-secondary { display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid #b7c3bd; border-radius: 8px; text-decoration: none; }
.ent-start-record-filters { scroll-margin-top: 110px; }
@media (min-width: 901px) { .ent-start-camera-form { display: none !important; } }
@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-dates { gap: 10px; margin-top: 18px; }
    .ent-start-mobile-date-button {
        position: relative;
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-height: 50px;
        margin: 0;
        padding: 8px 10px;
        border: 1px solid #b7c3bd;
        border-radius: 12px;
        background: #fff;
        color: #173f32;
        cursor: pointer;
    }
    .ent-start-mobile-date-button input {
        position: absolute;
        width: 1px !important;
        height: 1px;
        margin: 0 !important;
        opacity: 0;
        pointer-events: none;
    }
    .ent-start-mobile-filter-choices { display: block; margin-top: 18px; }
    .ent-start-mobile-filter-label { display: block; margin-bottom: 8px; font-weight: 700; }
    .ent-start-mobile-choice-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .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-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-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; }
.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 .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;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 20%, rgba(214, 116, 45, 0.24), transparent 28%),
        radial-gradient(circle at 78% 12%, rgba(39, 88, 70, 0.20), transparent 24%),
        linear-gradient(135deg, #10251f 0%, #17392f 48%, #0f1d1a 100%);
    color: #1d2d29;
}

.ent-login-page .records-footer {
    width: min(390px, 100%);
    margin-top: 0;
    padding: 0;
    border-top: 0;
    color: rgba(255, 255, 255, 0.72);
}

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

.login-box {
    width: min(390px, 100%);
    padding: 38px;
    background: var(--surface-warm);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 20px;
    box-shadow: var(--shadow-panel);
}

.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: 2px solid var(--border-control);
    border-radius: 10px;
    background: #fffdf7;
    font-size: 15px;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.login-box input:focus {
    outline: none;
    border-color: var(--color-amber);
    box-shadow: 0 0 0 4px rgba(214, 111, 47, 0.12);
}

.login-box button,
.login-box .home-link {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--color-amber);
    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: #bd5f27;
    box-shadow: 0 10px 24px rgba(214, 111, 47, 0.35);
}

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

.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 {
        align-items: stretch;
        padding: 16px;
    }

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

/* 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;
}

.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: flex-end;
    margin-bottom: 18px;
}

.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;
}

.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 .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 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 {
    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 {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    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%;
    }
}

/* 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;
}

@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;
    }
}

/* 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 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;
    margin: 20px 0;
}

.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 .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; }

.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;
}

.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 .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 .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;
}

.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 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 > .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: content-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(0, 1fr) 320px;
        align-items: start;
        gap: 34px;
        margin: 0 0 22px;
    }
    .ent-record-edit-page .record-basic-data-main h2 { margin-bottom: 16px; }
    .ent-record-edit-page .record-primary-fields {
        display: grid;
        grid-template-columns: 14ch 14ch max-content 14ch 25ch;
        align-items: end;
        justify-content: center;
        width: max-content;
        max-width: 100%;
        margin: 20px auto 18px;
        gap: 16px 18px;
    }
    .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: 12ch; }
    .ent-record-edit-page .record-basic-data-options .record-observation-meta-row {
        display: block;
        width: 100%;
        margin: 0;
    }
    .ent-record-edit-page .record-basic-data-options .record-origin-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 { margin-top: 16px; }
    .ent-record-edit-page .record-basic-data-options .record-observer-switch { justify-content: flex-start; }
}
.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: content-box; width: 12ch; }
.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(2, minmax(0, 1fr)); align-items: flex-end; width: min(100%, 760px); margin-left: auto; margin-right: auto; gap: 32px; }
.ent-record-edit-page .record-origin-field { min-width: 0; justify-self: 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 25ch; min-width: 25ch; }
.ent-record-edit-page .record-plant-field .select2-container { width: 25ch !important; }
.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";
    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-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";
    }
    .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";
    }
    .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-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-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-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(3, 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; text-transform: uppercase; 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: 15px; margin-bottom: 30px; margin-top: -15px; }
.ent-site-view-page .stat-item { flex: 1; background: #fff; padding: 20px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); border: 1px solid #edf2f7; text-align: center; }
.ent-site-view-page .stat-item span { display: block; font-size: 11px; color: #718096; text-transform: uppercase; font-weight: bold; margin-bottom: 4px; }
.ent-site-view-page .stat-item strong { font-size: 22px; color: #2d3436; }
.ent-site-view-page .obs-dates-strong { font-size: 16px; line-height: 1.4; }

.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: 80px 110px 1fr 92px; gap: 12px; align-items: center; padding: 8px 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 strong { display: block; font-size: 14px; font-style: italic; color: #2c3e50; line-height: 1.2; }
.ent-site-view-page .record-species span { display: block; font-size: 11px; color: #7f8c8d; line-height: 1.2; margin-top: 2px; }
.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 { 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";
    }
    .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 .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 .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; }

/* === 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 .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 .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 .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 .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 .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 .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 .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; }
}
.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-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-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; }

/* === 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"
            ". 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 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 .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 .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 1fr;
        grid-template-areas:
            "id date"
            "site site";
        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 .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"
            ". 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[data-label="ID"] {
        grid-area: id !important;
        white-space: nowrap !important;
    }
    .ent-records-page .records-table tbody > tr > td[data-label="Usuń"] {
        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[data-label="Nazwa"] {
        grid-area: name !important;
    }
    .ent-records-page .records-table tbody > tr > td[data-label="Stanowisko"] {
        grid-area: site !important;
        min-width: 0 !important;
    }
    .ent-records-page .records-table tbody > tr > td[data-label="Data"],
    .ent-records-page .records-table tbody > tr > td[data-label="Roslina"],
    .ent-records-page .records-table tbody > tr > td[data-label="Ilosc"],
    .ent-records-page .records-table tbody > tr > td[data-label="Obs."],
    .ent-records-page .records-table tbody > tr > td[data-label="Typ"],
    .ent-records-page .records-table tbody > tr > td[data-label="Uwagi"] {
        display: none !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;
    }
    .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 {
        flex: 1 1 calc(50% - 8px) !important;
    }
    .ent-records-page .bulk-delete-submit {
        flex-basis: 100% !important;
    }
}


/* === 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 {
        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 {
    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-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: 130px; }
.ent-records-page .records-table th:nth-child(5),
.ent-records-page .records-table td:nth-child(5) { width: 170px; }
.ent-records-page .records-table th:nth-child(6),
.ent-records-page .records-table td:nth-child(6) { width: 88px; }
.ent-records-page .records-table th:nth-child(7),
.ent-records-page .records-table td:nth-child(7) { width: 50px; }
.ent-records-page .records-table th:nth-child(8),
.ent-records-page .records-table td:nth-child(8) { width: 52px; }
.ent-records-page .records-table th:nth-child(9),
.ent-records-page .records-table td:nth-child(9) { width: 76px; }
.ent-records-page .records-table th:nth-child(10),
.ent-records-page .records-table td:nth-child(10) {
    width: 150px;
    max-width: 150px;
}
.ent-records-page .records-table th:nth-child(11),
.ent-records-page .records-table td:nth-child(11) {
    width: 76px;
    min-width: 76px;
    text-align: center;
}
.ent-records-page .records-table th:nth-child(12),
.ent-records-page .records-table td:nth-child(12) {
    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-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.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: -10px 0 22px; padding: 16px; border: 1px solid #dce6ef; border-radius: 12px; background: #f8fbff; }
.ent-site-view-page .site-visits-box-title { margin-bottom: 10px; color: #1f3f5f; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.ent-site-view-page .site-visits-box-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ent-site-view-page .site-visit-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #bfd4e6; border-radius: 999px; background: #ffffff; color: #26465f; font-size: 13px; }
.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 (2026-06-29)
   Kolejnosc od gory: Strona glowna, Dodaj obserwacje, Dodaj notatke, Zapisz rekord. */
@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: 3 !important;
    }

    .ent-record-add-photo-page #photoRecordForm .actions .btn-primary {
        order: 4 !important;
    }
}
/* 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-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-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;
}

/* 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 16ch;
    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 select,
.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;
}
@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; }
}
/* 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;
    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;
}
@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(190px, 280px) max-content max-content minmax(320px, 1fr) 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 {
    display: grid;
    grid-template-columns: minmax(190px, 380px) minmax(320px, 1fr);
    gap: 18px;
    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-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-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: 140px 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-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;
    transition: transform 0.16s, background 0.16s, box-shadow 0.16s;
}

.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: 52px;
    padding: 10px 12px;
    border-radius: 7px;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.18;
    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: 112px;
    }

    .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: 9px 8px;
        font-size: 13px;
    }
}

@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: 54px;
        padding: 10px 8px;
        font-size: 15px;
        line-height: 1.2;
    }

    .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) */
@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;
}
/* 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: 1fr auto;
        justify-items: center;
        width: 100%;
    }

    .ent-site-view-page .header-title-wrap h1 {
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
        text-align: center;
        width: 100%;
    }

    .ent-site-view-page .site-nav-arrows {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .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 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) {
        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 {
        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 add-next-photo button */
.ent-record-add-field-page #fqAddPhotoBtn {
    background: #74ac00;
    color: #ffffff;
    border: none;
    align-self: center;
    min-height: 62px;
    min-width: min(100%, 280px);
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    padding: 12px 22px;
}

.ent-record-add-field-page #fqAddPhotoBtn:hover,
.ent-record-add-field-page #fqAddPhotoBtn:focus {
    background: #5f9000;
    color: #ffffff;
}
/* ENTOMONE field quick cancel as destructive button */
.ent-record-add-field-page #fqCancelBtn {
    background: #c62828;
    color: #ffffff;
    border: none;
    text-decoration: none;
}

.ent-record-add-field-page #fqCancelBtn:hover,
.ent-record-add-field-page #fqCancelBtn:focus {
    background: #a91f1f;
    color: #ffffff;
    text-decoration: none;
}
/* 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;
    }
}

@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 */
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-tool-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
}
.utm-tool-header p {
    margin: 7px 0 0;
    color: #52616d;
}
.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;
    }
    #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;
    }
}


/* 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 { 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;
}
.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; margin-top: 16px; }
.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;
}

/* 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;
    }
}
