@font-face {
    font-family: 'MyCustomFont';
    src: url('/static/fonts/Kodchasan-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
    font-family: 'MyCustomFont', monospace;
}

#pos-container {
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
}

canvas {
    background-color: white;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#main-display {
    width: 100%;
    height: 600px;
}

#button-panel {
    width: 100%;
    height: 140px;
}

#search-input {
    position: absolute;
    left: 0;
    top: 0;
    border: 2px solid #555;
    border-radius: 4px;
    font-size: 16px;
    padding: 5px 10px;
    outline: none;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    display: none;
    z-index: 10;
    color: #333;
}

#search-input:focus {
    border-color: #333;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* สไตล์พื้นฐานสำหรับแท็บ */
.nav-link {
    border-radius: 8px 8px 0 0;
    margin-right: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
    padding: 12px 20px;
    color: #f1b1b1;
    background-color: #485969;
    border: 1px solid #dee2e6;
}

/* สไตล์เมื่อแท็บถูกเลือก */
.nav-link.active {
    font-weight: 600;
    color: white;
    border-bottom: 3px solid;
}

/* สีแต่ละแท็บ */
.sales-tab.active {
    background-color: #4e73df;
    border-color: #2e59d9;
}

.daily-tab.active {
    background-color: #1cc88a;
    border-color: #17a673;
}

.orders-tab.active {
    background-color: #f6c23e;
    border-color: #dda20a;
}

.cashiers-tab.active {
    background-color: #e74a3b;
    border-color: #be2617;
}

.branches-tab.active {
    background-color: #36b9cc;
    border-color: #2c9faf;
}

/* โฮเวอร์เอฟเฟกต์ */
.nav-link:hover:not(.active) {
    background-color: #13304e;
    transform: translateY(-2px);
}

.card {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    margin-bottom: 1rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.card-title {
    font-weight: 600;
}

tr[style*="cursor: pointer;"]:hover {
    background-color: #f8f9fa !important;
}
.card-header {
    font-weight: bold;
    background: #e9ecef;
}
.chart-container {
    height: 350px;
    position: relative;
}
.period-selector {
    max-width: 250px;
    margin-bottom: 15px;
}
h2 {
    color: #2c3e50;
}

.welcome-text {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.welcome-text h2 {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
}

.welcome-text p {
	font-size: 1rem;
	margin-bottom: 0;
}

.control-buttons .btn {
	transition: all 0.2s;
}

.control-buttons .btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 768px) {
	.d-flex {
		flex-direction: column;
		align-items: flex-start;
	}
	
	.control-buttons {
		margin-top: 1rem;
	}
	
	.control-buttons .btn {
		margin-bottom: 0.5rem;
	}
}

/* ปรับแต่ง scrollbar */
#order-history::-webkit-scrollbar {
    width: 8px;
}
#order-history::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
#order-history::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}
#order-history::-webkit-scrollbar-thumb:hover {
    background: #555;
}
/* ลิงก์คำสั่งซื้อ */
.order-link {
    cursor: pointer;
    text-decoration: underline;
    color: #0d6efd;
}
.order-link:hover {
    color: #0a58ca;
}

.card-header h6 {
    font-size: 1rem;
}
.table th {
    font-size: 0.9rem;
}
.table td {
    font-size: 0.9rem;
}
