:root {
    --primary-color: #1e3a8a;
    --primary-dark: #375a7f;
    --primary-light: #2563eb;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --gray-light: #f3f4f6;
    --gray-border: #e5e7eb;
    --text-primary: #1f2937;
    --text-light: #6b7280;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    display: flex;
    min-height: 100vh;
    background-color: #f9fafb;
}

.sidebar {
    width: 220px;
    background-color: var(--primary-dark);
    color: white;
    padding: 1.5rem 1rem;
    box-shadow: 4px 0 12px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100vh;
    position: fixed;
    overflow-y: auto;
}

.sidebar h2 {
    margin-top: 0;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.sidebar a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    display: block;
}

.sidebar a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar a.active {
    color: var(--accent-color);
    background-color: rgba(245, 158, 11, 0.15);
    border-left: 3px solid var(--accent-color);
    padding-left: 0.45rem;
    font-weight: 600;
}

.main-content {
    margin-left: 240px; /* Leave space for the sidebar */
    padding: 2rem;
    flex-grow: 1;
}

.display-content {
    margin: auto;
    padding: 2rem;
    flex-grow: 1;
}

.display-content-stat {
    margin-left: 300px; /* Leave space for the sidebar */
}

.progress-container {
    width: 100%;
    background: var(--gray-light);
    border-radius: 12px;
    overflow: hidden;
    height: 32px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.progress-bar {
    height: 32px;
    background-color: var(--success-color);
    width: 0;
    text-align: center;
    color: white;
    font-size: 14px;
    line-height: 32px;
    font-weight: 600;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

h1, h2 {
    font-size: 2rem;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 1rem;
}


.sidebar_h2 {
    color: var(--accent-color);
    text-align: left;   
}


h1.display {
    font-size: 2.5rem;
    background-color: var(--primary-dark);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

table {
    width: 95%;
    border-collapse: collapse;
    background: #fff;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
}

table tbody tr:nth-child(odd) {
    background-color: #f9fafb;
}

table tbody tr:nth-child(even) {
    background-color: #ffffff;
}

table tbody tr:hover {
    background-color: #f0f4ff;
}

.center {
    margin: auto;
}

.centered {
     display: grid;
     justify-content: center;
}

.centered-flex {
     display: flex;
     justify-content: center;
     margin-bottom: 15px;
}

.narrow {
    width: fit-content;
}

.narrow-left {
    width: fit-content;
    margin-left: 0;
}

.navi-button-div {
    margin: auto;
    align-items: center;
    margin-bottom: 1.5rem;
}

.navi-button-div-warning {
    margin: auto;
    align-items: center;
    margin-bottom: 1.5rem;
}

.navi-button-div-warning .navi-button {
    background-color: var(--danger-color);
}

.navi-button-div-warning .navi-button:hover:not(:disabled) {
    background-color: #dc2626;
    box-shadow: 0 5px 14px rgba(239, 68, 68, 0.3);
}

.navi-button-div-warning .navi-button:active:not(:disabled) {
    background-color: #b91c1c;
}

.btn-miss {
    background-color: #b45050 !important;
    min-width: 300px !important;
    min-height: 88px !important;
    font-size: 1.8rem !important;
    padding: 20px 32px !important;
}

.btn-miss:hover:not(:disabled) {
    background-color: #943f3f !important;
}

.btn-hit {
    background-color: var(--success-color) !important;
    min-width: 300px !important;
    min-height: 88px !important;
    font-size: 1.8rem !important;
    padding: 20px 32px !important;
}

.btn-hit:hover:not(:disabled) {
    background-color: #059669 !important;
}

th, td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-border);
    text-align: left;   
    font-size: 0.9em;
    color: var(--text-primary);
}

th {
    background-color: var(--primary-dark);
    color: white;
    font-weight: 600;
    border: none;
}


.shooterslistrow {
    padding: 10px 10px;    
}

.shooterslistrow_gold {
    padding: 10px 10px; 
    background-color: var(--accent-color);
    font-weight: 600;
}

.greyed-out {
    color: var(--text-secondary, #999);
    background-color: rgba(0, 0, 0, 0.05);
}

.info {
    text-align: center;
    margin: 20px;
    padding: 16px;
    color: var(--text-primary);
    background-color: rgba(16, 185, 129, 0.08);
    border-left: 4px solid var(--success-color);
    border-radius: 6px;
}

.result-input {
    padding: 6px 10px;
    border: 1px solid var(--gray-border);
    border-radius: 4px;
    font-size: 0.9em;
}

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

.inline-edit-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.inline-edit-form .result-input,
.inline-edit-form button.edit {
    height: 30px;
    box-sizing: border-box;
    margin: 0;
}

.hidden-submit {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    border: 0;
    opacity: 0;
    overflow: hidden;
}

.delete-button {
    min-width: 78px;
    background-color: var(--danger-color);
}

.delete-button:hover:not(:disabled) {
    background-color: #dc2626;
}

.btn-show-stat {
    white-space: nowrap;
}

button.edit {
    padding: 4px 8px;
    background-color: white;
    border: 1px solid var(--gray-border);
    color: var(--text-primary);
    border-radius: 4px;
    line-height: 1.2;
}

button.edit:hover {
    background-color: var(--gray-light);
    border-color: var(--primary-light);
}

.top-buttons {
    text-align: center; 
    margin: 20px 10px;
    padding: 0;
}

.button-pad-top {
    padding: 0px 0px 0px 0px;
    white-space: nowrap;
}

.member-name {
    width: 160px;
}

.col-action,
.col-action-delete {
    white-space: nowrap;
    width: 1%;
    text-align: center;
    vertical-align: middle;
}

.col-action {
    min-width: 92px;
}

.col-action-delete {
    min-width: 78px;
}

#member-list-table thead th {
    position: sticky;
    top: 0;
    background-color: var(--primary-dark);
    z-index: 10;
}

.members-page .col-action,
.events-page .col-action {
    min-width: 48px;
}

.members-page .icon-edit-button,
.events-page .icon-edit-button {
    min-width: 34px;
    min-height: 30px;
    width: 34px;
    padding: 4px;
    border-radius: 5px;
    background-color: #ffffff;
    border: 1px solid var(--gray-border);
    box-shadow: none;
}

.members-page .icon-edit-button:hover:not(:disabled),
.events-page .icon-edit-button:hover:not(:disabled) {
    background-color: var(--gray-light);
    border-color: #cbd5e1;
    box-shadow: none;
}

.members-page .icon-edit-button:active:not(:disabled),
.events-page .icon-edit-button:active:not(:disabled) {
    background-color: #e5e7eb;
    box-shadow: none;
}

.members-page .icon-edit-button .icon-edit-image,
.events-page .icon-edit-button .icon-edit-image {
    width: 14px;
    height: 14px;
    display: block;
}

/* Journal administration and public reading view */
.journal-admin-content { max-width: 1180px; }
.journal-admin-heading { display: flex; flex-direction: column; align-items: center; gap: .7rem; margin-bottom: 1.5rem; }
.journal-admin-heading h1 { text-align: center; margin-bottom: 0; }
.eyebrow { color: #b45050; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }
.journal-admin-table { width: 100%; }
.journal-admin-table small { display: block; color: var(--text-light); max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journal-icon-button { padding: .45rem .7rem; background: #fff; color: var(--primary-dark); border: 1px solid var(--gray-border); }
.journal-empty { text-align: center; padding: 2rem; color: var(--text-light); }
.journal-notice, .journal-error { padding: .8rem 1rem; margin-bottom: 1rem; border-radius: 5px; }
.journal-notice { background: #e6f6ef; color: #176044; }
.journal-error { background: #fff0ef; color: #982f2a; }
.journal-modal { display: none; position: fixed; inset: 0; z-index: 30; align-items: center; justify-content: center; padding: 1rem; background: rgba(38, 32, 28, .58); }
.journal-modal-card { position: relative; width: min(700px, 100%); max-height: 92vh; overflow-y: auto; background: #fffdf8; padding: 2rem; box-shadow: 0 16px 50px rgba(0,0,0,.25); }
.journal-modal-card h2 { text-align: left; }
.journal-modal-card label { display: block; margin: .9rem 0 .3rem; color: #453c34; font-weight: 600; }
.journal-modal-card label span { color: var(--text-light); font-weight: 400; }
.journal-modal-card input[type=text], .journal-modal-card select, .journal-modal-card textarea { width: 100%; box-sizing: border-box; font-family: inherit; font-size: 1rem; }
.journal-modal-card textarea { resize: vertical; line-height: 1.55; }
.journal-modal-close { position: absolute; right: 1rem; top: .6rem; background: transparent; color: #453c34; font-size: 1.8rem; padding: .1rem .4rem; }
.journal-form-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.journal-form-actions #journal_delete { display: none; }
.journal-existing-files { display: grid; gap: .35rem; margin-top: .8rem; color: var(--text-light); }

.journal-public-page { display: block; background: #f6f4e7; color: #74665b; font-family: Georgia, 'Times New Roman', serif; }
.journal-public-page h1, .journal-public-page h2, .journal-public-page p { font-family: Georgia, 'Times New Roman', serif; }
.journal-public-page h3 { font-family: Georgia, 'Times New Roman', serif; font-size: 1.8em;}

.journal-public-header { max-width: 1040px; margin: 0 auto; padding: 2.2rem 2rem 1.4rem; color: #453c34; }
.journal-public-mark { display: flex; align-items: center; gap: .8rem; }
.journal-public-mark > span { display: grid; place-items: center; width: 47px; height: 47px; border: 2px solid #d93e39; color: #d93e39; font: 700 .75rem Arial, sans-serif; letter-spacing: .04em; }
.journal-public-mark strong, .journal-public-mark small { display: block; }
.journal-public-mark strong { font-size: 1rem; }
.journal-public-mark small { color: #b45050; letter-spacing: .14em; text-transform: uppercase; font: .62rem Arial, sans-serif; margin-top: .15rem; }
.journal-public-header p { float: right; margin-top: -2rem; color: #d93e39; font: 700 .7rem Arial, sans-serif; letter-spacing: .28em; }
.journal-public-rule { border-bottom: 1px solid #d8cdbd; margin-top: 0.5rem; }
.journal-public-main { max-width: 820px; margin: 0 auto; padding: 3rem 2rem 5rem; }
.journal-intro { text-align: center; margin-bottom: 2.5rem; }
.journal-intro h1 { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.08; font-weight: 400; margin: .5rem 0 1rem; color: #453c34; }
.journal-intro > p:last-child { max-width: 460px; margin: 0 auto; font-size: 1.05rem; line-height: 1.8; }
.journal-story { padding: 0 0 4rem; margin-bottom: 4rem; border-bottom: 1px solid #d8cdbd; }
.journal-story-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; color: #b45050; font: .7rem Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.journal-story-meta span + span { border-left: 1px solid #b9a998; padding-left: 1.2rem; }
.journal-story h2 { color: #453c34; font-size: clamp(1.7rem, 4vw, 2.7rem); font-weight: 400; line-height: 1.15; margin: .7rem 0 .3rem; }
.journal-byline { color: #968274; font-size: .88rem; font-style: italic; margin-bottom: 1.8rem; }
.journal-story-body { color: #5e5248; font-size: 1.08rem; line-height: 1.9; white-space: normal; }
.journal-attachments { margin-top: 2rem }
.journal-attachments h3 { color: #8b786b; font: 700 .68rem Arial, sans-serif; letter-spacing: .15em; text-transform: uppercase; margin-bottom: .8rem; }
.journal-attachment-grid { display: flex; flex-wrap: wrap; gap: 1rem; }
.journal-attachment { display: grid; grid-template-columns: 74px minmax(0, 1fr); column-gap: .75rem; width: min(250px, 100%); color: #74665b; font-family: Arial, sans-serif; font-size: .78rem; }
.journal-picture-button { display: block; width: 74px; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.journal-picture-button:hover { background: transparent; color: inherit; }
.journal-attachment:hover { text-decoration: none; color: #d93e39; }
.journal-attachment-visual { grid-row: span 2; width: 74px; height: 60px; background: #e8dfd2; overflow: hidden; display: grid; place-items: center; }
.journal-attachment-visual img { width: 100%; height: 100%; object-fit: cover; }
.journal-file-icon { color: #b45050; font: 700 .62rem Arial, sans-serif; border: 1px solid #b45050; padding: .35rem .25rem; }
.journal-attachment-name { align-self: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.journal-attachment small { color: #a59283; align-self: start; }
.journal-image-modal[hidden] { display: none; }
.journal-image-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 2rem; background: rgba(38, 32, 28, .88); cursor: zoom-out; }
.journal-image-modal img { display: block; max-width: min(94vw, 1200px); max-height: 90vh; object-fit: contain; box-shadow: 0 12px 42px rgba(0, 0, 0, .35); }
.journal-image-modal-close { position: fixed; top: 1rem; right: 1.2rem; z-index: 51; padding: .1rem .5rem; border: 0; background: transparent; color: #fff; font: 2.2rem/1 Arial, sans-serif; cursor: pointer; }
.journal-public-empty { text-align: center; padding: 4rem 0; }
.journal-public-footer { padding: 2rem; text-align: center; color: #a59283; border-top: 1px solid #d8cdbd; font: .72rem Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 700px) {
    .journal-admin-heading, .journal-form-actions { align-items: stretch; flex-direction: column; }
    .journal-admin-table { display: block; overflow-x: auto; white-space: nowrap; }
    .journal-public-header, .journal-public-main { padding-left: 1.2rem; padding-right: 1.2rem; }
    .journal-public-header p { display: none; }
}

.fee-col {
    text-align: center;
    white-space: nowrap;
    min-width: 62px;
}

.col-filter-select {
    display: block;
    margin: 3px auto 0;
    padding: 1px 2px;
    font-size: 0.68rem;
    font-family: inherit;
    border: 1px solid var(--gray-border);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    width: 100%;
    max-width: 52px;
}

.arrears-section {
    margin: 14px 0 0;
}

.arrears-container {
    margin-top: 8px;
}

.arrears-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.copy-status {
    font-size: 0.8rem;
    color: #065f46;
    min-height: 1em;
}

.copy-status.error {
    color: #b91c1c;
}

.arrears-textarea {
    width: 100%;
    min-height: 88px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.86rem;
    box-sizing: border-box;
}

.fee-status-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fee-toggle-form {
    margin: 0;
}

.fee-check {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: default;
    border: 1px solid transparent;
}

.fee-toggle-button {
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
}

.fee-toggle-button:hover:not(:disabled) {
    transform: none;
}

.fee-toggle-button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.fee-toggle-button:active:not(:disabled) {
    transform: none;
}

.fee-check.paid {
    color: #065f46;
    background-color: #d1fae5;
    border-color: #6ee7b7;
}

.fee-check.unpaid {
    color: #6b7280;
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.fee-toggle-button.paid:hover:not(:disabled) {
    background-color: #a7f3d0;
    border-color: #34d399;
}

.fee-toggle-button.unpaid:hover:not(:disabled) {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

.fee-tooltip {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 230px;
    max-height: 250px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid var(--gray-border);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
    padding: 10px;
    z-index: 40;
    text-align: left;
}

.fee-status-wrapper:hover .fee-tooltip,
.fee-status-wrapper:focus-within .fee-tooltip {
    display: block;
}

.fee-tooltip-title {
    display: block;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--gray-border);
}

.fee-tooltip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.85rem;
}

.fee-year {
    color: var(--text-primary);
    font-weight: 600;
}

.fee-state {
    text-align: right;
}

.fee-state.paid {
    color: #047857;
}

.fee-state.unpaid {
    color: #6b7280;
}

.member-image-inline-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    min-height: 36px;
    width: 100%;
}

.member-image-filename-link {
    color: var(--primary-light);
    text-decoration: underline;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    margin-right: auto;
}

.id-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    background: #fff;
    color: var(--text-primary);
    cursor: pointer;
    margin-left: auto;
    box-sizing: border-box;
}

.members-page .compact-member-form .id-upload-button,
.events-page .compact-member-form .id-upload-button {
    min-width: 40px;
    width: auto;
    min-height: 24px;
    height: 24px;
    padding: 0 8px;
    text-align: center;
    justify-content: center;
    white-space: nowrap;
    line-height: 1;
    font-size: 0.68rem;
    flex: 0 0 auto;
    box-sizing: border-box;
}

.id-upload-button:hover {
    background: var(--gray-light);
}

.visually-hidden-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.icon-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--gray-border);
    border-radius: 50%;
    text-decoration: none;
    color: var(--text-primary);
    background: #fff;
    font-size: 0.9rem;
    line-height: 1;
}

.icon-action-link:hover {
    background: var(--gray-light);
}

.member-image-preview {
    width: 140px;
    max-height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--gray-border);
    background: #fff;
}

.col-action form,
.col-action-delete form {
    margin: 0;
}

.col-action .navi-button,
.col-action-delete .navi-button {
    vertical-align: middle;
}

.inactive td {
    background-color: #9ca3af;
    color: white;
}

.edit-span {
    padding-bottom: 5px;
}

.previous_admin {
    text-align: center;
    margin: auto;
    padding: 20px;
    color: var(--text-primary);
    font-size: 1.875rem;
    font-weight: 500;
}

.current_admin {
    text-align: center;
    margin: auto;
    border: 2px solid var(--primary-color);
    padding: 20px;
    color: var(--text-primary);
    font-size: 1.875rem;
    font-weight: 600;
    background: var(--gray-light);
    border-radius: 8px;
}

.next_admin {
    text-align: center;
    margin: auto;
    color: var(--text-primary);
    padding: 20px;
    font-size: 1.875rem;
    font-weight: 500;
}
.previous {
    text-align: center;
    margin: auto;
    padding: 40px;
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 500;
    background: var(--gray-light);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

span.prev_result {
    text-align: center;
    padding: 8px 16px;
    color: white;
    background-color: var(--success-color);
    font-size: 2.5rem;
    font-weight: 600;
    border-radius: 6px;
    display: inline-block;
}

span.result_12 {
    text-align: center;
    padding: 8px 16px;
    color: #1f2937;
    background-color: var(--accent-color);
    font-size: 2.5rem;
    font-weight: 600;
    border-radius: 6px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

span.result_0 {
    text-align: center;
    padding: 8px 16px;
    color: white;
    background-color: var(--danger-color);
    font-size: 2.5rem;
    font-weight: 600;
    border-radius: 6px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.current {
    text-align: center;
    background-color: var(--primary-dark);
    margin: auto;
    border: 3px solid var(--accent-color);
    padding: 60px;
    color: white;
    font-size: 3.5rem;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.3);
    margin-bottom: 1.5rem;
}

.next {
    text-align: center;
    margin: auto;
    color: var(--text-primary);
    padding: 40px;
    font-size: 3.5rem;
    font-weight: 500;
    background: var(--gray-light);
    border-radius: 8px;
}

.events-next {
    font-size: clamp(4.8rem, 8vw, 7.5rem);
    font-weight: 700;
    line-height: 1.05;
}

.form-content {
    width: 85%;
    margin: auto;
    
}

.form-div {
    text-align: center;
}

form.member-form {
    max-width: 600px;
    margin: 0 auto 40px auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 1rem;
}

.form-row label {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

.form-row input,
.form-row button {
    flex: 2;
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.shooter_select {
    flex: 2;
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.shooter_select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-row select {
    flex: 2;
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-margin {
    margin: 0;
    width: 0;
}


button {
    background-color: var(--primary-dark);
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.2);
    display: inline-block;
}

button:hover:not(:disabled) {
    background-color: #0f1620;
    box-shadow: 0 4px 12px rgba(30, 42, 56, 0.3);
    transform: translateY(-1px);
}

button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
}

button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

button:disabled {
    background-color: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.navi-button {
    min-width: 150px;
    min-height: 44px;
    background-color: var(--primary-dark);
    color: white;
    border: none;
    border-radius: 7px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(30, 42, 56, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 16px;
    line-height: 1.2;
    white-space: nowrap;
}

.navi-button:hover:not(:disabled) {
    background-color: #0f1620;
    box-shadow: 0 5px 14px rgba(30, 42, 56, 0.3);
    transform: translateY(-1px);
}

.navi-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.2);
}

.navi-button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.navi-button:disabled {
    background-color: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* Compact navigation button variant when used in table cells */
table .navi-button {
    min-width: 78px;
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 5px;
    font-size: 0.78rem;
    line-height: 1.1;
    box-shadow: 0 2px 6px rgba(30, 42, 56, 0.16);
}

table .navi-button:hover:not(:disabled) {
    box-shadow: 0 3px 8px rgba(30, 42, 56, 0.24);
}

table .navi-button:active:not(:disabled) {
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.18);
}

.button-nowrap {
    white-space: nowrap;
}


.link {
	align-items: center;
	text-align: center;
	padding-bottom: 10px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: #fff;
    margin: 4% auto;
    padding: 30px;
    border: none;
    width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    position: relative;
}

.close {
    color: var(--text-light);
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: var(--text-primary);
}

/* Members page compact modal redesign */
.members-page .member-modal-content,
.events-page .member-modal-content {
    width: min(700px, 92vw);
    margin: 3% auto;
    padding: 20px 22px 18px;
    border-radius: 14px;
    border: 1px solid var(--gray-border);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
}

.events-page .trophy-candidates-modal {
    width: min(1100px, 92vw);
    max-height: 84vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.trophy-candidates-modal h2 {
    margin-top: 0;
}

.trophy-candidates-modal .trophy-year-selector {
    max-width: 320px;
}

.trophy-candidates-table-wrap {
    overflow-x: auto;
}

.trophy-candidates-table-wrap table {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.candidate-year-panel {
    display: none;
}

.members-page .compact-member-form,
.events-page .compact-member-form {
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.members-page .compact-member-form h2,
.events-page .compact-member-form h2 {
    text-align: left;
    margin: 0 0 14px;
    font-size: 1.25rem;
}

.members-page .compact-member-form .form-row,
.events-page .compact-member-form .form-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.members-page .compact-member-form .form-row label,
.events-page .compact-member-form .form-row label {
    text-align: left;
    font-size: 0.9rem;
}

.members-page .compact-member-form .form-row input,
.members-page .compact-member-form .form-row select,
.members-page .compact-member-form .form-row button,
.events-page .compact-member-form .form-row input,
.events-page .compact-member-form .form-row select,
.events-page .compact-member-form .form-row button {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    box-sizing: border-box;
}

.members-page .compact-member-form .form-row .input-check,
.events-page .compact-member-form .form-row .input-check {
    width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    margin: 0;
    justify-self: start;
}

.members-page .compact-member-form .member-modal-actions,
.events-page .compact-member-form .member-modal-actions {
    grid-template-columns: 1fr;
    margin-top: 6px;
}

.members-page .compact-member-form .member-modal-actions button,
.events-page .compact-member-form .member-modal-actions button {
    width: auto;
    min-width: 160px;
    justify-self: end;
}

.members-page .compact-member-form .member-modal-actions-split,
.events-page .compact-member-form .member-modal-actions-split {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.members-page .compact-member-form .member-modal-actions-split .delete-button,
.events-page .compact-member-form .member-modal-actions-split .delete-button {
    justify-self: start;
    min-width: 140px;
    background-color: #b91c1c;
    border: 1px solid #991b1b;
    color: #fff;
    box-shadow: 0 3px 10px rgba(127, 29, 29, 0.28);
}

.members-page .compact-member-form .member-modal-actions-split button[name="update"],
.events-page .compact-member-form .member-modal-actions-split button[name="update"] {
    justify-self: end;
}

.members-page .compact-member-form .member-modal-actions-split .delete-button:hover:not(:disabled),
.events-page .compact-member-form .member-modal-actions-split .delete-button:hover:not(:disabled) {
    background-color: #991b1b;
    border-color: #7f1d1d;
    box-shadow: 0 5px 14px rgba(127, 29, 29, 0.38);
}

.members-page .compact-member-form .member-modal-actions-split .delete-button:active:not(:disabled),
.events-page .compact-member-form .member-modal-actions-split .delete-button:active:not(:disabled) {
    background-color: #7f1d1d;
    border-color: #7f1d1d;
    box-shadow: 0 2px 6px rgba(127, 29, 29, 0.32);
}

.members-page .compact-member-form .member-modal-actions-split .delete-button:focus,
.events-page .compact-member-form .member-modal-actions-split .delete-button:focus {
    outline: 2px solid #fecaca;
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .members-page .member-modal-content,
    .events-page .member-modal-content {
        width: 94vw;
        margin: 5% auto;
        padding: 16px;
    }

    .members-page .compact-member-form .form-row,
    .events-page .compact-member-form .form-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .members-page .compact-member-form .member-modal-actions button,
    .events-page .compact-member-form .member-modal-actions button {
        width: 100%;
    }

    .members-page .compact-member-form .member-modal-actions-split,
    .events-page .compact-member-form .member-modal-actions-split {
        grid-template-columns: 1fr;
    }

    .members-page .compact-member-form .member-modal-actions-split .delete-button,
    .members-page .compact-member-form .member-modal-actions-split button[name="update"],
    .events-page .compact-member-form .member-modal-actions-split .delete-button,
    .events-page .compact-member-form .member-modal-actions-split button[name="update"] {
        justify-self: stretch;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        overflow-x: auto;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    
    .sidebar h2 {
        margin-right: 1rem;
        white-space: nowrap;
    }
    
    .sidebar a {
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    
    .navi-button {
        min-width: 130px;
        min-height: 40px;
        font-size: 0.88rem;
        padding: 9px 14px;
    }
    
    table {
        width: 100%;
        font-size: 0.8em;
    }
    
    th, td {
        padding: 6px 8px;
    }
    
    .modal-content {
        width: 90%;
        margin: 10% auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .navi-button {
        min-width: 110px;
        min-height: 38px;
        font-size: 0.85rem;
        padding: 8px 12px;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .current {
        padding: 30px;
        font-size: 2rem;
    }
    
    .previous, .next {
        padding: 20px;
        font-size: 1.5rem;
    }
}

/* Homepage Styles */
.homepage-container {
    max-width: 900px;
    margin: 2rem auto;
}

.logo-section {
    text-align: center;
    margin-bottom: 3rem;
}

.logo-section img {
    max-width: 500px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.welcome-section {
    background-color: var(--primary-dark);
    color: white;
    padding: 3rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(55, 90, 127, 0.2);
}

.welcome-section h2 {
    margin-top: 0;
    color: white;
    text-align: center;
    font-size: 2rem;
}

.welcome-section p {
    line-height: 1.6;
    font-size: 1.05rem;
    margin: 1rem 0;
    text-align: center;
}

.quick-links-section {
    margin-bottom: 2rem;
}

.quick-links-section h3 {
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.event-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.event-card h4 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.event-card p {
    color: var(--text-light);
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.event-badge {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.event-card a {
    display: inline-block;
    margin-top: 1rem;
    background-color: var(--primary-dark);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.event-card a:hover {
    box-shadow: 0 4px 12px rgba(55, 90, 127, 0.3);
    transform: translateY(-1px);
}

.no-events-message {
    text-align: center;
    padding: 2rem;
    background: var(--gray-light);
    border-radius: 8px;
    color: var(--text-light);
}

/* Display utility classes */
.display-inline-bottom-spacer {
    margin-bottom: 1rem;
}

.display-inline {
    display: inline;
}

.display-inline-block {
    display: inline-block;
}

.display-block {
    display: block;
}

.display-none {
    display: none;
}

/* Text styling classes */
.error-text {
    color: #a40000;
}

.subtitle-text {
    font-size: 0.95rem;
    opacity: 0.9;
}

.status-active {
    color: var(--success-color);
    font-weight: 600;
}

.status-planned {
    color: var(--text-light);
}

.link-primary {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}

.link-primary:hover {
    text-decoration: underline;
}

.btn-form-action {
    border: none;
    margin-top: 1rem;
    background-color: var(--primary-dark);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-form-action:hover:not(:disabled) {
    background-color: #0f1620;
    box-shadow: 0 4px 12px rgba(30, 42, 56, 0.3);
    transform: translateY(-1px);
}

.section-buttons {
    text-align: center;
    margin: 20px;
}

@media (max-width: 768px) {
    .homepage-container {
        margin: 1rem;
    }
    
    .welcome-section {
        padding: 2rem;
    }
    
    .welcome-section h2 {
        font-size: 1.5rem;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
    }
}
