:root {
    --primary: #1a5f4a;
    --primary-light: #2d8a6e;
    --primary-rgb: 26, 95, 74;
    --primary-light-rgb: 45, 138, 110;
    --sand: #f5f0e6;
    --text-dark: #1a1a2e;
    --text-light: #6b7280;
    --white: #ffffff;
    --border: #d9e2de;
    --gradient-1: linear-gradient(135deg, #1a5f4a 0%, #2d8a6e 100%);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --radius-md: 16px;
    --radius-lg: 24px;
}

* { box-sizing: border-box; }
img, video {
    max-width: 100%;
    height: auto;
}
html {
    height: 100%;
}
body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    color: var(--text-dark);
    background: var(--sand);
}

.liquid-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.liquid-wave {
    position: absolute; width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(var(--primary-rgb),0.12), transparent 40%);
    animation: wave 12s ease-in-out infinite;
}
.liquid-wave:nth-child(2) { animation-delay: -6s; opacity: 0.6; }
@keyframes wave {
    0%,100% { transform: translateX(-20%) translateY(0); }
    50% { transform: translateX(-20%) translateY(-20px); }
}

.navbar {
    position: sticky; top: 0; z-index: 20;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    padding: 14px 24px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border);
}
.logo { text-decoration: none; color: var(--primary); font-weight: 700; font-size: 22px; }
.logo i { margin-right: 6px; }
.nav-cta { text-decoration: none; color: #fff; background: var(--gradient-1); padding: 10px 14px; border-radius: 999px; }

.hero { min-height: 75vh; display: grid; place-items: center; padding: 30px 20px; }
.hero-content { max-width: 760px; text-align: center; }
.hero-badge {
    display: inline-block; background: rgba(var(--primary-rgb),0.12); color: var(--primary);
    padding: 8px 14px; border-radius: 999px; font-size: 14px;
}
.hero h1 { font-size: clamp(32px, 5vw, 56px); margin: 16px 0; }
.hero h1 span { color: var(--primary); }
.hero p { color: var(--text-light); font-size: 18px; }
.hero-buttons { margin-top: 22px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.btn {
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 20px;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.25;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.22s ease, filter 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 2px 12px rgba(var(--primary-rgb), 0.22);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.28);
    filter: brightness(1.05);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.2);
    filter: brightness(0.98);
}
.btn-secondary {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: 0 1px 4px rgba(var(--primary-rgb), 0.06);
}
.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.12);
    background: rgba(var(--primary-rgb), 0.04);
}
.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 1px 6px rgba(var(--primary-rgb), 0.1);
}
.btn-full { width: 100%; }

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Park booking status (panel + landing share helper class names) */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    line-height: 1;
}
.status-badge-landing-confirmed {
    background: rgba(34, 197, 94, 0.40);
    color: #eafff4;
    border: 1px solid rgba(34, 197, 94, 0.60);
}
.status-badge-landing-awaiting {
    background: rgba(234, 179, 8, 0.45);
    color: #fff7d6;
    border: 1px solid rgba(234, 179, 8, 0.65);
}
.status-badge-landing-expired {
    background: rgba(239, 68, 68, 0.40);
    color: #ffe4e6;
    border: 1px solid rgba(239, 68, 68, 0.62);
}

.users-sortable-table .th-sortable,
.panel-sortable-table .th-sortable {
    white-space: nowrap;
    vertical-align: middle;
}
.th-sort-head {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.th-sort-arrows {
    display: inline-flex;
    flex-direction: column;
    gap: 0;
    line-height: 1;
}
.th-sort-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 14px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 4px;
}
.th-sort-btn:hover {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
}
.th-sort-btn.is-active {
    color: var(--primary);
    font-weight: 700;
}

/* Panel data tables: same thead / sort arrows / hover as Users — theme vars from Profile */
.panel-content .users-sortable-table.company-table thead th,
.panel-content .panel-sortable-table.company-table thead th,
.panel-content .panel-sortable-table.tariff-price-list-table thead th {
    background: rgba(var(--primary-rgb), 0.09);
    color: var(--text-dark);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.24);
    padding: 11px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    vertical-align: middle;
}
.panel-content .users-sortable-table.company-table thead th.th-actions,
.panel-content .panel-sortable-table.company-table thead th.th-actions,
.panel-content .panel-sortable-table.tariff-price-list-table thead th.th-actions {
    text-align: right;
}
.panel-content .users-sortable-table .th-sort-btn,
.panel-content .panel-sortable-table .th-sort-btn {
    width: 24px;
    height: 15px;
    color: var(--text-light);
    border: 1px solid transparent;
    box-sizing: border-box;
}
.panel-content .users-sortable-table .th-sort-btn:hover,
.panel-content .panel-sortable-table .th-sort-btn:hover {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.12);
    border-color: rgba(var(--primary-rgb), 0.2);
}
.panel-content .users-sortable-table .th-sort-btn.is-active,
.panel-content .panel-sortable-table .th-sort-btn.is-active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 1px 6px rgba(var(--primary-rgb), 0.35);
    font-weight: 700;
}
.panel-content .users-sortable-table.company-table tbody tr:hover td,
.panel-content .panel-sortable-table.company-table tbody tr:hover td,
.panel-content .panel-sortable-table.tariff-price-list-table tbody tr:hover td {
    background: rgba(var(--primary-rgb), 0.05);
}
.panel-content .users-sortable-table .td-online,
.panel-content .users-sortable-table .th-online,
.panel-content .panel-sortable-table .td-online,
.panel-content .panel-sortable-table .th-online {
    text-align: center;
    width: 1%;
    white-space: nowrap;
}
.panel-content .users-sortable-table .status-pill.status-active,
.panel-content .panel-sortable-table .status-pill.status-active {
    background: rgba(var(--primary-rgb), 0.14);
    color: var(--primary);
}
.user-presence {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
}
.user-presence-dot {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
}
.user-presence-dot.is-online {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35);
    border-color: rgba(21, 128, 61, 0.35);
}
.user-presence-dot.is-offline {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.28);
    border-color: rgba(185, 28, 28, 0.35);
}
.user-presence-label {
    margin-left: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.user-presence-label.is-online {
    color: #15803d;
}
.user-presence-label.is-offline {
    color: #b91c1c;
}

/* Icon-only control (back office); use title + aria-label on each control */
.btn-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    line-height: 1;
}
.btn.btn-ico {
    min-width: 44px;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 18px;
}
.btn.btn-ico .icofont {
    line-height: 1;
}
.btn-inline.btn-ico {
    min-width: 36px;
    min-height: 36px;
    padding: 8px 10px;
    font-size: 17px;
    box-sizing: border-box;
}
.btn-inline.btn-ico .icofont {
    line-height: 1;
    vertical-align: middle;
}

.features {
    max-width: 1100px; margin: 0 auto 50px; padding: 0 20px;
    display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.feature-card {
    background: #fff; border-radius: var(--radius-md); padding: 18px;
    box-shadow: var(--shadow-md);
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}
.auth-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 38, 33, 0.55), rgba(10, 38, 33, 0.25));
    pointer-events: none;
}
.auth-wrap { width: min(100%, 460px); padding: 20px; }
.auth-wrap-wide { width: min(100%, 640px); }
.auth-card-wide { max-width: 100%; }
.reg-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 520px) {
    .reg-form-row { grid-template-columns: 1fr; }
}
.reg-role-section { display: grid; gap: 12px; }
.reg-hint {
    display: block;
    margin: -6px 0 8px;
    font-size: 12px;
    color: var(--text-light);
}
.reg-hint-block { margin: 0 0 10px; }
.reg-first-label { font-weight: 600; color: var(--primary); font-size: 12px; }
.reg-form-panel {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.65);
    display: grid;
    gap: 12px;
}
.reg-form-panel h2 {
    margin: 0 0 4px;
    font-size: 1.15rem;
    color: var(--text-dark);
    font-weight: 700;
}
.panel-content .reg-form-panel {
    background: rgba(255, 255, 255, 0.95);
}
.reg-role-badge {
    display: inline-block;
    margin: 0 0 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
}
.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.2;
    border: 1px solid transparent;
}
.role-badge--super_admin {
    background: rgba(88, 28, 135, 0.14);
    color: #4c1d95;
    border-color: rgba(88, 28, 135, 0.22);
}
.role-badge--financial {
    background: rgba(14, 116, 144, 0.14);
    color: #0e7490;
    border-color: rgba(14, 116, 144, 0.25);
}
.role-badge--shop {
    background: rgba(22, 163, 74, 0.14);
    color: #15803d;
    border-color: rgba(22, 163, 74, 0.24);
}
.role-badge--admin {
    background: rgba(var(--primary-rgb), 0.14);
    color: var(--primary);
    border-color: rgba(var(--primary-rgb), 0.22);
}
.role-badge--user {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.2);
}
.role-badge--checker {
    background: rgba(217, 119, 6, 0.14);
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.28);
}
.role-badge--agency {
    background: rgba(219, 39, 119, 0.12);
    color: #be185d;
    border-color: rgba(219, 39, 119, 0.22);
}
.role-badge--tour_operator {
    background: rgba(79, 70, 229, 0.12);
    color: #4338ca;
    border-color: rgba(79, 70, 229, 0.22);
}
.role-badge--individual_guest {
    background: rgba(71, 85, 105, 0.12);
    color: #334155;
    border-color: rgba(71, 85, 105, 0.2);
}
.role-badge--other {
    background: rgba(120, 120, 120, 0.14);
    color: var(--text-light);
    border-color: rgba(120, 120, 120, 0.22);
}
.role-badge--unassigned {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-light);
    border-color: var(--border);
    opacity: 0.78;
    font-weight: 600;
}
.tariff-role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    max-width: 420px;
}
.panel-content .company-table .th-logo-col {
    width: 56px;
}
.panel-table-filter-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
}
.panel-table-toolbar {
    flex-shrink: 0;
}
.table-toolbar-search-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 1px 4px rgba(var(--primary-rgb), 0.06);
}
.panel-content .table-toolbar-search-label:focus-within {
    border-color: rgba(var(--primary-rgb), 0.42);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}
.table-toolbar-search-icon {
    color: var(--primary);
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}
.table-toolbar-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 15px;
    color: var(--text-dark);
    outline: none;
}
.table-toolbar-search-input::placeholder {
    color: var(--text-light);
}
.theme-variant-switch-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}
.theme-variant-switch-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.theme-variant-radio-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}
.theme-variant-switch-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35);
}
.theme-variant-switch-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.theme-variant-switch-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-dark);
}
.theme-variant-switch-hint {
    font-size: 12px;
    font-weight: 500;
}
.theme-variant-switch-track {
    width: 42px;
    height: 22px;
    border-radius: 999px;
    background: #cfd8d4;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s ease;
}
.theme-variant-switch-thumb {
    position: absolute;
    width: 16px;
    height: 16px;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}
.theme-variant-switch-row:has(.theme-variant-radio-input:checked) {
    border-color: rgba(var(--primary-rgb), 0.35);
    background: rgba(var(--primary-rgb), 0.07);
    box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.12);
}
.theme-variant-switch-row:has(.theme-variant-radio-input:checked) .theme-variant-switch-track {
    background: var(--primary-light);
}
.theme-variant-switch-row:has(.theme-variant-radio-input:checked) .theme-variant-switch-thumb {
    transform: translateX(20px);
}
.backup-page-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 6px;
}
.backup-page-stack > .alert-error {
    margin: 0;
}
.backup-groups-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 0;
}
.backup-auto-table-title {
    margin: 20px 0 10px;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-dark);
}
.backup-details-card {
    margin: 0;
}
.backup-details-card[open] {
    padding-bottom: 12px;
}
.backup-details-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    padding: 4px 0 2px;
}
.backup-details-summary::-webkit-details-marker {
    display: none;
}
.backup-details-summary small {
    color: var(--text-light);
    font-weight: 500;
}
.backup-details-body {
    padding-top: 12px;
}
.backup-auto-form .backup-auto-enable-switch {
    margin-bottom: 4px;
}
.backup-auto-row {
    margin-top: 8px;
}
.backup-type-table {
    min-width: 880px;
}
.backup-type-desc {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.45;
    max-width: 320px;
}
.backup-type-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.backup-type-table-outer {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.backup-manifest-table {
    min-width: 520px;
}
.backup-auto-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tariff-price-list-table {
    min-width: 720px;
}
.top-user-role {
    margin: 2px 0 0;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}
.top-user-role-label {
    color: var(--text-light);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.top-right-user .top-user-role {
    justify-content: flex-end;
}
.profile-role-line {
    margin: 0 0 12px;
}
.profile-role-static {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.profile-role-static-label {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
}
.payments-latest-article {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.payments-latest-title {
    margin: 0;
    padding: 16px 16px 10px;
    font-size: 1.05rem;
}
.payments-latest-article .panel-table-filter-wrap {
    padding: 0 16px 4px;
}
.payments-latest-table-wrap {
    margin: 0;
    border-radius: 0 0 13px 13px;
    border-top: 1px solid rgba(217, 226, 222, 0.85);
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.payments-table {
    min-width: 520px;
}
.auth-form textarea {
    width: 100%;
    min-height: 88px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
}
.auth-form select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px;
    font-size: 15px;
    background: #fff;
}
.auth-form input[type="file"] {
    padding: 8px;
    font-size: 14px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
}
.auth-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 18px 48px rgba(8, 33, 27, 0.22);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}
.auth-card h1 { margin-top: 0; }
.auth-card p { color: var(--text-light); }
.auth-brand { margin-bottom: 10px; }
.auth-form { display: grid; gap: 12px; margin: 14px 0; }
.auth-form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}
@media (max-width: 480px) {
    .auth-form-actions { grid-template-columns: 1fr; }
}

/* Registration: account type picker + themed secondary actions */
.auth-wrap-picker {
    width: min(100%, 760px);
}
.reg-picker-card {
    text-align: center;
    padding: 28px 24px 26px;
}
.reg-picker-card h1 {
    margin: 0 0 6px;
    font-size: clamp(1.35rem, 3vw, 1.6rem);
    color: var(--text-dark);
}
.reg-picker-lead {
    color: var(--text-light);
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.55;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.account-type-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
    text-align: left;
}
@media (max-width: 720px) {
    .account-type-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }
}
.account-type-card {
    display: grid;
    gap: 8px;
    justify-items: start;
    align-content: start;
    text-align: left;
    padding: 18px 16px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-dark);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 250, 248, 0.92) 100%);
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    box-shadow: 0 6px 22px rgba(8, 33, 27, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}
.account-type-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.35), rgba(var(--primary-light-rgb), 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.account-type-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--primary-rgb), 0.28);
    box-shadow: 0 14px 36px rgba(var(--primary-rgb), 0.16);
}
.account-type-card:hover::before {
    opacity: 1;
}
.account-type-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}
.account-type-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--gradient-1);
    color: #fff;
    font-size: 22px;
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.28);
}
.account-type-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}
.account-type-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.45;
}
.account-type-cta {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.account-type-card:hover .account-type-cta {
    color: var(--primary-light);
}
.account-type-cta .icofont {
    font-size: 12px;
    transition: transform 0.2s ease;
}
.account-type-card:hover .account-type-cta .icofont {
    transform: translateX(3px);
}
.reg-picker-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}
.reg-picker-foot {
    display: block;
    color: var(--text-light);
    line-height: 1.65;
    font-size: 14px;
}
.reg-picker-foot a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.reg-picker-foot a:hover {
    text-decoration: underline;
}

/* Ghost / outline cancel — matches portal green theme on auth cards */
.btn-cancel-themed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 22px;
    background: rgba(var(--primary-rgb), 0.07);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb), 0.38);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.btn-cancel-themed:hover {
    background: rgba(var(--primary-rgb), 0.12);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.12);
    transform: translateY(-1px);
}
.btn-cancel-themed:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.1);
}
.btn-cancel-themed.btn-ico {
    gap: 0;
    padding: 12px 18px;
    min-width: 44px;
}
.btn-cancel-themed.btn-full.btn-ico {
    width: 100%;
    justify-content: center;
}
.btn-cancel-themed:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.reg-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    border-radius: 8px;
}
.reg-back-link:hover {
    text-decoration: underline;
    color: var(--primary-light);
}
.reg-back-link .icofont {
    font-size: 15px;
}

.reg-form-panel-solo {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.form-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}
.form-actions-row .btn { text-align: center; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--text-light); }
input {
    width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 11px;
    font-size: 15px;
}
.alert-error {
    background: #ffe6e6; color: #8e1f1f; border: 1px solid #efb2b2;
    padding: 10px; border-radius: 10px; margin: 10px 0;
}
.alert-success {
    background: #e8fbef;
    color: #145a2f;
    border: 1px solid #9dd8b1;
    padding: 10px;
    border-radius: 10px;
    margin: 0 0 12px;
}
.brand-logo-fallback {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb),0.1);
    color: var(--primary);
}

/* Full viewport column: sidebar stretches with main and scrolls inside nav */
.panel-shell {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 260px 1fr;
    align-items: stretch;
    grid-template-rows: minmax(0, 1fr);
}
.panel-shell.sidebar-collapsed { grid-template-columns: 74px 1fr; }
.panel-body {
    position: relative;
    overflow-x: hidden;
    min-height: 100%;
    min-height: 100dvh;
    height: 100%;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 10% 5%, rgba(var(--primary-light-rgb),0.24) 0%, rgba(var(--primary-light-rgb),0) 35%),
        radial-gradient(circle at 90% 0%, rgba(212,168,83,0.24) 0%, rgba(212,168,83,0) 28%),
        radial-gradient(circle at 85% 85%, rgba(var(--primary-rgb),0.14) 0%, rgba(var(--primary-rgb),0) 32%),
        var(--sand);
}
.panel-body::before,
.panel-body::after {
    content: "";
    position: fixed;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(70px);
    z-index: -1;
    opacity: 0.45;
    animation: splashMove 8s ease-in-out infinite;
}
.panel-body::before {
    left: -120px;
    bottom: -140px;
    background: rgba(var(--primary-rgb), 0.55);
}
.panel-body::after {
    right: -120px;
    top: -120px;
    background: rgba(212, 168, 83, 0.55);
    animation-delay: -4s;
}
@keyframes splashMove {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-16px) scale(1.08); }
}
/* Aligned with .panel-footer / .panel-top: frosted bar + same border tone */
.sidebar {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-dark);
    border-right: 1px solid rgba(217, 226, 222, 0.85);
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 6px 0 20px rgba(8, 25, 23, 0.06);
    align-self: stretch;
    min-height: 0;
    height: 100%;
    max-height: none;
    overflow: hidden;
}
.sidebar-brand {
    font-weight: 700;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
    flex-shrink: 0;
}
.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}
.sidebar-logo-image {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
}
.brand-image {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}
.favicon-image {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.brand-text { white-space: nowrap; }
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.sidebar-nav .nav-link {
    animation: navSlideIn 0.35s ease both;
}
.sidebar-nav .nav-link:nth-child(1) { animation-delay: 0.03s; }
.sidebar-nav .nav-link:nth-child(2) { animation-delay: 0.05s; }
.sidebar-nav .nav-link:nth-child(3) { animation-delay: 0.07s; }
.sidebar-nav .nav-link:nth-child(4) { animation-delay: 0.09s; }
.sidebar-nav .nav-link:nth-child(5) { animation-delay: 0.11s; }
.sidebar-nav .nav-link:nth-child(6) { animation-delay: 0.13s; }
.sidebar-nav .nav-link:nth-child(7) { animation-delay: 0.15s; }
.sidebar-nav .nav-link:nth-child(8) { animation-delay: 0.17s; }
.sidebar-nav .nav-link:nth-child(9) { animation-delay: 0.19s; }
.sidebar-nav .nav-link:nth-child(10) { animation-delay: 0.21s; }
.sidebar-nav .nav-link:nth-child(11) { animation-delay: 0.23s; }
.sidebar-nav .nav-link:nth-child(12) { animation-delay: 0.25s; }
.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 14px;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background .2s ease, transform .2s ease, color .2s ease;
}
.nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.nav-icon i,
.brand-logo i {
    font-size: 18px;
    line-height: 1;
}
.nav-label { white-space: nowrap; color: var(--text-dark); }
.nav-link:hover {
    background: rgba(var(--primary-rgb), 0.08);
    transform: translateX(2px);
}
.nav-link.active {
    background: rgba(var(--primary-rgb), 0.14);
    color: var(--primary);
    font-weight: 600;
}
.nav-link.active .nav-label {
    color: var(--primary);
}
.nav-link.active .nav-icon {
    background: rgba(var(--primary-rgb), 0.2);
}
.panel-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    width: 100%;
    height: 100%;
    align-self: stretch;
}
.panel-top {
    position: relative;
    flex-shrink: 0;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(217, 226, 222, 0.7);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    display: flex; gap: 10px; align-items: center;
}
.top-right-user {
    margin-left: auto;
    text-align: right;
    padding-right: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    padding: 6px 8px;
    transition: background .2s ease, border-color .2s ease;
}
.top-right-user:hover {
    background: rgba(var(--primary-rgb),0.08);
    border-color: rgba(var(--primary-rgb),0.15);
}
.menu-caret {
    color: var(--text-light);
    font-size: 12px;
}
.user-dropdown {
    position: absolute;
    right: 16px;
    top: 58px;
    min-width: 170px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(10, 38, 33, 0.16);
    padding: 6px;
    display: none;
    z-index: 40;
}
.user-dropdown.open {
    display: block;
}
.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 8px;
}
.user-dropdown a:hover {
    background: rgba(var(--primary-rgb),0.1);
}
.top-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}
.top-avatar-fallback {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb),0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}
.panel-top p { margin: 2px 0 0; color: var(--text-light); font-size: 13px; }
.toggle-btn { border: 1px solid var(--border); border-radius: 8px; background: #fff; width: 36px; height: 36px; }
@media (max-width: 480px) {
    .panel-top {
        flex-wrap: wrap;
        align-items: flex-start;
        row-gap: 8px;
    }
    .top-right-user {
        margin-left: 0;
        flex: 1 1 100%;
        max-width: 100%;
        justify-content: flex-start;
        min-width: 0;
    }
    .top-right-user > div {
        min-width: 0;
        text-align: left;
    }
    .top-right-user strong {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
.panel-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
}
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(217, 226, 222, 0.7);
    border-radius: 14px;
    padding: 16px;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 28px rgba(20, 52, 45, 0.08);
    animation: cardRise .35s ease both;
}
.card h1, .card h2, .card h3 {
    letter-spacing: .2px;
}
.dashboard-kpi-grid {
    gap: 16px;
    margin-bottom: 4px;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
}
.dashboard-kpi-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(var(--primary-rgb), 0.16);
    background:
        linear-gradient(165deg, rgba(var(--primary-rgb), 0.08) 0%, rgba(255, 255, 255, 0.92) 58%),
        rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 26px rgba(20, 52, 45, 0.09);
}
.dashboard-kpi-card::after {
    content: "";
    position: absolute;
    top: -30px;
    right: -22px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.14) 0%, rgba(var(--primary-rgb), 0) 70%);
    pointer-events: none;
}
.qr-scan-page .card,
.finance-page .card,
.payments-page .card,
.migrations-page .card,
.hr-page .card {
    position: relative;
    overflow: hidden;
    border-color: rgba(var(--primary-rgb), 0.16);
    background:
        linear-gradient(165deg, rgba(var(--primary-rgb), 0.08) 0%, rgba(255, 255, 255, 0.92) 58%),
        rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 26px rgba(20, 52, 45, 0.09);
}
.qr-scan-page .card::after,
.finance-page .card::after,
.payments-page .card::after,
.migrations-page .card::after,
.hr-page .card::after {
    content: "";
    position: absolute;
    top: -30px;
    right: -22px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.12) 0%, rgba(var(--primary-rgb), 0) 72%);
    pointer-events: none;
}
.qr-scan-page .card > *,
.finance-page .card > *,
.payments-page .card > *,
.migrations-page .card > *,
.hr-page .card > * {
    position: relative;
    z-index: 1;
}
.qr-scan-page .card h2,
.qr-scan-page .card h3,
.finance-page .card h2,
.finance-page .card h3,
.payments-page .card h2,
.payments-page .card h3,
.migrations-page .card h2,
.migrations-page .card h3,
.hr-page .card h2,
.hr-page .card h3 {
    margin-top: 0;
    color: rgba(26, 95, 74, 0.95);
    letter-spacing: 0.02em;
}
.qr-scan-summary-grid .card p,
.payment-summary-grid .card p {
    margin: 8px 0 10px;
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
    font-weight: 800;
    line-height: 1.05;
    color: var(--text-dark);
}
.qr-scan-summary-grid .card .muted,
.payment-summary-grid .card .muted {
    font-size: 0.84rem;
}
.qr-scan-nav-card {
    border-color: rgba(var(--primary-rgb), 0.18);
}
.qr-scan-day-card .company-table-card,
.finance-page .company-table-card,
.payments-page .company-table-card,
.migrations-page .company-table-card,
.hr-page .company-table-card {
    background: rgba(255, 255, 255, 0.88);
    border-radius: 12px;
}
.migrations-page .grid.grid-3 .card p {
    margin: 8px 0 10px;
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
    font-weight: 800;
    line-height: 1.05;
    color: var(--text-dark);
}
.hr-attendance-grid .card p {
    margin: 8px 0 10px;
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
    font-weight: 800;
    line-height: 1.05;
    color: var(--text-dark);
}
.hr-attendance-grid .card h3,
.qr-scan-summary-grid .card h3,
.migrations-page .grid.grid-3 .card h3,
.finance-page .payment-summary-grid .card h3,
.payments-page .payment-summary-grid .card h3 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.hr-kpi-icon,
.qr-kpi-icon,
.migration-kpi-icon {
    color: var(--primary);
    font-size: 1rem;
}
.finance-page .payment-summary-grid .card h3::before {
    content: "\eed6";
    font-family: IcoFont, sans-serif;
    color: var(--primary);
    font-size: 0.95rem;
}
.payments-page .payment-summary-grid .card h3::before {
    content: "\ef3f";
    font-family: IcoFont, sans-serif;
    color: var(--primary);
    font-size: 0.95rem;
}
.finance-page .payment-summary-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
}
@media (max-width: 1100px) {
    .finance-page .payment-summary-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}
@media (max-width: 640px) {
    .finance-page .payment-summary-grid {
        grid-template-columns: 1fr;
    }
}
.dashboard-kpi-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: rgba(26, 95, 74, 0.94);
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.dashboard-kpi-value {
    margin: 8px 0 10px;
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    font-weight: 800;
    line-height: 1;
    color: var(--text-dark);
}
.dashboard-kpi-note {
    margin: 0;
    color: var(--text-light);
    font-size: 0.84rem;
}
.dashboard-kpi-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dashboard-kpi-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--text-dark);
    font-size: 0.78rem;
    font-weight: 600;
}
.dashboard-kpi-icon {
    font-size: 1rem;
    color: var(--primary);
}
@media (max-width: 1100px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}
@media (max-width: 640px) {
    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }
}
.form-stack { display: grid; gap: 10px; }
.form-stack textarea {
    width: 100%;
    min-height: 88px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
}
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px;
    font-size: 15px;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table th,
.table td {
    text-align: left;
    border-bottom: 1px solid var(--border);
    padding: 8px;
}
.branding-form .branding-section {
    padding: 18px 0 8px;
    margin: 0;
    border-top: 1px solid rgba(217, 226, 222, 0.85);
}
.branding-form .branding-section:first-of-type {
    border-top: 0;
    padding-top: 4px;
}
.branding-form .branding-section-title {
    margin: 0 0 6px;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.02em;
}
.branding-form .branding-section-title--inline {
    margin-bottom: 8px;
}
.branding-form .branding-section-lead {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.45;
}
.branding-upload-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.branding-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}
.branding-checkbox-label input {
    width: auto;
    min-width: auto;
    margin: 0;
    accent-color: var(--primary);
}
.branding-section--preview {
    padding-bottom: 4px;
}
.branding-section--preview .branding-preview {
    margin-top: 4px;
}
.branding-form-actions {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(217, 226, 222, 0.85);
}
.seasonal-theme-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.seasonal-theme-lead {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.5;
}
.seasonal-theme-select-label {
    display: block;
    margin-bottom: 14px;
    font-weight: 600;
    font-size: 14px;
}
.seasonal-theme-select {
    margin-top: 6px;
}
.seasonal-theme-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.seasonal-theme-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(217, 226, 222, 0.95);
    background: rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.seasonal-theme-switch-label {
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
}
.seasonal-theme-row-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-dark);
    min-width: 100px;
}
.seasonal-theme-icon-col {
    flex: 1 1 220px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.seasonal-theme-file-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin: 0;
    flex: 1 1 200px;
}
.seasonal-theme-file {
    font-size: 13px;
}
.seasonal-theme-icon-preview {
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 4px;
    background: #fff;
}
.seasonal-theme-icon-preview img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.seasonal-theme-footnote {
    margin: 0;
    font-size: 13px;
}
.seasonal-theme-footnote code {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.04);
}
.branding-preview {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.login-bg-preview {
    width: 100%;
    max-width: 180px;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.avatar-preview {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}
.placeholder-module-card {
    margin-top: 12px;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.55;
}

/* —— Tariffs page (uses .hr-page / .hr-tab-group like HR; price list blocks below) —— */
.hr-tab-group--tariffs .hr-tab {
    min-width: 118px;
    padding-left: 14px;
    padding-right: 14px;
}
.tariff-price-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 4px;
}
.tariff-price-list-empty {
    padding: 20px 22px;
}
.tariff-price-list-section {
    padding: 0;
    overflow: hidden;
}
.tariff-price-list-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 18px 22px 12px;
    border-bottom: 1px solid var(--border);
    background: rgba(var(--primary-rgb), 0.04);
}
.tariff-price-list-section-title {
    margin: 0;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}
.tariff-price-list-section-meta {
    font-size: 13px;
}
.tariff-price-list-empty-cat {
    margin: 0;
    padding: 16px 22px 20px;
}
.tariff-price-list-table-wrap {
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}
.tariff-price-list-table {
    margin: 0;
}
.tariff-price-list-table thead th {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--text-dark);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.14);
    white-space: nowrap;
}
.tariff-price-list-table tbody td {
    padding: 12px 14px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}
.tariff-price-list-table tbody tr:last-child td {
    border-bottom: none;
}
.tariff-price-list-table tbody tr:hover td {
    background: rgba(var(--primary-rgb), 0.035);
}
.tariff-price-list-table th,
.tariff-price-list-table td {
    vertical-align: middle;
}
.tariff-rules-saved-section .tariff-price-list-table-wrap {
    border-top: 1px solid var(--border);
}
.tariff-rules-saved-lead {
    margin: 0;
    padding: 4px 22px 14px;
    font-size: 13px;
    line-height: 1.5;
}
.tariff-rules-saved-table .tariff-rules-saved-th-num,
.tariff-rules-saved-table .tariff-rules-saved-price {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.tariff-rules-saved-table .tariff-rules-saved-price {
    font-weight: 600;
    color: var(--text-dark);
}
.tariff-rules-saved-table .tariff-rules-saved-th-actions,
.tariff-rules-saved-table .td-actions {
    text-align: right;
    white-space: nowrap;
}
.tariff-rules-saved-table .td-actions {
    vertical-align: middle;
}
.tariff-price-list-table tbody td:last-child {
    vertical-align: top;
}
.tariff-rules-saved-table tbody td:last-child {
    vertical-align: middle;
}
.tariff-rules-saved-table {
    min-width: 640px;
}
.tariff-period-sep {
    margin: 0 6px;
    color: var(--text-light);
    font-weight: 500;
    font-size: 13px;
}
.tariff-role-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 320px;
}
.tariff-role-pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    border: 1px solid transparent;
}
.tariff-role-pill--on {
    background: rgba(var(--primary-rgb), 0.14);
    color: var(--primary);
    border-color: rgba(var(--primary-rgb), 0.28);
}
.tariff-role-pill--off {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-light);
    border-color: var(--border);
    opacity: 0.72;
}
.tariff-assigned-hint {
    margin: 0 0 14px;
}
.tariff-role-switch-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 520px;
}
.tariff-role-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.65);
}
.tariff-role-switch-label {
    font-weight: 600;
    font-size: 14px;
}
.tariff-rules-saved-section {
    margin-top: 8px;
}
.tariff-rule-form-card {
    margin-bottom: 4px;
}
.tariff-band-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}
.tariff-band-fieldset {
    margin: 0;
    padding: 14px 16px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
}
.tariff-band-legend {
    padding: 0 6px;
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
}
.tariff-band-row {
    align-items: end;
}
@media (max-width: 900px) {
    .tariff-band-row {
        grid-template-columns: 1fr;
    }
}
.tariff-band-final-hint {
    margin: 10px 0 0;
    font-size: 13px;
}
a.tariff-currency-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    vertical-align: middle;
    margin-left: 2px;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb), 0.28);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
a.tariff-currency-badge:hover {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary-dark, var(--primary));
    box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.12);
    transform: translateY(-1px);
}

/* Profile — applicable tariffs (guest / agency / tour operator) */
.profile-tariff-panel {
    margin-top: 10px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}
.profile-tariff-panel h2 {
    margin: 0 0 10px;
    font-size: 1.08rem;
    letter-spacing: 0.02em;
    color: var(--primary);
}
.profile-tariff-lead {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.55;
}
.profile-tariff-refdate {
    margin: 0 0 16px;
    font-size: 13px;
}
.profile-tariff-refdate-label {
    font-weight: 600;
    color: var(--text-light);
    margin-right: 8px;
}
.profile-tariff-price-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.profile-tariff-cat-card {
    margin: 0;
}
.profile-tariff-empty {
    margin-top: 4px;
}
.profile-tariff-mini-table tbody td,
.profile-tariff-mini-table tbody td:last-child {
    vertical-align: middle;
}

/* —— HR page (Category / Employed tabs) —— */
.hr-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 4px;
}
.hr-page-head h1 {
    margin: 0;
}
.hr-tab-group {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 2px 8px rgba(20, 52, 45, 0.06);
}
@media (max-width: 640px) {
    .hr-tab-group {
        display: flex;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
    }
    .hr-tab {
        flex: 0 0 auto;
    }
}
.hr-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    border-right: 1px solid var(--border);
}
.hr-tab:last-child {
    border-right: none;
}
.hr-tab:hover:not(.is-active) {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.08);
}
.hr-tab.is-active {
    background: var(--primary);
    color: #fff;
}
.hr-tab.is-active:hover {
    color: #fff;
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.22);
}
.hr-page-lead {
    margin: 0 0 18px;
    max-width: 640px;
    line-height: 1.5;
}
.hr-attendance-grid {
    margin-bottom: 12px;
}
.hr-attendance-card {
    margin-bottom: 16px;
}
.hr-tab-panel {
    padding: 20px 22px;
}
.hr-panel-title {
    margin: 0 0 10px;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}
.hr-list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.hr-list-head .btn.btn-primary {
    /* Match panel primary actions (e.g. Users “Add user”) */
    padding: 12px 20px;
    font-size: 15px;
    line-height: 1.25;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-weight: 600;
}
.hr-actions-bar-separated {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}
.hr-tax-item {
    align-items: end;
    gap: 8px;
}
.hr-tax-item label {
    margin-bottom: 0;
}
.hr-tax-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.hr-row-actions {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}
.hr-row-actions .btn-inline {
    margin-right: 0;
}
.hr-row-actions .inline-form {
    flex-shrink: 0;
}
.hr-row-actions .inline-form button {
    margin: 0;
}
.hr-inline-form {
    display: inline-block;
    margin: 0;
}
.hr-btn-danger {
    border-color: #c24133 !important;
    color: #c24133 !important;
}
.hr-btn-danger:hover {
    background: rgba(194, 65, 51, 0.08) !important;
}
.hr-subnav {
    margin: 0 0 14px;
}
.hr-view-dl {
    margin-top: 8px;
}
.hr-cell-multiline {
    max-width: 240px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-light);
}
.hr-table .th-actions {
    width: auto;
    min-width: 168px;
    white-space: nowrap;
    text-align: right;
}
.hr-table .td-actions {
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
    min-width: 168px;
}
.hr-table-card {
    margin-top: 0;
}
.hr-qr-cell {
    text-align: center;
    vertical-align: middle;
    min-width: 104px;
}
.hr-qr-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
    cursor: pointer;
    font: inherit;
}
.hr-qr-link:hover {
    border-color: var(--primary-light);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2);
}
.hr-qr-image {
    display: block;
    width: 88px;
    height: 88px;
    image-rendering: crisp-edges;
    overflow: hidden;
}
.hr-qr-image img,
.hr-qr-image canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.hr-qr-open-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1;
}
.hr-view-qr-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.hr-view-qr-image {
    width: 120px;
    height: 120px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 6px;
    overflow: hidden;
}
.hr-view-qr-image img,
.hr-view-qr-image canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.hr-qr-dialog {
    border: none;
    border-radius: 16px;
    padding: 0;
    width: min(640px, calc(100vw - 28px));
    background: transparent;
}
.hr-qr-dialog::backdrop {
    background: rgba(9, 20, 26, 0.45);
    backdrop-filter: blur(2px);
}
.hr-qr-dialog-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}
.hr-qr-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.hr-qr-dialog-head .hr-panel-title {
    margin: 0;
}
.hr-qr-dialog-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    align-items: start;
}
.hr-qr-dialog-image {
    width: 260px;
    height: 260px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    padding: 8px;
    overflow: hidden;
}
.hr-qr-dialog-image img,
.hr-qr-dialog-image canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.hr-qr-dialog-fields {
    margin-top: 0;
}
.hr-qr-dialog-values {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 0;
}
.hr-qr-dialog-value {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.2;
    word-break: break-word;
}
@media (max-width: 740px) {
    .hr-qr-dialog-body {
        grid-template-columns: 1fr;
    }
    .hr-qr-dialog-image {
        width: min(260px, 100%);
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

/* —— Map Park admin —— */
.map-park-page {
    max-width: 1100px;
}
.map-admin-preview-card {
    padding: 20px 22px;
}
.map-admin-preview-title {
    margin: 0 0 14px;
    font-size: 1.35rem;
    color: var(--primary);
    letter-spacing: 0.02em;
}
.map-admin-preview-stage {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.65);
    line-height: 0;
}
.map-admin-preview-bg {
    display: block;
    width: 100%;
    height: auto;
}
.map-admin-preview-logo {
    position: absolute;
    top: 14px;
    right: 14px;
    max-height: 72px;
    max-width: min(42%, 200px);
    width: auto;
    height: auto;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.22));
    pointer-events: none;
}
.map-overlay-item-btn {
    position: absolute;
    z-index: 2;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    line-height: 0;
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.2));
    box-sizing: border-box;
}
.map-overlay-item-btn:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}
.map-overlay-item-btn-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    pointer-events: none;
    vertical-align: top;
    object-fit: contain;
}
.map-admin-preview-pin {
    position: absolute;
    left: 8%;
    z-index: 3;
    transform: translate(-50%, -50%);
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--gradient-1);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    line-height: 32px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
    border: 2px solid #fff;
    pointer-events: none;
}
.map-admin-preview-placeholder {
    min-height: 260px;
    line-height: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.08), rgba(212, 168, 83, 0.1));
}
.map-admin-preview-placeholder-inner {
    text-align: center;
    padding: 28px 20px;
    max-width: 360px;
    color: var(--text-light);
    font-size: 14px;
}
.map-admin-preview-placeholder-inner .icofont {
    font-size: 42px;
    color: var(--primary);
    opacity: 0.65;
    display: block;
    margin-bottom: 12px;
}
.map-admin-preview-placeholder a,
.map-admin-preview-empty a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}
.map-admin-preview-placeholder a:hover,
.map-admin-preview-empty a:hover {
    text-decoration: underline;
}
.map-admin-preview-legend {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.88);
}
.map-admin-preview-legend-title {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}
.map-admin-preview-ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}
.map-admin-preview-ol .map-admin-preview-ol-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}
.map-admin-preview-legend-name {
    flex: 1;
    min-width: 0;
}
.map-admin-preview-pin-na {
    font-size: 13px;
    min-width: 40px;
    text-align: center;
}
.map-admin-preview-legend-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: 8px;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
    border: 1px solid transparent;
}
.map-pin-color-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 12px;
    align-items: start;
}
.map-pin-color-row label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-weight: 600;
    color: var(--text-dark);
}
.map-pin-color-row input[type="color"] {
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
    max-width: 72px;
    padding: 0;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    box-sizing: border-box;
    box-shadow: 0 2px 12px rgba(20, 52, 45, 0.1);
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.map-pin-color-row input[type="color"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.15);
    border-color: rgba(var(--primary-rgb), 0.35);
}
.map-pin-color-row input[type="color"]:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}
.map-pin-color-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
.map-pin-color-row input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 10px;
}
.map-pin-color-row input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 8px;
}
.map-attr-view-colors {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.map-attr-color-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 15px;
    border: 2px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.map-admin-preview-empty {
    margin: 14px 0 0;
    font-size: 14px;
}

.map-poi-dialog {
    width: calc(100% - 24px);
    max-width: 520px;
    padding: 0;
    border: none;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(8, 33, 27, 0.35);
    background: #fff;
}
.map-poi-dialog::backdrop {
    background: rgba(12, 40, 32, 0.45);
    backdrop-filter: blur(3px);
}
.map-poi-dialog-form {
    padding: 20px 22px 22px;
}
.map-poi-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.map-poi-dialog-title {
    margin: 0;
    font-size: 1.15rem;
    color: var(--primary);
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}
.map-poi-dialog-lead {
    margin: 0 0 14px;
    font-size: 13px;
}
.map-poi-modal-preview {
    padding: 12px;
    margin-bottom: 14px;
}
.map-poi-modal-stage {
    position: relative;
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
    border: 1px solid var(--border);
}
.map-poi-modal-hit {
    cursor: crosshair;
}
.map-poi-modal-bg {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: min(48vh, 400px);
    width: auto;
    margin: 0 auto;
}
.map-poi-modal-pin {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--gradient-1);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    line-height: 34px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
    border: 2px solid #fff;
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
}
.map-poi-modal-pin:active {
    cursor: grabbing;
}
.map-poi-position-wrap {
    margin-bottom: 6px;
}
.map-poi-dialog-actions {
    margin-top: 16px;
}

.map-item-modal-marker {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 14%;
    max-width: min(92%, 280px);
    height: auto;
    object-fit: contain;
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
    transform: translate(-50%, -50%) rotate(0deg);
    transform-origin: center center;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
    box-sizing: border-box;
}
.map-item-modal-marker:active {
    cursor: grabbing;
}
.map-item-size-rot-row {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}
@media (min-width: 420px) {
    .map-item-size-rot-row {
        grid-template-columns: 1fr 1fr;
        align-items: end;
    }
}
.map-item-rotation-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}
.map-item-width-range {
    width: 100%;
    max-width: 100%;
    accent-color: var(--primary);
}
.map-item-width-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}
.map-item-width-number {
    max-width: 88px;
    margin-top: 4px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 15px;
}
.map-item-dialog .map-poi-position-wrap,
.map-item-dialog .qr-offset-cluster,
.map-item-dialog .qr-grid-3x3 {
    position: relative;
    z-index: 1;
}
.map-item-dialog .offset-btn,
.map-item-dialog .qr-grid-btn {
    position: relative;
    z-index: 2;
}
.map-item-rotation-input {
    max-width: 140px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 15px;
}
.map-park-view-item-dialog {
    z-index: 60;
}
.map-admin-preview-legend--map-items {
    margin-top: 14px;
}
.map-admin-preview-map-items-ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}
.map-admin-preview-map-items-li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}
.map-admin-preview-map-item-thumb-wrap {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(var(--primary-rgb), 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}
.map-admin-preview-map-item-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.map-admin-preview-map-item-name {
    flex: 1;
    min-width: 0;
}
.map-item-view-preview {
    margin: 12px 0 16px;
}
.map-item-view-img {
    max-width: min(280px, 100%);
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(var(--primary-rgb), 0.05);
}
.map-item-table-thumb {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(var(--primary-rgb), 0.05);
}
.td-map-item-thumb {
    width: 64px;
    vertical-align: middle;
}

.map-poi-gallery-block {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.map-poi-gallery-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}
.map-poi-gallery-hint {
    margin: 0 0 12px;
    font-size: 13px;
}
.map-poi-gallery-existing {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.map-poi-gallery-empty {
    margin: 0;
    font-size: 13px;
}
.map-poi-gallery-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.map-poi-gallery-row:hover {
    background: rgba(var(--primary-rgb), 0.05);
    border-color: rgba(var(--primary-rgb), 0.25);
}
.map-poi-gallery-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex-shrink: 0;
}
.map-poi-gallery-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.map-poi-gallery-remove-cap {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-left: auto;
}
.map-poi-gallery-upload-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
}

.map-settings-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 8px;
}
.map-settings-stack .collapsible-card {
    margin: 0;
}
.map-settings-save-bar {
    margin-top: 4px;
}
.map-landing-html-textarea {
    width: 100%;
    min-height: 140px;
    font-family: ui-monospace, monospace;
    font-size: 13px;
    line-height: 1.45;
}
.collapsible-card summary .icofont {
    margin-right: 8px;
    opacity: 0.85;
}
.map-attr-drag-hint {
    margin: 0 0 12px;
    font-size: 13px;
}
.map-reorder-form-hidden {
    display: none;
}
.map-attr-table .th-drag,
.map-attr-table .td-drag {
    width: 40px;
    text-align: center;
    vertical-align: middle;
}
.map-attr-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--text-light);
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.map-attr-drag-handle:hover {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
    transform: scale(1.06);
}
.map-attr-drag-handle:active {
    cursor: grabbing;
    transform: scale(0.98);
}
.map-attr-table tr.is-dragging {
    opacity: 0.45;
}
.map-attr-table tr.drag-over {
    outline: 2px dashed var(--primary);
    outline-offset: -2px;
    background: rgba(var(--primary-rgb), 0.06);
}
.map-upload-block {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.map-upload-block:first-of-type {
    margin-top: 8px;
    padding-top: 0;
    border-top: none;
}
.map-upload-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
}
.map-upload-hint {
    margin: 0 0 10px;
    font-size: 13px;
}
.map-preview-wrap {
    margin-top: 12px;
}
.map-preview-img {
    max-width: 100%;
    max-height: 220px;
    margin-top: 8px;
    border-radius: 10px;
    border: 1px solid var(--border);
    object-fit: contain;
    background: rgba(255, 255, 255, 0.5);
}
.map-preview-logo {
    max-height: 100px;
}
.map-attr-table .map-toggle-form {
    margin: 0;
    display: inline-flex;
    align-items: center;
}
.map-form-active-switch {
    margin-top: 4px;
}

.panel-footer {
    margin-top: auto;
    padding: 12px 16px;
    border-top: 1px solid rgba(217, 226, 222, 0.7);
    background: rgba(255,255,255,0.76);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-light);
}
/* Dashboard: footer pinned to bottom of viewport, full width of main column */
.panel-main > .panel-footer {
    flex-shrink: 0;
    align-self: stretch;
    width: 100%;
    max-width: none;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
    border-radius: 0;
    padding-left: clamp(16px, 3vw, 28px);
    padding-right: clamp(16px, 3vw, 28px);
}
/* Public landing: footer at bottom of viewport, full page width */
.landing-body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
.landing-body > .navbar {
    flex-shrink: 0;
}
.landing-body > .navbar .navbar-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.landing-body > .navbar .navbar-cta .hero-buttons {
    margin-top: 0;
}
.nav-inline-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}
.nav-inline-link:hover {
    color: var(--primary);
}
.landing-body > .landing-map-section {
    flex-shrink: 0;
    padding: 16px clamp(16px, 4vw, 28px) 0;
    width: 100%;
    box-sizing: border-box;
}
.hero--with-landing-map {
    min-height: auto;
    display: block;
    padding: 24px 20px 40px;
}
.landing-body > .hero {
    flex: 1 1 auto;
}
.landing-body > .features {
    flex-shrink: 0;
}
.landing-body > .panel-footer {
    flex-shrink: 0;
    margin-top: auto;
    width: 100%;
    max-width: none;
    align-self: stretch;
    box-sizing: border-box;
    border-radius: 0;
    padding-left: clamp(16px, 3vw, 28px);
    padding-right: clamp(16px, 3vw, 28px);
}
/* Login / register: footer full-width under centered card */
.auth-body.auth-body-with-footer {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    min-height: 100vh;
    min-height: 100dvh;
}
.auth-body.auth-body-with-footer .auth-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    min-height: 0;
}
.auth-body.auth-body-with-footer > .panel-footer {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    align-self: stretch;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    border-radius: 0;
    margin-top: auto;
    padding-left: clamp(16px, 3vw, 28px);
    padding-right: clamp(16px, 3vw, 28px);
}
.panel-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.panel-footer-right {
    font-weight: 600;
}
.footer-logo {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: contain;
}
.payment-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.payment-summary-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 14px;
}
.settings-group-title {
    margin: 8px 0 2px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .6px;
}
.provider-card {
    display: grid;
    gap: 12px;
}
.provider-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.provider-logo {
    width: 128px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
}
.provider-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-dark);
    padding: 4px 8px;
}
.switch-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.switch-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.switch-slider {
    width: 42px;
    height: 22px;
    border-radius: 999px;
    background: #cfd8d4;
    position: relative;
    transition: background .2s ease;
    flex-shrink: 0;
}
.switch-slider::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.switch-input:checked + .switch-slider {
    background: var(--primary-light);
}
.switch-input:checked + .switch-slider::after {
    transform: translateX(20px);
}
.switch-state {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    min-width: 54px;
}
.switch-input:checked + .switch-slider + .switch-state {
    color: var(--primary);
}
.collapsible-card summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    padding-bottom: 10px;
}
.collapsible-card summary::-webkit-details-marker {
    display: none;
}
.collapsible-card[open] summary {
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}
.collapsible-card summary small {
    color: var(--text-light);
    font-weight: 500;
}
.settings-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 12px;
}
.settings-cards-stack .collapsible-card {
    margin: 0;
}
.qr-employed-switch-list {
    display: grid;
    gap: 10px;
}
.qr-employed-switch-row {
    padding: 10px 12px;
}
.qr-employed-switch-row strong {
    display: block;
    line-height: 1.2;
}
.qr-employed-switch-help {
    margin: 4px 0 0;
    font-size: 12px;
}

/* Super Admin: App branding + Role permissions on Users → Edit user */
.user-superadmin-panel-card {
    margin-top: 18px;
    padding: 0;
    overflow: hidden;
}
.user-superadmin-panel-card > .user-superadmin-panel-summary {
    padding: 14px 18px;
    margin: 0;
}
.user-superadmin-panel-card.collapsible-card[open] > .user-superadmin-panel-summary {
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}
.user-superadmin-panel-body {
    padding: 12px 18px 18px;
}
.permissions-embed-body .perm-catalog-card:first-child h2.perm-section-title {
    margin-top: 0;
}
@keyframes navSlideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes cardRise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-shell.sidebar-collapsed .sidebar {
    align-items: center;
}
.panel-shell.sidebar-collapsed .brand-text,
.panel-shell.sidebar-collapsed .nav-label {
    display: none;
}
.panel-shell.sidebar-collapsed .sidebar-brand,
.panel-shell.sidebar-collapsed .nav-link {
    justify-content: center;
    width: 100%;
}

.muted { color: var(--text-light); font-size: 14px; margin: 0 0 8px; }
.grid-2 .full-span { grid-column: 1 / -1; }
.perm-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.perm-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

/* —— Tickets & QR admin —— */
.tickets-admin-page {
    max-width: 1100px;
}
.ticket-template-layout {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(300px, 1fr) minmax(280px, 360px);
    align-items: start;
}
@media (max-width: 960px) {
    .ticket-template-layout {
        grid-template-columns: 1fr;
    }
}
.ticket-designer-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ticket-designer-stack .collapsible-card {
    margin: 0;
}
.ticket-live-preview-card {
    padding: 20px 22px;
}
.ticket-live-preview-title {
    margin: 0 0 6px;
    font-size: 1.2rem;
    color: var(--primary);
    letter-spacing: 0.02em;
}
.ticket-live-preview-hint {
    margin: 0 0 14px;
}
.ticket-preview-shell--sticky {
    position: sticky;
    top: 16px;
}
.ticket-tf-style-row {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.ticket-notes-textarea {
    min-height: 72px;
    font-family: inherit;
}
.ticket-tf-overlay {
    position: absolute;
    z-index: 2;
    max-width: 88%;
    text-align: center;
    line-height: 1.3;
    pointer-events: none;
    word-break: break-word;
    font-weight: 600;
}
.ticket-qr-placeholder {
    z-index: 3;
}

.ticket-page-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: start;
}
.format-row {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.qr-position-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.qr-grid-3x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 120px;
}
.qr-grid-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease, background 0.2s ease;
}
.qr-grid-btn:hover:not(.active) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.12);
    border-color: rgba(var(--primary-rgb), 0.35);
}
.qr-grid-btn:active {
    transform: translateY(0);
}
.qr-grid-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25);
}
.qr-offset-cluster {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.offset-mid {
    display: flex;
    gap: 10px;
}
.offset-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.offset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.3);
}
.offset-btn:active {
    transform: translateY(0);
}
.qr-status {
    font-size: 13px;
    color: var(--text-light);
}
.ticket-preview-shell {
    display: flex;
    justify-content: center;
}
.ticket-preview-frame {
    position: relative;
    width: 100%;
    max-width: 320px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: calc(var(--w-mm, 210) / var(--h-mm, 99));
}
.ticket-preview-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ticket-preview-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(var(--primary-rgb),0.12), rgba(212,168,83,0.12));
    color: var(--text-light);
    font-size: 13px;
}
.ticket-qr-placeholder {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    border: 2px dashed var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(255,255,255,0.85);
}
.ticket-templates-list-section {
    margin-top: 20px;
}
.ticket-templates-list-title {
    margin: 0 0 12px;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
}
.ticket-templates-table-card {
    margin-top: 0;
}
.ticket-table .th-actions,
.ticket-table .td-actions {
    white-space: nowrap;
}
.ticket-table .td-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}
.ticket-table .td-actions .btn-inline,
.ticket-table .td-actions .inline-form {
    margin: 0;
}
.qr-scan-page .qr-scan-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.qr-scan-nav-card {
    text-decoration: none;
    color: inherit;
}
.qr-scan-nav-card:hover {
    transform: translateY(-1px);
}
.qr-scan-capture-card {
    margin-bottom: 16px;
}
.qr-scan-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.qr-scan-video {
    width: 100%;
    max-width: 460px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #000;
    margin-bottom: 8px;
}
.qr-scan-summary-grid {
    margin-bottom: 14px;
}
.qr-scan-day-card {
    margin-bottom: 12px;
}
.btn-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 13px;
    margin-right: 6px;
    vertical-align: middle;
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease, filter 0.2s ease;
}
.btn-inline:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.btn-inline:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.btn-inline.primary {
    background: var(--gradient-1);
    color: #fff;
    border: 0;
    box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.2);
}
.btn-inline.primary:hover {
    filter: brightness(1.06);
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.28);
}
.btn-inline.danger {
    border-color: #e5b4b4;
    color: #9b1c1c;
}
.btn-inline.danger:hover {
    background: #fff5f5;
    border-color: #d4a0a0;
}
.inline-form {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: none;
    vertical-align: middle;
}
.view-modal-card {
    margin-top: 16px;
}
.view-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

/* Companies module */
.company-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.company-page-head h1 {
    margin: 0;
}
.company-section-title {
    margin: 18px 0 8px;
    font-size: 1.05rem;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}
.company-view-card {
    margin-top: 12px;
}
.company-view-grid {
    display: grid;
    grid-template-columns: minmax(0, 140px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
@media (max-width: 640px) {
    .company-view-grid {
        grid-template-columns: 1fr;
    }
}
.company-logo-preview {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.company-logo-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), 0.08);
    display: grid;
    place-items: center;
    font-size: 36px;
    color: var(--primary);
}
.company-dl {
    display: grid;
    grid-template-columns: minmax(0, 160px) 1fr;
    gap: 8px 16px;
    margin: 0;
    font-size: 14px;
}
.company-dl dt {
    margin: 0;
    color: var(--text-light);
    font-weight: 600;
}
.company-dl dd {
    margin: 0;
    word-break: break-word;
}
.internal-notes-dd {
    background: rgba(var(--primary-rgb), 0.06);
    padding: 8px 10px;
    border-radius: 8px;
}
.company-banks-title {
    margin: 20px 0 10px;
    font-size: 1rem;
}
.company-bank-table .iban-code {
    font-size: 13px;
    word-break: break-all;
}
.company-bank-hint {
    margin: 0 0 10px;
}
.company-bank-row {
    margin-bottom: 12px;
    padding: 14px;
}
.bank-row-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.bank-row-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
}
.bank-rows-actions {
    margin-top: 8px;
}
.bank-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.company-logo-thumb {
    max-height: 48px;
    vertical-align: middle;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.company-table-card {
    padding: 0;
    overflow-x: auto;
}
/* When nested inside another .card, avoid doubling the outer radius on the scroll strip */
.card .company-table-card:not(.card) {
    border-radius: 0;
    box-shadow: none;
    border: none;
    background: transparent;
}
.company-table {
    margin: 0;
    min-width: 720px;
}
.company-table .td-status {
    vertical-align: middle;
    white-space: nowrap;
}
.company-status-toggle-form {
    margin: 0;
    display: inline-flex;
    align-items: center;
}
.company-table-switch-wrap {
    cursor: pointer;
    margin: 0;
}
.company-table-switch-wrap .company-switch-label {
    min-width: 54px;
}
.company-table .th-actions,
.company-table .td-actions {
    white-space: nowrap;
    min-width: 140px;
}
.company-table .td-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}
.company-table .td-actions > * {
    flex-shrink: 0;
}
.company-table .td-actions .btn-inline,
.company-table .td-actions .company-delete-form,
.company-table .td-actions .users-delete-form,
.company-table .td-actions .hr-delete-form {
    display: inline-flex;
    vertical-align: middle;
    margin: 0;
}
.company-table .td-actions form.inline-form {
    display: inline-flex;
    flex-shrink: 0;
    padding: 0;
    border: none;
}
.company-table .td-actions .btn-inline {
    margin-right: 0;
}

/* Users Add/Edit — same full-width rhythm as Companies */
.panel-content .user-admin-form.company-form {
    width: 100%;
    max-width: none;
}
.panel-content .user-admin-form .reg-form-panel-solo {
    margin-top: 0;
}
.panel-content .user-admin-form .reg-form-panel-solo + .reg-form-panel-solo {
    margin-top: 16px;
}
.user-admin-form .user-active-check {
    margin-top: 12px;
}
.user-admin-form .user-active-check .user-active-hint {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 500;
}
.user-admin-form .form-actions-row {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.company-table-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.company-table-logo-ph {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(var(--primary-rgb), 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
}
.company-table tr.row-cancelled td {
    opacity: 0.82;
}
.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.status-pill.status-active {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
}
.status-pill.status-cancelled {
    background: rgba(120, 120, 120, 0.15);
    color: var(--text-light);
}

/* —— Page access (no redirect) —— */
.page-unavailable-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.page-access-denied-card {
    max-width: 520px;
    padding: 24px 28px;
}
.page-access-denied-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text);
}

/* —— Add / Edit currency layout —— */
.currency-form-page {
    max-width: 920px;
}
.currency-form-head {
    margin-bottom: 16px;
}
.currency-form-card {
    padding: 22px 24px 20px;
}
.currency-form-layout {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr minmax(240px, 320px);
    align-items: start;
}
.currency-form-primary {
    min-width: 0;
}
.currency-form-intro {
    margin: -4px 0 14px;
    font-size: 13px;
}
.currency-form-row-tight {
    gap: 16px;
}
.currency-label-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
    min-width: 0;
}
.currency-label-block input {
    font-weight: 500;
}
.currency-side-card {
    padding: 18px 18px 16px;
    margin: 0;
    background: rgba(var(--primary-rgb), 0.04);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: var(--radius, 12px);
}
.currency-side-card .company-section-title {
    margin-top: 0;
    font-size: 1rem;
}
.currency-side-hint {
    font-size: 12px;
    line-height: 1.45;
    margin: -4px 0 12px;
}
.currency-form-actions {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.currency-default-switch-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 10px;
    padding: 12px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}
.currency-default-switch-text {
    flex: 1;
    min-width: 0;
}
.currency-default-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: rgba(var(--primary-rgb), 0.14);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb), 0.28);
}

@media (max-width: 720px) {
    .currency-form-layout {
        grid-template-columns: 1fr;
    }
}

/* —— Role permissions page —— */
.permissions-page {
    max-width: 1100px;
}
.permissions-page-head {
    margin-bottom: 20px;
}
.permissions-page-lead {
    max-width: 720px;
    margin: 8px 0 0;
    line-height: 1.5;
}
.permissions-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.perm-catalog-card {
    padding: 22px 24px;
    margin-bottom: 4px;
}
.perm-section-title {
    margin: 0 0 8px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.perm-badge-super {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
}
.perm-section-desc {
    margin: 0 0 18px;
    max-width: 800px;
    line-height: 1.5;
}
.perm-subtitle {
    font-size: 0.95rem;
    margin: 16px 0 10px;
    color: var(--text);
}
/* Catalog: full-width rows so labels are never truncated (no cramped grid cells) */
.perm-catalog-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 720px;
}
.perm-catalog-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    margin: 0;
}
.perm-catalog-row:hover {
    border-color: rgba(var(--primary-rgb), 0.35);
}
.perm-catalog-row-fixed {
    cursor: default;
    background: rgba(var(--primary-rgb), 0.06);
    border-color: rgba(var(--primary-rgb), 0.2);
}
.perm-catalog-row-fixed:hover {
    border-color: rgba(var(--primary-rgb), 0.25);
}
.perm-catalog-label {
    flex: 1;
    min-width: 0;
    line-height: 1.45;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}
.perm-catalog-sublabel {
    display: block;
    margin-top: 2px;
    font-weight: 500;
}
.perm-catalog-check-fake {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    line-height: 1;
}
.perm-roles-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.perm-role-card {
    padding: 0;
    overflow: hidden;
    margin: 0;
}
.perm-role-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid transparent;
}
.perm-role-card[open] .perm-role-summary {
    border-bottom-color: var(--border);
}
.perm-role-summary::-webkit-details-marker {
    display: none;
}
.perm-role-name {
    font-size: 1.05rem;
}
.perm-role-name .role-badge {
    vertical-align: middle;
}
.perm-role-hint {
    font-size: 12px;
    font-weight: 500;
}
.perm-role-card > .perm-table-wrap,
.perm-role-card > .perm-buttons-heading,
.perm-role-card > .perm-buttons-grid,
.perm-role-card > .muted {
    padding-left: 20px;
    padding-right: 20px;
}
.perm-table-wrap {
    overflow-x: auto;
    padding-top: 12px;
    padding-bottom: 8px;
}
.perm-matrix-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 14px;
}
.perm-matrix-table th,
.perm-matrix-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.perm-matrix-table thead th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-light);
    background: rgba(0, 0, 0, 0.02);
}
.perm-matrix-table .th-check {
    width: 88px;
    text-align: center;
}
.perm-matrix-table .td-check {
    text-align: center;
}
.perm-matrix-table tbody th[scope="row"] {
    font-weight: 600;
}
.perm-locked {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    color: var(--primary);
    font-weight: 700;
}
.perm-buttons-heading {
    margin: 18px 0 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-light);
}
.perm-buttons-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    padding-bottom: 18px;
}
.perm-check-tile {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.perm-switch-wrap {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
}
.perm-switch-wrap-center {
    margin-left: 0;
    justify-content: center;
}
.perm-switch-input:focus-visible + .perm-switch-slider {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}
.perm-switch-slider {
    width: 38px;
    height: 20px;
}
.perm-switch-slider::after {
    width: 14px;
    height: 14px;
    top: 3px;
    left: 3px;
}
.perm-switch-input:checked + .perm-switch-slider::after {
    transform: translateX(18px);
}
.perm-actions-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    padding: 16px 20px;
    position: sticky;
    bottom: 12px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
}
.perm-actions-note {
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.panel-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(10, 38, 33, 0.45);
    z-index: 45;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
@media (max-width: 860px) {
    .panel-shell { grid-template-columns: 1fr; }
    .panel-shell.sidebar-open .panel-sidebar-backdrop {
        display: block;
    }
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(280px, 86vw);
        height: 100vh;
        height: 100dvh;
        max-height: none;
        transform: translateX(-100%);
        transition: transform .2s ease;
        z-index: 50;
        overflow: hidden;
    }
    .panel-shell.sidebar-open .sidebar { transform: translateX(0); }
}
