:root {
    --primary: #2d4059;
    --primary-dark: #1c2d40;
    --secondary: #ea5455;
    --success: #28a745;
    --warning: #ff9e00;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fb;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
}

.logo i {
    color: var(--secondary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-role {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.logout-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.main-content {
    display: flex;
    min-height: calc(100vh - 80px);
}

.sidebar {
    width: 250px;
    background-color: white;
    padding: 1.5rem 0;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.nav-link:hover, .nav-link.active {
    background-color: var(--light-gray);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-link i {
    width: 24px;
    margin-right: 12px;
    text-align: center;
}

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

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

.page-title {
    font-size: 1.8rem;
    color: var(--primary);
}

.page-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

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

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

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

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

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

.pos-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 180px);
}

.product-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 15px;
    background-color: white;
    border: 1px solid var(--light-gray);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.category-btn:hover, .category-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.products-section {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.product-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 10px;
    box-shadow: var(--box-shadow);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.product-img {
    width: 60px;
    height: 60px;
    background-color: var(--light-gray);
    border-radius: 6px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--gray);
}

.product-name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.product-brand {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 4px;
}

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

.product-stock {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 5px;
}

.product-card.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

.product-card.out-of-stock:hover {
    transform: none;
    border-color: transparent;
    box-shadow: var(--box-shadow);
}

.product-card.out-of-stock .product-stock {
    color: var(--secondary);
    font-weight: 600;
}

.cart-section {
    flex: 0 0 500px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
    background-color: var(--primary);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.cart-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--light-gray);
    background: #fafafa;
    margin-bottom: 8px;
    border-radius: 6px;
}

.cart-item:last-child {
    border-bottom: none;
}

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

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-brand {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 3px;
}

.cart-item-id {
    font-size: 0.8rem;
    color: var(--gray);
    background-color: var(--light-gray);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-price {
    display: flex;
    align-items: center;
    gap: 5px;
    background: white;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--light-gray);
}

.cart-item-price label {
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.cart-item-price-input {
    width: 80px;
    padding: 5px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
}

.cart-item-price-input:focus {
    outline: none;
}

.cart-item-remove {
    background: var(--secondary);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-item-remove:hover {
    background: #d94444;
}

.cart-empty {
    text-align: center;
    color: var(--gray);
    padding: 40px 20px;
}

.cart-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--light-gray);
    background-color: #f8f9fa;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.cart-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--light-gray);
}

.cart-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.cart-actions .btn {
    flex: 1;
    justify-content: center;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
}

.card-title {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 10px;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.table-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

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

thead {
    background-color: var(--light-gray);
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--light-gray);
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--light-gray);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.modal-title {
    font-size: 1.5rem;
    color: var(--primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(45, 64, 89, 0.1);
}

.menu-toggle {
    display: none;
}

@media (max-width: 1200px) {
    .pos-container {
        flex-direction: column;
        height: auto;
    }
    
    .cart-section {
        flex: 1;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -250px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: var(--transition);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .menu-toggle {
        display: block;
        position: fixed;
        top: 20px;
        left: 20px;
        background-color: var(--primary);
        color: white;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        z-index: 1001;
        cursor: pointer;
        font-size: 1.2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .page-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 576px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 600;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}

.notification-error {
    background-color: var(--secondary);
}

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

.notification-info {
    background-color: var(--primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.login-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 0;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.login-form {
    padding: 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

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

.login-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.login-btn {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-info {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--light-gray);
    font-size: 0.9rem;
    color: var(--gray);
    text-align: center;
}

.login-info p {
    margin: 5px 0;
}