/* shadcn/ui inspired POS System Styles */

/* CSS Variables - shadcn/ui color system */
:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221.2 83.2% 53.3%;
    --radius: 0.5rem;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-color: hsl(var(--border));
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

/* Screen Management */
.screen {
    display: none !important;
    height: 100vh;
    width: 100vw;
}

.screen.active {
    display: block !important;
}

/* Login Screen - shadcn/ui card style */
#loginScreen.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: hsl(var(--muted));
}

.login-container {
    background: hsl(var(--card));
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid hsl(var(--border));
}

/* User Buttons Grid */
.user-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.user-login-btn {
    background: hsl(var(--card));
    border: 2px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.user-login-btn:hover {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.user-login-btn:active {
    transform: translateY(0);
}

.user-login-btn.selected {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.1);
    border-width: 3px;
}

.user-login-btn .user-icon {
    font-size: 2.5rem;
    color: hsl(var(--primary));
}

.user-login-btn .user-name {
    font-weight: 600;
    font-size: 1rem;
    color: hsl(var(--foreground));
}

.user-login-btn .user-role-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.login-header {
    margin-bottom: 2rem;
    text-align: center;
}

.login-header i {
    font-size: 3rem;
    color: hsl(var(--primary));
    margin-bottom: 1rem;
}

.login-header h1 {
    color: hsl(var(--foreground));
    font-size: 1.5rem;
    font-weight: 600;
}

/* Form Groups - shadcn/ui input style */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid hsl(var(--input));
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.form-group input::placeholder {
    color: hsl(var(--muted-foreground));
}

/* Buttons - shadcn/ui button variants */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 40px;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover:not(:disabled) {
    background: hsl(var(--primary) / 0.9);
}

.btn-secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover:not(:disabled) {
    background: hsl(var(--secondary) / 0.8);
}

.btn-success {
    background: hsl(142.1 76.2% 36.3%);
    color: hsl(var(--primary-foreground));
}

.btn-success:hover:not(:disabled) {
    background: hsl(142.1 76.2% 36.3% / 0.9);
}

.btn-danger {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

.btn-danger:hover:not(:disabled) {
    background: hsl(var(--destructive) / 0.9);
}

.btn-outline {
    background: transparent;
    border: 1px solid hsl(var(--input));
    color: hsl(var(--foreground));
}

.btn-outline:hover:not(:disabled) {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    min-height: 32px;
}

/* POS Header - shadcn/ui header style */
.pos-header {
    background: hsl(var(--card));
    padding: 1rem 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.header-left h2 {
    color: hsl(var(--foreground));
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.teller-info {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

/* Pricing Level Buttons */
.pricing-levels {
    display: flex;
    gap: 0.25rem;
    background: hsl(var(--muted));
    padding: 0.25rem;
    border-radius: var(--radius);
}

.pricing-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
}

.pricing-btn:hover {
    background: hsl(var(--background));
}

.pricing-btn.active {
    background: hsl(var(--background));
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.header-right {
    display: flex;
    gap: 0.5rem;
}

/* Main POS Layout */
.pos-main {
    display: flex;
    height: calc(100vh - 73px);
    gap: 1rem;
    padding: 1rem;
    background: hsl(var(--muted) / 0.4);
}

/* Products Panel - shadcn/ui card */
.products-panel {
    flex: 2;
    background: hsl(var(--card));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    color: hsl(var(--foreground));
    font-size: 1.125rem;
    font-weight: 600;
}

/* Search Box */
.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid hsl(var(--input));
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    background: hsl(var(--background));
}

.search-box input:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.search-box i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(var(--muted-foreground));
}

/* Category Tabs - shadcn/ui tabs */
.category-tabs {
    display: flex;
    padding: 0 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
    overflow-x: auto;
    background: hsl(var(--muted) / 0.3);
}

.category-tab {
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.category-tab:hover {
    color: hsl(var(--foreground));
}

.category-tab.active {
    color: hsl(var(--primary));
    border-bottom-color: hsl(var(--primary));
}

/* Products Grid - Touch-Friendly */
.products-grid {
    flex: 1;
    padding: 1.5rem;
    display: grid;
    /* Portrait-oriented buttons: narrower but taller for finger taps */
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem; /* Reduced gap for tighter layout */
    align-items: start; /* Align to top of each row */
    overflow-y: auto;
}

.product-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    /* Touch-friendly but compact */
    min-height: 140px;
    max-height: 180px;
    display: grid;
    grid-template-rows: auto auto 1fr auto auto; /* image, name, spacer, price, stock */
    gap: 0.4rem;
    align-items: center;
}

.product-card:hover {
    border-color: hsl(var(--primary));
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transform: translateY(-2px);
}

.product-image {
    width: 100%;
    max-width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--muted));
    margin: 0 auto;
}

.product-name {
    font-weight: 600;
    color: hsl(var(--foreground));
    font-size: 0.85rem;
    line-height: 1.2;
    /* Limit to 2 lines max */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2em; /* Reserve space for 2 lines */
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: hsl(142.1 76.2% 36.3%);
    white-space: nowrap;
}

.product-stock {
    font-size: 0.7rem;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
}

.product-stock.low {
    color: hsl(var(--destructive));
    font-weight: 600;
}

/* PIN Keypad Styles */
.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.pin-key {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    border-radius: var(--radius);
    padding: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Touch-friendly minimum size */
    min-height: 60px;
}

.pin-key:hover {
    background: hsl(var(--primary) / 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pin-key:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.pin-key-clear {
    background: hsl(var(--destructive));
    color: white;
    font-size: 1rem;
}

.pin-key-clear:hover {
    background: hsl(var(--destructive) / 0.9);
}

.pin-key-enter {
    background: hsl(var(--success));
    color: white;
    font-size: 1rem;
}

.pin-key-enter:hover {
    background: hsl(var(--success) / 0.9);
}

/* Cart Panel */
.cart-panel {
    flex: 1;
    background: hsl(var(--card));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.table-selector select {
    padding: 0.5rem;
    border: 1px solid hsl(var(--input));
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    background: hsl(var(--background));
}

.cart-items {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: hsl(var(--muted) / 0.5);
    border-radius: calc(var(--radius) - 2px);
    margin-bottom: 0.5rem;
    border: 1px solid hsl(var(--border));
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: hsl(var(--foreground));
    font-size: 0.875rem;
}

.cart-item-price {
    color: hsl(var(--muted-foreground));
    font-size: 0.8125rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: hsl(var(--muted));
}

.cart-item-quantity {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    font-size: 0.875rem;
}

.remove-item {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
    border: none;
    border-radius: calc(var(--radius) - 2px);
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.remove-item:hover {
    background: hsl(var(--destructive) / 0.9);
}

/* Cart Summary */
.cart-summary {
    padding: 1rem;
    border-top: 1px solid hsl(var(--border));
    background: hsl(var(--muted) / 0.3);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.summary-row.total {
    font-weight: 700;
    font-size: 1.125rem;
    color: hsl(var(--foreground));
    border-top: 1px solid hsl(var(--border));
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

/* Checkout Actions */
.checkout-actions {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkout-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
}

/* Membership Section */
.membership-section {
    padding: 1rem;
    border-top: 1px solid hsl(var(--border));
    background: hsl(var(--muted) / 0.3);
}

.membership-section .form-group {
    margin-bottom: 0;
}

.membership-section input {
    margin-bottom: 0.5rem;
}

/* Admin Screen */
#adminScreen {
    background: hsl(var(--muted) / 0.4);
}

.admin-header {
    background: hsl(var(--card));
    padding: 1rem 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Admin Navigation - shadcn/ui tabs */
.admin-nav {
    background: hsl(var(--card));
    padding: 0 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    gap: 0;
}

.admin-nav-btn {
    padding: 1rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.admin-nav-btn:hover {
    color: hsl(var(--foreground));
}

.admin-nav-btn.active {
    color: hsl(var(--primary));
    border-bottom-color: hsl(var(--primary));
}

.admin-content {
    padding: 1.5rem;
    height: calc(100vh - 140px);
    overflow-y: auto;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    color: hsl(var(--foreground));
    font-size: 1.5rem;
    font-weight: 600;
}

/* Tables - shadcn/ui table */
.products-table {
    background: hsl(var(--card));
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid hsl(var(--border));
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 0.75rem 1rem;
    text-align: left;
    background: hsl(var(--muted) / 0.5);
    font-weight: 600;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    border-bottom: 1px solid hsl(var(--border));
}

td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid hsl(var(--border));
    font-size: 0.875rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: hsl(var(--muted) / 0.3);
}

.product-image-small {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--muted));
}

/* Stock Grid */
.stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.stock-card {
    background: hsl(var(--card));
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
}

.stock-card h4 {
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
    font-weight: 600;
}

.stock-level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.stock-bar {
    width: 100%;
    height: 8px;
    background: hsl(var(--muted));
    border-radius: 999px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.stock-fill {
    height: 100%;
    background: hsl(142.1 76.2% 36.3%);
    transition: width 0.3s;
    border-radius: 999px;
}

.stock-fill.low {
    background: hsl(38 92% 50%);
}

.stock-fill.critical {
    background: hsl(var(--destructive));
}

/* Reports */
.report-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.report-controls input {
    padding: 0.5rem;
    border: 1px solid hsl(var(--input));
    border-radius: calc(var(--radius) - 2px);
}

.report-content {
    background: hsl(var(--card));
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    margin-top: 1rem;
}

/* Settings */
.settings-content {
    background: hsl(var(--card));
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
}

/* Modals - shadcn/ui dialog */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 0.5);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: hsl(var(--card));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content.large {
    width: 800px;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: hsl(var(--foreground));
    font-weight: 600;
    font-size: 1.125rem;
    margin: 0;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    transition: color 0.2s;
    line-height: 1;
}

.close:hover {
    color: hsl(var(--foreground));
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid hsl(var(--border));
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: hsl(var(--muted) / 0.3);
}

/* Forms */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.divisional-settings {
    background: hsl(var(--muted) / 0.5);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 1rem 0;
    border: 1px solid hsl(var(--border));
}

.divisional-settings h4 {
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
    font-weight: 600;
}

.cost-calculation {
    background: hsl(142.1 76.2% 36.3% / 0.1);
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    border-left: 3px solid hsl(142.1 76.2% 36.3%);
}

.cost-calculation p {
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
    font-size: 0.875rem;
}

.image-preview {
    margin-top: 0.5rem;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
}

.pricing-levels h4 {
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Tab Management */
.tab-list {
    max-height: 400px;
    overflow-y: auto;
}

.tab-item {
    background: hsl(var(--muted) / 0.5);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid hsl(var(--border));
}

.tab-info h4 {
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.tab-info p {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.tab-amount {
    font-weight: 700;
    color: hsl(142.1 76.2% 36.3%);
    font-size: 1.125rem;
}

/* Payment */
.payment-info {
    text-align: center;
}

.amount-due {
    font-size: 2rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 2rem;
}

.payment-methods {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.payment-btn {
    padding: 1.5rem 2rem;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 140px;
}

.payment-btn:hover {
    border-color: hsl(var(--primary));
    background: hsl(var(--muted) / 0.5);
}

.payment-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
    color: hsl(var(--primary));
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(var(--muted));
}

::-webkit-scrollbar-thumb {
    background: hsl(var(--muted-foreground) / 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--muted-foreground) / 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .pos-main {
        flex-direction: column;
    }
    
    .products-panel {
        flex: 1;
    }
    
    .cart-panel {
        flex: 0 0 300px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .pricing-levels {
        flex-wrap: wrap;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .modal-content.large {
        width: 95vw;
    }
    
    .payment-methods {
        flex-direction: column;
    }
}

/* Image Search Interface */
.image-source-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid hsl(var(--border));
}

.image-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.image-tab:hover {
    color: hsl(var(--foreground));
}

.image-tab.active {
    color: hsl(var(--primary));
    border-bottom-color: hsl(var(--primary));
}

.image-tab-content {
    display: none;
}

.image-tab-content.active {
    display: block;
}

.image-search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    background: hsl(var(--muted) / 0.3);
    border-radius: var(--radius);
}

.image-search-result {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s;
    aspect-ratio: 1;
}

.image-search-result img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-search-result:hover {
    border-color: hsl(var(--primary));
    transform: scale(1.05);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.image-search-result.selected {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.2);
}

.image-search-result .check-icon {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: hsl(var(--primary));
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.image-search-result.selected .check-icon {
    display: flex;
}

.image-search-loading {
    text-align: center;
    padding: 2rem;
    color: hsl(var(--muted-foreground));
}

.image-search-loading i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: hsl(var(--primary));
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.image-search-error {
    text-align: center;
    padding: 2rem;
    color: hsl(var(--destructive));
}

/* User Management */
.permissions-display {
    background: hsl(var(--muted) / 0.5);
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    border: 1px solid hsl(var(--border));
}

.permissions-display h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: hsl(var(--foreground));
}

.permission-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.permission-item i {
    color: hsl(142.1 76.2% 36.3%);
}

.permission-item.denied i {
    color: hsl(var(--muted-foreground));
}

.user-role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.75rem;
    font-weight: 600;
}

.user-role-badge.admin {
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
}

.user-role-badge.manager {
    background: hsl(38 92% 50% / 0.1);
    color: hsl(38 92% 50%);
}

.user-role-badge.bartender {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.user-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.75rem;
    font-weight: 600;
}

.user-status-badge.active {
    background: hsl(142.1 76.2% 36.3% / 0.1);
    color: hsl(142.1 76.2% 36.3%);
}

.user-status-badge.inactive {
    background: hsl(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
    }
    
    .product-card {
        min-height: 180px;
    }
    
    .category-tab {
        padding: 1rem 1.25rem;
    }
    
    .pricing-btn {
        padding: 0.75rem 1rem;
    }
}
/* Pricing Schedule Styles */
.day-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.day-checkbox:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--primary));
}

.day-checkbox input[type="checkbox"] {
    cursor: pointer;
}

.day-checkbox input[type="checkbox"]:checked {
    accent-color: hsl(var(--primary));
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: hsl(var(--primary));
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.schedule-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.schedule-status-badge.active {
    background: hsl(142.1 76.2% 36.3% / 0.1);
    color: hsl(142.1 76.2% 36.3%);
}

.schedule-status-badge.inactive {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.pricing-level-indicator {
    padding: 0.5rem 1rem;
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
