/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--gray-800);
    line-height: 1.6;
}

/* Page Management */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-box {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

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

.login-header h1 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 5px;
}

.login-header p {
    color: var(--gray-600);
    font-size: 14px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Form Row for Grid Layout */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

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

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

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

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

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

.btn-block {
    width: 100%;
}

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

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

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: fixed;
    height: 100vh;
    z-index: 1000;
    left: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    text-align: center;
}

.sidebar-header h2 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 5px;
}

.user-role {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

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

.sidebar-nav li {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--gray-600);
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.nav-link .icon {
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    transition: var(--transition);
}

/* Top Bar */
.top-bar {
    background-color: var(--white);
    padding: 15px 30px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.top-bar h1 {
    font-size: 20px;
    color: var(--gray-800);
}

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

/* Content Pages */
.content-page {
    padding: 30px;
    display: none;
}

.content-page.active {
    display: block;
}

.page-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.filter-group label {
    font-weight: 600;
    color: #333;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 150px;
}

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

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 40px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.stat-info h3 {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
}

/* Recent Section */
.recent-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.recent-section h2 {
    margin-bottom: 20px;
    color: var(--gray-800);
    font-size: 18px;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

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

/* Responsive Table Container */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table thead {
    background-color: var(--primary-color);
    color: var(--white);
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    font-weight: 600;
    font-size: 14px;
}

.data-table td {
    font-size: 14px;
}

.data-table tbody tr:hover {
    background-color: var(--gray-100);
}

/* Action buttons in tables */
.data-table .action-btns {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2001;
    box-shadow: var(--shadow-lg);
}

.modal.active {
    display: block;
}

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

.modal-header h2 {
    font-size: 18px;
    color: var(--gray-800);
}

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

.modal-body {
    padding: 20px;
}

.modal-footer,
.form-actions {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.login-footer p {
    color: var(--gray-600);
    font-size: 12px;
}

/* Admin Only Elements */
.admin-only {
    display: none;
}

body.admin-mode .admin-only {
    display: block;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

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

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

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

.badge-info {
    background-color: var(--info-color);
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Mobile Sidebar */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    }
    
    /* Add overlay for mobile sidebar */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
        padding: 8px;
        font-size: 28px;
    }
    
    /* Responsive Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-card h3 {
        font-size: 12px;
    }
    
    .stat-card .stat-value {
        font-size: 24px;
    }
    
    /* Content Page Adjustments */
    .content-page {
        padding: 15px 10px;
    }
    
    /* Responsive Tables */
    .data-table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
        white-space: nowrap;
    }
    
    /* Responsive Cards */
    .card {
        margin-bottom: 15px;
    }
    
    .card-header {
        padding: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* Responsive Forms */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    /* Responsive Modals */
    .modal {
        width: 95%;
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* Responsive Buttons */
    .btn {
        font-size: 13px;
        padding: 12px 20px;
        min-height: 44px;
    }
    
    .btn-sm {
        font-size: 11px;
        padding: 8px 12px;
        min-height: 36px;
    }
    
    /* Responsive Product Grid */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Responsive Cart */
    .cart-section {
        padding: 15px;
    }
    
    /* Top Bar Adjustments */
    .top-bar {
        padding: 12px 15px;
    }
    
    .top-bar h1 {
        font-size: 16px;
        margin-left: 10px;
    }
    
    /* Action Buttons Stack */
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination button {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    /* Login Page */
    .login-box {
        padding: 25px 20px;
        max-width: 100%;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-header p {
        font-size: 13px;
    }
    
    /* Single Column Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Top Bar */
    .top-bar {
        padding: 10px 12px;
    }
    
    .top-bar h1 {
        font-size: 14px;
        margin-left: 8px;
    }
    
    /* Content Page */
    .content-page {
        padding: 12px 8px;
    }
    
    /* Tables */
    .data-table {
        font-size: 11px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }
    
    /* Cards */
    .card-header h3 {
        font-size: 16px;
    }
    
    /* Buttons */
    .btn {
        font-size: 12px;
        padding: 10px 16px;
    }
    
    /* Form Inputs */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 13px;
    }
    
    /* Product Grid - Single Column */
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    /* Modal */
    .modal {
        width: 98%;
        margin: 5px;
        max-height: 95vh;
    }
    
    /* Cart Items */
    .cart-item {
        padding: 12px;
    }
    
    /* Status Labels */
    .status-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* Tablet Styles (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .content-page {
        padding: 20px 15px;
    }
}

/* Small Mobile Styles (360px - 374px) */
@media (max-width: 374px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .top-bar h1 {
        font-size: 13px;
    }
    
    .btn {
        font-size: 11px;
        padding: 10px 14px;
    }
    
    .sidebar {
        width: 260px;
    }
}

/* Large Desktop Optimizations (1400px+) */
@media (min-width: 1400px) {
    .app-container {
        max-width: 1600px;
        margin: 0 auto;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Touch-friendly optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 48px;
    }
    
    .btn-sm {
        min-height: 40px;
    }
    
    .data-table tr {
        min-height: 48px;
    }
    
    .nav-link {
        padding: 15px 20px;
    }
    
    .sidebar-nav ul li a {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .top-bar,
    .page-actions,
    .btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-page {
        padding: 0;
    }
    
    .data-table {
        border: 1px solid var(--gray-300);
    }
    
    .data-table th,
    .data-table td {
        border: 1px solid var(--gray-300);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-page {
    animation: fadeIn 0.3s ease;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-600);
}

/* Card Styles */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

/* Calculation Info */
.calculation-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: var(--gray-100);
    border-radius: var(--radius);
}

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

.calculation-info label {
    font-weight: 600;
    color: var(--gray-600);
}

.calculation-info span {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Search Box */
.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Struk Styles */
.struk-container {
    background: white;
    padding: 20px;
    border: 2px dashed var(--gray-300);
    font-family: 'Courier New', monospace;
    max-width: 300px;
    margin: 0 auto;
}

.struk-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px dashed var(--gray-300);
    padding-bottom: 10px;
}

.struk-header h2 {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--gray-800);
}

.struk-header p {
    font-size: 12px;
    color: var(--gray-600);
}

.struk-header .toko-info {
    font-size: 11px;
    margin: 3px 0;
    color: var(--gray-500);
}

.struk-body p {
    margin: 8px 0;
    font-size: 13px;
}

.struk-body .total {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 2px dashed var(--gray-300);
    font-size: 16px;
    font-weight: bold;
}

.struk-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 2px dashed var(--gray-300);
}

.struk-footer p {
    font-size: 12px;
    color: var(--gray-600);
}

/* Sparepart Item in Service */
.sparepart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.sparepart-item span {
    font-size: 14px;
}

/* Report Styles */
.laporan-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.laporan-filters h3 {
    grid-column: 1 / -1;
    margin-bottom: 10px;
}

.laporan-section {
    margin-bottom: 30px;
}

.laporan-section h3 {
    margin-bottom: 15px;
    color: var(--gray-800);
    font-size: 18px;
}

.laporan-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.laporan-summary-item {
    background: var(--gray-100);
    padding: 15px;
    border-radius: var(--radius);
    text-align: center;
}

.laporan-summary-item label {
    display: block;
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 5px;
}

.laporan-summary-item span {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Best Products List */
.best-products {
    margin-top: 20px;
}

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

.best-products th,
.best-products td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.best-products th {
    background: var(--primary-color);
    color: var(--white);
}

/* Responsive adjustments for new features */
@media (max-width: 768px) {
    .calculation-info {
        grid-template-columns: 1fr;
    }
    
    .laporan-filters {
        grid-template-columns: 1fr;
    }
    
    .struk-container {
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    /* Hide non-printable elements */
    .sidebar,
    .menu-toggle,
    .top-bar,
    .laporan-filters button,
    .btn,
    .modal,
    .modal-overlay,
    .form-actions,
    .nav-link,
    #logout-btn,
    .page-actions {
        display: none !important;
    }
    
    /* Ensure main content is visible */
    .main-content {
        margin: 0;
        padding: 0;
        width: 100%;
    }
    
    /* Report content styling */
    .laporan-content {
        background: white;
        padding: 20px;
        margin: 0;
        box-shadow: none;
    }
    
    .laporan-section {
        page-break-inside: avoid;
        margin-bottom: 30px;
        padding: 15px;
        border: 1px solid #ddd;
        background: white;
    }
    
    .laporan-summary {
        display: flex;
        justify-content: space-between;
        gap: 20px;
        margin-bottom: 15px;
    }
    
    .laporan-summary-item {
        flex: 1;
        padding: 10px;
        background: #f9f9f9;
        border: 1px solid #eee;
    }
    
    .laporan-summary-item label {
        display: block;
        font-weight: bold;
        color: #333;
        margin-bottom: 5px;
    }
    
    .laporan-summary-item span {
        font-size: 14px;
        color: #666;
    }
    
    /* Table styling for print */
    .data-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 10px;
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }
    
    .data-table th {
        background: #f5f5f5;
        font-weight: bold;
    }
    
    /* Badge styling for print */
    .badge {
        padding: 2px 8px;
        border-radius: 3px;
        font-size: 11px;
    }
    
    .badge-success {
        background: #d4edda;
        color: #155724;
    }
    
    .badge-warning {
        background: #fff3cd;
        color: #856404;
    }
    
    .badge-danger {
        background: #f8d7da;
        color: #721c24;
    }
    
    .badge-info {
        background: #d1ecf1;
        color: #0c5460;
    }
    
    /* Heading styling */
    .laporan-content h2 {
        color: #333;
        border-bottom: 2px solid #333;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }
    
    .laporan-section h3 {
        color: #333;
        border-bottom: 1px solid #ddd;
        padding-bottom: 8px;
        margin-bottom: 15px;
    }
    
    .best-products h4 {
        color: #333;
        margin: 15px 0 10px 0;
    }
    
    /* Ensure text is readable */
    body {
        font-size: 12px;
        color: #000;
        background: white;
    }
    
    /* Remove shadows and backgrounds */
    .card,
    .stat-card {
        box-shadow: none;
        background: white;
        border: 1px solid #ddd;
    }
}

/* Product Tabs */
.product-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
}

.tab-btn {
    padding: 10px 20px;
    background: var(--light-gray);
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    border-radius: 5px 5px 0 0;
}

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

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cart Section */
.cart-section {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.cart-section h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

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

.transaction-type-section {
    padding: 15px;
    background: var(--light-gray);
    border-radius: 8px;
    margin-bottom: 15px;
}

.transaction-type-section h4 {
    margin-bottom: 15px;
    color: var(--text-color);
}
/* Pengaturan Toko Page */
.pengaturan-toko-container {
    padding: 20px;
}

.pengaturan-toko-container .page-header {
    margin-bottom: 20px;
}

.pengaturan-toko-container .page-header h2 {
    margin: 0;
    color: var(--primary-color);
}

.pengaturan-toko-container .page-header p {
    margin: 5px 0 0;
    color: var(--gray);
}

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

.pengaturan-toko-container .card-body {
    padding: 20px;
}

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

.pengaturan-toko-container .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.pengaturan-toko-container .form-group input,
.pengaturan-toko-container .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.pengaturan-toko-container .form-group input:focus,
.pengaturan-toko-container .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.pengaturan-toko-container .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.pengaturan-toko-container .form-actions {
    margin-top: 20px;
}

.pengaturan-toko-container .form-actions .btn {
    min-width: 150px;
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.chart-container {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
}

.chart-header {
    margin-bottom: 15px;
}

.chart-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.chart-body {
    position: relative;
    height: 300px;
}

.chart-body canvas {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 768px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .chart-body {
        height: 250px;
    }
}

/* Notification Panel */
.notification-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-item {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 15px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid var(--gray);
}

.notification-item.notification-warning {
    border-left-color: #f59e0b;
}

.notification-item.notification-danger {
    border-left-color: #ef4444;
}

.notification-item.notification-info {
    border-left-color: #3b82f6;
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.notification-icon {
    font-size: 20px;
}

.notification-title {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--gray);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.notification-close:hover {
    background: var(--light-gray);
}

.notification-details {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 8px;
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: var(--gray-500);
    text-align: right;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .notification-panel {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
}

/* Laporan Bulanan Page */
.laporan-bulanan-container {
    padding: 20px;
}

.laporan-bulanan-container .page-header {
    margin-bottom: 30px;
}

.laporan-bulanan-container .page-header h2 {
    margin: 0;
    color: var(--primary-color);
}

.laporan-bulanan-container .page-header p {
    margin: 5px 0 0;
    color: var(--gray);
}

.monthly-filter-section {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.monthly-filter-section .form-group {
    flex: 1;
    margin: 0;
}

.monthly-summary-section,
.comparison-section,
.category-breakdown-section,
.trend-chart-section {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.monthly-summary-section h3,
.comparison-section h3,
.category-breakdown-section h3,
.trend-chart-section h3 {
    margin: 0 0 20px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.comparison-card {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.comparison-card h4 {
    margin: 0 0 10px;
    color: var(--gray-600);
    font-size: 14px;
}

.comparison-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color);
    margin: 10px 0;
}

.comparison-change {
    font-size: 16px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
}

.comparison-change.positive {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.comparison-change.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: var(--white);
    padding: 20px;
    border-radius: 8px;
}

.category-card h4 {
    margin: 0 0 15px;
    font-size: 16px;
}

.category-card p:first-of-type {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 5px;
}

.category-card p:last-child {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
}

.stat-change {
    font-size: 13px;
    margin-top: 5px;
}

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

.stat-change.negative {
    color: #ef4444;
}

.stat-warning {
    color: #f59e0b;
    font-size: 13px;
    margin-top: 5px;
}

.trend-chart-section .chart-container {
    height: 300px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .monthly-filter-section {
        flex-direction: column;
    }
    
    .monthly-filter-section .form-group {
        width: 100%;
    }
    
    .comparison-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }
}
