/* Club95 Admin Theme - responsive layout */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --rk-sidebar-bg: #0a0a0a;
    --rk-sidebar-active: #1e3a5f;
    --rk-sidebar-text: #ffffff;
    --rk-header-bg: #ffffff;
    --rk-body-bg: #eef0f3;
    --rk-panel-header: #3f3d77;
    --rk-panel-header-alt: #483d8b;
    --rk-primary: #0d6efd;
    --rk-success: #28a745;
    --rk-danger: #dc3545;
    --rk-teal: #17a2b8;
    --rk-sidebar-width: 260px;
}

body.rk-admin-body {
    font-family: 'Poppins', sans-serif !important;
    background: var(--rk-body-bg) !important;
}

/* ===== LOGIN ===== */
body.rk-login-body {
    font-family: 'Poppins', sans-serif !important;
    background: #000 !important;
    min-height: 100vh;
}

body.rk-login-body #layout-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rk-login-wrap {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.rk-login-card {
    background: #fff;
    border-radius: 4px;
    padding: 40px 35px 35px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.rk-login-logo {
    width: 110px;
    height: 110px;
    margin: 0 auto 20px;
    display: block;
    border-radius: 50%;
    object-fit: cover;
}

.rk-login-title {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    color: #111;
    margin-bottom: 28px;
}

.rk-login-field {
    position: relative;
    margin-bottom: 18px;
}

.rk-login-field input {
    width: 100%;
    border: 1px solid #d8dce3;
    border-radius: 3px;
    padding: 14px 42px 14px 14px;
    font-size: 14px;
    outline: none;
}

.rk-login-field input:focus {
    border-color: var(--rk-panel-header);
}

.rk-login-field .rk-field-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa3b2;
    font-size: 16px;
}

.rk-login-btn {
    width: 100%;
    background: var(--rk-success);
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 13px;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 8px;
}

.rk-login-btn:hover {
    background: #218838;
    color: #fff;
}

/* ===== TOPBAR ===== */
#page-topbar {
    background: var(--rk-header-bg) !important;
    border-bottom: 1px solid #e8ebf0;
    box-shadow: none !important;
    left: var(--rk-sidebar-width) !important;
}

#page-topbar .navbar-header {
    height: 64px;
    padding: 0 20px;
}

#page-topbar .navbar-brand-box,
#page-topbar .header-item.noti-icon,
#page-topbar .btn.font-size-15 {
    display: none !important;
}

.rk-topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.rk-topbar-user img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #4a90e2;
}

.rk-topbar-user span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* ===== SIDEBAR ===== */
.vertical-menu {
    width: var(--rk-sidebar-width) !important;
    background: var(--rk-sidebar-bg) !important;
    top: 0 !important;
    border-right: none;
    z-index: 1001;
}

.vertical-menu .h-100 {
    background: transparent !important;
    margin-top: 0 !important;
    padding-top: 12px;
}

.rk-sidebar-logo {
    text-align: center;
    padding: 18px 15px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rk-sidebar-logo img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

#side-menu {
    padding: 10px 0 30px;
}

#side-menu > li > a {
    color: var(--rk-sidebar-text) !important;
    font-size: 13.5px;
    font-weight: 400;
    padding: 11px 18px !important;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 3px solid transparent;
}

#side-menu > li > a i,
#side-menu > li > a svg {
    font-size: 17px;
    width: 20px;
    min-width: 20px;
    opacity: 0.9;
}

#side-menu > li > a:hover,
#side-menu > li.mm-active > a,
#side-menu > li > a.mm-active {
    background: var(--rk-sidebar-active) !important;
    border-left-color: #4a9eff;
    color: #fff !important;
}

#side-menu .sub-menu {
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 0;
}

#side-menu .sub-menu li a {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 13px;
    padding: 8px 18px 8px 42px !important;
    position: relative;
}

#side-menu .sub-menu li a::before {
    content: "—";
    position: absolute;
    left: 22px;
    color: #4a9eff;
    font-size: 12px;
}

#side-menu .sub-menu li a:hover,
#side-menu .sub-menu li a.active {
    color: #fff !important;
    background: rgba(74, 158, 255, 0.15) !important;
}

#side-menu .has-arrow::after {
    border-color: rgba(255, 255, 255, 0.6) !important;
    right: 18px;
}

.rk-notice-badge {
    background: #e74c3c;
    color: #fff;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    font-weight: 600;
    text-transform: uppercase;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--rk-sidebar-width) !important;
    background: var(--rk-body-bg);
    min-height: 100vh;
}

.main-content .page-content {
    padding: 20px 20px 30px;
}

.main-content .page-title-box,
.main-content .breadcrumb {
    display: none !important;
}

/* ===== PANELS / CARDS ===== */
.rk-panel,
.main-content .page-content > .container-fluid > .row > .col-sm-12 > .card,
.main-content .page-content > .container-fluid .card:not(.rk-stat-card):not(.rk-market-card) {
    background: #fff;
    border: none;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    overflow: hidden;
}

.rk-panel-header,
.main-content .card > .rk-auto-header,
.main-content .card-body > .card-title:first-child {
    background: var(--rk-panel-header) !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 18px !important;
    margin: 0 !important;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-content .card .card-body {
    padding: 18px;
}

.main-content .card .card-body > .card-title:first-child,
.main-content .card .card-body > h5:first-child {
    margin: -18px -18px 18px !important;
    width: calc(100% + 36px);
}

.main-content .card .card-body > h5:first-child {
    background: var(--rk-panel-header) !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 18px !important;
}

.rk-panel .card-body .card {
    box-shadow: none;
    margin-bottom: 0;
}

.rk-panel .card-body .card .card-body {
    padding: 0;
}

.rk-grid-switch {
    margin: 0;
}

.rk-btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    border: none;
    margin-right: 4px;
}

.btn-edit.rk-btn-icon {
    background: #0d6efd !important;
    color: #fff !important;
}

.btn-delete.rk-btn-icon {
    background: var(--rk-danger) !important;
    color: #fff !important;
}

.btn-warning.rk-btn-icon {
    background: #f0ad4e !important;
    color: #fff !important;
}

.modal-header {
    background: var(--rk-panel-header);
    color: #fff;
}

.modal-header .modal-title,
.modal-header .close {
    color: #fff;
}

.modal-header .close {
    opacity: 0.9;
}

.rk-panel-header .rk-header-total {
    color: var(--rk-success);
    font-weight: 700;
    font-size: 16px;
}

.rk-panel-header .btn-success,
.rk-panel-header .btn-primary.btn-sm {
    background: var(--rk-success);
    border-color: var(--rk-success);
    font-size: 13px;
    padding: 5px 14px;
}

/* ===== DASHBOARD ===== */
.rk-welcome {
    margin-bottom: 22px;
}

.rk-welcome h2 {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rk-welcome h2::before {
    content: "";
    width: 4px;
    height: 26px;
    background: #e74c3c;
    border-radius: 2px;
}

.rk-welcome p {
    color: #888;
    font-size: 14px;
    margin: 0;
    padding-left: 14px;
}

.rk-stat-card {
    background: #fff;
    border-radius: 4px;
    padding: 18px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.rk-stat-card .rk-stat-label {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.rk-stat-card .rk-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #2b6cb0;
    margin-bottom: 4px;
}

.rk-stat-card .rk-stat-sub {
    font-size: 12px;
    color: #999;
    text-align: right;
}

.rk-market-card {
    background: #fff;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.rk-market-card .rk-market-name {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.rk-market-card .rk-market-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 4px;
}

.rk-market-card .rk-market-row span:last-child {
    color: #2b6cb0;
    font-weight: 600;
}

/* ===== FORMS & BUTTONS ===== */
.main-content .btn-primary {
    background: var(--rk-primary) !important;
    border-color: var(--rk-primary) !important;
}

.main-content .btn-success,
.main-content .btn.btn-success {
    background: var(--rk-success) !important;
    border-color: var(--rk-success) !important;
}

.main-content .btn-info,
.main-content button[type="submit"].btn-primary {
    background: var(--rk-teal) !important;
    border-color: var(--rk-teal) !important;
}

.main-content .form-control {
    border-radius: 3px;
    border-color: #d8dce3;
    font-size: 13px;
}

.main-content .form-group label,
.main-content label.col-form-label {
    font-size: 13px;
    font-weight: 500;
    color: #444;
}

/* ===== TABLES ===== */
.main-content table.dataTable,
.main-content table.table {
    font-size: 13px;
}

.main-content table thead th {
    background: #f5f6f8;
    font-weight: 600;
    color: #333;
    border-color: #e8ebf0 !important;
    white-space: nowrap;
}

.main-content .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.main-content .dt-buttons .btn,
.main-content .dataTables_wrapper .dt-buttons .btn {
    background: #e9ecef !important;
    border: 1px solid #d0d5dc !important;
    color: #333 !important;
    font-size: 12px;
    padding: 4px 12px;
    margin-right: 4px;
}

/* ===== WALLET SUMMARY CARDS ===== */
.rk-wallet-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.rk-wallet-box {
    border-radius: 4px;
    padding: 16px;
    text-align: center;
    color: #fff;
}

.rk-wallet-box.green { background: #28a745; }
.rk-wallet-box.red { background: #dc3545; }
.rk-wallet-box.blue { background: #007bff; }
.rk-wallet-box.grey { background: #6c757d; }

.rk-wallet-box .amount {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.rk-wallet-box .label {
    font-size: 12px;
    opacity: 0.95;
}

/* ===== SEARCH FILTER ROW ===== */
.rk-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.rk-filter-row .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 140px;
}

.rk-amount-box {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 20px;
}

.rk-amount-box .rk-amount-body {
    padding: 30px 20px;
    text-align: center;
}

.rk-amount-box .rk-amount-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--rk-success);
}

/* ===== GAME RATES GRID ===== */
.rk-rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.rk-rate-market {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.rk-rate-market .rk-rate-title {
    background: #f5e6c8;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    color: #222;
}

/* ===== FOOTER ===== */
.footer {
    background: transparent;
    border: none;
    padding: 10px 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    :root {
        --rk-sidebar-width: 0px;
    }

    .vertical-menu {
        transform: translateX(-260px);
        width: 260px !important;
        transition: transform 0.3s ease;
    }

    body.sidebar-enable .vertical-menu {
        transform: translateX(0);
    }

    #page-topbar {
        left: 0 !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    #page-topbar .header-item#vertical-menu-btn,
    #vertical-menu-btn {
        display: inline-flex !important;
    }

    body.sidebar-enable::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1000;
    }

    .rk-stat-card .rk-stat-value {
        font-size: 17px;
    }
}

@media (max-width: 575.98px) {
    .main-content .page-content {
        padding: 12px 10px 20px;
    }

    .rk-login-card {
        padding: 30px 22px 25px;
    }

    .rk-wallet-summary {
        grid-template-columns: 1fr 1fr;
    }

    .rk-filter-row .form-group {
        min-width: 100%;
    }
}

@media (min-width: 992px) {
    #page-topbar .header-item#vertical-menu-btn {
        display: none !important;
    }
}

/* ===== APP SETTING FORM ===== */
.rk-app-setting-panel .card-body {
    padding: 22px 20px 10px !important;
}

.rk-app-setting-panel .form-group {
    margin-bottom: 14px;
}

.rk-app-setting-panel .form-control[readonly],
.rk-app-setting-panel .form-control:disabled {
    background: #f3f4f6;
}

.rk-btn-save {
    background: var(--rk-success) !important;
    border-color: var(--rk-success) !important;
    color: #fff !important;
    padding: 8px 28px;
    font-weight: 600;
}

.rk-btn-cancel {
    background: var(--rk-danger) !important;
    border-color: var(--rk-danger) !important;
    color: #fff !important;
}

/* ===== MARKET CREATE / LIST ===== */
.rk-market-split .rk-panel {
    height: 100%;
}

.rk-day-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0 18px;
}

.rk-day-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
}

.rk-switch {
    position: relative;
    width: 44px;
    height: 22px;
    display: inline-block;
}

.rk-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.rk-switch .rk-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 22px;
    cursor: pointer;
    transition: .3s;
}

.rk-switch .rk-slider:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: .3s;
}

.rk-switch input:checked + .rk-slider {
    background: var(--rk-success);
}

.rk-switch input:checked + .rk-slider:before {
    transform: translateX(22px);
}

.rk-market-table .btn-edit {
    background: #0d6efd;
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 3px;
}

/* ===== RATE TABLE ===== */
.rk-rate-table {
    width: 100%;
    margin-bottom: 0;
}

.rk-rate-table th,
.rk-rate-table td {
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #e5e7eb;
    vertical-align: middle;
}

.rk-rate-table th {
    background: #fafafa;
    font-weight: 600;
}

.rk-rate-table input {
    width: 100%;
    border: 1px solid #d8dce3;
    border-radius: 3px;
    padding: 6px 8px;
    font-size: 13px;
}

/* ===== BID ANALYSIS GRID ===== */
.rk-bid-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}

.rk-bid-cell {
    border: 1px solid #d0d5dc;
    text-align: center;
    background: #fff;
}

.rk-bid-cell .rk-bid-num {
    background: var(--rk-panel-header);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 6px 2px;
}

.rk-bid-cell .rk-bid-val {
    padding: 8px 4px 2px;
    font-weight: 700;
    font-size: 14px;
}

.rk-bid-cell .rk-bid-sub {
    padding-bottom: 8px;
    font-size: 11px;
    color: #e74c3c;
}

.rk-bid-section-title {
    font-size: 16px;
    font-weight: 700;
    margin: 18px 0 10px;
    color: #222;
}

.rk-bid-total-bar {
    background: var(--rk-panel-header);
    color: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-top: 10px;
}

/* ===== NOTICE ACTIONS ===== */
.rk-btn-edit-sm {
    background: #f0ad4e !important;
    border-color: #f0ad4e !important;
    color: #fff !important;
}

.rk-btn-remove-sm {
    background: var(--rk-danger) !important;
    border-color: var(--rk-danger) !important;
    color: #fff !important;
}

/* ===== RUNNING GAMES ===== */
.rk-running-table thead th {
    background: #f8f9fa;
}

/* ===== OVERRIDE OLD THEME ===== */
.main-content .mini-stats-wid,
.main-content .card-body[style*="gradient"] {
    background: transparent !important;
    box-shadow: none !important;
}

body.rk-admin-body .page-content .container-fluid {
    max-width: 100%;
}

@media (max-width: 1199px) {
    .rk-bid-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 767px) {
    .rk-bid-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .rk-rates-grid {
        grid-template-columns: 1fr !important;
    }
}
