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

:root {
    --primary-yellow: #FFDD00;
    --primary-brown: #8B6F47;
    --gray-light: #F5F5F5;
    --gray-medium: #CCCCCC;
    --gray-dark: #333333;
    --white: #FFFFFF;
    --green: #2DB976;
    --red: #E74C3C;
    --blue: #3B5BDB;
    --text-main: #333333;
    --text-light: #999999;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--gray-light);
    color: var(--text-main);
    line-height: 1.6;
}

/* LAYOUT */
.main-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 300px;
    background-color: var(--white);
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    gap: 10px;
}

.sidebar-logo img {
    width: 40px;
    height: 40px;
}

.sidebar-logo-text {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.2;
}

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

.sidebar-menu-item {
    margin-bottom: 15px;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    font-size: 14px;
}

.sidebar-menu-link:hover {
    background-color: var(--gray-light);
}

.sidebar-menu-link.active {
    background-color: var(--primary-yellow);
    color: var(--text-main);
    font-weight: 600;
}

.sidebar-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    margin-top: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.content {
    flex: 1;
    background-color: var(--gray-light);
    overflow-y: auto;
}

.header {
    background-color: var(--white);
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    color: var(--primary-brown);
    margin: 0;
}

.logout-btn {
    padding: 10px 20px;
    background-color: var(--red);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #c0392b;
}

.page-content {
    padding: 30px;
}

/* BUTTONS */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background-color: #25a068;
}

.btn-secondary {
    background-color: var(--primary-yellow);
    color: var(--text-main);
    border: 2px solid var(--gray-dark);
}

.btn-secondary:hover {
    background-color: #e6c200;
}

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

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 12px;
}

/* FORMS */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-medium);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 3px rgba(255, 221, 0, 0.1);
}

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

/* DASHBOARD */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background-color: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.dashboard-card-icon {
    font-size: 40px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-card-content h3 {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.dashboard-card-content .number {
    font-size: 32px;
    font-weight: bold;
    color: var(--text-main);
}

.table-container {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.table-header {
    background-color: var(--primary-yellow);
    padding: 15px;
}

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

th {
    background-color: var(--primary-yellow);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-medium);
    font-size: 14px;
}

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

/* POS CATEGORIES */
.category-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background-color: var(--white);
    color: var(--text-main);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.category-btn.active {
    background-color: var(--primary-yellow);
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(255, 221, 0, 0.3);
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* PRODUCT CARDS */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.product-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.product-image {
    width: 100%;
    height: 120px;
    background-color: var(--primary-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.product-info {
    padding: 12px;
    text-align: center;
}

.product-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-main);
}

.product-category {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--blue);
}

/* CART */
.cart-section {
    background-color: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 300px;
}

.cart-header {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-main);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--gray-medium);
    font-size: 14px;
}

.cart-item-name {
    font-weight: 600;
}

.cart-item-price {
    color: var(--blue);
    font-weight: 600;
}

.cart-summary {
    padding: 15px;
    border-top: 2px solid var(--gray-medium);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.summary-total-value {
    color: var(--blue);
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--primary-brown);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
}

.modal-close:hover {
    color: var(--text-main);
}

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

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* COLLAPSIBLE */
.collapsible {
    background-color: var(--white);
    border: 1px solid var(--gray-medium);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collapsible.active {
    border-color: var(--primary-yellow);
    background-color: var(--gray-light);
}

.collapsible-content {
    display: none;
    padding: 15px;
    border-top: 1px solid var(--gray-medium);
}

.collapsible.active + .collapsible-content {
    display: block;
}

.collapsible-icon {
    transition: transform 0.3s ease;
    font-size: 20px;
}

.collapsible.active .collapsible-icon {
    transform: rotate(180deg);
}

/* LOGIN PAGE */
.login-container {
    display: flex;
    height: 100vh;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-light);
}

.login-box {
    background-color: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    width: 80px;
    height: 80px;
}

.login-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin-top: 15px;
    margin-bottom: 30px;
    color: var(--primary-brown);
}

.login-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.login-success {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 15px;
    }

    .page-content {
        padding: 15px;
    }

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

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

    .cart-section {
        margin-top: 20px;
    }

    .modal-content {
        width: 95%;
    }
}

/* UTILITY CLASSES */
.text-center {
    text-align: center;
}

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

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

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

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}
