:root {
    --bg-color: #121824;
    --card-bg: #1a2232;
    --border-color: #2a374c;
    --text-color: #ffffff;
    --text-muted: #8a99ad;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
}

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

/* Top Action Bar */
.top-bar {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.status-badge {
    background-color: #1b3a2b;
    color: #2ecc71;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #27ae60;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 8px #2ecc71;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 13px;
    color: #fff;
    transition: opacity 0.2s;
}

.btn:hover { opacity: 0.85; }
.btn-green { background-color: #27ae60; }
.btn-yellow { background-color: #f1c40f; color: #000; }
.btn-blue { background-color: #2980b9; }
.btn-cyan { background-color: #16a085; }
.btn-red { background-color: #c0392b; }

/* Section Box */
.section-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.section-title {
    color: #3498db;
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Form Inputs (ฟอร์มด้านบน) */
.form-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.small {
    flex: 0.3;
}

label {
    font-size: 12px;
    color: var(--text-muted);
}

.section-box input:not(.match-row input), 
.section-box select:not(.match-row select), 
.section-box textarea {
    background-color: #0b1017;
    border: 1px solid #34495e;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 0 5px rgba(52, 152, 219, 0.3);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 4px;
    outline: none;
    transition: all 0.3s ease;
}

.section-box input:not(.match-row input):focus, 
.section-box select:not(.match-row select):focus, 
.section-box textarea:focus {
    border-color: #3498db;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 0 8px rgba(52, 152, 219, 0.8);
}

/* ==========================================
   ระบบตารางโพยหลัก (ล็อกสัดส่วน 22 ช่อง นิ่งสนิท)
   ========================================== */
#oddsTable {
    width: 100%;
    min-width: 1150px;
    table-layout: fixed; /* บังคับความกว้างช่องตาม HTML <thead> เป๊ะๆ ไม่ให้ขยับหนี */
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 11px;
}

#oddsTable th, 
#oddsTable td {
    border: 1px solid var(--border-color);
    padding: 6px 4px;
    overflow: hidden;
    word-break: break-all;
    box-sizing: border-box;
}

#oddsTable th {
    background-color: #161e2d;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
}

/* เน้นแถวข้อมูลให้ดูสบายตาเวลา hover */
#oddsTable tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.score-box {
    background-color: #1b3a2b;
    color: #2ecc71;
    border: 1px solid #27ae60;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
}
/* ปรับแต่งช่อง ID ในตารางให้พอดี ไม่เบียดชนกัน */
#oddsTable input[class*="col-id"] {
    width: 31px !important;
    height: 24px !important;
    background: #0b0f19 !important;
    border: 1px solid #334155 !important;
    color: #2ecc71 !important;
    text-align: center !important;
    font-weight: bold !important;
    font-size: 10px !important;
    border-radius: 3px !important;
    padding: 0px !important;
    box-sizing: border-box !important;
}
/* กำหนดให้เส้นตารางทั้งหมดเป็นสีดำเข้มชัดเจน */
.slip-table, .slip-table th, .slip-table td {
    border: 1.5px solid #000000 !important; /* ปรับความหนาและเปลี่ยนเป็นสีดำสนิท */
}

/* กรณีที่ใช้ CSS Grid หรือขอบกล่องช่องใส่ข้อมูล */
.grid-box, input, .cell-item {
    border-color: #000000 !important;
}
#oddsModal {
    /* --- ส่วนสำคัญ: ล็อกขนาด --- */
    height: 250px !important;    /* กำหนดความสูงคงที่ไว้เลย เช่น 250px (ปรับค่านี้ตามความเหมาะสม) */
    max-height: 250px !important; /* บังคับ max-height ให้เท่ากัน */
    min-height: 250px !important; /* บังคับ min-height ให้เท่ากัน */
    overflow: hidden !important;   /* ซ่อนเนื้อหาที่เกินออกมา จะได้ไม่ยืด */

    /* --- ส่วนฟังก์ชันลอยและตำแหน่ง --- */
    position: fixed !important;    /* ลอยติดหน้าจอ */
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%);
    z-index: 9999 !important;
    cursor: move;                 /* เมาส์เป็นรูปมือจับลาก */
    display: block !important;
}
#oddsModal {
    height: auto !important;
    max-height: 220px !important; /* จำกัดความสูงสูงสุดไว้แค่นี้พอดีปุ่ม */
    overflow: hidden !important;   /* ป้องกันไม่ให้เนื้อหาหรือช่องว่างทะลักออกมา */
}




