@import url("brand.css?v=cm2");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--brand-bg, #f0f7f5);
    color: #333;
    font-size: clamp(14px, 0.85rem + 0.35vw, 16px);
    line-height: 1.45;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    overflow-x: hidden;
}
.main-content h1 {
    font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.75rem);
    line-height: 1.25;
}
.data-table {
    font-size: clamp(12px, 0.75rem + 0.3vw, 14px);
}
@media (max-width: 768px) {
    .content-area { padding: 10px; }
    .top-header h1 { font-size: 1.25rem; }
}

/* Login Page */
.login-page {
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(217, 119, 6, 0.35), transparent 55%),
        radial-gradient(900px 500px at 100% 100%, rgba(20, 184, 166, 0.25), transparent 50%),
        linear-gradient(145deg, #0a2422 0%, #0f3d3a 45%, #115e59 100%) !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: #f0f7f5;
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 24px 60px rgba(10, 36, 34, 0.45);
    border: 1px solid rgba(197, 217, 211, 0.65);
    backdrop-filter: blur(8px);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: #0f766e;
    margin-bottom: 10px;
}
.login-header .cm-brand-mark {
    margin: 0 auto 14px;
}

.login-header h1 {
    color: #0a2422;
    margin-bottom: 5px;
    font-weight: 800;
    font-family: 'Syne', 'DM Sans', sans-serif;
}

.login-header p {
    color: #5b6f69;
    font-size: 14px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #0a2422;
    font-weight: 600;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #c5d9d3;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #f0f7f5;
    font-family: inherit;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: #0f766e;
    background: white;
    box-shadow: 0 0 8px rgba(15, 118, 110, 0.25);
}

.form-group label i {
    margin-right: 5px;
    color: #0f766e;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #c5d9d3;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #f0f7f5;
}

.form-group input:focus {
    outline: none;
    border-color: #0f766e;
    background: white;
}

.login-box .btn-primary {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #0f766e 0%, #0f3d3a 100%);
    color: white;
    border: 1px solid #115e59;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 8px 22px rgba(15, 118, 110, 0.35);
    font-family: 'Syne', 'DM Sans', sans-serif;
    letter-spacing: 0.02em;
}

.login-box .btn-primary:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    border-color: #b45309;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(180, 83, 9, 0.35);
}

.error-message {
    color: #0f766e;
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

/* Admin Panel Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #0a2422 0%, #0f3d3a 55%, #115e59 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(20, 184, 166, 0.25);
}

.sidebar-header {
    padding: 18px 16px;
    background: rgba(10, 36, 34, 0.55);
    border-bottom: 1px solid rgba(251, 191, 36, 0.28);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-header h2 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: bold;
    min-width: 0;
}

.sidebar-close-btn,
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
}

.mobile-menu-toggle {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.18);
}

.sidebar-close-btn:hover,
.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.28);
}

.admin-sidebar-overlay {
    display: none;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #f0f7f5;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(20, 184, 166, 0.18);
    color: white;
    border-left-color: #fbbf24;
}

.nav-item.active {
    background: rgba(20, 184, 166, 0.28);
    color: white;
    border-left-color: #fbbf24;
    font-weight: 700;
}

.nav-item i {
    width: 20px;
}

.main-content {
    margin-left: 250px;
    flex: 1;
    background: #f0f7f5;
}

.top-header {
    background: linear-gradient(90deg, #0f3d3a 0%, #0f766e 70%, #b45309 160%);
    color: #fff;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 18px rgba(15, 61, 58, 0.2);
    border-bottom: 1px solid rgba(251, 191, 36, 0.35);
}

.top-header h1 {
    font-size: 24px;
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    flex: 1 1 auto;
    min-width: 0;
}

.user-info {
    color: white;
    font-weight: 600;
}

.content-area {
    padding: 30px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #0f766e 0%, #0f766e 100%);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(15, 61, 58, 0.28);
    display: flex;
    align-items: center;
    gap: 20px;
    border: 2px solid #0f766e;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0f3d3a 0%, #0f766e 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    border: 2px solid #0f766e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stat-info h3 {
    font-size: 28px;
    color: white;
    margin-bottom: 5px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.stat-info p {
    color: #f0f7f5;
    font-size: 14px;
    font-weight: 600;
}

.stat-info small {
    display: block;
    margin-top: 4px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.9;
}

/* Table */
.table-container {
    background: #f0f7f5;
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 4px 15px rgba(15, 61, 58, 0.18);
    border: 2px solid #0f766e;
}

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

table thead {
    background: linear-gradient(135deg, #0f766e 0%, #0f766e 100%);
}

table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: white;
    border-bottom: 3px solid #0f766e;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

table td {
    padding: 15px;
    border-bottom: 1px solid #d1fae5;
    background: #f0f7f5;
}

table tbody tr:hover {
    background: linear-gradient(135deg, #E8EEFF 0%, #d1fae5 100%);
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: 2px solid;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: white;
    border-color: #14b8a6;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    color: white;
    border-color: #059669;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    color: white;
    border-color: #991b1b;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #0f3d3a 0%, #0f766e 100%);
    color: white;
    border-color: #0f766e;
}

.btn-info:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.35);
}

/* Forms */
.form-container {
    background: linear-gradient(135deg, #f0f7f5 0%, #d1fae5 100%);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(15, 61, 58, 0.18);
    max-width: 600px;
    margin: 20px 0;
    border: 2px solid #0f766e;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid;
}

.badge-active {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    color: white;
    border-color: #059669;
}

.badge-inactive {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    border-color: #475569;
}

.badge-blocked {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    color: white;
    border-color: #991b1b;
}

.badge-pending {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: white;
    border-color: #b45309;
}

.badge-approved {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    color: white;
    border-color: #059669;
}

.badge-rejected {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    color: white;
    border-color: #991b1b;
}

/* Dynamic badge types */
.badge-deposit {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: white;
    border-color: #14b8a6;
}

.badge-withdrawal {
    background: linear-gradient(135deg, #0f3d3a 0%, #0f766e 100%);
    color: white;
    border-color: #0f766e;
}

.badge-bet {
    background: linear-gradient(135deg, #8b008b 0%, #9370db 100%);
    color: white;
    border-color: #9370db;
}

.badge-winning {
    background: linear-gradient(135deg, #32cd32 0%, #00ff00 100%);
    color: white;
    border-color: #00ff00;
}

.badge-bonus {
    background: linear-gradient(135deg, #0f766e 0%, #0f766e 100%);
    color: white;
    border-color: #0f766e;
}

.badge-adjustment {
    background: linear-gradient(135deg, #0f3d3a 0%, #0f766e 100%);
    color: white;
    border-color: #0f3d3a;
}

/* Filter Section */
.filter-section {
    background: linear-gradient(135deg, #0f766e 0%, #0f766e 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    border: 2px solid #0f766e;
    box-shadow: 0 4px 15px rgba(15, 61, 58, 0.18);
}

.form-input, .form-select {
    padding: 10px;
    border: 2px solid #0f766e;
    border-radius: 5px;
    font-size: 14px;
    background: var(--brand-bg, #f0f7f5);
    color: #333;
    font-weight: 500;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #0f766e;
    background: white;
    box-shadow: 0 0 8px rgba(15, 118, 110, 0.25);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(220, 20, 60, 0.5);
    overflow: auto;
}

.modal-content {
    background: linear-gradient(135deg, #f0f7f5 0%, #d1fae5 100%);
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 30px rgba(220, 20, 60, 0.4);
    position: relative;
    border: 3px solid #0f766e;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    color: #0f766e;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
    transition: all 0.3s;
}

.close:hover {
    color: #0f766e;
    transform: scale(1.2);
}

/* Tabs */
.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 3px solid #0f766e;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    color: #0f766e;
    transition: all 0.3s;
    font-weight: 500;
}

.tab-btn:hover {
    color: #0f766e;
}

.tab-btn.active {
    color: #0f766e;
    border-bottom-color: #0f766e;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 20px;
    margin-top: 20px;
}

.game-card {
    background: linear-gradient(135deg, #f0f7f5 0%, #d1fae5 100%);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(15, 61, 58, 0.18);
    border: 2px solid #0f766e;
    overflow: hidden;
    min-width: 0;
}

.game-card h3 {
    margin-bottom: 10px;
    color: #0f766e;
    font-weight: bold;
    word-break: break-word;
}

.game-actions {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
}

.game-actions .btn {
    flex: 1 1 auto;
    min-width: calc(50% - 8px);
    max-width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    text-align: center;
    white-space: normal;
    line-height: 1.2;
    box-sizing: border-box;
}

.markets-list {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #0f766e;
}

.market-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    background: linear-gradient(135deg, #0f3d3a 0%, #0f766e 100%);
    border-radius: 5px;
    margin-bottom: 8px;
    border: 1px solid #0f766e;
    color: white;
    font-weight: 500;
    min-width: 0;
}

.schedule-modal-content {
    width: min(1180px, calc(100vw - 30px));
    max-width: 1180px;
    max-height: 92vh;
    overflow-y: auto;
}

.schedule-grid {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.schedule-bulk-controls {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 12px 0;
    padding: 12px 14px;
    background: #fff;
    border: 2px solid #0f766e;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(220, 20, 60, 0.15);
}

.schedule-bulk-controls label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.schedule-bulk-controls input {
    width: 18px;
    height: 18px;
}

.schedule-day {
    border: 1px solid #d1fae5;
    border-radius: 10px;
    padding: 14px;
    background: #f0f7f5;
}

.schedule-day h3 {
    margin: 0 0 10px;
    color: #0f766e;
}

.schedule-sessions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.schedule-session {
    display: grid;
    gap: 9px;
    padding: 12px;
    background: #fff;
    border: 2px solid #0f3d3a;
    border-radius: 8px;
}

.schedule-close {
    border-color: #0f766e;
}

.schedule-session-header,
.schedule-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.schedule-session label:not(.schedule-toggle) {
    display: grid;
    gap: 4px;
    color: #333;
    font-size: 13px;
    font-weight: 600;
}

.schedule-session .form-input {
    width: 100%;
    box-sizing: border-box;
}

.schedule-actions {
    position: sticky;
    bottom: 0;
    justify-content: flex-end;
    padding: 12px 0 4px;
    background: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.recent-section {
    margin-top: 30px;
}

.recent-section h2 {
    margin-bottom: 20px;
    color: #0f766e;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.report-section {
    margin-top: 20px;
}

.report-section h2 {
    color: #0f766e;
    font-weight: bold;
}

/* User Details Modal */
.user-details-container {
    max-height: 80vh;
    overflow-y: auto;
    padding: 10px;
}

.user-details-container h3 {
    color: #0f766e;
    font-weight: bold;
    margin: 20px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #0f766e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-details-container h3:first-child {
    margin-top: 0;
}

.user-info-section {
    background: linear-gradient(135deg, #f0f7f5 0%, #d1fae5 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #0f766e;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item label {
    font-weight: 600;
    color: #0f766e;
    font-size: 14px;
}

.info-item span {
    color: #333;
    font-size: 16px;
}

.balance-amount {
    font-size: 24px !important;
    font-weight: bold !important;
    color: #32cd32 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.stats-section {
    background: linear-gradient(135deg, #0f766e 0%, #0f766e 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #0f766e;
}

.stats-section h3 {
    color: white !important;
    border-bottom-color: rgba(255, 255, 255, 0.3) !important;
}

.stats-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.stat-value {
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.transactions-section,
.bets-section,
.pending-section {
    background: linear-gradient(135deg, #f0f7f5 0%, #d1fae5 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #0f766e;
}

.table-container-small {
    margin-top: 15px;
    overflow-x: auto;
}

.table-container-small table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 5px;
    overflow: hidden;
}

.table-container-small table thead {
    background: linear-gradient(135deg, #0f766e 0%, #0f766e 100%);
}

.table-container-small table th {
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 13px;
    border-bottom: 2px solid #0f766e;
}

.table-container-small table td {
    padding: 10px;
    border-bottom: 1px solid #d1fae5;
    font-size: 13px;
    background: #f0f7f5;
}

.table-container-small table tbody tr:hover {
    background: linear-gradient(135deg, #E8EEFF 0%, #d1fae5 100%);
}

.table-container-small table tbody tr:last-child td {
    border-bottom: none;
}

@media (max-width: 992px) {
    .admin-container {
        display: block;
        min-height: 100vh;
        width: 100%;
        overflow-x: hidden;
    }

    .sidebar {
        width: min(280px, 86vw);
        transform: translateX(-105%);
        transition: transform 0.28s ease;
        z-index: 1100;
        box-shadow: 8px 0 24px rgba(0, 0, 0, 0.25);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .mobile-menu-toggle,
    .sidebar-close-btn {
        display: inline-flex;
    }

    .admin-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        z-index: 1050;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s ease;
    }

    body.sidebar-open .admin-sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .top-header {
        padding: 12px 14px;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .top-header h1 {
        font-size: 1.15rem;
        line-height: 1.25;
    }

    .top-header .btn,
    .top-header .btn-primary {
        width: auto;
        min-width: 0;
        flex: 0 1 auto;
        padding: 8px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .content-area {
        padding: 14px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-section .form-input,
    .filter-section select,
    .filter-section .btn {
        width: 100%;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .game-card {
        padding: 14px;
    }

    .game-status {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
    }

    .game-actions .btn {
        flex: 1 1 calc(50% - 8px);
        min-width: calc(50% - 8px);
    }

    .market-item > span {
        flex: 1 1 100%;
        min-width: 0;
        word-break: break-word;
    }

    .market-item > div {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .market-item .btn {
        flex: 1 1 auto;
    }

    .schedule-sessions {
        grid-template-columns: 1fr;
    }

    .settings-tabs {
        flex-wrap: wrap;
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        padding: 10px 14px;
        font-size: 14px;
        white-space: nowrap;
    }

    .modal-content {
        width: calc(100vw - 20px);
        max-width: none;
        margin: 10px auto;
        padding: 18px 14px;
        max-height: calc(100vh - 20px);
    }

    .schedule-modal-content {
        width: calc(100vw - 16px);
        max-width: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 16px;
    }

    .login-box {
        padding: 24px 18px;
    }

    .played-report-filters {
        grid-template-columns: 1fr;
    }

    .played-report-actions .btn {
        flex: 1 1 100%;
    }

    table th,
    table td {
        padding: 10px 8px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .game-actions .btn {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .top-header {
        flex-direction: row;
        align-items: center;
    }

    .top-header .user-info {
        width: 100%;
        order: 3;
        font-size: 13px;
    }

    .content-area {
        padding: 10px;
    }
}


/* Game background color picker */
.game-color-picker-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.game-color-input {
    width: 60px;
    height: 40px;
    padding: 0;
    border: 2px solid #0f766e;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.preset-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.preset-color-btn {
    width: 34px;
    height: 34px;
    border: 2px solid #0f766e;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.preset-color-btn.active {
    outline: 3px solid #0f766e;
    outline-offset: 2px;
}

/* Played Games Report */
.played-report-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    padding: 20px;
    margin-bottom: 22px;
    background: linear-gradient(135deg, #f0f7f5 0%, #d1fae5 100%);
    border: 2px solid #0f766e;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(15, 61, 58, 0.18);
}

.played-report-filters .form-group {
    display: grid;
    gap: 5px;
    margin: 0;
}

.played-report-filters label {
    color: #8b1538;
    font-weight: 700;
    font-size: 13px;
}

.played-report-filters .form-input,
.played-report-filters .form-select {
    width: 100%;
    box-sizing: border-box;
}

.user-search-group {
    position: relative;
}

.user-search-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    z-index: 40;
    max-height: 240px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.user-search-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: #fff;
    padding: 10px 12px;
    font-size: 14px;
    color: #222;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.user-search-dropdown button:last-child {
    border-bottom: 0;
}

.user-search-dropdown button:hover,
.user-search-dropdown button:focus {
    background: #fff0f3;
    outline: none;
}

.user-search-dropdown .user-search-empty {
    padding: 12px;
    color: #777;
    font-size: 13px;
}

.played-report-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.played-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.played-summary-grid .stat-card {
    min-height: 75px;
    padding: 18px;
}

.played-summary-grid .stat-info h3 {
    font-size: 22px;
}

.report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 12px;
    padding-bottom: 8px;
    border-bottom: 3px solid #0f766e;
}

.report-tab {
    padding: 10px 18px;
    border: 2px solid #0f766e;
    border-radius: 6px;
    background: #f0f7f5;
    color: #8b1538;
    cursor: pointer;
    font-weight: 700;
}

.report-tab.active {
    background: linear-gradient(135deg, #0f766e 0%, #0f766e 100%);
    color: white;
}

.report-tab-panel {
    display: none;
}

.report-tab-panel.active {
    display: block;
}

.played-share-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.played-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.extra-part-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.extra-part-label {
    font-weight: 700;
    color: #7a1f1f;
}
.extra-part-controls .extra-cut-preset.active {
    background: #b42318;
    color: #fff;
    border-color: #b42318;
}

.extra-cut-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 0 0 12px;
    padding: 10px 12px;
    background: #fff5f5;
    border: 1px solid #f3c6c6;
    border-radius: 8px;
}

.extra-cut-controls > label {
    margin: 0;
    color: #7a1f1f;
    font-size: 13px;
}

.extra-cut-stepper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.extra-cut-input {
    width: 72px !important;
    min-width: 72px;
    text-align: center;
    font-weight: 700;
    padding: 6px 8px !important;
}

.extra-cut-unit {
    font-weight: 700;
    color: #c62828;
}

.extra-cut-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.extra-cut-preset {
    border: 1px solid #0f766e;
    background: #fff;
    color: #0f766e;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.extra-cut-preset.active,
.extra-cut-preset:hover {
    background: #0f766e;
    color: #fff;
}

.played-share-box {
    width: 100%;
    min-height: 160px;
    margin-bottom: 12px;
    padding: 12px;
    border: 2px solid #0f766e;
    border-radius: 8px;
    background: #f0f7f5;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.45;
    resize: vertical;
}

.played-share-box-editable {
    background: #fff;
    border-color: #c62828;
    cursor: text;
}

.played-share-box-editable:focus {
    outline: none;
    border-color: #8b0000;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.2);
}

.played-share-hint {
    margin: -6px 0 12px;
    font-size: 12px;
    color: #666;
}

.played-copy-toast {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 12px;
    background: #2e7d32;
    color: #fff;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
}

.extra-numbers-cell {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 13px;
    word-break: break-word;
    max-width: 520px;
}

.extra-numbers-pre {
    margin: 0;
    white-space: pre;
    font-family: inherit;
    font-size: inherit;
}

.played-report-table {
    overflow-x: auto;
}

.played-report-table table {
    min-width: 1000px;
}

.played-report-table th,
.played-report-table td {
    padding: 10px 12px;
    white-space: nowrap;
    font-size: 13px;
}

.played-report-table td small {
    display: block;
    margin-top: 3px;
    color: #777;
}

.played-status {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 12px;
    color: white;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.played-status-won { background: #047857; }
.played-status-lost { background: #b91c1c; }
.played-status-pending { background: #ff8c00; }
.played-status-scheduled { background: #0f3d3a; }
.played-status-cancelled { background: #777; }

/* Winning ank — green strip (patta) */
.ank-win-patta {
    display: inline-block;
    background: #c8e6c9;
    color: #1b5e20;
    border: 1px solid #81c784;
    border-radius: 6px;
    padding: 3px 8px;
    font-weight: 800;
    line-height: 1.3;
}
tr.row-ank-win {
    background: #f1faf2 !important;
}
.admin-payout {
    color: #0f766e !important;
    font-weight: 800;
    white-space: nowrap;
}
.admin-payout.zero {
    color: #888 !important;
    font-weight: 600;
}
.extra-type-block {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
}
.extra-type-label {
    font-weight: 800;
    color: #0f3d3a;
    margin-bottom: 4px;
}
.extra-num-line {
    padding: 2px 6px;
    border-radius: 4px;
    margin: 2px 0;
}
.extra-num-line.ank-win-patta {
    display: block;
    width: fit-content;
    max-width: 100%;
}
.extra-num-total {
    margin-top: 4px;
    font-weight: 800;
    color: #333;
}

/* Handwritten Admin Side SP/DP/Triple slip (extra report) */
.extra-pana-slip-cell {
    max-width: 420px;
    white-space: normal;
}
.pana-slip-report {
    background: #fffef8;
    border: 1px solid #d6d3c8;
    border-radius: 6px;
    padding: 12px 14px 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #1a1a1a;
    line-height: 1.45;
}
.pana-slip-admin {
    color: #c41e1e;
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 2px;
}
.pana-slip-head {
    color: #0d7a3a;
    font-weight: 800;
    font-size: 15px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.pana-slip-sub {
    color: #0d7a3a;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 10px;
}
.pana-slip-group {
    margin-bottom: 10px;
}
.pana-slip-ank {
    font-weight: 800;
    font-size: 14px;
    color: #1e3a8a;
    margin-bottom: 2px;
}
.pana-slip-line {
    font-size: 13px;
    font-weight: 600;
    color: #1e3a8a;
    padding-left: 4px;
}
.pana-slip-subtotal {
    color: #c41e1e;
    font-weight: 800;
    font-size: 13px;
    margin-top: 2px;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.pana-slip-foot {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #c5c2b6;
}
.pana-slip-foot-label {
    color: #0d7a3a;
    font-weight: 700;
    font-size: 13px;
}
.pana-slip-grand {
    color: #0d7a3a;
    font-weight: 800;
    font-size: 14px;
    text-decoration: underline;
    text-decoration-style: double;
    text-underline-offset: 3px;
}
.pana-slip-win {
    margin-top: 4px;
    font-weight: 700;
    font-size: 12px;
}
.pana-slip-empty {
    color: #6b7280;
    font-size: 13px;
    padding: 6px 0;
}

.played-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin: 18px 0;
}

.positive-value {
    color: #168a2b !important;
    font-weight: 700;
}

.negative-value {
    color: #0f766e !important;
    font-weight: 700;
}

.report-loading,
.report-error,
.empty-state {
    padding: 20px;
    text-align: center;
    font-weight: 700;
}

.report-error {
    margin-bottom: 15px;
    border: 2px solid #0f766e;
    border-radius: 8px;
    background: #E8EEFF;
    color: #0f766e;
}

@media (max-width: 768px) {
    .played-report-filters {
        grid-template-columns: 1fr;
    }
    .played-report-actions .btn {
        flex: 1 1 100%;
    }
}


/* cm-brand-v2 20261026074204 */


/* ===== FORCE BRAND CHROME ===== */
.sidebar {
    background: linear-gradient(180deg, #0a2422 0%, #0f3d3a 55%, #115e59 100%) !important;
    border-right: 1px solid rgba(20, 184, 166, 0.25) !important;
}
.sidebar-header {
    background: rgba(10, 36, 34, 0.55) !important;
    border-bottom: 1px solid rgba(251, 191, 36, 0.28) !important;
}
.top-header {
    background: linear-gradient(90deg, #0f3d3a 0%, #0f766e 70%, #b45309 160%) !important;
    color: #fff !important;
    border-bottom: 1px solid rgba(251, 191, 36, 0.35) !important;
}
.nav-item.active {
    background: rgba(20, 184, 166, 0.28) !important;
    border-left-color: #fbbf24 !important;
}
table thead,
.data-table thead,
table th {
    background: linear-gradient(135deg, #0f3d3a 0%, #0f766e 100%) !important;
    color: #fff !important;
}
.table-container,
.stat-card {
    border-color: #0f766e !important;
}
.btn-primary {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%) !important;
    border-color: #14b8a6 !important;
    color: #fff !important;
}
.main-content { background: #f0f7f5 !important; }
