/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #667eea;
}

.logo i {
    font-size: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a:hover,
.main-nav a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Betslip Styles */
.betslip-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 2rem;
    margin-bottom: 2rem;
}

.betslip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.betslip-header h2 {
    color: #667eea;
    font-size: 1.8rem;
}

.match-time-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.match-time-input label {
    font-weight: 600;
    color: #555;
}

.match-time-input input[type="datetime-local"] {
    padding: 0.5rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.match-time-input input[type="datetime-local"]:focus {
    outline: none;
    border-color: #667eea;
}

/* Betslip Grid */
.betslip-grid {
    display: grid;
    grid-template-columns: 150px repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.grid-header {
    font-weight: 700;
    color: white;
    padding: 1rem;
    text-align: center;
    border-radius: 8px;
    font-size: 1.1rem;
}

.grid-header:nth-child(1) {
    background: transparent;
}

.grid-header:nth-child(2) {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.grid-header:nth-child(3) {
    background: linear-gradient(135deg, #FFC107 0%, #FFA000 100%);
}

.grid-header:nth-child(4) {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.grid-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #555;
    padding: 0.5rem;
}

.grid-input {
    padding: 0.5rem;
}

.grid-input input[type="text"],
.grid-input input[type="number"],
.grid-input select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.grid-input input:focus,
.grid-input select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.grid-input select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
}

.grid-output {
    padding: 0.75rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #667eea;
    border: 2px solid #e0e0e0;
}

.betslip-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Account Card Styles */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.account-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.account-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.account-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

/* ── Deposit & Withdrawal history fold ──────────────────────────── */
.history-fold {
    margin-top: 1.25rem;
}
.history-fold-hint {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #667eea;
    background: #f0f4ff;
    border: 1px solid #dde3fb;
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    user-select: none;
    transition: background 0.15s, border-color 0.15s;
}
.history-fold-hint::-webkit-details-marker { display: none; }
.history-fold-hint:hover {
    background: #e6ecff;
    border-color: #c9d4f8;
}
.history-fold-chevron {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}
.history-fold[open] > .history-fold-hint .history-fold-chevron {
    transform: rotate(90deg);
}
.history-fold[open] > .history-fold-hint {
    border-radius: 10px 10px 0 0;
}
.history-fold-count {
    margin-left: auto;
    background: #667eea;
    color: white;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 20px;
    padding: 0.1rem 0.55rem;
}
.history-fold-body {
    border: 1px solid #dde3fb;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 1rem 0.9rem 0.25rem;
    animation: history-fold-open 0.18s ease;
}
@keyframes history-fold-open {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.account-site {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
}

.account-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: #f5f7fa;
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon i {
    pointer-events: none; /* Prevent icon from intercepting clicks */
}

.btn-icon:hover {
    background: #667eea;
    color: white;
}

.account-holder {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.account-balances {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.balance-item {
    background: #f5f7fa;
    padding: 1rem;
    border-radius: 8px;
}

.balance-label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.balance-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.account-bonus {
    background: linear-gradient(135deg, #FFC107 0%, #FFA000 100%);
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bonus-badge {
    font-weight: 700;
    font-size: 1.1rem;
}

.bonus-expiry {
    font-size: 0.85rem;
}

/* Modal Styles */
.modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 99999; /* Increased from 9999 to 99999 */
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex !important;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    z-index: 100000; /* Added this line */
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    color: #667eea;
    font-size: 1.5rem;
}

.modal-close {
    width: 35px;
    height: 35px;
    border: none;
    background: #f5f7fa;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: #888;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.bonus-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Footer Styles */
.main-footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    text-align: center;
    color: #888;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #764ba2;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* History Table */
.history-table {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.history-table table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.history-table td {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-table tr:hover {
    background: #f5f7fa;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .main-nav a {
        width: 100%;
        justify-content: center;
    }
    
    .betslip-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-header:nth-child(1) {
        display: none;
    }
    
    .accounts-grid {
        grid-template-columns: 1fr;
    }
    
    .betslip-actions {
        flex-direction: column;
    }
    
    .bonus-fields {
        grid-template-columns: 1fr;
    }
}
/* ── SNR (Stake Not Returned) styles ─────────────────────────────────────── */
.grid-output.snr-cell {
    background: #fff3e0;
    border-color: #ffb74d;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.snr-badge {
    display: inline-block;
    background: #e65100;
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.55rem;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* ── Withdraw button ─────────────────────────────────────────────────────── */
.btn-withdraw {
    color: #2e7d32;
    transition: color 0.2s, transform 0.15s;
}
.btn-withdraw:hover {
    color: #1b5e20;
    transform: scale(1.15);
}

/* Modal withdraw header override */
#withdrawModal .modal-header {
    background: linear-gradient(135deg, #2e7d32, #388e3c);
}
#withdrawModal .modal-header h2,
#withdrawModal .modal-close {
    color: white;
}

/* ─── Betslip Tab Navigation ─────────────────────────────────────── */
.betslip-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}

.betslip-tab {
    flex: 1;
    padding: 0.9rem 1.5rem;
    border: none;
    background: rgba(255,255,255,0.55);
    color: #667eea;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    backdrop-filter: blur(6px);
    border-bottom: 3px solid transparent;
}

.betslip-tab:hover {
    background: rgba(255,255,255,0.78);
    color: #764ba2;
}

.betslip-tab.active {
    background: #fff;
    color: #764ba2;
    border-bottom: 3px solid #764ba2;
}

.betslip-panel > .betslip-container {
    border-radius: 0 0 16px 16px;
    margin-bottom: 2rem;
}

/* ─── Back / Lay Grid ────────────────────────────────────────────── */
.backlay-container {
    border-top: 3px solid #764ba2;
}

.bl-grid {
    display: grid;
    grid-template-columns: 180px 1fr 1fr;
    gap: 0.6rem 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.bl-header-empty { /* spacer */ }

.bl-col-header {
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.bl-col-back {
    background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
    color: white;
}

.bl-col-lay {
    background: linear-gradient(135deg, #c62828 0%, #e53935 100%);
    color: white;
}

.bl-label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    padding: 0.25rem 0;
}

.bl-input {
    position: relative;
}

.bl-input input,
.bl-input select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s ease;
    outline: none;
}

.bl-input input:focus,
.bl-input select:focus {
    border-color: #667eea;
    background: #fff;
}

.bl-auto-cell {
    position: relative;
}

.bl-calc-field {
    background: #f0f4ff !important;
    color: #764ba2 !important;
    font-weight: 600 !important;
    border-color: #c5cfe8 !important;
    cursor: default;
}

.bl-auto-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
    border: none;
    border-radius: 20px;
    padding: 3px 8px 3px 4px;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white;
    transition: background 0.3s ease, box-shadow 0.2s ease;
    user-select: none;
    outline: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.bl-auto-toggle:hover {
    filter: brightness(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}

.bl-auto-on {
    background: linear-gradient(135deg, #c62828, #e53935);
}

.bl-auto-off {
    background: linear-gradient(135deg, #9e9e9e, #bdbdbd);
}

.bl-toggle-knob {
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: transform 0.25s cubic-bezier(.4,0,.2,1), opacity 0.2s;
    position: relative;
}

/* Knob slides right when AUTO is ON, left when OFF */
.bl-auto-on  .bl-toggle-knob { transform: translateX(0px);  }
.bl-auto-off .bl-toggle-knob { transform: translateX(-2px); opacity: 0.7; }

.bl-toggle-label {
    transition: opacity 0.2s;
    white-space: nowrap;
}

.bl-auto-off .bl-toggle-label {
    opacity: 0.85;
}
/* Override old badge style just in case */
.bl-auto-badge { display: none !important; }

.bl-output {
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #2e7d32;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    min-height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bl-liability-val {
    color: #c62828 !important;
    background: #fff8f8 !important;
    border: 2px solid #ffcdd2;
}

.lay-liability-label {
    color: #c62828;
}

.profit-label {
    color: #333;
    font-weight: 700;
}

.profit-cell {
    font-size: 1rem;
    font-weight: 800;
    border: 2px solid #e8f5e9;
}

/* Responsive Back/Lay */
@media (max-width: 600px) {
    .bl-grid {
        grid-template-columns: 120px 1fr 1fr;
        gap: 0.4rem 0.6rem;
    }
    /* ── Scrollable calculator tabs on mobile ── */
    .betslip-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        border-radius: 12px 12px 0 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;          /* Firefox */
    }
    .betslip-tabs::-webkit-scrollbar { display: none; } /* Chrome/Safari */
    .betslip-tab {
        flex: 0 0 auto;                 /* don't shrink — let them scroll */
        white-space: nowrap;
        font-size: 0.82rem;
        padding: 0.75rem 1rem;
    }
}

/* Back/Lay — manual override field styling */
.bl-liability-input {
    border-color: #ffcdd2 !important;
    background: #fff8f8 !important;
    color: #c62828 !important;
}

.bl-manual-field {
    border-color: #764ba2 !important;
    background: #f5f0ff !important;
    color: #4a148c !important;
    font-weight: 700 !important;
}

.bl-manual-field + .bl-auto-badge {
    background: linear-gradient(135deg, #4a148c, #764ba2) !important;
}

/* Total Winnings output cell */
.bl-winnings-val {
    font-size: 1rem;
    font-weight: 800;
    border: 2px solid #e8f5e9;
    background: #f9fbe7;
}

/* ─── Funds check banner ─────────────────────────────────────────── */
.bl-funds-ok {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1.5px solid #a5d6a7;
    border-radius: 8px;
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bl-funds-warn {
    background: #ffebee;
    color: #c62828;
    border: 1.5px solid #ef9a9a;
    border-radius: 8px;
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Winnings cell — flex column for value + sub-label */
.bl-winnings-val {
    flex-direction: column;
    gap: 2px;
    font-size: 1rem;
    font-weight: 800;
    border: 2px solid #e8f5e9;
    background: #f9fbe7;
    line-height: 1.3;
}

/* Fund row cells — when hidden must not take up grid space */
#bl_fund_label[style*="display:none"],
#bl_fund_cell[style*="display:none"],
#bl_fund_spacer[style*="display:none"] {
    display: none !important;
}
/* When visible they participate normally in the 3-col grid */
#bl_fund_label,
#bl_fund_cell,
#bl_fund_spacer {
    /* no extra style needed — grid handles it */
}

/* ── Multi-account rows ────────────────────────────────── */
.multi-account-rows {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.account-row {
    background: #f8f9ff;
    border: 1px solid #dde3f5;
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
}

.account-row .leg-account-select {
    width: 100%;
    margin-bottom: 0;
    font-size: 0.85rem;
}

.account-row .leg-stake-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.88rem;
    padding: 0.35rem 0.5rem;
    border: 2px solid #c5cfe8;
    border-radius: 7px;
    margin-top: 0.3rem;
}

.account-row .leg-stake-input:focus {
    border-color: #667eea;
    outline: none;
}

.add-account-btn:hover {
    background: #e8eeff !important;
    border-color: #4a5bc7 !important;
    color: #4a5bc7 !important;
}
/* ─── Overlay / Underlay Slider ─────────────────────────────────── */
.bl-slider-row {
    padding: 0.5rem 0.8rem 0.3rem;
    background: #fafafa;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    transition: opacity 0.2s, border-color 0.2s;
}

.bl-slider-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.bl-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 700;
    color: #999;
    margin-bottom: 0.15rem;
    padding: 0 1px;
    position: relative;
}

.bl-slider-lbl-underlay { color: #1565c0; position: absolute; left: 23%; transform: translateX(-50%); }
.bl-slider-lbl-standard { color: #555;    position: absolute; left: 50%; transform: translateX(-50%); }
.bl-slider-lbl-overlay  { color: #c62828; position: absolute; right: 23%; transform: translateX(50%); }

.bl-slider-track-wrap {
    position: relative;
    padding: 8px 0 2px;
}

.bl-lay-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #1565c0 0%, #1565c0 25%, #bbb 25%, #bbb 75%, #c62828 75%, #c62828 100%);
    outline: none;
    cursor: pointer;
}

.bl-lay-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #555;
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(0,0,0,0.25);
    transition: border-color 0.2s, transform 0.15s;
}

.bl-lay-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.bl-lay-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #555;
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(0,0,0,0.25);
}

/* Pip markers at 0, 25, 50, 75, 100 */
.bl-slider-pip {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    pointer-events: none;
    margin-top: 4px;
}
.bl-pip-left   { left: 0%; margin-left: -1px; background: #1565c0; }
.bl-pip-center { left: 50%; transform: translate(-50%,-50%); margin-top: 4px; background: #888; }
.bl-pip-right  { right: 0%; margin-right: -1px; background: #c62828; }

.bl-slider-badge {
    position: relative;
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #555;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 2px 10px;
    left: 50%;
    transform: translateX(-50%);
    transition: color 0.2s;
    white-space: nowrap;
}
/* ─── OCR Scanner (per account row) ────────────────────────────────── */
.ocr-row-wrap {
    margin-bottom: 0.25rem;
}

.ocr-scan-btn {
    width: 100%;
    font-size: 0.75rem;
    padding: 0.28rem 0.6rem;
    border: 1px dashed #9c27b0;
    background: linear-gradient(135deg, #f3e5f5, #ede7f6);
    color: #6a1b9a;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.18s;
    font-family: inherit;
}

.ocr-scan-btn:hover {
    background: linear-gradient(135deg, #e1bee7, #d1c4e9);
    border-color: #7b1fa2;
    color: #4a148c;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(106, 27, 154, 0.22);
}

.ocr-scan-btn:active {
    transform: translateY(0);
}

.ocr-status {
    font-size: 0.71rem;
    text-align: center;
    margin-top: 0.22rem;
    padding: 0.22rem 0.4rem;
    border-radius: 5px;
    background: #f3e5f5;
    color: #6a1b9a;
}
/* ── Back/Lay multi-account rows ────────────────────── */
.bl-account-row {
    background: #f0f4ff;
    border: 1px solid #c5cfe8;
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
}

.bl-account-row .bl-back-account-select {
    width: 100%;
    font-size: 0.85rem;
    padding: 0.4rem 0.5rem;
    border: 2px solid #c5cfe8;
    border-radius: 8px;
    background: #fff;
    color: #333;
    box-sizing: border-box;
}

.bl-account-row .bl-back-account-select:focus {
    border-color: #1565c0;
    outline: none;
}

.bl-account-row .bl-back-stake-input:focus {
    border-color: #1565c0;
    outline: none;
}

/* ── Searchable Select ─────────────────────────────────────── */
/* ════════════════════════════════════════════════════════════
   Searchable Account Select v2
   ════════════════════════════════════════════════════════════ */
.ss-wrapper {
    position: relative;
    width: 100%;
    font-size: 0.88rem;
}

/* ── Trigger ─────────────────────────────────────────────── */
.ss-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 2px solid #d0d6f0;
    border-radius: 10px;
    background: #fff;
    color: #333;
    cursor: pointer;
    box-sizing: border-box;
    min-height: 52px;
    gap: 0.55rem;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    user-select: none;
}
.ss-trigger:hover {
    border-color: #667eea;
    background: #f7f8ff;
    box-shadow: 0 2px 8px rgba(102,126,234,0.10);
}
.ss-wrapper.ss-open .ss-trigger {
    border-color: #667eea;
    background: #f7f8ff;
    box-shadow: 0 2px 12px rgba(102,126,234,0.18);
}
.ss-trigger:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.18);
}

.ss-trig-icon {
    flex-shrink: 0;
    color: #667eea;
    line-height: 0;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.ss-trigger-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.ss-trigger-text.ss-placeholder-text {
    color: #aaa;
    font-size: 0.87rem;
    font-style: italic;
}
.ss-trig-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.ss-trig-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    margin-top: 0.1rem;
}
.ss-arrow {
    flex-shrink: 0;
    color: #999;
    line-height: 0;
    transition: transform 0.18s;
}
.ss-wrapper.ss-open .ss-arrow {
    transform: rotate(180deg);
    color: #667eea;
}

/* ── Dropdown shell ──────────────────────────────────────── */
.ss-dropdown {
    position: fixed;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(102,126,234,0.22), 0 2px 8px rgba(0,0,0,0.08);
    z-index: 999999;
    overflow: hidden;
}

/* ── Search bar ──────────────────────────────────────────── */
.ss-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem 0.5rem;
    border-bottom: 1px solid #eef0fa;
    background: #f9faff;
}
.ss-search-icon {
    flex-shrink: 0;
    color: #aaa;
    line-height: 0;
}
.ss-search {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.86rem;
    color: #333;
}
.ss-search::placeholder { color: #bbb; }

/* ── List ────────────────────────────────────────────────── */
.ss-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.ss-list::-webkit-scrollbar { width: 5px; }
.ss-list::-webkit-scrollbar-thumb { background: #d0d6f0; border-radius: 4px; }

.ss-option {
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    outline: none;
    transition: background 0.1s;
    border-radius: 0;
}
.ss-option:hover,
.ss-option:focus {
    background: #eef1ff;
}
.ss-option.ss-selected {
    background: #e8edff;
}
.ss-option.ss-selected .ss-card-name { color: #3d52d5; }
.ss-option.ss-placeholder {
    color: #bbb;
    font-style: italic;
    font-size: 0.85rem;
}
.ss-option mark {
    background: #fff3b0;
    color: #333;
    border-radius: 2px;
    padding: 0 1px;
}
.ss-no-results {
    padding: 0.7rem 0.85rem;
    color: #aaa;
    font-size: 0.83rem;
    font-style: italic;
    list-style: none;
}

/* ── Rich account card inside each option ────────────────── */
.ss-card {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}
.ss-card-top {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}
.ss-card-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    line-height: 1.3;
}
.ss-name-text { }
.ss-site {
    font-weight: 500;
    color: #777;
    font-size: 0.82rem;
}
.ss-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
}

/* ── Balance chips ───────────────────────────────────────── */
.ss-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.45rem;
    border-radius: 20px;
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.5;
}
.ss-chip-real    { background: #e8f0fe; color: #1565c0; }
.ss-chip-bonus   { background: #fff3e0; color: #e65100; }
.ss-chip-pending { background: #f3e5f5; color: #7b1fa2; }
.ss-chip-avail   { background: #e8f5e9; color: #1b5e20; }

/* Trigger chips (slightly smaller) */
.ss-trig-chips .ss-chip { font-size: 0.68rem; padding: 0.07rem 0.38rem; }

/* ── Badges ──────────────────────────────────────────────── */
.ss-badge {
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.07rem 0.38rem;
    border-radius: 6px;
    letter-spacing: 0.04em;
    vertical-align: middle;
    display: inline-block;
}
.ss-badge-snr  { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.ss-badge-flex { background: #ede7f6; color: #6a1b9a; border: 1px solid #ce93d8; }

/* ── "Add Account" footer ────────────────────────────────── */
.ss-footer {
    border-top: 1px solid #eef0fa;
    padding: 0.5rem 0.85rem;
    background: #f9faff;
}
.ss-add-account {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #667eea;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    padding: 0.3rem 0;
    transition: color 0.12s;
}
.ss-add-account:hover { color: #4f46e5; }
.ss-add-account svg { flex-shrink: 0; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ss-trigger { min-height: 50px; padding: 0.5rem 0.65rem; }
    .ss-trig-name { font-size: 0.85rem; }
    .ss-dropdown {
        left: 0 !important; right: 0 !important;
        width: auto !important; min-width: 0 !important;
        max-width: calc(100vw - 1rem);
        border-radius: 12px;
    }
    .ss-option { padding: 0.6rem 0.85rem; white-space: normal; word-break: break-word; }
    .ss-list { max-height: 220px; }
}
/* ════════════════════════════════════════════════════════════
   Acca Boost Calculator
   ════════════════════════════════════════════════════════════ */

.acca-explainer {
    background: linear-gradient(135deg, #eef1ff, #f5f0ff);
    border: 1px solid #c7d0f8;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    color: #444;
    line-height: 1.55;
    margin-bottom: 1.4rem;
    display: flex;
    align-items: flex-start;
    gap: 0.3rem;
}

/* ── Top inputs grid ───────────────────────────────────────── */
.acca-top-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.9rem 1.2rem;
    margin-bottom: 1.5rem;
}
.acca-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.acca-field label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.acca-field input,
.acca-field select {
    padding: 0.6rem 0.8rem;
    border: 2px solid #d0d6f0;
    border-radius: 9px;
    font-size: 0.92rem;
    outline: none;
    background: #fff;
    transition: border-color 0.15s;
    box-sizing: border-box;
    width: 100%;
}
.acca-field input:focus,
.acca-field select:focus { border-color: #667eea; }
.acca-field-hint {
    font-size: 0.73rem;
    color: #aaa;
    margin-top: -0.1rem;
}

/* ── Legs header ───────────────────────────────────────────── */
.acca-legs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #eef0fa;
}
.acca-legs-header span {
    font-size: 0.92rem;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: 0.01em;
}
.acca-add-leg-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: opacity 0.15s, transform 0.1s;
}
.acca-add-leg-btn:hover { opacity: 0.88; transform: translateY(-1px); }

/* ── Empty state ───────────────────────────────────────────── */
.acca-no-legs {
    text-align: center;
    color: #bbb;
    font-size: 0.87rem;
    padding: 1.5rem 0;
    font-style: italic;
}

/* ── Individual leg row ────────────────────────────────────── */
.acca-leg-row {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    background: #f9faff;
    border: 1.5px solid #e4e8f8;
    border-radius: 11px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.6rem;
    transition: border-color 0.15s;
}
.acca-leg-row:hover { border-color: #b0bcf0; }

.acca-leg-num {
    width: 26px;
    height: 26px;
    min-width: 26px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    margin-top: 0.25rem;
}

.acca-leg-fields {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.acca-leg-match {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1.5px solid #d0d6f0;
    border-radius: 8px;
    font-size: 0.88rem;
    outline: none;
    box-sizing: border-box;
    background: #fff;
    font-weight: 600;
    transition: border-color 0.15s;
}
.acca-leg-match:focus { border-color: #667eea; }
.acca-leg-match::placeholder { color: #ccc; font-weight: 400; }

.acca-leg-odds {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.acca-odds-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.acca-odds-field label {
    font-size: 0.72rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.acca-odds-field input {
    padding: 0.45rem 0.6rem;
    border: 1.5px solid #d0d6f0;
    border-radius: 8px;
    font-size: 0.88rem;
    outline: none;
    background: #fff;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.acca-odds-field input:focus { border-color: #667eea; }

.acca-leg-remove {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.3rem;
    border-radius: 6px;
    transition: color 0.12s, background 0.12s;
    margin-top: 0.15rem;
    line-height: 1;
}
.acca-leg-remove:hover { color: #ef4444; background: #fef2f2; }

/* ── Results grid ──────────────────────────────────────────── */
.acca-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.85rem;
    margin: 1.4rem 0 1.2rem;
}
.acca-result-card {
    border-radius: 13px;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.acca-res-label {
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.75;
}
.acca-res-value {
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1.1;
}
.acca-res-boosted  { background: linear-gradient(135deg, #1a1a2e, #0f3460); color: white; }
.acca-res-payout   { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
.acca-res-profit   { background: #e8f5e9; }
.acca-res-profit .acca-res-label { color: #2e7d32; }
.acca-res-profit .acca-res-value { color: #1b5e20; }
.acca-res-loss     { background: #fff8e1; }
.acca-res-loss .acca-res-label { color: #f57f17; }
.acca-res-loss .acca-res-value { color: #e65100; }

/* ── Per-leg lay table ─────────────────────────────────────── */
.acca-lay-table-wrap {
    background: #f9faff;
    border: 1.5px solid #e4e8f8;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.2rem;
}
.acca-lay-table-title {
    padding: 0.7rem 1rem;
    font-size: 0.82rem;
    font-weight: 800;
    color: #667eea;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid #e4e8f8;
    background: #f3f5ff;
}
.acca-lay-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
}
.acca-lay-table th {
    padding: 0.5rem 0.8rem;
    text-align: left;
    font-size: 0.73rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f3f5ff;
    border-bottom: 1px solid #e4e8f8;
}
.acca-lay-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #eef0fa;
    color: #333;
    vertical-align: middle;
}
.acca-lay-table tr:last-child td { border-bottom: none; }
.acca-lay-table tr:hover td { background: #eef1ff; }

/* ── Qualifying cost box ───────────────────────────────────── */
.acca-qual-box {
    background: #fff;
    border: 1.5px solid #e4e8f8;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 1.2rem;
}
.acca-qual-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.7rem;
}
.acca-qual-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #555;
    padding: 0.3rem 0;
    border-bottom: 1px solid #f0f0f8;
}
.acca-qual-row:last-child { border-bottom: none; }
.acca-qual-total {
    font-weight: 800;
    color: #1a1a2e;
    font-size: 0.92rem;
    padding-top: 0.5rem;
    margin-top: 0.2rem;
    border-top: 2px solid #e4e8f8 !important;
}
.acca-qual-total span:last-child { color: #ef4444; }

@media (max-width: 600px) {
    .acca-top-grid { grid-template-columns: 1fr 1fr; }
    .acca-results-grid { grid-template-columns: 1fr 1fr; }
    .acca-lay-table { font-size: 0.78rem; }
    .acca-lay-table th, .acca-lay-table td { padding: 0.45rem 0.5rem; }
    .acca-leg-odds { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .main-content { padding: 1rem 0; }
}

/* ══════════════════════════════════════════════════════════
   MOBILE BETSLIP FIXES  (≤600px)
   Prevents overflow, stacks header, full-width datetime
══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {

    /* Container — tight padding, no horizontal overflow */
    .betslip-container {
        padding: 1rem 0.85rem;
        border-radius: 12px;
        overflow-x: hidden;
        box-sizing: border-box;
        /* Prevent it from being wider than the viewport */
        max-width: 100%;
    }

    /* Make sure the panel wrapper doesn't add extra margin */
    .betslip-panel > .betslip-container {
        border-radius: 0 0 12px 12px;
        margin-bottom: 1.25rem;
    }

    /* Header: stack title above datetime */
    .betslip-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .betslip-header h2 {
        font-size: 1.25rem;
        line-height: 1.2;
    }

    /* Datetime: fill full width, readable size */
    .match-time-input {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .match-time-input label {
        font-size: 0.82rem;
        color: #888;
    }

    .match-time-input input[type="datetime-local"] {
        width: 100%;
        box-sizing: border-box;
        font-size: 0.88rem;
        padding: 0.55rem 0.75rem;
    }

    /* Grid — already 1 col at 768px, tighten gaps */
    .betslip-grid {
        gap: 0.6rem;
        margin-bottom: 1.25rem;
    }

    /* Column headers: show as full-width coloured banners */
    .grid-header {
        font-size: 0.9rem;
        padding: 0.6rem 0.75rem;
        border-radius: 6px;
    }

    /* Labels */
    .grid-label {
        font-size: 0.82rem;
        padding: 0.3rem 0.25rem;
    }

    /* Inputs */
    .grid-input {
        padding: 0.25rem 0;
    }

    .grid-input input[type="text"],
    .grid-input input[type="number"],
    .grid-input select {
        font-size: 0.88rem;
        padding: 0.6rem 0.65rem;
    }

    /* Odds + Stake inline pair — 40/60 split, full row width */
    .grid-input div[style*="display:flex"] {
        gap: 0.35rem !important;
    }

    /* Output cells */
    .grid-output {
        font-size: 0.92rem;
        padding: 0.55rem 0.65rem;
    }

    /* Action buttons: stack, full width */
    .betslip-actions {
        flex-direction: column;
        gap: 0.6rem;
        margin-top: 1.25rem;
    }

    .betslip-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    /* OCR scan button full width on mobile */
    .ocr-scan-btn {
        width: 100%;
        justify-content: center;
    }

    /* Add-account button */
    .add-account-btn {
        font-size: 0.78rem !important;
    }
}

/* ── Very small phones (≤380px) ── */
@media (max-width: 380px) {
    .betslip-container {
        padding: 0.85rem 0.65rem;
    }
    .betslip-header h2 {
        font-size: 1.1rem;
    }
    .grid-output {
        font-size: 0.82rem;
    }
}

/* ══════════════════════════════════════════════════════════
   LEG COLOUR CODING  — Home=green  Draw=amber  Away=blue
══════════════════════════════════════════════════════════ */

/* ── HOME (green) ── */
#home_accounts_col .account-row {
    background: #f0faf1;
    border-color: #a5d6a7;
}
#home_accounts_col .account-row .leg-odds-input,
#home_accounts_col .account-row .leg-stake-input,
#home_accounts_col .account-row .leg-account-select,
#home_accounts_col .account-row .leg-fund-source {
    border-color: #81c784 !important;
}
#home_accounts_col .account-row .leg-odds-input:focus,
#home_accounts_col .account-row .leg-stake-input:focus,
#home_accounts_col .account-row .leg-account-select:focus {
    border-color: #43a047 !important;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.15) !important;
}
#home_accounts_col .ocr-scan-btn {
    border-color: #81c784;
    color: #2e7d32;
    background: #f0faf1;
}
#home_accounts_col .ocr-scan-btn:hover {
    background: #c8e6c9;
    border-color: #43a047;
}
#home_accounts_col .add-account-btn {
    border-color: #81c784 !important;
    background: #f0faf1 !important;
    color: #2e7d32 !important;
}
#home_accounts_col .add-account-btn:hover {
    background: #c8e6c9 !important;
    border-color: #43a047 !important;
    color: #1b5e20 !important;
}

/* ── DRAW (amber/orange) ── */
#draw_accounts_col .account-row {
    background: #fffbf0;
    border-color: #ffe082;
}
#draw_accounts_col .account-row .leg-odds-input,
#draw_accounts_col .account-row .leg-stake-input,
#draw_accounts_col .account-row .leg-account-select,
#draw_accounts_col .account-row .leg-fund-source {
    border-color: #ffca28 !important;
}
#draw_accounts_col .account-row .leg-odds-input:focus,
#draw_accounts_col .account-row .leg-stake-input:focus,
#draw_accounts_col .account-row .leg-account-select:focus {
    border-color: #f9a825 !important;
    box-shadow: 0 0 0 3px rgba(255,193,7,0.18) !important;
}
#draw_accounts_col .ocr-scan-btn {
    border-color: #ffe082;
    color: #e65100;
    background: #fffbf0;
}
#draw_accounts_col .ocr-scan-btn:hover {
    background: #fff3cd;
    border-color: #f9a825;
}
#draw_accounts_col .add-account-btn {
    border-color: #ffca28 !important;
    background: #fffbf0 !important;
    color: #e65100 !important;
}
#draw_accounts_col .add-account-btn:hover {
    background: #fff3cd !important;
    border-color: #f9a825 !important;
    color: #bf360c !important;
}

/* ── AWAY (blue) ── */
#away_accounts_col .account-row {
    background: #f0f6ff;
    border-color: #90caf9;
}
#away_accounts_col .account-row .leg-odds-input,
#away_accounts_col .account-row .leg-stake-input,
#away_accounts_col .account-row .leg-account-select,
#away_accounts_col .account-row .leg-fund-source {
    border-color: #64b5f6 !important;
}
#away_accounts_col .account-row .leg-odds-input:focus,
#away_accounts_col .account-row .leg-stake-input:focus,
#away_accounts_col .account-row .leg-account-select:focus {
    border-color: #1976d2 !important;
    box-shadow: 0 0 0 3px rgba(33,150,243,0.15) !important;
}
#away_accounts_col .ocr-scan-btn {
    border-color: #90caf9;
    color: #1565c0;
    background: #f0f6ff;
}
#away_accounts_col .ocr-scan-btn:hover {
    background: #bbdefb;
    border-color: #1976d2;
}
#away_accounts_col .add-account-btn {
    border-color: #64b5f6 !important;
    background: #f0f6ff !important;
    color: #1565c0 !important;
}
#away_accounts_col .add-account-btn:hover {
    background: #bbdefb !important;
    border-color: #1976d2 !important;
    color: #0d47a1 !important;
}