/* Auth View */
.auth-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background-color: var(--apple-interface-background);
}
#login-form-container, #register-form-container {
    background-color: var(--apple-modal-background);
    padding: 40px 45px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
}
.progress-indicator { display: flex; justify-content: center; margin-bottom: 30px; }
.progress-dot { width: 10px; height: 10px; border-radius: 50%; background-color: #D1D1D6; margin: 0 5px; }
.progress-dot.active { background-color: var(--primary-color); transform: scale(1.2); }
.multi-step-form .form-step { display: none; animation: stepFadeIn 0.4s ease-out forwards; opacity: 0; }
.multi-step-form .form-step.active-step { display: block; }
@keyframes stepFadeIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* Product List & Cards */
#products-display-area, #current-sale-items-list, #dashboard-view ul { list-style: none; padding: 0; margin-bottom: 20px; }
.product-item, #current-sale-items-list li, #dashboard-view li {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.product-item { display: flex; gap: 16px; align-items: flex-start; }
.product-thumbnail-container { width: 80px; height: 80px; flex-shrink: 0; border-radius: var(--border-radius-sm); overflow: hidden; background-color: var(--light-grey); }
.product-thumbnail-container img { width: 100%; height: 100%; object-fit: cover; }
.product-thumbnail-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2em; color: var(--border-color); }
.product-details-content { flex-grow: 1; display: flex; flex-direction: column; }
.product-actions { margin-top: 12px; display: flex; gap: 8px; }
.product-actions button { background: none; border: 1px solid var(--primary-color); color: var(--primary-color); padding: 6px 10px; border-radius: var(--border-radius-sm); cursor: pointer; }
.product-actions button:hover { background-color: var(--primary-color); color: #fff; }
.product-actions button.delete-btn { border-color: var(--danger-color); color: var(--danger-color); }
.product-actions button.delete-btn:hover { background-color: var(--danger-color); color: #fff; }

/* Camera View */
.camera-container { margin-top: 12px; border: 1px solid var(--border-color); border-radius: var(--border-radius-md); padding: 10px; background-color: #000; display: flex; flex-direction: column; align-items: center; }
#camera-stream { width: 100%; max-width: 400px; height: auto; border-radius: var(--border-radius-sm); margin-bottom: 10px; }
.input-with-button { display: flex; align-items: center; gap: 8px; }
.input-with-button input[type="date"] { flex-grow: 1; }
.ocr-spinner { display: inline-block; margin-left: 8px; font-size: 1.2em; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Sales Suggestions & Current Sale */
#sales-product-suggestions-list li { padding: 12px 15px; cursor: pointer; border-bottom: 1px solid var(--light-grey); font-size: 0.95em; color: var(--secondary-color); }
#sales-product-suggestions-list li:hover { background-color: var(--light-grey); color: var(--primary-color); }
#current-sale-items-list li { display: flex; justify-content: space-between; align-items: center; }
#current-sale-total { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-color); text-align: right; font-size: 1.2em; }

/* Dashboard & Alerts */
#dashboard-view > div { background-color: var(--surface-color); padding: 16px; border-radius: var(--border-radius-md); box-shadow: var(--shadow-md); margin-bottom: 24px; }
.view-all-btn { display: block; margin: 20px auto 5px; padding: 10px 20px; font-size: 0.95em; text-align: center; border: 1px solid var(--primary-color); color: var(--primary-color); background-color: transparent; border-radius: var(--border-radius-md); cursor: pointer; width: calc(100% - 10px); max-width: 280px; }
.view-all-btn:hover { background-color: var(--primary-color); color: #fff; }

#dashboard-view #inventory-list-summary li { position: relative; padding-left: 18px; }
#dashboard-view #inventory-list-summary li::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background-color: var(--inventory-item-color); border-radius: var(--border-radius-md) 0 0 var(--border-radius-md); }

#all-expiry-alert-list li, #all-restock-alert-list li, #dashboard-view #expiry-alert-list-summary li, #dashboard-view #restock-alert-list-summary li {
    background-color: var(--surface-color); border: 1px solid var(--border-color); border-left-width: 5px; border-radius: var(--border-radius-sm); padding: 12px 15px 12px 40px; margin-bottom: 10px; position: relative;
}
.nearing-expiry { border-left-color: var(--alert-expiry-warning-color) !important; color: #543800; }
.nearing-expiry::before { content: '⏳'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); }
.expired-item { border-left-color: var(--alert-expiry-critical-color) !important; background-color: #fff5f5; color: var(--danger-color); }
.expired-item::before { content: '❗'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); }
.low-stock { border-left-color: var(--alert-restock-color) !important; color: #664d03; }
.low-stock::before { content: '📦'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); }

/* Transactions */
.view-header { display: flex; align-items: center; padding: 10px 15px; background-color: var(--surface-color); border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.view-header .back-button { background: none; border: none; font-size: 1.8em; color: var(--primary-color); cursor: pointer; margin-right: 15px; }
.filters-container { display: flex; gap: 15px; margin: 0 10px 20px 10px; padding: 15px; background-color: var(--surface-color); border-radius: var(--border-radius-md); box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; flex: 1; min-width: 150px; }

#all-transaction-list-area li, #dashboard-view #transaction-list li { position: relative; padding: 12px 15px 12px 18px; margin-bottom: 12px; border: 1px solid var(--border-color); border-radius: var(--border-radius-md); background: var(--surface-color); display: flex; flex-direction: column; cursor: pointer; }
#all-transaction-list-area li::before, #dashboard-view #transaction-list li::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background-color: var(--text-color-light); border-radius: var(--border-radius-md) 0 0 var(--border-radius-md); }
.transaction-sale::before { background-color: var(--transaction-sale-color) !important; }
.transaction-product-add::before { background-color: var(--transaction-add-color) !important; }
.transaction-product-update::before { background-color: var(--transaction-update-color) !important; }
.transaction-product-delete::before { background-color: var(--transaction-delete-color) !important; }

/* Receipt Modal Slide-In */
#receipt-modal { justify-content: flex-start; align-items: stretch; background-color: transparent; }
#receipt-modal .modal-content.large-modal { width: 380px; max-width: 90vw; height: 100vh; max-height: 100vh; border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0; margin: 0; padding: 20px; transform: translateX(-100%); transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1); }
#receipt-modal.is-open .modal-content.large-modal { transform: translateX(0); }
#qr-code-container { margin: 15px auto; width: 110px; height: 110px; border: 1px solid var(--border-color); padding: 5px; background: white; }

/* Announcements */
.announcement-list-item { background-color: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--border-radius-md); padding: 15px; margin-bottom: 12px; cursor: pointer; }
.announcement-list-item.unread { border-left: 4px solid var(--primary-color); }
.announcement-list-item.unread h4 { color: var(--primary-color); font-weight: 600; }
