:root {
    --bg: #f0f0f0;
    --bg-soft: #f7f7f7;
    --surface: #ffffff;
    --surface-alt: #f5f5f5;
    --border: #CDCCCC;
    --text: #343434;
    --muted: #7a8490;
    --primary: #4B7085;
    --primary-strong: #3a5a6e;
    --accent: #4B7085;
    --shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background: var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

.light-body {
    background: var(--bg);
}

.shell {
    min-height: 100vh;
    display: block;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 304px;
    padding: 28px 14px;
    background: #343434;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #c8c8c8;
}

.brand-mark {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #4B7085, #3a5a6e);
    color: white;
    font-weight: 800;
    margin: 0 auto 14px;
}

.sidebar h1,
.hero-card h1,
.landing-hero h1 {
    font-family: "Manrope", sans-serif;
    font-size: clamp(2.5rem, 5vw, 5rem);
    line-height: 0.92;
    margin: 0 0 12px;
    letter-spacing: -0.03em;
}

.sidebar p,
.hint,
.muted,
.lead,
.clean-list li {
    color: var(--muted);
}

.sidebar > div:first-child {
    text-align: center;
}

.sidebar h1 {
    font-size: 1.85rem;
    color: #f7f7f7;
    margin-bottom: 6px;
}

.sidebar p {
    color: #a0a0a0;
    font-size: 0.92rem;
}

.nav {
    display: grid;
    gap: 8px;
    margin-top: 28px;
}

.nav a,
.btn,
.toolbar-btn {
    border-radius: 16px;
    transition: 0.2s ease;
}

.nav a {
    padding: 13px 14px;
    background: transparent;
    border: 1px solid transparent;
    color: #c8c8c8;
    font-weight: 600;
}

.nav a:hover,
.btn:hover,
.toolbar-btn:hover {
    transform: translateY(-1px);
}

.nav a:hover,
.nav a:focus {
    background: rgba(0, 8, 20, 0.26);
}

.nav a:first-child {
    background: #343434;
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.main {
    margin-left: 304px;
    min-height: 100vh;
    padding: 26px 26px 36px;
    background: #f0f0f0;
}

.topbar,
.split,
.cta-row,
.signature-actions,
.user-chip,
.landing-header,
.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cta-row {
    margin-top: 24px;
    padding-top: 6px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: #8a8a8a;
    font-weight: 700;
}

.topbar h2,
.panel h3,
.section-intro h2 {
    margin: 6px 0 0;
}

.panel,
.stat-card,
.plan-card,
.mini-card,
.hero-card,
.form-card,
.hero-panel,
.hero-floating,
.price-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.panel-light,
.panel,
.hero-card,
.form-card,
.stat-card,
.price-card {
    padding: 20px;
}

.user-chip {
    padding: 10px 14px;
    border-radius: 12px;
    background: white;
    border: 1px solid var(--border);
}

.content-grid,
.form-grid,
.stats-grid,
.cards-grid,
.auth-wrap,
.pricing-grid,
.signup-layout {
    display: grid;
    gap: 22px;
}

.content-grid {
    grid-template-columns: 1.15fr 1fr;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 20px;
}

.stat-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-align: center;
}

.stat-card strong {
    font-size: 2rem;
    display: block;
    text-align: center;
    color: #1f8c5c;
}

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

.full {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 8px;
    font-size: 0.95rem;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: #fbfbfb;
    color: var(--text);
    border-radius: 10px;
    padding: 12px 14px;
    font: inherit;
    resize: vertical;
}

input[type="color"] {
    min-height: 50px;
    padding: 8px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox input {
    width: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    cursor: pointer;
    border: 1px solid transparent;
    font-weight: 700;
    border-radius: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #343434, #2a2a2a);
    color: white;
}

.btn-secondary,
.toolbar-btn {
    background: white;
    border: 1px solid var(--border);
    color: var(--text);
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    font-size: 0.94rem;
}

.members-table th,
.payments-table th {
    background: #4B7085;
    color: #d7e5fd;
    border-bottom: none;
}

.members-table tbody tr:nth-child(odd),
.payments-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.members-table tbody tr:nth-child(even),
.payments-table tbody tr:nth-child(even) {
    background: #f0f0f0;
}

.cards-grid,
.pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.mini-card strong,
.price-card strong {
    display: block;
    font-size: 1.8rem;
    margin: 10px 0 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f5ece0;
    color: #8b5a1d;
    font-size: 0.82rem;
    border: 1px solid #ead9c0;
}

.flash {
    position: fixed;
    top: 86px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10030;
    margin: 0;
    min-width: 280px;
    max-width: 480px;
    width: max-content;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    text-align: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.flash.flash-hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
    pointer-events: none;
}
.flash-icon {
    margin-right: 8px;
    font-size: 18px;
    vertical-align: middle;
}

.flash-success {
    border-color: #cfe5d4;
    background: #edf8ef;
}

.flash-error {
    border-color: #f2c4c4;
    background: #fff1f1;
}

.standalone-flash {
    top: 24px;
}

.auth-wrap {
    min-height: 100vh;
    grid-template-columns: minmax(420px, 1fr) minmax(380px, 460px);
    align-items: center;
    justify-content: center;
    padding: 5vw 6vw;
}

.hero-card-light {
    min-height: 430px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, #3a5a6e 0%, #343434 100%);
    color: #eef5fb;
}

.login-hero .brand-mark {
    margin: 0;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.login-hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    color: white;
    margin-top: 4px;
}

.login-hero p {
    color: #c0c0c0;
    font-size: 1.05rem;
    max-width: 38rem;
}

.login-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.login-points span {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e8f0f7;
    font-size: 0.9rem;
    font-weight: 600;
}

.login-form-card {
    width: 100%;
    max-width: 460px;
    justify-self: start;
}

.login-form-card h3 {
    margin-bottom: 16px;
}

.page-frame {
    max-width: 1220px;
    margin: 0 auto;
    padding: 24px;
}

.lang-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1.1rem;
}

.lang-bar__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    transition: box-shadow .18s ease, transform .18s ease, background .18s ease;
    cursor: pointer;
}

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

/* ── Light variant (embed / light backgrounds) ────────────────────── */
.lang-bar__pill--light {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, .35);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
    color: #334155;
}

.lang-bar__pill--light:hover {
    box-shadow: 0 6px 20px rgba(15, 23, 42, .10);
    border-color: rgba(148, 163, 184, .55);
}

/* ── Dark variant (main landing / dark backgrounds) ───────────────── */
.lang-bar__pill--dark {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, .35);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
    color: #0f172a;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.lang-bar__pill--dark:hover {
    background: #fff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
    border-color: rgba(148, 163, 184, .55);
}

.lang-bar__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: .7;
}

.lang-bar__select {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 28px 6px 6px;
    border-radius: 999px;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    width: auto;
    min-width: 120px;
}

.lang-bar__select--light {
    color: #0f172a;
}

.lang-bar__select--dark {
    color: #0f172a;
}

.lang-bar__select--dark option {
    color: #111827;
    background: #fff;
}

.landing-header {
    padding: 18px 0 28px;
}

.under-construction {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    gap: 16px;
}
.under-construction .uc-icon {
    font-size: 64px;
    line-height: 1;
}
.under-construction h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary, #2a2a2a);
}
.under-construction p {
    font-size: 16px;
    color: #64748b;
}

.wordmark {
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    font-weight: 700;
}

.landing-header-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.landing-header-qr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--primary, #1f2937);
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.landing-header-qr-btn:hover {
    transform: translateY(-1px);
    background: #fff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

.landing-header-qr-btn svg {
    width: 20px;
    height: 20px;
}

.landing-nav a {
    color: var(--muted);
}

.landing-hero {
    display: block;
    padding: 20px 0 40px;
}

.hero-copy {
    padding: 18px 0;
}

.hero-copy .lead {
    font-size: 1.2rem;
    color: #343434;
}

.hero-art {
    display: none;
}

.hero-panel {
    display: none;
}

.hero-panel span,
.hero-floating span,
.plan-kicker {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
}

.hero-panel strong,
.hero-floating strong {
    font-size: 1.8rem;
    margin-top: 8px;
}

.hero-floating {
    display: none;
}

.plans-section {
    padding: 24px 0 10px;
}

.section-intro {
    margin-bottom: 18px;
}

.price-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plan-actions {
    margin-top: auto;
    display: grid;
    gap: 10px;
}

.card-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 14px;
}
.card-actions .btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.plan-card-top,
.plan-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.plan-card-top {
    justify-content: space-between;
    margin-bottom: 14px;
}

.plan-glyph {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #4B7085;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.plan-price {
    display: block;
    margin: 8px 0 12px;
    color: #343434;
    font-size: 1.6rem;
}

.plan-state,
.plan-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.plan-state-live {
    background: #e8fff3;
    color: #15803d;
}

.plan-state-off {
    background: #fff1f2;
    color: #be123c;
}

.plan-meta {
    margin-top: 12px;
}

.plan-chip {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.plan-chip-icon {
    color: #4B7085;
    font-size: 0.9rem;
}

.paypal-embed form {
    display: grid;
    gap: 8px;
}

.paypal-embed button {
    width: 100%;
    padding: 13px 18px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #4B7085, #3a5a6e);
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.text-link {
    color: var(--primary);
    font-weight: 700;
}

.text-button {
    padding: 0;
    min-height: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-decoration: underline;
}

.text-button:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
}

.signup-layout {
    grid-template-columns: 1.15fr 0.85fr;
    padding: 26px 0 50px;
}

.public-form-light {
    display: grid;
    gap: 18px;
}

.aside-panel {
    align-self: start;
}

.clean-list {
    margin: 18px 0 0;
    padding-left: 18px;
}

.clean-list li {
    margin-bottom: 12px;
}

.contract-box,
.rich-editor {
    min-height: 220px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: #fffdfa;
    overflow: auto;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.editor-toolbar-rich {
    padding: 12px;
    border: 1px solid #d8d8d8;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, #f5f5f5);
}

.editor-section-title {
    margin-top: 28px;
}

.policy-modal {
    position: fixed;
    inset: 0;
    z-index: 10020;
}

.policy-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
}

.policy-modal-dialog {
    position: relative;
    width: min(1120px, calc(100vw - 32px));
    margin: 6vh auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
    overflow: hidden;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}

.policy-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid #d8d8d8;
}

.policy-modal-header h3 {
    margin: 0;
}

.policy-modal-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: #f8fafc;
    color: #343434;
    font-size: 1.4rem;
    cursor: pointer;
}

.policy-modal-body {
    margin: 0;
    min-height: 0;
    max-height: calc(88vh - 76px);
    border: 0;
    border-radius: 0;
    background: #fff;
    overflow: auto;
}

.landing-idle-modal {
    z-index: 10030;
}

.landing-idle-modal__dialog {
    width: min(520px, calc(100vw - 32px));
    margin: 8vh auto;
    text-align: center;
}

.landing-idle-modal__header {
    display: flex;
    justify-content: flex-end;
    padding: 18px 22px 0;
}

.landing-idle-modal__close {
    min-width: 110px;
}

.landing-idle-modal__body {
    padding: 0 24px 28px;
    max-height: none;
    overflow: visible;
}

.landing-idle-modal__content h3 {
    margin: 0 0 8px;
}

.landing-idle-modal__content p {
    margin: 0 0 20px;
    color: #4b5563;
}

.landing-idle-modal__qr-link {
    display: inline-flex;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.landing-idle-modal__qr {
    display: block;
    width: min(280px, 62vw);
    height: auto;
}

body.modal-open {
    overflow: hidden;
}

#signature-pad {
    width: 100%;
    height: 220px;
    border-radius: 18px;
    background: white;
    border: 1px dashed #c9bba4;
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.success-banner {
    margin-bottom: 18px;
}

.payment-layout {
    display: grid;
    gap: 22px;
    grid-template-columns: 1.15fr 0.85fr;
}

.payment-panel {
    padding: 0;
    overflow: hidden;
}

.payment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: #4B7085;
    color: white;
}

.payment-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.9rem;
    font-weight: 800;
}

.payment-logo {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    font-weight: 800;
}

.payment-panel .mode-switch,
.payment-panel .form-grid,
.payment-panel .payment-actions {
    padding-left: 20px;
    padding-right: 20px;
}

.mode-switch {
    display: flex;
    gap: 0;
    padding-top: 16px;
    padding-bottom: 16px;
    background: #f5f5f5;
    border-bottom: 1px solid var(--border);
    justify-content: center;
}

.mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid #d7d7d7;
    background: white;
    cursor: pointer;
    font-weight: 700;
}

.mode-pill input {
    display: none;
}

.mode-pill:first-child {
    border-radius: 10px 0 0 10px;
}

.mode-pill:last-child {
    border-radius: 0 10px 10px 0;
}

.mode-pill-sandbox {
    color: #d29c16;
    border-color: #f0c55a;
}

.mode-pill-live {
    color: #1e8b4d;
    border-color: #4fb56f;
}

.mode-pill-active.mode-pill-sandbox {
    background: #fff8e6;
}

.mode-pill-active.mode-pill-live {
    background: #eaf8ee;
}

.payment-panel .form-grid {
    padding-top: 18px;
    padding-bottom: 20px;
}

.payment-checkbox {
    align-self: end;
}

.payment-actions {
    display: flex;
    justify-content: flex-end;
    padding-bottom: 20px;
}

.payment-notes {
    align-self: start;
}

.pdf-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pdf-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    background: #e11d48;
    color: white;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.bg-primary {
    background-color: #4B7085 !important;
}

.bg-dark {
    background-color: #343434 !important;
}

.bg-light {
    background-color: #e9ecef !important;
}

.logo-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 304px;
    z-index: 1002;
    display: grid;
    grid-template-columns: 1fr 64px;
}

.logo-area .logo,
.logo-area .menu-icon {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-area .logo a {
    color: #fff;
    font-size: 1.85rem;
    font-weight: 800;
}

.logo-area .logo a span {
    color: rgba(255, 255, 255, 0.82);
}

.logo-area .menu-icon {
    font-size: 1.5rem;
    color: #fff;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar.bg-dark {
    top: 64px;
    width: 304px;
    padding: 18px 0 24px;
    background: #343434;
    overflow-y: auto;
}

.nav-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-title {
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2px 14px;
    padding: 12px 14px;
    color: #d9e0e7;
    border-radius: 6px;
    font-weight: 500;
}

.nav-list li a:hover {
    background: rgba(255, 255, 255, 0.06);
}

.nav-list li:first-of-type a {
    background: #4B7085;
    color: #fff;
}

.nav-ico {
    width: 16px;
    text-align: center;
    opacity: 0.9;
}

.topbar.bg-primary {
    position: fixed;
    top: 0;
    left: 304px;
    right: 0;
    min-height: 64px;
    padding: 0 22px;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    box-shadow: 0 2px 12px rgba(75, 112, 133, 0.18);
}

.admira-chip {
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.admira-chip span {
    color: rgba(255, 255, 255, 0.78);
}

.main-body.bg-light {
    margin-left: 304px;
    margin-top: 64px;
    min-height: calc(100vh - 64px);
    padding: 0;
    background: #e8e8e8;
}

.wrapper {
    padding: 1rem 1.25rem 1.5rem;
}

.breadcrumb-links {
    margin-bottom: 1rem;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item {
    color: #7a7a7a;
    font-size: 0.95rem;
}

.breadcrumb-item.active {
    color: #343434;
    font-weight: 600;
}

.panel,
.stat-card,
.mini-card,
.price-card,
.payment-notes,
.payment-panel,
.hero-panel,
.hero-floating {
    border-radius: 6px;
    border-color: #CDCCCC;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.stats-grid {
    gap: 16px;
}

.stat-card {
    background: #fff;
}

.stat-card strong {
    color: #4B7085;
}

table {
    background: #fff;
}

th {
    background: #f8f9fa;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a7a7a;
}

.logout-body {
    min-height: 100vh;
    background: #e8e8e8;
}

.login-page .logo {
    padding-top: 3.5rem;
    text-align: center;
}

.login-page .logo h2 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 800;
}

.login-page .logo a {
    color: #343434;
}

.text-primary {
    color: #4B7085 !important;
}

.login-page .form {
    max-width: 520px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem !important;
}

.login-admira-card,
.login-admira-secondary {
    background: #fff;
    border: 1px solid #CDCCCC;
    border-radius: 6px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.login-admira-card {
    padding: 1.5rem !important;
}

.login-admira-card h4 {
    text-align: center;
    text-transform: uppercase;
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-control {
    width: 100%;
    border: 1px solid #CDCCCC;
    border-radius: 0.375rem;
    padding: 0.625rem 0.75rem;
    background: #fff;
}

.login-admira-card .btn.btn-primary.form-control {
    min-height: 44px;
    border-radius: 0.375rem;
    background: #4B7085;
}

@media (max-width: 980px) {
    .auth-wrap,
    .content-grid,
    .signup-layout,
    .payment-layout {
        grid-template-columns: 1fr;
    }

    .logo-area,
    .sidebar.bg-dark,
    .topbar.bg-primary {
        position: static;
        width: auto;
    }

    .main,
    .main-body.bg-light {
        margin-left: 0;
        margin-top: 0;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .topbar,
    .split,
    .cta-row,
    .landing-header,
    .landing-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .flash {
        left: 16px;
        right: 16px;
        top: 78px;
        max-width: none;
    }

    .standalone-flash {
        top: 16px;
    }
}

/* ═══════════════════════════════════════════════
   Adminty CRM — design system
   ═══════════════════════════════════════════════ */

/* Base */
body {
    font-family: "Open Sans", sans-serif;
    background: #f0f0f0;
    color: #343434;
}

/* ── Layout shell ── */
.pcoded { min-height: 100vh; }

/* ── Top navbar ── */
.navbar.header-navbar.pcoded-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1030;
    background: #fff;
    box-shadow: 0 1px 20px 0 rgba(69, 90, 100, 0.12);
}

.navbar-wrapper {
    display: flex;
    min-height: 70px;
}

/* Logo strip (left, blue gradient) */
.navbar-logo {
    width: 264px;
    min-width: 264px;
    background: linear-gradient(45deg, #4B7085, #3a5a6e);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.brand-link {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.mobile-menu,
.mobile-options {
    color: rgba(255,255,255,0.85);
    font-size: 1.2rem;
}

/* Navbar right area */
.navbar-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 16px;
    background: #fff;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.navbar-page-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.navbar-page-sep {
    font-size: 1.1rem;
    font-weight: 300;
    color: #c5cdd6;
    line-height: 1;
}

.navbar-page-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #343434;
    white-space: nowrap;
}

.btn-navbar-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #4B7085, #3a5a6e);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(75, 112, 133, 0.35);
    transition: box-shadow 0.15s, transform 0.1s;
    white-space: nowrap;
}

.btn-navbar-add:hover {
    box-shadow: 0 4px 14px rgba(75, 112, 133, 0.45);
    transform: translateY(-1px);
}

.btn-navbar-add:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(75, 112, 133, 0.3);
}

/* Search bar — hidden by default, shown via JS on specific pages */
.navbar-search {
    display: none;
    align-items: center;
    gap: 10px;
    background: #f2f2f2;
    border: 1px solid #d8d8d8;
    border-radius: 24px;
    padding: 9px 18px;
    flex: 1;
    max-width: 340px;
    transition: box-shadow 0.2s;
}

.navbar-search.search-active {
    display: flex;
}

.navbar-search.search-active:focus-within {
    border-color: #4B7085;
    box-shadow: 0 0 0 3px rgba(18, 102, 241, 0.1);
}

.search-icon {
    color: #8a8a8a;
    flex-shrink: 0;
}

.search-input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    font-size: 0.88rem;
    color: #343434;
    width: 100%;
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: #4B7085;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
    margin-left: 4px;
    padding: 0;
}

.search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 999px;
    background: #d8d8d8;
    color: #5b6b7f;
    cursor: pointer;
    padding: 0;
}

.search-clear:hover {
    background: #CDCCCC;
    color: #343434;
}

.search-btn:hover {
    background: #3a5a6e;
}

.search-btn:disabled {
    background: #c5cdd6;
    cursor: default;
}

/* AJAX loading indicator */
.ajax-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 32px 0;
    color: #8a8a8a;
    font-size: 0.9rem;
    grid-column: 1 / -1; /* span full width inside cards-grid */
}

.ajax-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #CDCCCC;
    border-top-color: #4B7085;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.nav-right {
    list-style: none;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

/* User chip */
.adminty-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: #343434;
}
.adminty-user span { font-weight: 700; font-size: 0.93rem; }
.adminty-user small { color: #8a8a8a; font-size: 0.75rem; }

/* ── Sidebar ── */
.pcoded-main-container {
    padding-top: 70px;
    width: 100%;
}

.pcoded-wrapper {
    display: flex;
    min-height: calc(100vh - 70px);
    width: 100%;
}

.pcoded-navbar {
    width: 264px;
    min-width: 264px;
    background: #343434;
    box-shadow: 1px 0 20px rgba(0,0,0,0.08);
    position: fixed;
    top: 70px; bottom: 0; left: 0;
    overflow-y: auto;
}

.pcoded-inner-navbar { padding: 14px 0 24px; }

.pcoded-navigation-label {
    padding: 10px 24px 8px;
    color: rgba(255,255,255,0.38);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pcoded-item,
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pcoded-item li a {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2px 10px;
    padding: 11px 14px;
    color: #b5b5b5;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: background 0.17s, color 0.17s, border-color 0.17s;
}

.pcoded-item li a:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
    border-left-color: rgba(75,112,133,0.4);
}

.pcoded-item li.nav-active > a,
.pcoded-item li a.nav-active {
    background: rgba(75,112,133,0.12);
    color: #fff;
    border-left-color: #4B7085;
}

.pcoded-micon,
.nav-ico-svg {
    width: 18px;
    min-width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
}

/* ── Content area ── */
.pcoded-content {
    margin-left: 264px;
    width: calc(100% - 264px);
    padding: 24px;
    max-width: 100%;
    min-width: 0;
}

/* Page header card — nascosta */
.page-header.card { display: none; }

.page-header-title h5 {
    margin: 0;
    color: #343434;
    font-size: 17px;
    font-weight: 700;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    background: transparent;
}

.breadcrumb-item { color: #aaa; font-size: 12px; }
.breadcrumb-item.active { color: #555; font-weight: 600; }

.pcoded-inner-content {
    display: grid;
    gap: 22px;
    width: 100%;
}

/* ── Size resets ── */
.wrapper,
.container,
.panel,
.page-block,
.page-header,
.pcoded,
.pcoded-container,
.content-grid,
.stats-grid,
.cards-grid,
.pricing-grid,
.signup-layout,
.payment-layout,
.table-wrap,
table,
form { width: 100%; max-width: 100%; }

.content-grid,
.payment-layout,
.signup-layout { align-items: start; }

.pcoded-item li,
.nav-list li,
.table-wrap,
tbody, thead, tr, td, th { max-width: 100%; }

/* ── Cards / panels ── */
.panel,
.stat-card,
.mini-card,
.price-card,
.payment-notes,
.payment-panel,
.auth-box.card {
    background: #fff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 20px 0 rgba(69, 90, 100, 0.08);
}

.panel-light,
.panel,
.stat-card,
.price-card,
.mini-card { padding: 22px; }

/* ── Stats grid ── */
.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card span {
    text-align: left;
    margin-bottom: 6px;
    font-size: 12px;
    color: #8a8a8a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card strong {
    text-align: left;
    color: #4B7085;
    font-size: 28px;
}

/* ── Typography ── */
.panel h3,
.section-intro h2 {
    color: #343434;
    font-size: 17px;
    font-weight: 700;
}

/* ── Form fields ── */
input,
select,
textarea,
.form-control {
    border: none;
    border-bottom: 1px solid #CDCCCC;
    border-radius: 0;
    background: #fff;
    padding: 10px;
    box-shadow: none;
    margin: 6px;
    font-family: inherit;
    font-size: 0.92rem;
    color: #343434;
    transition: border-bottom-color 0.18s;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus {
    outline: none;
    border-bottom-color: #4B7085;
}

.member-payment-method-select {
    background: #dcfce7;
    border-bottom-color: #22c55e;
}

.member-payment-method-select:focus {
    border-bottom-color: #16a34a;
}

/* ── Buttons ── */
.btn,
.toolbar-btn {
    min-height: 42px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn:hover,
.toolbar-btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: linear-gradient(135deg, #4B7085, #3a5a6e);
    border: 1px solid #4B7085;
    color: #fff;
    box-shadow: 0 6px 16px rgba(75, 112, 133, 0.28);
}
.btn-primary:hover { box-shadow: 0 10px 22px rgba(75, 112, 133, 0.36); }

.btn-secondary,
.toolbar-btn {
    background: #fff;
    border: 1px solid #CDCCCC;
    color: #343434;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.btn-secondary:hover,
.toolbar-btn:hover {
    border-color: #b0b0b0;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: 1px solid #16a34a;
    color: #fff;
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.24);
}

.btn-success:hover {
    box-shadow: 0 10px 22px rgba(34, 197, 94, 0.34);
}

.btn:disabled,
.toolbar-btn:disabled {
    opacity: 0.52;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    filter: grayscale(0.08);
}

.btn-sm { min-height: 34px; padding: 6px 14px; font-size: 0.8rem; border-radius: 7px; }

/* ── Checkbox ── */
.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #d8d8d8;
    border-radius: 10px;
    background: #fbfdff;
    color: #343434;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.16s, background 0.16s;
}

.checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px; height: 20px;
    margin: 0;
    border: 1.5px solid #b5b5b5;
    border-radius: 6px;
    background: #fff;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.checkbox input[type="checkbox"]::after {
    content: "";
    width: 10px; height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) scale(0);
    transition: transform 0.13s ease;
    margin-top: -2px;
}

.checkbox input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #4B7085, #3a5a6e);
    border-color: #4B7085;
    box-shadow: 0 0 0 3px rgba(75,112,133,0.14);
}

.checkbox input[type="checkbox"]:checked::after { transform: rotate(-45deg) scale(1); }
.checkbox:hover { border-color: #c8daf0; background: #fff; }

/* ── Tables ── */
table { background: #fff; }

th {
    background: #f0f0f0;
    color: #8a8a8a;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 14px;
}

td { color: #343434; }

tbody tr:hover { background: #fafafa; }

/* ── Login page ── */
.login-block {
    min-height: 100vh;
    padding: 40px 16px;
    background: #343434;
    display: flex;
    align-items: center;
}

.login-block .container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.login-logo-wrap { margin-bottom: 24px; }

.login-msg-ticker {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 92%;
    max-width: 680px;
    height: 72px;
}
.login-msg-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border-radius: 50px;
    padding: 18px 32px;
    font-size: 1.15rem;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.4;
    box-shadow: 0 8px 36px rgba(0,0,0,.22), 0 20px 40px rgba(0,0,0,.18);
    opacity: 0;
    filter: blur(6px);
    transform: translateY(16px) scale(.94);
    transition:
        opacity 1.3s cubic-bezier(.22,1,.36,1),
        transform 1.3s cubic-bezier(.22,1,.36,1),
        filter 1.3s cubic-bezier(.22,1,.36,1);
    position: absolute;
    inset: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.login-msg-item.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
}
.login-msg-item.is-leaving {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(-16px) scale(.94);
    transition:
        opacity .9s cubic-bezier(.4,0,1,1),
        transform .9s cubic-bezier(.4,0,1,1),
        filter .9s cubic-bezier(.4,0,1,1);
}
.login-msg-item svg { flex-shrink: 0; opacity: .45; }

.login-logo-mark,
.login-small-mark {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-weight: 800;
    font-size: 1.3rem;
}

.login-brand-title {
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    margin: 0;
    text-align: center;
}

.auth-box.card { overflow: hidden; }
.auth-box .card-body { padding: 32px 28px; }
.auth-box h3 {
    margin-bottom: 22px;
    font-size: 22px;
    font-weight: 700;
    color: #343434;
    text-align: center;
}

/* ── Utility ── */
.hint { color: #8a8a8a; font-size: 13px; }
.text-inverse { color: #343434; }
.m-b-20 { margin-bottom: 20px; }
.m-t-25 { margin-top: 25px; }
.m-t-30 { margin-top: 30px; }
.f-w-600 { font-weight: 600; }
.text-center { text-align: center; }
.text-start { text-align: left; }
.text-end { text-align: right; }
.d-grid { display: grid; }

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.col-sm-12,
.col-md-12,
.col-md-10,
.col-md-2,
.col-12 {
    width: 100%;
    padding: 0 12px;
}

@media (min-width: 768px) {
    .col-md-10 { width: 83.3333%; }
    .col-md-2  { width: 16.6667%; }
}

/* ── Responsive ≤ 980px ── */
@media (max-width: 980px) {

    /* Navbar: layout a colonna — logo in cima, container sotto */
    .navbar-wrapper {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        height: auto;
        min-height: auto;
    }

    /* Logo strip: piena larghezza, 60px fissi, in cima */
    .navbar-logo {
        width: 100% !important;
        min-width: 100% !important;
        height: 60px !important;
        min-height: 60px !important;
        max-height: 60px !important;
        flex: 0 0 60px;
    }
    .brand-link { display: block !important; }

    /* Container: sotto al logo */
    .navbar-container {
        width: 100%;
        min-height: 50px;
        padding: 0 14px;
        flex-wrap: nowrap;
    }

    /* Main container: padding-top = logo (60) + container (50) */
    .pcoded-main-container { padding-top: 110px; }

    /* Sidebar overlay: parte sotto la navbar completa (110px) */
    .pcoded-navbar {
        top: 110px !important;
        height: calc(100vh - 110px) !important;
    }
    .sidebar-mobile-backdrop { top: 110px !important; }

    /* Flash: posizionato sotto la navbar */
    .flash { top: 118px !important; }
}

/* ── Sidebar collapsed (icon-only) ──────────────────────── */
/* Classe temporanea su <html> applicata dall'inline script nel <head>
   prima del paint, per evitare il flash di espansione/riduzione */
html.sidebar-collapsed-early .pcoded-navbar,
html.sidebar-collapsed-early .navbar-logo {
    width: 64px !important;
    min-width: 64px !important;
    transition: none !important;
}
html.sidebar-collapsed-early .brand-link,
html.sidebar-collapsed-early .pcoded-mtext,
html.sidebar-collapsed-early .pcoded-navigation-label {
    display: none !important;
}
html.sidebar-collapsed-early .pcoded-content {
    margin-left: 64px !important;
}

.sidebar-collapsed .pcoded-navbar {
    width: 64px;
    min-width: 64px;
}
.sidebar-collapsed .navbar-logo {
    width: 64px;
    min-width: 64px;
    justify-content: center;
    padding: 0;
}
.sidebar-collapsed .brand-link {
    display: none;
}
.sidebar-collapsed .pcoded-content {
    margin-left: 64px;
    width: calc(100% - 64px);
}
.sidebar-collapsed .pcoded-mtext,
.sidebar-collapsed .pcoded-navigation-label {
    display: none;
}
.sidebar-collapsed .pcoded-item li a {
    justify-content: center;
    padding: 13px 0;
    margin: 2px 6px;
    gap: 0;
}
.sidebar-collapsed .pcoded-micon,
.sidebar-collapsed .nav-ico-svg {
    width: 22px;
    min-width: 22px;
    opacity: 1;
}

/* Transition sidebar width */
.pcoded-navbar,
.navbar-logo,
.pcoded-content {
    transition: width 0.22s ease, min-width 0.22s ease, margin-left 0.22s ease;
}
.brand-link,
.pcoded-mtext,
.pcoded-navigation-label {
    transition: opacity 0.15s ease;
}
.sidebar-collapsed .brand-link,
.sidebar-collapsed .pcoded-mtext,
.sidebar-collapsed .pcoded-navigation-label {
    opacity: 0;
}

/* ── Plan card selection ─────────────────────────────────── */
.js-plan-card { cursor: pointer; transition: box-shadow 0.18s, border-color 0.18s; border: 2px solid transparent; }
.js-plan-card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.10); }
.js-plan-card.plan-selected { border-color: var(--primary, #2a2a2a); box-shadow: 0 6px 28px rgba(15,23,42,0.13); }
.js-plan-card .plan-select-btn { display: block; }
.js-plan-card.plan-selected .plan-select-btn { display: none; }
.plan-selected-badge { display: none; font-size: 0.82rem; font-weight: 700; color: var(--primary, #2a2a2a); letter-spacing: 0.04em; }
.js-plan-card.plan-selected .plan-selected-badge { display: block; }

/* ── Dashboard stat cards ────────────────────────────────── */
.dash-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px !important;
}
.dash-stat-card--link {
    text-decoration: none;
    color: inherit;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.dash-stat-card--link:hover {
    transform: translateY(-2px);
    border-color: #c7d5e2;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.10);
}
.dash-stat-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dash-stat-body { display: flex; flex-direction: column; gap: 2px; }
.dash-stat-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: #8a8a8a; font-weight: 700; }
.dash-stat-value { font-size: 1.65rem; font-weight: 800; color: #343434; line-height: 1.1; }

/* ── Dashboard charts grid ───────────────────────────────── */
.dash-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}
.dash-chart-full { grid-column: 1 / -1; }
.dash-chart-card { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.dash-chart-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dash-chart-eyebrow { margin: 0; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: #8a8a8a; font-weight: 700; }
.dash-chart-title { margin: 4px 0 0; font-size: 1rem; font-weight: 700; color: #343434; }
.dash-chart-badge { font-size: 0.78rem; font-weight: 700; padding: 5px 10px; border-radius: 20px; white-space: nowrap; }
.dash-chart-wrap { position: relative; height: 200px; }
.dash-chart-wrap--donut { height: 180px; }
.dash-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 0.8rem; color: #667085; }
.dash-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

@media (max-width: 700px) {
    .dash-charts-grid { grid-template-columns: 1fr; }
    .dash-chart-full { grid-column: 1; }
}

/* ── Selected plan info box ──────────────────────────────── */
.selected-plan-info { padding: 12px 16px; background: #f1f5f9; border-radius: 10px; font-size: 0.93rem; color: #343434; }

/* ── PayPal container ────────────────────────────────────── */
.paypal-wrap { margin-top: 4px; }
.paypal-msg { margin-top: 10px; padding: 12px 16px; border-radius: 10px; font-size: 0.93rem; font-weight: 600; }
.paypal-error { background: #fef2f2; color: #b91c1c; }
.paypal-success { background: #f0fdf4; color: #15803d; }
.paypal-surcharge-notice { margin-top: 8px; font-size: .83rem; color: #6b7280; }

.payment-method-picker {
    margin: 14px 0 12px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}
.payment-method-picker__label {
    display: block;
    margin-bottom: 10px;
    font-size: .82rem;
    font-weight: 700;
    color: #475467;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.payment-method-picker__options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 10px;
}
.payment-method-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-weight: 700;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.payment-method-option__icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.payment-method-option__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}
.payment-method-option:hover {
    border-color: #94a3b8;
    transform: translateY(-1px);
}
.payment-method-option-active {
    border-color: #111827;
    box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.08);
}
.payment-local-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
}
.payment-local-notice svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* ── Stripe card element ─────────────────────────────────── */
.stripe-card-wrap {
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
    margin-top: 4px;
}
.payment-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 10px;
    color: #9ca3af;
    font-size: .82rem;
}
.payment-divider::before,
.payment-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

@media (max-width: 640px) {
    .payment-method-picker__options {
        grid-template-columns: 1fr;
    }
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 0 4px;
}
.pag-info {
    font-size: 13px;
    color: #8a8a8a;
}

/* ── Members toolbar ─────────────────────────────────────── */
.members-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

/* ── Members filter bar (Da / Al) ────────────────────────── */
.members-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.members-filter-bar h3 { margin: 0; }
.members-date-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.members-date-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}
.members-date-input {
    width: auto;
    padding: 7px 10px;
    font-size: 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--text);
    resize: none;
}
@media (max-width: 600px) {
    .members-filter-bar { flex-direction: column; align-items: flex-start; }
    .members-date-form { width: 100%; }
}

/* ── Import modal ─────────────────────────────────────────── */
.members-import-dialog {
    max-width: 860px;
}

.members-import-header {
    gap: 12px;
}

.members-import-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.members-import-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1d6f42, #2e9e60);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

/* Steps bar */
.import-steps-bar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 14px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e8edf2;
}

.import-step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #94a3b8;
}

.import-step-item.is-active { color: #343434; }
.import-step-item.is-done { color: #1d6f42; }

.import-step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all .2s;
}

.import-step-item.is-active .import-step-dot {
    border-color: #4B7085;
    background: #4B7085;
    color: #fff;
}

.import-step-item.is-done .import-step-dot {
    border-color: #1d6f42;
    background: #1d6f42;
    color: #fff;
}

.import-step-connector {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 10px;
    min-width: 20px;
}

/* Dropzone */
.members-import-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.import-dropzone {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, background .2s;
    cursor: pointer;
    overflow: hidden;
}

.import-dropzone:hover,
.import-dropzone.drag-over {
    border-color: #4B7085;
    background: #eef4f7;
}

.import-dropzone.has-file {
    border-style: solid;
    border-color: #1d6f42;
    background: #f0fdf4;
    min-height: 80px;
}

.import-dropzone-idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px;
    text-align: center;
    pointer-events: none;
}

.import-dropzone-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #e2edf3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4B7085;
    margin-bottom: 4px;
}

.import-dropzone-title {
    margin: 0;
    font-size: 0.95rem;
    color: #374151;
}

.import-dropzone-sub {
    margin: 0;
    font-size: 0.82rem;
    color: #94a3b8;
}

.import-dropzone-chosen {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    pointer-events: none;
    width: 100%;
}

.import-file-badge {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Options row */
.import-options-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.import-plan-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #343434;
    flex: 1;
    min-width: 200px;
}

.import-plan-label select {
    font-weight: 400;
}

.import-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding-bottom: 10px;
    flex-shrink: 0;
}

.import-check-label input[type="checkbox"] { display: none; }

.import-check-box {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
}

.import-check-label input:checked + .import-check-box {
    background: #4B7085;
    border-color: #4B7085;
}

.import-check-label input:checked + .import-check-box svg { display: block; }
.import-check-box svg { display: none; }

.import-check-text {
    font-size: 0.87rem;
    font-weight: 600;
    color: #475569;
}

/* Analyze button row */
.import-analyze-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.import-analyze-btn {
    min-width: 160px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

/* Mapping */
.members-import-mapping {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fafbfc;
}

.members-import-mapping-head {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

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

.members-import-map-field {
    display: grid;
    gap: 5px;
}

.members-import-map-field span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #343434;
}

.members-import-preview {
    display: grid;
    gap: 10px;
    border-top: 1px solid #e2e8f0;
    padding-top: 14px;
    margin-top: 2px;
}

.members-import-preview-table th,
.members-import-preview-table td {
    white-space: nowrap;
    font-size: 0.82rem;
}

/* Progress */
.members-import-progress {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fafc, #f0f6fa);
}

.members-import-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.import-percent-badge {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4B7085;
    background: #e0ecf4;
    border-radius: 999px;
    padding: 2px 10px;
    min-width: 48px;
    text-align: center;
}

.members-import-bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #dbeafe;
    overflow: hidden;
}

.members-import-bar-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4B7085, #1d6f42);
    transition: width 0.3s ease;
}

.members-import-progress-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.members-import-stats {
    font-size: 0.85rem;
    font-weight: 700;
    color: #343434;
}

/* Footer */
.import-modal-footer {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    padding-top: 4px;
}

@media (max-width: 700px) {
    .members-import-mapping-grid { grid-template-columns: 1fr; }
    .import-options-row { flex-direction: column; align-items: stretch; }
    .import-check-label { padding-bottom: 0; }
    .import-steps-bar { padding: 10px 14px; gap: 4px; }
    .import-step-connector { min-width: 10px; }
    .import-step-item span { display: none; }
}

/* ── Email bulk modal ─────────────────────────────────────── */
.members-email-dialog { max-width: 620px; }

.members-email-header-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, #4B7085, #3a5a6e);
    display: flex; align-items: center; justify-content: center;
    color: #fff; flex-shrink: 0;
}

.email-filter-summary {
    font-size: 0.78rem; color: #64748b; font-weight: 400;
    display: block; margin-top: 1px;
}

.members-email-body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: calc(90vh - 180px);
    overflow-y: auto;
}

.email-recipients-box {
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 8px; padding: 14px 16px;
    min-height: 58px; display: flex; align-items: center;
}

.email-recipients-info { display: flex; gap: 10px; flex-wrap: wrap; width: 100%; }

.email-recipients-stat {
    display: flex; flex-direction: column; gap: 2px;
    padding: 8px 14px; border-radius: 8px; flex: 1; min-width: 100px;
}

.email-recipients-stat strong { font-size: 1.45rem; font-weight: 700; line-height: 1.1; }
.email-recipients-stat span { font-size: 0.76rem; color: #64748b; }

.email-recipients-ok { background: #f0fdf4; border: 1px solid #bbf7d0; }
.email-recipients-ok strong { color: #16a34a; }

.email-recipients-skip { background: #fef9c3; border: 1px solid #fde047; }
.email-recipients-skip strong { color: #ca8a04; }

/* Compose area */
.email-compose-field { display: flex; flex-direction: column; gap: 5px; }
.email-compose-label { font-size: 0.8rem; font-weight: 700; color: #475569; }

.email-subject-input {
    width: 100%; padding: 9px 12px; font-size: 0.9rem;
    border: 1px solid #CDCCCC; border-radius: 7px;
    background: #fff; color: #343434;
    transition: border-color .15s; box-sizing: border-box;
}
.email-subject-input:focus { outline: none; border-color: #4B7085; }

.email-vars-strip {
    display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 6px; padding: 8px 10px; font-size: 0.8rem;
}
.email-vars-label { color: #64748b; font-weight: 600; margin-right: 2px; flex-shrink: 0; }
.email-var-chip {
    display: inline-block; background: #4B7085; color: #fff;
    border-radius: 4px; padding: 2px 7px;
    font-family: monospace; font-size: 0.78rem;
    cursor: pointer; user-select: none;
}
.email-var-chip:hover { background: #343434; }

.email-editor-toolbar {
    display: flex; gap: 4px; flex-wrap: wrap;
    background: #f1f5f9; border: 1px solid #e2e8f0;
    border-bottom: none; border-radius: 6px 6px 0 0; padding: 6px 8px;
}
.email-editor-toolbar button {
    background: #fff; border: 1px solid #CDCCCC; border-radius: 5px;
    padding: 3px 10px; font-size: 0.8rem; cursor: pointer;
    color: #475569; transition: background .12s; min-height: unset;
}
.email-editor-toolbar button:hover { background: #e2e8f0; }

.email-body-editor {
    min-height: 180px; max-height: 280px; overflow-y: auto;
    border: 1px solid #e2e8f0; border-radius: 0 0 6px 6px;
    padding: 12px; font-size: 0.88rem;
    background: #fff; color: #343434; line-height: 1.6;
}
.email-body-editor:focus { outline: none; border-color: #4B7085; }

.email-result-success {
    background: #f0fdf4; border: 1px solid #bbf7d0;
    border-radius: 8px; padding: 12px 16px;
    color: #16a34a; font-size: 0.92rem;
}

.email-result-error {
    background: #fef2f2; border: 1px solid #fecaca;
    border-radius: 8px; padding: 12px 16px;
    color: #dc2626; font-size: 0.92rem;
}

.members-email-dialog .import-modal-footer {
    padding: 12px 24px 20px;
    border-top: 1px solid #f1f5f9;
    justify-content: flex-start;
}

/* ── Membership validity icon ─────────────────────────────── */
.ms-status-cell { display: flex; align-items: center; gap: 6px; }
.ms-icon        { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
.ms-icon--active  { color: #16a34a; background: #dcfce7; }
.ms-icon--expired { color: #dc2626; background: #fee2e2; }
.ms-icon--pending { color: #d97706; background: #fef3c7; }
.ms-icon--none    { color: #9ca3af; font-size: 13px; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }

/* ── Custom stato-select ──────────────────────────────────── */
.stato-select { position: relative; }
.stato-select-trigger {
    display: flex; align-items: center; gap: 6px;
    height: 34px; padding: 0 10px;
    border: 1px solid var(--border); border-radius: 6px;
    background: var(--surface); color: var(--text);
    font-size: 13px; cursor: pointer; white-space: nowrap;
    min-width: 130px;
}
.stato-select-trigger:hover { border-color: var(--primary); }
.stato-select-current { display: flex; align-items: center; gap: 6px; flex: 1; }
.stato-select-dropdown {
    display: none; position: absolute; top: calc(100% + 4px); left: 0;
    min-width: 160px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12); z-index: 200; overflow: hidden;
}
.stato-select.open .stato-select-dropdown { display: block; }
.stato-option {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; font-size: 13px; cursor: pointer;
    transition: background .15s;
}
.stato-option:hover      { background: var(--surface-alt, #f3f4f6); }
.stato-option.is-selected { background: #eff6ff; font-weight: 600; }

/* ── Member form panel (collapsible) ─────────────────────── */
.member-form-panel {
    margin-bottom: 20px;
}

.member-operator {
    display: inline-block;
    margin-top: 3px;
}

.member-actions-menu {
    position: relative;
    display: inline-flex;
}

.member-actions-trigger {
    width: 36px;
    height: 36px;
    border: 1px solid #d7dee8;
    border-radius: 10px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.member-actions-trigger span {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #3f5667;
    display: block;
}

.member-actions-dropdown {
    position: fixed;
    min-width: 180px;
    background: #314b5e;
    color: #f8fafc;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.25);
    display: none;
    z-index: 300;
}

.member-actions-menu.is-open .member-actions-dropdown {
    display: block;
}

.member-actions-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.92rem;
    text-decoration: none;
}
.member-actions-item svg {
    flex-shrink: 0;
    opacity: 0.75;
}

.member-actions-item:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.member-actions-item-danger {
    color: #fee2e2;
}

.member-actions-form {
    margin: 0;
}

.member-detail-dialog {
    max-width: 520px;
}

.member-detail-dialog .policy-modal-body {
    padding: 20px 24px 8px;
}

.member-detail-dialog .import-modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid #f1f5f9;
}

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

.member-detail-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    padding: 10px 14px 12px;
}

.member-detail-card span {
    display: block;
    font-size: 0.72rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 3px;
}

.member-detail-card strong {
    display: block;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 600;
    word-break: break-word;
}

.member-recharge-note {
    margin: 16px 0 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f7fbff 0%, #edf4fa 100%);
    border: 1px solid #d7e4ef;
    color: #587085;
    line-height: 1.5;
}

.member-recharge-dialog .policy-modal-dialog,
.member-recharge-dialog {
    overflow: visible;
}

.member-recharge-dialog .policy-modal-dialog {
    max-width: 700px;
}

.member-recharge-dialog .policy-modal-body {
    padding: 26px 28px 22px;
}

.member-recharge-dialog .import-plan-label {
    margin-bottom: 18px;
}

.member-recharge-dialog .import-plan-label:last-of-type {
    margin-bottom: 0;
}

.member-recharge-dialog .import-modal-footer {
    padding: 18px 28px 26px;
    border-top: 1px solid #e8eef4;
}

.member-recharge-success-dialog {
    max-width: 460px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.member-recharge-success-wrap {
    background: #fff;
    border-radius: 26px;
    padding: 34px 28px 26px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
    text-align: center;
}

.member-recharge-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #4b7085 0%, #27475c 100%);
}

.member-recharge-success-wrap h3 {
    margin: 0 0 10px;
    font-size: 1.55rem;
    color: #223341;
}

.member-recharge-success-wrap p {
    margin: 0;
    color: #607487;
    line-height: 1.55;
}

.member-recharge-success-actions {
    margin-top: 22px;
}

/* ── Page header action button ───────────────────────────── */
.page-header-title { display: flex; align-items: center; gap: 16px; }
.page-header-title h5 { margin: 0; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — ≤ 1000px overlay menu · ≤ 600px mobile · ≤ 400px xs
   ═══════════════════════════════════════════════════════════ */

/* ── ≤ 1000px: menu overlay full-width dall'alto ─────────── */
@media (max-width: 1000px) {

    /* Navbar logo: mostra brand + hamburger */
    .navbar-logo {
        width: auto;
        min-width: 0;
        flex: 0 0 auto;
        justify-content: space-between;
        padding: 0 18px;
        gap: 14px;
    }
    .brand-link { display: block; font-size: 1.1rem; }

    /* Sidebar: overlay full-width che scende dall'alto */
    .pcoded-navbar {
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        min-width: 100% !important;
        height: calc(100vh - 70px) !important;
        overflow-y: auto;
        z-index: 1040;
        /* Nascosto: traslato verso l'alto */
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        transition: transform 0.24s cubic-bezier(.4,0,.2,1),
                    opacity 0.24s ease,
                    visibility 0s linear 0.24s !important;
        box-shadow: none;
    }

    /* Sidebar aperta */
    body.sidebar-mobile-open .pcoded-navbar {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
        transition: transform 0.24s cubic-bezier(.4,0,.2,1),
                    opacity 0.24s ease,
                    visibility 0s linear 0s !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    }

    /* Voci menu: leggibili e spaziose su tutta la larghezza */
    .pcoded-mtext { display: block !important; opacity: 1 !important; }
    .pcoded-navigation-label { display: block !important; opacity: 1 !important; padding: 12px 28px 6px; }
    .pcoded-item li a {
        justify-content: flex-start !important;
        padding: 14px 28px !important;
        gap: 16px !important;
        margin: 2px 12px !important;
        font-size: 15px !important;
        border-radius: 10px !important;
    }
    .pcoded-micon,
    .nav-ico-svg { width: 20px !important; min-width: 20px !important; }

    /* Backdrop: copre l'area sotto il nav (già coperta dalla sidebar,
       serve per intercettare i click e per estetica) */
    .sidebar-mobile-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        top: 70px;
        z-index: 1038;
        background: rgba(0,0,0,0.4);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }
    body.sidebar-mobile-open .sidebar-mobile-backdrop { display: block; }

    /* Contenuto: piena larghezza, nessun margine sinistro */
    .pcoded-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 20px !important;
    }

    /* Navbar compatta */
    .navbar-container { padding: 0 16px; gap: 12px; }
    .navbar-page-sep { display: none; }
    .adminty-user small { display: none; }
    .navbar-search { max-width: none; flex: 1; min-width: 0; }
    .navbar-search.search-active { display: flex; }

    /* Azzera sidebar-collapsed (non ha senso a questi breakpoint) */
    .sidebar-collapsed .pcoded-navbar {
        transform: translateY(-10px) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }
    body.sidebar-mobile-open.sidebar-collapsed .pcoded-navbar {
        transform: translateY(0) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        visibility: visible !important;
    }
    .sidebar-collapsed .navbar-logo {
        width: auto !important;
        min-width: 0 !important;
        justify-content: space-between !important;
        padding: 0 18px !important;
    }
    .sidebar-collapsed .brand-link { display: block !important; }
    .sidebar-collapsed .pcoded-content { margin-left: 0 !important; width: 100% !important; }
    .sidebar-collapsed .pcoded-mtext,
    .sidebar-collapsed .pcoded-navigation-label { display: block !important; opacity: 1 !important; }
    .sidebar-collapsed .pcoded-item li a {
        justify-content: flex-start !important;
        padding: 14px 28px !important;
        gap: 16px !important;
    }

    /* sidebar-collapsed-early: sidebar inizialmente nascosta */
    html.sidebar-collapsed-early .pcoded-navbar {
        width: 100% !important;
        min-width: 100% !important;
        transform: translateY(-10px) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
        transition: none !important;
    }
    html.sidebar-collapsed-early .pcoded-content { margin-left: 0 !important; }
    html.sidebar-collapsed-early .brand-link,
    html.sidebar-collapsed-early .pcoded-mtext,
    html.sidebar-collapsed-early .pcoded-navigation-label {
        display: block !important;
        opacity: 1 !important;
    }

    /* Grids */
    .form-grid { grid-template-columns: repeat(2, 1fr); }
    .content-grid,
    .signup-layout,
    .payment-layout { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }

    /* Tables */
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .members-table,
    .payments-table { min-width: 620px; }

    /* Flash */
    .flash {
        left: 12px;
        right: 12px;
        top: 76px;
        max-width: none;
        transform: none;
        width: auto;
    }
    .flash.flash-hidden { opacity: 0; transform: translateY(-8px); }

    /* Card actions */
    .card-actions { flex-wrap: wrap; }
    .member-detail-grid { grid-template-columns: 1fr; }

    /* Mode switch */
    .mode-switch { flex-wrap: wrap; }
    .mode-pill { flex: 1 1 auto; justify-content: center; }

    /* Logout modal */
    #logout-modal .lm-card { max-width: calc(100vw - 32px) !important; }

    /* Page header */
    .page-header-title { flex-wrap: wrap; gap: 8px; }
    .btn-navbar-add { font-size: 0.8rem; padding: 6px 12px; }
}

/* ── ≤ 600px mobile ──────────────────────────────────────── */
@media (max-width: 600px) {

    .navbar-logo { padding: 0 14px; gap: 10px; }
    .navbar-container { padding: 0 10px; gap: 8px; }
    .adminty-user span { font-size: 0.8rem; }
    .brand-link { font-size: 1rem; }

    /* Form: colonna singola */
    .form-grid { grid-template-columns: 1fr !important; }
    .auth-wrap { grid-template-columns: 1fr; padding: 16px 12px; }
    .login-hero { display: none; }
    .login-form-card { max-width: 100%; }

    /* Stats: 2 colonne */
    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    /* Cards */
    .cards-grid,
    .pricing-grid { grid-template-columns: 1fr; }

    /* Landing */
    .landing-header,
    .landing-nav { flex-direction: column; align-items: flex-start; gap: 10px; }
    .page-frame { padding: 12px; }
    .hero-copy h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
    .hero-copy .lead { font-size: 1rem; }
    .signup-layout { padding: 12px 0 24px; }

    /* Inline form */
    .inline-form { flex-direction: column; align-items: stretch; }
    .inline-form input { width: 100%; }

    /* Pagination */
    .pagination { gap: 6px; font-size: 0.86rem; }

    /* Members toolbar */
    .members-toolbar { flex-wrap: wrap; gap: 8px; }

    /* Payment header */
    .payment-header { flex-wrap: wrap; gap: 8px; }

    .pcoded-content { padding: 12px !important; }
    .flash { top: 74px; }
}

/* ── ≤ 400px extra small ─────────────────────────────────── */
@media (max-width: 400px) {
    .stats-grid { grid-template-columns: 1fr; }
    .adminty-user { display: none; }
    .brand-link { font-size: 0.92rem; }
    th, td { padding: 8px 10px; font-size: 0.8rem; }
    .members-table,
    .payments-table { min-width: 480px; }
    .plan-card,
    .panel,
    .stat-card,
    .mini-card,
    .price-card { padding: 14px; }
    .pcoded-content { padding: 10px !important; }
    .flash { top: 72px; }
    .hero-copy h1 { font-size: clamp(1.5rem, 8vw, 2rem); }
    .pcoded-item li a { padding: 12px 16px !important; font-size: 14px !important; }
}
