/* Reset and Base Styles */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; background-color: #f5f7fa; color: #333; line-height: 1.6; } .container { max-width: 1200px; margin: 0 auto; padding: 20px; } /* Header */ header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; padding: 20px; background: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } h1 { color: #2c3e50; font-size: 2rem; font-weight: 600; } /* Buttons */ .btn { padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.3s ease; text-decoration: none; display: inline-block; } .btn-primary { background-color: #3498db; color: white; } .btn-primary:hover { background-color: #2980b9; transform: translateY(-2px); } .btn-secondary { background-color: #95a5a6; color: white; } .btn-secondary:hover { background-color: #7f8c8d; } .btn-danger { background-color: #e74c3c; color: white; padding: 6px 12px; font-size: 12px; } .btn-danger:hover { background-color: #c0392b; } .btn-warning { background-color: #f39c12; color: white; padding: 6px 12px; font-size: 12px; } .btn-warning:hover { background-color: #e67e22; } /* Stats Cards */ .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; } .stat-card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); text-align: center; } .stat-card h3 { color: #7f8c8d; font-size: 0.9rem; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; } .stat-card span { font-size: 1.8rem; font-weight: 600; color: #2c3e50; } /* Search Container */ .search-container { display: flex; gap: 15px; margin-bottom: 25px; align-items: center; } #searchInput { flex: 1; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; } #searchInput:focus { outline: none; border-color: #3498db; box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2); } /* Table Styles */ .table-container { background: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); overflow: hidden; } table { width: 100%; border-collapse: collapse; } thead { background-color: #34495e; color: white; } th, td { padding: 15px; text-align: left; border-bottom: 1px solid #ecf0f1; } th { font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.9rem; } tbody tr { transition: background-color 0.2s ease; } tbody tr:hover { background-color: #f8f9fa; } tbody tr:nth-child(even) { background-color: #fafbfc; } tbody tr:nth-child(even):hover { background-color: #f1f3f4; } .price { font-weight: 600; color: #27ae60; } .quantity { font-weight: 500; } .low-stock { color: #e74c3c; font-weight: 600; } .actions { display: flex; gap: 8px; } /* Modal Styles */ .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); } .modal-content { background-color: white; margin: 5% auto; padding: 0; border-radius: 8px; width: 90%; max-width: 500px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); } .modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #ecf0f1; } .modal-header h2 { color: #2c3e50; font-size: 1.5rem; } .close { font-size: 28px; font-weight: bold; cursor: pointer; color: #95a5a6; } .close:hover { color: #2c3e50; } /* Form Styles */ form { padding: 20px; } .form-group { margin-bottom: 20px; } label { display: block; margin-bottom: 5px; font-weight: 500; color: #2c3e50; } input[type="text"], input[type="number"] { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; } input[type="text"]:focus, input[type="number"]:focus { outline: none; border-color: #3498db; box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2); } .form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 25px; } /* Loading Spinner */ .loading { display: none; text-align: center; padding: 40px; background: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .spinner { border: 4px solid #f3f3f3; border-top: 4px solid #3498db; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 0 auto 20px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* Error Message */ .error { background-color: #e74c3c; color: white; padding: 15px; border-radius: 6px; margin-bottom: 20px; text-align: center; } /* Responsive Design */ @media (max-width: 768px) { .container { padding: 10px; } header { flex-direction: column; gap: 15px; text-align: center; } .search-container { flex-direction: column; } table { font-size: 14px; } th, td { padding: 10px 8px; } .actions { flex-direction: column; gap: 5px; } .btn-danger, .btn-warning { padding: 8px 12px; font-size: 11px; } } @media (max-width: 480px) { .stats { grid-template-columns: 1fr; } .modal-content { width: 95%; margin: 10% auto; } .form-actions { flex-direction: column; } }