:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --bg-color: #f3f4f6;
    --text-color: #1f2937;
    --white: #ffffff;
    --error: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Utilities */
.h-screen {
    height: 100vh;
}

.flex {
    display: flex;
}

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

.justify-center {
    justify-content: center;
}

.bg-gray-100 {
    background-color: var(--bg-color);
}

/* Login */
.login-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 400px;
}

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

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    box-sizing: border-box;
    /* Fix for width 100% */
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.is-invalid {
    border-color: var(--error) !important;
}

.invalid-feedback {
    display: block;
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.375rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

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

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

.btn-block {
    display: block;
    width: 100%;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #1f2937;
    color: var(--white);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    background-color: #111827;
    text-align: center;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.sidebar-nav li a {
    display: block;
    padding: 1rem 1.5rem;
    color: #d1d5db;
    text-decoration: none;
    transition: background 0.2s;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background-color: #374151;
    color: var(--white);
}

.sidebar-nav li a i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-bar {
    background-color: var(--white);
    padding: 1rem 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-end;
}

.content-wrapper {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

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

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

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

.stat-icon.sales {
    background-color: #d1fae5;
    color: #059669;
}

.stat-icon.orders {
    background-color: #dbeafe;
    color: #2563eb;
}

.stat-icon.stock {
    background-color: #fee2e2;
    color: #dc2626;
}

.stat-info h3 {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.stat-info p {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-qty {
    background: #f3f4f6;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    margin-left: 0.5rem;
}

.cart-footer {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Product Grid Styles */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 150px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.no-image {
    color: #dee2e6;
    font-size: 3rem;
}

.product-actions-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.product-card:hover .product-actions-overlay {
    opacity: 1;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-weight: 700;
    color: var(--primary-color);
}

.product-stock {
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.stock-ok {
    background: #d4edda;
    color: #155724;
}

.stock-low {
    background: #f8d7da;
    color: #721c24;
}

/* POS Modal Redesign */
.pos-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pos-modal-backdrop.show {
    display: flex;
    opacity: 1;
}

.pos-modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 800px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pos-modal-backdrop.show .pos-modal-content {
    transform: scale(1);
}

.pos-modal-header {
    padding: 24px 32px;
    background: #ffffff;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: center;
    /* Center content */
    align-items: center;
    position: relative;
    /* For absolute positioning of close button */
}

.pos-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.025em;
    margin: 0;
    text-align: center;
}

.pos-modal-close {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    /* Absolute position */
    right: 32px;
    /* Align to right */
}

.pos-modal-close:hover {
    background: #f3f4f6;
    color: #4b5563;
}

.pos-modal-body {
    padding: 32px;
}

/* Payment Display */
.pos-payment-display-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 32px;
}

.pos-payment-card {
    background: #f9fafb;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.pos-payment-card.highlight {
    background: #ecfdf5;
    border-color: #d1fae5;
}

.pos-payment-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.pos-payment-amount {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.pos-payment-card.highlight .pos-payment-amount {
    color: #059669;
}

/* Tabs */
.pos-payment-tabs {
    background: #f3f4f6;
    padding: 6px;
    border-radius: 12px;
    display: flex;
    margin-bottom: 24px;
}

.pos-tab-item {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
}

.pos-tab-item.active {
    background: #ffffff;
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Inputs */
.pos-input-group {
    position: relative;
    margin-bottom: 24px;
}

.pos-input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.25rem;
}

.pos-input-text-addon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: none;
}

.pos-input-large {
    width: 100%;
    padding: 16px 20px 16px 100px;
    /* Increased padding for text label */
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    outline: none;
    transition: all 0.2s;
    color: #111827;
}

.pos-input-large:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.pos-input-action {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 16px;
    background: #eef2ff;
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.pos-input-action:hover {
    background: #e0e7ff;
}

/* Quick Cash */
.pos-quick-cash-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.pos-btn-quick {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.pos-btn-quick:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f9fafb;
}

/* Footer Actions */
.pos-modal-footer {
    padding: 24px 32px;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 16px;
}

.pos-btn {
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.pos-btn-secondary {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.pos-btn-secondary:hover {
    background: #f3f4f6;
}

.pos-btn-primary {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.pos-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.pos-btn-success {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.pos-btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Park Sale Button Styles */
.btn-warning-custom {
    background: #fdba74;
    /* Lighter Orange */
    border: 1px solid #f97316;
    color: #7c2d12;
    /* Darker text for contrast */
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-warning-custom:hover {
    background: #fed7aa;
    border-color: #fb923c;
    color: #7c2d12;
}

.btn-danger-custom {
    background: #ef4444;
    /* Red */
    color: #ffffff;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-danger-custom:hover {
    background: #dc2626;
    color: #ffffff;
}

.btn-park-active {
    background: #fffbeb !important;
    color: #b45309 !important;
    border-color: #f59e0b !important;
    animation: blink-orange 2s infinite;
}

@keyframes blink-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* Empty Cart Animation */
.empty-cart-state {
    padding: 3rem 1rem;
    text-align: center;
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
}

.empty-cart-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #e5e7eb;
    animation: float 3s ease-in-out infinite;
}

.empty-cart-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #6b7280;
}

.empty-cart-subtext {
    font-size: 0.9rem;
    color: #9ca3af;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}