/* Page background */
body {
    background-color: #f4f6f8;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
}

:root {

    --primary: #2f8587;
    --primary-hover: #236a6c;

    --success: #2e7d32;
    --danger: #c62828;
    --warning: #f9a825;

    --background: #f4f6f8;
    --card: #ffffff;

    --border: #d9e5e5;

    --shadow:
        0 4px 14px rgba(0, 0, 0, .08);

}

/* Main page container */
.container {
    width: 95%;
    padding: 28px 36px;

    box-sizing: border-box;

    margin: 32px auto;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 12px;

    box-shadow: var(--shadow);
}

html {

    scroll-behavior: smooth;

}

/* ===========================
   BSLAF HEADER
=========================== */

.bslaf-site-header {
    background: #fff;
    border-top: 4px solid #2f8587;
    border-bottom: 1px solid #d9e5e5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.bslaf-site-header__inner {
    max-width: 1400px;
    margin: auto;

    min-height: 72px;

    padding: 0 22px;

    display: flex;
    align-items: center;
    gap: 18px;
}

.bslaf-site-header__logo {
    width: 185px;
    height: auto;
    display: block;
}

.bslaf-site-header__separator {
    width: 1px;
    height: 36px;
    background: #d9e5e5;
}

.bslaf-site-header__title {
    margin-right: auto;
}

.bslaf-site-header__title-main {

    font-size: 22px;

    font-weight: 700;

    color: #173638;
}

.bslaf-site-header__title-small {

    display: block;

    margin-top: 2px;

    color: #68797a;

    font-size: 12px;
}

.bslaf-site-header__nav {

    display: flex;

    gap: 10px;
}

.bslaf-site-header__link {

    padding: 10px 18px;

    border-radius: 8px;

    border: 1px solid #d9e5e5;

    background: white;

    color: #173638;

    font-weight: 600;

    text-decoration: none;

    transition: .15s;
}

.bslaf-site-header__link:hover {

    background: #2f8587;

    color: white;

    border-color: #2f8587;
}

.member-info-grid input,
.member-info-grid select,
.member-info-grid textarea {
    padding: 10px 12px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: white;
}

.form-container {
    width: 40%;
    min-width: 700px;
    margin-left: 0;
}

/* Page header (title + login button alignment) */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header .left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 40px;
    height: 40px;
    background: #ccc;
    border-radius: 6px;
}



/* Table styling */
table {

    width: 100%;

    border-collapse: separate;

    border-spacing: 0;

    margin-top: 18px;

    border: 1px solid var(--border);

    border-radius: 12px;

    overflow: hidden;

    background: white;

}

th {

    background: linear-gradient(to bottom,
            #f6fbfb,
            #edf5f5);

    color: #173638;

    font-weight: 700;

    padding: 15px;

    border-bottom: 1px solid var(--border);

    text-align: left;
    vertical-align: middle;

}

td {

    padding: 14px;

    border-top: 1px solid #ececec;

    vertical-align: middle;

}

tr:nth-child(even) {

    background: #fafcfc;

}

tr:hover {

    background: #f2fbfb;

    transition: background .12s ease;

}

/* ===========================
   PRIMARY BUTTONS
=========================== */

button,
.button {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;

    padding: 10px 18px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    text-decoration: none;

    transition:
        background-color .15s ease,
        box-shadow .15s ease,
        transform .08s ease;
}

.filter-actions {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-top: 8px;

}

.filter-toolbar {

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 10px;

    padding: 10px 0;

}

.filter-toolbar button,
.filter-toolbar a {

    width: 34px;

    height: 34px;

    padding: 0;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    box-sizing: border-box;

    font-size: 14px;

    line-height: 1;

}

.filter-toolbar-row th {

    padding: 0px 0;

}

.options-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 300px;
}

.payment-history-table th:last-child {
    padding-left: 28px;
}

button:hover,
.button:hover {

    background: var(--primary-hover);

    box-shadow:
        0 4px 12px rgba(47, 133, 135, .25);
}

button:active,
.button:active {

    transform: translateY(1px);

}

.button-link {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.page-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.inline-actions {
    display: flex;
    gap: 10px;
}

.login-button {

    width: 100%;

    margin-top: 18px;

    padding: 14px;

    border-radius: 10px;

    font-size: 16px;

    font-weight: 700;

}

.login-page label {

    font-weight: 600;

    color: #173638;

}

.login-page form {

    display: flex;

    flex-direction: column;

    gap: 18px;

}

.login-logo {

    display: block;

    width: 170px;

    margin: 0 auto 25px;

}

.login-page h2 {

    text-align: center;

    color: #173638;

    font-size: 30px;

    margin: 10px 0 30px;

    font-weight: 700;

}

/* ===========================
   SECONDARY BUTTON
=========================== */

.button.secondary {

    background: white;

    color: var(--primary);

    border: 1px solid var(--primary);

}

.button.secondary:hover {

    background: var(--primary);

    color: white;

}

.export-form {
    width: auto;
    margin-left: auto;
}

.form-actions {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    margin-top: 20px;
}

form {
    width: 100%;
}

.form-column {
    display: flex;
    flex-direction: column;
}

.button.small {
    padding: 5px 10px;
    font-size: 13px;
}

.button.danger {
    background: var(--danger);
}

.button.danger:hover {
    background: #a91f2d;
}

.form-actions.center {
    justify-content: center;
    gap: 20px;
}

/* ===========================
   FORM INPUTS
=========================== */

form select,
form input,
form textarea {

    width: 100%;

    padding: 10px 12px;

    margin-right: 8px;

    border: 1px solid var(--border);

    line-height: 1.4;

    border-radius: 8px;

    background: white;

    font-size: 14px;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;

    box-sizing: border-box;
}

form input:focus,
form select:focus,
form textarea:focus {

    outline: none;

    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(47, 133, 135, .15);

}

/* Status labels */
.status-active {
    background: #d4edda;
    color: #155724;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.status-suspended {
    background: #f8d7da;
    color: #721c24;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
}

th a {

    color: #173638;
    text-decoration: none;
}

th a:visited {

    color: #173638;
}

th a:hover {
    text-decoration: underline;
}

.registry-count {
    margin-bottom: 10px;
    color: #555;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {

    background: #eaf8f8;

}

.verification-badge {
    background-color: #e6f7e6;
    border: 1px solid #4CAF50;
    color: #2e7d32;
    padding: 10px 14px;
    margin: 10px 0 20px 0;
    border-radius: 4px;
    font-weight: 500;
}

.payment-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: none;
}

.payment-submit {
    width: 300px;
    text-align: center;
    align-self: center;
    display: block;
    margin: 10px auto 0;
}

.public-register-page {
    width: 95%;
    max-width: 1600px;
    margin: 20px auto;
}

.status-inactive {
    background: #fff3cd;
    color: #856404;
}

.progress-bar-fill {
    width: var(--width);
    background: #28a745;
    height: 100%;
    border-radius: 6px;
}

.active-tab {
    background: var(--primary);
    color: white;
}

.status-tabs {
    margin: 15px 0;
}

.status-tabs .button {
    margin-right: 8px;
}

.status {

    display: inline-flex;

    align-items: center;

    padding: 6px 12px;

    border-radius: 999px;

    font-size: 12px;

    font-weight: 700;

}

.status.active {
    background-color: #d4edda;
    color: #155724;
}

.status.suspended {
    background-color: #fff3cd;
    color: #856404;
}

.status.deleted {
    background-color: #f8d7da;
    color: #721c24;
}

.pagination a,
.pagination strong {
    padding: 6px 10px;
    border-radius: 4px;
    text-decoration: none;
}

.pagination a {
    background: var(--primary);
    color: white;
}

.pagination a:hover {
    background: var(--primary-hover);
}

.pagination strong {
    background: var(--primary);
    color: white;
}

.export-container {
    margin-top: 10px;
    text-align: right;
}

.bottom-section {
    display: flex;
    align-items: center;
    margin-top: 15px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

tr[onclick]:hover {
    background-color: #f5f5f5;
}

.filters {

    display: flex;
    flex-wrap: wrap;
    gap: 16px;

    align-items: end;

    margin-bottom: 24px;

    padding: 22px;

    background: #fafcfc;

    border: 1px solid var(--border);

    border-radius: 12px;

}

.filters label {

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 6px;

    font-weight: 600;

    color: #173638;

}

/* ===========================
   MAIN NAVBAR
=========================== */

.navbar {
    background: #2f8587;
    border-top: 1px solid #236a6c;
    border-bottom: 1px solid #236a6c;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0 28px;

    min-height: 56px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar a,
.navbar .button-link,
.navbar span {

    color: white;

    text-decoration: none;

    padding: 9px 14px;

    border-radius: 6px;

    transition: .15s;
}

.navbar a:hover,
.navbar .button-link:hover {

    background: rgba(255, 255, 255, .15);

    text-decoration: none;
}

.navbar span {

    opacity: .9;

    font-weight: 600;
}

.login-page {

    min-height: 100vh;

    display: flex;

    justify-content: center;

    align-items: center;

    background:
        linear-gradient(180deg,
            #f8fbfb 0%,
            #eef5f5 100%);

}

.public-container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
}

.member-table {
    width: 100%;

}

.member-table th,
.member-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-table input,
.member-table select {
    width: 100%;
    max-width: 140px;
    box-sizing: border-box;
}

.form-actions-centered {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.wide-filter-row {

    display: flex;

    flex-wrap: wrap;

    gap: 18px;

    align-items: flex-end;

}

.wide-filter-row input,
.wide-filter-row select {

    width: 260px;

}

.member-info-grid {

    display: grid;

    grid-template-columns: 220px 1fr;

    margin-top: 20px;

    border: 1px solid var(--border);

    border-radius: 12px;

    overflow: hidden;

    background: white;

}

.member-info-grid>div {

    padding: 14px 18px;

    border-bottom: 1px solid var(--border);

}

.member-info-grid>div:nth-last-child(-n+2) {
    border-bottom: none;
}

.info-label {

    background: #edf5f5;

    font-weight: 700;

    color: #173638;

    display: flex;

    align-items: center;

}

.member-tabs {

    display: flex;

    gap: 10px;

    flex-wrap: wrap;

    margin-bottom: 20px;

}

.payment-history-footer {
    display: flex;
    align-items: center;
    margin-top: 10px;
    gap: 20px;
}

.login-page .container {

    width: 100%;

    max-width: 520px;

    padding: 40px;

    border-radius: 18px;

    border: 1px solid var(--border);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .10);

}

.home-container {
    max-width: 600px;
}

.required-star {
    color: #c62828;
    font-weight: bold;
}

/* =========================
   MOBILE RESPONSIVE
   ========================= */

@media (max-width: 768px) {
    body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .home-container {
        width: 95%;
        max-width: 600px;
        margin: 20px auto;
        border-radius: 6px;
    }

    .form-container {
        width: 100%;
        min-width: 0;
    }

    .login-page .container {
        max-width: 600px;
        width: 95%;
        margin: 20px auto;
        border-radius: 6px;
    }

    .payment-history-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .container {
        width: 100%;
        padding: 20px 16px;
        margin: 16px 0;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        overflow-x: hidden;
    }

    .member-tabs .button {
        flex: 1;
        min-width: 120px;
        text-align: center;
        margin: 0;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px;
    }

    .bslaf-site-header__inner {
        min-height: 0;
        padding: 14px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .bslaf-site-header__logo {
        width: 132px;
    }

    .bslaf-site-header__separator {
        display: none;
    }

    .bslaf-site-header__title {
        flex: 1 1 160px;
        min-width: 0;
    }

    .bslaf-site-header__title-main {
        font-size: 17px;
    }

    .bslaf-site-header__title-small {
        font-size: 11px;
    }

    .bslaf-site-header__nav {
        width: 100%;
        flex-wrap: wrap;
    }

    .bslaf-site-header__link {
        flex: 1 1 145px;
        padding: 9px 12px;
        text-align: center;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px;
    }

    .nav-left {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }

    .nav-right {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        width: 100%;
        flex-wrap: wrap;
    }

    .wide-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .wide-filter-row input,
    .wide-filter-row select {
        min-width: 100%;
        max-width: 100%;
        width: 100%;
    }

    .member-info-grid {
        grid-template-columns: 1fr;
    }

    .info-label {
        border-bottom: none;
    }

    .login-page .container {
        width: 95%;
        max-width: 600px;
        margin: 20px auto;
        border-radius: 6px;

        overflow-x: visible;
    }

    .login-page .member-info-grid {
        grid-template-columns: 1fr;
    }

    .member-table {
        display: block;
        width: 100%;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
    }

    .member-table thead,
    .member-table tbody {
        min-width: 1000px;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .page-actions {
        flex-direction: column;
        gap: 10px;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .export-form {
        margin-left: 0;
        width: 100%;
    }

    .payment-submit {
        width: 100%;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .logo {
        width: 32px;
        height: 32px;
    }

    .public-register-page {
        width: 100%;
        margin: 0;
        padding: 10px;
        box-sizing: border-box;
    }

    .payment-submit,
    .export-form,
    .form-actions .button,
    .form-actions button,
    .form-actions-centered .button,
    .form-actions-centered button {
        width: 100%;
    }

    .form-actions-centered,
    .payment-history-footer,
    .bottom-section {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .export-container {
        text-align: left;
    }

    .member-info-grid > div {
        padding: 12px 14px;
    }

    .toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
    }

    .toast-message {
        min-width: 0;
        max-width: none;
    }


}

.toast-container {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-message {
    min-width: 320px;
    max-width: 450px;
    padding: 14px 18px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);

    opacity: 0;
    transform: translateX(40px);

    animation:
        toastFadeIn 0.35s ease forwards,
        toastFadeOut 0.35s ease forwards 4s;
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--danger);
}

.toast-warning {
    background: var(--warning);
    color: #212529;
}

.toast-info {
    background: #17a2b8;
}

@keyframes toastFadeIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastFadeOut {
    to {
        opacity: 0;
        transform: translateX(40px);
    }
}
