@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Mitr:wght@200;300;400;500;600;700&family=Noto+Sans+Thai:wght@100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Prompt:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); /* Reset and base styles */ *, *::before, *::after { box-sizing: border-box; font-weight: 300; } body, h1, h2, h3, h4, h5, h6, p, ol, ul { margin: 0; padding: 0; } body { font-family: "Mitr", sans-serif; font-size: 16px; line-height: 1.5; color: #333; background-color: #f5f5f5; } /* Login page styles */ .login-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%); } .login-container { width: 100%; max-width: 400px; padding: 20px; } .login-box { background-color: #fff; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); overflow: hidden; } .login-header { padding: 30px; background: #f9f9f9; text-align: center; border-bottom: 1px solid #eee; } .login-header h1 { font-size: 24px; color: #333; margin-bottom: 5px; } .login-header p { color: #666; font-size: 14px; } .login-form { padding: 30px; } .form-group { margin-bottom: 20px; } .form-group label { display: block; margin-bottom: 5px; font-weight: 500; color: #555; } .form-group input { width: 100%; padding: 10px 15px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; transition: border-color 0.3s; } .form-group input:focus { border-color: #2575fc; outline: none; } .btn { display: flex; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; font-weight: 500; cursor: pointer; transition: background-color 0.3s, transform 0.1s; } .btn:active { transform: translateY(1px); } .btn-primary { background-color: #2575fc; color: white; } .btn-primary:hover { background-color: #1a66e0; } .login-message { margin-top: 15px; padding: 10px; border-radius: 4px; text-align: center; font-size: 14px; } .login-message.error { background-color: #ffebee; color: #c62828; border: 1px solid #ffcdd2; } .login-message.success { background-color: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; } /* Layout styles */ .app-container { display: flex; min-height: 100vh; justify-content: center; flex-direction: column; } .sidebar { width: 250px; background-color: #2c3e50; color: #ecf0f1; height: 100vh; position: fixed; left: 0; top: 0; overflow-y: auto; transition: all 0.3s; } .content-area { flex: 1; margin-left: 250px; padding: 20px; transition: all 0.3s; } .sidebar-header { padding: 20px; background-color: #1a2530; text-align: center; } .sidebar-brand { font-size: 20px; font-weight: 400; color: #fff; text-decoration: none; display: block; } .sidebar-menu { padding: 0; list-style: none; } .sidebar-menu li { margin-bottom: 5px; } .sidebar-menu a { padding: 12px 20px; color: #b8c7ce; display: block; text-decoration: none; transition: all 0.3s; } .sidebar-menu a:hover, .sidebar-menu a.active { color: #fff; background-color: #204060; } .sidebar-menu i { margin-right: 10px; width: 20px; text-align: center; } .topbar { background-color: #fff; height: 60px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; } .toggle-sidebar { background: none; border: none; color: #333; font-size: 20px; cursor: pointer; } .user-dropdown { position: relative; } .user-dropdown-toggle { background: none; border: none; display: flex; align-items: center; cursor: pointer; } .user-avatar { width: 32px; height: 32px; border-radius: 50%; background-color: #ddd; margin-right: 10px; display: flex; align-items: center; justify-content: center; font-weight: 400; color: #666; } .user-dropdown-menu { position: absolute; top: 100%; right: 0; background-color: #fff; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); border-radius: 4px; padding: 10px 0; min-width: 180px; z-index: 1000; display: none; } .user-dropdown-menu.show { display: block; } .user-dropdown-menu a { padding: 8px 20px; display: block; color: #333; text-decoration: none; } .user-dropdown-menu a:hover { background-color: #f5f5f5; } .card { background-color: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); margin-bottom: 20px; } .card-header { padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; } .card-title { font-size: 18px; font-weight: 500; color: #333; margin: 0; } .card-body { padding: 20px; } /* Table Styles */ .table-container { overflow-x: auto; } .data-table { width: 100%; border-collapse: collapse; } .data-table th, .data-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #eee; } .data-table th { background-color: #f9f9f9; font-weight: 500; color: #555; } .data-table tbody tr:hover { background-color: #f5f5f5; } .data-table .actions { display: flex; gap: 5px; } .btn-sm { padding: 5px 10px; font-size: 14px; } .btn-success { background-color: #28a745; color: white; } .btn-success:hover { background-color: #218838; } .btn-danger { background-color: #dc3545; color: white; } .btn-danger:hover { background-color: #c82333; } .btn-info { background-color: #17a2b8; color: white; } .btn-info:hover { background-color: #138496; } /* Form styles */ .form-row { display: flex; flex-wrap: wrap; margin-right: -10px; margin-left: -10px; } .form-col { flex: 1; padding: 0 10px; margin-bottom: 15px; } .form-control { width: 100%; padding: 10px 15px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; } .form-control:focus { border-color: #2575fc; outline: none; } /* POS specific styles */ .pos-container { display: flex; min-height: calc(100vh - 60px); } .pos-products { flex: 2; padding: 20px; background-color: #f5f7fa; overflow-y: auto; } .pos-order { flex: 1; padding: 20px; background-color: #fff; border-left: 1px solid #eee; display: flex; flex-direction: column; } .product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; } .product-item { background-color: #fff; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); overflow: hidden; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; } .product-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } .product-img { height: 100px; display: flex; align-items: center; justify-content: center; background-color: #f9f9f9; padding: 10px; } .product-img img { max-height: 80px; max-width: 100%; } .product-details { padding: 10px; } .product-name { font-size: 14px; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .product-price { font-weight: 400; color: #2575fc; } .order-header { padding-bottom: 15px; border-bottom: 1px solid #eee; margin-bottom: 15px; } .order-title { font-size: 18px; color: #333; margin-bottom: 10px; } .order-items { flex: 1; overflow-y: auto; margin-bottom: 15px; } .order-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f5f5f5; } .item-name { flex: 1; } .item-quantity { width: 60px; text-align: center; } .item-price { width: 80px; text-align: right; font-weight: 500; } .item-actions { margin-left: 10px; } .order-summary { padding-top: 15px; border-top: 1px solid #eee; } .summary-row { display: flex; justify-content: space-between; margin-bottom: 8px; } .summary-label { color: #666; } .summary-value { font-weight: 500; } .total-row { font-size: 18px; font-weight: 400; color: #2575fc; margin-top: 10px; padding-top: 10px; border-top: 1px solid #eee; } .order-actions { margin-top: 20px; display: flex; gap: 10px; } .order-actions .btn { flex: 1; } /* Dashboard styles */ .stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-bottom: 20px; } .stat-card { background-color: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); padding: 20px; display: flex; align-items: center; } .stat-icon { width: 60px; height: 60px; border-radius: 50%; background-color: rgba(37, 117, 252, 0.1); color: #2575fc; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-right: 15px; } .stat-details { flex: 1; } .stat-title { font-size: 14px; color: #666; margin-bottom: 5px; } .stat-value { font-size: 24px; font-weight: 400; color: #333; } .chart-container { height: 300px; margin-bottom: 20px; } /* Responsive styles */ @media (max-width: 992px) { .sidebar { width: 70px; } .sidebar-brand span, .sidebar-menu span { display: none; } .content-area { margin-left: 70px; } .sidebar-header { padding: 10px; } .sidebar-menu a { text-align: center; padding: 15px; } .sidebar-menu i { margin-right: 0; font-size: 18px; } } @media (max-width: 768px) { .pos-container { flex-direction: column; } .pos-products, .pos-order { width: 100%; } .stats-grid { grid-template-columns: 1fr; } .form-row { flex-direction: column; } .form-col { flex: 1 0 100%; } } @media (max-width: 576px) { .content-area { padding: 10px; } .product-grid { grid-template-columns: repeat(2, 1fr); } } /* Modal styles */ .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 1000; overflow-y: auto; } .modal.show { display: block; } .modal-content { background-color: #fff; margin: 50px auto; width: 90%; max-width: 700px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); overflow: hidden; } .modal-sm { max-width: 500px; } .modal-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background-color: #f8f9fa; border-bottom: 1px solid #eee; } .modal-header h2 { margin: 0; font-size: 20px; color: #333; } .close-modal { background: none; border: none; font-size: 24px; font-weight: 400; color: #999; cursor: pointer; } .close-modal:hover { color: #333; } .modal-body { padding: 20px; } .modal-footer { padding: 15px 20px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 10px; } /* Form styles (additional) */ .form-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; } label { display: block; margin-bottom: 5px; font-weight: 500; color: #555; } textarea.form-control { min-height: 100px; resize: vertical; } /* Category list in modal */ .category-list { max-height: 300px; overflow-y: auto; margin-bottom: 20px; border: 1px solid #eee; border-radius: 4px; } .category-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; border-bottom: 1px solid #eee; } .category-item:last-child { border-bottom: none; } .category-actions { display: flex; gap: 5px; } .btn-icon { background: none; border: none; color: #666; cursor: pointer; font-size: 14px; } .btn-icon:hover { color: #333; } /* Filters bar */ .filters { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; } .filters .form-control { width: auto; } /* Badges */ .badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; } .badge-success { background-color: #d4edda; color: #155724; } .badge-warning { background-color: #fff3cd; color: #856404; } .badge-danger { background-color: #f8d7da; color: #721c24; } /* Product grid item improvements */ .product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; margin-top: 15px; } /* Receipt styles */ .receipt { font-family: 'Courier New', monospace; max-width: 380px; margin: 0 auto; padding: 10px; } .receipt-header { text-align: center; margin-bottom: 20px; } .receipt-header h3 { margin: 0 0 5px 0; font-size: 16px; } .receipt-header p { margin: 3px 0; font-size: 12px; } .receipt-info { margin-bottom: 15px; } .receipt-info p { margin: 3px 0; font-size: 12px; } .receipt-items { width: 100%; border-collapse: collapse; margin-bottom: 15px; } .receipt-items th, .receipt-items td { text-align: left; padding: 3px; font-size: 12px; } .receipt-items th { border-bottom: 1px dashed #000; } .receipt-summary { margin-top: 15px; font-size: 12px; } .receipt-footer { text-align: center; margin-top: 20px; padding-top: 10px; border-top: 1px dashed #000; font-size: 12px; } /* Stock Adjustment Modal */ .product-info { margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #eee; } .product-info h3 { margin: 0 0 5px 0; font-size: 18px; } /* Quantity buttons in POS */ .qty-btn { background: none; border: 1px solid #ddd; width: 24px; height: 24px; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-weight: 400; } .qty-btn:hover { background-color: #f5f5f5; } /* Errors and messages */ .text-center { text-align: center; } .text-danger { color: #dc3545; } .text-warning { color: #ffc107; } .text-success { color: #28a745; } /* Page header */ .page-header { display: flex; justify-content: space-between; align-items: center; margin: 20px 0; } .page-header h1 { margin: 0; font-size: 24px; color: #333; } .page-header > div { display: flex; } /* Empty states */ .empty-order { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; color: #999; } .empty-order i { font-size: 32px; margin-bottom: 10px; } .no-products { text-align: center; padding: 20px; color: #999; grid-column: 1 / -1; } /* Change calculation in payment */ .change-calculation { margin-top: 10px; padding: 8px; background-color: #f8f9fa; border-radius: 4px; display: flex; justify-content: space-between; font-weight: 500; } /* Utilities */ .mt-4 { margin-top: 20px; } /* Fix for small screens */ @media (max-width: 576px) { .modal-content { margin: 10px; width: calc(100% - 20px); } .form-row { flex-direction: column; } .form-col { margin-bottom: 15px; } } #notification-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; } .notification { padding: 12px 15px; border-radius: 4px; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); display: flex; align-items: center; justify-content: space-between; min-width: 250px; max-width: 350px; animation: notification-slide 0.3s ease; } .notification-info { background-color: #d1ecf1; color: #0c5460; } .notification-success { background-color: #d4edda; color: #155724; } .notification-error { background-color: #f8d7da; color: #721c24; } .notification-warning { background-color: #fff3cd; color: #856404; } .notification-close { background: none; border: none; font-size: 18px; font-weight: 400; cursor: pointer; color: inherit; } @keyframes notification-slide { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } /* Password fields styling */ .password-fields { margin-top: 10px; margin-bottom: 10px; } .form-hint { font-size: 12px; color: #666; margin-top: 3px; } /* Pagination styles */ .pagination { display: flex; justify-content: center; align-items: center; margin-top: 20px; gap: 15px; } .pagination-btn { background-color: #f8f9fa; border: 1px solid #ddd; padding: 5px 10px; border-radius: 4px; cursor: pointer; } .pagination-btn:hover:not(:disabled) { background-color: #e9ecef; } .pagination-btn:disabled { cursor: not-allowed; opacity: 0.5; } .pagination-info { color: #555; } /* Badge colors for user roles */ .badge-info { background-color: #d1ecf1; color: #0c5460; } /* Report styles */ .report-types { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 20px; } .report-type-item { background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 15px; display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: all 0.2s; min-width: 120px; text-align: center; } .report-type-item:hover { background-color: #e9ecef; transform: translateY(-2px); } .report-type-item.active { background-color: #e8f4fd; border-color: #2575fc; color: #2575fc; } .report-type-item i { font-size: 24px; margin-bottom: 10px; } .date-range { display: flex; gap: 10px; } .date-range .form-group { flex: 1; } .report-summary { display: flex; flex-wrap: wrap; gap: 20px; margin: 20px 0; background-color: #f8f9fa; border-radius: 8px; padding: 15px; } .summary-item { flex: 1; min-width: 150px; text-align: center; } .summary-label { font-size: 14px; color: #666; margin-bottom: 5px; } .summary-value { font-size: 20px; font-weight: 400; color: #333; } /* Responsive adjustments */ @media (max-width: 768px) { .date-range { flex-direction: column; } .report-type-item { min-width: 100px; } .report-summary { flex-direction: column; gap: 10px; } .summary-item { min-width: 100%; } } /* Sales management styles */ .sale-header { display: flex; justify-content: space-between; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #eee; } .sale-info, .sale-status { flex: 1; } .sale-info p, .sale-status p { margin: 5px 0; } .sale-summary { margin-top: 20px; border-top: 1px solid #eee; padding-top: 20px; } .sale-notes { margin-top: 20px; padding: 15px; background-color: #f9f9f9; border-radius: 5px; } .sale-notes p { margin: 5px 0; } .text-success { color: #28a745; } .text-danger { color: #dc3545; } .text-warning { color: #ffc107; } .text-info { color: #17a2b8; } .category-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0; padding-bottom: 15px; border-bottom: 1px solid #eee; } .category-filter .btn { background-color: #f8f9fa; border: 1px solid #e0e0e0; color: #555; padding: 8px 15px; border-radius: 20px; font-size: 14px; transition: all 0.2s ease; } .category-filter .btn:hover { background-color: #e9ecef; } .category-filter .btn.active { background-color: #2575fc; color: white; border-color: #2575fc; } @media (max-width: 576px) { .category-filter { overflow-x: auto; padding-bottom: 10px; flex-wrap: nowrap; } .category-filter .btn { flex: 0 0 auto; white-space: nowrap; } .category-filter .btn.disabled { background-color: #e0e0e0; color: #aaa; border-color: #d3d3d3; } } .search-bar { display: flex; align-items: center; margin-bottom: 20px; gap: 10px; } .search-bar input[type="text"] { flex: 1; padding: 10px 15px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; transition: border-color 0.3s; } .search-bar input[type="text"]:focus { border-color: #2575fc; outline: none; box-shadow: 0 0 0 2px rgba(37, 117, 252, 0.1); } .search-bar .btn { display: flex; align-items: center; justify-content: center; gap: 5px; background-color: #f0f0f0; color: #333; border: 1px solid #ddd; padding: 10px 15px; white-space: nowrap; } .search-bar .btn:hover { background-color: #e0e0e0; } .search-bar .btn i { font-size: 16px; } @media (max-width: 576px) { .search-bar { flex-direction: column; align-items: stretch; } .search-bar .btn { margin-top: 5px; } } /* ส่วนของ Current Order (POS Order) */ .pos-order { flex: 1; min-width: 350px; background-color: #fff; border-left: 1px solid #eee; display: flex; flex-direction: column; box-shadow: -2px 0 10px rgba(0, 0, 0, 0.05); position: relative; } /* ส่วนหัวของ Order */ .order-header { padding: 20px 20px 15px; border-bottom: 1px solid #eee; margin-bottom: 0; } .order-title { font-size: 18px; color: #333; margin-bottom: 15px; font-weight: 600; } .order-info { margin-bottom: 10px; } .order-info select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; } /* รายการสินค้าในตะกร้า */ .order-items { flex: 1; overflow-y: auto; padding: 10px 20px; max-height: calc(100vh - 350px); } .order-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f0f0; } .order-item:last-child { border-bottom: none; } .item-name { flex: 1; font-size: 14px; color: #333; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 10px; } .item-quantity { display: flex; align-items: center; margin: 0 10px; min-width: 80px; } .item-quantity span { display: inline-block; width: 30px; text-align: center; font-weight: 500; } .qty-btn { width: 28px; height: 28px; background: #f5f5f5; border: 1px solid #ddd; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: 400; cursor: pointer; transition: all 0.2s; } .qty-btn:hover { background-color: #e0e0e0; } .qty-btn.decrease { color: #e74c3c; } .qty-btn.increase { color: #2ecc71; } .item-price { width: 90px; text-align: right; font-weight: 600; color: #2575fc; font-size: 14px; } .item-actions { width: 40px; display: flex; justify-content: flex-end; } .btn-icon.remove-item { color: #e74c3c; background: none; border: none; font-size: 16px; cursor: pointer; opacity: 0.7; transition: opacity 0.2s; } .btn-icon.remove-item:hover { opacity: 1; } /* ส่วนสรุปราคา */ .order-summary { background-color: #f9f9f9; padding: 15px 20px; border-top: 1px solid #eee; border-bottom: 1px solid #eee; } .summary-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .summary-row:last-child { margin-bottom: 0; } .summary-label { color: #555; font-size: 14px; } .summary-value { font-weight: 600; font-size: 14px; color: #333; } .summary-value input { width: 80px; padding: 5px; text-align: right; border: 1px solid #ddd; border-radius: 4px; } .total-row { margin-top: 10px; padding-top: 10px; border-top: 1px solid #ddd; } .total-row .summary-label { font-size: 16px; font-weight: 600; color: #333; } .total-row .summary-value { font-size: 18px; font-weight: 700; color: #2575fc; } /* ปุ่มการทำรายการ */ .order-actions { padding: 15px 20px 20px; display: flex; gap: 10px; } .order-actions .btn { flex: 1; padding: 12px 15px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; } .order-actions .btn-danger { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; } .order-actions .btn-danger:hover { background-color: #f5c6cb; } .order-actions .btn-primary { background-color: #2575fc; color: white; } .order-actions .btn-primary:hover { background-color: #1a66e0; } .order-actions .btn i { font-size: 16px; } /* สถานะตะกร้าว่าง */ .empty-order { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 200px; color: #aaa; text-align: center; } .empty-order i { font-size: 50px; margin-bottom: 15px; opacity: 0.5; } .empty-order p { font-size: 16px; } /* Responsive */ @media (max-width: 992px) { .pos-order { min-width: 300px; } } @media (max-width: 768px) { .pos-container { flex-direction: column; } .pos-order { width: 100%; border-left: none; border-top: 1px solid #eee; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05); } .order-items { max-height: 300px; } } .backup-actions { display: flex; gap: 10px; margin-bottom: 20px; }