:root {
    --bg: #0d1b2a;
    --card-bg: #1b263b;
    --text: #e0e1dd;
    --muted: #9fb1c5;
    --accent: #4dabf7;
    --accent-strong: #1c7ed6;
    --danger: #ff6b6b;
    --shadow: none;
    --radius: 14px;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

body.auth-body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at 20% 20%, rgba(77, 171, 247, 0.12), transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(28, 126, 214, 0.12), transparent 28%),
        radial-gradient(circle at 50% 80%, rgba(255, 107, 107, 0.1), transparent 25%),
        var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: var(--text);
}

.auth-card {
    width: min(460px, 100%);
    background: transparent;
    padding: 32px 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    backdrop-filter: none;
}

.auth-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: -0.02em;
}

.auth-header p {
    margin: 0 0 24px;
    color: var(--muted);
    line-height: 1.5;
}

.alert {
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: #ffe8e8;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-form label {
    font-weight: 600;
    color: var(--muted);
    letter-spacing: -0.01em;
}

.auth-form input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-form select {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-family: inherit;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    border-color: rgba(77, 171, 247, 0.7);
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.2);
    background: rgba(255, 255, 255, 0.06);
}

.auth-form textarea {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    resize: vertical;
    min-height: 80px;
}

.auth-form button {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #0b1323;
    border: none;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 25px rgba(28, 126, 214, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.auth-form button:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 16px 32px rgba(28, 126, 214, 0.4);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.link-button {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.alert-success {
    background: rgba(52, 199, 89, 0.12);
    border: 1px solid rgba(52, 199, 89, 0.45);
    color: #d3f9d8;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
}

.alert-info {
    background: rgba(77, 171, 247, 0.12);
    border: 1px solid rgba(77, 171, 247, 0.4);
    color: #d6ecff;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
}

.alert-error {
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: #ffe8e8;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
}

.success-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    border: 1px solid rgba(77, 171, 247, 0.35);
    box-shadow: var(--shadow);
}

.success-panel h1 {
    margin: 0;
    letter-spacing: -0.01em;
}

.success-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(77, 171, 247, 0.24), rgba(28, 126, 214, 0.28));
    border: 1px solid rgba(77, 171, 247, 0.45);
    font-weight: 800;
    color: var(--text);
    font-size: 22px;
}

.card-row {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.card-title {
    font-weight: 700;
}

.card-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.stacked-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-row label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

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

.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip-selectable {
    cursor: pointer;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    padding: 8px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chip-selectable input {
    accent-color: var(--accent);
}

.recipients-list {
    max-height: 320px;
    overflow: auto;
}

.selectable-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
}

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

.editor-toolbar button {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
}

.editor-toolbar .toolbar-select {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 10px;
    min-width: 120px;
}

.editor-toolbar button:hover {
    border-color: rgba(77, 171, 247, 0.5);
}

.rich-editor {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-height: 200px;
    padding: 12px;
    color: var(--text);
}

.rich-editor:focus {
    outline: 2px solid rgba(77, 171, 247, 0.5);
}

.auth-form input:focus {
    border-color: rgba(77, 171, 247, 0.7);
    box-shadow: 0 0 0 4px rgba(77, 171, 247, 0.18);
    background: rgba(255, 255, 255, 0.07);
}

.auth-form textarea:focus,
.auth-form select:focus {
    border-color: rgba(77, 171, 247, 0.7);
    box-shadow: 0 0 0 4px rgba(77, 171, 247, 0.18);
    background: rgba(255, 255, 255, 0.07);
    outline: none;
}

.primary-btn {
    margin-top: 6px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #0b1323;
    border: none;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 25px rgba(28, 126, 214, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.primary-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 16px 32px rgba(28, 126, 214, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
    box-shadow: 0 10px 20px rgba(28, 126, 214, 0.3);
}

.muted {
    color: var(--muted);
}

.highlight {
    color: var(--accent);
    font-weight: 700;
}

.comms-surface {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.subject-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

.subject-input:focus {
    outline: none;
    border-color: rgba(77, 171, 247, 0.6);
    box-shadow: 0 0 0 4px rgba(77, 171, 247, 0.18);
}

.typeahead {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.typeahead__control input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.typeahead__control input:focus {
    outline: none;
    border-color: rgba(77, 171, 247, 0.6);
    box-shadow: 0 0 0 4px rgba(77, 171, 247, 0.18);
}

.typeahead__suggestions {
    position: absolute;
    top: 58px;
    width: 100%;
    max-height: 240px;
    overflow: auto;
    background: rgba(16, 26, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: none;
    gap: 6px;
    padding: 0;
    z-index: 4;
}

.typeahead__suggestions:not(:empty) {
    display: grid;
    padding: 8px;
}

.typeahead__option {
    display: grid;
    grid-template-columns: 1fr;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    gap: 4px;
}

.typeahead__option strong {
    letter-spacing: -0.01em;
}

.typeahead__option span {
    color: var(--muted);
}

.typeahead__option small {
    color: var(--accent);
}

.typeahead__selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.typeahead__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(77, 171, 247, 0.12);
    border: 1px solid rgba(77, 171, 247, 0.4);
    color: var(--text);
    font-weight: 700;
}

.typeahead__remove {
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.form-section {
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.section-header h2 {
    margin: 0;
}

.form-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    color: var(--muted);
}

.form-field input,
.form-field select,
.form-field textarea {
    font-weight: 600;
    font-family: inherit;
}

.input-help {
    margin: 4px 0 0;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.4;
}

.event-form {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: start;
}

.event-form select[multiple] {
    min-height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 10px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.event-form option {
    padding: 8px 6px;
    font-weight: 600;
}

.field-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-field small {
    font-weight: 500;
}

.double-span {
    grid-column: 1 / -1;
}

/* Tenant management layout */
body.tenant-layout {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at 20% 20%, rgba(77, 171, 247, 0.12), transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(28, 126, 214, 0.12), transparent 28%),
        radial-gradient(circle at 50% 80%, rgba(255, 107, 107, 0.1), transparent 25%),
        var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
}

/* Shared member portal layout */
body.member-layout {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at 18% 18%, rgba(77, 171, 247, 0.14), transparent 30%),
        radial-gradient(circle at 82% 12%, rgba(28, 126, 214, 0.12), transparent 28%),
        radial-gradient(circle at 48% 84%, rgba(255, 107, 107, 0.12), transparent 25%),
        var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
}

.member-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
    background: rgba(16, 26, 42, 0.9);
    border-bottom: 1px solid rgba(77, 171, 247, 0.16);
    position: sticky;
    top: 0;
    z-index: 12;
    backdrop-filter: blur(10px);
}

.member-topbar__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawer-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(77, 171, 247, 0.4);
    background: rgba(77, 171, 247, 0.12);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

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

.member-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(77, 171, 247, 0.35);
    background: rgba(77, 171, 247, 0.14);
    display: grid;
    place-items: center;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.member-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.member-meta .muted {
    margin: 0;
    font-size: 12px;
}

.member-shell {
    display: flex;
    flex: 1;
    gap: 18px;
    padding: 22px;
}

.member-drawer {
    width: 250px;
    background: rgba(16, 26, 42, 0.92);
    border: 1px solid rgba(77, 171, 247, 0.16);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 18px 16px;
    height: fit-content;
    position: sticky;
    top: 92px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.member-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.member-drawer__title {
    margin: 0;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-transform: uppercase;
}

.close-drawer {
    background: transparent;
    border: 1px solid rgba(77, 171, 247, 0.3);
    color: var(--text);
    border-radius: 10px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.member-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.member-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.member-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 11;
}

.member-drawer.is-open {
    transform: translateX(0);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.member-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.nav-link[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 960px) {
    .drawer-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .member-shell {
        flex-direction: column;
        padding: 16px;
    }

    .member-drawer {
        position: fixed;
        inset: 16px;
        inset-inline-start: 12px;
        max-width: 320px;
        transform: translateX(-110%);
        z-index: 12;
        height: auto;
    }

    .member-content {
        width: 100%;
    }
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 26px;
    background: rgba(16, 26, 42, 0.85);
    border-bottom: 1px solid rgba(77, 171, 247, 0.2);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

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

.brand-mark {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
    font-size: 18px;
}

.club-chip {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(77, 171, 247, 0.14);
    border: 1px solid rgba(77, 171, 247, 0.35);
    color: var(--accent);
    font-weight: 700;
}

.top-links {
    display: flex;
    gap: 14px;
}

.top-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: 12px;
    transition: background 0.15s ease, color 0.15s ease;
}

.top-links a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.top-links a.active {
    color: var(--text);
    background: linear-gradient(135deg, rgba(77, 171, 247, 0.22), rgba(28, 126, 214, 0.24));
    border: 1px solid rgba(77, 171, 247, 0.35);
}

.tenant-layout-grid {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 24px;
}

.sidebar {
    width: 240px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    height: fit-content;
    position: sticky;
    top: 88px;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 10px;
}

.nav-label {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 4px;
}

.nav-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.nav-link:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    border-color: rgba(77, 171, 247, 0.5);
    background: linear-gradient(135deg, rgba(77, 171, 247, 0.16), rgba(28, 126, 214, 0.14));
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 700;
    margin: 0 0 6px;
    font-size: 12px;
}

.page-header h1 {
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(77, 171, 247, 0.4);
    font-weight: 700;
    background: rgba(77, 171, 247, 0.08);
    transition: background 0.12s ease, transform 0.12s ease;
}

.ghost-button:hover {
    background: rgba(77, 171, 247, 0.12);
    transform: translateY(-1px);
}

.ghost-button.danger {
    color: #ffb3b3;
    border-color: rgba(255, 107, 107, 0.4);
    background: rgba(255, 107, 107, 0.08);
}

.ghost-button.danger:hover {
    background: rgba(255, 107, 107, 0.12);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.panel {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    box-shadow: none;
}

.panel-header h2 {
    margin: 4px 0 0;
}

.pill-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill-list li {
    background: rgba(255, 255, 255, 0.06);
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 700;
}

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

.stacked-list--spaced {
    gap: 14px;
}

.stacked-list--tight {
    gap: 8px;
}

.stacked-list__section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stacked-list__item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
}

.stacked-list__actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.stacked-list__header {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: space-between;
}

.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip--muted {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    pointer-events: none;
}

.tenant-pill-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.member-directory-grid .stacked-list__section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    grid-auto-rows: 1fr;
}

.member-directory-grid .stacked-list__section>.stacked-list__header {
    grid-column: 1 / -1;
}

.member-directory-grid .stacked-list__item {
    padding: 10px 12px;
    height: 100%;
}

.member-directory-grid .stacked-list__item .chip {
    display: inline-flex;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
    padding: 4px 8px;
}

.member-card__name {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.member-card__subheading {
    margin: 4px 0 0;
    color: var(--muted);
    font-weight: 600;
    font-size: 11px;
}

.member-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.member-card__status {
    align-items: flex-start;
}

.member-card__footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.membership-type-list .stacked-list__header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
}

.membership-type-list__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.membership-type-list__field--name {
    flex: 1 1 280px;
    min-width: 260px;
}

.membership-type-list__input,
.membership-type-list__select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
}

.membership-type-list__input--name {
    font-weight: 600;
    font-size: 16px;
}

.membership-type-list__input--short {
    max-width: 140px;
}

.membership-type-list__input--medium {
    max-width: 180px;
}

.membership-type-list__select {
    min-height: 140px;
}

.membership-type-list__input:focus,
.membership-type-list__select:focus {
    border-color: rgba(77, 171, 247, 0.7);
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.2);
    outline: none;
}

.stacked-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-form input,
.profile-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
}

.profile-form input:focus,
.profile-form textarea:focus {
    border-color: rgba(77, 171, 247, 0.7);
    box-shadow: 0 0 0 4px rgba(77, 171, 247, 0.18);
    outline: none;
    background: rgba(255, 255, 255, 0.06);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(77, 171, 247, 0.4);
    background: linear-gradient(135deg, rgba(77, 171, 247, 0.24), rgba(28, 126, 214, 0.22));
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(28, 126, 214, 0.28);
    text-decoration: none;
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.button.danger {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.24), rgba(255, 107, 107, 0.3));
    border-color: rgba(255, 107, 107, 0.45);
}

.booking-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.booking-actions form {
    display: flex;
    margin: 0;
}

.booking-actions > * {
    flex: 0 0 auto;
}

.chip.warning {
    background: rgba(255, 184, 77, 0.18);
    border-color: rgba(255, 184, 77, 0.5);
    color: #ffe8c2;
}

.chip {
    background: rgba(77, 171, 247, 0.12);
    border: 1px solid rgba(77, 171, 247, 0.35);
    color: #d6e9ff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.chip.time-chip {
    border-radius: 10px;
    padding: 6px 12px;
}

.chip.soft {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--muted);
}

.chip.outline {
    background: transparent;
    border-style: dashed;
    color: var(--text);
}

.availability-day {
    margin-bottom: 16px;
}

.availability-day__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.availability-day__title {
    font-size: 16px;
    font-weight: 700;
}

.availability-day__hint {
    color: var(--muted);
    margin: 0;
    padding-top: 5px;
    padding-bottom: 5px;
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.availability-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.availability-table th,
.availability-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.availability-table th {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.availability-table tr:last-child td {
    border-bottom: none;
}

.availability-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.date-tab-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.date-tab {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: border 0.15s ease, transform 0.12s ease, background 0.15s ease;
}

.date-tab.active {
    border-color: rgba(77, 171, 247, 0.6);
    background: linear-gradient(135deg, rgba(77, 171, 247, 0.18), rgba(28, 126, 214, 0.16));
    transform: translateY(-1px);
}

.start-time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    padding-bottom: 5px;
}

.start-time-chip {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: border 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.start-time-chip.active {
    border-color: rgba(77, 171, 247, 0.6);
    background: rgba(77, 171, 247, 0.14);
    transform: translateY(-1px);
}

.selection-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 12px 14px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.selection-summary .selection-title {
    margin: 4px 0;
}

.selection-summary .small {
    font-size: 12px;
}

.duration-picker {
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.duration-picker select {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.court-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.court-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.court-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.court-card__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

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

.duration-options select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    padding: 8px 10px;
    border-radius: 10px;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.auth-form.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field.span-2,
.span-2 {
    grid-column: span 2;
}

.question-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 12px;
}

.option-form-grid {
    display: grid;
    grid-template-columns: 1fr 120px auto;
    gap: 12px;
    align-items: flex-end;
}

.option-item {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px dashed rgba(255, 255, 255, 0.1) !important;
    padding: 10px !important;
}

.option-item .form-field {
    gap: 4px;
}

@media (max-width: 600px) {

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

.small {
    font-size: 12px;
}

.calendar-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.calendar-panel {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    position: relative;
}

.calendar-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.weekday-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 8px;
    padding: 0 2px;
}

.calendar-months {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.calendar-month {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.01);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.calendar-month-header {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.calendar-grid--month {
    margin-top: 0;
}

.calendar-day {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    min-height: 90px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calendar-day.empty {
    background: transparent;
    border-style: dashed;
    opacity: 0.5;
}

.calendar-date {
    font-weight: 700;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.event-pill {
    background: rgba(77, 171, 247, 0.15);
    border: 1px solid rgba(77, 171, 247, 0.35);
    color: #d6e9ff;
    border-radius: 10px;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.calendar-tooltip {
    position: absolute;
    z-index: 5;
    min-width: 260px;
    max-width: 360px;
    background: rgba(13, 22, 34, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    padding: 12px 14px;
    transition: opacity 0.1s ease, transform 0.1s ease;
    opacity: 1;
    transform: translateY(0);
}

.calendar-tooltip.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
}

.tooltip-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: start;
}

.tooltip-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.tooltip-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
}

.ghost-button--compact {
    padding: 8px 10px;
    font-size: 12px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.summary-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.summary-card h2 {
    margin: 8px 0 6px;
    font-size: 24px;
}

.chart-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.chart-grid {
    display: grid;
    gap: 24px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    font-weight: 600;
    color: var(--muted);
}

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

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
}

.legend-total {
    background: rgba(77, 171, 247, 0.7);
}

.legend-booking {
    background: rgba(76, 201, 240, 0.7);
}

.legend-event {
    background: rgba(99, 102, 241, 0.7);
}

.legend-membership {
    background: rgba(45, 212, 191, 0.7);
}

.chart-bars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 16px;
    align-items: end;
}

.chart-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
}

.bar-stack {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 6px;
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.bar {
    width: 18%;
    border-radius: 8px 8px 0 0;
    min-height: 4px;
}

.bar-total {
    background: rgba(77, 171, 247, 0.7);
}

.bar-booking {
    background: rgba(76, 201, 240, 0.7);
}

.bar-event {
    background: rgba(99, 102, 241, 0.7);
}

.bar-membership {
    background: rgba(45, 212, 191, 0.7);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px;
    }

    .auth-header h1 {
        font-size: 24px;
    }

    .tenant-layout-grid {
        flex-direction: column;
        padding: 16px;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .calendar-layout {
        grid-template-columns: 1fr;
    }
}
