@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..900;1,6..96,400..900&display=swap');

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    margin: 0;
    font-family: 'Bodoni Moda', serif;
    background-color: black;
    color: white;
    text-align: center;
    padding-top: 60px;
}

#header-image {
    display: block;
    margin: 0 auto;
    max-width: min(320px, 100%);
    height: auto;
}

.profile-logo {
    display: block;
    width: 96px;
    height: auto;
    margin: 10px auto 0;
}

h1 {
    margin: 20px 0;
}

h2 {
    margin-top: 30px;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    margin: 10px 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.2em;
    display: inline-block;
    position: relative;
    transition: font-size 0.3s ease;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease, left 0.3s ease;
}

nav ul li a:hover {
    font-size: 1.3em;
}

nav ul li a:hover::after {
    width: 100%;
    left: 0;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
}

.fade-in.visible {
    animation: fadeIn 0.6s ease-out forwards;
}

.back-to-home {
    position: fixed;
    top: 10px;
    left: 10px;
    background-color: black;
    color: white;
    font-family: 'Bodoni Moda', serif;
    border: 1px solid white;
    border-radius: 5px;
    padding: 30px 45px;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 1000;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.back-to-home:hover {
    background-color: white;
    color: black;
}

a[href^="mailto:"] {
    color: white;
    text-decoration: underline;
}

.btn,
button {
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: black;
    color: white;
    border: 1px solid white;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    animation: fadeIn 0.6s ease-out forwards;
    z-index: 1000;
}

.btn:hover,
button:hover {
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: white;
    color: black;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid white;
    border-radius: 10px;
    background-color: #333;
    margin-bottom: 10px;
}

.transaction-item .column {
    flex: 1;
    font-size: 1.2em;
}

.transaction-item .description {
    text-align: left;
}

.transaction-item .amount {
    text-align: center;
}

.transaction-item .button {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    text-align: right;
}

.transaction-item .button form {
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.transaction-item.open .description,
.transaction-item.open .amount {
    color: white;
}

.transaction-item.confirmed .description,
.transaction-item.confirmed .amount {
    color: #aaa;
}

.transactions-list {
    list-style: none;
    margin: 0 auto;
    padding: 20px;
    max-width: 1100px;
    background-color: #555;
    border-radius: 12px;
    box-sizing: border-box;
}

.admin-toolbar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.booking-filter-btn.is-active {
    background-color: white;
    color: black;
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.booking-filter-btn.is-active:hover {
    background-color: white;
    color: black;
}

.booking-table-stage {
    width: 100%;
}

.booking-table-stage.is-transitioning {
    pointer-events: none;
}

.booking-table-stage.is-pre-enter-left {
    opacity: 0;
    transform: translateX(-90px);
}

.booking-table-stage.is-pre-enter-right {
    opacity: 0;
    transform: translateX(90px);
}

.booking-table-stage.is-entering {
    opacity: 1;
    transform: translateX(0);
    transition: transform 0.42s ease, opacity 0.42s ease;
}

.booking-table-stage.is-exiting-left {
    opacity: 0;
    transform: translateX(-90px);
    transition: transform 0.34s ease, opacity 0.34s ease;
}

.booking-table-stage.is-exiting-right {
    opacity: 0;
    transform: translateX(90px);
    transition: transform 0.34s ease, opacity 0.34s ease;
}

.admin-table {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto 40px;
    border-collapse: separate;
    border-spacing: 0 12px;
    color: white;
}

.admin-table thead th {
    padding: 14px 18px;
    background-color: #111;
    color: #f2f2f2;
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-top: 1px solid #777;
    border-bottom: 1px solid #777;
}

.admin-table thead th:first-child {
    border-left: 1px solid #777;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.admin-table thead th:last-child {
    border-right: 1px solid #777;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.admin-table tbody td {
    padding: 18px;
    background-color: #2f2f2f;
    border-top: 1px solid #6d6d6d;
    border-bottom: 1px solid #6d6d6d;
    vertical-align: middle;
}

.admin-table tbody td:first-child {
    border-left: 1px solid #6d6d6d;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    font-weight: 700;
    color: #f3f3f3;
}

.admin-table tbody td:last-child {
    border-right: 1px solid #6d6d6d;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.admin-table tbody tr:hover td {
    background-color: #393939;
}

.admin-table-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-table-actions form {
    margin-bottom: 0;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.role-badge-admin {
    background-color: #5b2020;
    color: #ffd6d6;
    border: 1px solid #b35a5a;
}

.role-badge-user,
.role-badge-member {
    background-color: #24313d;
    color: #d6e9ff;
    border: 1px solid #587694;
}

.admin-page {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto 50px;
}

.admin-page-header {
    margin-bottom: 28px;
}

.admin-page-title {
    margin-bottom: 10px;
}

.admin-page-intro {
    margin: 0 auto;
    max-width: 760px;
    color: #d0d0d0;
    line-height: 1.6;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.admin-form-stage {
    width: min(760px, 100%);
    margin: 28px auto 0;
}

.admin-form-card {
    width: 100%;
}

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

.member-selection-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #666;
    border-radius: 12px;
    background-color: #171717;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.member-selection-item:has(input:checked) {
    background-color: white;
    border-color: white;
    color: black;
}

.member-selection-item input {
    margin: 0;
    width: auto;
    flex: 0 0 auto;
}

.member-selection-item span {
    color: #f1f1f1;
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.member-selection-item:has(input:checked) span {
    color: black;
}

.login-page {
    align-items: center;
    min-height: calc(100vh - 120px);
}

.login-card {
    width: min(560px, 100%);
}

.login-feedback {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid;
    line-height: 1.5;
}

.login-feedback-success {
    background-color: rgba(124, 252, 152, 0.12);
    border-color: rgba(124, 252, 152, 0.4);
    color: #aef6bf;
}

.login-feedback-error {
    background-color: rgba(255, 122, 122, 0.12);
    border-color: rgba(255, 122, 122, 0.4);
    color: #ffb0b0;
}

.remember-me-option {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #efefef;
    cursor: pointer;
}

.remember-me-option input {
    margin: 0;
    width: auto;
}

.edit-page {
    display: flex;
    justify-content: center;
    padding: 30px 20px 50px;
    box-sizing: border-box;
}

.edit-card {
    width: min(760px, 100%);
    padding: 32px;
    background: linear-gradient(180deg, #2f2f2f 0%, #242424 100%);
    border: 1px solid #666;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
    text-align: left;
    box-sizing: border-box;
}

.edit-eyebrow {
    margin: 0 0 10px;
    color: #c8c8c8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78em;
}

.edit-title {
    margin: 0 0 12px;
}

.edit-intro {
    margin: 0 0 28px;
    color: #d7d7d7;
    line-height: 1.6;
}

.edit-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 0;
}

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

.form-field label {
    font-weight: 600;
    color: #f2f2f2;
}

.form-field > input,
.form-field > select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #707070;
    border-radius: 12px;
    background-color: #171717;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1em;
    box-sizing: border-box;
}

.form-field > input:focus,
.form-field > select:focus {
    outline: none;
    border-color: #bdbdbd;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.form-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.edit-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

@media (max-width: 720px) {
    .admin-form-grid,
    .member-selection-list {
        grid-template-columns: 1fr;
    }

    .admin-form-stage {
        width: 100%;
    }

    .edit-card {
        padding: 24px;
    }

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

    .edit-form-actions {
        justify-content: stretch;
    }

    .edit-form-actions button {
        width: 100%;
    }
}

.password-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(420px, 100%);
    height: 100%;
    background-color: #222;
    color: white;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
    transition: right 0.3s ease;
    z-index: 1100;
    overflow-y: auto;
}

.password-panel.visible {
    right: 0;
}

.password-panel-close {
    align-self: flex-end;
    margin-bottom: 20px;
}

.password-form {
    margin-bottom: 0;
}

.password-message {
    margin: 0 0 20px;
}

.password-message-success {
    color: #7CFC98;
}

.password-message-error {
    color: #FF7A7A;
}

.password-panel form {
    display: flex;
    flex-direction: column;
}

.password-panel form label {
    margin-top: 10px;
}

.password-panel form input {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid white;
    border-radius: 5px;
    background-color: #333;
    color: white;
}

.password-panel form button {
    margin-top: 10px;
}

.section-divider {
    border: none;
    border-top: 1px solid white;
    margin: 20px 0;
}

form {
    margin-bottom: 50px;
}

.admin-section {
    margin-top: 50px;
}

hr {
    border: 0;
    border-top: 1px solid white;
    margin: 20px 0;
}

.section-spacing {
    margin-top: 50px;
}

.collapsible-heading {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.collapsible-arrow {
    display: inline-block;
    font-size: 0.9em;
    line-height: 1;
    transition: transform 0.2s ease;
}

.collapsible-heading[aria-expanded="true"] .collapsible-arrow {
    transform: rotate(180deg);
}

.collapsible-content {
    overflow: hidden;
    max-height: 4000px;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.collapsible-content.is-collapsed {
    max-height: 0;
    opacity: 0;
}

.welcome-header {
    background-color: white;
    color: black;
    padding: 20px;
    text-align: center;
    border-radius: 5px;
    position: relative;
}

.logout-button {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
}

.admin-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
}

.member-menu {
    position: fixed;
    top: 14px;
    left: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    z-index: 1200;
}

.member-menu-toggle {
    margin: 0;
    min-width: 118px;
    padding: 10px 16px;
}

.member-menu-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(300px, calc(100vw - 28px));
    background: rgba(20, 20, 20, 0.97);
    border: 1px solid #7a7a7a;
    border-radius: 12px;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.38);
    padding: 12px;
    transform-origin: top left;
    transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.2s ease, padding 0.2s ease;
    box-sizing: border-box;
}

.member-menu-panel.is-collapsed {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
    overflow: hidden;
    border-color: transparent;
}

.member-menu-link {
    display: block;
    width: 100%;
    text-decoration: none;
    text-align: left;
    margin: 0;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: black;
    color: white;
    border: 1px solid white;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.member-menu-link:hover,
.member-menu-link:focus-visible {
    background-color: white;
    color: black;
    text-decoration: none;
    outline: none;
}

.appointments-page {
    width: min(1280px, calc(100% - 40px));
}

.appointments-hero {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.appointments-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.appointments-stat-card {
    padding: 18px 20px;
    border: 1px solid #666;
    border-radius: 16px;
    background: linear-gradient(180deg, #232323 0%, #171717 100%);
    text-align: left;
}

.appointments-stat-card strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 8px;
}

.appointments-stat-card span {
    color: #d4d4d4;
}

.appointments-layout {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.appointments-section {
    text-align: left;
}

.appointments-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.appointments-columns {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 28px;
    align-items: start;
}

.appointments-card-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.appointments-card {
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #636363;
    background: linear-gradient(180deg, #282828 0%, #1d1d1d 100%);
}

.appointments-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.appointments-card-head h3 {
    margin: 0;
}

.appointments-card-meta,
.appointments-card-body,
.appointments-card-footer,
.appointments-empty-state,
.appointments-converted-note,
.appointments-option-card-head p {
    margin: 0;
    color: #d6d6d6;
    line-height: 1.6;
}

.appointments-card-body,
.appointments-poll-meta,
.appointments-poll-actions {
    margin-top: 12px;
}

.appointments-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    border: 1px solid #717171;
    white-space: nowrap;
}

.appointments-status-open {
    background-color: #24313d;
    color: #d6e9ff;
    border-color: #587694;
}

.appointments-status-closed {
    background-color: #43331e;
    color: #ffe5b8;
    border-color: #a57b2b;
}

.appointments-status-converted {
    background-color: #1f3b2c;
    color: #c5f6d7;
    border-color: #3e8d5f;
}

.appointments-poll-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: #cdcdcd;
}

.appointments-option-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
}

.appointments-option-card {
    border: 1px solid #5e5e5e;
    border-radius: 14px;
    padding: 16px;
    background-color: #141414;
}

.appointments-option-card-highlighted {
    border-color: #3e8d5f;
    box-shadow: 0 0 0 1px rgba(62, 141, 95, 0.35);
}

.appointments-option-card-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.appointments-vote-counts {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    color: #d4d4d4;
    font-size: 0.92rem;
}

.appointments-vote-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.appointments-vote-choices label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #5f5f5f;
    border-radius: 999px;
    background-color: #1d1d1d;
    cursor: pointer;
}

.appointments-vote-choices input {
    margin: 0;
    width: auto;
}

.appointments-options-builder {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.appointments-option-row {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #5e5e5e;
    background-color: #141414;
}

.appointments-poll-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.appointments-convert-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.appointments-convert-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 960px) {
    .appointments-stats,
    .appointments-form-grid,
    .appointments-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .appointments-card-head,
    .appointments-option-card-head {
        flex-direction: column;
    }

    .appointments-vote-counts {
        justify-content: flex-start;
    }

    .appointments-stat-card strong {
        font-size: 1.6rem;
    }
}

