html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bo-body {
    margin: 0;
    height: 100vh;
    background: linear-gradient(135deg, #fff6ed 0%, #f8fafc 42%, #eef2ff 100%);
    color: #1f2937;
    overflow: hidden;
}

.bo-shell {
    height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    overflow: hidden;
}

.bo-sidebar {
    background: linear-gradient(180deg, #9a3412 0%, #c2410c 100%);
    color: #fff;
    height: 100vh;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 0 30px rgba(154, 52, 18, 0.25);
    overflow-y: auto;
    overflow-x: hidden;
}

.bo-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.bo-brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.2rem;
}

.bo-brand-title {
    font-size: 1.2rem;
    font-weight: 800;
}

.bo-brand-subtitle {
    font-size: 0.85rem;
    opacity: 0.85;
}

.bo-nav {
    display: grid;
    gap: 10px;
}

.bo-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.bo-nav-link:hover,
.bo-nav-link.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.bo-sidebar-footer {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
}

.bo-main {
    height: 100vh;
    padding: 24px 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow: hidden;
    font-size: 0.94rem;
}

.bo-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 0;
    flex: 0 0 auto;
}

.bo-topbar-kicker {
    color: #c2410c;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.bo-topbar-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
}

.bo-topbar-badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-weight: 700;
}

.bo-panel,
.bo-stat-card,
.bo-mini-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
}

.bo-panel {
    padding: 18px;
    overflow: hidden;
}

.bo-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.bo-panel-header h2 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
}

.bo-panel-header p {
    margin: 6px 0 0;
    color: #64748b;
}

.bo-stat-card {
    padding: 18px 18px 18px 20px;
    position: relative;
    overflow: hidden;
}

.bo-stat-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    border-radius: 22px 0 0 22px;
    background: #c2410c;
}

.bo-stat-label {
    color: #64748b;
    font-weight: 700;
    margin-bottom: 10px;
}

.bo-stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}

.bo-stat-meta {
    color: #64748b;
    font-size: 0.95rem;
}

.border-assoc::before {
    background: #16a34a;
}

.border-club::before {
    background: #2563eb;
}

.border-practice::before {
    background: #7c3aed;
}

.border-payments::before {
    background: #c2410c;
}

.bo-mini-card {
    padding: 16px;
}

.bo-btn-primary {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border: 0;
    color: #fff;
    font-weight: 700;
    border-radius: 14px;
    padding: 12px 16px;
}

.bo-btn-primary:hover {
    color: #fff;
    filter: brightness(1.02);
}

.bo-detail-label {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bo-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.bo-content > section:last-child {
    margin-bottom: 0 !important;
}

.row {
    --bs-gutter-y: 1rem;
}

.table thead th {
    white-space: normal;
    overflow-wrap: anywhere;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.form-control,
.form-select {
    border-radius: 14px;
    border-color: #dbe3ef;
    font-size: 0.92rem;
}

.table-responsive {
    overflow-x: hidden;
}

.table {
    width: 100% !important;
    table-layout: fixed;
    margin-bottom: 0;
    font-size: 0.86rem;
}

.table td,
.table th {
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
    padding: 0.58rem 0.62rem;
}

.table td .small,
.table th .small,
.bo-panel .small {
    font-size: 0.76rem !important;
}

.table-hover tbody tr:hover {
    background: rgba(249, 115, 22, 0.06);
}

.badge {
    font-weight: 600;
}

.dt-container,
.dataTables_wrapper {
    width: 100%;
    overflow: hidden;
    font-size: 0.88rem;
}

.dt-layout-row,
.dataTables_wrapper .row {
    margin-left: 0;
    margin-right: 0;
}

.dt-layout-cell,
.dataTables_wrapper .col-sm-12,
.dataTables_wrapper .col-md-6,
.dataTables_wrapper .col-md-5,
.dataTables_wrapper .col-md-7 {
    padding-left: 0;
    padding-right: 0;
}

.dt-search,
.dataTables_filter,
.dt-length,
.dataTables_length {
    margin-bottom: 10px;
}

.dt-search input,
.dataTables_filter input,
.dt-length select,
.dataTables_length select {
    min-height: 36px;
}

.dt-scroll,
.dataTables_scroll {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.dt-scroll-head,
.dataTables_scrollHead {
    background: #fff7ed;
    border-bottom: 1px solid #fed7aa;
}

.dt-scroll-body,
.dataTables_scrollBody {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.dt-scroll-body::-webkit-scrollbar,
.dataTables_scrollBody::-webkit-scrollbar,
.bo-content::-webkit-scrollbar,
.bo-sidebar::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.dt-scroll-body::-webkit-scrollbar-thumb,
.dataTables_scrollBody::-webkit-scrollbar-thumb,
.bo-content::-webkit-scrollbar-thumb,
.bo-sidebar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.55);
    border-radius: 999px;
}

.dt-info,
.dataTables_info {
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 10px;
}

.bo-mail-preview {
    max-height: min(52vh, 620px);
    overflow: auto;
}

.bo-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.26);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.bo-loading-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.bo-loading-card {
    min-width: 220px;
    padding: 22px 24px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
    text-align: center;
}

.bo-loading-spinner {
    width: 2.6rem;
    height: 2.6rem;
    color: #ea580c;
}

.bo-loading-text {
    margin-top: 12px;
    font-size: 0.96rem;
    font-weight: 700;
    color: #9a3412;
    letter-spacing: 0.01em;
}

.bo-login-body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #9a3412 0%, #f97316 55%, #fdba74 100%);
}

.bo-login-card {
    width: 100%;
    max-width: 520px;
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
}

.bo-login-head {
    padding: 32px 32px 24px;
    background: linear-gradient(135deg, #9a3412 0%, #ea580c 100%);
    color: #fff;
}

.bo-login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 18px;
    color: #fff;
    text-decoration: none;
}

.bo-login-brand:hover {
    color: #fff;
    opacity: 0.95;
}

.bo-login-brand img {
    width: 200px;
    max-width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}

.bo-login-divider {
    width: 100%;
    height: 1px;
    margin: 0 0 18px;
    background: rgba(255, 255, 255, 0.28);
}

.bo-login-head h1 {
    margin: 0 0 10px;
    font-weight: 800;
}

.bo-login-head p {
    margin: 0;
    opacity: 0.9;
}

.bo-login-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bo-login-content {
    padding: 32px;
}

.bo-login-input .input-group-text {
    border-radius: 14px 0 0 14px;
    border-color: #dbe3ef;
    background: #f8fafc;
}

.bo-login-input .form-control {
    border-radius: 0 14px 14px 0;
}

@media (max-width: 991px) {
    html,
    body,
    .bo-body,
    .bo-shell,
    .bo-main,
    .bo-sidebar {
        height: auto;
    }

    html,
    body,
    .bo-body {
        overflow: auto;
    }

    .bo-shell {
        grid-template-columns: 1fr;
    }

    .bo-sidebar {
        padding: 20px;
        overflow: visible;
    }

    .bo-main {
        padding: 20px;
        overflow: visible;
    }

    .bo-topbar {
        flex-direction: column;
    }

    .bo-content {
        overflow: visible;
        padding-right: 0;
    }

    .dt-scroll-body,
    .dataTables_scrollBody {
        max-height: none !important;
        height: auto !important;
    }
}
