/* Bustasoft Member Manager – Admin Styles */

.bsm-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.bsm-card {
    background: #fff;
    border-left: 6px solid #2271b1;
    padding: 20px;
    width: 8em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    cursor: pointer;
}

.bsm-cards a {
    text-decoration: none !important;
    color: inherit;
}
.bsm-cards a.highlight .bsm-card {
    background-color: #98d1ff !important;
}

.bsm-card.pending {
    border-color: #f0ad4e;
    color: #f0ad4e;
}

.bsm-card.active {
    border-color: #5cb85c;
    color: #5cb85c;
}

.bsm-card.expired {
    border-color: #d9534f;
    color: #d9534f;
}

.bsm-card h3 {
    margin: 0 0 10px;
}

.bsm-card .count {
    font-size: 32px;
    font-weight: bold;
}

.bsm-filters a {
    margin-right: 15px;
    text-decoration: none;
}

.bsm-filters a.active {
    font-weight: bold;
    text-decoration: underline;
}

.bsm-loader {
    display: none;
    margin: 10px 0;
    font-style: italic;
}

/* ================================
   Client Details – Layout
   ================================ */

.bsm-client-details {
    max-width: 1100px;
}

/* Section spacing */
.bsm-client-details h2,
.bsm-client-details h3 {
    margin-top: 30px;
}

/* Two-column layout for main forms */
.bsm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

/* Full-width rows */
.bsm-grid.full {
    grid-template-columns: 1fr;
}

/* Inputs */
.bsm-client-details input[type="text"],
.bsm-client-details input[type="email"],
.bsm-client-details input[type="date"],
.bsm-client-details textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    background: #fff;
}

/* Textareas */
.bsm-client-details textarea {
    min-height: 90px;
    resize: vertical;
}

/* Buttons spacing */
.bsm-client-details .button {
    margin-top: 10px;
}

/* Danger button */
.bsm-client-details .button-danger {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}

.bsm-client-details .button-danger:hover {
    background: #b32d2e;
    border-color: #b32d2e;
}

/* Tables */
.bsm-client-details table.widefat {
    margin-top: 15px;
}

.bsm-client-details table th {
    font-weight: 600;
}

/* Inline actions */
.bsm-inline-actions {
    display: flex;
    gap: 10px;
}

/* Section separators */
.bsm-separator {
    margin: 35px 0;
    border-top: 1px solid #e5e5e5;
}

/* Payment amount emphasis */
.bsm-amount {
    font-weight: bold;
}

/* Responsive (admin narrow screens) */
@media (max-width: 900px) {
    .bsm-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   Tabs
   ================================ */

.bsm-tabs {
    display: flex;
    border-bottom: 1px solid #ccd0d4;
    margin-bottom: 20px;
}

.bsm-tab {
    background: none;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 3px solid transparent;
}

.bsm-tab.active {
    font-weight: 600;
    border-bottom-color: #2271b1;
    color: #2271b1;
}

.bsm-tab:hover {
    background: #f6f7f7;
}

.bsm-tab-content {
    display: none;
}

.bsm-tab-content.active {
    display: block;
}

/* ======================================
   Form Controls – WordPress-native
   ====================================== */

.bsm-client-details input[type="text"],
.bsm-client-details input[type="email"],
.bsm-client-details input[type="number"],
.bsm-client-details input[type="date"],
.bsm-client-details select,
.bsm-client-details textarea {
    width: 100%;
    max-width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    line-height: 1.4;
    border-radius: 4px;
    border: 1px solid #ccd0d4;
    background-color: #fff;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Focus state (matches WP style) */
.bsm-client-details input:focus,
.bsm-client-details select:focus,
.bsm-client-details textarea:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

/* Disabled */
.bsm-client-details input:disabled,
.bsm-client-details select:disabled,
.bsm-client-details textarea:disabled {
    background: #f6f7f7;
    color: #a7aaad;
}

/* Labels */
.bsm-client-details label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Field wrapper */
.bsm-field {
    margin-bottom: 16px;
}

/* Textarea */
.bsm-client-details textarea {
    min-height: 90px;
    resize: vertical;
}

/* Small inputs (dates, numbers) */
.bsm-field.small input {
    max-width: 220px;
}

/* Inline fields */
.bsm-inline {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

/* Buttons */
.bsm-client-details .button {
    padding: 6px 16px;
    font-size: 14px;
}

/* Primary button spacing */
.bsm-client-details .button-primary {
    margin-top: 8px;
}

/* Danger button (delete) */
.bsm-client-details .button-danger {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}

.bsm-client-details .button-danger:hover {
    background: #b32d2e;
    border-color: #b32d2e;
}

/* Tables inside forms */
.bsm-client-details table.widefat td {
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 900px) {
    .bsm-inline {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ======================================
   Bustasoft – Water.css inspired theme
   (SCOPED – SAFE FOR WORDPRESS)
   ====================================== */

.bsm-scope {
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
        "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
}

/* Headings */
.bsm-scope h1,
.bsm-scope h2,
.bsm-scope h3 {
    font-weight: 600;
    margin-bottom: 0.6em;
}

/* Paragraphs */
.bsm-scope p {
    margin-bottom: 1em;
}

/* Forms */
.bsm-scope input,
.bsm-scope select,
.bsm-scope textarea {
    width: 100%;
    padding: 0.55em 0.75em;
    margin-bottom: 0.9em;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Focus (Water.css-like) */
.bsm-scope input:focus,
.bsm-scope select:focus,
.bsm-scope textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Textarea */
.bsm-scope textarea {
    min-height: 90px;
    resize: vertical;
}

/* Labels */
.bsm-scope label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25em;
}

/* Buttons */
.bsm-scope button,
.bsm-scope .button {
    font-size: 14px;
    padding: 0.45em 1em;
    cursor: pointer;
}

/* Primary button */
.bsm-scope .button-primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.bsm-scope .button-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

/* Tables */
.bsm-scope table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
}

.bsm-scope th,
.bsm-scope td {
    padding: 0.65em 0.75em;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.bsm-scope th {
    font-weight: 600;
    background: #f9fafb;
}

/* Horizontal separators */
.bsm-scope hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2em 0;
}

/* Cards (Water.css feel) */
.bsm-scope .bsm-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 1.2em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5em;
}

/* Subtle links */
.bsm-scope a {
    color: #2563eb;
    text-decoration: none;
}

.bsm-scope a:hover {
    text-decoration: underline;
}


/* ======================================
   Bustasoft Form Layout System
   ====================================== */

/* Base grid */
.bsm-scope .bsm-form-grid {
    display: grid;
    gap: 16px 20px;
    align-items: start;
}

/* Column presets */
.bsm-scope .cols-1 {
    grid-template-columns: 1fr;
}

.bsm-scope .cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.bsm-scope .cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.bsm-scope .cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Column spans */
.bsm-scope .span-1 {
    grid-column: span 1;
}

.bsm-scope .span-2 {
    grid-column: span 2;
}

.bsm-scope .span-3 {
    grid-column: span 3;
}

.bsm-scope .span-4 {
    grid-column: span 4;
}

/* Full row */
.bsm-scope .full {
    grid-column: 1 / -1;
}

/* Field wrapper */
.bsm-scope .bsm-field {
    display: flex;
    flex-direction: column;
}

/* Inline group (date + number, etc.) */
.bsm-scope .bsm-inline {
    display: flex;
    gap: 12px;
}

/* Section block (visual grouping) */
.bsm-scope .bsm-section {
    margin-top: 30px;
}

/* Responsive collapse */
@media (max-width: 900px) {

    .bsm-scope .cols-2,
    .bsm-scope .cols-3,
    .bsm-scope .cols-4 {
        grid-template-columns: 1fr;
    }

    .bsm-scope .span-2,
    .bsm-scope .span-3,
    .bsm-scope .span-4 {
        grid-column: span 1;
    }
}


/* ======================================
   Fieldset as Container (Water-like)
   ====================================== */

.bsm-scope fieldset.bsm-fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.5rem 1.25rem 1.25rem;
    margin: 2rem 0;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Remove default browser styles */
.bsm-scope fieldset.bsm-fieldset {
    min-inline-size: unset;
}

/* Legend (Title) */
.bsm-scope fieldset.bsm-fieldset>legend {
    padding: 0 0.6rem;
    font-weight: 600;
    font-size: 18px;
    color: #fff;
    background-color: #2271b1;
    border-radius: 4px;
}

/* Legend positioning (floating effect) */
.bsm-scope fieldset.bsm-fiel
/* ======================================
   Form Footer (Actions Bar)
   ====================================== */

.bsm-scope .bsm-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
}

/* Left / right button groups */
.bsm-scope .bsm-footer-left,
.bsm-scope .bsm-footer-right {
    display: flex;
    gap: 10px;
}

/* Right actions emphasis */
.bsm-scope .bsm-footer-right .button-primary {
    min-width: 120px;
}

/* Danger button in footer */
.bsm-scope .bsm-form-footer .button-danger {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}

.bsm-scope .bsm-form-footer .button-danger:hover {
    background: #b32d2e;
    border-color: #b32d2e;
}

/* Sticky footer (optional) */
.bsm-scope .bsm-form-footer.sticky {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    padding-bottom: 1rem;
    z-index: 5;
}

/* Responsive */
@media (max-width: 768px) {
    .bsm-scope .bsm-form-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .bsm-scope .bsm-footer-left,
    .bsm-scope .bsm-footer-right {
        justify-content: flex-end;
    }
}


/* ======================================
   Form Footer (Actions Bar)
   ====================================== */

.bsm-scope .bsm-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
}

/* Left / right button groups */
.bsm-scope .bsm-footer-left,
.bsm-scope .bsm-footer-right {
    display: flex;
    gap: 10px;
}

/* Right actions emphasis */
.bsm-scope .bsm-footer-right .button-primary {
    min-width: 120px;
}

/* Danger button in footer */
.bsm-scope .bsm-form-footer .button-danger {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}

.bsm-scope .bsm-form-footer .button-danger:hover {
    background: #b32d2e;
    border-color: #b32d2e;
}

/* Sticky footer (optional) */
.bsm-scope .bsm-form-footer.sticky {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    padding-bottom: 1rem;
    z-index: 5;
}

/* Responsive */
@media (max-width: 768px) {
    .bsm-scope .bsm-form-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .bsm-scope .bsm-footer-left,
    .bsm-scope .bsm-footer-right {
        justify-content: flex-end;
    }
}

/* ======================================
   Restore Select Dropdown Arrow
   ====================================== */

.bsm-scope select {
    appearance: auto;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;

    background-color: #ffffff;
    background-image: none;
    padding-right: 2.2em;
    /* space for arrow */
}

/* ======================================
   Dashboard Table Search
   ====================================== */

.bsm-dashboard-search {
    margin: 15px 0 20px;
}

.bsm-dashboard-search input[type="search"] {
    width: 320px;
    max-width: 100%;
    padding: 8px 12px;
    font-size: 14px;
}

/* ===============================
   Pagination Layout (Final)
   =============================== */

.bsm-scope .bsm-pagination {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

/* LEFT: Showing / per page */
.bsm-scope .bsm-pagination form {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

/* CENTER: Prev / Next */
.bsm-scope .bsm-pagination-controls {
    justify-self: center;
    display: flex;
    gap: 8px;
}

/* RIGHT: Page info */
.bsm-scope #bsm-page-info {
    justify-self: end;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

/* Buttons */
.bsm-scope .bsm-pagination .button {
    height: 32px;
    line-height: 30px;
    padding: 0 12px;
}

/* Disabled state */
.bsm-scope .bsm-pagination .button.disabled,
.bsm-scope .bsm-pagination .button[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

/* Select */
.bsm-scope .bsm-pagination select {
    min-width: 80px;
    height: 32px;
    padding: 4px 8px;
}

/* ===============================
   Responsive
   =============================== */

@media (max-width: 768px) {
    .bsm-scope .bsm-pagination {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 10px;
    }

    .bsm-scope .bsm-pagination form,
    .bsm-scope .bsm-pagination-controls,
    .bsm-scope #bsm-page-info {
        justify-self: center;
    }
}
