:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #f8fafc;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #22c55e;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 24px 0;
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 0 24px 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.logo i {
    color: var(--primary);
}

.nav-links {
    list-style: none;
}

.nav-links li {
    padding: 12px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.nav-links li:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-links li.active {
    color: var(--sidebar-active);
    background-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
}

.view {
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-bar {
    position: relative;
    width: 400px;
}

.search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* POS Grid */
.pos-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    flex: 1;
}

.cart-section,
.summary-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-weight: 600;
}

.btn-text {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.9rem;
}

.cart-table-wrapper {
    flex: 1;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid var(--bg);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--bg);
}

.total-card {
    background: var(--sidebar-bg);
    color: white;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 24px;
}

.total-card .label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 8px;
    opacity: 0.7;
}

.total-card .amount {
    font-size: 2.5rem;
    font-weight: 700;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.key {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: white;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.key:hover {
    background: var(--bg);
}

.key.del {
    color: var(--danger);
}

.payment-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-pay {
    padding: 16px;
    border-radius: 12px;
    border: none;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: transform 0.1s;
}

.btn-pay:active {
    transform: scale(0.98);
}

.btn-pay.cash {
    background-color: var(--success);
}

.btn-pay.card {
    background-color: var(--primary);
}

.notification {
    position: fixed;
    bottom: 32px;
    right: 32px;
    padding: 16px 24px;
    border-radius: 12px;
    background: var(--sidebar-bg);
    color: white;
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.notification.show {
    transform: translateY(0);
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--bg);
    font-size: 0.75rem;
    font-weight: 600;
}

.filters {
    display: flex;
    gap: 16px;
    align-items: center;
}

select {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    outline: none;
    background: white;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 20px;
    min-width: 400px;
    box-shadow: 0 10px 40px 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-content h2 {
    margin-bottom: 16px;
    color: var(--text-main);
}

.modal-content p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.modal-select {
    width: 100%;
    margin-bottom: 24px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions button {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
}

.form-input {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}