/* General Body Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    min-height: 100vh;
    /* Ensure full viewport height */
}

/* Login Container */
.login-container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 350px;
    max-width: 90%;
    text-align: center;
    margin: auto;
    /* Center login form */
}

.login-container h2 {
    color: #4dabf7;
    margin-bottom: 25px;
}

/* Form Group Styles */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: calc(100% - 20px);
    /* Adjust for padding */
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4dabf7;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(77, 171, 247, 0.25);
}

/* Button Styles */
button,
.button {
    background-color: #4dabf7;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    width: 100%;
    /* Make buttons full width by default */
    box-sizing: border-box;
    text-decoration: none;
    /* For button-like links */
    display: inline-block;
    /* For button-like links */
    text-align: center;
}

button:hover,
.button:hover {
    background-color: #3b93dd;
}

button.danger,
.button.danger {
    background-color: #dc3545;
}

button.danger:hover,
.button.danger:hover {
    background-color: #c82333;
}

button.success,
.button.success {
    background-color: #28a745;
}

button.success:hover,
.button.success:hover {
    background-color: #218838;
}

/* Error/Success Messages */
.error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.success-message {
    color: #28a745;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Sidebar Navigation */
.sidebar {
    width: 250px;
    background-color: #4dabf7;
    /* Solfi Brand Blue */
    color: white;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    /* Prevent sidebar from shrinking */
}

.sidebar .brand-logo {
    text-align: center;
    margin-bottom: 30px;
    color: #ffffff;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    /* Sans-serif font */
    font-size: 2.5em;
    /* Larger logo text */
    font-weight: bold;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
    text-transform: lowercase;
    /* solfi is lowercase */
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    display: block;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, padding-left 0.3s ease;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background-color: rgba(255, 255, 255, 0.2);
    /* Semi-transparent white for active/hover */
    padding-left: 20px;
}

/* Main Content Area */
.content {
    flex-grow: 1;
    /* Allow content to take remaining space */
    padding: 20px 30px;
    background-color: #f0f2f5;
    overflow-y: auto;
    /* Enable scrolling for long content */
}

.content h2 {
    color: #4dabf7;
    margin-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.content p {
    line-height: 1.6;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    /* For rounded corners */
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

table th {
    background-color: #4dabf7;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

table tr:nth-child(even) {
    background-color: #f8f9fa;
}

table tr:hover {
    background-color: #e2e6ea;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-buttons a,
.action-buttons button {
    padding: 8px 12px;
    font-size: 0.9em;
    border-radius: 4px;
    text-decoration: none;
    width: auto;
    /* Override full width for individual buttons */
}

/* Specific POS styles */
.pos-layout {
    display: flex;
    gap: 20px;
}

.pos-menu-selection {
    flex: 2;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.pos-cart {
    flex: 1;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.menu-item-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: #fdfdfd;
}

.menu-item-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
    transform: translateY(-3px);
    border-color: #4dabf7;
}

.menu-item-card h4 {
    margin-top: 0;
    margin-bottom: 5px;
    color: #333;
}

.menu-item-card p {
    font-weight: bold;
    color: #4dabf7;
    font-size: 1.1em;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-name {
    font-weight: bold;
}

.cart-item-qty input {
    width: 50px;
    text-align: center;
    margin: 0 5px;
}

.cart-total {
    margin-top: 20px;
    font-size: 1.3em;
    font-weight: bold;
    text-align: right;
    color: #28a745;
}

.payment-section {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* Laporan styles */
.report-filters {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.report-filters .form-group {
    flex: 1;
    margin-bottom: 0;
}

.sidebar ul li.separator {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 15px 0;
    padding: 0;
}

/* Laporan Keuangan Summary Cards */
.summary-cards {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    /* Allow cards to wrap on smaller screens */
}

.summary-cards .card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 25px;
    text-align: center;
    flex: 1;
    /* Allow cards to take equal space */
    min-width: 220px;
    /* Minimum width before wrapping */
}

.summary-cards .card h4 {
    margin-top: 0;
    color: #555;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.summary-cards .card .amount {
    font-size: 2em;
    font-weight: bold;
    color: #333;
}

.summary-cards .card.revenue .amount {
    color: #28a745;
    /* Green for revenue */
}

.summary-cards .card.expense .amount {
    color: #dc3545;
    /* Red for expenses */
}

.summary-cards .card.profit {
    border: 2px solid #28a745;
}

.summary-cards .card.loss {
    border: 2px solid #dc3545;
}

.summary-cards .card.profit .amount {
    color: #28a745;
}

.summary-cards .card.loss .amount {
    color: #dc3545;
}


/* Tabbed Interface for Details */
.tab-container {
    display: flex;
    margin-top: 30px;
    /* margin-bottom: 20px; */
    border-bottom: 2px solid #e9ecef;
}

.tab-button {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    color: #000;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    margin-right: 5px;
    transition: all 0.2s ease;
}

.tab-button:hover:not(.active) {
    background-color: #e2e6ea;
}

.tab-button.active {
    background-color: #fff;
    background-color: #fff;
    border-color: #4dabf7;
    border-bottom: 2px solid #fff;
    /* Hide bottom border to merge with content */
    color: #4dabf7;
}

.tab-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: none;
    /* Hidden by default */
}

.tab-content.active {
    display: block;
    /* Show active tab */
}

/* Sidebar Separator */
.sidebar ul li.separator {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 15px 0;
    padding: 0;
}

/* Export Button Styling */
.export-button {
    float: right;
    margin-top: -5px;
    margin-right: 5px;
    font-size: 0.9em;
    padding: 6px 12px;
}

h4 {
    /* Pastikan h4 memiliki cukup ruang */
    margin-bottom: 15px;
}

/* Clearfix for h4 with float */
h4::after {
    content: "";
    display: table;
    clear: both;
}

/* Optional: Make number formats in tables align right */
table td:nth-child(even),
table td:nth-child(odd):not(:nth-child(1), :nth-child(2), :nth-child(3)) {
    text-align: left;
}

/* Specific alignment for 'Detail Item Terjual' column */
#tab-penjualan table td:nth-child(4) {
    text-align: left;
    /* Ensure text is left-aligned for better readability */
}

/* Styling for Low Stock Alert on Dashboard */
.low-stock-alert {
    background-color: #ffe0b2;
    /* Light orange background */
    border: 1px solid #ff9800;
    /* Orange border */
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.low-stock-alert h3 {
    color: #d35400;
    /* Darker orange for heading */
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 1.3em;
}

.low-stock-alert h3 i {
    margin-right: 10px;
    color: #e67e22;
    /* Icon color */
}

.low-stock-alert p {
    margin-bottom: 10px;
    color: #555;
}

.low-stock-alert table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.low-stock-alert table th,
.low-stock-alert table td {
    border: 1px solid #ffcc80;
    /* Lighter orange border for table cells */
    padding: 10px;
    text-align: left;
}

.low-stock-alert table th {
    background-color: #ffb74d;
    /* Medium orange for table header */
    color: #fff;
    font-weight: bold;
}

.low-stock-alert .low-stock-item {
    background-color: #fff3e0;
    /* Very light orange for low stock rows */
}

.low-stock-alert .low-stock-item td {
    color: #c0392b;
    /* Reddish text for critical items */
    font-weight: bold;
}

/* POS Page Specific Styles */
.pos-container {
    display: flex;
    gap: 25px;
    /* Space between menu selection and cart summary */
    flex-wrap: wrap;
    /* Allow wrapping on smaller screens */
}

.menu-selection {
    flex: 2;
    /* Takes more space */
    min-width: 400px;
    /* Minimum width before wrapping */
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.menu-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    /* Responsive grid for menu items */
    gap: 15px;
    margin-top: 20px;
    max-height: 600px;
    /* Batasi tinggi daftar menu */
    overflow-y: auto;
    /* Aktifkan scroll jika melebihi tinggi */
    padding-right: 10px;
    /* Ruang untuk scrollbar */
}

.menu-item.card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
}

.menu-item.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.menu-item .card-body {
    padding: 15px;
    text-align: center;
}

.menu-item .card-title {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
}

.menu-item .card-text {
    color: #555;
    font-size: 0.95em;
    margin-bottom: 15px;
}

.quantity-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.quantity-controls .btn {
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
    padding: 0;
    /* Remove default padding */
}

.item-quantity-display {
    min-width: 30px;
    text-align: center;
    font-size: 1em;
    padding: 5px 8px;
    border-radius: 5px;
    background-color: #6c757d;
    /* Bootstrap secondary color */
    color: #fff;
}

.item-quantity-display.bg-primary {
    /* Class added by JS when quantity > 0 */
    background-color: #4dabf7 !important;
    /* Solfi blue */
}


.cart-summary {
    flex: 1;
    /* Takes less space */
    min-width: 300px;
    /* Minimum width before wrapping */
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.cart-items {
    flex-grow: 1;
    /* Allow cart items to take available space */
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 15px;
    min-height: 150px;
    /* Minimum height for cart display */
    max-height: 400px;
    /* Max height for scrolling if many items */
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item {
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
    font-size: 1em;
    color: #333;
    display: flex;
    justify-content: space-between;
    /* To align price to the right if needed */
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-total h4 {
    text-align: right;
    font-size: 1.4em;
    color: #28a745;
    /* Green for total */
    margin-bottom: 15px;
}

.payment-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: auto;
    /* Push payment section to the bottom */
}

.payment-section .form-label {
    font-weight: bold;
}

.payment-section .btn {
    padding: 10px 15px;
    font-size: 1.1em;
}