:root {
    /* Colors */
    --primary-color: #4361ee;
    --primary-light: #eef2ff;
    --secondary-color: #3f37c9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    --text-main: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;

    --border-color: #e5e7eb;
    --border-radius: 12px;
    --border-radius-sm: 8px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Sidebar */
    --sidebar-width: 220px;
    --header-height: 70px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 90%;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100%;
    /* Scale entire UI down: default 16px → 14.4px.
       All rem-based sizes shrink proportionally,
       matching the look of 90% browser zoom at 100%. */
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 0.95rem;
    overflow-x: hidden;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    border-radius: 8px;
    /* Placeholder for logo icon */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2L2 7l10 5 10-5-10-5z"></path><path d="M2 17l10 5 10-5"></path><path d="M2 12l10 5 10-5"></path></svg>');
    background-size: 65%;
    background-position: center;
    background-repeat: no-repeat;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1rem;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.nav-item.active .nav-link {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

/* Active indicator bar on the left */
.nav-item.active .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 0 4px 4px 0;
    display: none;
    /* Hidden for now closer to TaskFolio screenshot style which is full background */
}

.nav-icon {
    font-size: 1.2rem;
    width: 1.5rem;
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.logout-btn {
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s;
}

.logout-btn:hover {
    color: var(--danger-color);
    background-color: #fee2e2;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative;
    top: 0 !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-header {
    min-height: var(--header-height);
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative;
    top: 0 !important;
    background-color: var(--bg-card);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.content-body {
    margin-top: 0 !important;
    padding: 1rem 2rem 2rem 2rem;
}

/* Menu Toggle (Mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    margin-bottom: 5px;
    border-radius: 2px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 90;
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.alert {
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-info {
    background-color: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 0.5rem;
}

.text-muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.my-4 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.super-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.super-actions .btn {
    white-space: nowrap;
}

.super-admin-alert {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sidebar-impersonation {
    margin: 0 1rem 1rem;
    padding: 0.75rem;
    border: 1px dashed #bfdbfe;
    border-radius: var(--border-radius-sm);
    background: #eff6ff;
}

.sidebar-impersonation-label {
    font-size: 0.75rem;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sidebar-impersonation-name {
    font-weight: 600;
    margin: 0.25rem 0 0.5rem;
    word-break: break-word;
}

/* Dashboard Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
}

.stat-primary::before {
    background-color: var(--primary-color);
}

.stat-warning::before {
    background-color: var(--warning-color);
}

.stat-info::before {
    background-color: var(--info-color);
}

.stat-success::before {
    background-color: var(--success-color);
}

.stat-danger::before {
    background-color: var(--danger-color);
}

.stat-icon {
    font-size: 2rem;
    margin-right: 1.5rem;
    padding: 1rem;
    border-radius: 50%;
    /* Optional: background circle for icon */
    background-color: var(--bg-body);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Specific icon bg colors based on context if needed */
.stat-primary .stat-icon {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.stat-warning .stat-icon {
    color: var(--warning-color);
    background-color: #fffbeb;
}

.stat-info .stat-icon {
    color: var(--info-color);
    background-color: #eff6ff;
}

.stat-success .stat-icon {
    color: var(--success-color);
    background-color: #ecfdf5;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Dashboard Layout Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

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

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.card-link {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
}

.card-link:hover {
    text-decoration: underline;
}

.empty-message {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 0;
    font-style: italic;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--bg-body);
    white-space: nowrap;
}

tr:hover td {
    background-color: #f9fafb;
}

td {
    color: var(--text-main);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.9rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-main);
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: var(--text-main);
    background-color: #fff;
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 9999px;
    /* Pill shape */
}

.badge-success {
    color: #065f46;
    background-color: #ecfdf5;
}

.badge-warning {
    color: #92400e;
    background-color: #fef3c7;
}

.badge-danger {
    color: #991b1b;
    background-color: #fef2f2;
}

.badge-info {
    color: #1e40af;
    background-color: #dbeafe;
}

.badge-secondary {
    color: #374151;
    background-color: #f3f4f6;
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    :root {
        --sidebar-width: 260px;
    }

    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        margin-top: 0 !important;
        padding-top: 0 !important;
        top: 0 !important;
    }

    .content-header {
        padding: 1.25rem 1rem 0.25rem 1rem !important;
        min-height: auto !important;
        height: auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .header-right {
        width: 100%;
    }

    .header-left {
        width: 100%;
    }

    .content-body {
        padding: 0.75rem;
    }

    table {
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 0.75rem 0.5rem;
    }

    /* Table Responsiveness Improvements */
    .hide-mobile {
        display: none !important;
    }

    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-grow {
        min-width: 100%;
    }

    .btn {
        width: 100%;
    }

    .action-buttons {
        justify-content: flex-end;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .menu-toggle {
        display: block;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 480px) {
    .hide-xs {
        display: none !important;
    }

    .page-title {
        font-size: 1.25rem;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    transition: all 0.15s ease-in-out;
    font-family: inherit;
}

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

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover:not(:disabled) {
    background-color: #3651d4;
    border-color: #3651d4;
}

.btn-secondary {
    color: var(--text-main);
    background-color: var(--bg-body);
    border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

.btn-outline {
    color: var(--text-main);
    background-color: transparent;
    border-color: var(--border-color);
}

.btn-outline:hover:not(:disabled) {
    background-color: var(--bg-body);
    border-color: var(--text-secondary);
}

.btn-danger {
    color: #fff;
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
    border-color: #dc2626;
}

.btn-success {
    color: #fff;
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover:not(:disabled) {
    background-color: #059669;
    border-color: #059669;
}

.btn-warning {
    color: #fff;
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

.btn-warning:hover:not(:disabled) {
    background-color: #d97706;
    border-color: #d97706;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.15s ease-in-out;
}

.btn-icon:hover {
    background-color: var(--bg-body);
}

.btn-icon.btn-danger:hover {
    background-color: #fee2e2;
    color: var(--danger-color);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.2s ease;
}

.modal-lg {
    max-width: 700px;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.15s ease-in-out;
}

.modal-close:hover {
    color: #ffffff;
}

.modal-body {
    padding: 1.5rem;
}

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

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Form Styles */
.form-input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-main);
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus {
    color: var(--text-main);
    background-color: #fff;
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input:disabled {
    background-color: var(--bg-body);
    opacity: 0.6;
    cursor: not-allowed;
}

.form-input.error {
    border-color: var(--danger-color);
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.9rem;
}

.form-label.required::after {
    content: ' *';
    color: var(--danger-color);
}

.form-row {
    display: grid;
    gap: 1.5rem;
}

.form-row-2 {
    grid-template-columns: 1fr 1fr;
}

.form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 768px) {

    .form-row-2,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.input-with-button .form-input {
    flex: 1;
}

.input-with-button .btn {
    flex-shrink: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Toast Notifications */
#toastContainer {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background-color: var(--info-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    transition: all 0.3s ease;
    max-width: 350px;
    word-break: break-word;
}

.toast.success {
    background-color: var(--success-color);
}

.toast.error {
    background-color: var(--danger-color);
}

.toast.warning {
    background-color: var(--warning-color);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filters Bar */
.filters-bar {
    margin-bottom: 1.5rem;
    background-color: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.filters-form {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-grow {
    flex: 1;
    min-width: 250px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* POS Layout */
.pos-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
    align-items: start;
}

.pos-main {
    min-height: 400px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.product-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.product-info {
    flex: 1;
    margin-bottom: 0.75rem;
}

.product-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    word-break: break-word;
}

.product-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.product-sku {
    font-family: monospace;
    font-size: 0.7rem;
}

.product-stock {
    font-size: 0.75rem;
}

.product-stock.text-danger {
    color: var(--danger-color);
    font-weight: 600;
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
}

/* POS Sidebar */
.pos-sidebar {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 150px);
    overflow: hidden;
}

.sidebar-section {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section:nth-child(3) {
    flex: 1;
    overflow-y: auto;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.empty-cart-msg {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cart-item {
    background: var(--bg-body);
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.cart-item-name {
    font-weight: 500;
    flex: 1;
}

.cart-item-qty {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    margin: 0 0.5rem;
}

.cart-item-qty input {
    width: 40px;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    font-size: 0.8rem;
}

.cart-item-price {
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ========== PROFESSIONAL POS SYSTEM ========== */

.pos-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.pos-title h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.pos-title p {
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.pos-search {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.pos-search-input {
    font-size: 16px !important;
    padding: 0.75rem 1rem !important;
}

.search-hint {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
}

.search-hint kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* ========== UNIFIED RESPONSIVE POS SYSTEM ========== */

.pos-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 70px);
    gap: 1.2rem;
    padding: 1.2rem;
    background: var(--bg-body);
    font-size: 16px;
}

/* POS Header - Always visible */
.pos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.8rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    flex-wrap: wrap;
    min-height: 90px;
}

.pos-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 200px;
}

.pos-title {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 700;
}

.pos-datetime {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

.pos-header-center {
    display: flex;
    gap: 0.75rem;
}

.btn-add-products {
    padding: 0.9rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    white-space: nowrap;
}

.pos-header-search {
    flex: 1;
    min-width: 350px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pos-search-input {
    font-size: 16px !important;
    padding: 0.9rem !important;
}

.search-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

/* Main Content - Full Width */
.pos-content-fullwidth {
    flex: 1;
    overflow: hidden;
}

.pos-section {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.pos-checkout-full {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Product Section */
.pos-products-section {
    grid-column: 1;
}

.section-header {
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
    overflow-y: auto;
    flex: 1;
}

.product-btn {
    background: var(--bg-body);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.9rem 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 110px;
}

.product-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.product-btn.focused {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.product-btn-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 0.4rem;
}

.product-btn-name {
    font-size: 0.8rem;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 0.2rem;
    word-break: break-word;
}

.product-btn-sku {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: monospace;
}

/* Checkout Section */
.pos-checkout-section {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.checkout-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.checkout-header {
    margin: 0 0 1rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05) 0%, rgba(63, 55, 201, 0.05) 100%);
    padding: 1rem;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.order-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.order-number {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-clear-cart {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.btn-clear-cart:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.checkout-group {
    margin-bottom: 1rem;
}

.checkout-group.buttons {
    margin-top: auto;
}

.group-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.checkout-group select,
.checkout-group .form-input {
    width: 100%;
    font-size: 16px !important;
}

/* Cart Items Display */
.cart-items-display {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
    min-height: 80px;
    max-height: 150px;
    overflow-y: auto;
    flex: 1;
}

.empty-cart {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
}

.empty-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.empty-cart p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.4rem;
    align-items: center;
    padding: 0.6rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.8rem;
}

.cart-item-left {
    min-width: 0;
}

.item-name {
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}

.item-sku {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.cart-item-qty {
    display: flex;
    gap: 1px;
}

.qty-btn {
    background: var(--border-color);
    border: none;
    border-radius: 3px;
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 600;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: white;
}

.qty-input {
    width: 45px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 0.2rem;
    font-size: 16px;
    font-weight: 500;
}

.item-price {
    text-align: right;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.85rem;
}

.btn-remove {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    transition: opacity 0.2s;
}

.btn-remove:hover {
    opacity: 0.8;
}

/* Calculations */
.calculations {
    background: var(--bg-body);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

.calc-label {
    font-weight: 600;
    color: var(--text-main);
}

.calc-value {
    font-weight: 700;
    color: var(--primary-color);
}

.calc-inline {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.calc-input {
    width: 60px;
    padding: 0.35rem !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    text-align: center;
    font-size: 16px !important;
}

.calc-input-right {
    width: 70px;
}

.calc-divider {
    height: 1.5px;
    background: var(--border-color);
    margin: 0.6rem 0;
}

.calc-total {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin-top: 0.4rem !important;
}

.calc-total .calc-value {
    font-size: 1.1rem;
}

/* Payment Section */
.payment {
    background: white;
    border: 2px solid var(--primary-light);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
}

.payment-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.payment-input-group {
    display: flex;
    flex-direction: column;
}

.payment-input {
    font-size: 1rem !important;
    font-weight: 600 !important;
    padding: 0.65rem !important;
}

.change-display-section {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.change-display {
    background: var(--bg-body);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    padding: 0.7rem;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--success-color);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#changeDue {
    color: var(--success-color);
}

/* Buttons */
.buttons {
    display: flex;
    gap: 0.75rem;
}

.btn-secondary {
    flex: 1;
}

.btn-complete-sale {
    flex: 1.5;
    padding: 0.85rem !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    opacity: 0.9;
}

.btn-success:active {
    transform: scale(0.98);
}

/* Shortcuts */
.checkout-shortcuts {
    text-align: center;
    padding: 0.75rem;
    background: var(--primary-light);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Tablet/Medium Screens (1024px to 1200px) */
@media (max-width: 1200px) {
    .pos-wrapper {
        gap: 1rem;
        padding: 1rem;
    }

    .pos-header {
        gap: 1rem;
        padding: 1.5rem;
        min-height: auto;
    }

    .pos-title {
        font-size: 1.8rem;
    }

    .pos-header-search {
        min-width: 250px;
    }

    .pos-checkout-full {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .pos-section {
        padding: 1.5rem;
    }

    .payment-inputs {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .modal-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .modal-product-btn {
        min-height: 160px;
        padding: 1rem;
    }

    .modal-product-price {
        font-size: 1.5rem;
    }

    .modal-product-name {
        font-size: 0.9rem;
    }
}

/* Tablet Portrait (768px to 1024px) */
@media (max-width: 1024px) {
    .pos-wrapper {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .pos-content-fullwidth {
        overflow-y: auto;
    }

    .pos-checkout-full {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 1.2rem;
    }

    .pos-section {
        padding: 1.2rem;
    }

    .modal-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.9rem;
        padding: 1.2rem;
    }

    .modal-product-btn {
        min-height: 150px;
    }

    .modal-product-price {
        font-size: 1.3rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .pos-header {
        flex-direction: column;
        align-items: stretch;
    }

    .pos-header-left {
        order: 2;
    }

    .pos-header-search {
        order: 1;
        flex: 1;
        min-width: auto;
    }

    .checkout-shortcuts {
        font-size: 0.75rem;
    }
}

/* Mobile Portrait (<768px) */
@media (max-width: 768px) {
    .pos-wrapper {
        gap: 0.5rem;
        padding: 0.5rem;
        height: auto;
    }

    .pos-header {
        padding: 1rem;
        gap: 0.75rem;
        min-height: auto;
    }

    .pos-title {
        font-size: 1.3rem;
    }

    .pos-datetime {
        font-size: 0.8rem;
    }

    .pos-header-search {
        min-width: auto;
    }

    .pos-search-input {
        font-size: 16px !important;
    }

    .search-hint {
        font-size: 10px;
    }

    .pos-content-fullwidth {
        overflow-y: auto;
    }

    .pos-section {
        padding: 1rem;
    }

    .pos-checkout-full {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .modal-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
        padding: 1rem;
    }

    .modal-product-btn {
        min-height: 130px;
        padding: 0.8rem;
    }

    .modal-product-price {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .modal-product-name {
        font-size: 0.8rem;
    }

    .modal-product-sku {
        font-size: 0.75rem;
    }

    .modal-product-stock {
        font-size: 0.8rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 0.5rem;
    }

    .product-btn {
        min-height: 90px;
        padding: 0.7rem 0.5rem;
    }

    .product-btn-price {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .product-btn-name {
        font-size: 0.75rem;
    }

    .product-btn-sku {
        font-size: 0.65rem;
    }

    .order-number {
        font-size: 1.2rem;
    }

    .btn-clear-cart {
        padding: 0.4rem 0.6rem;
        font-size: 1rem;
    }

    .checkout-header {
        margin: -1rem -1rem 0.75rem -1rem;
        padding: 0.75rem;
    }

    .order-info {
        gap: 0.75rem;
    }

    .checkout-group {
        margin-bottom: 0.75rem;
    }

    .cart-items-display {
        min-height: 60px;
        max-height: 120px;
    }

    .cart-line {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .calc-input {
        width: 45px;
        font-size: 16px !important;
    }

    .calc-input-right {
        width: 60px;
    }

    .calc-row {
        margin-bottom: 0.5rem;
        font-size: 0.85rem;
    }

    .calc-total {
        font-size: 1rem !important;
    }

    .payment-inputs {
        grid-template-columns: 1fr;
    }

    .change-display {
        font-size: 1.1rem;
        min-height: 42px;
    }

    .buttons {
        gap: 0.5rem;
    }

    .btn-complete-sale {
        font-size: 0.9rem !important;
    }

    .checkout-shortcuts {
        font-size: 0.7rem;
        padding: 0.5rem;
    }
}

/* Small Mobile Landscape/Tiny Screens (<480px) */
@media (max-width: 480px) {
    .pos-wrapper {
        padding: 0.25rem;
        gap: 0.25rem;
    }

    .pos-header {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .pos-title {
        font-size: 1.1rem;
    }

    .pos-datetime {
        display: none;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .product-btn {
        min-height: 80px;
        padding: 0.6rem 0.4rem;
    }

    .checkout-header {
        margin: -1rem -1rem 0.5rem -1rem;
        padding: 0.65rem;
    }

    .order-number {
        font-size: 1rem;
    }

    .group-label {
        font-size: 0.75rem;
    }

    .buttons {
        flex-direction: column;
    }

    .btn-secondary,
    .btn-complete-sale {
        flex: auto;
    }

    .modal-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.6rem;
        padding: 0.75rem;
    }

    .modal-product-btn {
        min-height: 120px;
        padding: 0.6rem;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .btn-modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .modal-search {
        padding: 1rem;
    }

    .modal-search input {
        font-size: 16px !important;
        padding: 0.75rem !important;
    }
}


#changeDue {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--success-color);
    margin-top: 0.25rem;
}

/* Action Buttons */
.payment-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    opacity: 0.9;
    box-shadow: var(--shadow-md);
}

.btn-lg {
    flex: 2;
    padding: 1rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
}

/* Shortcuts Info */
.numpad-info {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--primary-light);
    border-radius: var(--border-radius-sm);
    text-align: center;
}

/* Responsive */
@media (max-width: 1200px) {
    .pos-layout {
        grid-template-columns: 1fr 380px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 768px) {
    .pos-header-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .pos-search {
        max-width: 100%;
        margin: 1rem 0 0 0;
    }

    .pos-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .pos-products {
        min-height: 400px;
    }

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


.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.summary-row.total {
    font-size: 1.1rem;
    font-weight: 700;
    border-top: 2px solid var(--border-color);
    padding-top: 0.75rem;
}

.payment-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (max-width: 1024px) {
    .pos-container {
        grid-template-columns: 1fr;
    }

    .pos-sidebar {
        height: auto;
    }

    .sidebar-section:nth-child(3) {
        max-height: 300px;
    }
}

/* ========== PRODUCTS MODAL ========== */

.products-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.products-modal.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.products-modal-content {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.btn-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-search {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-search input {
    font-size: 16px !important;
    padding: 1rem !important;
}

.modal-grid {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.2rem;
}

.modal-product-btn {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    font-family: inherit;
}

.modal-product-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.modal-product-btn:active {
    transform: translateY(-2px);
}

.modal-product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 0.8rem;
}

.modal-product-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    word-break: break-word;
}

.modal-product-sku {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: monospace;
    margin-bottom: 0.5rem;
}

.modal-product-stock {
    font-size: 0.9rem;
    color: var(--info-color);
    font-weight: 600;
    margin-top: auto;
}