/* ================================== */ /* GLOBAL STYLES & CSS VARIABLES */ /* ================================== */ :root { --primary-color: #10B981; /* A modern, vibrant green */ --primary-dark: #059669; --danger-color: #EF4444; --danger-dark: #DC2626; --warning-color: #F59E0B; --info-color: #3B82F6; --light-text: #E5E7EB; --dark-text: #1F2937; --bg-dark: #111827; /* Fallback background color */ /* --- NEW: Semi-transparent backgrounds for the glass effect --- */ --bg-card-glass: rgba(31, 41, 55, 0.65); --bg-sidebar-glass: rgba(17, 24, 39, 0.8); --border-color: rgba(107, 114, 128, 0.4); /* Make border semi-transparent */ --border-radius: 16px; /* Slightly larger radius for a softer look */ --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); } body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; /* --- The body now IS the background --- */ background: url('../img/background.jpg') no-repeat center center/cover; background-color: var(--bg-dark); /* Fallback color */ color: var(--light-text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } * { box-sizing: border-box; } button, input, select { font-family: 'Poppins', sans-serif; } i { margin-right: 10px; } /* ================================== */ /* LOGIN SCREEN */ /* ================================== */ #login-container { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px; width: 100%; height: 100vh; /* This overlay remains to keep login text readable */ background: linear-gradient(rgba(17, 24, 39, 0.8), rgba(17, 24, 39, 1)); } #login-container h2 { font-size: 2.5em; font-weight: 700; color: #fff; margin-bottom: 30px; } #login-container #google-signin-btn { width: 90%; max-width: 320px; background-color: #fff; color: var(--dark-text); font-size: 16px; font-weight: 600; } .error-message { color: #fff; background-color: rgba(239, 68, 68, 0.7); border: 1px solid var(--danger-color); padding: 12px; border-radius: var(--border-radius); margin: 15px auto; font-size: 14px; font-weight: bold; max-width: 350px; width: 90%; } /* ================================== */ /* MAIN APP PAGE */ /* ================================== */ #app-container { padding: 20px 15px 100px 15px; height: 100vh; overflow-y: auto; /* --- CRITICAL CHANGE: Make the main container transparent --- */ background-color: transparent; } #date-container { text-align: center; font-size: 1.5em; font-weight: 600; padding: 15px; margin-bottom: 15px; /* Add a subtle background to make text pop */ background-color: rgba(0,0,0,0.3); border-radius: var(--border-radius); } #old-day-warning { background-color: var(--warning-color); padding: 10px; text-align: center; font-size: 14px; color: var(--dark-text); border-radius: var(--border-radius); margin-bottom: 15px; } #old-day-warning button { margin-left: 15px; padding: 4px 10px; font-size: 12px; background: var(--dark-text); color: #fff; } /* ================================== */ /* GLASSMORPHISM CARD-BASED LAYOUT */ /* ================================== */ #sales-cards-container { display: grid; gap: 15px; } .sale-card { /* --- NEW: Glass effect for cards --- */ background-color: var(--bg-card-glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: var(--border-radius); border: 1px solid var(--border-color); overflow: hidden; display: flex; flex-direction: column; } .card-header { display: flex; align-items: center; padding: 10px 15px; background-color: rgba(0,0,0,0.2); } .card-header .item-name-select { flex-grow: 1; background: transparent; border: none; color: #fff; font-size: 1.1em; font-weight: 600; padding: 5px; margin-right: 10px; -webkit-appearance: none; appearance: none; } .card-body { display: flex; justify-content: space-around; padding: 15px; gap: 15px; } .price-field { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 50%; } .price-field label { font-size: 0.8em; color: var(--light-text); opacity: 0.7; text-transform: uppercase; } .price-field .buy-price { font-size: 1.2em; font-weight: 500; } .price-field .sell-price-input { width: 100%; padding: 10px; font-size: 1.2em; font-weight: 500; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-dark); color: var(--light-text); text-align: center; } .card-footer { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; background: var(--primary-dark); color: #fff; font-weight: 600; font-size: 1.1em; } .placeholder-card { text-align: center; padding: 50px 20px; color: var(--light-text); opacity: 0.6; border: 2px dashed var(--border-color); border-radius: var(--border-radius); } /* ================================== */ /* FLOATING ACTION BUTTON (FAB) */ /* ================================== */ #add-sale-fab { position: fixed; bottom: 25px; right: 25px; width: 60px; height: 60px; border-radius: 50%; background-color: var(--primary-color); color: white; display: flex; justify-content: center; align-items: center; font-size: 24px; box-shadow: var(--box-shadow); z-index: 1000; transition: background-color 0.2s, transform 0.2s ease; } #add-sale-fab:hover { background-color: var(--primary-dark); transform: scale(1.05); } #add-sale-fab i { margin: 0; } /* ================================== */ /* SIDEBAR & OVERLAY */ /* ================================== */ #sidebar-toggle { position: fixed; top: 15px; right: 15px; z-index: 1100; background: transparent; font-size: 24px; width: 44px; height: 44px; display: flex; justify-content: center; align-items: center; } #sidebar-toggle i { margin: 0; color: var(--light-text); filter: drop-shadow(0 0 3px rgba(0,0,0,0.5)); } #sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); z-index: 1040; display: none; } #totals-sidebar { position: fixed; top: 0; right: -320px; width: 320px; max-width: 90%; height: 100%; /* --- NEW: Glass effect for the sidebar --- */ background-color: var(--bg-sidebar-glass); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-left: 1px solid var(--border-color); box-shadow: var(--box-shadow); z-index: 1050; transition: right 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); /* Smoother transition */ } #totals-sidebar.open { right: 0; } .sidebar-content { padding: 20px; padding-top: 60px; overflow-y: auto; height: 100%; } #totals-sidebar h3 { margin-top: 0; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; } #totals-sidebar hr { border: none; border-top: 1px solid #444; margin: 20px 0; } .sidebar-card { background: rgba(255, 255, 255, 0.05); padding: 15px; border-radius: var(--border-radius); border: 1px solid var(--border-color); } #account-info p { margin: 0 0 10px 0; font-size: 14px; word-break: break-all; } #account-info #logout-btn { width: 100%; } .sync-status { font-size: 12px; padding: 8px; border-radius: 4px; text-align: center; margin-bottom: 10px; font-weight: bold; background-color: #444; color: #ccc; transition: background-color 0.3s, color 0.3s; } .sync-status.syncing { background-color: var(--warning-color); color: var(--dark-text); } .sync-status.synced { background-color: var(--primary-dark); color: white; } .sync-status.error { background-color: var(--danger-color); color: white; } #manual-sync-btn { width: 100%; } .total-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 16px; } .total-item.profit { font-weight: bold; font-size: 18px; color: var(--primary-color); border-top: 1px solid #444; margin-top: 5px; padding-top: 10px; } #totals-sidebar label { font-weight: bold; display: block; margin-bottom: 10px; } #totals-sidebar input[type="date"] { width: 100%; padding: 10px; background: #333; color: var(--light-text); border: 1px solid #666; border-radius: 8px; } #totals-sidebar .nav-button { width: 100%; background-color: var(--info-color); } /* ================================== */ /* ITEM MANAGER PAGE */ /* ================================== */ #item-manager-container { display: none; flex-direction: column; padding: 15px; height: 100vh; background: transparent; } .item-manager-header { display: flex; align-items: center; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; } .item-manager-header h2 { margin: 0; flex-grow: 1; text-align: center; } .add-item-form.card, #item-list li { background-color: var(--bg-card-glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--border-color); padding: 20px; border-radius: var(--border-radius); margin: 20px 0; } #item-manager-container input { background: var(--bg-dark); color: var(--light-text); border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; margin-bottom: 10px; width: 100%; } #item-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px;} #item-list li { padding: 15px; margin: 0; display: flex; justify-content: space-between; align-items: center; } /* ================================== */ /* GENERAL BUTTON & TOAST STYLES */ /* ================================== */ button { padding: 12px 18px; cursor: pointer; border: none; border-radius: var(--border-radius); color: white; background-color: var(--primary-color); transition: background-color 0.2s, transform 0.1s; font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; } button:hover { background-color: var(--primary-dark); } button:active { transform: scale(0.98); } button.danger { background-color: var(--danger-color); } button.danger:hover { background-color: var(--danger-dark); } .remove-item-btn, .remove-card-btn { background-color: transparent; color: var(--danger-color); width: 36px; height: 36px; font-size: 18px; padding: 0; } .remove-item-btn i, .remove-card-btn i { margin: 0; } .remove-item-btn:hover, .remove-card-btn:hover { background-color: rgba(239, 68, 68, 0.2); } #toast-message { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background-color: rgba(0, 0, 0, 0.8); color: white; padding: 12px 24px; border-radius: 25px; font-size: 14px; z-index: 2000; display: none; }