/* ============================================
   BAKESHOP &amp; CAFE POS SYSTEM
   Main Stylesheet - Enhanced Responsive Design
   ============================================ */

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: white;
    border-bottom: 2px solid #e2e8f0;
    flex-shrink: 0;
    min-height: 60px;
}

.top-bar .search-product {
    flex: 1;
    min-width: 120px;
}

.top-bar .scan-barcode {
    flex: 1;
    min-width: 120px;
}

.top-bar input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.top-bar input:focus {
    outline: none;
    border-color: #2563eb;
}

.top-bar .btn-price-check {
    padding: 12px 20px;
    background: #8b5cf6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.top-bar .btn-price-check:hover {
    background: #7c3aed;
}

.top-bar .btn-cash-on-hand {
    padding: 12px 24px;
    background: #059669;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    margin-left: auto;
    transition: background 0.2s;
}

.top-bar .btn-cash-on-hand:hover {
    background: #047857;
}

.top-bar .btn-coh {
    padding: 12px 16px;
    background: #0284c7;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    margin-left: 8px;
    transition: background 0.2s;
}

.top-bar .btn-coh:hover {
    background: #0369a1;
}

.top-bar .btn-return {
    padding: 12px 20px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    margin-left: 8px;
    transition: background 0.2s;
    z-index: 10;
}

.top-bar .btn-return:hover {
    background: #d97706;
}

.top-bar .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 15px;
    border-left: 2px solid #e2e8f0;
}

.top-bar .user-name {
    font-weight: 600;
    color: #1e293b;
}

.top-bar .user-role {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
}

/* ============================================
   MAIN 3-COLUMN GRID LAYOUT
   LEFT: 40% | CENTER: 34% | RIGHT: 26%
   ============================================ */
.main-grid {
    display: grid;
    grid-template-columns: 40% 34% 26%;
    flex: 1;
    overflow: hidden;
    gap: 0;
}

/* ============================================
   LEFT COLUMN - PRODUCTS GRID (40%)
   ============================================ */
.products-column {
    display: flex;
    flex-direction: column;
    background: white;
    border-right: 2px solid #e2e8f0;
    overflow: hidden;
}

.products-header {
    padding: 12px 15px;
    border-bottom: 2px solid #e2e8f0;
    flex-shrink: 0;
}

.products-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 10px;
}

.category-dropdown {
    width: 100%;
}

.category-dropdown select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
}

.category-dropdown select:focus {
    outline: none;
    border-color: #2563eb;
}

.products-grid-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
}

.product-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-card:hover {
    border-color: #2563eb;
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-card.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
}

.product-card .product-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.2;
}

.product-card .product-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2563eb;
}

.product-card .product-stock {
    font-size: 0.7rem;
    color: #dc2626;
    margin-top: 2px;
}

/* Near-expiry and expired product styling */
.product-card.near-expiry-product {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.product-card.near-expiry-product:hover {
    border-color: #d97706;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.product-card.expired-product {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    opacity: 0.7;
}

.product-card.expired-product:hover {
    border-color: #dc2626;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.product-card .product-expiry {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
    text-transform: uppercase;
}

.product-card .product-expiry.near-expiry {
    background: #f59e0b;
    color: white;
}

.product-card .product-expiry.expired {
    background: #ef4444;
    color: white;
}

/* ============================================
   CENTER COLUMN - CART ITEMS (34%)
   ============================================ */
.cart-column {
    display: flex;
    flex-direction: column;
    background: #fafbfc;
    border-right: 2px solid #e2e8f0;
    overflow: hidden;
}

.cart-header {
    padding: 12px 15px;
    background: white;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.cart-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e40af;
}

.cart-count-badge {
    background: #2563eb;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.cart-customer {
    padding: 10px 15px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cart-customer label {
    font-size: 0.85rem;
    color: #64748b;
    white-space: nowrap;
}

.cart-customer select {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
}

.cart-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
}

.cart-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-item-qty button {
    width: 30px;
    height: 30px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.cart-item-qty button:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.cart-item-qty span {
    width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
}

.cart-item-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2563eb;
    text-align: right;
    min-width: 60px;
}

.cart-item-remove {
    color: #dc2626;
    cursor: pointer;
    font-size: 1.2rem;
}

/* ============================================
   RIGHT COLUMN - PAYMENT PANEL (26%)
   ============================================ */
.payment-column {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
    overflow: hidden;
}

.payment-header {
    padding: 12px 15px;
    background: white;
    border-bottom: 2px solid #e2e8f0;
    text-align: center;
    flex-shrink: 0;
}

.payment-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e40af;
}

.payment-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
}

/* Payment Summary */
.payment-summary {
    background: white;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.9rem;
}

.summary-row.subtotal {
    color: #475569;
}

.summary-row.discount {
    color: #dc2626;
}

.summary-row.tax {
    color: #64748b;
}

.summary-row.total {
    font-size: 1.15rem;
    font-weight: 700;
    border-top: 2px solid #e2e8f0;
    padding-top: 10px;
    margin-top: 6px;
    color: #1e40af;
}

/* Payment Method Buttons */
.payment-method-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.payment-method-btn {
    flex: 1;
    padding: 12px 8px;
    border: 3px solid #cbd5e1;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.payment-method-btn:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.payment-method-btn.active {
    border-color: #2563eb;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.payment-method-btn .method-icon {
    font-size: 1.3rem;
    display: block;
    margin-bottom: 2px;
}

.payment-method-btn .method-name {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Cash Payment Section */
.cash-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cash-section.hidden {
    display: none;
}

.amount-input-group {
    background: white;
    border-radius: 8px;
    padding: 10px;
}

.amount-input-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amount-input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: right;
}

.amount-input-group input:focus {
    outline: none;
    border-color: #2563eb;
}

.change-display {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.change-display .change-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #16a34a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.change-display .change-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #15803d;
}

/* Quick Cash Buttons */
.quick-cash-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.quick-cash-btn {
    flex: 1;
    min-width: 45px;
    padding: 12px 6px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    min-height: 48px;
}

.quick-cash-btn:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

/* GCash Section */
.gcash-section {
    display: none;
    flex-direction: column;
    gap: 10px;
}

.gcash-section.active {
    display: flex;
}

.gcash-ref-group {
    background: white;
    border-radius: 8px;
    padding: 10px;
}

.gcash-ref-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gcash-ref-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
}

.gcash-ref-group input:focus {
    outline: none;
    border-color: #8b5cf6;
}

/* Card Section */
.card-section {
    display: none;
    flex-direction: column;
    gap: 10px;
}

.card-section.active {
    display: flex;
}

.card-ref-group {
    background: white;
    border-radius: 8px;
    padding: 10px;
}

.card-ref-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-ref-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
}

.card-ref-group input:focus {
    outline: none;
    border-color: #2563eb;
}

/* Action Buttons */
.payment-actions {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.primary-actions-row {
    display: flex;
    gap: 8px;
}

.btn-pay {
    flex: 7;
    padding: 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    min-height: 55px;
}

.btn-pay:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
}

.btn-pay:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.btn-clear-cart {
    flex: 3;
    padding: 16px 8px;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    background: white;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 55px;
}

.btn-clear-cart:hover {
    border-color: #ef4444;
    background: #fef2f2;
    color: #dc2626;
}

.secondary-actions-row {
    display: flex;
    gap: 8px;
}

.btn-void {
    flex: 1;
    padding: 12px;
    border: 2px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
}

.btn-void:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.btn-return {
    flex: 1;
    padding: 12px;
    border: 2px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
}

.btn-return:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

/* ============================================
   STATUS BAR
   ============================================ */
.status-bar {
    background: #1e293b;
    color: white;
    padding: 8px 15px;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 5px;
}

.status-bar a {
    color: #60a5fa;
    text-decoration: none;
}

.status-bar a:hover {
    text-decoration: underline;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 5px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group input.error,
.form-group select.error {
    border-color: #dc2626;
}

.form-error {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

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

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

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #1e293b;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table .actions {
    display: flex;
    gap: 8px;
}

.data-table .btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.card-body {
    padding: 20px;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.stat-card .stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-card .stat-icon.green { background: #dcfce7; color: #16a34a; }
.stat-card .stat-icon.purple { background: #f3e8ff; color: #9333ea; }
.stat-card .stat-icon.orange { background: #ffedd5; color: #ea580c; }

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #64748b;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.alert-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.login-box h1 {
    text-align: center;
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 10px;
}

.login-box p {
    text-align: center;
    color: #64748b;
    margin-bottom: 30px;
}

.login-logo {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 20px;
}

/* ============================================
   ADMIN LAYOUT
   ============================================ */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: #1e293b;
    color: white;
    padding: 20px 0;
    flex-shrink: 0;
    overflow-y: auto;
}

.admin-sidebar .logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid #334155;
    margin-bottom: 20px;
}

.admin-sidebar .logo h2 {
    font-size: 1.1rem;
    font-weight: 700;
}

.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
    background: #334155;
    color: white;
}

.admin-sidebar nav a.active {
    border-left: 3px solid #2563eb;
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-header {
    background: white;
    padding: 15px 25px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-header h1 {
    font-size: 1.25rem;
    color: #1e293b;
}

.admin-content {
    flex: 1;
    padding: 25px;
    background: #f8fafc;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   RECEIPT
   ============================================ */
.receipt {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    width: 280px;
    margin: 0 auto;
    padding: 10px;
}

.receipt-header {
    text-align: center;
    border-bottom: 1px dashed #000;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.receipt-header h2 {
    font-size: 14px;
    margin-bottom: 5px;
}

.receipt-items {
    border-bottom: 1px dashed #000;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.receipt-totals {
    margin-bottom: 10px;
}

.receipt-totals .row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.receipt-totals .total {
    font-weight: bold;
    font-size: 14px;
    border-top: 1px solid #000;
    padding-top: 5px;
    margin-top: 5px;
}

.receipt-footer {
    text-align: center;
    border-top: 1px dashed #000;
    padding-top: 10px;
}

/* ============================================
   SIGNATURE CANVAS
   ============================================ */
.signature-canvas-container {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    overflow: hidden;
    touch-action: none;
}

.signature-canvas-container canvas {
    cursor: crosshair;
    display: block;
    width: 100%;
    height: 100px;
}

/* ============================================
   RESPONSIVE DESIGN - TABLET (max-width: 1024px)
   ============================================ */
@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 38% 38% 24%;
    }
}

@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .payment-column {
        grid-column: 1 / -1;
        max-height: 300px;
    }
    
    .payment-content {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .payment-summary {
        flex: 1;
        min-width: 200px;
    }
    
    .payment-method-buttons {
        flex: 1;
        min-width: 200px;
        flex-direction: column;
    }
    
    .cash-section,
    .gcash-section,
    .card-section {
        flex: 1;
        min-width: 200px;
    }
    
    .payment-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .primary-actions-row,
    .secondary-actions-row {
        flex: 1;
        min-width: 250px;
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    html, body {
        overflow: auto;
        height: auto;
    }
    
    body {
        min-height: 100vh;
    }
    
    .top-bar {
        flex-wrap: wrap;
        height: auto;
        gap: 8px;
        padding: 10px;
    }
    
    .top-bar .search-product,
    .top-bar .scan-barcode {
        flex: 1 1 45%;
        min-width: 140px;
    }
    
    .top-bar .btn-price-check,
    .top-bar .btn-cash-on-hand {
        flex: 1 1 auto;
        margin-left: 0;
        padding: 10px 15px;
    }
    
    .top-bar .user-info {
        width: 100%;
        justify-content: center;
        border-left: none;
        border-top: 1px solid #e2e8f0;
        padding: 10px 0 0;
        margin-top: 5px;
    }
    
    .main-grid {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        height: auto;
        flex: none;
    }
    
    .products-column,
    .cart-column,
    .payment-column {
        max-height: none;
        min-height: auto;
        border-right: none;
        border-bottom: 2px solid #e2e8f0;
    }
    
    .products-column {
        order: 1;
    }
    
    .cart-column {
        order: 2;
    }
    
    .payment-column {
        order: 3;
        max-height: none;
        grid-column: auto;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .product-card {
        min-height: 70px;
        padding: 10px 6px;
    }
    
    .product-card .product-name {
        font-size: 0.75rem;
    }
    
    .product-card .product-price {
        font-size: 0.85rem;
    }
    
    .payment-content {
        flex-direction: column;
        padding: 10px;
    }
    
    .payment-summary,
    .payment-method-buttons,
    .cash-section,
    .gcash-section,
    .card-section {
        min-width: 100%;
    }
    
    .payment-method-buttons {
        flex-direction: row;
    }
    
    .payment-actions {
        flex-direction: column;
    }
    
    .primary-actions-row,
    .secondary-actions-row {
        min-width: 100%;
    }
    
    .quick-cash-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .quick-cash-btn {
        font-size: 0.8rem;
        padding: 10px 4px;
    }
    
    /* Admin sidebar hidden on mobile */
    .admin-sidebar {
        display: none;
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
    }
    
    .admin-sidebar.show {
        display: block;
    }
    
    .admin-main {
        width: 100%;
    }
    
    .admin-header {
        padding: 12px 15px;
    }
    
    .admin-header h1 {
        font-size: 1.1rem;
    }
    
    .admin-content {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-card .stat-value {
        font-size: 1.25rem;
    }
    
    /* Table scroll on mobile */
    .table-container {
        margin: 0 -15px;
        border-radius: 0;
    }
    
    .data-table {
        min-width: 500px;
    }
    
    /* Modal adjustments */
    .modal {
        margin: 10px;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 12px 15px;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* ============================================
   RESPONSIVE DESIGN - SMALL MOBILE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .top-bar {
        padding: 8px;
    }
    
    .top-bar input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .top-bar .btn-price-check,
    .top-bar .btn-cash-on-hand {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .products-header,
    .cart-header,
    .payment-header {
        padding: 10px 12px;
    }
    
    .products-header h2,
    .cart-header h2,
    .payment-header h2 {
        font-size: 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 6px;
    }
    
    .product-card {
        min-height: 60px;
        padding: 8px 4px;
    }
    
    .product-card .product-name {
        font-size: 0.7rem;
    }
    
    .product-card .product-price {
        font-size: 0.8rem;
    }
    
    .cart-item {
        padding: 10px;
        gap: 8px;
    }
    
    .cart-item-name {
        font-size: 0.85rem;
    }
    
    .cart-item-qty button {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
    
    .cart-item-price {
        font-size: 0.85rem;
        min-width: 50px;
    }
    
    .btn-pay {
        font-size: 1rem;
        padding: 14px;
        min-height: 50px;
    }
    
    .btn-clear-cart {
        font-size: 0.8rem;
        padding: 14px 6px;
        min-height: 50px;
    }
    
    .btn-void,
    .btn-return {
        font-size: 0.85rem;
        padding: 10px;
        min-height: 44px;
    }
    
    .quick-cash-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .login-box {
        padding: 25px;
    }
    
    .login-box h1 {
        font-size: 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   TOUCH-FRIENDLY ENHANCEMENTS
   ============================================ */
@media (pointer: coarse) {
    .product-card {
        min-height: 80px;
    }
    
    .cart-item-qty button {
        width: 36px;
        height: 36px;
    }
    
    .payment-method-btn {
        padding: 14px 8px;
    }
    
    .quick-cash-btn {
        min-height: 52px;
    }
    
    .btn-pay {
        min-height: 60px;
    }
    
    .btn-clear-cart,
    .btn-void,
    .btn-return {
        min-height: 52px;
    }
    
    .btn,
    .btn-icon {
        min-height: 44px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .category-dropdown select {
        min-height: 44px;
        font-size: 16px;
    }
    
    .top-bar input {
        min-height: 44px;
        font-size: 16px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: #16a34a; }
.text-danger { color: #dc2626; }
.text-warning { color: #d97706; }
.text-muted { color: #64748b; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.p-20 { padding: 20px; }
.hidden { display: none !important; }

/* ============================================
   RECEIPT MODAL STYLES
   ============================================ */
.receipt-shop-name {
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.receipt-shop-detail {
    font-size: 11px;
    color: #64748b;
}

.receipt-divider {
    border-top: 1px solid #000;
    margin: 8px 0;
}

.receipt-divider-dashed {
    border-top: 1px dashed #000;
    margin: 8px 0;
}

.receipt-items-divider {
    border-top: 1px dashed #000;
    margin: 5px 0;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 2px 0;
}

.receipt-row span:first-child {
    flex: 1;
}

.receipt-row span:last-child {
    text-align: right;
    white-space: nowrap;
}

.receipt-items-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 11px;
    margin-bottom: 5px;
}

.receipt-items-header span:nth-child(1) { flex: 3; }
.receipt-items-header span:nth-child(2) { flex: 1; text-align: center; }
.receipt-items-header span:nth-child(3) { flex: 2; text-align: right; }

.receipt-item-name {
    flex: 3;
    word-break: break-word;
    font-size: 12px;
}

.receipt-item-qty {
    flex: 1;
    text-align: center;
    font-size: 12px;
}

.receipt-item-price {
    flex: 2;
    text-align: right;
    font-size: 12px;
}

.receipt-total-row {
    font-weight: bold;
    font-size: 14px;
    padding: 5px 0;
    border-top: 1px solid #000;
    margin-top: 5px;
}

.receipt-discount-info {
    margin-top: 10px;
    font-size: 11px;
}

.receipt-footer-text {
    font-size: 12px;
    margin: 3px 0;
}

.receipt-footer-sub {
    font-size: 10px;
    color: #64748b;
    margin-top: 5px;
}

.discount-row {
    color: #dc2626;
}.branch-badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 15px;
}
