/* POS System Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2196F3;
    --primary-dark: #1976D2;
    --secondary: #6c757d;
    --success: #4CAF50;
    --danger: #dc3545;
    --warning: #ff9800;
    --dark: #212529;
    --light: #f8f9fa;
    --border: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #1a1a2e;
    color: #fff;
    height: 100vh;
    overflow: hidden;
}

/* Container */
.pos-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.pos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
}

.header-left h1 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.header-left .current-time {
    font-size: 14px;
    color: #aaa;
    margin-left: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cashier-name {
    font-size: 14px;
    color: #aaa;
}

.btn-icon {
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* Main Layout */
.pos-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Left Panel */
.pos-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1a1a2e;
    border-right: 1px solid #0f3460;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    padding: 10px;
    gap: 8px;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
    overflow-x: auto;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #aaa;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.tab-btn.active {
    background: var(--primary);
    color: #fff;
}

/* Quick Keys */
.quick-keys-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.quick-keys {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.quick-key {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-key:hover {
    background: #1f2b4a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.quick-key.session { border-left: 4px solid var(--primary); }
.quick-key.rental { border-left: 4px solid var(--success); }
.quick-key.pass { border-left: 4px solid var(--warning); }
.quick-key.cabana { border-left: 4px solid #e91e63; }
.quick-key.retail { border-left: 4px solid #9c27b0; }

.quick-key-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: #fff;
}

.quick-key-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--success);
}

.quick-key-info {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
}

/* Session Selector */
.session-selector {
    background: #16213e;
    padding: 15px;
    border-top: 1px solid #0f3460;
}

.session-selector h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #aaa;
}

.date-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.date-picker input[type="date"] {
    flex: 1;
    padding: 8px 12px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

.date-nav {
    padding: 8px 12px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.date-nav:hover {
    background: #0f3460;
}

.session-times {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.session-time {
    padding: 10px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.session-time:hover {
    background: #0f3460;
}

.session-time.selected {
    background: var(--primary);
    border-color: var(--primary);
}

.session-time.full {
    opacity: 0.5;
    cursor: not-allowed;
    background: #2d2d2d;
}

.session-time .time {
    font-weight: 600;
    font-size: 14px;
}

.session-time .availability {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
}

.session-time.selected .availability {
    color: rgba(255,255,255,0.8);
}

/* Right Panel */
.pos-right {
    width: 400px;
    display: flex;
    flex-direction: column;
    background: #16213e;
}

/* Customer Section */
.customer-section {
    padding: 15px;
    border-bottom: 1px solid #0f3460;
}

.customer-search {
    display: flex;
    gap: 10px;
}

.customer-search input {
    flex: 1;
    padding: 10px 12px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

.customer-search input::placeholder {
    color: #666;
}

.btn-small {
    padding: 10px 15px;
    background: var(--primary);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background: var(--primary-dark);
}

.customer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 10px;
    background: #1a1a2e;
    border-radius: 6px;
}

.customer-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.customer-details strong {
    font-size: 14px;
}

.customer-details span {
    font-size: 12px;
    color: #888;
}

.membership-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #ffd700, #ff9800);
    color: #000;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 3px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    cursor: pointer;
}

.btn-text:hover {
    text-decoration: underline;
}

.customer-results {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    background: #1a1a2e;
    border-radius: 6px;
}

.customer-result {
    padding: 10px;
    border-bottom: 1px solid #0f3460;
    cursor: pointer;
    transition: all 0.2s;
}

.customer-result:hover {
    background: #0f3460;
}

.customer-result:last-child {
    border-bottom: none;
}

/* Cart Section */
.cart-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #0f3460;
}

.cart-header span {
    font-weight: 600;
    font-size: 14px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.empty-cart {
    text-align: center;
    color: #666;
    padding: 40px;
    font-size: 14px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #1a1a2e;
    border-radius: 6px;
    margin-bottom: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 3px;
}

.cart-item-details {
    font-size: 12px;
    color: #888;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 15px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    background: #0f3460;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--primary);
}

.cart-item-qty span {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
}

.cart-item-price {
    font-weight: 600;
    font-size: 14px;
    color: var(--success);
    min-width: 70px;
    text-align: right;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
}

.cart-item-remove:hover {
    color: var(--danger);
}

/* Totals Section */
.totals-section {
    padding: 15px;
    background: #0f3460;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: #aaa;
}

.total-grand {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid #1a1a2e;
}

/* Action Buttons */
.action-buttons {
    padding: 15px;
    background: #16213e;
}

.secondary-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.btn-secondary {
    padding: 12px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #0f3460;
}

.primary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-pay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-pay.cash {
    background: linear-gradient(135deg, #4CAF50, #2e7d32);
    color: #fff;
}

.btn-pay.card {
    background: linear-gradient(135deg, #2196F3, #1565c0);
    color: #fff;
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.pay-icon {
    font-size: 24px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #16213e;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.modal-small {
    max-width: 400px;
}

.modal-content.modal-large {
    max-width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #0f3460;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #0f3460;
}

.btn-primary {
    padding: 12px 24px;
    background: var(--primary);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Form Elements */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: #aaa;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Payment Modal Specific */
.payment-amount {
    text-align: center;
    padding: 20px;
    background: #1a1a2e;
    border-radius: 8px;
    margin-bottom: 20px;
}

.payment-amount span:first-child {
    display: block;
    font-size: 14px;
    color: #888;
    margin-bottom: 5px;
}

.payment-amount .amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--success);
}

.quick-cash-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.quick-cash-buttons button {
    padding: 12px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-cash-buttons button:hover {
    background: #0f3460;
}

.change-due {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: var(--success);
    border-radius: 8px;
    margin-top: 20px;
    font-size: 18px;
    font-weight: 600;
}

.card-terminal-status {
    text-align: center;
    padding: 30px;
}

.terminal-icon {
    margin-bottom: 15px;
    color: var(--primary);
}

.terminal-waiting {
    color: #888;
    font-size: 14px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Discount Modal */
.discount-type-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.toggle-btn {
    flex: 1;
    padding: 12px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Tip Modal */
.tip-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.tip-btn {
    padding: 20px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tip-btn:hover {
    background: var(--warning);
    border-color: var(--warning);
}

/* Receipt Modal */
.receipt-success {
    text-align: center;
    padding: 30px;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 15px;
}

.receipt-success h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.receipt-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.receipt-options button {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Parked Sales */
.parked-sales-list {
    max-height: 400px;
    overflow-y: auto;
}

.parked-sale-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #1a1a2e;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.parked-sale-item:hover {
    background: #0f3460;
}

.parked-sale-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.parked-sale-info p {
    font-size: 12px;
    color: #888;
}

.parked-sale-total {
    font-size: 16px;
    font-weight: 600;
    color: var(--success);
}

.empty-message {
    text-align: center;
    color: #666;
    padding: 40px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #0f3460;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .pos-main {
        flex-direction: column;
    }

    .pos-left {
        flex: none;
        height: 50%;
    }

    .pos-right {
        width: 100%;
        flex: 1;
    }
}
