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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f4f8;
    color: #333;
}

.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-logo {
    background: #3b82f6;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 24px;
    margin-bottom: 15px;
}

.login-title {
    font-size: 28px;
    color: #3b82f6;
    margin-bottom: 10px;
}

.login-subtitle {
    color: #6b7280;
    margin-bottom: 30px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
}

.login-box h2 {
    margin-bottom: 5px;
}

.login-box p {
    color: #6b7280;
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

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

.layout {
    display: flex;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 15px;
    }

    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 5px;
    }

    .nav-item {
        white-space: nowrap;
        padding: 8px 12px;
        margin-bottom: 0;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        padding: 15px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .sales-layout {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.sidebar {
    width: 220px;
    background: white;
    padding: 20px;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

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

.sidebar-logo .logo-icon {
    background: #3b82f6;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.sidebar-logo .logo-text {
    font-weight: 600;
    color: #3b82f6;
}

.sidebar-subtitle {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 25px;
}

.sidebar-nav {
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: #f3f4f6;
}

.nav-item.active {
    background: #eff6ff;
    color: #3b82f6;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    border-top: 1px solid #e5e7eb;
    padding-top: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #f59e0b;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: #9ca3af;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #6b7280;
    cursor: pointer;
    font-size: 13px;
    width: 100%;
}

.logout-btn:hover {
    background: #f3f4f6;
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

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

.page-title {
    font-size: 24px;
    font-weight: 600;
}

.page-subtitle {
    color: #6b7280;
    font-size: 14px;
}

.page-date {
    color: #6b7280;
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
}

.stat-value.revenue {
    color: #3b82f6;
}

.stat-value.profit {
    color: #10b981;
}

.stat-value.warning {
    color: #f59e0b;
}

.stat-sub {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 5px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.alert-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    margin-right: 10px;
}

.alert-name {
    font-weight: 500;
}

.alert-stock {
    font-size: 12px;
    color: #9ca3af;
}

.alert-action {
    color: #3b82f6;
    font-size: 13px;
}

.sale-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.sale-name {
    font-weight: 500;
}

.sale-qty {
    font-size: 12px;
    color: #9ca3af;
}

.sale-amount {
    color: #10b981;
    font-weight: 500;
}

.sales-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
}

.search-box input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 14px;
}

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

.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.product-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.product-card.low-stock {
    border-color: #fbbf24;
}

.product-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.product-stock {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 10px;
}

.product-price {
    color: #3b82f6;
    font-weight: 600;
}

.cart-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
}

.cart-title {
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-empty {
    text-align: center;
    padding: 40px 0;
    color: #9ca3af;
}

.cart-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

.cart-items {
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

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

.qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

.cart-item-price {
    font-weight: 500;
}

.cart-summary {
    border-top: 1px solid #e5e7eb;
    padding-top: 15px;
}

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

.summary-row.total {
    font-weight: 600;
    font-size: 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.complete-sale-btn {
    width: 100%;
    padding: 14px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 15px;
}

.complete-sale-btn:hover {
    background: #059669;
}

.complete-sale-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

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

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.data-table th {
    font-weight: 500;
    color: #6b7280;
    font-size: 13px;
}

.data-table tr:hover {
    background: #f9fafb;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #6b7280;
}

.action-btn:hover {
    color: #3b82f6;
}

.action-btn.delete:hover {
    color: #ef4444;
}

.stock-low {
    color: #ef4444;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-sale {
    background: #dcfce7;
    color: #16a34a;
}

.badge-restock {
    background: #dbeafe;
    color: #2563eb;
}

.badge-adjustment {
    background: #fef3c7;
    color: #d97706;
}

.reports-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.chart-title {
    font-weight: 600;
    margin-bottom: 20px;
}

.settings-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.settings-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.settings-desc {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 15px;
}

.trash-section {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.trash-empty {
    text-align: center;
    padding: 40px 0;
    color: #9ca3af;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    padding: 25px;
    width: 100%;
    max-width: 450px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

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

.modal-actions .btn {
    flex: 1;
}

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

.change-positive {
    color: #10b981;
}

.change-negative {
    color: #ef4444;
}
