* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #ffe6f2, #ffb6c1, #ff69b4);
    color: #333;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

h1 {
    font-size: 28px;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
}

header nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

header nav button {
    background: rgba(255, 255, 255, 0.9);
    color: #ff1493;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

header nav button:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.tabs {
    display: flex;
    background: linear-gradient(135deg, #ffb6c1, #ff91a4);
    border-bottom: 1px solid #ff91a4;
}

.tab {
    padding: 15px 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

.tab.active {
    background: linear-gradient(135deg, #ff1493, #ff69b4);
    color: white;
    box-shadow: inset 0 -3px 0 rgba(255,255,255,0.5);
}

.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

.section-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ffb6c1;
    color: #ff1493;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}

/* Styling untuk Kasir */
.main-content {
    display: flex;
    min-height: 500px;
    gap: 20px;
}

.products-section {
    flex: 3;
    padding: 15px;
    border-right: 2px dashed #ffb6c1;
    display: flex;
    flex-direction: column;
}

.cart-section {
    flex: 2;
    padding: 15px;
    background: linear-gradient(135deg, #fff5f7, #ffe6f2);
    display: flex;
    flex-direction: column;
    border-radius: 10px;
}

.search-container {
    margin-bottom: 15px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: 2px solid #ffb6c1;
    border-radius: 25px;
    font-size: 14px;
    background: #fff;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #ff1493;
    box-shadow: 0 0 10px rgba(255, 20, 147, 0.2);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff1493;
    font-size: 16px;
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.category {
    background: linear-gradient(135deg, #ffb6c1, #ff91a4);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.category.active {
    background: linear-gradient(135deg, #ff1493, #ff69b4);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 20, 147, 0.3);
}

.products-container {
    flex: 1;
    overflow-y: auto;
    border: 2px solid #ffb6c1;
    border-radius: 10px;
    padding: 15px;
    background: #fff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.product-card {
    border: 2px solid #ffe6f2;
    border-radius: 12px;
    padding: 15px;
    background: linear-gradient(135deg, #fff, #fff5f7);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.3);
    border-color: #ff91a4;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
}

.product-image {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #ffe6f2, #ffb6c1);
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.product-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #ff1493;
    font-size: 14px;
}

.product-price {
    color: #d35400;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 16px;
}

.product-discount {
    color: #27ae60;
    font-size: 12px;
    margin-bottom: 5px;
    font-weight: bold;
}

.product-stock {
    font-size: 11px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.add-button {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

.add-button:hover {
    background: linear-gradient(135deg, #ff1493, #ff69b4);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 20, 147, 0.3);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 2px solid #ffb6c1;
    border-radius: 10px;
    padding: 15px;
    min-height: 200px;
    background: #fff;
}

.cart-empty {
    text-align: center;
    color: #7f8c8d;
    padding: 40px 20px;
    font-style: italic;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ffe6f2;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    margin-bottom: 3px;
    color: #ff1493;
}

.cart-item-price {
    color: #d35400;
    font-size: 14px;
    font-weight: bold;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 2px solid #ffb6c1;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    color: #ff1493;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #ffb6c1;
    color: white;
}

.customer-input {
    margin-bottom: 15px;
}

.customer-input input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ffb6c1;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
}

.customer-input input:focus {
    outline: none;
    border-color: #ff1493;
    box-shadow: 0 0 10px rgba(255, 20, 147, 0.2);
}

.total-section {
    background: linear-gradient(135deg, #ffb6c1, #ff91a4);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

.total-label {
    font-size: 16px;
    margin-bottom: 5px;
}

.total-amount {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
}

.payment-input {
    margin-bottom: 15px;
}

.payment-input input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ffb6c1;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
}

.payment-input input:focus {
    outline: none;
    border-color: #ff1493;
    box-shadow: 0 0 10px rgba(255, 20, 147, 0.2);
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.pay-button, .print-button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

.pay-button {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.pay-button:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.print-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.print-button:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.quick-actions {
    display: flex;
    gap: 10px;
}

.quick-action {
    flex: 1;
    background: linear-gradient(135deg, #ffb6c1, #ff91a4);
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.quick-action:hover {
    background: linear-gradient(135deg, #ff91a4, #ffb6c1);
    transform: translateY(-2px);
}

/* Styling untuk Admin */
.admin-panel-full {
    padding: 20px;
}

.product-form {
    background: linear-gradient(135deg, #fff5f7, #ffe6f2);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 2px solid #ffb6c1;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #ff1493;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ffb6c1;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #ff1493;
    box-shadow: 0 0 10px rgba(255, 20, 147, 0.2);
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff1493, #ff69b4);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 20, 147, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #95a5a6);
    transform: translateY(-2px);
}

.products-list {
    margin-top: 20px;
}

.product-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #ffb6c1;
    border-radius: 10px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff, #fff5f7);
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 105, 180, 0.2);
}

.product-item-image {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ffe6f2, #ffb6c1);
    border-radius: 8px;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.product-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.product-item-info {
    flex: 1;
}

.product-item-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #ff1493;
    font-size: 16px;
}

.product-item-price {
    color: #d35400;
    font-weight: bold;
    margin-bottom: 3px;
}

.product-item-actions {
    display: flex;
    gap: 10px;
}

.btn-edit, .btn-delete {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-edit {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: translateY(-2px);
}

.btn-delete {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    transform: translateY(-2px);
}

/* Admin Panel Toggle */
.admin-panel {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #ffb6c1;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
}

.admin-panel.hidden, .receipt.hidden {
    display: none;
}

.admin-product {
    display: flex;
    align-items: center;
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #ffb6c1;
}

.admin-product img {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    border-radius: 6px;
    object-fit: cover;
}

.admin-product input {
    margin-right: 15px;
    padding: 8px;
    border: 1px solid #ffb6c1;
    border-radius: 5px;
    flex: 1;
}

.admin-product button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

/* Receipt Styling */
.receipt {
    background: white;
    padding: 20px;
    max-width: 300px;
    margin: 20px auto;
    border: 2px solid #ff1493;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px dashed #ff1493;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.receipt-header h2 {
    color: #ff1493;
    margin-bottom: 5px;
}

.receipt-info p {
    margin: 5px 0;
    font-size: 14px;
}

.receipt-items {
    margin: 15px 0;
}

.receipt-items ul {
    list-style: none;
    padding: 0;
}

.receipt-items li {
    padding: 5px 0;
    border-bottom: 1px dashed #ffb6c1;
    font-size: 14px;
}

.receipt-total {
    text-align: right;
    font-weight: bold;
    font-size: 18px;
    color: #ff1493;
    margin: 15px 0;
    padding-top: 10px;
    border-top: 2px dashed #ff1493;
}

.receipt-footer {
    text-align: center;
    font-style: italic;
    color: #7f8c8d;
    margin-top: 15px;
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    #receipt, #receipt * {
        visibility: visible;
    }
    #receipt {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: none;
        box-shadow: none;
    }
}

/* Perbaikan tambahan untuk print */
@media print and (max-width: 1024px) {
    #receipt {
        font-size: 16px !important;
        padding: 15px !important;
    }
    
    .receipt-header h2 {
        font-size: 22px !important;
    }
    
    .receipt-items li {
        font-size: 14px !important;
        padding: 8px 0 !important;
    }
}

/* History Transaksi Styles - TAMBAHAN BARU */
.history-panel {
    padding: 20px;
}

.history-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-select, .date-input {
    padding: 10px;
    border: 2px solid #ffb6c1;
    border-radius: 8px;
    background: white;
    color: #333;
}

.custom-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.custom-range.hidden {
    display: none;
}

.history-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-card {
    background: linear-gradient(135deg, #fff5f7, #ffe6f2);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #ffb6c1;
}

.summary-card h3 {
    color: #ff1493;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-card span {
    font-size: 20px;
    font-weight: bold;
    color: #d35400;
}

.transactions-list {
    max-height: 500px;
    overflow-y: auto;
}

.transaction-item {
    background: linear-gradient(135deg, #fff, #fff5f7);
    border: 2px solid #ffb6c1;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.transaction-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.2);
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ffb6c1;
}

.transaction-id {
    font-weight: bold;
    color: #ff1493;
}

.transaction-date {
    color: #7f8c8d;
    font-size: 12px;
}

.transaction-customer {
    color: #333;
    font-style: italic;
}

.transaction-details {
    margin: 10px 0;
}

.transaction-items {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.transaction-total {
    font-weight: bold;
    color: #d35400;
    text-align: right;
}

.transaction-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .products-section {
        border-right: none;
        border-bottom: 2px dashed #ffb6c1;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    header nav {
        flex-direction: column;
        align-items: center;
    }
    
    header nav button {
        width: 100%;
        margin: 5px 0;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab {
        text-align: center;
    }
    
    .history-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .custom-range {
        flex-direction: column;
    }
    
    .history-summary {
        grid-template-columns: 1fr;
    }
}
/* Perbaikan Struk untuk Print */
.receipt {
    background: white;
    padding: 20px;
    max-width: 300px;
    margin: 20px auto;
    border: 2px solid #ff1493;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
}

/* Print Styles yang Lebih Baik */
@media print {
    body * {
        visibility: hidden;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    #receipt, #receipt * {
        visibility: visible !important;
    }
    
    #receipt {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: white !important;
        margin: 0 !important;
        padding: 20px !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        font-size: 16px !important;
        font-family: 'Courier New', monospace !important;
    }
    
    .receipt-header {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .receipt-header h2 {
        font-size: 24px !important;
        margin-bottom: 10px;
    }
    
    .receipt-items li {
        padding: 8px 0;
        border-bottom: 1px dashed #ccc;
    }
    
    .receipt-total {
        font-size: 18px !important;
        margin-top: 20px;
        padding-top: 15px;
    }
    
    /* Sembunyikan elemen lain */
    .container, header, .tabs, .main-content, 
    .products-section, .cart-section, .admin-panel {
        display: none !important;
    }
}

/* Untuk tablet dan mobile */
@media print and (max-width: 1024px) {
    #receipt {
        font-size: 18px !important;
        padding: 15px !important;
    }
    
    .receipt-header h2 {
        font-size: 22px !important;
    }
    
    .receipt-items li {
        font-size: 16px !important;
        padding: 10px 0 !important;
    }
    
    .receipt-total {
        font-size: 20px !important;
    }
}

/* Pastikan struk selalu terlihat saat print */
.receipt.hidden {
    display: none;
}

@media print {
    .receipt.hidden {
        display: block !important;
    }
}

/* Tambahan untuk input harga di keranjang */
.cart-item-price-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cart-item-price-input {
    width: 120px;
    padding: 5px;
    border: 1px solid #ffb6c1;
    border-radius: 4px;
    font-size: 12px;
}

.cart-item-discount-note {
    font-size: 11px;
    color: #27ae60;
    font-style: italic;
}