2095 lines
36 KiB
CSS
2095 lines
36 KiB
CSS
/* ===== CSS VARIABLES & RESET ===== */
|
|
:root {
|
|
--primary: #2d5016;
|
|
--primary-light: #4a7c28;
|
|
--primary-dark: #1a3009;
|
|
--success: #16a34a;
|
|
--success-light: #22c55e;
|
|
--danger: #dc2626;
|
|
--danger-light: #ef4444;
|
|
--warning: #f59e0b;
|
|
--warning-light: #fbbf24;
|
|
--accent: #7c3aed;
|
|
--accent-light: #8b5cf6;
|
|
--bg: #f0f4e8;
|
|
--bg-card: #ffffff;
|
|
--bg-dark: #1a1a2e;
|
|
--text: #1a1a1a;
|
|
--text-light: #6b7280;
|
|
--text-muted: #9ca3af;
|
|
--border: #e5e7eb;
|
|
--shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
--shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
|
|
--radius: 16px;
|
|
--radius-sm: 10px;
|
|
--nav-height: 70px;
|
|
--header-height: 56px;
|
|
}
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
min-height: 100vh;
|
|
overflow-x: hidden;
|
|
padding-top: var(--header-height);
|
|
padding-bottom: var(--nav-height);
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
/* ===== HEADER ===== */
|
|
.app-header {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: var(--header-height);
|
|
background: linear-gradient(135deg, var(--primary), var(--primary-light));
|
|
color: white;
|
|
z-index: 100;
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 16px;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.header-content {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
width: 100%;
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.header-title {
|
|
font-size: 1.3rem;
|
|
font-weight: 700;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.header-btn {
|
|
background: rgba(255,255,255,0.2);
|
|
border: none;
|
|
color: white;
|
|
font-size: 1.3rem;
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.header-btn:active {
|
|
background: rgba(255,255,255,0.4);
|
|
}
|
|
|
|
.header-scan-btn {
|
|
background: rgba(255,255,255,0.25);
|
|
border: 2px solid rgba(255,255,255,0.5);
|
|
color: white;
|
|
font-size: 1.5rem;
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.2s;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
|
|
animation: pulse-scan 2s ease-in-out infinite;
|
|
}
|
|
|
|
.header-scan-btn:active {
|
|
transform: scale(0.9);
|
|
background: rgba(255,255,255,0.4);
|
|
}
|
|
|
|
@keyframes pulse-scan {
|
|
0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
|
|
50% { box-shadow: 0 2px 16px rgba(255,255,255,0.4); }
|
|
}
|
|
|
|
/* ===== MAIN CONTENT ===== */
|
|
.app-content {
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
padding: 12px;
|
|
min-height: calc(100vh - var(--header-height) - var(--nav-height));
|
|
}
|
|
|
|
/* ===== PAGE MANAGEMENT ===== */
|
|
.page {
|
|
display: none;
|
|
animation: fadeIn 0.2s ease;
|
|
}
|
|
|
|
.page.active {
|
|
display: block;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(8px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
/* ===== PAGE HEADER ===== */
|
|
.page-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-bottom: 16px;
|
|
padding-bottom: 12px;
|
|
border-bottom: 2px solid var(--border);
|
|
}
|
|
|
|
.page-header h2 {
|
|
font-size: 1.2rem;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.back-btn {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
padding: 8px 14px;
|
|
font-size: 0.95rem;
|
|
color: var(--primary);
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.back-btn:active {
|
|
background: var(--border);
|
|
}
|
|
|
|
/* ===== DASHBOARD ===== */
|
|
.dashboard-stats {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 12px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.stat-card {
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius);
|
|
padding: 16px;
|
|
text-align: center;
|
|
box-shadow: var(--shadow);
|
|
cursor: pointer;
|
|
transition: transform 0.2s, box-shadow 0.2s;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.stat-card:active {
|
|
transform: scale(0.97);
|
|
box-shadow: var(--shadow-lg);
|
|
}
|
|
|
|
.stat-icon {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 2rem;
|
|
font-weight: 800;
|
|
color: var(--primary);
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 0.85rem;
|
|
color: var(--text-light);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* ===== ALERTS ===== */
|
|
.alert-section {
|
|
background: #fef3c7;
|
|
border: 2px solid var(--warning);
|
|
border-radius: var(--radius);
|
|
padding: 16px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.alert-section h3 {
|
|
font-size: 1.05rem;
|
|
margin-bottom: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.alert-danger {
|
|
background: #fee2e2;
|
|
border-color: var(--danger);
|
|
}
|
|
|
|
.alert-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 10px 12px;
|
|
margin-bottom: 6px;
|
|
background: rgba(255,255,255,0.7);
|
|
border-radius: var(--radius-sm);
|
|
font-size: 0.9rem;
|
|
gap: 8px;
|
|
}
|
|
|
|
.alert-item:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.alert-item-clickable {
|
|
cursor: pointer;
|
|
transition: background 0.15s, transform 0.1s;
|
|
}
|
|
|
|
.alert-item-clickable:active {
|
|
background: rgba(255,255,255,0.95);
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
.alert-item-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.alert-item-name {
|
|
font-weight: 600;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.alert-item-brand {
|
|
font-size: 0.8rem;
|
|
color: var(--text-light);
|
|
}
|
|
|
|
.alert-item-badge {
|
|
font-size: 0.8rem;
|
|
font-weight: 700;
|
|
padding: 4px 10px;
|
|
border-radius: 20px;
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.alert-item-badge.expiring {
|
|
background: var(--warning);
|
|
color: #fff;
|
|
}
|
|
|
|
.alert-item-badge.expiring-soon {
|
|
background: #ffc107;
|
|
color: #333;
|
|
}
|
|
|
|
.alert-item-badge.expiring-later {
|
|
background: #e0e0e0;
|
|
color: #555;
|
|
}
|
|
|
|
.alert-item-badge.expired {
|
|
background: var(--danger);
|
|
color: #fff;
|
|
}
|
|
|
|
.alert-item-badge.today {
|
|
background: var(--danger-light);
|
|
color: #fff;
|
|
}
|
|
|
|
/* Safety badges for expired items */
|
|
.alert-item-badges {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-end;
|
|
gap: 4px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.safety-badge {
|
|
font-size: 0.72rem;
|
|
font-weight: 700;
|
|
padding: 3px 8px;
|
|
border-radius: 12px;
|
|
white-space: nowrap;
|
|
cursor: help;
|
|
}
|
|
|
|
.safety-badge.safety-danger {
|
|
background: #dc3545;
|
|
color: #fff;
|
|
}
|
|
|
|
.safety-badge.safety-warning {
|
|
background: #ffc107;
|
|
color: #333;
|
|
}
|
|
|
|
.safety-badge.safety-ok {
|
|
background: #28a745;
|
|
color: #fff;
|
|
}
|
|
|
|
/* ===== SECTION CARD ===== */
|
|
.section-card {
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius);
|
|
padding: 16px;
|
|
box-shadow: var(--shadow);
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.section-card h3 {
|
|
font-size: 1rem;
|
|
margin-bottom: 12px;
|
|
color: var(--primary);
|
|
}
|
|
|
|
/* ===== LOCATION TABS ===== */
|
|
.location-tabs {
|
|
display: flex;
|
|
gap: 6px;
|
|
overflow-x: auto;
|
|
padding-bottom: 12px;
|
|
margin-bottom: 8px;
|
|
-webkit-overflow-scrolling: touch;
|
|
scrollbar-width: none;
|
|
}
|
|
|
|
.location-tabs::-webkit-scrollbar { display: none; }
|
|
|
|
.tab {
|
|
background: var(--bg-card);
|
|
border: 2px solid var(--border);
|
|
border-radius: 25px;
|
|
padding: 8px 16px;
|
|
font-size: 0.85rem;
|
|
font-weight: 600;
|
|
white-space: nowrap;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.tab.active {
|
|
background: var(--primary);
|
|
color: white;
|
|
border-color: var(--primary);
|
|
}
|
|
|
|
.tab:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
/* ===== SEARCH BAR ===== */
|
|
.search-bar {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.search-bar input {
|
|
width: 100%;
|
|
padding: 14px 16px;
|
|
border-radius: var(--radius);
|
|
border: 2px solid var(--border);
|
|
background: var(--bg-card);
|
|
font-size: 1rem;
|
|
outline: none;
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
.search-bar input:focus {
|
|
border-color: var(--primary);
|
|
}
|
|
|
|
/* ===== INVENTORY LIST ===== */
|
|
.inventory-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.inventory-item {
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius);
|
|
padding: 14px;
|
|
box-shadow: var(--shadow);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
cursor: pointer;
|
|
transition: transform 0.15s;
|
|
}
|
|
|
|
.inventory-item:active {
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
.inv-image {
|
|
width: 50px;
|
|
height: 50px;
|
|
border-radius: var(--radius-sm);
|
|
object-fit: cover;
|
|
background: var(--bg);
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.inv-image img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
.inv-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.inv-name {
|
|
font-weight: 700;
|
|
font-size: 1rem;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.inv-brand {
|
|
font-size: 0.8rem;
|
|
color: var(--text-light);
|
|
}
|
|
|
|
.inv-meta {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-top: 4px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.inv-badge {
|
|
font-size: 0.75rem;
|
|
padding: 2px 8px;
|
|
border-radius: 12px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.badge-location {
|
|
background: #dbeafe;
|
|
color: #1d4ed8;
|
|
}
|
|
|
|
.badge-qty {
|
|
background: #d1fae5;
|
|
color: #047857;
|
|
}
|
|
|
|
.badge-expiry {
|
|
background: #fef3c7;
|
|
color: #92400e;
|
|
}
|
|
|
|
.badge-expired {
|
|
background: #fee2e2;
|
|
color: #dc2626;
|
|
}
|
|
|
|
.inv-actions {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
.inv-action-btn {
|
|
background: none;
|
|
border: none;
|
|
font-size: 1.2rem;
|
|
cursor: pointer;
|
|
padding: 4px;
|
|
border-radius: 8px;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.inv-action-btn:active {
|
|
background: var(--border);
|
|
}
|
|
|
|
/* ===== BUTTONS ===== */
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
padding: 12px 20px;
|
|
border: none;
|
|
border-radius: var(--radius);
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
text-decoration: none;
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.btn:active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
.btn-large {
|
|
padding: 16px 24px;
|
|
font-size: 1.1rem;
|
|
border-radius: var(--radius);
|
|
}
|
|
|
|
.btn-huge {
|
|
padding: 28px 20px;
|
|
font-size: 1.2rem;
|
|
border-radius: 20px;
|
|
flex: 1;
|
|
flex-direction: column;
|
|
min-height: 120px;
|
|
}
|
|
|
|
.btn-icon {
|
|
font-size: 2.5rem;
|
|
}
|
|
|
|
.btn-text {
|
|
text-align: center;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.btn-text small {
|
|
font-weight: 400;
|
|
font-size: 0.8rem;
|
|
opacity: 0.85;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--primary);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:active {
|
|
background: var(--primary-dark);
|
|
}
|
|
|
|
.btn-success {
|
|
background: var(--success);
|
|
color: white;
|
|
}
|
|
|
|
.btn-success:active {
|
|
background: #15803d;
|
|
}
|
|
|
|
.btn-danger {
|
|
background: var(--danger);
|
|
color: white;
|
|
}
|
|
|
|
.btn-danger:active {
|
|
background: #b91c1c;
|
|
}
|
|
|
|
.btn-warning {
|
|
background: var(--warning);
|
|
color: white;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: var(--bg-card);
|
|
color: var(--text);
|
|
border: 2px solid var(--border);
|
|
}
|
|
|
|
.btn-accent {
|
|
background: var(--accent);
|
|
color: white;
|
|
}
|
|
|
|
.btn-accent:active {
|
|
background: #6d28d9;
|
|
}
|
|
|
|
.full-width {
|
|
width: 100%;
|
|
}
|
|
|
|
.mt-2 {
|
|
margin-top: 12px;
|
|
}
|
|
|
|
/* ===== ACTION BUTTONS (Scan page) ===== */
|
|
.action-buttons {
|
|
display: flex;
|
|
gap: 12px;
|
|
margin-top: 16px;
|
|
}
|
|
|
|
/* ===== FORMS ===== */
|
|
.form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
}
|
|
|
|
.form-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
.form-group label {
|
|
font-weight: 600;
|
|
font-size: 0.9rem;
|
|
color: var(--text);
|
|
}
|
|
|
|
.form-input {
|
|
width: 100%;
|
|
padding: 14px 16px;
|
|
border: 2px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
font-size: 1rem;
|
|
background: var(--bg-card);
|
|
outline: none;
|
|
transition: border-color 0.2s;
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
}
|
|
|
|
.form-input:focus {
|
|
border-color: var(--primary);
|
|
}
|
|
|
|
.form-row {
|
|
display: flex;
|
|
gap: 12px;
|
|
}
|
|
|
|
.flex-1 {
|
|
flex: 1;
|
|
}
|
|
|
|
/* ===== LOCATION SELECTOR ===== */
|
|
.location-selector {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 8px;
|
|
}
|
|
|
|
.loc-btn {
|
|
background: var(--bg-card);
|
|
border: 2px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
padding: 14px;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.loc-btn.active {
|
|
background: var(--primary);
|
|
color: white;
|
|
border-color: var(--primary);
|
|
}
|
|
|
|
.loc-btn:active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
/* ===== QUANTITY CONTROL ===== */
|
|
.qty-control {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.qty-btn {
|
|
width: 50px;
|
|
height: 50px;
|
|
border: 2px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
background: var(--bg-card);
|
|
font-size: 1.5rem;
|
|
font-weight: 700;
|
|
color: var(--primary);
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.qty-btn:active {
|
|
background: var(--primary);
|
|
color: white;
|
|
border-color: var(--primary);
|
|
}
|
|
|
|
.qty-input {
|
|
width: 80px;
|
|
height: 50px;
|
|
text-align: center;
|
|
font-size: 1.3rem;
|
|
font-weight: 700;
|
|
border: 2px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
outline: none;
|
|
-webkit-appearance: none;
|
|
-moz-appearance: textfield;
|
|
}
|
|
|
|
.qty-input:focus {
|
|
border-color: var(--primary);
|
|
}
|
|
|
|
/* ===== USE OPTIONS ===== */
|
|
.use-options {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
}
|
|
|
|
.use-all-btn {
|
|
min-height: 70px;
|
|
font-size: 1.15rem;
|
|
}
|
|
|
|
.use-partial {
|
|
background: var(--bg);
|
|
border-radius: var(--radius);
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.use-partial p {
|
|
font-size: 0.9rem;
|
|
color: var(--text-light);
|
|
}
|
|
|
|
/* ===== SCANNER ===== */
|
|
.scan-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
}
|
|
|
|
.scanner-viewport {
|
|
position: relative;
|
|
width: 100%;
|
|
aspect-ratio: 4/3;
|
|
background: #000;
|
|
border-radius: var(--radius);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.scanner-viewport video {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.scanner-overlay {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 10%;
|
|
right: 10%;
|
|
height: 3px;
|
|
transform: translateY(-50%);
|
|
z-index: 10;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.scanner-line {
|
|
width: 100%;
|
|
height: 3px;
|
|
background: var(--danger);
|
|
box-shadow: 0 0 10px var(--danger);
|
|
animation: scanLine 2s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes scanLine {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.3; }
|
|
}
|
|
|
|
.scan-result {
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius);
|
|
padding: 16px;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.scan-actions {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.barcode-manual-entry {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.barcode-input-row {
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: center;
|
|
}
|
|
|
|
.barcode-input-row .form-input {
|
|
flex: 1;
|
|
margin: 0;
|
|
font-size: 1.1rem;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
.barcode-input-row .btn {
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.quick-name-entry {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.quick-name-divider {
|
|
text-align: center;
|
|
margin: 10px 0 8px;
|
|
position: relative;
|
|
}
|
|
|
|
.quick-name-divider::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 0;
|
|
right: 0;
|
|
height: 1px;
|
|
background: var(--border);
|
|
}
|
|
|
|
.quick-name-divider span {
|
|
background: var(--bg-main);
|
|
padding: 0 12px;
|
|
position: relative;
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.quick-name-results {
|
|
margin-top: 8px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.quick-name-result-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px 12px;
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius);
|
|
box-shadow: var(--shadow);
|
|
cursor: pointer;
|
|
transition: transform 0.1s;
|
|
}
|
|
|
|
.quick-name-result-item:active {
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
.quick-name-result-item .qnr-icon {
|
|
font-size: 1.5rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.quick-name-result-item .qnr-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.quick-name-result-item .qnr-name {
|
|
font-weight: 600;
|
|
font-size: 0.95rem;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.quick-name-result-item .qnr-detail {
|
|
font-size: 0.8rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.quick-name-result-item.qnr-new {
|
|
border: 1px dashed var(--accent);
|
|
background: rgba(124, 58, 237, 0.06);
|
|
}
|
|
|
|
.scan-hint {
|
|
text-align: center;
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* ===== SHOPPING LIST (BRING!) ===== */
|
|
.shopping-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
}
|
|
|
|
.bring-loading {
|
|
text-align: center;
|
|
padding: 30px;
|
|
color: var(--text-muted);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.bring-error {
|
|
text-align: center;
|
|
padding: 20px;
|
|
background: #fef2f2;
|
|
color: #dc2626;
|
|
border-radius: var(--radius);
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.shopping-section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.shopping-section-header h3 {
|
|
font-size: 1rem;
|
|
margin: 0;
|
|
}
|
|
|
|
.shopping-count {
|
|
background: var(--accent);
|
|
color: #fff;
|
|
border-radius: 50%;
|
|
width: 24px;
|
|
height: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.shopping-items {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.shopping-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px 12px;
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.shopping-item-icon {
|
|
font-size: 1.3rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.shopping-item-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.shopping-item-name {
|
|
font-weight: 600;
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.shopping-item-spec {
|
|
font-size: 0.8rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.shopping-item-remove {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-muted);
|
|
font-size: 1rem;
|
|
padding: 4px 8px;
|
|
cursor: pointer;
|
|
border-radius: 50%;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.shopping-item-remove:hover,
|
|
.shopping-item-remove:active {
|
|
background: #fee2e2;
|
|
color: #ef4444;
|
|
}
|
|
|
|
.shopping-actions {
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.seasonal-tip {
|
|
background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
|
|
padding: 12px 14px;
|
|
border-radius: var(--radius);
|
|
font-size: 0.85rem;
|
|
color: #065f46;
|
|
margin-bottom: 8px;
|
|
border-left: 3px solid #10b981;
|
|
}
|
|
|
|
.suggestion-items {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.suggestion-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 10px 12px;
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius);
|
|
box-shadow: var(--shadow);
|
|
cursor: pointer;
|
|
transition: transform 0.1s, background 0.2s;
|
|
border: 2px solid transparent;
|
|
}
|
|
|
|
.suggestion-item.selected {
|
|
border-color: var(--accent);
|
|
background: #faf5ff;
|
|
}
|
|
|
|
.suggestion-item:active {
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
.suggestion-check {
|
|
font-size: 1.1rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.suggestion-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.suggestion-name {
|
|
font-weight: 600;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.suggestion-name small {
|
|
font-weight: 400;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.suggestion-reason {
|
|
font-size: 0.78rem;
|
|
color: var(--text-muted);
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.priority-badge {
|
|
display: inline-block;
|
|
font-size: 0.65rem;
|
|
font-weight: 600;
|
|
padding: 1px 6px;
|
|
border-radius: 8px;
|
|
vertical-align: middle;
|
|
margin-left: 4px;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.priority-high {
|
|
background: #fee2e2;
|
|
color: #dc2626;
|
|
}
|
|
|
|
.priority-med {
|
|
background: #fef9c3;
|
|
color: #ca8a04;
|
|
}
|
|
|
|
.priority-low {
|
|
background: #ecfdf5;
|
|
color: #059669;
|
|
}
|
|
|
|
.suggestion-actions {
|
|
margin-top: 12px;
|
|
text-align: center;
|
|
}
|
|
|
|
.suggestion-actions .btn-success {
|
|
width: 100%;
|
|
}
|
|
|
|
/* ===== PRODUCT PREVIEW ===== */
|
|
.product-preview, .product-preview-small {
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius);
|
|
padding: 16px;
|
|
box-shadow: var(--shadow);
|
|
margin-bottom: 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 14px;
|
|
}
|
|
|
|
.product-preview-small {
|
|
padding: 12px;
|
|
}
|
|
|
|
.product-preview img, .product-preview-small img {
|
|
width: 60px;
|
|
height: 60px;
|
|
border-radius: var(--radius-sm);
|
|
object-fit: cover;
|
|
background: var(--bg);
|
|
}
|
|
|
|
.product-preview-small img {
|
|
width: 45px;
|
|
height: 45px;
|
|
}
|
|
|
|
.product-preview-emoji {
|
|
font-size: 2.5rem;
|
|
width: 60px;
|
|
text-align: center;
|
|
}
|
|
|
|
.product-preview-info h3 {
|
|
font-size: 1.1rem;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.product-preview-info p {
|
|
font-size: 0.85rem;
|
|
color: var(--text-light);
|
|
}
|
|
|
|
.product-image-preview {
|
|
text-align: center;
|
|
margin: 8px 0;
|
|
}
|
|
|
|
.product-image-preview img {
|
|
max-width: 120px;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
/* ===== AI PAGE ===== */
|
|
.ai-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
}
|
|
|
|
.ai-capture {
|
|
position: relative;
|
|
width: 100%;
|
|
aspect-ratio: 4/3;
|
|
background: #000;
|
|
border-radius: var(--radius);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.ai-capture video {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.ai-preview {
|
|
text-align: center;
|
|
}
|
|
|
|
.ai-preview img {
|
|
max-width: 100%;
|
|
border-radius: var(--radius);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.ai-actions {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.ai-result {
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius);
|
|
padding: 16px;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
/* ===== BOTTOM NAV ===== */
|
|
.bottom-nav {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: var(--nav-height);
|
|
background: var(--bg-card);
|
|
display: flex;
|
|
justify-content: space-around;
|
|
align-items: center;
|
|
box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
|
|
z-index: 100;
|
|
padding-bottom: env(safe-area-inset-bottom, 0);
|
|
}
|
|
|
|
.nav-btn {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 2px;
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-muted);
|
|
font-size: 0.7rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
padding: 6px 10px;
|
|
border-radius: var(--radius-sm);
|
|
transition: all 0.2s;
|
|
min-width: 56px;
|
|
}
|
|
|
|
.nav-btn.active {
|
|
color: var(--primary);
|
|
}
|
|
|
|
.nav-icon {
|
|
font-size: 1.4rem;
|
|
}
|
|
|
|
.nav-label {
|
|
font-size: 0.65rem;
|
|
}
|
|
|
|
/* ===== TOAST ===== */
|
|
.toast {
|
|
position: fixed;
|
|
bottom: calc(var(--nav-height) + 16px);
|
|
left: 50%;
|
|
transform: translateX(-50%) translateY(100px);
|
|
background: var(--bg-dark);
|
|
color: white;
|
|
padding: 14px 24px;
|
|
border-radius: var(--radius);
|
|
font-size: 0.95rem;
|
|
font-weight: 600;
|
|
z-index: 1000;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: all 0.3s;
|
|
max-width: 90vw;
|
|
text-align: center;
|
|
box-shadow: var(--shadow-lg);
|
|
}
|
|
|
|
.toast.show {
|
|
opacity: 1;
|
|
transform: translateX(-50%) translateY(0);
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.toast.success {
|
|
background: var(--success);
|
|
}
|
|
|
|
.toast.error {
|
|
background: var(--danger);
|
|
}
|
|
|
|
/* ===== LOADING ===== */
|
|
.loading-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0,0,0,0.5);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1000;
|
|
color: white;
|
|
gap: 12px;
|
|
}
|
|
|
|
.loading-spinner {
|
|
width: 40px;
|
|
height: 40px;
|
|
border: 4px solid rgba(255,255,255,0.3);
|
|
border-top-color: white;
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* ===== MODAL ===== */
|
|
.modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0,0,0,0.5);
|
|
display: flex;
|
|
align-items: flex-end;
|
|
justify-content: center;
|
|
z-index: 200;
|
|
padding: 0;
|
|
}
|
|
|
|
.modal-content {
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius) var(--radius) 0 0;
|
|
width: 100%;
|
|
max-width: 600px;
|
|
max-height: 80vh;
|
|
overflow-y: auto;
|
|
padding: 20px;
|
|
animation: slideUp 0.3s ease;
|
|
}
|
|
|
|
@keyframes slideUp {
|
|
from { transform: translateY(100%); }
|
|
to { transform: translateY(0); }
|
|
}
|
|
|
|
.modal-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.modal-header h3 {
|
|
font-size: 1.15rem;
|
|
}
|
|
|
|
.modal-close {
|
|
background: var(--bg);
|
|
border: none;
|
|
font-size: 1.3rem;
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.modal-detail {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.modal-detail-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 8px 0;
|
|
border-bottom: 1px solid var(--border);
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.modal-detail-label {
|
|
color: var(--text-light);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.modal-detail-value {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.modal-actions {
|
|
display: flex;
|
|
gap: 10px;
|
|
margin-top: 16px;
|
|
}
|
|
|
|
/* ===== TRANSACTIONS LIST ===== */
|
|
.transaction-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px 0;
|
|
border-bottom: 1px solid var(--border);
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.transaction-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.tx-icon {
|
|
font-size: 1.3rem;
|
|
width: 32px;
|
|
text-align: center;
|
|
}
|
|
|
|
.tx-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.tx-name {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.tx-detail {
|
|
font-size: 0.8rem;
|
|
color: var(--text-light);
|
|
}
|
|
|
|
.tx-qty {
|
|
font-weight: 700;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.tx-qty.in {
|
|
color: var(--success);
|
|
}
|
|
|
|
.tx-qty.out {
|
|
color: var(--danger);
|
|
}
|
|
|
|
/* ===== PRODUCTS LIST ===== */
|
|
.products-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.product-item {
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius);
|
|
padding: 14px;
|
|
box-shadow: var(--shadow);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.product-item:active {
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
/* ===== USE INVENTORY INFO ===== */
|
|
.use-inventory-info {
|
|
background: #dbeafe;
|
|
border-radius: var(--radius);
|
|
padding: 12px 16px;
|
|
margin-bottom: 12px;
|
|
font-size: 0.9rem;
|
|
color: #1d4ed8;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* ===== EMPTY STATE ===== */
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 40px 20px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.empty-state-icon {
|
|
font-size: 3rem;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.empty-state p {
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
/* ===== CATEGORY GROUP HEADERS ===== */
|
|
.cat-group-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 8px 4px 4px;
|
|
font-size: 0.85rem;
|
|
font-weight: 700;
|
|
color: var(--primary);
|
|
border-bottom: 1px solid var(--border);
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.cat-group-header:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.cat-group-count {
|
|
background: var(--primary);
|
|
color: white;
|
|
font-size: 0.7rem;
|
|
font-weight: 700;
|
|
padding: 1px 7px;
|
|
border-radius: 10px;
|
|
margin-left: auto;
|
|
}
|
|
|
|
/* ===== EDIT UNKNOWN PRODUCT ===== */
|
|
.edit-unknown-card {
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius);
|
|
padding: 16px;
|
|
margin: 12px 0;
|
|
box-shadow: var(--shadow);
|
|
border: 2px solid var(--border);
|
|
}
|
|
|
|
.edit-unknown-card.highlight {
|
|
border-color: var(--warning);
|
|
background: #fffbeb;
|
|
}
|
|
|
|
.edit-unknown-card h4 {
|
|
font-size: 1rem;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.edit-unknown-hint {
|
|
font-size: 0.85rem;
|
|
color: var(--text-light);
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.edit-unknown-form .form-group {
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.edit-unknown-form .form-group label {
|
|
font-size: 0.85rem;
|
|
font-weight: 600;
|
|
display: block;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
/* ===== COMPACT INVENTORY ON DASHBOARD ===== */
|
|
.inventory-list.compact {
|
|
gap: 4px;
|
|
}
|
|
|
|
.compact-item {
|
|
padding: 10px 12px;
|
|
border-radius: 12px;
|
|
box-shadow: none;
|
|
border-bottom: 1px solid var(--border);
|
|
background: transparent;
|
|
}
|
|
|
|
.compact-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.compact-item .inv-image {
|
|
width: 36px;
|
|
height: 36px;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.compact-item .inv-image img {
|
|
width: 36px;
|
|
height: 36px;
|
|
}
|
|
|
|
.compact-item .inv-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.compact-item .inv-name {
|
|
font-size: 0.92rem;
|
|
}
|
|
|
|
.compact-item .inv-brand {
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
.inv-qty-right {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-end;
|
|
gap: 2px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.inv-qty-value {
|
|
font-weight: 800;
|
|
font-size: 1rem;
|
|
color: var(--primary);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.inv-expiry-small {
|
|
font-size: 0.7rem;
|
|
color: var(--text-muted);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.inv-expiry-small.expiring {
|
|
color: var(--warning);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.inv-expiry-small.expired {
|
|
color: var(--danger);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.section-card h3 {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
/* ===== RESPONSIVE ===== */
|
|
@media (min-width: 768px) {
|
|
.dashboard-stats {
|
|
grid-template-columns: repeat(4, 1fr);
|
|
}
|
|
|
|
.location-selector {
|
|
grid-template-columns: repeat(4, 1fr);
|
|
}
|
|
}
|
|
|
|
/* Safe area for notched phones */
|
|
@supports (padding: env(safe-area-inset-bottom)) {
|
|
.bottom-nav {
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
height: calc(var(--nav-height) + env(safe-area-inset-bottom));
|
|
}
|
|
body {
|
|
padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
|
|
}
|
|
}
|
|
|
|
/* ===== PURCHASE TYPE SELECTOR ===== */
|
|
.purchase-type-selector {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 8px;
|
|
margin: 8px 0 12px;
|
|
}
|
|
|
|
.purchase-type-btn {
|
|
padding: 12px 8px;
|
|
border: 2px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
background: var(--bg-card);
|
|
font-size: 0.95rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
text-align: center;
|
|
}
|
|
|
|
.purchase-type-btn.active {
|
|
border-color: var(--primary);
|
|
background: rgba(45, 80, 22, 0.08);
|
|
color: var(--primary);
|
|
}
|
|
|
|
/* ===== EXPIRY DETAIL ===== */
|
|
.expiry-detail {
|
|
margin-top: 8px;
|
|
padding: 12px;
|
|
background: #f8faf5;
|
|
border-radius: var(--radius-sm);
|
|
border: 1px solid rgba(45, 80, 22, 0.1);
|
|
}
|
|
|
|
.expiry-estimate {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 8px 0;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.expiry-estimate-label {
|
|
font-size: 0.9rem;
|
|
color: var(--text-light);
|
|
}
|
|
|
|
.expiry-estimate-date {
|
|
font-size: 0.85rem;
|
|
color: var(--primary);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.form-hint {
|
|
font-size: 0.8rem;
|
|
color: var(--text-muted);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* ===== REMAINING QUANTITY OPTIONS ===== */
|
|
.remaining-options {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 6px;
|
|
margin-top: 6px;
|
|
}
|
|
|
|
.remaining-btn {
|
|
padding: 10px 4px;
|
|
border: 2px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
background: var(--bg-card);
|
|
font-size: 0.9rem;
|
|
cursor: pointer;
|
|
text-align: center;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.remaining-btn.active {
|
|
border-color: var(--primary);
|
|
background: rgba(45, 80, 22, 0.08);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* ===== PRODUCT DETAILS CARD (Action Page) ===== */
|
|
.product-details-card {
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius);
|
|
padding: 14px;
|
|
margin: 0 16px 16px;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.product-detail-tags {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.product-detail-tag {
|
|
display: inline-block;
|
|
padding: 4px 10px;
|
|
border-radius: 20px;
|
|
background: #f3f4f6;
|
|
font-size: 0.8rem;
|
|
color: #374151;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.product-allergens {
|
|
padding: 8px 10px;
|
|
background: #fef3cd;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 0.85rem;
|
|
margin-bottom: 8px;
|
|
color: #856404;
|
|
}
|
|
|
|
.product-ingredients {
|
|
margin-top: 6px;
|
|
}
|
|
|
|
.product-ingredients summary {
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
font-weight: 600;
|
|
color: var(--text-light);
|
|
padding: 6px 0;
|
|
}
|
|
|
|
.product-ingredients p {
|
|
font-size: 0.8rem;
|
|
color: var(--text-light);
|
|
line-height: 1.5;
|
|
padding: 6px 0;
|
|
}
|
|
|
|
.product-conservation {
|
|
font-size: 0.8rem;
|
|
color: var(--text-light);
|
|
padding: 6px 0;
|
|
border-top: 1px solid var(--border);
|
|
margin-top: 6px;
|
|
}
|
|
|
|
/* ===== QUANTITY + UNIT ROW ===== */
|
|
.qty-unit-row {
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: center;
|
|
}
|
|
|
|
.unit-select {
|
|
width: 70px;
|
|
min-width: 70px;
|
|
padding: 10px 4px;
|
|
text-align: center;
|
|
font-weight: 600;
|
|
font-size: 0.95rem;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
/* ===== EXPIRY INPUT + CAMERA ROW ===== */
|
|
.expiry-input-row {
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: center;
|
|
}
|
|
|
|
.expiry-input-row .form-input {
|
|
flex: 1;
|
|
}
|
|
|
|
.btn-scan-expiry {
|
|
padding: 10px 14px !important;
|
|
font-size: 1.2rem;
|
|
min-width: 48px;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
/* ===== EXPIRY SCANNER MODAL ===== */
|
|
.expiry-scanner {
|
|
padding: 4px 0;
|
|
}
|
|
|
|
.expiry-scanner-actions {
|
|
margin-top: 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
/* ===== RECIPE DIALOG ===== */
|
|
.recipe-dialog {
|
|
max-height: 85vh;
|
|
overflow-y: auto;
|
|
width: 94%;
|
|
max-width: 500px;
|
|
}
|
|
|
|
.recipe-ask {
|
|
text-align: center;
|
|
}
|
|
|
|
.recipe-ask h3 {
|
|
font-size: 1.4rem;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.recipe-desc {
|
|
color: var(--text-muted);
|
|
font-size: 0.9rem;
|
|
margin-bottom: 16px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.recipe-ask .form-group {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.recipe-ask .qty-control {
|
|
justify-content: center;
|
|
}
|
|
|
|
.recipe-loading {
|
|
text-align: center;
|
|
padding: 40px 16px;
|
|
}
|
|
|
|
.recipe-loading p {
|
|
margin-top: 16px;
|
|
color: var(--text-muted);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.recipe-result {
|
|
text-align: left;
|
|
}
|
|
|
|
.recipe-result h2 {
|
|
font-size: 1.3rem;
|
|
color: var(--primary);
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.recipe-result h3 {
|
|
font-size: 1.1rem;
|
|
margin-top: 16px;
|
|
margin-bottom: 8px;
|
|
color: var(--text);
|
|
}
|
|
|
|
.recipe-result ul {
|
|
padding-left: 20px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.recipe-result li {
|
|
margin-bottom: 4px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.recipe-result ol {
|
|
padding-left: 20px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.recipe-result ol li {
|
|
margin-bottom: 8px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.recipe-result .recipe-tag {
|
|
display: inline-block;
|
|
background: var(--bg-light);
|
|
color: var(--primary);
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
padding: 3px 10px;
|
|
border-radius: 12px;
|
|
margin: 2px 4px 2px 0;
|
|
}
|
|
|
|
.recipe-result .recipe-meta {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.recipe-result .recipe-expiry-note {
|
|
background: #fff3cd;
|
|
color: #856404;
|
|
padding: 8px 12px;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 0.85rem;
|
|
margin-bottom: 12px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* ===== AI IDENTIFICATION RESULTS ===== */
|
|
.ai-identified-card {
|
|
background: var(--bg-light);
|
|
border-radius: var(--radius-sm);
|
|
padding: 12px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.ai-matches-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.ai-match-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px;
|
|
background: var(--bg-card);
|
|
border: 2px solid var(--bg-light);
|
|
border-radius: var(--radius-sm);
|
|
cursor: pointer;
|
|
transition: border-color 0.2s, background 0.2s;
|
|
}
|
|
|
|
.ai-match-item:active {
|
|
border-color: var(--primary);
|
|
background: var(--bg-light);
|
|
}
|
|
|
|
.ai-match-img {
|
|
width: 48px;
|
|
height: 48px;
|
|
object-fit: contain;
|
|
border-radius: var(--radius-sm);
|
|
flex-shrink: 0;
|
|
background: #fff;
|
|
}
|
|
|
|
.ai-match-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
font-size: 0.9rem;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.ai-match-info strong {
|
|
display: block;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.ai-match-barcode {
|
|
font-size: 0.7rem;
|
|
color: var(--text-muted);
|
|
font-family: monospace;
|
|
flex-shrink: 0;
|
|
}
|